MATLAB: How to manually validate the MATLAB cluster

MATLAB Parallel ServerParallel Computing Toolbox

How do I manually validate my MATLAB cluster?

Best Answer

When validation fails the feedback that is displayed is often not very descriptive. If you run a manual validation job while in verbose mode you might be able to obtain a more specific error message. Please see the following instructions on how to perform a manual validation. 
NOTE: The following commands work whether you are validating a local profile or an MATLAB Parallel Server profile. Please make sure you are validating the correct profile before proceeding.
In order to place MATLAB in verbose mode run the following command within the MATLAB command Window. 
setSchedulerMessageHandler(@disp)
Then run each of the following jobs:\n
  • Independent Job
cluster = parcluster();
job = createJob (cluster);
createTask(job, @sum, 1, {[1 1]});
submit(job);
wait(job);
out = fetchOutputs(job)
\n \n
  • SPMD Job 
cluster = parcluster();
job = createCommunicatingJob(cluster, 'Type', 'spmd') ;
createTask(job, @labindex, 1, {});
submit(job);
wait(job);
out = fetchOutputs(job)
 
\n
Starting with MATLAB R2013b to run a MATLAB interactive job, use the "parpool" command:
\n
  • Parpool
parpool('name_of_profile', 2)
\n \nIf using MATLAB R2013a or older to run a MATLAB interactive job, use the "matlabpool" command:\n
  • Matlabpool
matlabpool('name_of_profile', 2)
If any of these jobs fail you should be presented with a more descriptive error message. 
NOTE: Starting in R2019a the following name changes occurred:\n
  • MATLAB Distributed Computing Server was renamed to MATLAB Parallel Server 
  • "mdce_def" was renamed to "mjs_def"
  • "mdce" binary was renamed to "mjs"