Tracing Applications

Intel® MPI Library provides a variety of options for analyzing MPI applications. Some of these options are available within the Intel MPI Library, while some require additional analysis tools. For such tools, Intel MPI Library provides compilation and runtime options and environment variables for easier interoperability.

Intel® MPI Library provides tight integration with the Intel® Trace Analyzer and Collector, which enables you to analyze MPI applications and find errors in them. Intel® MPI Library has several compile- and runtime options to simplify the application analysis. Apart from the Intel Trace Analyzer and Collector, there is also a tool called Application Performance Snapshot intended for a higher level MPI analysis.

Both of the tools are available as part of the Intel® Parallel Studio XE Cluster Edition. Before proceeding to the next steps, make sure you have these product installed.

High-Level Performance Analysis

For a high-level application analysis, Intel provides a lightweight analysis tool Application Performance Snapshot (APS), which can analyze MPI and non-MPI applications. The tool provides general information about the application, such as MPI and OpenMP* utilization time and load balance, MPI operations usage, memory and disk usage, and other information. This information enables you to get a general idea about the application performance and identify spots for a more thorough analysis.

Follow these steps to analyze an application with the APS:

  1. Set up the environment for the compiler, Intel MPI Library and APS:

    $ source <psxe_installdir>/compilers_and_libraries_<version>.<update>.<package>/linux/bin/ intel64
     $ source <psxe_installdir>/performance_snapshots/
  2. Run your application with the -aps option of mpirun:

    $ mpirun -n 4 -aps ./myprog

    APS will generate a directory with the statistics files aps_result_<date>-<time>.

  3. Launch the aps-report tool and pass the generated statistics to the tool:

    $ aps-report ./aps_result_<date>-<time>

    You will see the analysis results printed in the console window. Also, APS will generate an HTML report aps_report_<date>_<time>.html containing the same information.

For more details, refer to the Application Performance Snapshot User's Guide.

Tracing Applications

To analyze an application with the Intel Trace Analyzer and Collector, first you need generate a trace file of your application, and then open this file in Intel® Trace Analyzer to analyze communication patterns, time utilization, etc. Tracing is performed by preloading the Intel® Trace Collector profiling library at runtime, which intercepts all MPI calls and generates a trace file. Intel MPI Library provides the -trace (-t) option to simplify this process.

Complete the following steps:

  1. Set up the environment for the Intel MPI Library and Intel Trace Analyzer and Collector:

    $ source <mpi_installdir>/intel64/bin/
    $ source <itac_installdir>/intel64/bin/
  2. Trace your application with the Intel Trace Collector:

     $ mpirun -trace -n 4 ./myprog

    As a result, a trace file .stf is generated. For the example above, it is myprog.stf.

  3. Analyze the application with the Intel Trace Analyzer:

    $ traceanalyzer ./myprog.stf &

The workflow above is the most common scenario of tracing with the Intel Trace Collector. For other tracing scenarios, see the Intel Trace Collector documentation.

See Also

Application Performance Snapshot User's Guide
Intel® Trace Collector User and Reference Guide

For more complete information about compiler optimizations, see our Optimization Notice.
Select sticky button color: 
Orange (only for download buttons)