Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

...

Using MATLAB Desktop (GUI) in O2

When running interactive MATLAB jobs it is possible to display the graphical version of MATLAB back to your desktop using X11 forwarding, however this is not recommended, since it is known to crash frequently when heavy graphics need to be displayed.

A more resilient and better performing option is to run MATLAB as part of a Jupyter notebook/ lab. To set up the MATLAB-Jupyter interface you can follow the instruction described in Jupyter on O2 making sure to load the MATLAB module and install the additional package jupyter-matlab-proxy after installing Jupyter.

Code Block
module load gcc/6.2.0 python/3.7.4 matlab/2021b
virtualenv jupytervenv
source jupytervenv/bin/activate
pip3 install jupyter
pip3 install jupyter-matlab-proxy


You can then start a standard Jupyter notebook or lab as described in the above O2 Jupyter wiki page. You should see the option to start a new MATLAB Jupyter notebook/lab as:

...

or

...

after selecting the MATLAB option you should see a screen like:

...

which can last for a few minutes and will eventually start the MATLAB Desktop interface:

...

Note

The Jupyter MATLAB interface might not work with MATLAB Version earlier than 2021b