validate
Description
validate( validates the cluster
specified by the cluster object myCluster)myCluster. You can use the
validate function to validate a cluster object after you modify a
cluster object property.
The validate function prints the validation stages performed and
an indication of whether each stage passed, failed, or was skipped.
If a validation stage fails, the function saves a validation report to the temporary folder.
validate(___, specifies
additional cluster validation options using one or more name-value arguments.Name=Value)
Examples
Create a cluster object for a remote cluster with the profile name
myMJSCluster, using the parcluster
function.
c = parcluster(myMJSCluster);
Validate the cluster object, c. The
validate function prints the validation stages performed and
an indication of whether each stage passed, failed, or was skipped.
validate(c)
Beginning cluster validation. Cluster connection test (parcluster) Stage started at 15:52:05. Using existing cluster object. ✓ Network latency: 6 ms ✓ Upload speed: 22915 KB/s ✓ Download speed: 43480 KB/s For more information on these results, see the "Troubleshooting Slow Network Connection" documentation page. Finished at 15:52:11. ......................................................PASSED Job test (createJob) Stage started at 15:52:11. Finished at 15:52:21. ......................................................PASSED SPMD job test (createCommunicatingJob) Stage started at 15:52:21. Job ran with 1 worker. Finished at 15:52:26. ......................................................PASSED Pool job test (createCommunicatingJob) Stage started at 15:52:26. Job ran with 1 worker. Finished at 15:52:45. ......................................................PASSED Parallel pool test (parpool) Stage started at 15:52:45. Connected to parallel pool with 12 workers. Parallel pool is shutting down. Parallel pool ran with 12 worker. Finished at 15:52:53. ......................................................PASSED Finished cluster validation with status: PASSED
Create a cluster object using the default cluster profile.
c = parcluster;
Validate the cluster object, c using 5 workers. Run only the
"job", "spmd-job", and
"pool-job" stages. Save the validation results to a report file
with the name "validation.txt".
validate(c,NumWorkersToUse=5, ... StagesToRun=["job","spmd-job","pool-job"],ReportFile="validation.txt")
Beginning cluster validation Cluster connection test (parcluster) Stage started at 14:46:04. Using existing cluster object. Finished at 14:46:06. ..........................................................................PASSED Job test (createJob) Stage started at 14:46:06. Finished at 14:46:52. ..........................................................................PASSED SPMD job test (createCommunicatingJob) Stage started at 14:46:55. Job ran with 5 workers. Finished at 14:47:57. ..........................................................................PASSED Pool job test (createCommunicatingJob) Stage started at 14:48:01. Job ran with 5 workers. Finished at 14:49:11. ..........................................................................PASSED Finished validation with status: PASSED Validation report written to validation.txt
Input Arguments
Cluster, specified as a parallel.Cluster object that represents
cluster compute resources. To create the parallel.Cluster object, use
the parcluster function.
Example: cluster = parcluster; validate(cluster);
Data Types: parallel.Cluster
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN, where Name is
the argument name and Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: NumWorkersToUse=4
Number of workers to use in validation, specified as a nonnegative integer. Use
this argument to validate the cluster object with fewer workers than those specified
in the cluster object's PreferredPoolNumWorkers or
NumWorkers property.
Example: NumWorkersToUse=4
Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
Validation stages to run, specified as a string array or cell array of character vectors with one or more of these stage values:
"parcluster"—Cluster connection test (parcluster)stage."job"—Job test (createJob)stage."spmd-job"—SPMD job test (createCommunicatingJob)stage."pool-job"—Pool job test (createCommunicatingJob)stage."parpool"—Parallel pool test (parpool)stage."spark"—Spark job test (tall)stage."tall"—Tall evaluation test (tall gather)stage.
Some stages are only available for certain parallel environment or
cluster types. You cannot specify this argument if you specify the StagesToSkip argument. To learn more about each stage, see List of Validation Stages.
Example: StagesToRun=["job","parpool"]
Data Types: char | string | cell
Validation stages to skip, specified as a string array or cell array of character vectors with one or more of these stage values:
"parcluster"—Cluster connection test (parcluster)stage."job"—Job test (createJob)stage."spmd-job"—SPMD job test (createCommunicatingJob)stage."pool-job"—Pool job test (createCommunicatingJob)stage."parpool"—Parallel pool test (parpool)stage."spark"—Spark job test (tall)stage."tall"—Tall evaluation test (tall gather)stage.
Some stages are only available for certain parallel environment or
cluster types. You cannot specify this argument if you specify the StagesToRun argument. To learn more about each stage, see List of Validation Stages.
Example: StagesToSkip=["job","spmd-job"]
Data Types: char | string | cell
Filename to save validation report, specified as a character vector or string.
If you do not set the ReportFile argument and validation is
successful, validate does not create a report. If you do not
set the ReportFile argument and validation fails,
validate automatically creates a validation report and saves
it in the temporary folder.
Example: ReportFile="validation.txt"
Data Types: char | string
Algorithms
The validate function performs these validation stages.
| Validation Stage | Description |
|---|---|
| For remote cluster objects, tests cluster connections and displays cluster latency. |
| Tests independent job creation using the |
| Tests creation of a batch job with an SPMD enabled parallel pool using
the |
| Tests creation of a batch job with a parallel pool using the
|
| Tests creation of an interactive parallel pool using the
|
| Tests creation of a job on a Spark™ cluster. |
| Tests evaluation of a tall array on a Spark cluster using the |
Version History
Introduced in R2026a
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)