Getting Started with MATLAB Job Scheduler, Part 2: Download, Install, and Configure MATLAB Parallel Server with MATLAB Job Scheduler - MATLAB
Video length is 7:55

Getting Started with MATLAB Job Scheduler, Part 2: Download, Install, and Configure MATLAB Parallel Server with MATLAB Job Scheduler

From the series: Getting Started with MATLAB Job Scheduler

This is the second video of a five-part series. It will provide an overview of how to download, install, and configure MATLAB Parallel Server™ with MATLAB Job Scheduler.

MATLAB Parallel Server lets you scale MATLAB® programs and Simulink® simulations to clusters and clouds. MATLAB Parallel Server runs your programs and simulations as scheduled applications on your cluster.

You can use the optimized scheduler in MATLAB, MATLAB Job Scheduler, which is provided with MATLAB Parallel Server, or your own scheduler. A plugin framework enables direct communication with popular cluster scheduler submission clients.

Learn more about MATLAB Parallel Server supported schedulers.

Published: 17 Aug 2023

Hello. My name is Rebecca Silva Alves. I am a part of the installation and licensing team here at MathWorks. This is the second video of a five-part series where I am going to provide an overview of MATLAB Parallel Server and how to set up and use MATLAB Job Scheduler and a MathWorks network license manager.

The previous video covered how to download, install, and configure the network license manager. This video will cover how you can download and install MATLAB Parallel Server and configure MATLAB Job Scheduler on a cluster of Windows machines. Let's begin.

To download MATLAB Parallel Server, log in to your MathWorks account. Click on your initials in the top right, and select My Account. You'll be asked to sign in if you are not logged in. Click on the Download button next to the MATLAB Parallel Server License. The download will default to the latest release for which you are eligible and your operating system.

Note that the release of MATLAB the user's machine must match the version of MATLAB Parallel Server on the cluster. You can install multiple releases of MATLAB Parallel Server if necessary. If you are installing on a machine without a UI or an internet connection, you can download the MathWorks ISO on a computer that does have access to the internet and install MATLAB Parallel Server using that.

Launch the installer and wait while it unzips and completes the needed preparation. You may get a user account control pop-up to allow the installer to proceed. The next step is to provide your MathWorks account email and password. Agree to the software license agreement, and select your MATLAB Parallel Server license. Browse to the license.dat file that you obtained from the network license manager.

Specify the destination folder to install MATLAB Parallel Server. If you have a network drive that is accessible by all of your computers in the cluster, you can install MATLAB Parallel Server there instead. If you do not, install MATLAB Parallel Server into the same location on every computer.

When installing MATLAB Parallel Server, you also install all of the MATLAB and Simulink products that may be used on the compute nodes. By default, all products will automatically be selected. Note, a MATLAB Parallel Server license does not give you access to the MATLAB desktop environment. If you want to run MATLAB directly on the cluster, you will need a MATLAB license. Review the information, and click Begin Install. Confirm that the installation is complete, and close the MathWorks product installer.

After installing MATLAB Parallel Server, you are now ready to configure and start the MATLAB Job Scheduler. Open a command prompt session as an administrator, and navigate to the folder where you installed MATLAB Parallel Server. You want to go into the toolbox folder parallel and then bin. You can test that MATLAB Parallel Server was successfully installed and is licensed properly by running checklicensing.bat in the command prompt. If you run into any issues, refer to the parallellicense.log, which will be created in that directory.

In a File Explorer window, navigate to the root MATLAB installation folder, Toolbox, Parallel, and then Bin. You can modify the default options for MATLAB Job Scheduler by modifying the mjs_def.bat file. If, for example, you need to support multiple versions of MATLAB Parallel Server, you can do so by modifying this file. More on this in video number 5.

You can manage hosts and start all the necessary processes and service using the Admin Center UI. If you do not have access to a UI and are unable to run Admin Center, you can start the necessary services, Job Scheduler, and workers by using the utility scripts in the Toolbox, Parallel, Bin directory.

Next, launch Admin Center. The first time you launch Admin Center, you will be prompted to add a host to get started. Click on Add or Find, and enter the machine hostnames or IP addresses that are part of the cluster. If the machines are all on the same operating system and you installed MATLAB Parallel Server into a network location or into the same location on every machine, check the box below to automatically start the MJS service on every computer in the cluster.

If there are any issues, you will see them under the host table. You want to make sure that every machine is reachable and that the MJS service is up and running. If there are any issues, run test connectivity to troubleshoot. We added the hosts that are part of the cluster.

Next, let's start the MATLAB Job Scheduler on the head node. This is the process that manages workload for the cluster. Click Start under the MATLAB Job Scheduler section.

Note that I am running MATLAB Job Scheduler with security level 0. There are four security levels with various features and requirements. You can modify the security level in the mjs_def file. To learn more about MATLAB Job Scheduler security, refer to the MATLAB Parallel Server documentation.

After starting the MATLAB job scheduler on the head node, you are now ready to start workers on the compute nodes where the MJS service is running. Workers are the MATLAB computational engines that do the number crunching. You generally want to start as many workers as you have physical cores on the machine. You can consult the MATLAB Parallel Server system requirements page for more information. Click on Start under the Worker section. Select the machines where you want to start workers, and select how many workers you want to start.

It is not recommended to run workers on the head node machine. After setting up MATLAB Job Scheduler, you can generate and share a cluster profile that users can use to connect to your cluster to run jobs. This is an optional step that you can perform to help users get started. Users may also create the profile on their own in MATLAB.

To create a profile, navigate to the root MATLAB installation folder, Toolbox, Parallel, and then the Bin folder on a cluster machine and run createprofile.bat past the Job Scheduler name an hostname of the machine it is running on. After running the script, a cluster profile will be generated. The next video will discuss what to do with the cluster profile.

That wraps up the process of downloading and installing MATLAB Parallel Server and configuring the MATLAB Job Scheduler. In this video, we downloaded and installed MATLAB Parallel Server, confirmed that MATLAB Parallel Server was correctly installed and licensed, and configured and ran the MATLAB Job Scheduler. In the next video, we will tackle how to set up the MATLAB client to submit jobs to your MATLAB Job Scheduler.