Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Current »

(This documentation should work with MATLAB >= 2019b)

Configuring MATLAB

MATLAB Parallel Severs is a toolbox that allows you to launch your script to the SCITAS clusters directly from your local installation of MATLAB. This documentation will guide you through the steps to properly configure the SCITAS clusters as parallel servers in your MATLAB installation. 

  1. The first step is to install MATLAB 2019b on your personal computer. To this end, you can download from Distrilog (or by following this link for a Linux machine). During the installation, you will be prompted with different toolboxes available. You must select the "Parallel Computing toolbox" for installation. Once MATLAB is installed, you will also need to install the "Parallel Computing Toolbox plugin for MATLAB Parallel Server with Slurm".
  2. Once the first step is completed, open MATLAB and in the "Home" menu, select "Parallel" and "Create and Manage Clusters":

    In the dialog window, click on "Import" and select the following configuration files (you will need to download them on your computer):
     + SCITAS cluster: fidis (R2019b).mlsettings
     + SCITAS cluster: helvetios (R2019b).mlsettings
  3. Select the newly imported configurations and, in the "Scheduler Plugin" section, correct the location of the plugin installation to reflect your setup:
    PluginScriptsLocation: INSTALL_DIR/MATLAB/SupportPackages/R2019b/parallel/slurm/nonshared

    where INSTALL_DIR is the path where you have installed the Slurm plugin.

  4. Test your installation with the "Validate" button (the "Parpool" test might fail if you don't have a static IP). This may take a long time depending on the current workload of the cluster.

In case of the error "Failed to initialize the interactive session" during the "Parpool" test, set the hostname explicitly on the client host:

  1. Find the IP address of your computer using the tool of your choice (ip, hostname -I,, etc.)
  2. Query the name server to obtain the name it gives you:
    nslookup YOU_IP_ADDRESS
  3. Add the following line to your MATLAB startup file:

    where MY_PC_NAME is the name obtained at the previous point.
  4. Restart MATLAB.

Changing SLURM options when launching a MATLAB simulation

When launching a simulation using MATLAB Parallel Server, you may need to change a SLURM option to fit your needs. Typically, without any action from you, the time limit of the simulation is the default one (15 minutes). To change that, you must create a cluster object inheriting from the cluster configuration, add an additional submission argument, and create the parallel pool of workers:

cluster = parcluster('fidis');                                         % Create a cluster with the configuration corresponding to the Fidis machine
cluster.AdditionalProperties.AdditionalSubmitArgs = '--time 01:00:00'; % Add the option of your choice. Here, we set the time limit to 1h.

parpool(cluster)                                                       % Start the parallel pool

  • No labels