[Openmp-commits] [llvm] [openmp] [OpenMP][OMPT] Error when registering EMI and non-EMI callbacks (PR #213697)

Jan André Reuter via Openmp-commits openmp-commits at lists.llvm.org
Fri Aug 7 01:30:20 PDT 2026


================
@@ -597,10 +597,35 @@ OMPT_API_ROUTINE ompt_set_result_t ompt_set_callback(ompt_callbacks_t which,
     else                                                                       \
       return ompt_set_always;
 
-    FOREACH_OMPT_EVENT(ompt_event_macro)
+    FOREACH_OMPT_HOST_EVENT(ompt_event_macro)
+    FOREACH_OMPT_DEVICE_EVENT(ompt_event_macro)
 
 #undef ompt_event_macro
 
+    // OpenMP v5.2, p. 503, l. 18-20:
+    // Restrictions to the ompt_callback_target_emi and ompt_callback_target
+    // callbacks are as follows:
+    //   These callbacks must not be registered at the same time.
+    //
+    // Similar restrictions apply to target_data_op, target_submit,
+    // and target_map. Hence, handle registration of them separately to ensure
+    // only one can be registered at the same time. */
----------------
Thyre wrote:

Looks like I missed that while converting the comment style. Thanks for spotting!
This will be resolved with the next (force) push, doing another round of testing before that to make sure I haven't missed anything.

https://github.com/llvm/llvm-project/pull/213697


More information about the Openmp-commits mailing list