User`s guide

Share Code with the Workers
7-17
c = parcluster(); % Use default
job1 = createJob(c);
ap = {'/central/funcs','/dept1/funcs', ...
'\\OurDomain\central\funcs','\\OurDomain\dept1\funcs'};
job1.AdditionalPaths = ap;
By putting the path command in any of the appropriate startup files for the worker:
matlabroot\toolbox\local\startup.m
matlabroot\toolbox\distcomp\user\jobStartup.m
matlabroot\toolbox\distcomp\user\taskStartup.m
Access to these files can be passed to the worker by the job’s AttachedFiles or
AdditionalPaths property. Otherwise, the version of each of these files that is used
is the one highest on the worker’s path.
Access to files among shared resources can depend upon permissions based on the user
name. You can set the user name with which the MJS and worker services of MATLAB
Distributed Computing Server software run by setting the MDCEUSER value in the
mdce_def file before starting the services. For Microsoft Windows operating systems,
there is also MDCEPASS for providing the account password for the specified user. For
an explanation of service default settings and the mdce_def file, see “Define Script
Defaults” in the MATLAB Distributed Computing Server System Administrator's Guide.
Pass Data to and from Worker Sessions
A number of properties on task and job objects are designed for passing code or data from
client to scheduler to worker, and back. This information could include MATLAB code
necessary for task evaluation, or the input data for processing or output data resulting
from task evaluation. The following properties facilitate this communication:
InputArguments — This property of each task contains the input data you specified
when creating the task. This data gets passed into the function when the worker
performs its evaluation.
OutputArguments — This property of each task contains the results of the function’s
evaluation.
JobData — This property of the job object contains data that gets sent to every
worker that evaluates tasks for that job. This property works efficiently because the
data is passed to a worker only once per job, saving time if that worker is evaluating