Maple 2020 Questions and Posts

These are Posts and Questions associated with the product, Maple 2020

Hello

I wonder if someone on the list can give me some guidelines on how to use Grid:-Seq.

I have applied Grid:-Set and Grid:-Seq to one of my problems where parallelization is a possibility.   In this problem, I have a massive list of lists that needs to be processed in chunks and then a new list is returned.

What I've found so far:

1) Grid-Seq won't work if I use a procedure from a private module that calls local (or exported) functions of the same module.  Solution:  I need to use savelib (there is a bug in Grid:-Seq)

2) Grid-Seqs seems to be working fine up to a point where it simply stops.  For example:   Starting with 431895 sets, the procedure divides them into 864 sets of 500 elements (the last one does not usually contain 500 elements).  Then I use res:=Grid:-Seq['tasksize'=9](myFunction(newSets[i],...,....),i=1..864).   The messages sent out by Grid:-Seq are 

Seq: using tasksize=9; number of elements= 864, number of partitions = 96

......

Seq: done sending all partitions

Seq: received results from all nodes; collating results

After two hours running and using 36 cores, the result is available in res.  The next step is to use the results in res for another cycle of calculations.  1503462 sets = 3007 sets of 500 elements.  The messages sent out by Grid:Seq are 

Seq: using tasksize=9; number of elements= 3007, number of partitions = 335

......

Seq: done sending all partitions

The last message showed up on the screen after an hour. During the process, I saw the current tasks finishing and new ones starting.  However I could not see "Seq: received results from all nodes; collating result" after a day running.  I am using timelimit to be sure that all calculations will finish no matter what.  

I have checked the system information and found that: 1) all 72 cores are running but they are jumping from 0% to 100% (in the example that works I could see all of them in 100% solid), 2) Memory is at 156 GB (200 Gb is the limit) and no swap to disk.

I have also noticed:

  1. If I use Maple 2017, not even the first example works.
  2. tasksize=9 somehow helps with similar problems.  If the size is left for Maple to decide, it seems that the problem happens for sets of smaller size.
  3. On linux I had to use "kill -9" to remove maple from every single core. My impression is that Grid:-Seq does not clean up the processes after they finished.  
  4.  The problem seems to be on "results from all nodes; collating result".

 

I know that the explanation above in rather vague, but if someone has any clue or guidelines on how to solve this problem, please share it with me.

 

Many thanks

 

Ed

 

 

 

Hello,

is it possible to solve the attached partial differential equation with zero initial boundary condition?

If not by assuming diff(u(sigma, tau, phi, t), t, t)=0 is there an answer for the equation?

Thanks

lapla.mw

This is very strange problem, and it seems to happen at random times.

From my worksheet, I call a function in a local fille maple_proc.mpl. This function ends up calling int() command with a timeout.

I Have the int() call wrapped by try...catch:.. end try in order to catch timeout and any other error.

Yet, when I run my worksheet, looping over hundreds of integrals, for each one, calling the function in maple_proc to integrate it, and after running for many many integrals, then sometimes, the worksheet terminates with error, at some iteration with error

Error, (in OrProp) too many levels of recursion |maple_proc.mpl:45|
 

So the try/catch I have in place are not catching the above error, wherever it is coming from.  

line 44 in maple_proc.mpl, just does this (it is the line with cpu_time := .... below

try
print(`before calling int`); 
cpu_time := timelimit(180,CodeTools[Usage](assign('result_of_int',int(lst[i,1],lst[i,2])),output='realtime')):   
print(`after calling int`); 
catch "time expired":
   #...
catch: 
   #...
end try;

Again, this works for sometimes for hundreds of iterations, and then on some entry, it gives this error.

I do not use recursion myself at all. i.e. I have no place where the function calls itself. Worksheet does a loop, and in each interation calls this function in maple_proc.mpl.

Sometimes, when I run the worksheet again, the error do not show up again. I have print statements in the catch above, and these do not show up at all, which means this error is not cought.

What should I do to find why this happens? This did not happen in Maple 2019.2. Is there any other way to trap this error so my loop does not terminate like this and I have to restart it again each time? 

I am using Physics 642 and Maple 2020 on windows 10.

Update

I was able to strip all the code and make a MWE. There is a zip file attached.

one worksheet, which calls a maple_proc() function now in the same worksheet. 

This function reads a plain text file in same folder, which contains list of integrals. The function maple_proc() does a "read" which reads all problems into a variable called lst

Now it simply does a LOOP over all entries in lst calling int() on each integral (one integral per line) with a timeout. You see there is catch() there.

I get the erorr 

At iteration number 188 each time.

I will attach a ZIP file now, which contains one folder which contains the worksheet and the input plain textfile. All what you need to do to reproduce this is open the worksheet and evaluate the call there. You might want to edit the hardcoded folder in the worksheet to your own folder where you unzipped the zip file.
 

currentdirName :="C:/MAPLE_BUG";
currentdir(currentdirName);

I hope someone will be able to repoduce this. It looks like a real bug in Maple 2020.

The problem is not in the integral 188 itself. Because if the loop starts at say 100 or 120, instead from 1, the integral now is processed OK and no error is generated.

MAPLE_BUG.zip

1 2 3 4 5 6 Page 1 of 6