Observed issues › afar-xnack1-present-not-enforced
AFAR offload runtime at HSA_XNACK=1: omp_target_is_present returns false after target enter data, and map(present) of an absent item does not terminate
Legality: not independently confirmed. no independent review yet How this is checked
Same issue as afar-xnack1-target-is-present; 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 | showreached the end: b1= 2 |
| 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 : (afar-xnack1-present-not-enforced.f90: 6) 0 inform, 0 warnings, 1 severes, 0 fatal for p |
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 (30 lines)
! (copy mode for the whole catalog): AFAR does not perform the
! runtime error termination of the present map-type-modifier at
! HSA_XNACK=1 (unified memory).
! a was never mapped, so on entry to the region it is not present and
! "runtime error termination is performed" (5.2 §5.8.3 p.152); the
! program has no requires directive, so unified memory does not change
! the rule.
! Expected: an error termination before the end (no "reached the end").
! Observed (tuolumne, MI300A, 2026-10-22, 3 runs each, -O2,
! OMP_TARGET_OFFLOAD=mandatory):
! - AFAR amdflang 24.0.0git at HSA_XNACK=1: "reached the end: b1= 2" (the
! region runs on the shared data); at HSA_XNACK=0: "omptarget message:
! device mapping required by 'present' map type modifier does not exist"
! and error termination, as required. AFAR amdclang (C programs) the same.
! - CCE 19.0.0, 20.0.2, 21.0.3: error termination in both modes ("Variable
! not found in present table").
! The catalog's map.present negative probes (Fortran and C, 5.2 and 6.0)
! read wrong at HSA_XNACK=1 and correct at HSA_XNACK=0 on AFAR.
! AFAR: amdflang -fopenmp --offload-arch=gfx942 -O2
! Run: OMP_TARGET_OFFLOAD=mandatory HSA_XNACK=1 ./a.out
program p
implicit none
integer :: a(64), b(64)
a = 1
b = 0
!$omp target map(present, to: a) map(from: b)
b = a + 1
!$omp end target
print *, 'reached the end: b1=', b(1)
end program p
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
reached the end: b1= 2
What the specification requires
The specification text this program relies on and the compiler is expected to support.
OpenMP 5.2 §5.8.3 p.152
runtime error termination is performed
Evidence
Same compiler, one change
- run at HSA_XNACK=0: AFAR 24.3.0: correct; CCE 19.0.0: correct; CCE 20.0.2: correct; CCE 21.0.3: correct; CCE 21.0.4: correct
Control program
program p implicit none integer :: a(64), b(64) a = 1 b = 0 !$omp target map(present, to: a) map(from: b) b = a + 1 !$omp end target print *, 'reached the end: b1=', b(1) end program p
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