Main Content


List available cluster profiles

Since R2022b



    allProfiles = parallel.listProfiles returns a cell array containing the names of all the available profiles.

    [allProfiles, defaultProfile] = parallel.listProfiles also returns the name of the default profile as a character vector.

    The allProfile output always contains a profile called 'Processes' for the local cluster, and always contains the default profile. If you delete or have not set the default profile, parallel.listProfiles returns 'Processes' as the default profile.

    You can create and change profiles by using the saveProfile or saveAsProfile functions on a cluster object. You can create, delete, and change profiles by using the Cluster Profile Manager. To access the Cluster Profile manager, in the Environment area of the MATLAB® desktop Home tab, click Parallel and then click Create and Manage Clusters.


    collapse all

    Display the names of all the available profiles and set the first in the list as the default.

    allProfiles = parallel.listProfiles
    oldProfile = parallel.defaultProfile(allProfiles{1});

    This example shows how to display the names of all the available profiles and find the properties of the last profile.

    Display the names of all the available profiles.

    allNames = parallel.listProfiles
    allNames =
     1×4 cell array
        {'MyCluster'}    {'Processes'}    {'Threads'}    {'WebCluster'}

    Get the properties of the cluster identified by the last profile name in the list.

    lastCluster = parcluster(allNames{end})
    lastCluster = 
     MJS Cluster
                          Name: WebCluster
                       Profile: WebCluster
                      Modified: false
                      Username: user1
                    NumWorkers: 200
                    NumThreads: 1
                NumBusyWorkers: 72
                NumIdleWorkers: 128
            JobStorageLocation: Database on
             ClusterMatlabRoot: /data/MATLAB/R2022b
             SupportedReleases: R2022a
               OperatingSystem: unix
                 SecurityLevel: 3 
        HasSecureCommunication: true
     RequiresClientCertificate: true
       RequiresOnlineLicensing: true
        Associated Jobs: 
                Number Pending: 10
                 Number Queued: 0
                Number Running: 12
               Number Finished: 123

    Version History

    Introduced in R2022b