Documentation

Integrate MATLAB Job Scheduler for 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: Integrate MATLAB with Third-Party Schedulers.

After you integrate MATLAB with a scheduler, you can access workers in your cluster from a desktop MATLAB client session with Parallel Computing Toolbox™.

The setup in these steps uses online licensing.

Set Up License and Users

Set License Type

To install MATLAB Parallel Server using online licensing, you must verify your license type.

  1. In your browser, go to License Center and log in with your MathWorks® Administrator Account.

  2. In your MathWorks Account, click on the MATLAB Parallel Server license that you plan to use

  3. On the Install and Activate tab, look for License Manager: followed by the license manager type currently assigned to this license.

    • If the license manager is already the one you want, then you do not need to do anything. Go to Add Licensed End Users.

    • To change the license manager, click the pencil icon and follow the onscreen instructions. When you have finished, go to Add Licensed End Users.

Add Licensed End Users

For online licensing to know which users have permission to check out a license, you have to define a list of allowed users for that license. Follow these steps to control which users can access worker licenses.

  1. If you are not already logged in as an administrator, go to License Center and log in with your MathWorks Administrator Account.

  2. Click your MATLAB Parallel Server license, and then click Manage Users. Any users already associated with this license appear in the list.

  3. Click Add User to add a user to the list.

  4. Fill in the requested information. Provide the user’s email address, first and last names, and their 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.

  5. Add as many end users as necessary. When you have finished adding users, go to Get the Installation Files.

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 Installation (Installation, Licensing, and Activation). 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 two server-side components of MATLAB Parallel Server:

  1. The MATLAB Job Scheduler, which runs on the head node and manages jobs on your cluster. For more information, see Install Software on All Nodes.

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

Install Software on All Nodes

For each computer in the cluster:

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

  2. Select Log in with a MathWorks Account and continue through the prompts.

  3. Select all products, and exclude the license manager.

  4. After the installation completes, update the mjs_def file in matlabroot/toolbox/distcomp/bin. Uncomment and set:

    • Unix: USE_ONLINE_LICENSING="true"

    • Windows: USE_ONLINE_LICENSING=true

For best performance, install locally on each node. However, you can also install in a network share location. For your convenience, you can perform a noninteractive installation (silent installation) on the worker nodes. For instructions, see Install Noninteractively (Silent Installation) (Installation, Licensing, and Activation).

Configure the MATLAB Job Scheduler with Admin Center

The MATLAB Job Scheduler is a scheduler that ships with MATLAB Parallel Server. The MATLAB Job Scheduler is intended primarily for small-to-medium-sized 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.

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

  2. Click Add or Find, and specify the computers that you are using as your head node and worker 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 the mjs Service, MATLAB Job Scheduler, and Workers (Command-Line).

The following screenshot shows a final setup in Admin Center:

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 the MATLAB Client to the 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.

    • After the MATLAB Job Scheduler profile has been created, click Edit.

    • Update the hostname of the head node.

    • Update the License number.

    • Click Done, and select Set as Default (optional) .

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 MathWorks install support team.

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