Configure and setup of MATLAB 2016b

This section describes MATLAB 2016b.

Configuring MATLAB 2016b

Cluster configuration

To be able to use MATLAB 2016b 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.

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 parameters needs to be set, such as which account to use, requested walltime, etc. The parameters are set with ClusterInfo. The ClusterInfo class supports tab-completion:

% Specify which project that should be used (REQUIRED)
% Set walltime to one hour                  (REQUIRED) 

Addtional parameters that can be set include (these are not required):

  • EmailAddress   - if you want notifications about job stauts
  • ProcsPerNode 
  • QueueName   - if using special partitions on the resources
  • Reservation    - if running in a reservation
  • GpusPerNode  
  • UseGpu
  • UserDefinedOptions

Note: Any parameters specified with ClusterInfo are persistent between MATLAB sessions.

To see the currently configured parameters use:

% To view the current configuration

You can also clear a parameter by assigning it an empty value ('', [], false) or clear all configured parameters:

% Clear a configuration that takes a string as argument
% Clear all configurations

Cluster Profiles

If you are using MATLAB on both Abisko and Kebnekaise, you need to switch between the profiles for the respective systems. If using the MATLAB Desktop you can switch profile using Parallel -> Default Cluster and then select the profile you want to use (for MATLAB 2016b: abisko_local_r2016b or kebnekaise_local_r2016b).

This can also be done from the MATLAB prompt:

% Show the currently used profile
% List all available profiles
allProfiles = parallel.clusterProfiles
% Set the default profile to the first one in the list
% Set the default profile Abisko (MATLAB 2016b):
% Set the default profile to Kebnekaise (MATLAB 2016b):

You can also use the profile name when creating the handle to the cluster (more about cluster handles below):


Using the Large Memory Nodes on Kebnekaise or the Big Memory nodes on Abisko

To be able to use the Large Memory nodes on Kebnekaise (3TB/node) or the Big Memory nodes on Abisko (512GB/node) you have to set the Queuename:


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

Using the GPUs on Kebnekaise

Kebnekaise have 32 nodes with 2 NVidia K80 each, and 4 nodes with 4 Nividia K80 each. They are available for everyone having an allocation on Kebnekaise. They are charged higher that the ordinary compute nodes. See Allocation policy on Kebnekaise for more information.

To be able to use the GPUs on Kebnekaise you have to do: 

% Tell the scheduler that you want to use the GPUs
% number of GPUs per node to use

At the moment you also have to specify the GRES to use. This requirement will be removed in a later update: 

% ClusterInfo.setUserDefinedOptions('--gres=gpu:k80:2,mps')

For full documentation about using GPUs please read MathWorks GPU Computing.

Updated: 2019-06-25, 10:52