Products & Services Solutions Academia Support User Community Company

Learn more about Parallel Computing Toolbox   

JobData - Data made available to all workers for job's tasks

Description

The JobData property holds data that eventually gets stored in the local memory of the worker machines, so that it does not have to be passed to the worker for each task in a job that the worker evaluates. Passing the data only once per job to each worker is more efficient than passing data with each task.

Note, that to access the data contained in a job's JobData property, the worker session evaluating the task needs to have access to the job, which it gets from a call to the function getCurrentJob, as discussed in the example below.

Characteristics

Usage

Job object

Read-only

After job is submitted

Data type

Any type

Values

JobData is an empty vector by default.

Examples

Create job1 and set its JobData property value to the contents of array1.

job1 = createJob(jm)
set(job1, 'JobData', array1)
createTask(job1, @myfunction, 1, {task_data})

Now the contents of array1 will be available to all the tasks in the job. Because the job itself must be accessible to the tasks, myfunction must include a call to the function getCurrentJob. That is, the task function myfunction needs to call getCurrentJob to get the job object through which it can get the JobData property.

See Also

Functions

createJob, createTask

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS