stack size

stack size


I'm running a radiative transfer code using the intel f90 compiler since a while already on a linux2.4 with glibc 2.2.4 and so far I can't complain. However, after (significantly) changing some array dimensions now I get segmentation faults without further error message. I have experienced this earlier and solved the problem by explicitly allocating local arrays. I assume this problem is due to a too small stack. (Setting the KPM_STACK_SIZE variable, ulimit etc. didn't solve the problem, though...). This time, changing the code is more painful, so I would like to avoid it. Is there any solution to these kind of problems?


2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I assume your code uses OpenMP, since you mention KMP_STACKSIZE. You need to make sure that you are using a pthreads library that was built with FLOATING_STACKS. Please read carefully the Release Notes, and see also the discussion in an earlier post (ifc with -static and -openmp). If you use Red Hat 7.2, for example, you need to build with the shared version of the pthreads library, then something like ulimit -s 200000000 should work (but not ulimit -s unlimited).
If the problem persists, please submit an issue to, and give as much detail as you can, preferably a test case.
Let us know if getting the right pthreads library and adjusting the stacksize works.


Leave a Comment

Please sign in to add a comment. Not a member? Join today