OMP008 implicit-target-map
warning enabled by defaultThe compiler maps data implicitly for an OpenMP target region (nvfortran: 'Generating implicit map').
Why
Variables used in a target region without a map clause are mapped implicitly; arrays default to tofrom, a copy in and out at every execution of the region. In an iterative loop that is a transfer per iteration. Keep the data on the device with target enter data / target data and map exactly what each region needs (map(to:), map(from:), or nothing when present). Reported only with fobis lint --compiler-feedback LOG (see the linting guide).
Reported
fortran
!$omp target teams distribute parallel do ! nvfortran: Generating implicit map(tofrom:y(:))
do i = 1, n
y(i) = 2 * y(i)
end doPreferred
fortran
!$omp target enter data map(to: y)
...
!$omp target teams distribute parallel doSuppressing
For one occurrence, with the reason on the same line (or alone on the line before the statement):
fortran
! fobis: ignore[OMP008] <why this occurrence is fine>For the whole project, ignore = OMP008 in the fobos [lint] section.