User Guide

  • 2022.2
  • 08/08/2022
  • Public Content

Recording Source Location Information

Intel® Trace Collector can automatically record locations of function calls in the source code. To record this information, do the following:
  1. Compile the relevant application modules with support for debug information by using the
    (Linux* OS) and
    (Windows* OS) compiler flags. For example:
    $ mpiicc -g -c ctest.c
  2. Enable Program Counter (PC) tracing by setting the environment variable
    for example:
    $ export VT_PCTRACE=5
    Alternatively, set the
    variable to the configuration file specifying the following, for example:
    # trace 4 call levels whenever MPI is used ACTIVITY MPI 4 # trace one call level in all functions not specified # explicitly; can also be, for example, PCTRACE 5 PCTRACE ON
    $ export VT_CONFIG=<config_file>
  3. Trace your application as described in Tracing MPI Applications.
sets the number of call levels for all functions. To avoid performance issues,
is disabled by default and should be handled carefully. It is useful to get the initial understanding of the application before recording the source location information.
Manual instrumentation of the source code with the Intel Trace Collector API can provide similar information but without performance overhead. See Defining and Recording Source Locations for details.
Pay attention that the compiler has to use normal stack frames. This is the default in GCC, but may be disabled with
. If the flag is used, then only the direct caller of MPI or API functions can be found, and asking Intel Trace Collector to unwind more than one stack level may lead to crashes.
The Intel compilers do not use normal stack frames by default if optimization is enabled, but they can be enabled with

Product and Performance Information


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