Main Content

Install for MATLAB Job Scheduler with Network License Manager

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 MATLAB Parallel Server for Other 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 with Parallel Computing Toolbox™. Workers are MATLAB computational engines that typically correspond to a core.

The setup in these steps uses the network license manager.

Activate Your MATLAB Parallel Server License

To install MATLAB Parallel Server, you must activate your license. To activate your MATLAB Parallel Server license:

  1. Navigate to /licensecenter.

  2. Log into the Administrator’s bat365 Account.

  3. Select your MATLAB Parallel Server license, and click the Install and Activate tab.

  4. At the rightmost side, under RELATED TASKS, select Activate to Retrieve License File.

  5. Fill in the requested information. This information must refer to the machine that hosts the license manager. In these instructions, it is the head node. For more information, see Install Software on the Head Node.

  6. After filling in the information, download or email the License File and copy the File Installation Key. These are used later in the process.

Get the Installation Files

To save time and eliminate the need for the installer-based download process for 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. When using the installer to download the files, choose the following options:

  • Select the appropriate operating system for the cluster machines.

  • Select all products for download. MATLAB Parallel Server cannot run jobs requiring products that are not installed.

There are three server-side components of MATLAB Parallel Server:

  1. The license manager, which hosts the MATLAB Parallel Server license used by each worker. For more information, see Install Software on the Head Node.

  2. The MATLAB Job Scheduler, which runs on the head node and manages jobs on your cluster. For more information, see Install Software on the Head Node.

  3. MATLAB Parallel Server, which runs on the compute nodes. For more information, see Install Software on Compute Nodes.

A computer cluster running MATLAB linked to client computers. The cluster headnode is shown running the MATLAB Job Scheduler with a licence manager.

Install Software on the Head Node

Use the offline installer from the previous step. For more information on the offline installation procedure, see Install bat365 Products on Offline Computer.

  1. Choose a computer to host the license manager and the MATLAB Job Scheduler. This computer is your head node.

  2. Start the MATLAB installer from the installation files acquired in Get the Installation Files.

  3. Select Advanced Options > I want to install network license manager, and continue through the prompts to complete the network manager installation. In the License File step, browse to your license.lic file (obtained from Activate Your MATLAB Parallel Server License). For more information about the procedure, see Install License Manager on License Server.

  4. Restart the installer by clicking on the installer file. The installer file is located in the top level of the folder where you extracted the files.

  5. Under Advanced Options select I have a File Installation Key and continue through the prompts.

  6. Select all products. Alternatively, to save space, install only the products that the users of the cluster are licensed for.

  7. In the License File step, browse to your license.dat file. You can obtain this file from the matlabroot/etc folder, where matlabroot is the MATLAB installation folder.

  8. Start the license manager.

You can test the installation and licensing by running the following command in a command-line interface. 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

Install Software on Compute Nodes

This procedure is similar to Install Software on the Head Node. For more information on the offline installation procedure, see Install bat365 Products on Offline Computer.

  1. Start the MATLAB installer from the installation files acquired in Get the Installation Files.

  2. Under Advanced Options select I have a File Installation Key and continue through the prompts.

  3. Select all products. Alternatively, to save space, install only the products that the users of the cluster are licensed for.

  4. Use the license.dat file from the head node. You can obtain this file from the matlabroot/etc folder, where matlabroot is the MATLAB installation folder.

For best performance, install locally on each node. However, you can also install in a network share location.

Note

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 MATLAB on Multiple Computers Using Silent Installation.

You can test the installation and licensing by running the following command in a command-line interface. matlabroot is the MATLAB installation folder.

matlabroot/toolbox/parallel/bin/checkLicensing

Configure the MATLAB Job Scheduler

The MATLAB Job Scheduler is a scheduler that ships 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 lets you submit jobs to your computation resources, so you do not have to deal 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 mjs Service, MATLAB Job Scheduler, and Workers (Command-Line).

  1. On the head node, start Admin Center. Browse to matlabroot/toolbox/parallel/bin and execute the file named admincenter, where matlabroot is the MATLAB installation folder.

  2. Click Add or Find, and specify the computers that you are using as your head node and compute nodes.

  3. Progress through 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).

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

  5. To add the MATLAB Parallel Server workers, click Start in the Workers section of the Admin Center.

    1. Select the computers to host the workers.

    2. Select the number of workers per computer.

  6. To verify your configuration, review worker status in the Workers section.

  7. To troubleshoot issues, click Test Connectivity in the Host section.

  8. If you are using UNIX, configure the mjs service to start automatically at start time. For instructions, see Start 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.

Tip

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 a final setup in Admin Center:

Screen in Admin Center. The top section list the ComputeNodeHostname and HeadNodeHostname. The middle section lists the MATLAB Job Scheduler job managers. The bottom section lists the name of the workers in the cluster.

Note

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 MATLAB Client to MATLAB Parallel Server Cluster

To use MATLAB Parallel Server, you must use a client computer running MATLAB and Parallel Computing Toolbox. In the MATLAB toolstrip, use Parallel > Discover Clusters and follow the instructions to automatically discover and set up your cluster. Alternatively, you can configure it manually as follows:

  1. In MATLAB, on the Home tab, select the Parallel menu. Select Create and Manage Clusters.

  2. Click Add Cluster Profile > MATLAB Job Scheduler.

  3. To modify the name of the MATLAB Job Scheduler profile, double click the profile name.

  4. To edit the profile, select it and click Edit in the toolbar.

  5. In the Host field, enter the host name of the head node.

  6. Click Done. The following image shows a MATLAB Job Scheduler cluster profile after configuration:

    Cluster Profile Manager shows the MJS cluster myMJS and its properties

  7. To make this profile the default, select Set as Default.

  8. Validate the cluster profile.

If validation of your cluster is successful, your MATLAB session can now submit jobs to the MATLAB Parallel Server cluster.

Note

If your validation does not pass, contact the bat365 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.

To configure 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.

Related Topics