Difference between revisions of "MATLAB/Batch"

From ScientificComputing
Jump to: navigation, search
(Created page with "Assuming that you already loaded the MATLAB module and have a MATLAB program <tt>simulation.m</tt> you would like to run, the command to submit a job to the batch system would...")
 
Line 4: Line 4:
  
 
Please note, that you have to leave away the file ending .m. LSF parameters are documented on the wiki page about [[Using_the_batch_system|using the batch system]].
 
Please note, that you have to leave away the file ending .m. LSF parameters are documented on the wiki page about [[Using_the_batch_system|using the batch system]].
 +
 +
We suggest you include the extra options shown above:
 +
;<tt>-nodisplay</tt>
 +
:since jobs on compute nodes are not run interactively, this flag explicitly tells Matlab that no graphical display (X server) is available is available.
 +
;<tt>-singleCompThread</tt>
 +
:forces Matlab to use only one thread for its computations. '''This option is crucial to prevent MATLAB from overloading Brutus nodes.'''
 +
;<tt>-nojvm</tt>
 +
:(optional) prevents the JVM (Java virtual machine) from being used.  Add this flag unless you need the JVM, such as the with the PCT (Parallel Computing Toolbox).

Revision as of 11:55, 25 August 2016

Assuming that you already loaded the MATLAB module and have a MATLAB program simulation.m you would like to run, the command to submit a job to the batch system would look like

bsub [LSF parameters] matlab -nodisplay -nojvm -singleCompThread -r simulation

Please note, that you have to leave away the file ending .m. LSF parameters are documented on the wiki page about using the batch system.

We suggest you include the extra options shown above:

-nodisplay
since jobs on compute nodes are not run interactively, this flag explicitly tells Matlab that no graphical display (X server) is available is available.
-singleCompThread
forces Matlab to use only one thread for its computations. This option is crucial to prevent MATLAB from overloading Brutus nodes.
-nojvm
(optional) prevents the JVM (Java virtual machine) from being used. Add this flag unless you need the JVM, such as the with the PCT (Parallel Computing Toolbox).