Observed issues › catalog/cce-acc-allocate-in-compute-crash
Appears to behave incorrectlyCrashes or aborts at run time · Fortran · OpenACC · Open
ftn: ALLOCATE/DEALLOCATE of a local allocatable in device code aborts (SIGABRT), OpenMP and OpenACC
Legality: not independently confirmed. no independent review yet How this is checked
Same issue as catalog/cce-flang-allocate-in-target-crash; 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 | n/a | n/a | n/a | n/a | n/a | n/a | n/a |
| CCE 19.0.0 | behaves incorrectly | behaves incorrectly | behaves incorrectly | unknown not run | unknown not run | n/a | n/a |
| CCE 20.0.2 | behaves incorrectly | behaves incorrectly | behaves incorrectly | unknown not run | unknown not run | n/a | n/a |
| CCE 21.0.3 | behaves incorrectly | behaves incorrectly | behaves incorrectly | unknown not run | unknown not run | n/a | n/a |
| CCE 21.0.4 | behaves incorrectly | behaves incorrectly | behaves incorrectly | 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 | CCE 19.0.0, MI300A unified | show:0:rocdevice.cpp :2994: 1714753759840 us: Callback: Queue 0x155545600000 aborting with error : HSA_STATUS_ERROR_EXCEPTION: An HSAIL operation resulted in a hardware exception. code: 0x1016 |
| behaves incorrectly | CCE 19.0.0, MI300A copy | show:0:rocdevice.cpp :2994: 1714760781508 us: Callback: Queue 0x155545600000 aborting with error : HSA_STATUS_ERROR_EXCEPTION: An HSAIL operation resulted in a hardware exception. code: 0x1016 |
| behaves incorrectly | CCE 19.0.0, MI250X | show:0:rocdevice.cpp :2994: 1570956944340 us: Callback: Queue 0x155545600000 aborting with error : HSA_STATUS_ERROR_EXCEPTION: An HSAIL operation resulted in a hardware exception. code: 0x1016 |
| behaves incorrectly | CCE 20.0.2, MI300A unified | show:0:rocdevice.cpp :2994: 1715110980932 us: Callback: Queue 0x155545600000 aborting with error : HSA_STATUS_ERROR_EXCEPTION: An HSAIL operation resulted in a hardware exception. code: 0x1016 |
| behaves incorrectly | CCE 20.0.2, MI300A copy | show:0:rocdevice.cpp :2994: 1715127167799 us: Callback: Queue 0x155545600000 aborting with error : HSA_STATUS_ERROR_EXCEPTION: An HSAIL operation resulted in a hardware exception. code: 0x1016 |
| behaves incorrectly | CCE 20.0.2, MI250X | showACC: ERROR: invalid dope vector (dv_versn=0) 'w(:)' from cce-acc-allocate-in-compute-crash.f90:14 ACC: libcrayacc/acc_dopevector.c:34 CRAY_ACC_ERROR - Invalid dope vector |
| behaves incorrectly | CCE 21.0.3, MI300A unified CCE 21.0.3, MI300A copy CCE 21.0.4, MI300A unified CCE 21.0.4, MI300A copy | showACC: ERROR: invalid dope vector (dv_versn=47) 'w(:)' from cce-acc-allocate-in-compute-crash.f90:14 ACC: libcrayacc/acc_dopevector.c:34 CRAY_ACC_ERROR - Invalid dope vector |
| behaves incorrectly | CCE 21.0.3, MI250X | show:0:rocdevice.cpp :3586: 1570926103836 us: Callback: Queue 0x155545200000 aborting with error : HSA_STATUS_ERROR_EXCEPTION: An HSAIL operation resulted in a hardware exception. code: 0x1016 ACC: libcrayacc/acc_hw_amd.c:1496 CRAY_ACC_ERROR - hipStreamSynchronize returned hipErrorLaunchFailure: 'unspecified launch failure' from cce-acc-allocate-in-compute-crash.f90:23 ACC: libcrayacc/acc_hw_amd.c:1476 CRAY_ACC_ERROR - hipDeviceSynchronize returned hipErrorLaunchFailure: 'unspecified launch failure' Thread execution stopped at FILE cce-acc-allocate-in-compute-crash.f90 LINE 18 due to a Fortran allocate/deallocate statement. Kernel Name: wide_prog_$ck_L14_1 VGPU=0x8ef9b0 SWq=0x15555537e000, HWq=0x155545200000, id=1 Dispatch Header =0xb02 (type=2, barrier=1, acquire=1, release=1), setup=0 grid=[1, 1, 1], workgroup=[1, 1, 1] |
| behaves incorrectly | CCE 21.0.4, MI250X | show:0:rocdevice.cpp :3586: 1570854166473 us: Callback: Queue 0x155545200000 aborting with error : HSA_STATUS_ERROR_EXCEPTION: An HSAIL operation resulted in a hardware exception. code: 0x1016 ACC: libcrayacc/acc_hw_amd.c:1496 CRAY_ACC_ERROR - hipStreamSynchronize returned hipErrorLaunchFailure: 'unspecified launch failure' from cce-acc-allocate-in-compute-crash.f90:23 ACC: libcrayacc/acc_hw_amd.c:1476 CRAY_ACC_ERROR - hipDeviceSynchronize returned hipErrorLaunchFailure: 'unspecified launch failure' Thread execution stopped at FILE cce-acc-allocate-in-compute-crash.f90 LINE 18 due to a Fortran allocate/deallocate statement. Kernel Name: wide_prog_$ck_L14_1 VGPU=0x8ef9b0 SWq=0x15555537e000, HWq=0x155545200000, id=1 Dispatch Header =0xb02 (type=2, barrier=1, acquire=1, release=1), setup=0 grid=[1, 1, 1], workgroup=[1, 1, 1] |
| 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-1219-Unimplemented feature: BLOCK construct in the scope of a parallel directive. (cce-acc-allocate-in-compute-crash.f90: 16) 0 inform, 0 warnings, 1 severes, 0 fatal for wide_prog |
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 -h acc -O2 repro.f90 -o repro HSA_XNACK=1 ./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 -h acc -O2 repro.f90 -o repro HSA_XNACK=1 ./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 -h acc -O2 repro.f90 -o repro HSA_XNACK=1 ./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 -h acc -O2 repro.f90 -o repro HSA_XNACK=1 ./repro
GCC 16.2.0, MI300A unified (runs correctly)
export LD_LIBRARY_PATH=$GCC_16_2/lib64:/opt/rocm-7.2.1/lib $GCC_16_2/bin/gfortran -fopenacc -foffload=amdgcn-amdhsa -foffload-options=amdgcn-amdhsa=-march=gfx942 -O2 repro.f90 -o repro HSA_XNACK=1 ./repro
Program (59 lines)
! # Draft finding: acc34-w-allocate-in-device on cce19
!
! - compiler: cce19
! - toolchain: cce19; arch: gfx942; machine: tuolumne; memory mode: unified; opt: -O2
! - program: catalog acc34-w-allocate-in-device (f90, version 34, sha256 bc9f4dc73a5f7637)
! - expected: check=pass (trusted; elision + model)
! - actual: crash (crash: SIGABRT)
! - verdict: compiler_bug by rule R20-runtime-bug: a legal program fails at run time, deterministically, against an expected value
! from two or more independent sources with an executed witness, and another toolchain, mode, arch or the elision gives the
! expected value
! - reason: expected trusted check=pass (elision + model): stored main verdict: elision + model agree; witnesses: elision
! - citations: RUL-DERIVED-NEEDS-EXECUTION (rulings.md); RUL-WITNESS-PER-MODE (rulings.md);
! RUL-SAME-COMPILER-RUNS (rulings.md); RUL-PRESENCE-WITNESS (rulings.md); RUL-METAMORPHIC-OTHER-FAMILY
! (rulings.md)
! - legality: legal: offload.engine.prerun.check accepts it (rerun: offload.engine.rules with the
! race rule and the restriction checks, and the AFAR flang front end, not under test here); no
! compiler under test, gfortran or gcc is a legality witness
! - witnesses: elision
! - withdrawn: none
!
! Generated by compliance.widen (OpenACC 3.4, free-form Fortran; catalog widening). Do not edit.
! id: acc34-w-allocate-in-device
! primary atom: base.device.allocate
! atoms: base.device.allocate
! legal: yes
! observable: yes
! ran_on_host: inside the compute region of interest (acc_on_device)
! evidence: construct
! needs: none
! std: f2008
! feature: ALLOCATE and DEALLOCATE of a local allocatable array in a target region
! spec: OpenACC 3.4 §1.8, p.16: Fortran 2008 is a normative base language (the features whose use is unspecified are listed there;
! this is not one of them)
program wide_prog
use openacc, only: acc_device_host, acc_on_device
implicit none
integer, parameter :: n = 64
integer :: a(n), b(n), ref(n)
integer :: i, host_flag
logical :: ok
do i = 1, n
a(i) = i
b(i) = 0
ref(i) = 2*i + 1
end do
host_flag = 1
!$acc serial copyin(a) copyout(b) copy(host_flag)
host_flag = merge(1, 0, acc_on_device(acc_device_host))
block
integer, allocatable :: w(:)
allocate(w(n))
w = 2*a + 1
b = w
deallocate(w)
end block
!$acc end serial
ok = all(b == ref)
print '(a,i0,a,a)', 'RESULT ran_on_host=', host_flag, ' check=', merge('pass', 'fail', ok)
end program wide_prog
Something to add? Dispute its legality · Report it fixed in a newer release · Report a mistake on this page
Expected and observed
Expected
check=pass
Observed where it behaves incorrectly
:0:rocdevice.cpp :2994: 1714753759840 us: Callback: Queue 0x155545600000 aborting with error : HSA_STATUS_ERROR_EXCEPTION: An HSAIL operation resulted in a hardware exception. code: 0x1016
What the specification requires
The specification text this program relies on and the compiler is expected to support.
OpenACC 3.4 §1.8 p.16
Evidence
Same compiler, one change
- w a fixed-size local array (no ALLOCATE/DEALLOCATE): CCE 19.0.0: correct; CCE 20.0.2: correct; CCE 21.0.3: correct; CCE 21.0.4: correct
Control program
program wide_prog use openacc, only: acc_device_host, acc_on_device implicit none integer, parameter :: n = 64 integer :: a(n), b(n), ref(n) integer :: i, host_flag logical :: ok do i = 1, n a(i) = i b(i) = 0 ref(i) = 2*i + 1 end do host_flag = 1 !$acc serial copyin(a) copyout(b) copy(host_flag) host_flag = merge(1, 0, acc_on_device(acc_device_host)) block integer :: w(n) w = 2*a + 1 b = w end block !$acc end serial ok = all(b == ref) print '(a,i0,a,a)', 'RESULT ran_on_host=', host_flag, ' check=', merge('pass', 'fail', ok) end program wide_prog
Other compilers run it correctly
GCC 16.2.0