User Guide

  • 2022.2
  • 08/08/2022
  • Public Content

Tracing Conventional MPI Applications

Before tracing your applications with Intel® Trace Collector make sure to complete the prerequisites steps.

Tracing MPI Applications in Python*

To create a trace file for an MPI application written in Python*, use the
option with
argument. For example:
$ mpiexec.hydra -trace "" -n 2 python
To change the trace name, see the
variable or refer to the example below:
$ export VT_LOGFILE_NAME=helloworld.stf $ export VT_LOGFILE_FORMAT=SINGLESTF

Tracing without rebuilding on Linux*

The common way to trace an MPI application is to dynamically load the Intel® Trace Collector profiling library during execution. The profiling library then intercepts all MPI calls and generates a trace file. The easiest way to do this is to use the
option of the
command. For example:
$ mpirun -trace -n 4 ./myApp
If you use your own launch scripts, you can use the
environment variable to point to the appropriate profiling library (see Product Components). For example, for regular tracing:
$ export $ mpirun -n 4 ./myApp

Relinking with profiling library on Linux*

In some cases you may need to rebuild your application to trace it – for example, if it is statically linked with the Intel MPI Library. In this case, use the
compiler option to link the libraries required for tracing. To generate a trace file, run the application as usual. For example:
$ mpiicc -trace myApp.c -o myApp $ mpirun -n 4 ./myApp
If you wish to specify the profiling library, use the
option instead of
. For the list of available libraries, see Product Components. For example, for the fail-safe tracing library:
$ mpiicc -profile=vtfs myApp.c -o myApp
options link the selected Intel Trace Collector library statically. To link it dynamically, use the additional
For more details on the options used, see the
Intel® MPI Library

Tracing on Windows* OS

To trace an application on Windows* OS, you need to recompile your application and link it with the Intel® Trace Collector profiling library. The
compiler option helps you do this job.
Do the following:
  1. Rebuild your application with the
    compiler option. For example:
    > mpiicc -trace myApp.c
  2. Run the application as usual:
    > mpiexec -n 4 myApp.exe
After running your application, a trace file with the
extension is created. Open this trace file in Intel Trace Analyzer to analyze the application behavior.

Product and Performance Information


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