User Guide


Control Collection with an MPI_Pcontrol Function

By default,
Intel® Advisor
analyzes performance of a whole application. In some cases, you may want to focus on the most time-consuming section or disable collection for the initialization or finalization phases. This can decrease collection overhead.
Intel Advisor
supports the MPI region control with the
function. This function allows you to enable and disable collection for specific application regions in the source code. The region control affects only MPI and OpenMP* metrics, while other metrics are collected for the entire application.
To use the function, add it to your application source code as follows:
  • To pause data collection, add
    the code region that you want to disable the collection for.
  • To resume data collection, add
    where you want the collection to start again.
  • To skip the initialization phase:
    1. Add the
      function right after initialization.
    2. Build the application.
    3. Run Intel Advisor analyses with the option. For example, to run the Survey analysis:
      advisor --collect=survey --start-paused --project-dir=./advi_results -- ./mpi_sample
Intel Advisor
accepts only 0 and 1 arguments for the
function. You can use other numbers to mark code regions, but
Intel Advisor
ignores them.
For code snippet examples, see Region Control with MPI_Pcontrol.

Product and Performance Information


Performance varies by use, configuration and other factors. Learn more at