emendes

455 Reputation

6 Badges

8 years, 99 days

MaplePrimes Activity


These are replies submitted by emendes

@Carl Love Many many thanks.  I wasn't sure of when finally should be used.  Now I know that I didn't need it at all.   Thanks.   

Would catch: #any other error be the answer for the errors I mentioned in my answer to @acer?  

Just to be sure, if I have the following sequence of commands

try
  .... #line 1
  .... #line2
  .... #line3 

  ... #line4
  catch:
     .....
     return:
end try:

1) If there is an error, catch will caught it, right?  

2) If there is an error in line 2 for instance, all commands in line3 to line 4 will not be evaluated, right? 

If the answer is yes to both questions, I am making things more complicated than they are. 

 

@acer Thank you for the clear explanation.   I am trying to follow all suggestions given in your reply.  

Please bear with me a little longer.  Could you send some examples of what you meant by "one or more flags, ...,  etc.", please? 

Although I have added more catchStrings to catch

catch "time expired", "does not exist", "invalid input":

some errors were not caught: 

Error, (in PolynomialSystemSolvers:-PseudoResultant) at offset 3101 in `RootOf.m`, time expired


Error, (in SolveTools:-MakeSolutions) at offset 3 in `:-40706.m`, time expired

 

I guess that answers your question, that is,  the error message upon time-out does not always begin with "time expired".  How to deal with it?  

 


 

@Carl Love You are right.  Thanks.   Last question: infolevel[Grid:Seq]:=3:  shows quite a few messages but infolevel[Threads-Seq]:=3 does not.  What am I missing?  

@Carl Love Many thanks for the clear explanation.  

Unfortunately, Threads does not work after Grid in the examples I am running (I will try the option of saving the results to a file and call the procedure in a separate mpl-file).  As for Grid I need some help. If I change seq to Grid:-Seq in both cases, Maple issues an error msg.  If I change the internal seq, memory goes up to the roof.  

 

 

@Carl Love Many many thanks. I wonder if you could spare some time to explain the procedures.  

  1. Why do I need [seq]?  (The brackets ?)
  2. local _?  
  3. ^+?  

Can Threads or Grid be used here?   As you know I have problems using Threads after Grid (Maple keeps evaluating forever).   I had to use Grid before using the procedures given above (PolynomialSystem is part of the previous calculation).  

 

@Carl Love Many thanks. I made a mistake and there is no case where the commands above don't give me the same results.

Thanks for the newbie tip.  

It is a pity that Threads cannot be used in this case.  Grid demands for memory are amazing.  

@Carl Love Many thanks.  I don't remember why I had to go for the more elaborate version, but I will certainly test has. Do you have an idea on how to find the number of solutions?  

has as pointed out is too restrictive.  I had to go back and use ormap.

 

 

 

@Carl Love Thanks.  I will do that and check if there is any change as far as memory usage is concerned.  I wish Maple could give us detailed documentation (with more examples) on Grid.  

@Carl Love If that is the case, should I issue Grid:-Set(arg1) just once?  How about the Grid-Set for the other arguments?  I started by not using Grid-Set for any of the arguments.   My impression that once you call Grid-Seq, Maple will allocate the memory anyway (I could be completely mistaken).   

@Carl Love Unfortunately Threads:-Map[2] does not work after Grid:-Seq.   The "wait time" is 0.056 and Maple had to be closed as the evaluation of Threads:-Map[2]  will not finish. 

@Carl Love  I have just received the following msg from Maple support regarding whether index is threadsafe or not.

 

"In the Maple help documentation there is full listing of the commands which are confirmed to be thread-safe, this can also be accessed in Maple with the command ?index,threadsafe. Unfortunately index(..)​ is not included and should therefore not be treated as thread safe." 

 

 

@Carl Love Thanks for pointing out that again.  

@Carl Love Is solve threadsafe?  

@Carl Love As you said in one of earlier posts solve is not threadsafe so the use of Grid.   

I had to change Threads:-Map[2] to map2 to get the code working.  Somehow Threads:-Map won't work after Grid:Seq.   

 

@Carl Love Somehow the first line of the code gets stuck after the use of Grid:-Seq.   It works if I save L1 and L2 to a m-file and run the two lines of code in a new worksheet.  

First 6 7 8 9 10 11 12 Last Page 8 of 21