Using F2Py with OpenACC gives import error in Python
问题 I am writing a simple test code to see how I could wrap a fortran code containing openacc regions and call from python. Here's the code. module test use iso_c_binding, only: sp => C_FLOAT, dp => C_DOUBLE, i8 => C_INT implicit none contains subroutine add (a, b, n, c) integer(kind=i8), intent(in) :: n real(kind=dp), intent(in) :: a(n) real(kind=dp), intent(in) :: b(n) real(kind=dp), intent(out) :: c(n) integer(kind=i8) :: i !$acc enter data create(a, b, c) do i = 1, n c(i) = a(i) + b(i) end do