Hi Thomas,
this fix adds more acc_wait's to libgomp.oacc-fortran/lib-1[13].f90.

For lib-12.f90, it's sort of a fix before we can resolve the issue
of intended semantics for "wait+async".

As for lib-13.f90, I believe these added acc_wait calls seem
reasonable, since we can't immediately assume the async-launched parallels
already completed there.

Does this seem reasonable?

Thanks,
Chung-Lin

        * testsuite/libgomp.oacc-fortran/lib-12.f90 (main): Add acc_wait()
        after async parallel construct.
        * testsuite/libgomp.oacc-fortran/lib-13.f90 (main): Add acc_wait()
        calls after parallel construct launches.
Index: libgomp.oacc-fortran/lib-12.f90
===================================================================
--- libgomp.oacc-fortran/lib-12.f90     (revision 230719)
+++ libgomp.oacc-fortran/lib-12.f90     (working copy)
@@ -15,6 +15,8 @@ program main
     end do
   !$acc end parallel
 
+  call acc_wait (0)
+
   call acc_wait_async (0, 1)
 
   if (acc_async_test (0) .neqv. .TRUE.) call abort
Index: libgomp.oacc-fortran/lib-13.f90
===================================================================
--- libgomp.oacc-fortran/lib-13.f90     (revision 230719)
+++ libgomp.oacc-fortran/lib-13.f90     (working copy)
@@ -21,6 +21,9 @@ program main
     end do
   !$acc end data
 
+  call acc_wait (1)
+  call acc_wait (2)
+
   if (acc_async_test (1) .neqv. .TRUE.) call abort
   if (acc_async_test (2) .neqv. .TRUE.) call abort
 

Reply via email to