File for user-defined options to run on each worker when parallel pool starts
You add MATLAB code to the poolStartup.m file to define pool initialization on the worker. The worker looks for poolStartup.m in the following order, executing the one it finds first:
Included in the job's AttachedFiles property.
In a folder included in the job's AdditionalPaths property.
In the worker's MATLAB® installation at the location
To create a version of poolStartup.m for AttachedFiles or AdditionalPaths, copy the provided file and modify it as required. .
poolStartup is the ideal location for startup code required for parallel execution on the parallel pool. For example, you might want to include code for using mpiSettings. Because jobStartup and taskStartup execute before poolStartup, they are not suited to pool-specific code. In other words, you should use taskStartup for setup code on your worker regardless of whether the task is from an independent job, communicating job, or using a parallel pool; while poolStartup is for setup code for pool usage only.
For further details on poolStartup and its implementation, see the text in the installed poolStartup.m file.