acc_init Subroutine

public subroutine acc_init()

Arguments

None

Source Code

   SUBROUTINE acc_init()

#if ! defined (__DBCSR_ACC)
      DBCSR_ABORT("__DBCSR_ACC not compiled in.")
#else
      INTEGER                                  :: istat
      ! Set active device first
      CALL dbcsr_acc_set_active_device(get_accdrv_active_device_id())
!$OMP    PARALLEL DEFAULT(NONE) PRIVATE(istat)
!$OMP    MASTER
      istat = acc_interface_drv_init()
      IF (istat /= 0) &
         DBCSR_ABORT("acc_init failed")
!$OMP    END MASTER
!$OMP    END PARALLEL
#endif
   END SUBROUTINE acc_init