parallel.importProfile
Import cluster profiles from file
Syntax
prof = parallel.importProfile(filename)
Description
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, .mlsettings
is
assumed; configuration files must be specified with the .mat
extension. Configuration .mat
files contain only one profile, but
profile .mlsettings
files can contain one or more profiles. If
only one profile is defined in the file, then prof
is a character
vector reflecting the name of the profile; if multiple profiles are defined in the
file, then prof
is a cell array of character vectors. 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.defaultProfile
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.
Examples
Import a profile from file ProfileMain.mlsettings
and set it as
the default cluster profile.
profile_main = parallel.importProfile('ProfileMain');
parallel.defaultProfile(profile_main)
Import all the profiles from the file ManyProfiles.mlsettings
,
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.defaultProfile(old_conf)
Version History
Introduced in R2012a