lib-6.f90 682 B

123456789101112131415161718192021222324252627282930313233343536
  1. ! { dg-do run }
  2. program main
  3. implicit none
  4. include "openacc_lib.h"
  5. integer n
  6. if (acc_get_num_devices (acc_device_host) .ne. 1) call abort
  7. if (acc_get_num_devices (acc_device_none) .ne. 0) call abort
  8. call acc_init (acc_device_host)
  9. if (acc_get_device_type () .ne. acc_device_host) call abort
  10. call acc_set_device_type (acc_device_host)
  11. if (acc_get_device_type () .ne. acc_device_host) call abort
  12. n = 0
  13. call acc_set_device_num (n, acc_device_host)
  14. if (acc_get_device_num (acc_device_host) .ne. 0) call abort
  15. if (.NOT. acc_async_test (n) ) call abort
  16. call acc_wait (n)
  17. call acc_wait_all ()
  18. call acc_shutdown (acc_device_host)
  19. end program