Paul-Antoine Arras wrote:
I am happy to implement an improved version of the -fopenmp-ompt option but I would like to reach consensus before actually writing a patch. *What about the following* Having a single option still called '-fopenmp-ompt' that takes an argument. Possible values would be 'minimal' (default), 'basic' and 'extended'. Make it RejectNegative to disallow -fno-openmp-ompt. -fopenmp implies -fopenmp-ompt[=minimal]. -fopenmp-ompt still requires -fopenmp (no change). *Rationale* In GCC, OMPT is implemented in three tiers, hence three possible values for the argument. But it is not possible to completely opt out, hence 'minimal' rather than 'none', and RejectNegative as -fno-openmp-ompt does not make sense.

I think basic + enhanced/detailed works. But I wonder whether
  -fopenmp-ompt=none / -fno-openmp-ompt
or
  -fopenmp-ompt=minimal
makes more sense - wording wise.

I think it depends how we word the manual page:

* If we talk about 'additional calls', then =none/-fno-… sounds fine
  as no additional calls are added.

* If we talk about minimal support for OMPT without adding calls that
  are only needed for OMPT, then =minimal + implying it by -fopenmp
  makes sense.

In any case, I like 'basic'; for the third option, instead of
'enhanced' we could also use 'detailed' or 'extended'.


* * *

Wording attempt for the 'none' version. Something similar
could be done for 'minimal' but that's left to others.

------------------
-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.

Using -fopenmp-ompt=basic, or just -fopenmp-ompt, the runtime is called
on region entry and exit instead of only on region entry for the single,
masked, and master constructs and with static scheduling for the
distribute and worksharing loop constructs.

The -fopenmp-ompt={enhanced,detailed,extended} (?) option includes the
additional calls of 'basic' and also issues events for the dispatch
callback with static scheduling for the distribute and worksharing loop
constructs.  The dispatch callback is invoked when beginning to execute
a section or a collapsed iteration in a taskloop or worksharing construct;
this option might have a measurable effect on the performance.

Requires-fopenmp.
------------------

Thanks,

Tobias

PS: I found a typo for 'begin(n)ing' in the current man page :-/
https://gcc.gnu.org/onlinedocs/gcc/OpenMP-and-OpenACC-Options.html#index-fopenmp-ompt

Reply via email to