- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In this related thread it is mentioned that stack overflows should be dealt with using /heap-arrays (Fortran > Optimization > Heap Arrays > 0). (that means specify 0, not a number >0).
Quite a few years ago I dealt with such a problem with the Linker/System/Stack Reserve size option, i.e. /STACK:50000000, probably at Dr. Fortran's suggestion, but maybe not, it was so long ago.
Is Heap Arrays now the recommended way? Are there any gotcha's to be aware of? This is with regards to a console EXE program running in Windows.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Remind me not to stand to close to you - you seem to attract errors a lot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I understand your thinking, John. Many of my problems indeed are self-inflicted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My first recommendation is to enable heap-arrays.
If you do choose /LINK /STACK, don't start with a high value. Start at 100000000 and increase in units of the same. Too high a value will prevent the program from running at all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'll give heap-arrays a shot. Given that in visual studio this option is on the Fortran/Optimizations tab, is this option affected by other optimization settings?
For a long time now I have been using /stack with 50 million without any trouble. I was revisiting this because overflow happened today when running a Release build for which I forgot to set it. It also requires running a calculation case with a relatively large input model since small models do not trigger it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is not affected by anything else.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page