Save data from communicating job session
Part of filename common to all saved files.
psave(fileroot) saves the data from the
workers’ workspace into the files named
num2str(labindex)]. The files can be loaded by using the
pload command with the same
which should point to a folder accessible to all the workers. If
an extension, the character representation of the
labindex is inserted before the extension.
psave('abc') creates the files
etc., one for each worker.
Create three arrays — one replicated, one variant, and
one codistributed. Then save the data. (This example works in a communicating
job or in pmode, but not in a
clear all; rep = speye(numlabs); var = magic(labindex); D = eye(numlabs,codistributor()); psave('threeThings');
This creates three files (
in the current working folder.
Clear the workspace on all the workers and confirm there are no variables.
clear all whos
Load the previously saved data into the workers. Confirm its presence.
pload('threeThings'); whos isreplicated(rep) iscodistributed(D)