| 1 |
! { dg-do run } |
| 2 |
|
| 3 |
program main |
| 4 |
implicit none |
| 5 |
include "openacc_lib.h" |
| 6 |
|
| 7 |
integer n |
| 8 |
|
| 9 |
if (acc_get_num_devices (acc_device_host) .ne. 1) STOP 1 |
| 10 |
|
| 11 |
if (acc_get_num_devices (acc_device_none) .ne. 0) STOP 2 |
| 12 |
|
| 13 |
call acc_init (acc_device_host) |
| 14 |
|
| 15 |
if (acc_get_device_type () .ne. acc_device_host) STOP 3 |
| 16 |
|
| 17 |
call acc_set_device_type (acc_device_host) |
| 18 |
|
| 19 |
if (acc_get_device_type () .ne. acc_device_host) STOP 4 |
| 20 |
|
| 21 |
n = 0 |
| 22 |
|
| 23 |
call acc_set_device_num (n, acc_device_host) |
| 24 |
|
| 25 |
if (acc_get_device_num (acc_device_host) .ne. 0) STOP 5 |
| 26 |
|
| 27 |
if (.NOT. acc_async_test (n) ) STOP 6 |
| 28 |
|
| 29 |
call acc_wait (n) |
| 30 |
|
| 31 |
call acc_wait_all () |
| 32 |
|
| 33 |
call acc_shutdown (acc_device_host) |
| 34 |
|
| 35 |
end program |