Observed issues › cce-acc-init-set-runtime-assert
Appears to behave incorrectlyCrashes or aborts at run time · Fortran · OpenACC · Open
ftn -h acc: !$acc init and !$acc set default_async abort in the runtime ("Incorrect device type set")
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 | 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 | correct | correct |
| 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 |
|---|---|---|
| behaves incorrectly | CCE 19.0.0, MI300A unified CCE 19.0.0, MI300A copy CCE 19.0.0, MI250X | showrepro: libcrayacc/acc_runtime.c:4171: void _cray_acc_init_device(acc_device_t, int): Assertion `(device_type == CurrentHardware->get_device_type()) && "Incorrect device type set !!!"' failed. |
| behaves incorrectly | CCE 20.0.2, MI300A unified CCE 20.0.2, MI300A copy CCE 20.0.2, MI250X | showrepro: libcrayacc/acc_runtime.c:4368: void _cray_acc_init_device(acc_device_t, int): Assertion `(device_type == CurrentHardware->get_device_type()) && "Incorrect device type set !!!"' failed. |
| behaves incorrectly | 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 | showrepro: libcrayacc/acc_runtime.c:4450: void _cray_acc_init_device(acc_device_t, int): Assertion `(device_type == CurrentHardware->get_device_type()) && "Incorrect device type set !!!"' failed. |
| fails another way | NVHPC 25.11, A100 separate NVHPC 25.11, A100 managed | showNVFORTRAN-S-0038-Symbol, acc_get_default_async, has not been explicitly declared (cce-acc-init-set-runtime-assert.f90: 1) 0 inform, 0 warnings, 1 severes, 0 fatal for t |
| 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 | showcce-acc-init-set-runtime-assert.f90:6:9:
6 | !$acc init
| 1
Error: Unclassifiable OpenACC directive at (1)
cce-acc-init-set-runtime-assert.f90:12:9:
12 | !$acc set default_async(2)
| 1
Error: Unclassifiable OpenACC directive 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 -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
NVHPC 26.9, A100 separate (runs correctly)
export LD_LIBRARY_PATH=$NVHPC_26_9/compilers/lib nvfortran -acc=gpu -gpu=cc80 -gpu=mem:separate -O2 repro.f90 -o repro ./repro
Program (29 lines)
! OpenACC 3.4 §2.14.1 (init; with no clause all devices are initialized)
! and §2.14.3 (set default_async). Legal. Expected output: ok 2 then
! ok 2 2. Compile: ftn -h acc -O2. Variants that abort the same way:
! `!$acc set device_num(0)`, `!$acc shutdown device_type(radeon)` (device-
! number assertion); `!$acc init device_type(radeon)` works.
! The catalog's acc34-directive-init, -set and -shutdown programs
! (no clauses) abort on CCE 19, 20 and 21 in both memory modes and on
! MI250X: "_cray_acc_init_device ... Incorrect device type set" and, for
! a plain `!$acc shutdown`, "_cray_acc_shutdown_device ... Shutting down
! incorrect device type" (results/acc_matrix.jsonl).
program t
use openacc
implicit none
integer :: a(8), i
a = 1
!$acc init
!$acc parallel loop copy(a)
do i = 1, 8
a(i) = 2
end do
print *, 'ok', a(1)
!$acc set default_async(2)
!$acc parallel loop copy(a) async
do i = 1, 8
a(i) = 2
end do
!$acc wait(2)
print *, 'ok', a(1), acc_get_default_async()
end program t
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
repro: libcrayacc/acc_runtime.c:4171: void _cray_acc_init_device(acc_device_t, int): Assertion `(device_type == CurrentHardware->get_device_type()) && "Incorrect device type set !!!"' failed.
What the specification requires
The specification text this program relies on and the compiler is expected to support.
OpenACC 3.4 §2.14.1
OpenACC 3.4 §2.14.3
Evidence
Same compiler, one change
- device_type(radeon) added to the init and set directives: CCE 19.0.0: correct; CCE 20.0.2: correct; CCE 21.0.3: correct; CCE 21.0.4: correct
Control program
program t use openacc implicit none integer :: a(8), i a = 1 !$acc init device_type(radeon) !$acc parallel loop copy(a) do i = 1, 8 a(i) = 2 end do print *, 'ok', a(1) !$acc set default_async(2) device_type(radeon) !$acc parallel loop copy(a) async do i = 1, 8 a(i) = 2 end do !$acc wait(2) print *, 'ok', a(1), acc_get_default_async() end program t
Other compilers run it correctly
NVHPC 26.9