Intel® MPI Library Developer Guide for Windows* OS

ID 768730
Date 6/24/2024
Public

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

Document Table of Contents

Tracing Applications

The 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 these tools, the Intel MPI Library provides compilation and runtime options and environment variables for easier interoperability.

The Intel MPI Library is tightly integrated with the Intel® Trace Analyzer and Collector, which enables you to analyze and debug MPI applications. The Intel MPI Library has several compile-time options to simplify the application analysis.

Intel Trace Analyzer and Collector is available as standalone software and as part of the Intel® HPC Toolkit. Before proceeding to the next steps, make sure you have the product installed.

Trace an Application

To analyze an application, 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, and other elements. Tracing is performed by linking with the Intel Trace Collector profiling library, which intercepts all MPI calls and generates a trace file. Intel MPI Library provides the -trace (-t) compiler option to simplify this process.

Complete the following steps:

  1. Set up the environment for the compiler, Intel MPI Library, and Intel Trace Analyzer and Collector.
    > run <compiler-install-dir>\env\vars.bat
    > run <itac-install-dir>\env\vars.bat
  2. Relink your application with the Intel Trace Collector profiling library and run the application:
    > mpiicc -trace myprog.c > mpiexec -n 4 myprog.exe

    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.