Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Increasing stack size in CVF?

stratoskier
Beginner
1,629 Views

Greetings,

I was hoping someone here might recall how to increase the stack size in good ol' Compaq Visual Fortran (Version 6.6).  I'm getting a stack overflow error when dealing with some big matrices.  I'm compiling and linking from within Visual Studio so I need to find where to raise the stack from within the menus or options within that environment, rather than from the command line.  I'm sure there's a wayto handle this in Visual Studio, but the Release Notes only give the command line syntax and it's been years since I did anything from there.

I'd be grateful for any assistance!

Cheers,

Bert

0 Kudos
8 Replies
jimdempseyatthecove
Honored Contributor III
1,629 Views
From VS project properties | Linker | System | Stack Reserve Size (and/or Stack Commit Size) Your VS properties windows may differ somewhat (mine is VS 2010). Jim Dempsey
0 Kudos
Steven_L_Intel1
Employee
1,629 Views
It's "Stack Reserve Size".
0 Kudos
stratoskier
Beginner
1,629 Views
Sorry -- I still can't find it. Do you mean (from menus) Project/Settings -> Link tab ? If so, there is no "System" listed in "Categories" there, and I don't see anything related to the Stack Reserve size. I must be on the wrong track. My Visual Studio is 2000 or 2002, I think.
0 Kudos
Steven_L_Intel1
Employee
1,630 Views
If you are using CVF, then you are using Visual Studio '98. It's under Link > Output.
0 Kudos
stratoskier
Beginner
1,630 Views
Ah !! There it is -- thank you! If I may followup -- The value now appearing for Reserve is 0x3d0900, which is a rather oblique format to me. What kind of value would I enter to incrementally increase the reserve?
0 Kudos
Steven_L_Intel1
Employee
1,630 Views
That's hexadecimal - 4000000 in decimal. You can just enter a decimal number - try 10000000 to start and bump it up 5 million at a time as needed.
0 Kudos
stratoskier
Beginner
1,630 Views
Gotcha. However, bumping it up all the way to 30M didn't rectify the overflow problem, which I assume is attributable to some other programming error, What seems like a minor change in array size is resulting in the overflow. Just to be sure, once a change is made to the reserve size, is there anything else that needs to be done to ensure that the change "takes"? I used the "Rebuild All" option but perhaps there's something else required.
0 Kudos
Steven_L_Intel1
Employee
1,630 Views
No - just a relink should do it. Can you identify the statement where the error is occurring? You can set the stack reserve as high as 1GB if you want - don't go any higher. Maybe start with 100M.
0 Kudos
Reply