C_R

3617 Reputation

21 Badges

6 years, 116 days

MaplePrimes Activity


These are replies submitted by C_R

@nm 

I assume it’s a combination of resources, priorities and risk of regression in other areas which are in the way of an improved timelimit implementation.

For me, the Maple kernel acts like an operating system on its own. Since the kernel interprets code form the GUI and libraries it should be capable to interrupt at each new command (from the GUI or libraries) to be processed. The kernel should have full control over timing here.

It could be that for built-in routines/procedures there are less options to interrupt them in middle of what they are doing. Making these routines/functions fit for “interrupt by the kernel” could require code rewrite and involvement of functions of the operating system of the computer (which ultimately manages tasks, threads, handles, and the like). To complicate things not all operating systems function the same. Sounds like allot of testing to be done to make sure that a new kernel version can be released. Maybe an overhaul of built-in routines is already ongoing which will incrementally improve the situation.

Since I do not have insight into timelimit I was wondering if nested timelimit calls could improve the situation. Probably not but maybe worth a trial.

Independent of current limitations of process monitoring, your test case without timelimit can lead to undesired conditions, which are: interrupt from the GUI not possible, allocation of a huge chunk of process memory, and GUI freeze – this also in single core, single thread mode. Worth investigating by a specialist.

 

Update for:

 mserver "unresponsive" after a while: interrupt from the GUI does not work, Time in the status bar is not updated, private bytes = system alloacted memory jump 64 Gb, physical memory (visible in Windows task manager) still piling up

The process thread that piles up the memory (here 21 Gb) is the function "maple_quo" of a dll called sdmp. The suffix +... after the function name changes all the time indicating activity.

The code did not hang and responded after about an hour to an interprut request from the GUI. The memory allocated went back from 64 Gb to 3 Gb. Looks to me as if timelimit and the GUI interrupt by the same way once they are triggered.


I am now more inclined to say that the integrand in combination with ParallelRisch leads to situation where a built-in Maple function cannot be interupted for quite some time. Similar situations might occur with other functions.

The big question is now:
Where in the threads of mserver.exe is timelimit running? Is it a function of a dll or part of mserver?

@acer 

Nowadays cpu's some with more than on core. Not sure how to interpret the help text about hyper threading. My computer has one cpu but I see a difference when I set to 1. Does numcpus=1 remove all logical cores from the computation?

@Ronan 

Didn't notice... 

Probably because I installed MapleSim some days ago which is already 2024.1.

Do we see a fix here?

 

                                    

                                      

@nm 

With this one I get sdmp:-mull error

hangs_int_V3_june_16_2024_rply.mw

@nm 
Attached is the second run. The first run was aborded during trial 3 after a good hour with the interput button.
Time at the status bar was only upated after the interupt completed. (allocated pricate memory was 64 Gb at interput)

hangs_int_V2_june_16_2024_after_abort_and_rerun.mw

The new worksheet times out a factor of 3 faster.

Currently the thrid run (by !!!, without reload of the worksheet) hangs at trial 6. I saw again the memory jump to 64 Gb and the GUI time is frozen . Looks like a pattern. No sdmp:-mull error yet with the new worksheet.

On my machine the behaviour is deterministic (so far). These are the timestamps after the error message

Error, (in PDEtools/NumerDenom) time expired

243.078,481.625,683.578,923.734,1154.515,1380.953

So far, I never got another error message. The private bytes the system allocated for the mserver.exe task at termination were always around 3 Gb.

The second screen you show is unexpected.
What I have seen, when increasing the timelimit to 500, is that the private bytes jump from 3 Gb instatly to 64 Gb. Interputing at that stage takes "ages" to clear the memory.

This allocation jump also happens without timelimit. There is something strange with the integral that needs to be investigated. Did you ever get a result from int?
(This reply was on the original post. I have seen that you have send an update)

@Carl Love 

One reason more to have a dedicated (self explaining) identity function as other languages have.

@nm 

Yes, it will. I wrongly, interpreted the output combine[trig] as "can't perform". Thanks for the answer.

@Carl Love 

I only wanted to clarify pros and cons of the proposed solutions (and if there is still some room for improvement).  

I would have overlooked the Hold statement, if you had not mentionned it.
Thank you!

@nm 

My understanding of ()() is the following: The first pair of parenthesis groups functions and the second groups arguments. All functions are applied to the same group of arguments. 
Take for example

(y=sin)(x)
                         y(x) = sin(x)

In my interpretation it is somehow the opposite to the map command and the elementwise command where one function is mapped to many arguments (contained in a data structure, which type highly influences the mapping result).

The combine[trig] as well `combine/trig` call a special combine function (or better procedure, since all functions are implemented in Maple as a procedure). This is somehow not working with combine, but it worked here for a selfmade procedure. Hence the question.

@Carl Love 

Is your way an endpoint? No further mathematical manipulations seem possible.

value(make_nice(k)*8)

 

@nm 

I suspect that the multiplication symbol probably cannot be suppressed. Thanks anyway

@nm 
That's not quite what I am interested in.

I used extended typesetting by default and got used to the output. Now, that I realise that Maple is capable to produce this type output I  would like to have it everywhere. The improved readability speaks for itself. For code protability reasons I prefer as little custom procs for typesetting as possible.

I wonder why extended typesetting comes with extended fraction bars.

 

@Thomas Richard 

For the past years, I used extended and I am reluctant to change.
Is there a typesetting rule (or soemthing else) that could be set to have the same output in extended?

First 28 29 30 31 32 33 34 Last Page 30 of 71