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

stack size, heap size, large data set

dsmanoli
Beginner
775 Views
Hi,

I am using Microsoft Visual Studio 2005 and the Intel Visual Fortran Compiler 10.0. Also, I am using the compiler on a 64 bit platform.

I would like to read a large data matrix into fortran and I am worried about my program crashing because of stack size or other memory limitations. Is there a way to increase the stack size so this will not happen? Or should I increase the heap size instead of, or in addition to,increasing the stack size? Also, when I increase the stack size or heap size for the overall program, does this limit the amount of memory that I can allocate to each thread when I parallelize in the program?

I appreciate any advice. Thanks!
0 Kudos
1 Reply
Steven_L_Intel1
Employee
775 Views
I suggest that you add the /heap-arrays option to your build - then you will likely not have to worry about the stack. You can set a higher stack size in the Linker > System > Stack Reserve Size property. Note, though, that the stack is still limited to about 1GB even on the 64-bit platform. I thing in version 10, there is no property for heap arrays so you can add it on the "Command Line" property page under "Additional Options".

I also recommend using ALLOCATABLE arrays for your large arrays rather than declaring them some large fixed size.

Lastly, version 10.0 is old and you may run into some issues. Version 11 is current.
0 Kudos
Reply