Attach files or folders to parallel pool


  • addAttachedFiles(poolobj,files) example



addAttachedFiles(poolobj,files) adds extra attached files to the specified parallel pool. These files are transferred to each worker and are treated exactly the same as if they had been set at the time the pool was opened — specified by the parallel profile or the 'AttachedFiles' argument of the parpool function.


collapse all

Add Attached Files to Current Parallel Pool

Add two attached files to the current parallel pool.

poolobj = gcp;

Input Arguments

collapse all

poolobj — Pool to which files attachpool object

Pool to which files attach, specified as a pool object.

Example: poolobj = gcp;

files — Files or folders to attachstring | cell array

Files or folders to attach, specified as a string or cell array of strings. Each string can specify either an absolute or relative path to a file or folder.

Example: {'myFun1.m','myFun2.m'}

Was this topic helpful?