Generate Profile Report - Generate Profile Report - 57368

uProf User Guide

Document_ID
57368
Release_Date
2025-06-09
Revision
5.1 English

You can generate a CSV report using the AMDuProfCLI report command. Any additional option is not required for the OpenMP report generation. AMD uProf checks for the availability of any OpenMP profiling data and includes it in the report, if available.

The following command will generate a CSV report in /tmp/myapp_perf/<SESSION-DIR>/ report.csv:

$ ./AMDuProfCLI report -i /tmp/myapp_perf/<SESSION-DIR>
Note: If tracing is performed on a cluster, provide --host all option to correctly report openmp data for all the hosts.

An example of the OpenMP report section in the CSV file is given here:

Figure 1. An OpenMP Report

Analyzing the OpenMP Report

It has following sub-sections:

  • OpenMP OVERVIEW has the following fields:
    • Profile Time (s): Total profile duration.
    • Time Inside Parallel Region (s): Total time spent inside parallel regions.
    • Time Outside Parallel Region (s): Total time spent outside parallel regions.
    • Parallel Region Time %: Percentage of total time spent inside parallel regions.
    • Total threads created: Total number of threads created.
    • CPU Time (seconds): Total time spent utilizing the CPU.
      • Work Time: Time spent working in the parallel region.
      • Sync Time: Total time spent at barrier, lock contention and other synchronization activities.
        • Barrier/Wait Time: Time spent waiting at explicit or implicit barrier by the threads.
        • Lock Contention Time: Time spent by threads waiting on locks or ordered parallel loops.
        • Other Sync Time: Time spent in synchronization activities other than waiting at barriers or for locks.
      • Overhead Time: Total time spent in atomic, reduction and other thread management operations.
        • Reduction Time: Time spent on reduction operations.
        • Atomic Time: Time spent on performing atomic operations.
        • Other Overhead Time: Time spent on other thread management overhead.
    • Idle Time (seconds): Time spent in an inactive state, waiting for an event to occur.
  • OpenMP PARALLEL-REGION METRIC helps in understanding the imbalanced region, that is, a region with less total work time with respect to its total elapsed time. It has the following columns:
    • Avg Idle Time (s): Average time spent by the parallel region threads in an inactive state, waiting for an event to occur. It is computed as the difference between the total elapsed time of a parallel region and the sum of Avg Sync Time, Avg Overhead Time and Avg Work Time of that parallel region.
    • Avg Sync Time (s): Average time spent by the parallel region threads waiting on the synchronization locks to acquire the shared resource. It is computed as the sum of sync time of all the threads within the parallel region divided by the thread count of that parallel region.
    • Avg Overhead Time (s): Average time spent in atomic, reduction and other thread management operations. It is computed as the sum of overhead time of all the threads within the parallel region divided by the thread count of that parallel region.
    • Avg Work Time (s): Average time spent by the parallel region threads working. It is computed as the sum of work time of all the threads within the parallel region divided by the thread count of that parallel region.
    • Total Elapsed Time (s): Time spent in the parallel region.
    • Thread Count: Number of threads in the parallel region.
    • Instance Count: Number of instances of the parallel region executed.
  • OpenMP THREAD METRIC helps in understanding how each thread spent its time in the parallel region. If a thread spends too much time on non-work activity, the parallel region should be optimized further to improve the work time of each thread in that region. It has the following columns:
    • ThreadNum: Serial number of the thread.
    • ThreadId: Thread identifier.
    • Total Idle Time (s): Time spent by the thread in an inactive state, waiting for an event to occur.
    • Total Sync Time (s): Time spent by the thread waiting on the synchronization locks to acquire the shared resource.
    • Total Overhead Time (s): Time spent by the thread in atomic, reduction and other thread management operations.
    • Total Work Time (s): Time spent by the thread working.