- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page