Hi,
please consider the following test code:
MODULE testmod
IMPLICIT NONE
REAL, DIMENSION(:,:), ALLOCATABLE :: arr
INTEGER :: nxl, nxr, nyn, nys
!$omp declare target(arr)
!$omp declare target(nxl,nxr,nyn,nys)
CONTAINS
SUBROUTINE testsub
IMPLICIT NONE
INTEGER :: i, j
!$omp target
!$omp parallel do
DO j = nys, nyn
!$omp parallel do
DO i = nxl, nxr
arr(i,j) = arr(i,j)
ENDDO
ENDDO
!$omp end target
END SUBROUTINE testsub
END MODULE testmod
Upon compilation the nvfortran throws an internal compiler error:
$ module source /home/fuhl/software/nvhpc_2022_223/modulefiles/nvhpc/22.3
$ nvfortran -c -mp=gpu test.f90
NVFORTRAN-F-0000-Internal compiler error.
[Developers Only OpenMP Compiler Error]
"symbol .nxl_392(392) is team-private but we are returning false"
[Debug here: File:../src/ompaccel.c Line 3242, Function:ompac... (test.f90: 15)
NVFORTRAN/x86-64 Linux 22.3-0: compilation aborted
The error is not triggered, if either the omp target
pragma is removed, or if the code is compiled like this:
nvfortran -c -mp test.f90