addAttachedFiles - Attach files or folders to parallel pool - MATLAB (original) (raw)
Main Content
Attach files or folders to parallel pool
Syntax
Description
addAttachedFiles([pool](#btye4yc-1-poolobj),[filenames](#btye4yc-1-files))
attaches files or folders to a parallel pool. The files or folders are immediately transferred to each worker in the parallel pool.
If you specify files that are already attached to the pool, the files are not updated. To update attached files, use updateAttachedFiles.
Examples
Attach Files to Current Parallel Pool
You can use addAttachedFiles
and gcp to add files to the current parallel pool.
Use addAttachedFiles
to attach two files"myFun1.m"
and "myFun2.m"
to the current parallel pool. To get the current parallel pool, use gcp
.
addAttachedFiles(gcp,["myFun1.m" "myFun2.m"])
Input Arguments
pool
— Parallel pool
parallel.Pool
Parallel pool to attach files to, specified as a parallel.Pool object.
To create a parallel pool, use parpool.
filenames
— Files or folders to attach
string scalar | string array | character vector | cell array
Files or folders to attach, specified as a string scalar, string array, character vector, or cell array of character vectors. Each character vector can specify either an absolute or relative path to a file or folder.
If you specify a relative path, the path is relative to the current working directory on the client.
Example: ["myFun1.m" "myFun2.m"]
Data Types: string
| char
| cell
Version History
Introduced in R2013b