Main Content

Reduce Update Time for Referenced Models by Using Parallel Builds

For models with large model reference hierarchies, you can increase the speed of diagram updates by building in parallel referenced models that are configured to run in accelerator mode. With Parallel Computing Toolbox™ software, you can distribute the code generation and compilation for referenced models across a parallel pool of MATLAB® workers. If you also have MATLAB Parallel Server™ software, you can distribute the code generation and compilation across remote workers in your MATLAB Parallel Server configuration.

To configure parallel building of referenced models:

  1. Open the Configuration Parameters dialog box for the top model of the model hierarchy.

  2. Select the Enable parallel model reference builds check box.

  3. For each MATLAB worker, you can set up a MATLAB environment that is consistent with the MATLAB environment of the client. From the MATLAB worker initialization for builds drop-down list, select one of these values:

    • None –– Simulink® does not initialize workers.

    • Copy base workspace –– Simulink attempts to copy the base workspace to each MATLAB worker.

    • Load top model –– Simulink loads the top model onto each MATLAB worker.

If the Parallel Computing Toolbox parallel preference Automatically create a parallel pool (if one doesn't already exist) when parallel keywords (e.g., parfor) are executed is selected, a parallel pool of MATLAB workers is automatically started. For more information, see Specify Your Parallel Preferences (Parallel Computing Toolbox).

If a parallel pool is not running when you update your model, MATLAB automatically opens a parallel pool of workers by using the default cluster profile. To change the default behaviour of the worker cluster, you can modify properties of the cluster profile. If you have not touched your parallel preferences, the default profile is local. Control parallel behavior with the parallel preferences, including scaling up to a cluster, automatic pool creation, and preferred number of workers. For more information, see Discover Clusters and Use Cluster Profiles (Parallel Computing Toolbox).

For more general information about parallel computing, see Run MATLAB Functions with Automatic Parallel Support (Parallel Computing Toolbox).

Related Topics