Skip to content

Launching pMatlab Jobs

On this page, we'll describe how to launch pMatlab jobs on the SuperCloud system. For information on submitting MATLABĀ® jobs and other types of jobs, see the Submitting Jobs page.

To launch your pMatlab job use one of these commands:

eval(pRUN('myScriptName', Ncpus, 'grid&'))
eval(pRUN('myScriptName', [Nnode Nppn Ntpp], 'grid&'))

myScriptName should not contain the ".m" extension. See the section Triples Mode Launch below for details on requesting resources using [Nnode Nppn Ntpp]. Jobs submitted with only Ncpus are converted to Triples Mode during launch and you can have more control over how your processes are scheduled by using a triple instead of Ncpus.

Triples Mode Launch

Triples Mode gives you better performance and more flexibility to manage memory and threads. We highly encourage users to migrate to this model.

eval(pRUN('myScriptName', [Nnode Nppn], 'grid&'))
eval(pRUN('myScriptName', [Nnode Nppn Ntpp], 'grid&'))

where:

  • Nnode: number of compute nodes
  • Nppn: number of MATLABĀ®/Octave processes per node
  • Ntpp (OMP_NUM_THREADS): number of OpenMP threads

OMP_NUM_THREADS is set to 1 by default.

Note myScriptName should not contain the ".m" extension.

See the Triples Mode section on the Submitting Jobs page for additional details on Triples Mode, including how to tune your launch for the best performance.

Available Resources for pMatlab

By default, pMatlab jobs require that the requested resources be available when you launch your job. You can check if the required resources are available with the LLfree command. If the resources are not available the job will not launch.

If instead you would like your job to wait in the queue until the resources are available, you can set the GRIDMATLAB_SRUN environment variable prior to launch. For example:

setenv('GRIDMATLAB_SRUN','YES');

eval(pRUN('myScriptName', Ncpus, 'grid&'))
eval(pRUN('myScriptName', [Nnode Nppn], 'grid&'))
eval(pRUN('myScriptName', [Nnode Nppn Ntpp], 'grid&'))

Note that GRIDMATLAB_SRUN is only valid for jobs that can be submitted as a batch job and does not support interactive jobs (using grid instead of grid&).