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

Stack Overflow

Arm_N_
Beginner
693 Views

Hi,

I have an error message forrtl: severe(170): Program exception - stack overflow

My program is doing some grid search.  It ran with a small number of grids, but then I got this message when I increase the number of grids to the realistic level.  I read the topic https://software.intel.com/en-us/forums/topic/299402 but I still don't understand.  ( I use Intel Visual Fortran Compiler with IMSL libraries (use include 'link_fnl_static_hpc.h') and I ran the program by clicking Start without debugging so I don't know what  "ifort" is.

Anyone could suggest me the way out of this ?

Thank you very much.

0 Kudos
1 Solution
Steven_L_Intel1
Employee
693 Views

My usual first recommendation is to set the project property Fortran > Optimization > Heap Arrays to 0. (If compiling from the command line, use /heap-arrays ) This tells the compiler to use the dynamic heap instead of the stack for temporary array copies. I'd also suggest you look at the traceback to see WHERE in the program this error occurs and see if you can avoid needing a temporary or large automatic arrays (local arrays whose dimension is based on a dummy argument.)

View solution in original post

0 Kudos
2 Replies
Steven_L_Intel1
Employee
694 Views

My usual first recommendation is to set the project property Fortran > Optimization > Heap Arrays to 0. (If compiling from the command line, use /heap-arrays ) This tells the compiler to use the dynamic heap instead of the stack for temporary array copies. I'd also suggest you look at the traceback to see WHERE in the program this error occurs and see if you can avoid needing a temporary or large automatic arrays (local arrays whose dimension is based on a dummy argument.)

0 Kudos
Arm_N_
Beginner
693 Views

Your suggestion worked.  Thank you very much !
I will also look for what you also suggested. 
 

0 Kudos
Reply