User`s guide

11 Functions — Alphabetical List
11-240
This slight difference in behavior might be an issue in a mixed-platform environment
where the client is not the same platform as the workers, where folders local to or
mapped from the client are not available in the same way to the workers, or where
folders are in a nonshared file system. For example, if you have a MATLAB client
running on a Microsoft Windows operating system while the MATLAB workers are
all running on Linux operating systems, the same argument to addpath cannot work
on both. In this situation, you can use the function pctRunOnAll to assure that a
command runs on all the workers.
Another difference between client and workers is that any addpath arguments that
are part of the matlabroot folder are not set on the workers. The assumption is that
the MATLAB install base is already included in the workers’ paths. The rules for
addpath regarding workers in the pool are:
Subfolders of the matlabroot folder are not sent to the workers.
Any folders that appear before the first occurrence of a matlabroot folder are
added to the top of the path on the workers.
Any folders that appear after the first occurrence of a matlabroot folder are
added after the matlabroot group of folders on the workers’ paths.
For example, suppose that matlabroot on the client is C:\Applications\matlab
\. With an open parallel pool, execute the following to set the path on the client and
all workers:
addpath('P1',
'P2',
'C:\Applications\matlab\T3',
'C:\Applications\matlab\T4',
'P5',
'C:\Applications\matlab\T6',
'P7',
'P8');
Because T3, T4, and T6 are subfolders of matlabroot, they are not set on the
workers’ paths. So on the workers, the pertinent part of the path resulting from this
command is:
P1
P2
<worker original matlabroot folders...>
P5