OpenMP gets runtime entry points for worksharing constructs
GCC adds support for OMPT-aware runtime entry points for worksharing constructs, controlled by new compiler flags.
GCC introduces two new flags, -fopenmp-ompt and -fopenmp-ompt-detailed, to emit OMPT-aware runtime entry points around OpenMP worksharing constructs. The -fopenmp-ompt flag replaces plain worksharing functions with _start and _end variants, while -fopenmp-ompt-detailed additionally includes a _dispatch stub. New stubs are added to libgomp to prepare for future OMPT callback invocations, aiding in performance analysis and debugging of OpenMP applications.
In Details
New flags -fopenmp-ompt and -fopenmp-ompt-detailed gate custom entry points in libgomp stubs (e.g., GOMP_single_start_with_end) for OpenMP worksharing constructs. This supports the OpenMP Tools Interface (OMPT) by enabling runtime monitoring and instrumentation of these constructs, particularly useful for profiling and debugging.
- OMPT
- The OpenMP Tools Interface (OMPT) is a runtime interface that allows external tools to interact with and monitor OpenMP applications for debugging, profiling, and analysis.
- worksharing constructs
- In OpenMP, these are directives like 'workshare', 'single', and 'masked' that divide a region of code among threads or control its execution by specific threads.
- libgomp
- The GNU implementation of the OpenMP runtime library, which GCC uses to execute OpenMP programs.