Skip to end of banner
Go to start of banner

Matlab

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

Version 1 Next »

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

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.

  • No labels