Getting Started

Page Content

Supported Releases of MATLAB and MATLAB Compiler Runtime

MATLAB Release (Patch level)

MATLAB Compiler Runtime

 

The software stack on CoolMUC-4 is still incomplete. Matlab is not yet available in the default stack. As a workaround a temporary installation of R2024a is available. Use the following commands to load matlab:


module use -p /lrz/sys/share/modules/extfiles
module load matlab/R2024a_Update4

 
List available
modules
> module avail matlab
> module avail matlab-mcr
 

R2024a
(Update 4)

> module remove intel-mpi
> module load intel-mpi/2018.4.274
> module load matlab/R2024a_Update4-generic
> module remove intel-mpi
> module load intel-mpi/2018.4.274
> module load matlab-mcr/R2024a
R2024a
R2023b
(Update 7)
> module remove intel-mpi
> module load intel-mpi/2018.4.274
> module load matlab/R2023b_Update7-generic
> module remove intel-mpi
> module load intel-mpi/2018.4.274
> module load matlab-mcr/R2023b_Update7
R2023b
(Update 7)
Availability

Linux Cluster (CoolMUC-4)

Linux Cluster (CoolMUC-4)

SuperMUC-NG

 

Using the default Intel-MPI module (Version 2019 or newer versions), unintended crashes of parallel MATLAB jobs might occur. Please switch to Intel MPI 2018 as shown above.

Useful MATLAB Command-line Options

Run MATLAB via the "matlab" command only or add command-line arguments. Please consider: All MATLAB command-line arguments are case-sensitive!

> matlab arg_1 ... arg_N
Command-line argumentMeaning
no argumentStart MATLAB GUI.
-nodesktop
Start MATLAB without desktop but allow GUI and graphics output (figures).
-nodisplay
Start MATLAB without any GUI support. Graphics output (figures) is also not possible.
-singleCompThread

Many intrinsic MATLAB functions automatically exploit multithreading. MATLAB can be forced to disable this feature. Use this option for any work on the login nodes! 

-r myfunc
Run a MATLAB script or function, e. g. myfunc.m.

Further information:

Interactive MATLAB Jobs

LRZ policies for using MATLAB on Login Nodes

MATLAB is a very resource-hungry application with respect to both memory and CPU resources! Please run MATLAB on login nodes with care!

Especially, involving multiple threads (many MATLAB functions/operators use multithreading by default) or multiple processes might cause a high load on the login node and handicapping other users!

MATLAB applications, which handicap other users or have a negative impact on the general operation of the login nodes, will be terminated by system administrators!

Our rules using MATLAB on the login nodes:

  • Only run a maximum of one MATLAB instance!
  • Disable any kind of parallelization, i.e. multithreading (see command-line options above) or the Parallel Computing Toolbox!
  • Check the load and memory consumption of your own MATLAB session. Usually, you can do this via the "top" command, e.g.:
    top -u $USER
  • We recommend NOT to use the graphical user interface (GUI) of MATLAB, as this unnecessarily increases the load (resource consumption). Furthermore, using GUI decreases the overall performance of MATLAB.
    • If the MATLAB GUI is needed, then you may run MATLAB via a VNC session (VNC Server on Login-Nodes) to increase the performance and responsiveness of the GUI!
    • If the MATLAB GUI is not needed, it is better to run MATLAB via an interactive Slurm job (see next section). This job runs on a compute node. Parallelization is explicitly allowed here!
  • Repeated violation of the above mentioned restrictions on login nodes might result in a ban of the affected user account and notification to the responsible master user or PI.

Interactive MATLAB Jobs via Slurm Job

Usecases

Depending on the purpose, there are different possibilities to use MATLAB interactively:

  • MATLAB computations with focus on visualisation: We recommend to run MATLAB via a VNC session.
  • Pure MATLAB computations: Interactive MATLAB sessions may be started on compute nodes of CoolMUC- by employing interactive Slurm jobs (see Slurm documentation).

Constraints

  • Interactive jobs depend on the availability of compute resources. Matlab may not start immediately.
  • An interactive Matlab session should be limited to 1 compute node only.
  • Consider the restrictions on interactive jobs: Job Processing on the Linux-Cluster

Common Batch Jobs

Batch jobs are used for all MATLAB production runs. Usually, the resources, consumed by MATLAB applications, are limited to a single CPU core (pure serial job) or a single compute node (parallel job involving either multithreading or the Parallel Computing Toolbox [PCT]). Following table lists job examples for various cases which can be used on CoolMUC-4.


Slurm job scriptMatlab script

Serial batch job

No parallelization at all, MATLAB is intended to run on a single core.
Please use the "serial" cluster of the Linux Cluster!

Konnte den Inhalt der URL nicht laden, weil er von einer unzulässigen Quelle stammt.

https://code2doku-cxs-85c391b8c3bb7b71391aec80327f87b01d885a5b909ac5849.gitlab-ce-pages.lrz.de/doku.matlab.BASIC_SLURM-JOBS.matmul_serial.slurm.html

Sie können sich an Ihren Website Administrator wenden und bitten, dass diese URL zur Liste der erlaubten Quellen hinzugefügt werden soll.

Konnte den Inhalt der URL nicht laden, weil er von einer unzulässigen Quelle stammt.

https://code2doku-cxs-85c391b8c3bb7b71391aec80327f87b01d885a5b909ac5849.gitlab-ce-pages.lrz.de/doku.matlab.BASIC_SLURM-JOBS.matmul_serial.m.html

Sie können sich an Ihren Website Administrator wenden und bitten, dass diese URL zur Liste der erlaubten Quellen hinzugefügt werden soll.

Parallel job using multithreading

MATLAB will run on a single compute node.
Please use the partition "cm4_tiny" in cluster "cm4"!

Konnte den Inhalt der URL nicht laden, weil er von einer unzulässigen Quelle stammt.

https://code2doku-cxs-85c391b8c3bb7b71391aec80327f87b01d885a5b909ac5849.gitlab-ce-pages.lrz.de/doku.matlab.BASIC_SLURM-JOBS.matmul_mthread.slurm.html

Sie können sich an Ihren Website Administrator wenden und bitten, dass diese URL zur Liste der erlaubten Quellen hinzugefügt werden soll.

Konnte den Inhalt der URL nicht laden, weil er von einer unzulässigen Quelle stammt.

https://code2doku-cxs-85c391b8c3bb7b71391aec80327f87b01d885a5b909ac5849.gitlab-ce-pages.lrz.de/doku.matlab.BASIC_SLURM-JOBS.matmul_mthread.m.html

Sie können sich an Ihren Website Administrator wenden und bitten, dass diese URL zur Liste der erlaubten Quellen hinzugefügt werden soll.

Parallel batch job using Parallel Computing Toolbox (PCT)

MATLAB will run on a single compute node.
Please use the partition "cm4_tiny" in cluster "cm4"!

Konnte den Inhalt der URL nicht laden, weil er von einer unzulässigen Quelle stammt.

https://code2doku-cxs-85c391b8c3bb7b71391aec80327f87b01d885a5b909ac5849.gitlab-ce-pages.lrz.de/doku.matlab.BASIC_SLURM-JOBS.matmul_pct.slurm.html

Sie können sich an Ihren Website Administrator wenden und bitten, dass diese URL zur Liste der erlaubten Quellen hinzugefügt werden soll.

Konnte den Inhalt der URL nicht laden, weil er von einer unzulässigen Quelle stammt.

https://code2doku-cxs-85c391b8c3bb7b71391aec80327f87b01d885a5b909ac5849.gitlab-ce-pages.lrz.de/doku.matlab.BASIC_SLURM-JOBS.matmul_pct.m.html

Sie können sich an Ihren Website Administrator wenden und bitten, dass diese URL zur Liste der erlaubten Quellen hinzugefügt werden soll.