Access cluster properties and behaviors
Parent | None |
Children | parallel.Job, parallel.Pool |
A parallel.Cluster object provides access to a cluster, which controls the job queue, and distributes tasks to workers for execution.
The two categories of clusters are the MATLAB job scheduler (MJS) and common job scheduler (CJS). The MJS is available in the MATLAB Distributed Computer Server. The CJS clusters encompass all other types, including the local, generic, and third-party schedulers.
Use Cloud
objects to interact with MATLAB®
Parallel Cloud™ clusters.
Use MJSComputeCloud
objects to interact with MATLAB
Distributed Computing Server™for Amazon
EC2® clusters.
The following table describes the available types of cluster objects.
Cluster Type | Description |
---|---|
parallel.cluster.MJS | Interact with MATLAB job scheduler (MJS) cluster on-premises |
parallel.cluster.Cloud | Interact with MATLAB Parallel Cloud cluster |
parallel.cluster.MJSComputeCloud | Interact with MATLAB Distributed Computing Serverfor Amazon EC2 cluster |
parallel.cluster.Local | Interact with CJS cluster running locally on client machine |
parallel.cluster.HPCServer | Interact with CJS cluster running Windows Microsoft HPC Server |
parallel.cluster.LSF | Interact with CJS cluster running Platform LSF |
parallel.cluster.PBSPro | Interact with CJS cluster running Altair PBS Pro |
parallel.cluster.Torque | Interact with CJS cluster running TORQUE |
parallel.cluster.Generic | Interact with CJS cluster using the generic interface |
batch | Run MATLAB script or function on worker |
createCommunicatingJob | Create communicating job on cluster |
createJob | Create independent job on cluster |
findJob | Find job objects stored in cluster |
isequal | True if clusters have same property values |
parpool | Create parallel pool on cluster |
saveAsProfile | Save cluster properties to specified profile |
saveProfile | Save modified cluster properties to its current profile |
changePassword | Prompt user to change MJS password |
demote | Demote job in cluster queue |
logout | Log out of MJS cluster |
pause | Pause MATLAB job scheduler queue |
promote | Promote job in MJS cluster queue |
resume | Resume processing queue in MATLAB job scheduler |
shutdown | Shut down cloud cluster |
wait (cluster) | Wait for cloud cluster to change state |
shutdown | Shut down cloud cluster |
start | Start cloud cluster |
wait (cluster) | Wait for cloud cluster to change state |
getDebugLog | Read output messages from job run in CJS cluster |
getDebugLog | Read output messages from job run in CJS cluster |
getJobClusterData | Get specific user data for job on generic cluster |
getJobFolder | Folder on client where jobs are stored |
getJobFolderOnCluster | Folder on cluster where jobs are stored |
getLogLocation | Log location for job or task |
setJobClusterData | Set specific user data for job on generic cluster |
The following properties are common to all cluster object types.
Property | Description |
---|---|
ClusterMatlabRoot | Specifies path to MATLAB for workers to use |
Host | Host name of the cluster head node |
JobStorageLocation | Location where cluster stores job and task information |
Jobs | List of jobs contained in this cluster |
LicenseNumber | License number to use when running jobs with this cluster |
Modified | True if any properties in this cluster have been modified |
NumThreads | Number of computational threads for workers |
NumWorkers | Number of workers available for this cluster |
OperatingSystem | Operating system of nodes used by cluster |
Profile | Profile used to build this cluster |
RequiresMathWorksHostedLicensing | True if the cluster is using the MathWorks Hosted License Manager |
Type | Type of this cluster |
UserData | Information associated with cluster object within client session |
MJS cluster objects have the following properties in addition to the common properties:
Property | Description |
---|---|
AllHostAddresses | IP addresses of the cluster host |
BusyWorkers | Workers currently running tasks |
IdleWorkers | Workers currently available for running tasks |
HasSecureCommunication | True if cluster is using secure communication |
Name | Name of this cluster |
NumBusyWorkers | Number of workers currently running tasks |
NumIdleWorkers | Number of workers available for running tasks |
PromptForPassword | True if system should prompt for password when authenticating user |
SecurityLevel | Degree of security applied to cluster and its jobs. For descriptions of security levels, see Set MJS Cluster Security (MATLAB Distributed Computing Server). |
State | Current state of cluster |
Username | User accessing cluster |
Cloud cluster objects, parallel.cluster.Cloud
, have the
following properties in addition to the common properties:
Property | Description |
---|---|
BusyWorkers | Workers currently running tasks |
Certificate | Cluster SSL certificate |
HasSecureCommunication | True if cluster is using secure communication |
Identifier | Unique cluster identifier |
IdleWorkers | Workers currently available for running tasks |
MatlabVersion | Version of MATLAB running on the workers |
MaxNumMachines | Maximum number of machines this cluster can use. When more workers are required, machines are automatically added to the cluster up to this maximum value. |
Name | Name of this cluster |
NumBusyMachines | Number of machines that currently have at least one busy worker |
NumBusyWorkers | Number of workers currently running tasks |
NumIdleMachines | Number of machines that currently have no workers running a task |
NumIdleWorkers | Number of workers available for running tasks |
NumMachines | Number of machines currently in this cluster |
NumWorkersPerMachine | Number of workers per machine in this cluster |
ShutdownAt | Shutdown time or event |
State | Current state of cluster |
Username | User accessing cluster |
MJSComputeCloud
cluster objects have the following
properties in addition to the common properties:
Property | Description |
---|---|
BusyWorkers | Workers currently running tasks |
Certificate | Cluster SSL certificate |
HasSecureCommunication | True if cluster is using secure communication |
Identifier | Unique cluster identifier |
IdleWorkers | Workers currently available for running tasks |
MatlabVersion | Version of MATLAB running on the workers |
Name | Name of this cluster |
NumBusyWorkers | Number of workers currently running tasks |
NumIdleWorkers | Number of workers available for running tasks |
ShutdownAt | Shutdown time or event |
State | Current state of cluster |
Username | User accessing cluster |
Local cluster objects have no editable properties beyond the properties common to all clusters.
HPC Server cluster objects have the following properties in addition to the common properties:
Property | Description |
---|---|
ClusterVersion | Version of Microsoft Windows HPC Server running on the cluster |
HasSharedFilesystem | Specify whether client and cluster nodes share JobStorageLocation |
JobDescriptionFile | Name of XML job description file to use when creating jobs |
JobTemplate | Name of job template to use for jobs submitted to HPC Server |
Name | Name of this cluster |
UseSOAJobSubmission | Allow service-oriented architecture (SOA) submission on HPC Server |
PBS Pro and TORQUE cluster objects have the following properties in addition to the common properties:
Property | Description |
---|---|
CommunicatingJobWrapper | Script that cluster runs to start workers |
RcpCommand | Command to copy files to and from client |
ResourceTemplate | Define resources to request for communicating jobs |
RshCommand | Remote execution command used on worker nodes during communicating job |
HasSharedFilesystem | Specify whether client and cluster nodes share JobStorageLocation |
SubmitArguments | Specify additional arguments to use when submitting jobs |
LSF cluster objects have the following properties in addition to the common properties:
Property | Description |
---|---|
ClusterName | Name of Platform LSF cluster |
CommunicatingJobWrapper | Script cluster runs to start workers |
HasSharedFilesystem | Specify whether client and cluster nodes share JobStorageLocation |
SubmitArguments | Specify additional arguments to use when submitting jobs |
If you create a generic cluster object from an R2017a or later profile, you have the following properties in addition to the common properties:
Property | Description |
---|---|
AdditionalProperties | Additional properties for integration scripts |
HasSharedFilesystem | Specify whether client and cluster nodes share JobStorageLocation |
IntegrationScriptsLocation | Folder containing scheduler integration scripts |
If you create a generic cluster object from an R2016b or earlier profile, you have the following properties in addition to the common properties:
Property | Description |
---|---|
CancelJobFcn | Function to run when cancelling job |
CancelTaskFcn | Function to run when cancelling task |
CommunicatingSubmitFcn | Function to run when submitting communicating job |
DeleteJobFcn
| Function to run when deleting job |
DeleteTaskFcn | Function to run when deleting task |
GetJobStateFcn | Function to run when querying job state |
HasSharedFilesystem | Specify whether client and cluster nodes share JobStorageLocation |
IndependentSubmitFcn | Function to run when submitting independent job |
For further help on cluster objects, including links to help for specific cluster types and object properties, type:
help parallel.Cluster