[Openmp-commits] [PATCH] D62397: [OPENMP][NVPTX]Relax flush directive.

George Rokos via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Jun 3 13:45:57 PDT 2019


grokos added inline comments.


================
Comment at: libomptarget/deviceRTLs/nvptx/test/parallel/flush.c:23
+#pragma omp flush(flag, data)
+      while (flag < 1) {
+#pragma omp flush(flag, data)
----------------
jdoerfert wrote:
> There is a race in this program.
> 
> After the flush in thread 0 happened, and after the flush prior to the while happened, both thread 0 and 32 will access flag without proper synchronization.
I thinks that's the purpose of this test: to make sure that, despite the race on `flag`, memory fencing is enforced for `data`.


Repository:
  rOMP OpenMP

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

https://reviews.llvm.org/D62397





More information about the Openmp-commits mailing list