Question: bad hang in call to int(). Will not time out using timelimit().

My program simply keeps hanging.

It takes me 5 days to complete something which should take 2-3 hrs, since Maple keeps hanging, and I have to keep terminating server.exe and start again. Sometimes when I start again it does not hang where it was. I do this dozens of time per day.

even though I use timelimit on every possible Maple call. The problem also is that when timelimit works, it takes 10-20 times more time than asked. I ask for 10 second timeout, sometimes it timesout after 3-10 minutes if I am lucky.

So I keep trying to make workarounds and I am tired of all of this. Just waste of time. This is getting worst with each new Maple release not better.

Here is an example

restart;
expr:=-1/3*2^(2/3)/((a^2*p+2*a*p^2+p^3+4)/p)^(1/2)*((-1/2*a^2*p-1/2*p^2*a+1/2*p*((a^2*p+2*a*p^2+p^3+4)/p)^(1/2)*a-3)*(-p^2*(-((a^2*p+2*a*p^2+p^3+4)/p)^(1/2)+a+p))^(2/3)+2^(2/3)*(-(a+3/2*p)*p*((a^2*p+2*a*p^2+p^3+4)/p)^(1/2)+a^2*p+5/2*p^2*a+3/2*p^3+3)*p)/(-((a^2*p+2*a*p^2+p^3+4)/p)^(1/2)+a+p)/(-1/2*2^(2/3)*(-p^2*(-((a^2*p+2*a*p^2+p^3+4)/p)^(1/2)+a+p))^(2/3)+p*(p*(-p^2*(-((a^2*p+2*a*p^2+p^3+4)/p)^(1/2)+a+p))^(1/3)+2^(1/3)))/p^2;

try 
    t0:=time[real]();
    timelimit(20,int(expr,p));
catch:
    print("time used ",time[real]()-t0,"seconds");
    print("timed out");
end try;

in Maple 2023, with 128 GB RAM and very fast PC and nothing else is running, it hangs. I could leave it for hrs, the server.exe  is running at full CPU and timelimit is ignored. Timelimit in Maple is useless.

I do not know what else to do. if someone can suggest something, I am willing to try anything before I finally give up.

 

Please Wait...