Discussion Forum

"wait" option missing when using COMSOL/Matlab with a scheduler (Python)

Topics: no topics

Thread index  |  Previous thread  |  Next thread  |  Start a new discussion

RSS FeedRSS feed   |   Email notificationsTurn on email notifications   |   1 Reply   Last post: March 14, 2010 2:48pm UTC
Andreas Kapp

Andreas Kapp

January 21, 2010 6:09am UTC

"wait" option missing when using COMSOL/Matlab with a scheduler (Python)

Hello,

I am using COMSOL/Matlab with a scheduler (Python).

For ordinary Matlab it is possible to use the wait option, e.g. matlab -nodesktop -minimize -r -wait "checkMail, exit", which tells the scheduler to wait till 'checkMail.m' is completed.
Reference: http://www.mathworks.com/access/helpdesk/help/techdoc/ref/matlabwindows.html

However, the "wait" option does not work for COMSOL/Matlab, e.g. C:/Programme/Comsol35a/bin/comsol.exe matlab -ml /nodesktop -ml /nosplash -ml /wait -mlr "flreport('off'), mainprogram, exit"
This holds, even though COMSOL tells, that the ordinary Matlab options can be used:
http://www.comsol.com/support/knowledgebase/980/

Is there any way to use the "wait" option?

I ended up writing an ASCII file and telling the scheduler to wait for this file to be written.
Contacting COMSOL support was not very helpful, at least so far.

Regards,

Andreas

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Liam Mackenzie

Liam Mackenzie

March 14, 2010 2:48pm UTC in response to Andreas Kapp

Re: "wait" option missing when using COMSOL/Matlab with a scheduler (Python)

I had exactly the same problem and couldn't get the wait option to work. What i eventually did was create a batch file for each model i wanted to run and then created a main batch file which called each one of these individually using: "start /wait <path>\Batch.bat".

So my main batch file looked like:

start /wait <path>\Batch1.bat
start /wait <path>\Batch2.bat
start /wait <path>\Batch3.bat
start /wait <path>\Batch4.bat

and the contents of for example Batch1.bat was:

start c:\COMSOL35\bin\comsol.exe matlab -ml /nodesktop -ml /nosplash -mlr "cd <path_to_model>; model1".

Not sure if this helps you though as havent used python scheduler

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse


Rules and guidelines