Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

parallel.Job

Access job properties and behaviors

Constructors

createCommunicatingJob, createJob, findJob, recreate

getCurrentJob (in the workspace of the MATLAB worker)

Container Hierarchy

Parent

parallel.Cluster

Children

parallel.Task

Description

A parallel.Job object provides access to a job, which you create, define, and submit for execution.

Types

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 TypeDescription
parallel.job.MJSIndependentJobJob of independent tasks on MJS cluster
parallel.job.MJSCommunicatingJobJob of communicating tasks on MJS cluster
parallel.job.CJSIndependentJobJob of independent tasks on CJS cluster
parallel.job.CJSCommunicatingJobJob of communicating tasks on CJS cluster

Methods

All job type objects have the same methods, described in the following table.

cancelCancel job or task
createTaskCreate new task in job
deleteRemove job or task object from cluster and memory
diaryDisplay or save Command Window text of batch job
fetchOutputs (job)Retrieve output arguments from all tasks in job
findTaskTask objects belonging to job object
listAutoAttachedFilesList of files automatically attached to job, task, or parallel pool
loadLoad workspace variables from batch job
recreateCreate new job from existing job
submitQueue job in scheduler
waitWait for job to change state

Properties

Common to All Job Types

The following properties are common to all job object types.

PropertyDescription
AdditionalPathsFolders to add to MATLAB search path of workers
AttachedFilesFiles and folders that are sent to workers
AutoAttachFilesSpecifies if dependent code files are automatically sent to workers
CreateDateTimeDate and time when the job is created
FinishDateTimeDate and time when the job finishes running
IDJob's numeric identifier
JobDataInformation made available to all workers for job's tasks
NameName of job
ParentCluster object containing this job
StartDateTimeDate and time when the job starts running
StateState of job: 'pending', 'queued', 'running', 'finished', or 'failed'
SubmitDateTimeDate and time when the job is submitted to the queue
TagLabel associated with job
TasksArray of task objects contained in job
TypeJob type: 'independent', 'pool', or 'spmd'
UserDataInformation associated with job object
UsernameName of user who owns job

MJS Jobs

MJS independent job objects and MJS communicating job objects have the following properties in addition to the common properties:

PropertyDescription
AuthorizedUsersUsers authorized to access job
FinishedFcnCallback function executed on client when this job finishes
NumWorkersRangeMinimum and maximum limits for number of workers to run job
QueuedFcnCallback function executed on client when this job is submitted to queue
RestartWorkerTrue if workers are restarted before evaluating first task for this job
RunningFcnCallback function executed on client when this job starts running
TimeoutTime limit, in seconds, to complete job

CJS Jobs

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:

PropertyDescription
NumWorkersRangeMinimum and maximum limits for number of workers to run job

Help

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
Was this topic helpful?