User Guide

Intel® VTune™ Profiler User Guide

ID 766319
Date 3/31/2023

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

Document Table of Contents
Give Feedback

OpenMP* Analysis

Use the Intel® VTune™ Profiler for performance analysis of OpenMP* applications compiled with Intel® Compiler.


  • To analyze OpenMP parallel regions, make sure to compile and run your code with the Intel® Compiler 13.1 Update 2 or higher (part of the Intel Composer XE 2013 Update 2). If an obsolete version of the OpenMP runtime libraries is detected, VTune Profiler provides a warning message. In this case the collection results may be incomplete.

    To access the newest OpenMP analysis options described in the documentation, make sure you always use the latest version of the Intel compiler.

  • On Linux*, to analyze an OpenMP application compiled with GCC*, make sure the GCC OpenMP library ( contains symbol information. To verify, search for and use the nm command to check symbols, for example:


    If the library does not contain any symbols, either install/compile a new library with symbols or generate debug information for the library. For example, on Fedora* you can install GCC debug information from the yum repository:

    yum install gcc-debuginfo.x86_64

OpenMP is a fork-join parallel model, which starts with an OpenMP program running with a single master serial-code thread. When a parallel region is encountered, that thread forks into multiple threads, which then execute the parallel region. At the end of the parallel region, the threads join at a barrier, and then the master thread continues executing serial code. It is possible to write an OpenMP program more like an MPI program, where the master thread immediately forks to a parallel region and constructs such as barrier and single are used for work coordination. But it is far more common for an OpenMP program to consist of a sequence of parallel regions interspersed with serial code.

Ideally, parallelized applications have working threads doing useful work from the beginning to the end of execution, utilizing 100% of available CPU core processing time. In real life, useful CPU utilization is likely to be less when working threads are waiting, either actively spinning (for performance, expecting to have a short wait) or waiting passively, not consuming CPU. There are several major reasons why working threads wait, not doing useful work:

  • Execution of serial portions (outside of any parallel region): When the master thread is executing a serial region, the worker threads are in the OpenMP runtime waiting for the next parallel region.

  • Load imbalance: When a thread finishes its part of workload in a parallel region, it waits at a barrier for the other threads to finish.

  • Not enough parallel work: The number of loop iterations is less than the number of working threads so several threads from the team are waiting at the barrier not doing useful work at all.

  • Synchronization on locks: When synchronization objects are used inside a parallel region, threads can wait on a lock release, contending with other threads for a shared resource.

VTune Profiler together with Intel Composer XE 2013 Update 2 or higher help you understand how an application utilizes available CPUs and identify causes of CPU underutilization.

Configure OpenMP Analysis

To enable OpenMP analysis for your target:

  1. Click the (standalone GUI)/ (Visual Studio IDE)Configure Analysis button on the Intel® VTune™ Profiler toolbar.

    The Configure Analysis window opens.

  2. From HOW pane, click the Browse button and select an analysis type that supports OpenMP analysis: Threading, HPC Performance Characterization, Memory Access, or any Custom Analysis type.

  3. Select the Analyze OpenMP regions option, if it is not pre-selected (see the Details section to confirm).

  4. Click the Start button to run the analysis.

The OpenMP runtime library in the Intel Composer provides special markers for applications running under profiling that can be used by the VTune Profiler to decipher the statistics of OpenMP parallel regions and distinguish serial parts of the application code.


VTune Profiler supports the analysis of parallel OpenMP regions with the following limitations:

  • Maximum number of supported lexical parallel regions is 512, which means that no region annotations will be emitted for regions whose scope is reached after 512 other parallel regions are encountered.

  • Regions from nested parallelism are not supported. Only top-level items emit regions.

  • VTune Profiler does not support static linkage of OpenMP libraries.