parallel.Cluster

Access cluster properties and behaviors

Constructors

parcluster

getCurrentCluster (in the workspace of the MATLAB worker)

Container Hierarchy

Parent

None

Children

parallel.Job, parallel.Pool

Description

A parallel.Cluster object provides access to a cluster, which controls the job queue, and distributes tasks to workers for execution.

Types

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 TypeDescription
parallel.cluster.MJSInteract with MATLAB job scheduler (MJS) cluster on-premises
parallel.cluster.CloudInteract with MATLAB Parallel Cloud cluster
parallel.cluster.MJSComputeCloudInteract with MATLAB Distributed Computing Serverfor Amazon EC2 cluster
parallel.cluster.LocalInteract with CJS cluster running locally on client machine
parallel.cluster.HPCServerInteract with CJS cluster running Windows Microsoft HPC Server
parallel.cluster.LSFInteract with CJS cluster running Platform LSF
parallel.cluster.PBSProInteract with CJS cluster running Altair PBS Pro
parallel.cluster.TorqueInteract with CJS cluster running TORQUE
parallel.cluster.GenericInteract with CJS cluster using the generic interface

Methods

Common to All Cluster Types

batchRun MATLAB script or function on worker
createCommunicatingJobCreate communicating job on cluster
createJobCreate independent job on cluster
findJobFind job objects stored in cluster
isequalTrue if clusters have same property values
parpoolCreate parallel pool on cluster
saveAsProfileSave cluster properties to specified profile
saveProfileSave modified cluster properties to its current profile

MJS

changePasswordPrompt user to change MJS password
demoteDemote job in cluster queue
logoutLog out of MJS cluster
pausePause MATLAB job scheduler queue
promotePromote job in MJS cluster queue
resumeResume processing queue in MATLAB job scheduler

Cloud

shutdown Shut down cloud cluster
wait (cluster)Wait for cloud cluster to change state

MJSComputeCloud

shutdown Shut down cloud cluster
startStart cloud cluster
wait (cluster)Wait for cloud cluster to change state

HPC Server, PBS Pro, LSF, TORQUE, and Local Clusters

getDebugLogRead output messages from job run in CJS cluster

Generic

getDebugLogRead output messages from job run in CJS cluster
getJobClusterDataGet specific user data for job on generic cluster
getJobFolderFolder on client where jobs are stored
getJobFolderOnClusterFolder on cluster where jobs are stored
getLogLocationLog location for job or task
setJobClusterDataSet specific user data for job on generic cluster

Properties

Common to All Cluster Types

The following properties are common to all cluster object types.

PropertyDescription
ClusterMatlabRootSpecifies path to MATLAB for workers to use
HostHost name of the cluster head node
JobStorageLocationLocation where cluster stores job and task information
JobsList of jobs contained in this cluster
LicenseNumberLicense number to use when running jobs with this cluster
ModifiedTrue if any properties in this cluster have been modified
NumThreadsNumber of computational threads for workers
NumWorkersNumber of workers available for this cluster
OperatingSystemOperating system of nodes used by cluster
ProfileProfile used to build this cluster
RequiresMathWorksHostedLicensingTrue if the cluster is using the MathWorks Hosted License Manager
TypeType of this cluster
UserDataInformation associated with cluster object within client session

MJS

MJS cluster objects have the following properties in addition to the common properties:

PropertyDescription
AllHostAddressesIP addresses of the cluster host
BusyWorkersWorkers currently running tasks
IdleWorkersWorkers currently available for running tasks
HasSecureCommunicationTrue if cluster is using secure communication
NameName of this cluster
NumBusyWorkersNumber of workers currently running tasks
NumIdleWorkersNumber of workers available for running tasks
PromptForPasswordTrue if system should prompt for password when authenticating user
SecurityLevelDegree of security applied to cluster and its jobs. For descriptions of security levels, see Set MJS Cluster Security (MATLAB Distributed Computing Server).
StateCurrent state of cluster
UsernameUser accessing cluster

Cloud

Cloud cluster objects, parallel.cluster.Cloud, have the following properties in addition to the common properties:

PropertyDescription
BusyWorkersWorkers currently running tasks
CertificateCluster SSL certificate
HasSecureCommunicationTrue if cluster is using secure communication
IdentifierUnique cluster identifier
IdleWorkersWorkers currently available for running tasks
MatlabVersionVersion of MATLAB running on the workers
MaxNumMachinesMaximum number of machines this cluster can use.

When more workers are required, machines are automatically added to the cluster up to this maximum value.

NameName of this cluster
NumBusyMachinesNumber of machines that currently have at least one busy worker
NumBusyWorkersNumber of workers currently running tasks
NumIdleMachinesNumber of machines that currently have no workers running a task
NumIdleWorkersNumber of workers available for running tasks
NumMachinesNumber of machines currently in this cluster
NumWorkersPerMachineNumber of workers per machine in this cluster
ShutdownAtShutdown time or event
StateCurrent state of cluster
UsernameUser accessing cluster

MJSComputeCloud

MJSComputeCloud cluster objects have the following properties in addition to the common properties:

PropertyDescription
BusyWorkersWorkers currently running tasks
CertificateCluster SSL certificate
HasSecureCommunicationTrue if cluster is using secure communication
IdentifierUnique cluster identifier
IdleWorkersWorkers currently available for running tasks
MatlabVersionVersion of MATLAB running on the workers
NameName of this cluster
NumBusyWorkersNumber of workers currently running tasks
NumIdleWorkersNumber of workers available for running tasks
ShutdownAtShutdown time or event
StateCurrent state of cluster
UsernameUser accessing cluster

Local

Local cluster objects have no editable properties beyond the properties common to all clusters.

HPC Server

HPC Server cluster objects have the following properties in addition to the common properties:

PropertyDescription
ClusterVersionVersion of Microsoft Windows HPC Server running on the cluster
HasSharedFilesystemSpecify whether client and cluster nodes share JobStorageLocation
JobDescriptionFileName of XML job description file to use when creating jobs
JobTemplateName of job template to use for jobs submitted to HPC Server
NameName of this cluster
UseSOAJobSubmissionAllow service-oriented architecture (SOA) submission on HPC Server

PBS Pro and TORQUE

PBS Pro and TORQUE cluster objects have the following properties in addition to the common properties:

PropertyDescription
CommunicatingJobWrapperScript that cluster runs to start workers
RcpCommandCommand to copy files to and from client
ResourceTemplateDefine resources to request for communicating jobs
RshCommandRemote execution command used on worker nodes during communicating job
HasSharedFilesystemSpecify whether client and cluster nodes share JobStorageLocation
SubmitArgumentsSpecify additional arguments to use when submitting jobs

LSF

LSF cluster objects have the following properties in addition to the common properties:

PropertyDescription
ClusterNameName of Platform LSF cluster
CommunicatingJobWrapperScript cluster runs to start workers
HasSharedFilesystemSpecify whether client and cluster nodes share JobStorageLocation
SubmitArgumentsSpecify additional arguments to use when submitting jobs

Generic

If you create a generic cluster object from an R2017a or later profile, you have the following properties in addition to the common properties:

PropertyDescription
AdditionalPropertiesAdditional properties for integration scripts
HasSharedFilesystemSpecify whether client and cluster nodes share JobStorageLocation
IntegrationScriptsLocationFolder 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:

PropertyDescription
CancelJobFcnFunction to run when cancelling job
CancelTaskFcnFunction to run when cancelling task
CommunicatingSubmitFcnFunction to run when submitting communicating job
DeleteJobFcn Function to run when deleting job
DeleteTaskFcnFunction to run when deleting task
GetJobStateFcnFunction to run when querying job state
HasSharedFilesystemSpecify whether client and cluster nodes share JobStorageLocation
IndependentSubmitFcnFunction to run when submitting independent job

Help

For further help on cluster objects, including links to help for specific cluster types and object properties, type:

help parallel.Cluster

Introduced in R2012a

Was this topic helpful?