Products & Services Solutions Academia Support User Community Company

Learn more about Parallel Computing Toolbox   

FileDependencies - Directories and files that worker can access

Description

FileDependencies contains a list of directories and files that the worker will need to access for evaluating a job's tasks.

The value of the property is defined by the client session. You set the value for the property as a cell array of strings. Each string is an absolute or relative pathname to a directory or file. The toolbox makes a zip file of all the files and directories referenced in the property, and stores it on the job manager machine. (Note: If the files or directories change while they are being zipped, this can result in a failure or error.)

The first time a worker evaluates a task for a particular job, the job manager passes to the worker the zip file of the files and directories in the FileDependencies property. On the worker, the file is unzipped, and a directory structure is created that is exactly the same as that accessed on the client machine where the property was set. Those entries listed in the property value are added to the top of the path in the MATLAB worker session. (The subdirectories of the entries are not added to the path, even though they are included in the directory structure.)

When the worker runs subsequent tasks for the same job, it uses the directory structure already set up by the job's FileDependencies property for the first task it ran for that job.

When you specify FileDependencies at the time of creating a job, the settings are combined with those specified in the applicable configuration, if any. (Setting FileDependencies on a job object after it is created does not combine the new setting with the configuration settings, but overwrites existing settings for that job.)

Characteristics

Usage

Job object

Read-only

After job is submitted

Data type

Cell array of strings

Values

The value of FileDependencies is empty by default. If a pathname that does not exist is specified for the property value, an error is generated.

Remarks

The is a default limitation on the size of data transfers via the FileDependencies property. For more information on this limit, see Object Data Size Limitations. For alternative means of making data available to workers, see Sharing Code.

Examples

Make available to a job's workers the contents of the directories fd1 and fd2, and the file fdfile1.m.

set(job1,'FileDependencies',{'fd1' 'fd2' 'fdfile1.m'})
get(job1,'FileDependencies')
ans = 
    'fd1'
    'fd2'
    'fdfile1.m'

See Also

Functions

getFileDependencyDir, jobStartup, taskFinish, taskStartup

Properties

PathDependencies

  


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