OpenMP dispatches now pass loop details to OMPT
OpenMP static worksharing dispatch builtins now pass loop parameters to OMPT callbacks for better debugging and information.
OpenMP’s static worksharing dispatch builtins now accept loop parameters such as iteration count, start, step, and chunk size. This information is passed to the OMPT dispatch callback, providing crucial details about the loop for runtime analysis and debugging. The change involves updating builtin definitions and expansion logic across GCC and libgomp.
In Details
The GOMP_*_static_worksharing_dispatch builtins, previously lacking arguments, now accept loop parameters (niter, start, incr, chunk_size, istart). This allows the OMPT tracing layer to receive essential loop context during static worksharing operations, enhancing observability for tools like libgomp.c-c++-common/for-static-3.c.
- OMP
- OpenMP, an API that supports multi-platform shared-memory parallel programming in C, C++, and Fortran.
- OMPT
- OpenMP Tools Interface, a standardized interface for developing parallel profiling and debugging tools for OpenMP applications.
- dispatch callback
- A function pointer provided to a runtime system that is called when a specific event or operation occurs, allowing for custom handling or instrumentation.
- worksharing
- A concept in parallel programming, particularly with OpenMP, where a task is divided among multiple threads for execution.
- builtins
- Predefined functions or constants directly supported by the compiler, often used to expose low-level hardware or runtime features.