Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
29317 Discussions

segmentation fault with openmp, how do i increase stack size?

gregkaplan
Beginner
924 Views
i am using intel fortran 11.059 on mac os 10.5.6.
when i compile without openmp, my program runs fine. it also runs fine on linux and windows. however when i compile with openmp on mac i get a segmentation fault at run time.
after reading previous posts, i am pretty sure that i need to increase the stack size available to the multi-threaded parts of the program, because my programs uses a number of large arrays. when i use the -heap-arrays option, i get the same segmentation fault. my question is: how do i increase the relevant stack size?? the -stack_size option doesnt work, so what is the correct compiler directive for increasing the stack size on a mac? and is this the cause of the problem?
0 Kudos
1 Reply
Izaak_Beekman
New Contributor II
924 Views
Quoting - gregkaplan
i am using intel fortran 11.059 on mac os 10.5.6.
when i compile without openmp, my program runs fine. it also runs fine on linux and windows. however when i compile with openmp on mac i get a segmentation fault at run time.
after reading previous posts, i am pretty sure that i need to increase the stack size available to the multi-threaded parts of the program, because my programs uses a number of large arrays. when i use the -heap-arrays option, i get the same segmentation fault. my question is: how do i increase the relevant stack size?? the -stack_size option doesnt work, so what is the correct compiler directive for increasing the stack size on a mac? and is this the cause of the problem?

I beleive on a mac you can issue:

ulimit -s hard

from a bash command-line. In linux i usually do:

ulimit -s unlimited

see: http://homepage.mac.com/eric.c/hpc/contents/documentation/How%20to%20increase%20the%20stack%20size%20on%20Mac%20OS%20X.pdf

Hope this helps.
-Z
0 Kudos
Reply