When I compiled a simple fortran module to be shown below using Visual Fortran 10.0, I got a error message:
error F0000 : Internal compiler error. unsupported operation 97
PGF90/x86-64 Windows 10.0-0: compilation aborted
First, the ‘dble’ intrinsic is not a supported operation within a device kernel. (Pl
ease see section 3.6.3 of the CUDA Fortran Programming Guide for a complete list of supported intrinsics). You can use “real”, but will need to change “T” to be integer.
I’ve put in a feature request (TPR#16457) to have “dble” supported.
The second issue is the use of an module’s allocatable array (dm_SEEDS) within a device kernel. Currently, this is not supported but we are looking at adding it in the near term.
The following re-write of your code will allow it to compile.
!*******************************************************
module TEST1_MODULE
implicit none
integer, constant::dm_SIZE = 0
integer(8), constant::dm_BIGRAND48_A,dm_BIGRAND48_C
integer(8), constant::dm_T16, dm_T32, dm_T48
contains
attributes(global) subroutine DEV_DRAND48(N, dR, dm_SEEDS)
integer(4), value:: N
real, dimension(*) :: dR
integer(8), dimension(*) ::dm_SEEDS
integer(4), value::X, T
integer, value::i
i = (blockidx%x-1) * blockdim%x + threadidx%x
T = dm_SEEDS(i)*dm_BIGRAND48_A + dm_BIGRAND48_C
dR(i) = real(T)
return
end subroutine DEV_DRAND48
end module TEST1_MODULE