c68ddd5e2a
libgomp/ * testsuite/libgomp.oacc-c-c++-common/lib-11.c: Enable for all but '-DACC_MEM_SHARED=0'. * testsuite/libgomp.oacc-c-c++-common/lib-13.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-14.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-15.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-24.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-88.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-89.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-92.c: Likewise. * testsuite/libgomp.oacc-fortran/lib-14.f90: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-5.c: Add 'acc_device_radeon' testing. * testsuite/libgomp.oacc-c-c++-common/lib-6.c: Likewise. * testsuite/libgomp.oacc-fortran/lib-5.f90: Likewise. * testsuite/libgomp.oacc-fortran/lib-7.f90: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Enable for all. * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-86.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-87.c: Likewise. * testsuite/libgomp.oacc-fortran/lib-10.f90: Likewise. * testsuite/libgomp.oacc-fortran/lib-8.f90: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-57.c: Improve checking for non-'openacc_nvidia_accel_selected'. * testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-62.c: Clarify that "Not all implement this checking". * testsuite/libgomp.oacc-c-c++-common/lib-63.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-64.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-65.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-67.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-68.c: Likewise.
58 lines
1.1 KiB
Fortran
58 lines
1.1 KiB
Fortran
! { dg-do run }
|
|
|
|
program main
|
|
implicit none
|
|
include "openacc_lib.h"
|
|
|
|
integer n
|
|
|
|
if (acc_get_num_devices (acc_device_nvidia) .ne. 0) then
|
|
|
|
call acc_init (acc_device_nvidia)
|
|
|
|
n = 0
|
|
|
|
call acc_set_device_num (n, acc_device_nvidia)
|
|
|
|
if (acc_get_device_num (acc_device_nvidia) .ne. 0) STOP 1
|
|
|
|
if (acc_get_num_devices (acc_device_nvidia) .gt. 1) then
|
|
|
|
n = 1
|
|
|
|
call acc_set_device_num (n, acc_device_nvidia)
|
|
|
|
if (acc_get_device_num (acc_device_nvidia) .ne. 1) STOP 2
|
|
|
|
end if
|
|
|
|
call acc_shutdown (acc_device_nvidia)
|
|
|
|
end if
|
|
|
|
if (acc_get_num_devices (acc_device_radeon) .ne. 0) then
|
|
|
|
call acc_init (acc_device_radeon)
|
|
|
|
n = 0
|
|
|
|
call acc_set_device_num (n, acc_device_radeon)
|
|
|
|
if (acc_get_device_num (acc_device_radeon) .ne. 0) STOP 1
|
|
|
|
if (acc_get_num_devices (acc_device_radeon) .gt. 1) then
|
|
|
|
n = 1
|
|
|
|
call acc_set_device_num (n, acc_device_radeon)
|
|
|
|
if (acc_get_device_num (acc_device_radeon) .ne. 1) STOP 2
|
|
|
|
end if
|
|
|
|
call acc_shutdown (acc_device_radeon)
|
|
|
|
end if
|
|
|
|
end program
|