I am trying to use map(present ... )
in our OpenMP directives, but they appear to mostly cause parsing errors. The following example is from the GFortran test suite (map-11.f90
):
program main
implicit none
integer, parameter :: N = 1000
integer :: a(N), b(N), c(N), i
! Should be able to parse 'present' map modifier.
!$omp target enter data map (present, to: a, b)
!$omp target data map (present, to: a, b) map (always, present, from: c)
!$omp target map (present, to: a, b) map (present, from: c)
do i = 1, N
c(i) = a(i) + b(i)
end do
!$omp end target
!$omp end target data
!$omp target exit data map (always, present, from: c)
! Map clauses with 'present' modifier should go ahead of those without.
!$omp target map (to: a) map (present, to: b) map (from: c)
do i = 1, N
c(i) = a(i) + b(i)
end do
!$omp end target
end program
When I compile it with Nvfortran 24.5 using the following flags:
$ nvfortran -mp -Minfo=all map-11.f90
then I get the following errors:
NVFORTRAN-S-0034-Syntax error at or near : (map-11.f90: 7)
NVFORTRAN-S-0034-Syntax error at or near : (map-11.f90: 9)
NVFORTRAN-S-0034-Syntax error at or near : (map-11.f90: 10)
NVFORTRAN-S-0034-Syntax error at or near , (map-11.f90: 17)
NVFORTRAN-S-0034-Syntax error at or near : (map-11.f90: 20)
Is map(present ...)
currently supported? If not, are there any plans to add support for this clause modifier? (AFAIK it was introduced in OpenMP 5.2).