mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-24 11:24:05 +08:00
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:
parent
66030d68a7
commit
599e275d7e
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user