Matlab

Matlab

Matlab is a popular interactive programming platform for numerical computing, data analysis, visualization, etc. It has various toolboxs tailored for specific engineering application, to name a few;
signal processing, machine learning, robotics, parallel computing ,etc. please read https://www.mathworks.com/help/matlab/index.html for more information.

Note: Matlab licenses are not provided by Pawsey,

Users have to use their own license installed on their own, most likely their instituion’s, license server.

The license server’s IP address is needed to run Matlab on Setonix at all time.
Please see https://www.mathworks.com/help/install/ug/install-license-manager-on-license-server.html to install matlab license server.

In order to use Matlab container, project PI should submit a helpdesk ticket requesting user/s to be added to the matlab group.

The login nodes are not intended to be used interactively for compute-intensive processes or I/O processes. They are mainly to be used to access your program scripts and Slurm scripts from your $MYSCRATCH/working directory.
You have to run interactive jobs by allocating resources on a compute node.

Interactive mode is intended for developing and/or debugging your code on a compute node, once the code is production ready, it should run in non-interactive mode using Slurm job scripts.

Running MATLAB jobs interactively:

Login into the Setonix cluster,

ssh <YourUserID>@setonix.pawsey.org.au

and then allocate resources for a interactive session using the salloc command as show below from the command line of a login node. You do not need to specify a particular node; it is allocated automatically on the basis of the options provided in the salloc command, and the resources available at that time.

mebasha@setonix-02:~> salloc --partition=work --nodes=1 --cpus-per-task=1 --mem=4GB salloc: Pending job allocation 42357029 salloc: job 42357029 queued and waiting for resources salloc: job 42357029 has been allocated resources salloc: Granted job allocation 42357029 salloc: Waiting for resource configuration salloc: Nodes nid002794 are ready for job

In the above example, the node nid002794 was assigned by the resource manager, slurm.

Note: please see the link below for matlab and other toolbox requirements for requesting appropriate compute resource allocation using salloc.
https://au.mathworks.com/support/requirements/matlab-parallel-server.html

As it stands, each matlab process should be binded to single physical core/cpu, and it needs 4GB of RAM per process and 5GB of data space in your working directory.

At Pawsey, we are providing matlab@2025a as a container, which has all toolboxs, supporting libaries and documents.
user should have appropriate license/licenses to access required libraries and toolbox. you can load it as shown below.

module load matlab/r2025a

once loaded , export your license server address so that matlab instance can use the license/s as shown below.

export MLM_LICENSE_FILE=27000@license-server.university.edu.au

now, run matlab

mebasha@nid002794:~> matlab MATLAB is selecting SOFTWARE OPENGL rendering. < M A T L A B (R) > Copyright 1984-2022 The MathWorks, Inc. R2022b Update 1 (9.13.0.2080170) 64-bit (glnxa64) September 28, 2025a To get started, type doc. For product information, visit www.mathworks.com. >>

this brings you to the >> prompt and you can use MATLAB interactively from the allocated compute node, nid002794.

Note: by default, The MATLAB graphical user interface (GUI) is disabled (following flags were embedded to container runtime "-nosplash -nojvm -nodisplay -nodesktop" ) when you run matlab container, that means all commands in the scripts that write to GUI will not work.

Running MATLAB jobs non-interactively:

Single node job :

As mentioned above, interactive mode is intended for developing and/or debugging your code on a compute node, once the code is production ready, it should run in non-interactive mode using Slurm job scripts.

A typical slurm job script is shown below.

#!/bin/bash #SBATCH --nodes=1 #SBATCH --ntasks-per-node=8 #SBATCH --partition=work #SBATCH -A pawseyxxx # Change the Slurm Account as necessary #SBATCH -t 01:00:00 # Change the walltime as necessary export MLM_LICENSE_FILE=27000@license-server.university.edu.au module load matlab@2025a module load singularity@version #test1.m is matlab script, pass script name without ".m" extension as argument matlab -r "test1; exit"

to know more about running container using singlurity please read Containers

Note: Currently, matlab can run parallel labs/ parallel process on a single node only.

Multi-node job :

Due to inherent security concerns and limitations, we are not able to provide multi-node matlab simulation service. We are working on it, and once ready we will make it available.