List of files automatically attached to job, task, or parallel pool
a dependency analysis on all the task functions, or on the batch job
script or function. Then it displays a list of the code files that
are already or going to be automatically attached to the job or task
obj is a parallel pool, the output lists
the files that have already been attached to the parallel pool following
an earlier dependency analysis. The dependency analysis runs if a
errors due to an undefined function. At that point any files, functions,
or scripts needed by the
are attached if possible.
Employ a cluster profile to automatically attach
code files to a job. Set the
for a job in the cluster's profile. If this property value
is true, then all jobs you create on that cluster with this profile
will have the necessary code files automatically attached. This example
assumes that the cluster profile
Create batch job, applying your cluster.
obj = batch(myScript,'profile','myAutoCluster');
Verify attached files by viewing list.
Programmatically set a job to automatically attach code files, and then view a list of those files for one of the tasks in the job.
c = parcluster(); % Use default profile j = createJob(c); j.AutoAttachFiles = true; obj = createTask(j,myFun,OutNum,ArgCell); listAutoAttachedFiles(obj) % View attached list
The files returned in the output listing are those that analysis
has determined to be required for the workers to evaluate the function
and which automatically attach to the job.
obj— Job, task, or pool to which files automatically attachjob object | task object | parallel pool object
Job, task, or pool to which code files are automatically attached,
specified as a parallel.Job, parallel.Task, or parallel.Pool object. The
of the job object must be
true; if the input is
a task object, then this applies to its parent job object.
obj = createJob(cluster);
obj = gcp