diff options
author | Tom de Vries <tdevries@suse.de> | 2018-07-26 07:52:35 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2018-07-26 07:52:35 +0000 |
commit | b2eb17797805ddd2cf82d7c6a9777781c654b556 (patch) | |
tree | 84f8db8215cd9ae2d77ef1ff83d608a152a2cebf | |
parent | a4955142f8cdc6eb5eb9c6fbed84433dc88caf6a (diff) | |
download | gcc-b2eb17797805ddd2cf82d7c6a9777781c654b556.zip gcc-b2eb17797805ddd2cf82d7c6a9777781c654b556.tar.gz gcc-b2eb17797805ddd2cf82d7c6a9777781c654b556.tar.bz2 |
[libgomp, openacc, testsuite] Fix async/wait logic in lib-13.f90
The purpose of the lib-13.f90 test-case is to test acc_wait_all_async. The
test indeed calls acc_wait_all_async, but then subsequentlys calls
acc_wait_all, so the acc_wait_all_async functionality is not tested.
Furthermore, all acc_async_test calls are placed in a location where they are
not guaranteed to succeed, which explains why there's an xfail for the lower
optimization levels.
This patch fixes the problems by replacing acc_wait_all with an acc_wait on
the async id used for the acc_wait_all_async call, and moving the
acc_async_test calls to the correct locations.
Reg-tested on x86_64 with nvptx accelerator.
2018-07-26 Tom de Vries <tdevries@suse.de>
* testsuite/libgomp.oacc-fortran/lib-13.f90: Replace acc_wait_all with
acc_wait. Move acc_async_test calls to correct locations. Remove
xfail.
From-SVN: r262989
-rw-r--r-- | libgomp/ChangeLog | 6 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.oacc-fortran/lib-13.f90 | 10 |
2 files changed, 10 insertions, 6 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 098f469..ac8c5b6 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,9 @@ +2018-07-26 Tom de Vries <tdevries@suse.de> + + * testsuite/libgomp.oacc-fortran/lib-13.f90: Replace acc_wait_all with + acc_wait. Move acc_async_test calls to correct locations. Remove + xfail. + 2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org> Thomas Koenig <tkoenig@gcc.gnu.org> diff --git a/libgomp/testsuite/libgomp.oacc-fortran/lib-13.f90 b/libgomp/testsuite/libgomp.oacc-fortran/lib-13.f90 index 6d713b1..da944c3 100644 --- a/libgomp/testsuite/libgomp.oacc-fortran/lib-13.f90 +++ b/libgomp/testsuite/libgomp.oacc-fortran/lib-13.f90 @@ -1,5 +1,4 @@ ! { dg-do run } -! { dg-xfail-run-if "TODO" { openacc_nvidia_accel_selected } { "-O0" "-O1" } { "" } } program main use openacc @@ -22,13 +21,12 @@ program main end do !$acc end data - if (acc_async_test (1) .neqv. .TRUE.) call abort - if (acc_async_test (2) .neqv. .TRUE.) call abort - call acc_wait_all_async (nprocs + 1) - if (acc_async_test (nprocs + 1) .neqv. .TRUE.) call abort + call acc_wait (nprocs + 1) - call acc_wait_all () + if (acc_async_test (1) .neqv. .TRUE.) call abort + if (acc_async_test (2) .neqv. .TRUE.) call abort + if (acc_async_test (nprocs + 1) .neqv. .TRUE.) call abort end program |