User`s guide

Programming Tips
6-33
3
Modify your code for division. Decide how you want your code divided. For
an independent job, determine how best to divide it into tasks; for example, each
iteration of a for-loop might define one task. For a communicating job, determine
how best to take advantage of parallel processing; for example, a large array can be
distributed across all your workers.
4
Use pmode to develop parallel functionality. Use pmode with the local
scheduler to develop your functions on several workers in parallel. As you progress
and use pmode on the remote cluster, that might be all you need to complete your
work.
5
Run the independent or communicating job with a local scheduler. Create
an independent or communicating job, and run the job using the local scheduler
with several local workers. This verifies that your code is correctly set up for batch
execution, and in the case of an independent job, that its computations are properly
divided into tasks.
6
Run the independent job on only one cluster node. Run your independent job
with one task to verify that remote distribution is working between your client and
the cluster, and to verify proper transfer of additional files and paths.
7
Run the independent or communicating job on multiple cluster nodes. Scale
up your job to include as many tasks as you need for an independent job, or as many
workers as you need for a communicating job.
Note The client session of MATLAB must be running the Java
®
Virtual Machine (JVM™)
to use Parallel Computing Toolbox software. Do not start MATLAB with the -nojvm flag.
Current Working Directory of a MATLAB Worker
The current directory of a MATLAB worker at the beginning of its session is
CHECKPOINTBASE\HOSTNAME_WORKERNAME_mlworker_log\work
where CHECKPOINTBASE is defined in the mdce_def file, HOSTNAME is the name of the
node on which the worker is running, and WORKERNAME is the name of the MATLAB
worker session.
For example, if the worker named worker22 is running on host nodeA52, and its
CHECKPOINTBASE value is C:\TEMP\MDCE\Checkpoint, the starting current directory
for that worker session is