Hello,
I have been working on a CUDA-Fortran code. The code compiles correctly when adding the -g debug flag. However, when switching to -O3 the following error pops us:
PGF90-F-0000-Internal compiler error. lili redefinition.
The incriminating line in the subroutine:
attributes(global) subroutine solve_kernel(lx,ly,am,ap,ac,rhs,n,nx,ny)
real(DP), dimension(:), intent(in), device :: lx,ly
complex(DP), dimension(:), intent(in), device :: am,ap
complex(DP), dimension(:,:,:), intent(inout), device :: ac,rhs
integer, value :: n,nx,ny
real(DP) :: r0,r,w
integer :: i,j,k
!**** code
do k..
!----------------
ac(k,j,i)=1.d0 !commenting out this line it compiles
!----------------
end do
!**** code
end subroutine
I am compiling with pgf95 18.7-0:
pgf95 -c -O3 -Mcuda=nordc file.F90
Any help is much appreciated, thank you.
Paolo