|
Article ID: 506
Last updated: 31 Dec, 2025
The Intel VTune Profiler (renamed from Amplifier starting with 2020.0 version) is an analysis and tuning tool that provides predefined analysis configurations to address various performance questions. Among them, the hotspots analysis type can help you to identify the most time-consuming parts of your code and provide call stack information down to the source lines. The hotspots analysis type allows two data collection methods: (1) user-mode sampling and tracing collection, and (2) hardware event-based sampling collection. Both methods are supported on all current Aitken and Electra Intel processor types: Broadwell, Skylake, and Cascade Lake. Note: For the AMD Rome and Milan nodes, the user-mode sampling and tracing collection is supported but the hardware event-based sampling collection is not. The instructions below apply to using the user-mode sampling and tracing collection type, with a fixed sampling interval of 10 ms. Setting Up to Run a Hotspots AnalysisComplete these steps to prepare for profiling your code:
You can now run an analysis, as described in the next section. Running a Hotspots AnalysisRun the vtune command line that is appropriate for your code, as listed below. Use the -collect (or -c) option to run the hotspots collection and the -result-dir (or -r) option to specify a directory. Note: The vtune command replaces amplxe-cl, which was used prior to the 2020.0 version. Running a Hotspots Analysis on Serial or OpenMP CodeTo profile a serial or OpenMP application (for example):
Data collected by VTune for the a.out application are stored in the r000hs directory. Running a Hotspots Analysis on Python CodeTo profile a Python application:
Data collected by VTune while running the Python script will be stored in the r000hs directory. Note: See Additional Resources below for more information about Python code analysis. Running a Hotspots Analysis on MPI Code Using HPE MPTTo profile an MPI application using HPE MPT:
Note: If your vtune run fails with MPT ERROR and a suggestion to set additional MPT environment variables, for example MPI_UNBUFFERED_STDIO, follow the suggestion and try again. At the end of the collection, VTune generates a summary report that is written by default to stdout. The summary includes information such as the name of the compute host, operating system, CPU, elapsed time, CPU time, and average CPU utilization. Data collected by VTune are stored and organized with one directory per host. Within each directory, data are further grouped into subdirectories by rank. As an example, for a 48-rank MPI job running on two nodes with 24 ranks per node, VTune generates two directories, r000hs.r587i0n0 and r000hs.r587i0n1, where each directory contains 24 subdirectories, (data.[0-23]). To reduce the amount of data collected, consider profiling a subset of the MPI ranks, instead of all of them. For example, to profile only rank 0 of the 48-rank MPI job:
Viewing Results with the VTune GUIOnce data are collected, view the results with the VTune graphical user interface (GUI), vtune-gui. Since the PFEs do not have sufficient memory to run vtune-gui, run it on a compute node as follows:
Generating a ReportYou can also use the vtune command with the -report option to generate a report. There are several ways to group data in a report, as follows:
You can also generate a report showing the differences between two result directories (such as from two different ranks or two different runs), or select different types of data to display in a report, as follows:
Additional ResourcesSee the following Intel VTune articles and documentation: |