Install and Configure MATLAB Parallel Server for MATLAB Job Scheduler and Online Licensing
If you do not have an existing scheduler in your cluster, follow these instructions to integrate the MATLAB® Job Scheduler, which is provided with MATLAB Parallel Server™. If you already have a cluster with a scheduler, see Install and Configure MATLAB Parallel Server for Third-Party Schedulers.
These instructions guide you through the following tasks:
After you integrate MATLAB with a scheduler, you can access workers in your cluster from a desktop MATLAB client session (requires Parallel Computing Toolbox™). Workers are MATLAB computational engines that typically correspond to a core.
The setup in these steps uses online licensing.
Check License Type and Users
Check License Type
If you have a campus-wide license for MATLAB Parallel Server, then you already have access to online licensing and can skip to Add Licensed End Users. If you are unsure about your license details, then contact the license administrator.
To install MATLAB Parallel Server using online licensing, you must check your license type.
In your browser, go to License Center and log in with your MathWorks® Administrator Account.
Select the MATLAB Parallel Server license that you plan to use.
On the Install and Activate tab, look for License Manager: followed by the license manager type currently assigned to this license.
Add Licensed End Users
With online licensing, any user of MATLAB Parallel Server must be added as a licensed end user. To add licensed end users, you must be a license administrator. If you are not a license administrator, provide a list of required licensed end users to the license administrator along with the following steps. If you are a license administrator, follow these steps.
If you are not already logged in as an administrator, go to License Center and log in with your MathWorks Administrator Account.
Select your MATLAB Parallel Server license, and then click Manage Users.
Click Add User to add a user to the list.
Provide the user’s email address, first and last names, and country. Click Add User. Note that if the specified email address does not correspond to an existing MathWorks Account, a new account is created for that user.
Add end users as necessary.
Get the Installation Files
If you are not a license administrator, you can download the Internet-based installer. For more information, see Install Products Using Internet Connection. Note that this method performs a full download of the necessary files per compute node that you are setting up.
To save time and eliminate the need to run the installer-based download process on each computer in your cluster, download the installation files prior to installation. Doing so facilitates installation in a large number of machines. If you have access to an Administrator’s account for your license, you can use the installer to download files without installing them. If not, contact the administrator of your license to obtain a copy of the installation files. For more information, see Download Products Without Installing. Alternatively, proceed with the Internet-based installer. When you download the files using the installer, you must:
Select the operating system for the cluster machines.
Select all products for download. MATLAB Parallel Server cannot run jobs requiring products that are not installed.
MATLAB Parallel Server has two server-side components:
Install Software on All Nodes
To install the software on each computer in your cluster, follow these steps:
Start the MATLAB installer from the installation files downloaded in Get the Installation Files.
Select Log in with a MathWorks Account and follow the prompts.
Select all products that the end users will use.
After the installation completes, update the
matlabroot/toolbox/parallel/bin. Uncomment and set:
For best performance, install the software locally on each node. However, you can also install the software in a network share location.
Install noninteractively (silently) instead if you want to
Install the software on a machine without graphical user interface (GUI).
Save the time that it takes to configure the installer for each compute node.
For more information, see Install Noninteractively.
You can test the installation and licensing by running the following command in a
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
matlabroot/toolbox/parallel/bin/checkLicensing -logfile filename
Configure the MATLAB Job Scheduler with Admin Center
The MATLAB Job Scheduler is a scheduler that is provided with MATLAB Parallel Server. The MATLAB Job Scheduler is intended primarily for clusters that run only MATLAB jobs. The scheduler interface is a high-level abstraction that enables you to submit jobs to your computation resources, and allows you to avoid dealing with differences in operating systems and environments.
The following steps configure the MATLAB Job Scheduler with Admin Center, the graphical interface. If your machine does not provide graphics, use the command-line interface instead. For more information, see Start the mjs Service, MATLAB Job Scheduler, and Workers (Command-Line).
On the head node, start Admin Center. Go to
matlabroot/toolbox/parallel/binand execute the file named
matlabrootis the MATLAB installation folder.
Click Add or Find, and specify the computers that you are using as your head node and compute nodes.
Follow the prompts and confirm to start the mjs service. If necessary, manually start the mjs service using the command-line interface. For more information, see Use the Command-Line Interface (Windows) or Use the Command-Line Interface (UNIX).
In the MATLAB Job Scheduler section, click Start. Specify a name for your MATLAB Job Scheduler and select the head node from the dropdown list.
To add MATLAB Parallel Server workers, click Start in the Workers section of the Admin Center.
Select the computers to host the workers.
Select the number of workers per computer.
Verify your configuration by checking worker status in the Workers section.
To troubleshoot issues, click Test Connectivity in the Host section.
If you use UNIX®, configure the mjs service to start automatically at start time. For instructions, see Start the mjs Service, MATLAB Job Scheduler, and Workers (Command-Line).
The head node uses computational resources to run the MATLAB Job Scheduler. If you set up workers on the head node, they compete for resources with the MATLAB Job Scheduler.
Avoid setting up workers on the head node. If workers use too many system resources, such as memory, processor, network, or local storage, the job manager can become unresponsive.
The following screenshot shows the final setup in Admin Center.
If you need more help during the configuration, such as your cluster requires firewall configuration or you want to set up multiple mjs installations, see this more detailed guide Configure Advanced Options for MATLAB Job Scheduler Integration.
Connect the MATLAB Client to the MATLAB Parallel Server Cluster
To use MATLAB Parallel Server, you must have a client computer running MATLAB and Parallel Computing Toolbox. In the MATLAB toolstrip, select Parallel > Discover Clusters and follow the instructions to automatically discover and set up your cluster.
Alternatively, you can configure it manually as follows:
In MATLAB, on the Home tab, select Parallel > Create and Manage Clusters.
Select Add Cluster Profile > MATLAB Job Scheduler.
Create your MATLAB Job Scheduler profile and click Edit.
Update the hostname of the head node.
Update the license number.
Click Done and select Set as Default (optional) .
After you successfully validate your cluster, you can now use your MATLAB session to submit jobs to the MATLAB Parallel Server cluster.
If your validation does not pass, contact the MathWorks install support team.
Any MATLAB cluster workers that you start use dynamic licensing: they can use all the functionality you are licensed for in the MATLAB client, while checking out only MATLAB Parallel Server licenses in the cluster.
For information on configuring more advanced options for your cluster, see MATLAB Job Scheduler Cluster Customization. For example, you can set the security of the cluster in Set MATLAB Job Scheduler Cluster Security. After you finish your configuration, try some examples of cluster workflows in Running Code on Clusters and Clouds.