stop - Stop monitoring parallel pool activity - MATLAB (original) (raw)

Main Content

Stop monitoring parallel pool activity

Since R2025a

Syntax

Description

[monitorResults](#mw%5Fc8fe303c-70ec-41e0-bea6-682befbcb85c) = stop([monitor](#mw%5F13106658-68c4-4880-85f7-62173e27556e)) stops collecting pool activity monitoring data and retrieves all pool activity monitoring results from the ActivityMonitor object, monitor.

example

Examples

collapse all

Create an ActivityMonitor object to start collecting pool monitoring data. With default settings, parallel.pool.ActivityMonitor automatically starts an interactive parallel pool using the default profile if one does not exist.

monitor = parallel.pool.ActivityMonitor;

Starting parallel pool (parpool) using the 'Processes' profile ... Connected to parallel pool with 6 workers.

Submit multiple parfeval computations to compute magic squares. Wait for all tasks to complete.

f(1:100) = parallel.Future; for idx = 1:100 f(idx) = parfeval(@magic,1,idx); end wait(f);

Use the stop function to stop collecting monitoring data and retrieve the monitoring results. Visualize the monitoring results in the Pool Dashboard.

monitoringResults = stop(monitor); parpoolDashboard(monitoringResults)

Input Arguments

collapse all

Pool activity monitor, specified as an ActivityMonitor object.

Example: monitor = parallel.pool.ActivityMonitor

Output Arguments

collapse all

Pool activity monitoring results, returned as an ActivityMonitorResults object. To visualize the pool activity monitoring results in the Pool Dashboard, use theparpoolDashboard function.

Version History

Introduced in R2025a