pctRunOnAll
Run command on client and on all workers in parallel pool
Syntax
Description
pctRunOnAll
runs the specified command
on all the workers in the parallel pool and on the client. The function also prints any
command-line output in the client Command Window. The specified command runs in the
workspace of the workers and does not return any variables. Use this function to perform any
setup changes on all the workers in the parallel pool and the client.command
Note
If you use pctRunOnAll
to run commands that modify the
MATLAB® search path in a mixed-platform environment, the commands can generate a
warning on the client while executing properly on the workers. For example, if your
workers are all running on a Linux® operating system and your client is running on a Microsoft®
Windows® operating system, an addpath
command with Linux-compatible paths warns on the Windows-based client.
Examples
Input Arguments
Limitations
pctRunOnAll
does not support thread-based pools, such as those you create by callingparpool("Threads")
andbackgroundPool
.
Alternative Functionality
Alternatively, to modify the MATLAB search path in a mixed-platform environment, use the parfevalOnAll
function to run commands on only the workers.
Version History
Introduced in R2008a