Main Content

Configure for Slurm, PBS Pro, OpenPBS, LSF, TORQUE

Follow these instructions to configure your MATLAB® Parallel Server™ installation to work with Slurm, PBS Pro®, OpenPBS, LSF®, and TORQUE using built-in cluster types.

You can create a cluster profile using either a built-in cluster type or Generic. As a best practice, use built-in cluster types where possible.

You must use a Generic cluster profile when:

  • You connect to a cluster that does not have a built-in cluster type

  • The MATLAB client and the cluster nodes do not have a shared file system

  • The MATLAB client machine is unable to directly submit jobs to the third-party scheduler, or

  • You need to fully customize how parallel jobs are submitted to the cluster

To configure a cluster using the Generic cluster type, see Configure Using the Generic Scheduler Interface.

Create Cluster Profile and Validate Installation

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

Step 1: Create a Cluster Profile

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

  1. Start the Cluster Profile Manager. On the Home tab, in the Environment area, select Parallel > Create and Manage Clusters.

  2. Create a new profile in the Cluster Profile Manager by selecting Add Cluster Profile > Slurm (or LSF, PBS Pro, OpenPBS, Grid Engine, 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).

      Note

      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.

    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 Slurm, PBS Pro, OpenPBS, or TORQUE schedulers.

      Cluster Profile Manager with the InstallTest cluster profile selected. The cluster properties for the InstallTest cluster are shown in the right pane.

  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.

Cluster Profile Manager with the local cluster profile selected. The validation results for the local cluster are shown in the right pane.

Note

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.

Configure 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.

Note

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 Windows Vista the installation must be local.

  1. Log in as a user with administrator privileges.

  2. Start smpd by typing in a Windows® command prompt:

    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 Windows command prompt.

    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 Windows command prompt.

    matlabroot\toolbox\parallel\bin\addMatlabToWindowsFirewall.bat
    

    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 Server

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 Windows command prompt.

    matlabroot\toolbox\parallel\bin\addMatlabToWindowsFirewall.bat
    

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