Observed issues › fuzz/158-afar
AFAR offload runtime at HSA_XNACK=1: map(close, ...) breaks presence lookup and device access (abort, memory fault)
Legality: not independently confirmed. no independent review yet How this is checked
Same issue as fuzz/s1-9443-afar; this program is another reproducer of it.
Affected variants
| Compiler | MI300A gfx942 unified memory (XNACK 1) | MI300A gfx942 copy (XNACK 0) | MI250X gfx90a copy (XNACK 0) | MI300X gfx942 copy (XNACK 0) | MI350X gfx950 copy (XNACK 0) | A100 sm_80 separate memory | A100 sm_80 managed memory |
|---|---|---|---|---|---|---|---|
| AFAR 24.3.0 | behaves incorrectly | correct | unknown not run | correct | correct | n/a | n/a |
| CCE 19.0.0 | correct | correct | unknown not run | unknown not run | unknown not run | n/a | n/a |
| CCE 20.0.2 | correct | correct | unknown not run | unknown not run | unknown not run | n/a | n/a |
| CCE 21.0.3 | correct | correct | unknown not run | unknown not run | unknown not run | n/a | n/a |
| CCE 21.0.4 | correct | correct | unknown not run | unknown not run | unknown not run | n/a | n/a |
| NVHPC 25.11 | n/a | n/a | n/a | n/a | n/a | fails another way | fails another way |
| NVHPC 26.9 | n/a | n/a | n/a | n/a | n/a | fails another way | fails another way |
| GCC 16.2.0 | correct | correct | correct | correct | correct | correct | n/a |
"behaves incorrectly" / "not supported": this issue, confirmed in up to four environments (another build directory, another node, a repeat). "fails another way": a different failure, not counted as this issue. "unknown": not run there, or the runs disagree.
Messages
| Result | Compiler and GPU | Message |
|---|---|---|
| behaves incorrectly | AFAR 24.3.0, MI300A unified | showomptarget message: device mapping required by 'present' map type modifier does not exist for host address 0x0000555555b46880 (192 bytes)
omptarget error: Call to getTargetPointer returned null pointer ('present' map type modifier).
omptarget error: Call to targetDataBegin failed, abort target.
omptarget error: Failed to process data before launching the kernel.
omptarget error: Consult https://openmp.llvm.org/design/Runtimes.html for debugging options.
omptarget error: Source location information not present. Compile with -g or -gline-tables-only.
omptarget fatal error 1: failure of target construct while offloading is mandatory |
| fails another way | NVHPC 25.11, A100 separate NVHPC 25.11, A100 managed NVHPC 26.9, A100 separate NVHPC 26.9, A100 managed | showNVFORTRAN-S-0034-Syntax error at or near : (fuzz-158-afar.f90: 40) 0 inform, 0 warnings, 1 severes, 0 fatal for fuzz_prog |
Reproduce
AFAR 24.3.0, MI300A unified
$AFAR/bin/amdflang -fopenmp --offload-arch=gfx942 -O2 repro.f90 -o repro HSA_XNACK=1 OMP_TARGET_OFFLOAD=mandatory ./repro
CCE 19.0.0, MI300A unified (runs correctly)
module load cce/19.0.0 craype-accel-amd-gfx942 rocm/6.4.3 module unload cray-mpich ftn -fopenmp -O2 repro.f90 -o repro HSA_XNACK=1 OMP_TARGET_OFFLOAD=mandatory ./repro
Program (59 lines)
! Minimized by compliance.fuzz_min from fuzz seed 158 (fuzz-1).
! toolchain: afar (-O2, HSA_XNACK=1, OMP_TARGET_OFFLOAD=mandatory)
! failure: run_error (crash: SIGABRT)
! expected: runs to completion (the host run does)
! observed: device: fail crash: SIGABRT; host reference (afar/cce19) checksum=0
! Legal OpenMP 5.2: offload.engine.rules accepts it (offload.engine.prerun.check, rerun: with the
! race rule and the restriction checks); NVHPC is no witness: it rejects it
! (NVFORTRAN-S-0034-Syntax error at or near :); the check's other
! witness, the AFAR flang front end, is the compiler under test and is not counted; no gfortran
! or gcc is a legality witness.
module fuzz_mod
implicit none
contains
integer function g1(x, y)
!$omp declare target
integer, intent(in) :: x, y
g1 = mod(((x * mod(3, 3)) - x), 97)
end function g1
integer function g2(x, y)
!$omp declare target
integer, intent(in) :: x, y
g2 = mod(ior(y, y), 1009)
end function g2
end module fuzz_mod
program fuzz_prog
use omp_lib, only: omp_get_default_device, omp_is_initial_device
use fuzz_mod, only: g1, g2
implicit none
integer, parameter :: n = 48, m = 2
integer :: ia(n)
integer, allocatable :: ib(:)
integer :: ic(n, m)
integer :: o1(n)
integer :: i, j
integer(8) :: cs
allocate(ib(n))
do i = 1, n
ia(i) = mod(i * 46 + 10, 211) - 53
end do
do i = 1, n
ib(i) = mod(i * 15 + 21, 30011) - 9080
end do
do j = 1, m
do i = 1, n
ic(i, j) = mod((i + 3 * j) * 30 + 28, 97) - 18
end do
end do
o1 = 0
! fuzz: kernels
!$omp target enter data map(to: ia, ib, ic, o1)
!$omp target map(close, present, tofrom: ib(1:n))
!$omp end target
! fuzz: checksum
cs = 0
do i = 1, n
cs = modulo(cs * 31_8 + int(o1(i), 8), 2147483629_8)
end do
print '(a,i0,a,i0)', 'RESULT checksum=', cs, ' ran_on_host=', 0
end program fuzz_prog
Something to add? Dispute its legality · Report it fixed in a newer release · Report a mistake on this page
Expected and observed
Observed where it behaves incorrectly
omptarget message: device mapping required by 'present' map type modifier does not exist for host address 0x0000555555b46880 (192 bytes)
omptarget error: Call to getTargetPointer returned null pointer ('present' map type modifier).
omptarget error: Call to targetDataBegin failed, abort target.
omptarget error: Failed to process data before launching the kernel.
omptarget error: Consult https://openmp.llvm.org/design/Runtimes.html for debugging options.
omptarget error: Source location information not present. Compile with -g or -gline-tables-only.
omptarget fatal error 1: failure of target construct while offloading is mandatoryWhat the specification requires
The specification text this program relies on and the compiler is expected to support.
The same requirement as the issue fuzz/s1-9443-afar.
OpenMP 5.2 §5.8.3
Evidence
Other compilers run it correctly
CCE 19.0.0, CCE 20.0.2, CCE 21.0.3, CCE 21.0.4, GCC 16.2.0