[Openmp-commits] [openmp] [Libomptarget] Fix Nvidia offloading hanging on dataRetrieve using RPC (PR #66817)

Johannes Doerfert via Openmp-commits openmp-commits at lists.llvm.org
Sat Sep 23 08:06:46 PDT 2023


================
@@ -0,0 +1,22 @@
+// RUN: %libomptarget-compile-run-and-check-generic
+
+// REQUIRES: libc
+
+#include <assert.h>
+#include <stdio.h>
+
+#pragma omp declare target to(stdout)
+
+int main() {
+  int r = 0;
+// CHECK: PASS
+#pragma omp target map(from : r)
+  { r = fwrite("PASS\n", 1, sizeof("PASS\n") - 1, stdout); }
+  assert(r == sizeof("PASS\n") - 1 && "Incorrect number of bytes written");
----------------
jdoerfert wrote:

> If you go into a debugger, it waits forever inside of the `D2H` memcpy function. This is because CUDA is most likely waiting internally for the kernel to be done. THat means no one on our side is checking the server.

I don't disagree with this but it does not answer my questions above. I can try to look into the current state next week myself.

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


More information about the Openmp-commits mailing list