Configure and setup of MATLAB 2019b and later
This section describes MATLAB 2019b and later.
Configuring MATLAB 2019b and later
To be able to use MATLAB 2019b, 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.
Unless Matlab graphical interface is already started, start it using one of the following methods:
- Using the menus to start a Matlab for you: "Application" → "HPC2N Applications" → "Applications" → "Matlab ...."
- but you can also select a specific version of MatLab from those installed by starting it from the ThinLinc linux terminal:
Check for available versions module spider matlab # Select required version # Since different versions of MATLAB differ in user configuration it is important to specify which version to use module load MATLAB/2019b matlab -singleCompThread
When Matlab is started run the following in the Matlab command window and select Kebnekaise
Jobs can now be run using the batchsystem instead of submitting to the local machine.
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 (project ID in the form hpc2nXXXX-YYY, SNICXXX-YY-ZZ, or NAISSXXXX-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
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)
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 = ‘’;