MATLAB

Matlab is available on Artemis. It is best suited for workloads that can be submitted as non-interactive “batch” jobs.

The following versions of Matlab are installed on Artemis:

  • R2013a
  • R2014b (default)
  • R2015b
  • R2016b
  • R2017a

You will need to load the relevant version of Matlab you want to use, see the loading modules guide for more information.

If you would like a newer version of Matlab to be installed, you can submit a High Performance Computing request via the ICT Self-Service portal.

Example MATLAB script

An example single core Matlab script is below:

#!/bin/bash
#PBS -P <Project>
#PBS -l select=1:ncpus=1:mem=4gb
#PBS -l walltime=4:00:00

module load matlab
cd $PBS_O_WORKDIR
matlab -nosplash -nodisplay -r "matlab_script" > matlab_output.log

Parallel Matlab jobs

If you have a Matlab program that can run in parallel (using more than one CPU or core), use the following script to run your Matlab program on Artemis:

#!/bin/bash
#PBS -P <Project>
#PBS -l select=1:ncpus=4:mpiprocs=4:mem=4gb
#PBS -l walltime=4:00:00

module load matlab
cd $PBS_O_WORKDIR
matlab -nosplash -nodisplay -r "matlab_script" > matlab_output.log

Make sure the number of mpiprocs matches the number of CPUs requested.

If you are interested in writing parallel Matlab scripts, see the Mathworks Parallel Computing Toolbox guide.