Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29602 Discussions

do concurrent GPU offloading ICE

JorgeGV
Beginner
129 Views

The code attached below causes an ICE using 

 

ifx (IFX) 2025.3.2 20260112
Copyright (C) 1985-2026 Intel Corporation. All rights reserved.

 

Compiler output:

 

ifx -free -stand f18 -fiopenmp -fopenmp-targets=spir64 -fopenmp-target-do-concurrent -O3 -fp-model=precise mre2.F90
#0 0x00005564ca16ca41
#1 0x00005564ca1d2f87
#2 0x00005564ca1d30b5
#3 0x00007f744d2a9d00
#4 0x00005564c918db48
#5 0x00005564cab44930
#6 0x00005564cab446d8
#7 0x00005564cab2f3f6
#8 0x00005564cab7a0be
#9 0x00005564cab78adc
#10 0x00005564cab77064
#11 0x00005564cab3629f
#12 0x00005564cab32c3c
#13 0x00005564cab32707
#14 0x00005564cab329cd
#15 0x00005564cab7a3c1
#16 0x00005564cab78adc
#17 0x00005564cab77064
#18 0x00005564cab3629f
#19 0x00005564cab32c3c
#20 0x00005564cab32707
#21 0x00005564cab7a5c2
#22 0x00005564cab7990d
#23 0x00005564cab78adc
#24 0x00005564cab77064
#25 0x00005564cab3629f
#26 0x00005564cab32c3c
#27 0x00005564cab32707
#28 0x00005564cab32401
#29 0x00005564cab74f08
#30 0x00005564cab79b95
#31 0x00005564cab78adc
#32 0x00005564cab77064
#33 0x00005564cab3629f
#34 0x00005564cab32c3c
#35 0x00005564cab32707
#36 0x00005564cab7a5c2
#37 0x00005564cab7992c
#38 0x00005564cab78adc
#39 0x00005564cab77064
#40 0x00005564cab3629f
#41 0x00005564cab32c3c
#42 0x00005564cab32707
#43 0x00005564cab32401
#44 0x00005564cab74f08
#45 0x00005564cab90e9b
#46 0x00005564cab8fc2e
#47 0x00005564cab3629f
#48 0x00005564cab33bcc
#49 0x00005564cab33930
#50 0x00005564cab3347a
#51 0x00005564cab333c2
#52 0x00005564cab36279
#53 0x00005564cabbd416
#54 0x00005564caba6a54
#55 0x00005564cabc1f19
#56 0x00005564cabbef27
#57 0x00005564caba6fa3
#58 0x00005564c9906b59
#59 0x00005564c99062b1
#60 0x00005564c9295d20
#61 0x00005564ca10843b
#62 0x00005564ca105c9f
#63 0x00005564ca0add68
#64 0x00005564ca2943cf
#65 0x00007f744d29424d __libc_start_main + 239
#66 0x00005564c9ee523e

/tmp/ifx2007452938Eb2oyG/ifxsc4RFI.i90: error #5633: **Internal compiler error: segmentation violation signal raised** Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error.
compilation aborted for mre2.F90 (code 3)

 

Workaround is using associate(...) or hoisting the derived types into a flat impl. I believe the derived type allocatable should work inside the do concurrent. It does on amdflang and nvfortran. This was tested on Aurora. I don't have access to newer Intel IFX toolchains and Intel GPUs. Sorry! 

0 Kudos
1 Reply
ivanp
New Contributor I
39 Views

I tried reducing Jorge's example down a little further; I'm not sure it is triggering the same error or a different one. 

! mre_dc_ice.F90
program mre_dc_ice
implicit none
integer, parameter :: wp = kind(1.0d0)
type :: vc_t
    real(wp), allocatable :: h(:, :, :)
end type vc_t
type(vc_t) :: this
integer, parameter :: nx = 8, ny = 8, nz = 4
integer  :: i, j

allocate(this%h(nx, ny, nz), source=0.0_wp)

#if WORKAROUND
do concurrent(j=1:ny, i=1:nx) ! works
#else
do concurrent(j=1:size(this%h,2), i=1:size(this%h,1))   ! ICE
#endif
    this%h(i, j, :) = 1
end do

if (sum(this%h) /= real(size(this%h),wp)) then
    print *, "sum(h)   = ", sum(this%h)
    print *, "expected = ", size(this%h)
    error stop 1
end if
print *, "success"
end program

I compiled with the same flags, -O3 -fiopenmp -fopenmp-targets=spir64 -fopenmp-target-do-concurrent -fpp.
Adding -DWORKAROUND makes the example work as expected. 

Replacing one of the size() expressions with the actual fixed loop bound (nx or ny) happens to make the error go away.  

Tested using ifx 2025.3.2 via Compiler Explorer (https://godbolt.org/z/hTvbz4Maz).

0 Kudos
Reply