lib-6.f90 658 B

1234567891011121314151617181920212223242526272829303132333435
  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) STOP 1
  7. if (acc_get_num_devices (acc_device_none) .ne. 0) STOP 2
  8. call acc_init (acc_device_host)
  9. if (acc_get_device_type () .ne. acc_device_host) STOP 3
  10. call acc_set_device_type (acc_device_host)
  11. if (acc_get_device_type () .ne. acc_device_host) STOP 4
  12. n = 0
  13. call acc_set_device_num (n, acc_device_host)
  14. if (acc_get_device_num (acc_device_host) .ne. 0) STOP 5
  15. if (.NOT. acc_async_test (n) ) STOP 6
  16. call acc_wait (n)
  17. call acc_wait_all ()
  18. call acc_shutdown (acc_device_host)
  19. end program