Can I submit to a MATLAB Parallel Server cluster that is running a different version than my MATLAB and Parallel Computing Toolbox setup?

6 views (last 30 days)
I have a MATLAB Parallel Server cluster that is either newer or older than the version of MATLAB I have installed on my client machine. Can I still utilize this MATLAB version to submit jobs to my MATLAB Parallel Server setup?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 10 Dec 2025 at 0:00
Edited: MathWorks Support Team on 10 Dec 2025 at 19:56
Third Party Scheduler clusters
The release of MATLAB Parallel Server you have installed on your cluster must match the release of MATLAB you are using to submit the jobs. Your cluster can have multiple releases of MATLAB Parallel Server installed depending on the versions the users need.
When submitting a job to the cluster ensure that the cluster profile property
ClusterMatlabRoot is set to the correct installation directory for the version of MATLAB Parallel Server you need on the cluster. e.g if we are trying to submit a job from an R2022b version of MATLAB we will need
ClusterMatlabRoot = /path/to/R2022b/matlab/on/cluster
MATLAB Job Scheduler clusters
For R2015b and earlier, in order to submit a job to the cluster, the versions of MATLAB on the client machine and MATLAB Parallel Server on the cluster must match.
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:
  1. Install the latest version of MATLAB Parallel Server on your cluster. You must use this version to run MATLAB Job Scheduler on your cluster.
  2. 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.
  3. 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.

More Answers (0)

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!