Let me describe the problem I met.
The fortran code reads as:
!$acc parallel loop copyin(wav, lev, chunk, MKKL, zero, two) creat(denf) copyout(denf) private(MK,ip,MKj,ib, &
!$acc & ik1,ik2,itx, it1,nu,i0,vv, i)
do MK = 1, MKT*2
!--- Index
ip = (MK-1)/MKT; MKj = MK - ip*MKT
ib = MKKL(MKj,ip)%ib
ik1 = MKKL(MKj,ip)%k1; ik2 = MKKL(MKj,ip)%k2
!--- Initialize the non-local densities
do itx = 1, IBX
denf(itx,MK)%sgg = zero; denf(itx,MK)%sgf = zero
denf(itx,MK)%sff = zero; denf(itx,MK)%sfg = zero
do nu = 1, chunk(itx)%md(ib)
!--- index of the single-particle states in structures "lev" and "wav"
i0 = chunk(itx)%ma(ib) + nu
vv = lev(itx)%vv(i0)*lev(itx)%mu(i0) !--- occupation number
!--- contributions to the non-local densities from k1 & k2 blocks of the DWS base
do i = 1, MSD
denf(itx,MK)%sgg(:,i) = denf(itx,MK)%sgg(:,i) + wav(i0,itx)%XG(:,ik1)*wav(i0,itx)%XG(i,ik2)*vv
denf(itx,MK)%sgf(:,i) = denf(itx,MK)%sgf(:,i) + wav(i0,itx)%XG(:,ik1)*wav(i0,itx)%XF(i,ik2)*vv
denf(itx,MK)%sfg(:,i) = denf(itx,MK)%sfg(:,i) + wav(i0,itx)%XF(:,ik1)*wav(i0,itx)%XG(i,ik2)*vv
denf(itx,MK)%sff(:,i) = denf(itx,MK)%sff(:,i) + wav(i0,itx)%XF(:,ik1)*wav(i0,itx)%XF(i,ik2)*vv
end do
end do
end do
!--- Non-local density for isovector channels
do itx = 1, IBX
it1 = 3 - itx
denf(itx,MK)%vgg = denf(itx,MK)%sgg + two*denf(it1,MK)%sgg
denf(itx,MK)%vgf = denf(itx,MK)%sgf + two*denf(it1,MK)%sgf
denf(itx,MK)%vfg = denf(itx,MK)%sfg + two*denf(it1,MK)%sfg
denf(itx,MK)%vff = denf(itx,MK)%sff + two*denf(it1,MK)%sff
end do
end do !--- End loop over 2*MKT
!$acc end parallel loop
When I compile the code with HPC 21.2, and the compile command line reads as
nvfortran -O4 -mcmodel=medium -mp=allcores -mp=bind -acc=gpu -gpu=cc70 -Minfo=accel -o
“denf” is a derived type variable with the size > 2GB, and the following is the definition:
TYPE DENSITF
DOUBLE PRECISION, DIMENSION(MSD, MSD) :: sgg, sff, sgf, sfg
DOUBLE PRECISION, DIMENSION(MSD, MSD) :: vgg, vff, vgf, vfg
END TYPE DENSITF
TYPE (DENSITF), DIMENSION(IBX, MKT*2) :: denf
Before I compile the code with PGI community edition 19.10, and it works well.
While I try to compile with NVIDIA HPC 21.2, it gives warning messages:
invalid tag
!51 = !DIBasicType(tag: DW_TAG_string_type, name: “character”, size: 64, align: 8, encoding: DW_ATE_signed)
invalid tag
!85 = !DIBasicType(tag: DW_TAG_string_type, name: “character”, size: 80, align: 8, encoding: DW_ATE_signed)
Then I run the code, it leads to the error message “call to cuStreamSynchronize returned error 700: Illegal address during kernel execution”.
I have no idea about the warning message above. The variable denf is defined in a module before “Contains”