parallel.importProfile - Import cluster profiles from file - MATLAB (original) (raw)
Main Content
Import cluster profiles from file
Syntax
Description
[profile](#mw%5F9761d61d-06ae-4a1d-9f27-2a7b37cfc95e) = parallel.importProfile([filename](#mw%5F7f6c2a97-bab2-416b-92e1-50aee4320def))
imports the profiles stored in the specified file, filename
, and returns the names of the imported profiles. If filename
has no extension, the function assumes .mlsettings
is the file extension. You must specify the file extension for configuration files with the .mat
extension.
Configuration MAT files contain only one profile, but profile MLSETTINGS files can contain one or more profiles. If the file contains only one profile, thenprofile
is a character vector that reflects the name of the profile. If the file contains multiple profiles, then profile
is a cell array of character vectors. If a profile with the same name as an imported profile already exists, the function adds an extension 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. To set a default profile, use the parallel.defaultProfile function.
During the import, parallel.importProfile
upgrades profiles that you exported in a previous release. 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 the ProfileMain.mlsettings
file and set it as the default cluster profile.
profile_main = parallel.importProfile('ProfileMain'); parallel.defaultProfile(profile_main)
Import all the profiles from the ManyProfiles.mlsettings
file, and use the first one to open a parallel pool.
profs = parallel.importProfile('ManyProfiles'); parpool(profs{1})
Import a configuration from the OldConfiguration.mat
file, and set it as the default parallel profile.
old_conf = parallel.importProfile('OldConfiguration.mat') parallel.defaultProfile(old_conf)
Input Arguments
File name of profile to import, specified as a string array or character vector.
Data Types: char
| string
Output Arguments
Name of the imported profile, returned as a character vector or a cell array of character vectors.
Version History
Introduced in R2012a