[Openmp-dev] kmp vs. gomp
Joachim Protze via Openmp-dev
openmp-dev at lists.llvm.org
Mon Jun 18 06:16:46 PDT 2018
Following Michael Klemms opinion, that an OpenMP implementation consists
of a fixed pair of compiler+runtime, I suggest to add a CMake flag, that
selects whether the intended use of the runtime is KMP or GOMP.
Based on this flag, we would provide return codes for OMPT callback
What do you think about this proposal?
On 06/13/2018 03:05 PM, Churbanov, Andrey wrote:
> In general, it is not possible to know which compiler used to compile the code that caused the initialization of the runtime library.
> It could be possible if kmp or gomp interface caused the initialization, but definitely not possible if it was omp_* call.
> Note also that we tentatively support case when executable linked from objects compiled by different compilers, so the library can be initialized in code compiled by one compiler and then used in the code compiled by another compiler (we do not cover all the cases of cause, but simple cases should work).
> -- Andrey
> -----Original Message-----
> From: Openmp-dev [mailto:openmp-dev-bounces at lists.llvm.org] On Behalf Of Joachim Protze via Openmp-dev
> Sent: Wednesday, June 13, 2018 12:35 AM
> To: openmp-dev at lists.llvm.org
> Subject: [Openmp-dev] kmp vs. gomp
> Hi all,
> is there a way in the runtime to tell whether the runtime was initialized through a call to the kmp or gomp interface? As I understand the initialization, this is currently not possible.
> A way to implement this would be to pass a flag through __kmp_get_global_thread_id_reg to __kmp_do_serial_initialize. Would this be acceptable?
> The background for this question is the different behavior regarding OMPT callbacks. Specifically, gomp has currently no way to provide a callback for the single-end event.
> Following the specification, the runtime should return ompt_set_sometimes instead of ompt_set_always when registering ompt_callback_work knowing that the application uses the gomp interface.
> Openmp-dev mailing list
> Openmp-dev at lists.llvm.org
> Joint Stock Company Intel A/O
> Registered legal address: Krylatsky Hills Business Park,
> 17 Krylatskaya Str., Bldg 4, Moscow 121614,
> Russian Federation
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
More information about the Openmp-dev