This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Run Tests Using Parallel Execution

If you have a license to Parallel Computing Toolbox™, then you can execute tests in parallel using a parallel pool (parpool). Running tests in parallel can speed up execution and decrease the amount of time it takes to get test results.

When Do Tests Benefit from Using Parallel Execution?

In general, parallel execution can help reduce test execution time if you have

  • A complex Simulink® model that takes a long time to simulate.

  • Numerous long-running tests, such as iterations.

Use Parallel Execution

To run a test file using parallel execution:

  1. The Test Manager uses the default Parallel Computing Toolbox cluster. For information about where to specify or change the cluster, see Discover Clusters and Use Cluster Profiles (Parallel Computing Toolbox). Test Manager runs in parallel only on the local machine.

  2. On the Test Manager toolstrip, click the Parallel button.

  3. Run a test file. The test file executes using parallel pool.

  4. To turn off parallel execution, click the Parallel button to toggle it off.

Starting a parallel pool can take time, which would slow down test execution. To reduce time:

  • Make sure that the parallel pool is already running before you run a test. By default, the parallel pool shuts down after being idle for a specified number of minutes. To change the setting, see Specify Your Parallel Preferences (Parallel Computing Toolbox).

  • Load Simulink on all the parallel pool workers.

See Also

Related Topics