How do I validate my MATLAB cluster when I do not have access to a GUI?

31 次查看(过去 30 天)
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?

采纳的回答

MathWorks Support Team
编辑:MathWorks Support Team 2025-7-4
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:

 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)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

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

Start Hunting!

Translated by