- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Another person looking at our code experienced a stack overflow with one of the input files. And then put on Stack options for compile (/F) and Link (STACK:)
I cannot find these in the current compiler (Fortran 2013/ X13) documentation. Are they still viable?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, and they're still documented. /STACK is a linker option, so if you want to use it from the command line, precede it with /LINK and put it at the end of the line, for example:
ifort foo.f90 /link /stack:100000000
/F is documented and is a compiler option (though it turns into a linker option) - it has to be used on the ifort command that links the program.
May I suggest you try /heap-arrays first?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I did try heap arrays on the module that was indicated as causing the problem but it didn't seem to help. Nor could I exactly duplicate the problem. Would deep recursion also cause a stack overflow?
I couldn't locate /F in the recent compiler options documentation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, recursion consumes stack.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just opened the documentation from Visual Studio and typed /F into the index tab.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
got it -- it's under the "Linker or Linker Options" topic, by the way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>Would deep recursion also cause a stack overflow?
Is a significant portion of locally declared data having the characteristic of NOT being required to be preserved through a recursion?
If so, then these could be SAVE, or thread local SAVE, or other means such that there is but one copy.
Jim Dempsey
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page