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.

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.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

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
ModifiedTrue if any properties in this cluster have been modified
NumWorkersNumber of workers available for this cluster
OperatingSystemOperating system of nodes used by cluster
ProfileProfile used to build this cluster
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.
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
JobDescriptionFileName of XML job description file to use when creating jobs
JobTemplateName of job template to use for jobs submitted to HPC Server
HasSharedFilesystemSpecify whether client and cluster nodes share JobStorageLocation
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

Generic cluster objects 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
DeleteJobFcnFunction to run when deleting job
DeleteTaskFcnFunction to run when deleting task
GetJobStateFcnFunction to run when querying job state
IndependentSubmitFcnFunction to run when submitting independent job
HasSharedFilesystemSpecify whether client and cluster nodes share JobStorageLocation

Help

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

help parallel.Cluster
Was this topic helpful?