How do I validate my MATLAB cluster when I do not have access to a GUI?
30 views (last 30 days)
Show older comments
MathWorks Support Team
on 9 Apr 2014
Edited: MathWorks Support Team
on 4 Jul 2025
The machine I need to run cluster validation from does not have access to the MATLAB GUI. How do I manually validate my MATLAB cluster?
Accepted Answer
MathWorks Support Team
on 4 Jul 2025
Edited: MathWorks Support Team
on 4 Jul 2025
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:
If you have access to a GUI in your client MATLAB please follow these steps instead to generate more detailed output: How do I validate my parallel cluster profile in MATLAB?
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:
cluster = parcluster('name_of_profile');
job = createJob (cluster);
createTask(job, @sum, 1, {[1 1]});
submit(job);
wait(job);
out = fetchOutputs(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)
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)
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('name_of_profile', 2)
0 Comments
More Answers (0)
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!