Hello, I can run programs using TESLA K40c in PVF18.10 and Window7, but when I change to the quad rtx 6000 video card, an error will be reported. Can you explain why? Thank you
module arr
integer,device,allocatable,dimension(:)::a_d
integer,allocatable,dimension(:)::a,b
endmodule
module GPUsubroutine
use cudafor
contains
attributes(glabal) subroutine addarrayongpu(a_d,N,M)
implicit none
integer,value::N,M
integer,intent(inout)::a_d(N)
integer::i
i = (blockidx%x-1)*blockdim%x + threadidx%x
if(i>n) return
a_d(i) = a_d(i) + M
endsubroutine
end module GPUsubroutine
program main
use GPUsubroutine
use arr
integer,parameter::N = 100000000,M = 100,BS = 100
integer :: i,t1,t2,t3,t4,t5
real(8) ::cr
allocate(a(N),b(N),a_d(N))
print*,"adsasdas"
do i = 1,n
a(i) = i
enddo
b=a
call SYSTEM_CLOCK(t1,cr)
a_d = b
call SYSTEM_CLOCK(t2,cr)
call addARRAYONGPU<<<1,1>>>(a_d,N,M)
CALL SYSTEM_CLOCK(t3,cr)
write(*,*)"time of gpu ",t3-t2
end
But if I do not write aLLOTABLE in the module, but in the program, and use RTX6000 to run, why is it that FORTRAN or the compiler version is too old