Search
Support & Downloads
All of Support
This Category
Software Products
Intel® Fortran Compiler
Increased stack usage of 8.0 or higher compilers causes segmentation fault

The Intel® Fortran Compilers 8.0 or higher allocate more temporaries on the stack than previous Intel Fortran compilers. 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* or Signal 11 on Windows*. On Linux*, the stack space can be increased using (e.g. ulimit -s unlimited) for bash shell or (e.g. limit stacksize unlimited) for csh shell.

For Intel® Fortran Compilers 10.0:
The heap-arrays compiler option directs the compiler to put the automatic arrays and arrays created for temporary computations on the heap instead of the stack.

Note: The size of "unlimited" varies by Linux configuration, so you may need to specify a larger, specific number to ulimit (for example, 999999999). On Windows, the stack space to reserved for the program is set using the /Fn compiler option, where n is the number of bytes. 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 -xP . This only affects the 32bit Linux distributions and does not apply to the 64bit Linux distributions.

This applies to:
Intel® Fortran Compiler for Linux*
Intel® Fortran Compiler for Mac OS*
Intel® Fortran Compiler for Windows*

Solution ID: CS-007790
Date Created: 15-Dec-2003
Last Modified: 05-Jun-2007