Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
27241 Discussions

Internal compiler error with SPREAD function

Alice_Faure
Beginner
503 Views

Good morning,

I recently encountered an ICE (catastrophic error: **Internal compiler error: segmentation violation signal raised**) when trying to compile this code in modern Fortran with ifort 19.1.3.304. With gfortran it compiles without error.

If I replace n-1 by its value in the spread function it compiles without error with ifort as well.

 

  program test

  implicit none

  integer, parameter :: n = 5
  real :: array(n) = [1, spread(2,1,n-1)]

  ...

  end program

 

Thank you,

Alice

0 Kudos
6 Replies
FortranFan
Honored Contributor II
481 Views

@Alice_Faure ,

If you have access to Intel Online Support Center (OSC), please submit a support request with a high priority - see below also as to why:

https://supporttickets.intel.com/servicecenter?lang=en-US

So you may know Intel now offers Intel oneAPI toolkits where Fortran compilers - IFORT classic and new  IFX - are free.  oneAPI 2021.3 is the latest offering:

https://community.intel.com/t5/Intel-Fortran-Compiler/AVAILABLE-NOW-oneAPI-2021-3-Release/m-p/129886...

What you will find is the ICE you report with SPREAD is not encountered with this 2021.3 Release but there is another problem which a Fortranner might see as far worse i.e., the wrong result is produced:

   integer, parameter :: n = 5
   real :: a(n) = [ 1, spread(2,1,n-1) ]
   print *, "a = ", a
end
C:\Temp>ifort /standard-semantics a.f90
Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.3.0 Build 20210609_000000
Copyright (C) 1985-2021 Intel Corporation.  All rights reserved.

Microsoft (R) Incremental Linker Version 14.29.30038.1
Copyright (C) Microsoft Corporation.  All rights reserved.

-out:a.exe
-subsystem:console
a.obj

C:\Temp>a.exe
 a =  1.000000 0.000000 0.000000 0.000000 0.000000

C:\Temp>

Hence my hope this can be brought to Intel's attention and for the Intel Fortran team to review the issue urgently.  These are the kind of troubling issues where a software provider ideally will deliver a hotfix.  Unfortunately that does not seem to be part of the Intel workflow with IFORT.

 

Alice_Faure
Beginner
446 Views

@FortranFan , thank you for your answer. Following your suggestion I tried submitting it to the OSC but I got this message :

"Support for the product selected is through the Intel Community Forums."

And it was impossible to send my support request.

Barbara_P_Intel
Moderator
428 Views

Good to know the ICE is fixed in oneAPI 2021.3.0!   Let me check the runtime error.

 

Barbara_P_Intel
Moderator
414 Views

Another developer reported this runtime issue recently. I added your reproducer to the existing bug. I'll let you know its progress to a fix.



Barbara_P_Intel
Moderator
228 Views

The internal compiler error reported using SPREAD() is fixed in the Fortran compiler that was released this week. ifort 2021.5.0 is part of oneAPI HPC Toolkit 2022.1.  AND SPREAD() does the right thing.

Please try it out!

HAPPY HOLIDAYS!

 

Alice_Faure
Beginner
114 Views

I tested it, it works perfectly. Thank you very much !

Reply