[Openmp-dev] kmp vs. gomp

Joachim Protze via Openmp-dev openmp-dev at lists.llvm.org
Tue Jun 12 14:35:13 PDT 2018


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.

Best
Joachim


More information about the Openmp-dev mailing list