License and Install MATLAB Parallel Server in Cluster
This topic explains how to set up MATLAB® Parallel Server™ licensing for your cluster and install MATLAB Parallel Server and other MathWorks® products for use on your cluster nodes.
Before beginning the installation, verify that your cluster nodes are running a supported operating system and meet the minimum hardware, software, and network requirements described in MATLAB Parallel Server System Requirements and Requirements and Ports for MATLAB Parallel Server.
Set Up Licensing
Before you install MATLAB Parallel Server on your cluster nodes, decide how to manage licensing for cluster users. You can use a self-hosted network license manager or the cloud-based MathWorks online licensing for MATLAB Parallel Server. To learn more about licensing options, see Scale MATLAB and Simulink on Clusters and in the Cloud.
Set Up Network License Manager
Follow these instructions to manage MATLAB Parallel Server licensing for cluster users with a self-hosted network license manager.
There are three components of running MATLAB Parallel Server with a network license manager:
The cluster scheduler software, which runs on the head node and manages jobs on your cluster. The scheduler can be MATLAB Job Scheduler or a third-party scheduler like Slurm.
A self-hosted network license manager, which serves the MATLAB Parallel Server license used by each worker. You can run the license manager on the cluster head node or on a machine in a location accessible by the cluster nodes.
Cluster nodes, which run MATLAB Parallel Server. For more information, see Install Software on Cluster Nodes.
| Network license manager on head node | Network license manager at a location accessible to cluster nodes |
|---|---|
In this configuration, the head node acts as both the scheduler host and the license server. All compute nodes obtain their MATLAB Parallel Server licenses directly from the license manager running on the head node. | In this configuration, the license manager is installed at a separate location. The license server must be reachable by all compute nodes to allow workers to check out MATLAB Parallel Server licenses. |
If you do not have an existing network license manager, install the network license manager on your head node or on a computer accessible by your cluster nodes.
Install the MathWorks network license manager using the MathWorks product installer by following the instructions in Install License Manager on License Server.
Start the network license manager on the license server by following the instructions in Start and Stop Network License Manager.
To install MATLAB Parallel Server on the cluster nodes, obtain a copy of the configured network license file
license.datin theetcfolder in the location where you installed the network license manager.The
license.datnetwork license file is available only after the installation of the network license manager and is required to point the cluster node's MATLAB Parallel Server installation to the license manager. For more information, see License Processing.
Alternatively, you can continue to use your existing license manager and update the license file on the network license manager to also host the MATLAB Parallel Server license. For details, see Update or Modify Network License Files.
Set Up Online Licensing
Follow these instructions if you want to use MathWorks online licensing to manage licensing for your cluster users. To learn more about online license options, see Online Licensing for MATLAB Parallel Server. If you want to manage licensing using a self-hosted network license manager instead, see Set Up Network License Manager.
There are three components of running MATLAB Parallel Server with online licensing:
The cluster scheduler software, which runs on the head node and manages jobs on your cluster. This can be MATLAB Job Scheduler or a third-party scheduler like Slurm.
The MathWorks hosted online licensing manager, which serves the MATLAB Parallel Server license used by each worker.
MATLAB Parallel Server, which runs on the cluster nodes. For more information, see Install Software on Cluster Nodes.
In a cluster configuration with online licensing, each node in the cluster must be able to access the MathWorks licensing server to check out and return licenses.
The MATLAB Parallel Server license is configured to use a network licensing manager by default. If you want to use online licensing, you must ensure that the license is configured for online licensing, and then add end users to the license.
Check License Type. Check whether your MATLAB Parallel Server license is already configured for online licensing. If it is not, update the configuration to use online licensing. You must be a license administrator to make changes to a MATLAB Parallel Server license.
Steps to Verify or Change License Configuration
Add End Users to License. With online licensing, every cluster user must be added as a licensed end user. Cluster users access the cluster when they sign in to the MATLAB client. To add licensed end users, you must be a license administrator. A license administrator can add licensed end users by following these steps.
Install Software on Cluster Nodes
To run MATLAB Parallel Server workers on your cluster, install MATLAB Parallel Server and all products and toolboxes on each cluster node.
To save space, install only the products and toolboxes included in your license. To view your licensed products, go to License Center, select your MATLAB license, and click Manage Products.
You can install the software in a network share location. However, for best performance, install the software locally on each node in the same location.
If a MATLAB installation already exists on the cluster node, you can install MATLAB Parallel Server into the same installation folder. This allows you to use a single MATLAB installation without creating a duplicate.
Choose one of these methods to install software for the cluster nodes. To install the software on a machine without a user interface and save the time that it takes to configure the installer for each compute node, perform programmatic installation.
| Method | Recommended Approach |
|---|---|
Install MATLAB Parallel Server using an interactive installer. | You can perform standard installation using the MathWorks product installer, which requires an internet connection. For detailed guidance, see Download and Install MATLAB. If your cluster manages licenses with a network license manager:
|
| Perform programmatic installation with the MATLAB Package Manager ( You can also
use
If your cluster manages licenses with a network license
manager, after you complete installation on the compute nodes,
you must place the |
| Download software installation files, then perform silent installation using the MathWorks product installer and a File Installation Key. For information on how to get a File Installation Key, see Install Products on Offline Computer. To learn how to automate installation using the MathWorks product installer, see Install Products Noninteractively. If your cluster manages licenses with the network license manager:
|
Verify Licensing with Network License Manager
If your cluster manages licenses with the network license manager, you can verify
your MATLAB
Parallel Server installation and licensing after installing it on the cluster nodes.
To run the test, run the following command from the operating system command line on
a cluster node. <matlabroot> is the MATLAB installation folder. <filename> is the
location to write the log file to, for example, a temporary location. You must have
write permissions in this
location.
<matlabroot>/toolbox/parallel/bin/checkLicensing -logfile <filename>The MATLAB Parallel Server worker licensing check has succeeded. Check <filename>.log for details.
Install MATLAB to Submit Jobs
To run MATLAB jobs on your cluster, you must submit jobs from a MATLAB client with Parallel Computing Toolbox™ installed. You must use a MATLAB client that is the same release as the MATLAB Parallel Server release installed on the cluster.
Install the MathWorks products for which you are licensed, including Parallel Computing Toolbox, on the computer from which you want to submit jobs to the cluster. For help with this step, see Installing Products.
Workers can use all the functionality you are licensed for in the MATLAB client, while checking out only MATLAB Parallel Server licenses on the cluster.
Complete Cluster and Client Configuration
When the cluster and client installations are complete, you can proceed to the next steps for the job scheduler of your choice. Use this table to choose a suitable guide to complete your configuration.
| Scenario | Next Step |
|---|---|
You do not have an existing scheduler in your cluster. | Use MATLAB Job Scheduler to manage jobs in your cluster. MATLAB Job Scheduler is provided with MATLAB Parallel Server and is intended primarily for clusters that run only MATLAB jobs. To set up a MATLAB Job Scheduler cluster with a basic configuration, see Perform Simple MATLAB Job Scheduler Configuration. |
You have an existing scheduler in your cluster. MATLAB supports these schedulers:
|
|
Use the generic scheduler interface if you are using a scheduler that is not supported by MATLAB. |
|