Specify Your Parallel Settings - MATLAB & Simulink (original) (raw)
You can access your parallel settings in one of the following ways:
- On the tab in the section, select >
Before R2025a: Select > - Click the desktop pool indicator icon, and select .
Before R2025a: Click the desktop pool indicator icon and select - In the command window, enter preferences.
In the left pane of the Settings window, selectParallel Computing Toolbox
.
You can control your parallel settings as follows:
- — Choose the profile you want to use. The default profile is . For more information, see Add and Modify Cluster Profiles.
- Before R2023a: — Specify the number of workers in your parallel pool. The actual pool size is limited by licensing, cluster size, and cluster profile settings. For more details, see Factors That Affect Pool Size. For the
Processes
profile, do not choose a preferred number of workers larger than 512. See alsoAdd and Modify Cluster Profiles. Check your access to cloud clusters from the > menu. - — If a parallel pool is not open, some functionality in Parallel Computing Toolbox™ and other products will automatically create a parallel pool, including:
- parfor
- spmd
- distributed
- Composite
- parfeval
- parfevalOnAll
- afterEach
- afterAll
- gcp
- mapreduce
- mapreducer
- parsim (Simulink)
When these functions are used, select to create a pool automatically. If you select this option, you do not need to open a pool manually using the parpool function. To learn more about automatic parallel support, see Run MATLAB Functions with Automatic Parallel Support.
If this option is not selected, a pool is not open, and you use any Parallel Computing Toolbox functionality, your code will run on the client.
- — To shut down a parallel pool automatically if the pool has been idle for the specified amount of time, use the
IdleTimeout
setting. If you use the pool (for example, usingparfor
orparfeval
), the timeout counter is reset. When the timeout is about to expire, a tooltip on the desktop pool indicator warns you and allows you to reset the timer. Note that modifying this setting changes theIdleTimeout
of any already started pool.