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

Limits for Automatic arrays and array sections?

chstoyer
Beginner
517 Views
I tried searching the help and this forum and could not find anything.

I find that I get crashes (e.g stack overflow) if I use too large a range for automatic arrays and array operations. For example, the automatic array Y:

SUBROUTINE SUB (X,N)
DIMENSION X(N), Y(N)

or for array operations, for example

X(1:N)=Y(1:N)

When N is too large.

How big is too large and do I have any control over what is too large?

Thanks,

Charles
0 Kudos
1 Reply
Steven_L_Intel1
Employee
517 Views
The Microsoft linker sets the stack default size at 1MB. You can change this using the Linker > System > Stack Reserve Size property, or, and this is my recommendation, set the property Fortran > Optimization > Heap Arrays to 0. This will cause these arrays to be allocated on the heap, which has no fixed limit.
0 Kudos
Reply