MATLAB on Sequoia
Under The University of Mississippi's MATLAB site license, UM employees and students may run single-node MATLAB computations on clusters, but not multi-node computations. (Stay tuned, however, for a summer/fall trial license of Distributed Compute Server which will allow multi-node MATLAB computations on sequoia by all MCSR users for the duration fo the trial.)
MATLAB may not be run interactively on sequoia; rather, users should submit MATLAB calculations in batch using the PBS resource scheduler. To run a single MATLAB job of up to 8 threads on sequoia:
- create a PBS script
- use qsub to launch a batch job using the script
- use qstat to check the status of the batch job
- use qdel to delete the job, if necessary
- examine the output and error files once the job completes
The following is an example PBS script. It assumes that the script itself resides under a subdirectory called "MyMatlabDir" under the user's login directory. This version of the script is for serial (not parallel) execution, and so requests only 1 node, and 1 processor per node (ppn). It also requests a total of 1 minute of walltime and 1 minute of CPU time. Finally, it assumes that the user's actual Matlab code is in a file called "myprogram.m" and that the user wants the output to go into a file called "myprogram_1p.out" in the same directory.
#PBS -S /bin/bash
#PBS -l walltime=0:01:00, cput=0:1:0
#PBS -l nodes=1:ppn=1
#PBS -N MySerialMatlab
matlab < myprogram.m > myprogram_1p.out
If (and only if) you have added parallelization to your code using the Parallel Computing Toolbox, you can request up to 8 cores on one node for your MATLAB job. However, first run your job on 2 cores to make sure you get a speedup and good parallel efficiency as you scale up your calculation. You will need to adjust two #PBS directives in your script. The following example script is the same as above; however, it requests half as much walltime and twice as many processors per node.
#PBS -S /bin/bash
#PBS -l walltime=0:00:30, cput=0:1:0
#PBS -l nodes=1:ppn=2
#PBS -N MyParallel
matlab < myprogram.m > myprogram_2p.out
The following tools and toolboxes are included with the site license: MATLAB, Simulink, Bioinformatics, Control System, Curve Fitting, Data Acquisition, Image Processing, Instrument Control, Optimization, Signal Processing, SimMechanics, Stateflow, Statistics, Simscape, Symbolic Math, Neural Networks, Wavelet, MATLAB Compiler, Communications Toolbox, Filter Design, Fixed Point, Image Acquisition, Simulink Control Design, RF, & Parallel Computing.
For usage questions about Matlab or PBS, please e-mail firstname.lastname@example.org.