Main Content

MATLAB worker initialization for builds

Options for how to initialize MATLAB workers for parallel builds

Model Configuration Pane: Model Referencing

Description

The MATLAB worker initialization for builds configuration parameter determines how to initialize MATLAB® workers for parallel builds. Parallel building requires Parallel Computing Toolbox™.

Set Configuration Parameter for Referenced Model

In a model reference hierarchy, how you open the Configuration Parameters dialog box determines whether you edit the configuration parameter for the top model in the current model hierarchy or the current referenced model.

  • Top model in the current model hierarchy — In the Simulink® Toolstrip, on the Modeling tab, click Model Settings.

  • Current referenced model — In the Simulink Toolstrip, on the Modeling tab, click the Model Settings button arrow. Then, in the Referenced Model section, select Model Settings.

Alternatively, open the referenced model as a top model. Then, in the Simulink Toolstrip, on the Modeling tab, click Model Settings.

Dependencies

To enable this parameter, select Enable parallel model reference builds.

Settings

None (default) | Copy base workspace | Load top model
None

The software takes no action. Specify this value if the referenced models in the model reference hierarchy do not rely on anything in the base workspace beyond what they explicitly set up, for example, with a model load function.

Copy base workspace

The software attempts to copy the base workspace to each MATLAB worker. Specify this value if you use a setup script to prepare the base workspace for all models to use.

Load top model

The software loads the top model on each MATLAB worker. Specify this value if the top model in the model reference hierarchy handles all of the base workspace setup, for example, with a model load function.

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Programmatic Use

Parameter: ParallelModelReferenceMATLABWorkerInit
Value: 'None' | 'Copy Base Workspace' | 'Load Top Model'
Default: 'None'

Limitation

For values other than None, limitations apply to global variables in the base workspace. Global variables are not propagated across parallel workers and do not reflect changes made by top and referenced model scripts.

Version History

Introduced in R2010a