Observed issues › fuzz/s1-6888-cce21
Appears not to supportRefused at compile time · Fortran · OpenMP · Open
ftn: target update to(a(1:n:2)) rejected (ftn-1747, stride must not be greater than 1)
Legality: independently confirmed. 2 independent readings find the program legal and the result required. How this is checked
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 | correct | correct | correct | correct | correct | n/a | n/a |
| CCE 19.0.0 | not supported | not supported | not supported | unknown not run | unknown not run | n/a | n/a |
| CCE 20.0.2 | not supported | not supported | not supported | unknown not run | unknown not run | n/a | n/a |
| CCE 21.0.3 | not supported | not supported | not supported | unknown not run | unknown not run | n/a | n/a |
| CCE 21.0.4 | not supported | not supported | not supported | 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 | fails another way | fails another way | fails another way | fails another way | fails another way | fails another way | 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 |
|---|---|---|
| not supported | CCE 19.0.0, MI300A unified CCE 19.0.0, MI300A copy CCE 19.0.0, MI250X | showWarning:
Headers and libraries from cray-libsci/25.03.0 will be ignored because depends on PE_MPICH which is unavailable..
!$omp target update to(a(1:n:2))
^
ftn-1747 ftn: ERROR P, File = s1-6888-cce21.f90, Line = 11, Column = 27
The stride specified for array "A" must not be greater than 1. Subarray references in the MAP clause must be to contiguous memory.
Cray Fortran : 27 source lines
Cray Fortran : 1 errors, 0 warnings, 0 other messages, 0 ansi |
| not supported | CCE 20.0.2, MI300A unified CCE 20.0.2, MI300A copy CCE 20.0.2, MI250X | showWarning:
Headers and libraries from cray-libsci/25.09.0 will be ignored because depends on PE_MPICH which is unavailable..
!$omp target update to(a(1:n:2))
^
ftn-1747 ftn: ERROR P, File = s1-6888-cce21.f90, Line = 11, Column = 27
The stride specified for array "A" must not be greater than 1. Subarray references in the MAP clause must be to contiguous memory.
Cray Fortran : 27 source lines
Cray Fortran : 1 errors, 0 warnings, 0 other messages, 0 ansi |
| not supported | CCE 21.0.3, MI300A unified CCE 21.0.3, MI300A copy CCE 21.0.3, MI250X CCE 21.0.4, MI300A unified CCE 21.0.4, MI300A copy CCE 21.0.4, MI250X | showWarning:
Headers and libraries from cray-libsci/26.03.0 will be ignored because depends on PE_MPICH which is unavailable..
!$omp target update to(a(1:n:2))
^
ftn-1747 ftn: ERROR P, File = s1-6888-cce21.f90, Line = 11, Column = 27
The stride specified for array "A" in the MAP clause must not be greater than 1.
Cray Fortran : 27 source lines
Cray Fortran : 1 errors, 0 warnings, 0 other messages, 0 ansi |
| 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 : (s1-6888-cce21.f90: 11) 0 inform, 0 warnings, 1 severes, 0 fatal for p |
| fails another way | GCC 16.2.0, MI300A unified GCC 16.2.0, MI300A copy GCC 16.2.0, MI250X GCC 16.2.0, MI300X GCC 16.2.0, MI350X GCC 16.2.0, A100 separate | shows1-6888-cce21.f90:11:26:
11 | !$omp target update to(a(1:n:2))
| 1~~~~~~~
Error: Array is not contiguous at (1)
s1-6888-cce21.f90:11:26:
11 | !$omp target update to(a(1:n:2))
| 1~~~~~~~
Error: Stride should not be specified for array section in TO clause at (1) |
Reproduce
CCE 19.0.0, MI300A unified
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
CCE 20.0.2, MI300A unified
module load cce/20.0.2 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
CCE 21.0.3, MI300A unified
module load cce/21.0.3 craype-accel-amd-gfx942 rocm/7.2.0 module unload cray-mpich ftn -fopenmp -O2 repro.f90 -o repro HSA_XNACK=1 OMP_TARGET_OFFLOAD=mandatory ./repro
CCE 21.0.4, MI300A unified
module load cce/21.0.4 craype-accel-amd-gfx942 rocm/7.2.0 module unload cray-mpich ftn -fopenmp -O2 repro.f90 -o repro HSA_XNACK=1 OMP_TARGET_OFFLOAD=mandatory ./repro
AFAR 24.3.0, MI300A unified (runs correctly)
$AFAR/bin/amdflang -fopenmp --offload-arch=gfx942 -O2 repro.f90 -o repro HSA_XNACK=1 OMP_TARGET_OFFLOAD=mandatory ./repro
Program (72 lines)
! Finding: CCE 19, 20, 21 reject a strided array section in a
! motion clause of target update (ftn-1747 "The stride specified for array
! ... must not be greater than 1. Subarray references in the MAP clause
! must be to contiguous memory").
!
! Legal OpenMP 5.0-5.2: "A stride expression may not be specified unless
! otherwise stated" (5.2 §3.2.5 p.66) and the data-motion clauses state it:
! "The list items may include array sections with stride expressions"
! (5.2 §5.9 p.165); added in 5.0: "The target update construct (see Section
! 13.9) was modified to allow array sections that specify discontiguous
! storage" (5.2 §B.4 p.634). Only the map clause requires contiguous storage
! (5.2 §5.8.3 p.156). CCE claims full OpenMP 5.0 (intro_openmp(7) of 19.0.0,
! 20.0.2, 21.0.3). gfortran 13 rejects it too ("Stride should not be
! specified for array section in TO clause"): a limitation of gfortran, not
! a legality verdict. AFAR prints "error: stride cannot be specified on an
! array section" for strided sections of structure components (e.g.
! gs%k(1:n:2)); in s1 and s1x0 289 AFAR cells carry it and none of them
! agrees (194 compile_reject, 68 run_error, 17 wrong_code, 10 ICE), against
! 54% agree for the cells without it, and 22 of AFAR's 138 present-modifier
! aborts are among them (8 times the overall rate). The message is not
! always fatal; an AFAR defect with strided component sections is likely
! but was not reduced in this task. For a plain array, as here, AFAR is
! silent and correct.
! Expected: "RESULT check=pass" (the odd elements are doubled on the device
! and copied back; the even ones are not checked, since they depend on the
! memory mode).
!
! Observed (tuolumne, MI300A, -O2, HSA_XNACK=1 and 0, 2026-10-23,
! results/t28_probe/strided_update.f90.*.json):
! - CCE 19.0.0, 20.0.2, 21.0.3: compile error ftn-1747 at the target update
! (21.0.3 words it "... in the MAP clause must not be greater than 1.");
! - AFAR amdflang 24.0.0git: compiles, "RESULT check=pass" in both modes.
! - Tioga MI250X (gfx90a, HSA_XNACK=0): the same; CCE 19/20/21 reject,
! AFAR passes (results/t28_probe/g90/strided_update.cce21_g90.json).
! Fuzz campaign s1: 988 CCE cells (s1 and s1x0) fail on this diagnostic,
! verdict compiler_bug (rule R11 where AFAR compiles the program, decision
! D1 where every family rejects the program at different statements).
! Representative: s1 seed 6888 on cce21 (the confirmer's reduction,
! results/confirm/drafts/fuzz_s1_6888_cce21_gfx942_unified, keeps
! "!$omp target update to(gs%k(1:n:2))"); reproducer written by hand from
! it (data/evidence/dataenv_probe/strided_update.f90).
!
! ftn -fopenmp -O2 (cce19/cce20/cce21 recipes, offload/engine/toolchains.py)
program p
implicit none
integer, parameter :: n = 16
integer :: a(n), i
logical :: ok
a = 0
!$omp target enter data map(to: a)
do i = 1, n
a(i) = i
end do
!$omp target update to(a(1:n:2))
!$omp target
do i = 1, n
a(i) = 2 * a(i)
end do
!$omp end target
!$omp target exit data map(from: a)
ok = .true.
do i = 1, n
! the even elements are 0 with separate memory and 2 * i with
! shared memory: only the updated ones are checked
if (mod(i, 2) == 1) ok = ok .and. a(i) == 2 * i
end do
if (ok) then
print '(a)', 'RESULT check=pass'
else
print '(a)', 'RESULT check=fail'
end if
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
Expected
RESULT check=pass
Observed where it behaves incorrectly
Warning:
Headers and libraries from cray-libsci/25.03.0 will be ignored because depends on PE_MPICH which is unavailable..
!$omp target update to(a(1:n:2))
^
ftn-1747 ftn: ERROR P, File = s1-6888-cce21.f90, Line = 11, Column = 27
The stride specified for array "A" must not be greater than 1. Subarray references in the MAP clause must be to contiguous memory.
Cray Fortran : 27 source lines
Cray Fortran : 1 errors, 0 warnings, 0 other messages, 0 ansiWhat the specification requires
The specification text this program relies on and the compiler is expected to support.
OpenMP 5.2 §3.2.5 p.66
A stride expression may not be specified unless otherwise stated
OpenMP 5.2 §5.9 p.165
The list items may include array sections with stride expressions
OpenMP 5.2 §B.4 p.634
The target update construct (see Section 13.9) was modified to allow array sections that specify discontiguous storage
OpenMP 5.2 §5.8.3 p.156
Evidence
Same compiler, one change
- to(a(1:n)), without the stride (all elements updated): 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, parameter :: n = 16 integer :: a(n), i logical :: ok a = 0 !$omp target enter data map(to: a) do i = 1, n a(i) = i end do !$omp target update to(a(1:n)) !$omp target do i = 1, n a(i) = 2 * a(i) end do !$omp end target !$omp target exit data map(from: a) ok = .true. do i = 1, n if (mod(i, 2) == 1) ok = ok .and. a(i) == 2 * i end do if (ok) then print '(a)', 'RESULT check=pass' else print '(a)', 'RESULT check=fail' end if end program p
Other compilers run it correctly
AFAR 24.3.0