Question: what is the difference between doing restart; vs. restarting Maple itself?

For the last hr, I've been trying to find out why Maple solve was hanging inside one module in my .mla when called.

I would try the same code in new worksheet, no hang. I had timelimit on it. Same exact code as in the module.

I go back to the other worksheet, do restart, call the module (after loading the library by setting libname) which calls solve(), and it hangs. Each time.

I tried may be 10 times. No difference between the code in the mla and the other worksheet where I had copy of the solve command. All other settings are the same. 

ONLY after I closed Maple, and restarted Maple, and opened the worksheet where the call used to hang, and called the module again, now it did not hang and solve completed.

This is not the first time I've seen such a strange thing. Sometimes Maple will hang for hrs (I start  a test, go to sleep,. wake up hrs later, and see maple hanged for hrs from the time stamp).

Closes Maple, start the test from where it was hanging, and now no hang. It runs OK from then on.

This tells me that doing just restart from the worksheet do not clean everything. (I use the command restart, not by pressing the restart button in the menu, not sure if these are different, they should be the same  I would think).

I've seen this problem before. sometimes the test just hangs. No matter how many time I do restart from the worksheet, it just hangs. When I restart Maple, it works from same place it was hanging.

My question is, what could possibly make Maple not hang when starting fresh. vs. using the restart command?  I am using the same worksheet, and I have "create new engine for each document" selected in options.

The hang used to happen in solve, in here

#this is inside a function inside a module inside .mla library
#

eq:=x = 1/2/(p^2+2)^(1/8)*2^(1/2)*((1+(-4*p^2+1)^(1/2))/(1/(4*p^2-1)*p^2)^(1/2)/(-4
*p^2+1)^(1/2))^(3/4)/(((-4*p^2+1)^(1/2)+3)/(p^2+2)^(1/2))^(1/4)*_C1*p^(1/4);

        try               
            sol_p:=timelimit(20,[:-solve(x=rhs(eq),p)]);
        catch:
           return [];
        end try;
#hangs here. Never completes. Only when starting Maple the hang is gone. 

#trace below
......
Main: polynomial system split into 1 parts under preprocessing
Main: using RegularChains based methods
SolverVariableOrder: using the variable order  _S000008 > _S000011 > _S000009 > _S000006 > _S000005
TriangularDecomposition: using deterministic algorithm for decomposition
<<<< HANGS HERE EACH TIME >>>>

Again, only when I restarted Maple, did the hang go away. it is one equation solving for one variable.

So now, I get into the habit of closing all of Maple and starting it again when I get a hang. I do not trust restart command any more to clear everything.

Any idea why this happens? Memory not cleared somewhere? Cache problem? Does the frontend itself stores something that could cause this? does restart use new mserver.exe each time or same mserver.exe process as last time?

if restart does not actually terminate the mserver.exe that the worksheet was talking to, but only sends request to mserver.exe to clear its own memory, this could explain things.

It is possible that mserver.exe which is attached to that worksheet does not fully clear all its own memory and something remain there which affects why it hangs in same place each time, even though restart was issued each time, and only when restarting Maple itself will clear this and the hangs goes away.

 

 

Please Wait...