Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Using MATLAB in O2

If you are primarily interested in using the interactive graphical version of MATLAB on O2, it is easiest and most performant to use O2’s web interface, known as O2 Portal.

Otherwise, to use MATLAB via the command line, please continue reading:

MATLAB is a resource-intensive application, and MUST ALWAYS be run on O2's computing nodes, not the login nodes. This can be done submitting a job through the SLURM scheduler as explained in detailed below.

...

Code Block
#-----------------------------------------------------
#SBATCH -p short
#SBATCH  -t 1:00:00
#SBATCH --mem=8000
#SBATCH -c 1

module load matlab/2019a2021b
matlab -batch "myfunction(my_inputs)"
#-----------------------------------------------------

...

It is possible to configure MATLAB so that it interacts with the SLURM scheduler. This allows MATLAB to directly submit parallel jobs to the SLURM scheduler and enables it to leverage CPU and memory resources across different nodes (distributed memory). You can find detailed information on how to set and use the O2 MATLAB cluster profile here

Displaying MATLAB graphics from O2

...

Using MATLAB Desktop (GUI) in O2

It is now possible to run MATLAB in O2 with its Desktop GUI interface using our O2 Portal MATLAB applications. For more information please check our O2Portal wiki