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

Maximum size for arrays being passed to a subroutine??

bcruey
Beginner
507 Views
I have .f90 code that compiled and worked wayback when when I wrote it two years ago. I made some adjustments to the code but only cosmetic adjustments. I have since moved to a new computer with a different ifort compiler and it still works as long as I keep my arrays below 136X136. I compiled the program with a traceback and it points to a line in my code where I am calling one of my subroutines.

The error code that I get is:

severe (170): Program Exception - Stack Overflow

Is there a maximum size for arrays that are being passed to a subroutine forIntel Visual Fortran 10.0?

Do you have any other suggestions for what the issue might be?


0 Kudos
3 Replies
Steven_L_Intel1
Employee
507 Views
There is no maximum size, but you have not said what the error is. Is it "stack overflow" by any chance? If so, try adding the option /heap-arrays (if you're using Visual Studio, type this in under Command Line > Additional Options.)
0 Kudos
bcruey
Beginner
507 Views
There is no maximum size, but you have not said what the error is. Is it "stack overflow" by any chance? If so, try adding the option /heap-arrays (if you're using Visual Studio, type this in under Command Line > Additional Options.)

I tried typing in "/heap-arrays" from the intel Fortran Compiler for applications running on IA-32 command prompt. I got a message back saying that "/heap-arrays" is not an internal or external command. Not sure what I am doing wrong.

Also these are Allocatable arrays. does that matter?
0 Kudos
Steven_L_Intel1
Employee
507 Views
Are you building from the command line? If so, then add /heap-arrays as an option to the "ifort" command. No, it does not matter if the arrays are allocatable. Is the error a stack overflow? Can you show me the declaration of the subroutine or function you're calling (include declarations of all its arguments).
0 Kudos
Reply