Use Multiple MATLAB Parallel Server Releases in Cluster - MATLAB & Simulink (original) (raw)
Main Content
MATLAB® Job Scheduler allows you to use multiple releases of MATLAB workers within a cluster. With this feature, when you upgrade the MATLAB Parallel Server™ release of your MATLAB Job Scheduler cluster, cluster users can continue to use earlier releases of Parallel Computing Toolbox™ on their MATLAB desktop client to connect to the cluster. MATLAB Job Scheduler dynamically starts the right version of the MATLAB worker to run the job.
MATLAB Job Scheduler fully supports running MATLAB releases from the past seven years (14 releases). For earlier releases back to R2016a, support is limited, and you might experience errors and unexpected behavior.
This illustration shows how MATLAB Job Scheduler dynamically handles job submissions from different releases of Parallel Computing Toolbox on the MATLAB client.
Configure Cluster to Support Multiple MATLAB Releases
To set up your MATLAB Job Scheduler cluster to support multiple releases of MATLAB Parallel Server, follow these steps:
- If you have an existing MATLAB Job Scheduler running on your cluster, you must stop the
mjs
services before starting the services of the new installation. For instructions, see Stop mjs Services of Old Installation. - Install the latest version of MATLAB Parallel Server on each node in your cluster. You must use this release to run MATLAB Job Scheduler on your cluster. For instructions, see Install for MATLAB Job Scheduler with Network License Manager.
- Install MATLAB Parallel Server for each release that you want to support in the cluster. For example, to support R2024a and R2024b MATLAB workers in your cluster, install both the R2024a and R2024b releases ofMATLAB Parallel Server on each cluster node.
- Locate the
mjs_def
file for the latest release of MATLAB Parallel Server installed on your cluster. You can find this file in_`matlabroot`_/toolbox/parallel/bin
for Linux® (mjs_def.sh
) and Windows® (mjs_def.bat
). To learn more about the parameters in themjs_def
file, see Define MATLAB Job Scheduler Startup Parameters. - Configure MATLAB Job Scheduler to support previous releases. In the
mjs_def
file, specify the location of each installation of each MATLAB Parallel Server you want to support in theMJS_ADDITIONAL_MATLABROOTS
parameter.
You must list the path to the MATLAB Parallel Server installation without quotes. Multiple entries are allowed, separated by semi-colons. For example, this specifies the installation location of the R2024a and R2024b releases of MATLAB Parallel Server on a Windows node.
MJS_ADDITIONAL_MATLABROOTS=C:\Program Files\MATLAB\R2024a;C:\Program Files\MATLAB\R2024b - Start the
mjs
service, job manager and workers on your cluster nodes. For instructions on how to use the graphical interface, see Configure the MATLAB Job Scheduler. To use the graphical interface, Admin Center, you must run it on a computer that has direct network connectivity to all the nodes of your cluster. If you cannot run Admin Center on such a computer, you must use the command-line interface. For instructions on how to use the command-line interface, see Configure MATLAB Job Scheduler Using Command-Line Scripts.
With this configuration, MATLAB Job Scheduler allows MATLAB clients from the installed releases to submit jobs to the cluster.