GCC Newspaper
JULY 29, 2026
Date
/
Architectures
Components
Topics
News & Policy
openmp

OpenMP adds OMPT variants for scope start/end

New OMPT-aware builtins for scope start and end are introduced for task reductions.

GCC now introduces OMPT-compatible variants for GOMP_scope_start and GOMP_scope_end. When the -fopenmp-ompt flag is enabled, these new builtins are used for task reductions, providing better instrumentation capabilities for tools. Previously, GOMP_scope_start was emitted only for task reductions without OMPT.

In Details

This change introduces GOMP_scope_start_with_end and GOMP_scope_end builtins, activated when -fopenmp-ompt is used. These replace the unconditional GOMP_scope_start for task reduction regions. The new builtins are designed to provide finer-grained control and event reporting to OMPT-compliant tools, enabling them to track the scope of operations within tasks more accurately.

For Context
OMPT
OpenMP Tools Interface, a standard API for tool developers to observe and control OpenMP runtimes. It allows tools to receive callbacks for various OpenMP events, such as task creation, loop worksharing, and synchronization.
task reduction
A feature in OpenMP that allows multiple threads to contribute to a single variable within a task, with the results combined at the end of the task. This often involves specific compiler-generated code to manage the reduction operations.
-fopenmp-ompt
A GCC compiler flag that enables support for the OpenMP Tools Interface (OMPT), allowing instrumentation tools to monitor and interact with the OpenMP runtime.
Filed Under: openmpinstrumentation