Configure for Slurm, PBS Pro, Platform LSF, TORQUE

Follow these instructions to configure your MATLAB® Parallel Server™ installation to work with Slurm, PBS Pro, Platform LSF, TORQUE.


Instead, use the generic scheduler interface for any of the following:

  • Any third-party scheduler not listed above (e.g., Sun Grid Engine, GridMP, etc.)

  • PBS other than PBS Pro

  • A nonshared file system when the client cannot directly submit to the scheduler (e.g., TORQUE on Windows)

  • When the MATLAB client machine does not have the third-party scheduler’s utilities installed (for example sinfo, sbatch, squeue and sacct for Slurm)

  • If you want to use Slurm from a Windows client, or if you do not have a shared file system with your Slurm cluster, or if the Slurm utilities are not accessible on your client, then use the generic scheduler interface.

Configure Platform LSF Scheduler on Windows Cluster

If your cluster is already set up to use mpiexec and smpd, you can use Parallel Computing Toolbox™ software with your existing configuration if you are using a compatible MPI implementation library (as defined in matlabroot\toolbox\parallel\mpi\mpiLibConf.m). However, if you do not have mpiexec on your cluster and you want to use it, you can use the mpiexec software shipped with the parallel computing products.

For further information about mpiexec and smpd, see the MPICH home page. For user’s guides and installation instructions on that page, select Documentation > User Docs.

In the following instructions, matlabroot refers to the MATLAB installation location.

To use mpiexec to distribute a job, the smpd service must be running on all nodes that will be used for running MATLAB workers.


The smpd executable does not support running from a mapped drive. Use either a local installation, or the full UNC path name to the executable. Microsoft® Windows Vista™ does not support the smpd executable on network share installations, so with Vista the installation must be local.

  1. Log in as a user with administrator privileges.

  2. Start smpd by typing in a DOS command window:

    matlabroot\bin\win64\smpd -install

    This command installs the service and starts it. As long as the service remains installed, it will start each time the node boots.

  3. If this is a worker machine and you did not run the installer on it to install MATLAB Parallel Server software (for example, if you are running MATLAB Parallel Server software from a shared installation), execute the following command in a DOS command window.

    matlabroot\bin\matlab.bat -install_vcrt

    This command installs the Microsoft run-time libraries needed for running jobs with your scheduler.

  4. If you are using Windows® firewalls on your cluster nodes, execute the following in a DOS command window.


    This command adds MATLAB as an allowed program. If you are using other firewalls, you must configure them to make similar accommodation.

  5. Log in as the user who will be submitting jobs for execution on this node.

  6. Register this user to use mpiexec by typing:

    matlabroot\bin\win64\mpiexec -register
  7. Repeat steps 5–6 for all users who will run jobs on this machine.

  8. Repeat all these steps on all Windows nodes in your cluster.

Configure Windows Firewalls on Client

If you are using Windows firewalls on your cluster nodes,

  1. Log in as a user with administrative privileges.

  2. Execute the following in a DOS command window.


    This command adds MATLAB as an allowed program. If you are using other firewalls, you must configure them for similar accommodation.

Validate Installation Using a Slurm, LSF, PBS Pro, or TORQUE Scheduler

This procedure verifies that the parallel computing products are installed and configured correctly on your cluster.

Step 1: Define a Cluster Profile

In this step you define a cluster profile to use in subsequent steps.

  1. Start the Cluster Profile Manager from the MATLAB desktop by selecting on the Home tab in the Environment area Parallel > Manage Cluster Profiles.

  2. Create a new profile in the Cluster Profile Manager by selecting New > LSF (or Slurm, PBS Pro or Torque, as appropriate).

  3. With the new profile selected in the list, click Rename and edit the profile name to be InstallTest. Press Enter.

  4. In the Properties tab, provide settings for the following fields:

    1. Set the Description field to For testing installation.

    2. Set the JobStorageLocation to the location where you want job and task data to be stored (accessible to all the worker machines if you have a shared file system).


      JobStorageLocation should not be shared by parallel computing products running different versions; each version on your cluster should have its own JobStorageLocation.

    3. Set the NumWorkers field to the number of workers you want to run the validation tests on, within the limitation of your licensing.

    4. Set the ClusterMatlabRoot to the installation location of the MATLAB to be executed by the worker machines, as determined in Chapter 1 of the installation instructions.

    5. Set the SubmitArguments to include any additional command arguments required by your particular cluster and scheduler.

    6. If you are using LSF®, set the OperatingSystem to the operating system of your worker machines.

    7. Set HasSharedFilesystem to indicate if client and workers can share the same data location.

      The dialog box should look something like this, or slightly different for PBS Pro® or TORQUE schedulers.

  5. Click Done to save your cluster profile.

Step 2: Validate the Cluster Profile

In this step you verify your cluster profile, and thereby your installation. You can specify the number of workers to use when validating your profile. If you do not specify the number of workers in the Validation tab, then the validation will attempt to use as many workers as the value specified by the NumWorkers property on the Properties tab. You can specify a smaller number of workers to validate your configuration without occupying the whole cluster.

  1. If it is not already open, start the Cluster Profile Manager from the MATLAB desktop. On the Home tab, in the Environment area, select Parallel > Create and Manage Clusters.

  2. Select your cluster profile in the listing.

  3. Click Validation tab.

  4. Use the checkboxes to choose all tests, or a subset of the validation stages, and specify the number of workers to use when validating your profile.

  5. Click Validate.

The Validation Results tab shows the output. The following figure shows the results of a profile that passed all validation tests.


If your validation does not pass, contact the MathWorks install support team.

If your validation passed, you now have a valid profile that you can use in other parallel applications. You can make any modifications to your profile appropriate for your applications, such as NumWorkersRange, AttachedFiles, AdditionalPaths, etc.

To save your profile for other users, select the profile and click Export, then save your profile to a file in a convenient location. Later, when running the Cluster Profile Manager, other users can import your profile by clicking Import.