Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Matlab is currently available for use centrally on the HPC cluster systems of the University of Iowa. One may use the Matlab environment by loading the appropriate module: 

...

While it is possible to run Matlab interactively, which can be especially useful for prototyping a job, please remember that login nodes are a shared resource and are intended for launching jobs or prototyping smaller versions of jobs you intend to run.  It It is not advisable to use interactive sessions for long-running, compute-intensive jobs unless one uses a qlogin session to do so. 

Batch Matlab Jobs

...

The current installation of Matlab uses the Parallel Toolbox, which allows for parallel jobs that can use up to 12 cores per job.  Information Information on the Parallel Toolkit may be found here: http://www.mathworks.com/help/distcomp/index.htmlThe following example script can be used to submit a Matlab job to SGE to run on 8 cores (you may use all the cores in a node – which may be more than 8). Note that lines starting with '#$'  are SGE shell commands, whereas '#' symbols denote comments, and the remaining lines are matlab commands. 

There is some overhead to running jobs in parallel, so it can be slower to run on multiple cores if the job is small without sufficiently large loops.    The easiest way to make a Matlab program parallel compatible is to use parfor (parallel 'for') loops.   A parfor loop can be used when each iteration of the loop is independent of all other iterations. Here is a link to Matlab documentation on parfor loops: http://www.mathworks.com/help/distcomp/getting-started-with-parfor.html

...