Configure and setup of MATLAB 2018b and later

This section describes MATLAB 2018b and later.

Configuring MATLAB 2018b and later

Cluster configuration

To be able to use MATLAB 2018b, and later, together with the batch system, MATLAB needs to be configured to use a cluster profile. This needs to be done only once for each cluster and version of MATLAB.

Run the configCluster command from within MATLAB.

Jobs can now be run using the batchsystem instead of submitting to the local machine. 

Job configuration

Prior to submitting jobs some addtional properties needs to be set, such as which account to use, requested walltime, etc.

Any parameters specified using the below workflow will be persistent between MATLAB sessions.

First get a handle to the cluster:

c = parcluster(‘kebnekaise’);

Specify account (SNIC project ID in the form SNICXXXX-YY-ZZ) and requested walltime (these are required):

c.AdditionalProperties.AccountName = ‘account-name’;
c.AdditionalProperties.WallTime = ‘05:00:00’;

Other generic properties that can be set are (not required):

  • QueueName - To use the nodes with more memory use "largemem" on Kebnekaise and "bigmem" on Abisko
  • EmailAddress
  • RequireExclusiveNode

Note: On Kebnekaise you need a specific allocation on the Large Memory nodes to be allowed to use them.

On Kebnekaise one can also specify GPU properties:

  • GpuCard - use k80 or v100
  • GpusPerNode - use 1, 2, (or 4 if using k80)
  • ActivateMultiProcessServiceForGpus
  • RequireExclusiveGpu


c.AdditionalProperties.GpuCard = 'k80';
c.AdditionalProperties.GpusPerNode = 2;

For full documentation about using GPUs please read MathWorks GPU Computing

Save changes after modifying AdditionalProperties fields.


To see the values of the current configuration options, call the specific AdditionalProperties name.


To clear a value, assign the property an empty value (‘’, [], or false).

c.AdditionalProperties.EmailAddress = ‘’;
Updated: 2020-07-14, 21:10