Matlab

Matlab In Labs

ResourceHow 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

WUSTL's licensing agreement with Mathworks allows for users to sign in and download Matlab to their devices:

https://www.mathworks.com/academia/tah-portal/washington-university-st-louis-30847712.html


License Error -9

Student may have issue with a license if they installed a version of Matlab and had it for over a year. The way to fix this is to drop the license, uninstall from the OS, and have the student reinstall from the link above (selecting the current licensed version, not pre-release)



Matlab in Clusters

Ondemand and Interactive Terminals


Downloadable Modules

Modules that can be downloaded via Matlab's Add-On Explorer, such as the ONNX Model Format Converter, can be installed by users, and will reside in their home directories after installation.

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.