- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm passing 4 integers as arguments from a C routine to a Fortran routine and I get stack overflow right at the beginning of the Fortran routine. I'm pretty sure thatI haveC and Fortran complier switch mismatch, but I have tried all possible configurations that I can think of and nothing works. Can someone please help me figure outwhich one of my switches is incorrect?
Thanks.
Env: Intel Fortran compiler 8.1, Microsoft VS.net 2003
CCFLAGS: /nologo /GX /GR /Zm1000 /MD /Od /RTC1 /Z7 /W3
FFLAGS: /nologo /Gm /Zl /4L132 /4Ya /libs:dll /threads /fpscomp:all /Zi /Zd /Quse_vcdebug /debug:full /Quppercase
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ChangeRTC1 to RTCs and see if it helps; it catches calling convention mismatches
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The usual cause of this kind of stack overflow is not enough memory for allocation of stack for temporary variables in the subroutine. To see if this is the case, try reducing the size of any large arrays. You can also do this by stepping through the disassembled code starting with the call to the Fortran routine, if you're familiar with this technique.
If it is a case of too much temporary storage required, you can increase the available stack in your project's property pages. For my project, which is mixed C++ and Fortran, this is under Configuration properties/Linker/Systen/Stack reserve size.

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