Fix OpenACC 'async'/'wait' issues in 'libgomp.oacc-c-c++-common/lib-{94,95}.c', 'libgomp.oacc-fortran/lib-16{,-2}.f90'

Fix-up for r265842 (commit 58168bbf6f)
"[OpenACC 2.5, libgomp] Add *_async versions of runtime library API functions".

	libgomp/
	* testsuite/libgomp.oacc-c-c++-common/lib-94.c: Fix OpenACC
	'async'/'wait' issue.
	* testsuite/libgomp.oacc-c-c++-common/lib-95.c: Likewise.
	* testsuite/libgomp.oacc-fortran/lib-16-2.f90: Likewise.
	* testsuite/libgomp.oacc-fortran/lib-16.f90: Likewise.

Co-Authored-By: Julian Brown <julian@codesourcery.com>
This commit is contained in:
Thomas Schwinge 2021-06-08 19:32:22 +02:00
parent 66030d68a7
commit 599e275d7e
4 changed files with 12 additions and 3 deletions

View File

@ -22,10 +22,10 @@ main (int argc, char **argv)
acc_copyin_async (h, N, async);
memset (h, 0, N);
acc_wait (async);
memset (h, 0, N);
acc_copyout_async (h, N, async + 1);
acc_wait (async + 1);

View File

@ -23,10 +23,11 @@ main (int argc, char **argv)
acc_create_async (h, N, q);
acc_memcpy_to_device_async (acc_deviceptr (h), g, N, q);
memset (&h[0], 0, N);
acc_wait (q);
memset (h, 0, N);
acc_update_self_async (h, N, q + 1);
acc_delete_async (h, N, q + 1);

View File

@ -27,6 +27,8 @@ program main
if (acc_is_present (h) .neqv. .TRUE.) stop 1
call acc_wait (async)
h(:) = 0
call acc_copyout_async (h, sizeof (h), async)
@ -45,6 +47,8 @@ program main
if (acc_is_present (h) .neqv. .TRUE.) stop 3
call acc_wait (async)
do i = 1, N
if (h(i) /= i + i) stop 4
end do

View File

@ -27,6 +27,8 @@ program main
if (acc_is_present (h) .neqv. .TRUE.) stop 1
call acc_wait (async)
h(:) = 0
call acc_copyout_async (h, sizeof (h), async)
@ -45,6 +47,8 @@ program main
if (acc_is_present (h) .neqv. .TRUE.) stop 3
call acc_wait (async)
do i = 1, N
if (h(i) /= i + i) stop 4
end do