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

Stack overflow in OPENMP

johnatlancs
Beginner
627 Views
I have an application which uses Openmp and in the parallel threads it makes a number of subroutine calls so there is the potential for thread stack overflow. On one PC with 2G RAM I can getitto run on various problems of different sizes by setting KMP_STACKSIZE sufficiently high. On another PC with 3G RAM some problems work while others don't even after I have set KMP_STACKSIZE to a ridiculously high value. Where should I look to see what the problem is with the machine with (apparently) greater memory? Both run Windows XP. The compiler version is 10.029. (I have not downloaded version 11 since until now we didn't seem to need it but perhaps we do now).
0 Kudos
1 Reply
Steven_L_Intel1
Employee
627 Views
Setting KMP_STACKSIZE high doesn't help if the executable's stack size isn't raised. The MS linker defaults this to 1MB! This can be set in the project property Linker > System > Stack Reserve Size.

You may also want to try setting the Fortran > Optimization > Heap Arrays property to "0". This will cause temporary arrays to be allocated dynamically rather than on the stack.
0 Kudos
Reply