Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

[SOLVED]: Running COMSOL in batch mode without the meshing / solver window popup. Bug?

Please login with a confirmed email address before reporting spam

Hi All

I run COMSOL in batch mode remotely from the command line, and moreover run matlab scripts in COMSOL. What I want to do is run COMSOL from the command line with something like this:

$ comsol matlab -ml -nodesktop -ml -nosplash -mlr "myscript"

The problem is that COMSOL will try to pop-up a meshing status bar and a solution progress bar which errors my model with a null pointer exception since it doesn't know which display to send the window to.

I've tried looking up batch mode options, but those only seem to work when you're running .mph files -- for my problem, this is not an option.

Is there actually a way to do this?

Thanks,
Sumedh

1 Reply Last Post Jul 29, 2009, 1:22 a.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 29, 2009, 1:22 a.m. EDT
After a bit of digging, I've found the answer, and for everyone's benefit (I hope) I'll demonstrate below.

Basically, you have to either add the following line to your matlab script:

>> flreport('off');

Alternatively, you can do this:

$ comsol matlab -ml -nodesktop -ml -nosplash -mlr "flreport('off'); myscript"

Both work just fine.

References:

www.physicsforums.com/showthread.php?t=271895 (Discussion of the actual Null Pointer Exception error)

community.crimsongrid.harvard.edu/knowledgebase/how-to/running-comsol-matlab-under-a-scheduler (Solution).

After a bit of digging, I've found the answer, and for everyone's benefit (I hope) I'll demonstrate below. Basically, you have to either add the following line to your matlab script: >> flreport('off'); Alternatively, you can do this: $ comsol matlab -ml -nodesktop -ml -nosplash -mlr "flreport('off'); myscript" Both work just fine. References: http://www.physicsforums.com/showthread.php?t=271895 (Discussion of the actual Null Pointer Exception error) http://community.crimsongrid.harvard.edu/knowledgebase/how-to/running-comsol-matlab-under-a-scheduler (Solution).

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.