5 include "openacc_lib.h"
9 if (acc_get_num_devices (acc_device_nvidia
) .eq
. 0) call exit
11 call acc_init (acc_device_nvidia
)
15 call acc_set_device_num (n
, acc_device_nvidia
)
17 if (acc_get_device_num (acc_device_nvidia
) .ne
. 0) call abort
19 if (acc_get_num_devices (acc_device_nvidia
) .gt
. 1) then
23 call acc_set_device_num (n
, acc_device_nvidia
)
25 if (acc_get_device_num (acc_device_nvidia
) .ne
. 1) call abort
29 call acc_shutdown (acc_device_nvidia
)