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

ICE error #5623 in HORSES3D CFD code

trprasanna
Novice
1,322 Views

I am observing the following error with Intel Fortran 2024.0.2, HPC Toolkit 2024.0.1+37, when compiling the open-source computational fluid-dynamic code HORSES3D which is written in Fortran :

 

 

================================
>>   Building Monitors    
================================



MonitorDefinitions.f90
ifx -cpp -O3 -assume bscc -D_has_Quad -fp-model precise -fopenmp -DNAVIERSTOKES -I./include_ns   -I/home/prasanna/Desktop/H3d_monitor/horses3d/Solver/include -I/home/prasanna/Desktop/H3d_monitor/horses3d/Solver/include_ns -c MonitorDefinitions.f90 -o build_ns/MonitorDefinitions.o -module  ./include_ns

Probe.f90
ifx -cpp -O3 -assume bscc -D_has_Quad -fp-model precise -fopenmp -DNAVIERSTOKES -I./include_ns   -I/home/prasanna/Desktop/H3d_monitor/horses3d/Solver/include -I/home/prasanna/Desktop/H3d_monitor/horses3d/Solver/include_ns -c Probe.f90 -o build_ns/Probe.o -module  ./include_ns

StatisticsMonitor.f90
ifx -cpp -O3 -assume bscc -D_has_Quad -fp-model precise -fopenmp -DNAVIERSTOKES -I./include_ns   -I/home/prasanna/Desktop/H3d_monitor/horses3d/Solver/include -I/home/prasanna/Desktop/H3d_monitor/horses3d/Solver/include_ns -c StatisticsMonitor.f90 -o build_ns/StatisticsMonitor.o -module  ./include_ns

SurfaceIntegrals.f90
ifx -cpp -O3 -assume bscc -D_has_Quad -fp-model precise -fopenmp -DNAVIERSTOKES -I./include_ns   -I/home/prasanna/Desktop/H3d_monitor/horses3d/Solver/include -I/home/prasanna/Desktop/H3d_monitor/horses3d/Solver/include_ns -c SurfaceIntegrals.f90 -o build_ns/SurfaceIntegrals.o -module  ./include_ns
          #0 0x000000000232d4ea
          #1 0x0000000002394d07
          #2 0x0000000002394cd6
          #3 0x00000000022f307a
          #4 0x0000000002425be4
          #5 0x000000000241bde0
          #6 0x000000000240ce68
          #7 0x00000000023e975d
          #8 0x00000000023e94e1
          #9 0x00000000023e3215
         #10 0x00000000023e37f5
         #11 0x00000000023695d9
         #12 0x00000000023692ab
         #13 0x000000000236b02f
         #14 0x00000000023e3215
         #15 0x00000000023e37f5
         #16 0x000000000241a5e3
         #17 0x00000000023e3215
         #18 0x00000000023e37f5
         #19 0x000000000240f671
         #20 0x0000000002410134
         #21 0x00000000023e3215
         #22 0x00000000023e37f5
         #23 0x00000000023e5f6d
         #24 0x00000000023e3215
         #25 0x00000000023e37f5
         #26 0x00000000023e0f02
         #27 0x00000000023e3215
         #28 0x00000000023e05ba
         #29 0x00000000023e3215
         #30 0x00000000022703e6
         #31 0x000000000226fd9e
         #32 0x0000000002452dbe
         #33 0x00007787f0a29d90
         #34 0x00007787f0a29e40 __libc_start_main + 128
         #35 0x00000000020ab129

SurfaceIntegrals.f90(81): error #5623: **Internal compiler error: internal abort** 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.
!$omp task depend(inout:elements(eID))
------^
compilation aborted for SurfaceIntegrals.f90 (code 3)
make[1]: *** [Makefile:83: build_ns/SurfaceIntegrals.o] Error 3

 

 

 The steps to reproduce this are as follows:

  1. Clone the code from github.
  2. cd to the directory Solver
  3. run in terminal : ./configure
  4. In the Makefile that is created in the Solver directory, replace all instances of ifort with ifx (find and replace)
  5. run in the terminal: make allclean && make ns COMPILER=ifx
  6. The compilation will begin but will stop at the above mentioned file in horses3d/Solver/src/libs/monitors

I tried changing the -fopenmp flag to -qopenmp or -fiopenmp but these didn't help. The code compiles well with ifort and gfortran.

 

Edit: I forgot to add, just for reference: The code compiles with ifx without openMP (by appending ENABLE_THREADS=NO in the make command).

Labels (1)
0 Kudos
1 Solution
Ron_Green
Moderator
1,250 Views

Bug ID is CMPLRLLVM-56914

 

I was able to reduce this down to the Trigger, shoveling out all the horse stuff to get this simple, self-contained reproducer. 

 

cat repro.f90
module HeckofaMessClass

  type Element
    integer :: count
  end type Element

  type HexMesh
    type(Element) :: elements(10)
  end type HexMesh

end module HeckofaMessClass

function ScalarSurfaceIntegral(mesh) result(val)
  use HeckofaMessClass
  implicit none

  class(HexMesh),      intent(inout), target  :: mesh
  real                      :: val

  class(Element), pointer    :: elements(:)
  integer  :: zonefID

  elements => mesh % elements

  do zonefID = 1, 10
    !$omp task depend(inout:elements(1))
    print*, 'this is a no-op'
    !$omp end task
  end do
  val = 0.0
 end function ScalarSurfaceIntegral

 and we only need ifx -O0 -qopenmp to get the ICE

ifx -O0 -qopenmp -c repro.f90 -what -V
Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2024.0.0 Build 20231017
Copyright (C) 1985-2023 Intel Corporation. All rights reserved.

 Intel(R) Fortran 24.0-1238.2
 #0 0x0000000002394df7 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x2394df7)
 #1 0x0000000002394dc6 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x2394dc6)
 #2 0x00000000022f316a (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x22f316a)
 #3 0x0000000002425ca4 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x2425ca4)
 #4 0x000000000241bea0 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x241bea0)
 #5 0x000000000240cf28 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x240cf28)
 #6 0x00000000023e984d (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x23e984d)
 #7 0x00000000023e95d1 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x23e95d1)
 #8 0x00000000023e3305 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x23e3305)
 #9 0x00000000023e38e5 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x23e38e5)
#10 0x00000000023696c9 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x23696c9)
#11 0x000000000236939b (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x236939b)
#12 0x000000000236b11f (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x236b11f)
#13 0x00000000023e3305 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x23e3305)
#14 0x00000000023e38e5 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x23e38e5)
#15 0x00000000023e605d (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x23e605d)
#16 0x00000000023e3305 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x23e3305)
#17 0x00000000023e06aa (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x23e06aa)
#18 0x00000000023e3305 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x23e3305)
#19 0x00000000022703e6 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x22703e6)
#20 0x000000000226fd9e (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x226fd9e)
#21 0x0000000002452e7e (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x2452e7e)
#22 0x00007f964e3d7b4a __libc_start_call_main (/lib64/libc.so.6+0x27b4a)
#23 0x00007f964e3d7c0b __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x27c0b)
#24 0x00000000020ab129 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x20ab129)

repro.f90(26): error #5623: **Internal compiler error: internal abort** 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.
    !$omp task depend(inout:elements(1))
----------------------^
compilation aborted for repro.f90 (code 3)

 

View solution in original post

7 Replies
Ron_Green
Moderator
1,275 Views

I am able to reproduce this ICE.  I'll get a bug report going.

I discussed this with our Fortran OpenMP lead this morning.  The TASK construct has always been very sensitive to clauses, data within the tasking region, etc.  ifort and ifx are very different in how OMP constructs, directives, and api calls are passed to the backend OMP runtime.  parsing is the same between the 2 compilers, but how we present the parsed data to the backend is very very different.  This is one of those cases where the ifx handling of complex data structures may not be getting translated (the data references specifically) and passed to the backend properly.

I'll let you know if a minor code tweak can help while we get this bug into our fix pipeline. 

trprasanna
Novice
1,262 Views

Thank you for the prompt response.

0 Kudos
Ron_Green
Moderator
1,251 Views

Bug ID is CMPLRLLVM-56914

 

I was able to reduce this down to the Trigger, shoveling out all the horse stuff to get this simple, self-contained reproducer. 

 

cat repro.f90
module HeckofaMessClass

  type Element
    integer :: count
  end type Element

  type HexMesh
    type(Element) :: elements(10)
  end type HexMesh

end module HeckofaMessClass

function ScalarSurfaceIntegral(mesh) result(val)
  use HeckofaMessClass
  implicit none

  class(HexMesh),      intent(inout), target  :: mesh
  real                      :: val

  class(Element), pointer    :: elements(:)
  integer  :: zonefID

  elements => mesh % elements

  do zonefID = 1, 10
    !$omp task depend(inout:elements(1))
    print*, 'this is a no-op'
    !$omp end task
  end do
  val = 0.0
 end function ScalarSurfaceIntegral

 and we only need ifx -O0 -qopenmp to get the ICE

ifx -O0 -qopenmp -c repro.f90 -what -V
Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2024.0.0 Build 20231017
Copyright (C) 1985-2023 Intel Corporation. All rights reserved.

 Intel(R) Fortran 24.0-1238.2
 #0 0x0000000002394df7 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x2394df7)
 #1 0x0000000002394dc6 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x2394dc6)
 #2 0x00000000022f316a (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x22f316a)
 #3 0x0000000002425ca4 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x2425ca4)
 #4 0x000000000241bea0 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x241bea0)
 #5 0x000000000240cf28 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x240cf28)
 #6 0x00000000023e984d (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x23e984d)
 #7 0x00000000023e95d1 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x23e95d1)
 #8 0x00000000023e3305 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x23e3305)
 #9 0x00000000023e38e5 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x23e38e5)
#10 0x00000000023696c9 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x23696c9)
#11 0x000000000236939b (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x236939b)
#12 0x000000000236b11f (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x236b11f)
#13 0x00000000023e3305 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x23e3305)
#14 0x00000000023e38e5 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x23e38e5)
#15 0x00000000023e605d (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x23e605d)
#16 0x00000000023e3305 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x23e3305)
#17 0x00000000023e06aa (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x23e06aa)
#18 0x00000000023e3305 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x23e3305)
#19 0x00000000022703e6 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x22703e6)
#20 0x000000000226fd9e (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x226fd9e)
#21 0x0000000002452e7e (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x2452e7e)
#22 0x00007f964e3d7b4a __libc_start_call_main (/lib64/libc.so.6+0x27b4a)
#23 0x00007f964e3d7c0b __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x27c0b)
#24 0x00000000020ab129 (/nfs/pdx/disks/cts2/tools/oneapi/2024.0.0/compiler/2024.0/bin/compiler/xfortcom+0x20ab129)

repro.f90(26): error #5623: **Internal compiler error: internal abort** 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.
    !$omp task depend(inout:elements(1))
----------------------^
compilation aborted for repro.f90 (code 3)

 

trprasanna
Novice
1,225 Views

Thank you. May I know where I could track this bug report to look out for future fixes?

0 Kudos
Ron_Green
Moderator
1,196 Views

@trprasanna right here on this Forum thread.  When we release an update we update each thread that has a bug ID to inform the reporter that their issue is addressed.

Devorah_H_Intel
Moderator
526 Views

This issue has been fixed in the recently released Intel Fortran Compiler, available for download as part of Intel HPC Toolkit 2024.2.1

trprasanna
Novice
489 Views
0 Kudos
Reply