Import cluster profiles from file
prof = parallel.importProfile(filename)
prof = parallel.importProfile(filename)
imports
the profiles stored in the specified file and returns the names of
the imported profiles. If filename
has no extension, .settings
is
assumed; configuration files must be specified with the .mat
extension.
Configuration .mat
files contain only one profile,
but profile .settings
files can contain one or
more profiles. If only one profile is defined in the file, then prof
is
a string reflecting the name of the profile; if multiple profiles
are defined in the file, then prof
is a cell array
of strings. If a profile with the same name as an imported profile
already exists, an extension is added to the name of the imported
profile.
You can use the imported profile with any functions that support
profiles. parallel.importProfile
does not set
any of the imported profiles as the default; you can set the default
profile by using the parallel.defaultClusterProfile
function.
Profiles that were exported in a previous release are upgraded during import. Configurations are automatically converted to cluster profiles.
Imported profiles are saved as a part of your MATLAB settings, so these profiles are available in subsequent MATLAB sessions without importing again.
Import a profile from file ProfileMaster.settings
and
set it as the default cluster profile.
profile_master = parallel.importProfile('ProfileMaster');
parallel.defaultClusterProfile(profile_master)
Import all the profiles from the file ManyProfiles.settings
,
and use the first one to open a parallel pool.
profs = parallel.importProfile('ManyProfiles');
parpool(profs{1})
Import a configuration from the file OldConfiguration.mat
,
and set it as the default parallel profile.
old_conf = parallel.importProfile('OldConfiguration.mat')
parallel.defaultClusterProfile(old_conf)