Access job properties and behaviors
createCommunicatingJob
, createJob
, findJob
, recreate
getCurrentJob
(in the
workspace of the MATLAB worker)
Parent | parallel.Cluster |
Children | parallel.Task |
A parallel.Job object provides access to a job, which you create, define, and submit for execution.
The following table describes the available types of job objects. The job type is determined by the type of cluster, and whether the tasks must communicate with each other during execution.
Job Type | Description |
---|---|
parallel.job.MJSIndependentJob | Job of independent tasks on MJS cluster |
parallel.job.MJSCommunicatingJob | Job of communicating tasks on MJS cluster |
parallel.job.CJSIndependentJob | Job of independent tasks on CJS cluster |
parallel.job.CJSCommunicatingJob | Job of communicating tasks on CJS cluster |
All job type objects have the same methods, described in the following table.
cancel | Cancel job or task |
createTask | Create new task in job |
delete | Remove job or task object from cluster and memory |
diary | Display or save Command Window text of batch job |
fetchOutputs (job) | Retrieve output arguments from all tasks in job |
findTask | Task objects belonging to job object |
listAutoAttachedFiles | List of files automatically attached to job, task, or parallel pool |
load | Load workspace variables from batch job |
recreate | Create new job from existing job |
submit | Queue job in scheduler |
wait | Wait for job to change state |
The following properties are common to all job object types.
Property | Description |
---|---|
AdditionalPaths | Folders to add to MATLAB search path of workers |
AttachedFiles | Files and folders that are sent to workers |
AutoAddClientPath | Specifies whether user-added-entries on the client’s path are automatically added to each worker’s path |
AutoAttachFiles | Specifies if dependent code files are automatically sent to workers |
CreateDateTime | Date and time when the job is created |
EnvironmentVariables | Names of environment variables that are sent to the workers |
FinishDateTime | Date and time when the job finishes running |
ID | Job’s numeric identifier |
JobData | Information made available to all workers for job’s tasks |
Name | Name of job |
Parent | Cluster object containing this job |
StartDateTime | Date and time when the job starts running |
State | State of job: 'pending' , 'queued' , 'running' , 'finished' ,
or 'failed' |
SubmitDateTime | Date and time when the job is submitted to the queue |
Tag | Label associated with job |
Tasks | Array of task objects contained in job |
Type | Job type: 'independent' , 'pool' ,
or 'spmd' |
UserData | Information associated with job object |
Username | Name of user who owns job |
MJS independent job objects and MJS communicating job objects have the following properties in addition to the common properties:
Property | Description |
---|---|
AuthorizedUsers | Users authorized to access job |
FinishedFcn | Callback function executed on client when this job finishes |
NumWorkersRange | Minimum and maximum limits for number of workers to run job |
QueuedFcn | Callback function executed on client when this job is submitted to queue |
RestartWorker | True if workers are restarted before evaluating first task for this job |
RunningFcn | Callback function executed on client when this job starts running |
Timeout | Time limit, in seconds, to complete job |
CJS independent job objects do not have any properties beyond the properties common to all job types.
CJS communicating job objects have the following properties in addition to the common properties:
Property | Description |
---|---|
NumWorkersRange | Minimum and maximum limits for number of workers to run job |
To get further help on a particular type of parallel.Job object,
including a list of links to help for its properties, type help
parallel.job.<job-type>
. For example:
help parallel.job.MJSIndependentJob