Intel® Advisor User Guide

ID 766448
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Collection Controls to Minimize Analysis Overhead

Issue

Running your target application with the Intel® Advisor can take substantially longer than running your target application without the Intel Advisor. Depending on an accuracy level and analyses you choose for a perspective, different overhead is added to your application execution time. For example:

Runtime Overhead / Analysis

Survey

Characterization

Dependencies

MAP

Target application runtime with Intel® Advisor compared to runtime without Intel® Advisor

1.1x longer

2 - 55x longer

5 - 100x longer

5 - 20x longer

Solutions

Use the following techniques to skip uninteresting parts of your target application, such as the initialization phase, and analyze only interesting parts.

Pause Collection/Resume Collection Using Annotations

Minimize collection overhead.

Applicable analyses: Survey, Dependencies.

Some analysis types recognize the structural annotations typically used in the Threading perspective workflow.

Use when:

  • Modifying/recompiling your target application is not an issue.

  • You do not want to analyze one or more uninteresting parts of your target application.

  • The interesting parts of your target application involve large workloads (because Pause/Resume API call frequency is about 1 Hz, and the operations pause and resume data collection in all processes in the analysis run, with the corresponding collection state notification to the GUI).

To pause collection, add the following annotation to your code:

  • C++: ANNOTATE_DISABLE_COLLECTION_PUSH

  • Fortran: call annotate_disable_collection_push()

  • C#: Annotate.DisableCollectionPush();

To resume collection, add the following annotation to your code:

  • C++: ANNOTATE_DISABLE_COLLECTION_POP

  • Fortran: call annotate_disable_collection_pop()

  • C#: Annotate.DisableCollectionPop();

NOTE:
C# and .NET support is deprecated starting Intel® Advisor 2021.1.

See Pause Collection and Resume Collection Annotations for more information.

Pause Collection/Resume Collection Using API Methods

Minimize collection overhead using the Intel® Instrumentation and Tracing Technology (ITT) API.

TIP:
For MPI applications, you can also use a standard MPI-specific function MPI_Pcontrol(<N>) to pause and resume data collection. This function requires no changes in the application building process, unlike the ITT API calls, which require linking of a static ITT API library. See Control Collection with an MPI_Pcontrol Function.

Applicable analyses: Survey, Characterization with Trip Counts or FLOP collection enabled.

Use when:

  • Modifying/recompiling your target application is not an issue.

  • You do not want to analyze one or more uninteresting parts of your target application.

  • The interesting parts of your target application involve large workloads (because Pause/Resume API call frequency is about 1 Hz, and the operations pause and resume data collection in all processes in the analysis run, with the corresponding collection state notification to the GUI).

Prerequisites:

  • Add the following statements to every source file you want to instrument:

    • C/C++: ittnotify.h

    • Fortran: USE ITTNOTIFY

    NOTE:
    • The ittnotify header file contains definitions of ITT API routines and important macros that provide the correct logic of API invocation from an application.

    • The ITT API is designed to incur almost zero overhead when tracing is disabled. If you need completely zero overhead, you can compile out all ITT API calls from an application by defining the INTEL_NO_ITTNOTIFY_API macro in your project at compile time, either on the compiler command line or in your source file prior to including the ittnotify header file.

  • Configure your build system to reach ITT API header file and libraries, where <install-dir> is the Intel Advisor installation directory.

    • Add the appropriate entry to your INCLUDE path:

      • C++: <install-dir>/sdk/include

      • Fortran: