On 8/11/26 02:52, Paul-Antoine Arras wrote:
Sandra, Tobias, all,
On 21/07/2026 16:29, Sandra Loosemore wrote:
On 7/21/26 05:53, Tobias Burnus wrote:
-fopenmp-ompt
-fopenmp-ompt=none
-fopenmp-ompt=basic
-fopenmp-ompt=enhanced // detailed, extended
Specify whether additional calls into the OpenMP runtime are generated
to improve tracing results with tools using the OMPT interface at the
expense of additional runtime overhead. However, OMPT is also supported
without this option.
With -fopenmp-ompt=none, no additional calls are generated.
My confusion about this option is: additional to *what*? Talking
about additional runtime overhead makes it sound like it's an internal
implementation detail and I don't think users are supposed to have to
know what what features do or don't involve "additional" overhead. So
could we talk about what features are supported at each level first,
and secondarily mention that the features at lower levels have less
runtime overhead than those at higher levels? Otherwise it seems like
the tail is trying to wag the dog.
Here is a new proposition based on previous messages in this thread.
What do you think?
This is much better. I have only a few markup complaints.
@opindex fopenmp-ompt
@cindex OpenMP OMPT
@item -fopenmp-ompt
@itemx -fopenmp-ompt=@var{level}
Control how much detail GCC reports to an @dfn{OMPT} tool -- a tool
In Texinfo an em-dash is specified as three dashes with no space on
either side, like "...tool---a tool..." here.
that registers callbacks with the OpenMP runtime to observe events
such as when a parallel region or worksharing construct starts and
ends. The @var{level} argument is one of @code{minimal}, @code{basic},
I think @samp{} markup is preferred to @code{} for these keywords.
or @code{extended}; @option{-fopenmp-ompt} without an argument is
equivalent to @option{-fopenmp-ompt=basic}. OMPT support itself is
always present with @option{-fopenmp}; this option only changes how
much is reported and at what runtime cost. Requires
@option{-fopenmp}.
@table @code
Likewise in the @table.
@item minimal
The level used when @option{-fopenmp-ompt} is not specified. Some
OpenMP constructs are reported to an OMPT tool as a single combined
``encountered'' event, so a tool cannot tell how long the construct's
region actually ran. No extra runtime calls are generated beyond
what the construct's semantics already require.
@item basic
For the @code{single}, @code{masked}, and @code{master} constructs,
and for @code{distribute} and worksharing-loop (@code{for}/@code{do})
constructs that use static scheduling, GCC instead reports a separate
``begin'' event when the region is entered and an ``end'' event when
it is left. This lets an OMPT tool measure the time actually spent in
those regions, at the cost of one extra runtime call per region.
@item extended
In addition to what @code{basic} reports, report a ``dispatch'' event
And @samp{basic} here too.
each time a new chunk of loop iterations begins within a statically
scheduled @code{distribute} or worksharing-loop construct (a
@dfn{chunk} is the contiguous run of iterations handed to one thread
or team at a time). This lets an OMPT tool see how work is actually
split across threads, but adds a runtime call for every chunk, which
can be measurably slower for loops with many small chunks.
@end table
There is no @option{-fno-openmp-ompt}: the lowest available level is
@option{-fopenmp-ompt=minimal}, since OMPT support cannot be disabled
outright once @option{-fopenmp} is in effect.
-Sandra