Arsen Arsenović wrote:
In the testcases, the kernels scheduled on queues 11, 12, 13, 14 have
data dependencies on, respectively, 'b', 'c', 'd', and 'e', as they
write to them.

However, they also have a data dependency on 'a', as they read from it.
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/data-2-lib.c

Can you also fix the typo Andrew's Claude found:
"unstructed data regions"

+  acc_wait_async (11, 10);
+  acc_wait_async (12, 10);
+  acc_wait_async (13, 10);
+  acc_wait_async (14, 10);
    acc_copyout_async (a, nbytes, 10);

I think it would be helpful to add a comment above like:
  As all kernels are started asynchronously and use 'a',
  don't remove the device 'a' before they have completed.

* * *

+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/data-2.c

-#pragma acc exit data copyout (a[0:N]) async (10)
+#pragma acc exit data copyout (a[0:N]) async (10) wait (11) wait (12) wait 
(13) wait (14)

And a comment of the same kind here.

Otherwise, it looks good to me.

Thanks!

Tobias

Reply via email to