Internal compiler error

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

The code:
!*******************************************************
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
integer(8), device, dimension(:), allocatable::dm_SEEDS

contains

attributes(global) subroutine DEV_DRAND48(N, dR)
integer(4), value:: N
real, dimension(*) :: dR
integer(8), 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) = dble(T)

return
end subroutine DEV_DRAND48


end module TEST1_MODULE

Hi Qing HOU,

There are a number of issues here.

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

Hope this helps,
Mat

Hi Qing HOU,

FYI, TPR#16457, support for “dble”, has been added to the 10.2 release.

  • Mat

Do you know when 10.2 will be released?

-Todd

Our webmaster is in the process of posting the 10.2 packages and they should be available later today. (2/4/2010).

  • Mat