Parallelism - OpenMP Analysis - Parallelism - OpenMP Analysis - 57368

uProf User Guide

Document ID
57368
Release Date
2025-06-09
Revision
5.1 English

The OpenMP API uses the fork-join model of parallel execution. The program starts with a single master thread to run the serial code. When a parallel region is encountered, multiple threads perform the implicit or explicit tasks defined by the OpenMP directives. At the end of that parallel region, the threads join at the barrier and only the master thread continues to execute.

When the threads execute the parallel region code, they should utilize all the available CPU cores and the CPU utilization should be maximized. But the threads wait without doing anything useful due to several reasons:

  • Idle: A thread finishes its task within the parallel region and waits at the barrier for the other threads to complete.
  • Sync: If locks are used inside the parallel region, threads can wait on synchronization locks to acquire the shared resource.
  • Overhead: The thread management overhead

The OpenMP analysis helps to trace the activities performed by OpenMP threads, their states, and provides the thread state timeline for parallel regions to analyze the performance issues.

Parallel Region Aggregation

A parallel region can be executed multiple times during runtime. Reporting all the instances separately might result in a lengthy report making it difficult to analyze the data. AMD uProf aggregates data of multiple instances of the same parallel region and shows it as a single entry for better analysis.

Support Matrix

The following table shows the support matrix

Table 1. Support Matrix
Component Supported Versions Languages
OpenMP Spec OpenMP v5.0 C and C++
Compiler LLVM 8 and later C and C++
AOCC 2.1 and later C, C++, and Fortran
ICC 2025.0.4 C, C++, and Fortran
GCC7 and later C, C++, and Fortran
OS Ubuntu 18.04 LTS and later C, C++, and Fortran
RHEL 8.6 and 9 C, C++, and Fortran
CentOS 8.4 C, C++, and Fortran

Prerequisite

Compile the OpenMP application using a supported compiler (on a supported platform) with the required compiler options to enable OpenMP.