Cluster validation will run a number of test jobs to check MATLAB Parallel Server infrastructure is working. This might be beneficial to run after making changes to cluster configuration or to troubleshoot issues on the cluster. These steps do not need to be run in normal use of the cluster.
R2025a and later:
Cluster profile validation has a programmatic interface that will run the same equivalent steps as the GUI workflow. To run this on a cluster or local profile with name "name_of_profile" please execute: >> parallel.validateProfile("name_of_profile")
Further documentation on this function is available here. R2024b and earlier:
Only use these steps if you do not have access to a GUI in your client MATLAB.
The following commands work whether you are validating a local profile or a MATLAB Parallel Server profile. Please make sure you are validating the correct profile before proceeding and that you replace "name_of_profile" with the name of the profile you want to manually validate.
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:
Independent (Batch) Job
cluster = parcluster('name_of_profile');
job = createJob (cluster);
createTask(job, @sum, 1, {[1 1]});
submit(job);
wait(job);
out = fetchOutputs(job)
SPMD Job (Communicating Batch Job)
NumWorkers = 2; % change this value to test a larger or smaller number of workers
cluster = parcluster('name_of_profile');
job = createCommunicatingJob(cluster, 'Type', 'spmd');
job.NumWorkersRange = NumWorkers;
createTask(job, @labindex, 1, {});
submit(job);
wait(job);
out = fetchOutputs(job)
Pool Job (Communicating Batch Job)
NumWorkers = 2; % change this value to test a larger or smaller number of workers
cluster = parcluster('name_of_profile');
job = createCommunicatingJob(cluster, 'Type', 'pool');
job.NumWorkersRange = NumWorkers;
createTask(job, @rand, 1, {1});
submit(job);
wait(job);
out = fetchOutputs(job)
Parpool (Interactive Communicating Job)
NumWorkers = 2; % change this value to test a larger or smaller number of workers
parpool('name_of_profile', NumWorkers)
If you are using MATLAB R2013a or older to run a MATLAB interactive job, use the "matlabpool" command:
Matlabpool (Interactive Communicating Job)matlabpool('name_of_profile', 2)