Profiler for OpenMP

Profiler for OpenMP (POMP) is a profiling mechanism for OpenMP runtime. It inserts callbacks at key points in an OpenMP program; for example, when a parallel region is entered or exited. In these callbacks, you can run your code for various purposes, such as to increment profiling counters, or record timestamps.

On Blue Gene®/Q platforms, the POMP implementation is available as part of the SMP runtime of XL C/C++. The POMP implementation does not require any changes in the source code. Instead, you must provide a timer probe library and link your program with a POMP-enabled SMP runtime.

Timer probe library

A timer probe library is a separately compiled library that provides implementation of all POMP callback functions. You can write the timer probe library from scratch, so that the callback events can be handled in the way that your program determines.

For a full list of POMP callback functions that are supported by the SMP runtime, see POMP callback functions. For a complete sample timer probe library, see Creating a sample timer probe library.

Performance consideration

Due to some possible performance overhead, POMP is not enabled in the default runtime libxlsmp.a. This might cause a few extra branches and function calls. Be aware that the performance overhead might affect your results.

When you write a timer probe library, do not use any lock on, for example, an output file; otherwise, your application might be slow down. For example, if the POMP_Parallel_begin function uses a lock, threads are forced to enter a parallel region one by one. The sample timer probe takes extra effort to support asynchronous printing, and also tries to print output with atomic write calls so that the lines may be atomically interleaved, but the output will not contain a partial line.

Related information