ClusterPool

Parallel pool of workers on a cluster of machines

Description

Use parpool to create a parallel pool of workers on a cluster of machines. After you create the pool, parallel pool features, such as parfor or parfeval, run on the workers. With the ClusterPool object, you can interact with the parallel pool.

Creation

Create a parallel pool on a cluster of machines by using the parpool function.

pool = parpool("myCluster")
where myCluster is the name of a cluster profile for a cluster of machines.

Properties

expand all

Files and folders copied to workers, specified as a cell array of character vectors. To attach files and folders to the pool, use addAttachedFiles.

This property is read-only.

Indication whether user-added entries on client path are added to worker paths, specified as a logical value.

Data Types: logical

This property is read-only.

Cluster on which the parallel pool is running, specified as a parallel.Cluster object.

This property is read-only.

Flag that indicates whether the parallel pool is running, specified as a logical value.

Data Types: logical

This property is read-only.

Environment variables copied to the workers, specified as a cell array of character vectors.

This property is read-only.

Queue of FevalFutures to run on the parallel pool, specified as an FevalQueue object. You can use this property to check the pending and running future variables of the parallel pool. To create future variables, use parfeval and parfevalOnAll. For more information on future variables, see Future.

Data Types: FevalQueue

Time in minutes after which the pool shuts down if idle, specified as an integer greater than zero. A pool is idle if it is not running code on the workers. By default 'IdleTimeout' is the same as the value in your parallel preferences. For more information on parallel preferences, see Specify Your Parallel Preferences.

This property is read-only.

Number of workers comprising the parallel pool, specified as an integer.

This property is read-only.

Indication if pool can run spmd code, specified as a logical value.

Data Types: logical

Object Functions

addAttachedFilesAttach files or folders to parallel pool
deleteShut down parallel pool
listAutoAttachedFilesList of files automatically attached to job, task, or parallel pool
parfevalExecute function asynchronously on parallel pool worker
parfevalOnAllExecute function asynchronously on all workers in parallel pool
ticBytesStart counting bytes transferred within parallel pool
tocBytesRead how many bytes have been transferred since calling ticBytes
updateAttachedFilesUpdate attached files or folders on parallel pool

Introduced in R2020a