Matlab In Labs
Resource | How to Access |
---|---|
Engineering Academic Labs | (page) |
Engineering Remote Desktop | (page and link) |
Matlab On Desktops/Laptops
Managed WUSTL Desktops
(how to get)
Personal Desktops and Laptops
Matlab in Clusters
Ondemand and Interactive Terminals
Begin
Batch Submission
A sample Matlab batch job script (please see (link to LSF) for more options):
#BSUB -o cpu_test.%J #BSUB -R '(!gpu)' #BSUB -N #BSUB -J PythonJob #BSUB -R "rusage[mem=32]"
#BSUB -n 8 #BSUB -R "span[hosts=1]"
module add matlab
matlab < compute.m > compute.out
The above script starts a Matlab job on a host with 8 cores and 32 GB of RAM free. As WUSTL is not licensed for Matlab's Distributed Computing module, we limit this job to a single host.
It is very important that you limit the number of cores Matlab uses in a job.
This can be done in your Matlab script like so, before any computations are complete:
% Limit cores with Parallel Computing Toolbox software::
mypool=parpool('local',str2num(getenv('LSB_DJOB_NUMPROC')))
% Limit Max Computational Threads, LASTN is a throwaway variable containing the previous setting
LASTN = maxNumCompThreads(str2num(getenv('LSB_DJOB_NUMPROC')))
Parallel Batch Submission
WUSTL is not licensed for the Matlab Distributed Computing module - Matlab jobs cannot span multiple hosts.