I use one engine per one worksheet. So one would expect that doing restart; command; to always behave the same way. Right?
Because each time, new or refreshed mserver.exe is used. But here is a worksheet, where I run it few times (all with restart each time), where sometime the command timelimit hangs, and sometime does not. I do not mean it takes little longer sometime. I mean completely hang.
I've waited 10-20 minutes and nothing happens. And sometime I saw it return back in 2 or 3 minutes. But most of the time it hangs.
I wish someone could explain this to me. If it hangs each time, or not hang each time, I can understand. (ofcourse timelimit should never hang, as it was supposed to have been fixed in 2021, but this is separate issue).
But why it hangs sometimes and not other times? Does Maple use some sort of random number generator inside it to decide on things? For me, software should behave the same each time when run from same initial state.
It also depends on the amount of timeout given if it hangs or not.
What can cause this different behavior and most important, what can one do to make it behave same way each time? I thought that what restart supposed to do.
Any insight what can cause this is welcome.
I also found that closing the worksheet completely and opening it again, results in different behavior in the timing. It looks like restart does not clear everything, as what happens when closing the worksheet and reopeing it again.
i.e. Sometimes when it completes and not hang, then issuing restart again and running the int() command, it will also not hang most likely.
It seems Maple have remembered something. But closing the worksheet and opening it again, it will hang again most of the times.
The point of all this, is that Maple behaves differently each time. But why??





> |
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1)
|

> |
time();
#hangs sometimes and not other times. Most of the time it hangs. increasing time
#will improve the chance it will hang
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
time();
|

|
Download hangs_int_june_16_2024.mw
Here is one screen shot of one of those times where it returned back. Took little over one minute. Good.

Here is second screen shot where it took about1,800 real time seconds to return. (30 minutes, even though timelimit was one minute). Same exact code.

update
I tried the suggestion given below to use _EnvProbabilistic:=0 but it had no effect on making Maple behavior consistent each time.
Below worksheet shows this. I tried 6 trials, each with restart.
First trial it timeout at 74 second. good. Second trial took 1403 seconds ! Third trial went back to 74 seconds again (good). Trial 4 took also took about 74 seconds (good). trial 5 went back to being slow and took about 1400 seconds again. Trial 6 went back to being fast and took about 74 seconds.
So the pattern seems to be
fast SLOW fast fast SLOW fast.....
But I also tried this whole test again, by closing the worksheet and opening. Now the pattern changed to
SLOW fast fast fast SLOW SLOW ....
I also attached the worksheet for the above below.
So Maple still behaves in random fashion in doing the integration above. sometimes it is slow, sometimes fast. All using same exact code and same integral. Extra points to anyone who could find out why and how to fix this.
This worksheet have pattern fast SLOW fast fast SLOW fast....
Download hangs_int_V2_june_16_2024.mw
This worksheet below have pattern SLOW fast fast fast SLOW SLOW ....
Download hangs_int_V3_june_16_2024.mw
Observation: When it finishes fast, timeout is always in PDEtools/NumerDenom.
When it takes long time, timeout is always in sdmp:-mull
Any other suggestions what to try are welcome.