mirror of
https://github.com/autc04/Retro68.git
synced 2024-11-29 12:50:35 +00:00
32 lines
545 B
Fortran
32 lines
545 B
Fortran
! { dg-do run }
|
|
|
|
program main
|
|
use openacc
|
|
implicit none
|
|
|
|
integer n
|
|
|
|
if (acc_get_num_devices (acc_device_nvidia) .eq. 0) call exit
|
|
|
|
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 program
|