User Guide

Contents

Pause/Resume Collection Using API Methods

This is applicable only to Survey, Trip Counts, and FLOP analyses.
To minimize collection overhead, you can pause/resume collection using the corresponding
__itt_pause
and
__itt_resume
methods of the instrumentation and tracing technology (ITT) API. This is particularly useful when:
  • 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.
  • Modifying/recompiling your target application is not an issue.
To attach ITT APIs to a launched application, that is, to collect API data on an application that is already launched, be sure to point the target application to the
ittnotify_collector
library using an environment variable:
  • Windows* OS:
    set INTEL_LIBITTNOTIFY32=<install_dir>\bin32\runtime\ittnotify_collector.dll
    set INTEL_LIBITTNOTIFY64=<install_dir>\bin64\runtime\ittnotify_collector.dll
  • Linux* OS:
    export INTEL_LIBITTNOTIFY32=<install_dir>/lib32/runtime/libittnotify_collector.so
    export INTEL_LIBITTNOTIFY64=<install_dir>/lib64/runtime/libittnotify_collector.so
Use the full path to the library without quotations marks.
To use pause/resume collection controls when analyzing your application:
  1. Add the following statements to every source file you want to instrument to enable the ITT API:
    • C/C++:
      #include <ittnotify.h>
    • Fortran*:
      USE ITTNOTIFY
  2. Insert
    __itt_pause
    (C/C++) or
    CALL ITT_PAUSE
    (Fortran) before uninteresting parts of your target application and the
    __itt_resume
    (C/C++) or
    CALL ITT_RESUME
    (Fortran) before interesting parts of your target application.
    For example, the following snippet starts collection in paused mode and skips initialization, collects data in the middle, then pauses collections and skips finalization:
    #include <ittnotify.h> int main(int argc, char* argv[]) { __itt_pause(); // Do uninteresting work here __itt_resume(); // Do work here __it_pause(); //Do uninteresting work here return 0; }
  3. Run the desired analysis using the CLI action
    --collect=<analysis>
    with the
    --start-paused
    option to enable the
    __itt_pause
    and
    __itt_resume
    methods in your code. For example, for the Survey analysis:
    advixe-cl --collect=survey --project-dir=./myAdvisorProj --start-paused -- ./bin/myTargetApplication
For the details about using ITT API methods to pause/resume collection, refer to
You can find the open source version of ITT API source code in the official Intel® ITT repository at https://github.com/intel/ittapi.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804