C_R

3577 Reputation

21 Badges

6 years, 96 days

MaplePrimes Activity


These are replies submitted by C_R

@mmcdara 

I shoud have added MaplePrimes to express: A user that has gained enough experience to understand how MaplePrimes functions in terms of written and unwritten rules.

I did not have mathematical or Maple skilset in mind.

By the way, I voted many times for your answers, not only for the content  but also for the time you invested to help someone.

                                     

 

@mmcdara 

I reply here because this reply does not exactly answer your question.

Technically, if a question has been answered by a reply/comment and there is no other answer to the question this (now answered) question is still  listed under the MaplePrimes link "Unanswered".
In the past, I have tried to send an answer to an own unanswered question to removed it from the Unanswered list. This was transformed to a reply. I guess it was done to avoid that I could vote for my own answer.

IMO a math forum should try to be as exact as possible. To respect the personal choice of an experienced user, to intentionally opt for the category reply/comment, a moderator could provide an anwswer referencing to the reply by providing a link that points to the reply/comment.

If the moderator does not want to disclose his/her judgement (or avoid votes), he could use an additional user account for the answer. This account should have a name that indicates a moderator action: Link_to_answer for example. Voting for this user would not make sense and not impact the user ranking.

This reply/comment does not answer your question but might provide a pragmatic solution for intentionally inexact (and declared as such) categories as well as answers to your own.

 

 

@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)

 

First 27 28 29 30 31 32 33 Last Page 29 of 70