parcluster - Create cluster object - MATLAB (original) (raw)
Main Content
Syntax
Description
`c` = parcluster
returns a cluster object representing the cluster identified by the default cluster profile, with the cluster object properties set to the values defined in that profile. Use a cluster object in functions such as parpool or batch.
`c` = parcluster([profile](#mw%5F8b4d6b4c-faa6-4790-98f9-ea3ca9a9b8f1))
returns a cluster object representing the cluster identified by the specified cluster profile, with the cluster object properties set to the values defined in that profile.
Examples
Create Cluster Object from Default Profile
This examples shows different ways of creating a cluster object from the default profile.
Find the cluster identified by the default parallel computing cluster profile, with the cluster object properties set to the values defined in that profile.
View the name of the default profile and find the cluster identified by it. Open a parallel pool on the cluster.
defaultProfile = parallel.defaultProfile myCluster = parcluster(defaultProfile); parpool(myCluster);
Create Cluster Object from Cluster Profile
Find a particular cluster using the profile named 'MyProfile'
, and create an independent job on the cluster.
myCluster = parcluster('MyProfile'); j = createJob(myCluster);
Input Arguments
profile
— Cluster profile
string scalar | character vector
Cluster profile, specified as a string scalar or character vector.
You can save modified profiles with the saveProfile or saveAsProfile method on a cluster object. You can create, delete, import, and modify profiles with the Cluster Profile Manager, accessible from the MATLAB desktop tab area by selecting > . For more information, see Discover Clusters and Use Cluster Profiles.
Example: parcluster('MyCluster')
Data Types: char
| string
Version History
Introduced in R2012a