The code below generates an unspecified launch failure when compiled using the version 13.3 Fortran compiler:
array size = 2.000000000000000 GB
0: copyout Memcpy (host=0x2b25cc386020, dev=0xf00100000, size=-2147483648) FAILED: 4(unspecified launch failure)
The array size appears to have been passed to Memcpy as a 32 bit integer.
The same code works correctly with the 12.9 compiler, and with smaller
arrays using the 13.3 compiler.
implicit none
integer, parameter :: mx=2561024**2
integer i
real8, device, dimension(mx) :: A,B
real8, allocatable, dimension(:) :: Ahost
allocate(Ahost(mx))
write (6,) “array size = “,mx*8d0/1024**3,” GB”
B = 42d0
!$cuf kernel do(1) <<< , * >>>
do i=1,mx
A(i)=B(i)
enddo
Ahost = A
write (6,) Ahost(4)
end