[Openmp-commits] [PATCH] D97329: [OpenMP] Fixed a crash when offloading to x86_64 with target nowait

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Feb 24 09:09:13 PST 2021


protze.joachim added a comment.

Including openmp/runtime/test/ompt/callback.h, I could identify that the segfault seems to occur inside of the OpenMP for loop. The last printed OMPT event on the crashing thread prints `ompt_event_loop_begin`.

If you build the OpenMP runtime with debugging symbols and include callback.h to dump the OMPT events (I just add `-include .../llvm-project/openmp/runtime/test/ompt/callback.h` to the compile line), you can get the OMPT thread-id with:

  (gdb) print __kmp_threads[__kmp_gtid].th.ompt_thread_info.thread_data.value

This is the same ID as at the beginning of all callback.h output by that thread.

Another observation:
clang/11 would execute all code in the test on the initial thread, avoiding overloading the system. The current implementation will execute an instance of the target region on each of the hidden threads, effectively oversubscribing the system when running on a dual-core desktop. Is this the intended behavior?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97329/new/

https://reviews.llvm.org/D97329



More information about the Openmp-commits mailing list