parallel.defaultProfile - Examine or set default cluster profile - MATLAB (original) (raw)
Main Content
Examine or set default cluster profile
Since R2022b
Syntax
Description
p = parallel.defaultProfile
returns the name of the default cluster profile.
oldProfile = parallel.defaultProfile(newProfile)
sets the default profile to newProfile
and returns the previous default profile.
If you delete or have not set the default profile,parallel.defaultProfile
returns 'Processes'
as the previous default profile.
You can save modified profiles by using the saveProfile or saveAsProfile functions on a cluster object. You can create, delete, import, and modify profiles with the Cluster Profile Manager. To access the Cluster Profile manager, in the area of the MATLABĀ® desktop tab, click and then click .
Examples
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});
Set the profile named 'MyProfile'
as the default.
parallel.defaultProfile('MyProfile');
Set the profile named 'Profile2'
as the new default. To backup the old profile name, store the old profile name in a variable with the name'oldDefault'
.
oldDefault = parallel.defaultProfile('Profile2'); strcmp(oldDefault,'MyProfile')
Tips
- If you set a new default profile, you can keep the old profile in your MATLAB workspace in case you need to reset the default profile.
Version History
Introduced in R2022b