From MATLAB R2016a onwards, you can upgrade your MATLAB Job Scheduler-based clusters to a more recent Release of MATLAB Parallel Server but continue to use older versions of Parallel Computing Toolbox to submit jobs to it as long as those older versions are still installed on the cluster.To take advantage of this backward compatibility feature:
- Install the latest version of MATLAB Parallel Server on your cluster. You must use this version to run MATLAB Job Scheduler on your cluster.
- Install MATLAB Parallel Server for each release that you want to support with the cluster. For example, to use Parallel Computing Toolbox R2016a and R2016b with your cluster, install both the R2016a and R2016b releases of MATLAB Parallel Server on all nodes.
- Configure MATLAB Job Scheduler with the location of these installations. In the mjs_def configuration file, specify the location of each installation of MATLAB Parallel Server in the MJS_ADDITIONAL_MATLABROOTS variable. You can find this file in matlabroot/toolbox/parallel/bin for Linux (mjs_def.sh) and Windows (mjs_def.bat).
If you have multiple older releases of Parallel Server installed, the MJS_ADDITIONAL_MATLABROOTS variable can be set as follows
set MJS_ADDITIONAL_MATLABROOTS=C:\Program Files\MATLAB\R2018b;C:\Program Files\MATLAB\R2021a
Before testing the ability to submit jobs from a MATLAB client using the older release, it is necessary to stop and restart MJS using the -cleanPreserveJobs flag. For example, on a Windows head node, you could open a Command Prompt and enter:
cd "C:\Program Files\MATLAB\R2023a\toolbox\parallel\bin"
mjs stop
mjs start -cleanPreserveJobs
The "-cleanPreserveJobs" flag forces MJS to implement any changes that were made to the mjs_def.bat file. With this configuration, the MATLAB Job Scheduler allows MATLAB clients from the installed releases to submit jobs to the cluster. The MATLAB Job Scheduler dynamically starts the right version of the MATLAB worker to run the job.