If “CUDA Fortran Emulation” is NO, the code below can be successfully complied. If “CUDA Fortran Emulation” being YES, I got the error message:
error S0038 : Symbol, .i0002, has not been explicitly declared
error S0038 : Symbol, .i0003, has not been explicitly declared
error S0038 : Symbol, .i0004, has not been explicitly declared
If I delete the statement “implicit none”, the code can be successfully compiled again.
subroutine TEST(N, A)
use CUDAFOR
implicit none
integer::N
real, dimension(:)::A
real, device, dimension(:), allocatable::dA
type(dim3) :: blocks
type(dim3) :: threads
allocate(dA(N))
dA = A
call DEV_TEST<<<blocks,threads>>>(N, dA)
return
end subroutine TEST