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

IFX 2025 results in forrtl: severe (170): Program Exception - stack overflow error

avinashs
New Contributor I
1,523 Views

I am merely running a previously successful project in IFORT with the compiler option changed to IFX. The project compiles successfully but produces the run time error forrtl: severe (170): Program Exception - stack overflow (shown in the DOS window) and Unhandled exception at 0x00007FF72C2BFEE7 in myifxprog.exe: 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x0000000148803000) in a MSVSC popup window. Any suggestions would be greatly appreciated as there is no diagnostic information available. I also noticed that the debugger is not displaying any variables or the variables have a red bullet with a cross in it (undefined address).

0 Kudos
6 Replies
jimdempseyatthecove
Honored Contributor III
1,400 Views

Enable all runtime checks, and run in Debug configuration. Something may show up.

Stack Overflow can occur when a temporary needs to be created for:

ArrayOut = (Array Expression)

 

If this be the case, then this can be corrected in two ways:

1) enable heap arrays

2) Replace the "offending" statement with DO loop(s)

 

Jim Dempsey

0 Kudos
avinashs
New Contributor I
1,335 Views

@jimdempseyatthecove Thanks for the suggestions. I enabled heap arrays but the error did not go away. The debugger halts at a subroutine name i.e. at

           -> subroutine mysub(arg1, arg2)

and not at a specific executable statement. So cannot narrow it down to a particular variable. Again, the program works fine in IFORT and gfortran so this is an IFX specific error.

0 Kudos
Ron_Green
Moderator
1,333 Views

 

Windows VS to set heap-arrays

 

PRoject Properties

  Fortran 

      Optimization

          Heap arrays set to 0

 

clean

Rebuild

run

 

If Linux use -heap-arrays

option. 

 

0 Kudos
avinashs
New Contributor I
1,224 Views

@Ron_Green This is exactly what I did. The error persists with heap arrays.

0 Kudos
TobiasK
Moderator
1,275 Views

@avinashs you may also show us how you define mysub and the subroutine that calls mysub.

@iu360 if you want some help you need to provide at least some information what your problem actually is, which code it triggers and under which circumstances. 

TobiasK
Moderator
992 Views

@avinashs 
could you please try to set heap-arrays not to zero but just leave it blank?

0 Kudos
Reply