Tutorial

Analyze MPI Applications with Intel® Trace Analyzer and Collector and Intel® VTune™ Profiler

ID 773180
Date 3/31/2023
Public

Starting Intel® VTune™ Profiler

Before You Begin

  • Build your application with symbol information and in Release mode with all optimizations enabled. For detailed information on compiler settings, see the Compiler Switches for Performance Analysis.

    You can also use the matrix sample application available in <oneAPI_install_dir>/vtune/latest/samples/en/C++/matrix for Linux* OS and in <oneAPI_install_dir>\vtune\latest\samples\en\C++\matrix for Windows* OS. You can see sample results in <oneAPI_install_dir>/vtune/latest/samples/en/C++/matrix_results for Linux OS and <oneAPI_install_dir>\vtune\latest\samples\en\C++\matrix_results for Windows OS.

  • Set up the environment variables:

    For Linux OS:

    source <oneAPI-install-dir>/setvars.sh

    By default, the <oneAPI-install-dir> is the following:

    • $HOME/intel/oneapi/ when installed with user permissions;

    • /opt/intel/oneapi/ when installed with root permissions.

For Windows OS:

<oneAPI-install-dir>\setvars.bat

By default, the <oneAPI-install-dir> for oneAPI components is Program Files (x86)\Intel\oneAPI.

NOTE:
You do not need to execute setvars.bat when using VTune Profiler within Microsoft* Visual Studio*.

Step 1: Start Intel VTune Profiler

Start Intel VTune Profiler through one of these ways:

Source

Start Intel VTune Profiler

Standalone/IDE (GUI)

  1. Run the vtune-gui command.

    To start VTune Profiler Linux* OS from the Intel System Studio IDE, select Tools > VTune Profiler > Launch VTune Profiler. This sets all appropriate environment variables and launches a standalone interface of the product.

  2. Click the menu button in the upper left corner and select New > Project... .

  3. Specify the project name and location in the Create Project dialog box.

  4. Click Create Project.

Standalone (Command line)

Run the vtune command.

Microsoft* Visual Studio* IDE

Open your solution in Visual Studio. The VTune Profiler toolbar is automatically enabled and your Visual Studio project is set as an analysis target.

NOTE:
You do not need to create a project when running VTune Profiler from the command line or within Microsoft* Visual Studio.

Step 2: Configure and Run Analysis

After creating a new project, the Configure Analysis window opens with these default values:

  1. In the Launch Application section, browse to the location of your application.

  2. Click the Start to run Performance Snapshot on your application. This analysis presents a general overview of issues affecting the performance of your application on the target system.

Step 3: View and Analyze Performance Data

When data collection completes, VTune Profiler displays analysis results in the Summary window. Here, you see a performance overview of your application.

The overview typically includes several metrics along with their descriptions.

Expand each metric for detailed information about contributing factors.

A flagged metric indicates a value outside acceptable/normal operating range. Use tool tips to understand how to improve a flagged metric.

See guidance on other analyses you should consider running next. The Analysis Tree highlights these recommendations.