Stack compiler/linker options

Stack compiler/linker options

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?

Linda
7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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?

Steve - Intel Developer Support

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.

Linda

Yes, recursion consumes stack.

I just opened the documentation from Visual Studio and typed /F into the index tab.

Steve - Intel Developer Support

got it -- it's under the "Linker or Linker Options" topic, by the way.

Linda

>>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

www.quickthreadprogramming.com

Leave a Comment

Please sign in to add a comment. Not a member? Join today