The Intel® Fortran Compiler may allocate a significant number of temporaries on the stack. Temporaries include automatic arrays and array sub-sections corresponding to actual arguments. If the program is not afforded adequate stack space at runtime relative to the total size of the temporaries, the program will terminate with a segmentation fault on Linux* and Mac OS* X or Signal 11 on Windows*.
On Linux*, the stack space can be increased using:
On Mac OS* X Leopard: simply use the -stack_size option to the linker
On Mac OS* X Tiger: see the article, "How to increase the stack size on MAC OS X" by Eric Circlaeys, Consulting Engineer, Apple Computer Europe.
For example to increase to 256MB with either ld or ifort on Mac OS,
ld –stack_size 0x10000000 –o foo foo.o
For Intel® Fortran Compilers 10.0 and above, all platforms:
Linux: The size of "unlimited" varies by Linux configuration, so you may need to specify a larger, specific number to ulimit (for example, 999999999). On Linux also note that many 32bit Linux distributions ship with a pthread static library (libpthread.a) that at runtime will fix the stacksize to 2093056 bytes regardless of the ulimit setting. To avoid this problem do not link with the -static option or the -fast option. Instead of -fast, use options: -ipo -O3 -no-prec-div -xhost . This only affects the 32bit Linux distributions and does not apply to the 64bit Linux distributions.
Mac OS X: stack "unlimiting" of the shell environment on Mac OS X is not possible. The OS sets a ceiling for the maximum stack size, typically 64K. Use the linker options shown above to increase stacksize.
Windows: On Windows, the stack space to reserved for the program is set using the /Fn compiler option, where n is the number of bytes. Additionally, the stack reserve size can be specified through the Visual Studio IDE which adds the Microsoft Linker option /STACK: to the linker command line. To set this, go to Property Pages>Configuration Properties>Linker>System>Stack Reserve Size. There you can specify the stack size in bytes in either decimal or C-language notation. If not specified, the default stack size may be as small as 1MB.
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.