Versions Compared

Key

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

...

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 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

A batch or serial job is generally run on a single node. The following is a very simple example of a non-parallel batch job using Matlab functions. 

...

No Format
 < M A T L A B (R) >
                  Copyright 1984-2012 The MathWorks, Inc.
                    R2012b (8.0.0.783) 64-bit (glnxa64)
                              August 22, 2012
 
To get started, type one of these: helpwin, helpdesk, or demo.
For product information, visit www.mathworks.com.
 
C =
       12893       12980       15469
       15263       19329       17603
        7885       16894       17448
       14434       20490       27329
        9235       18735       22408

Parallel Matlab Jobs (or "pool 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 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. 

...