[Openmp-dev] Default value for OpenMP thread stacksize

Simone Atzeni via Openmp-dev openmp-dev at lists.llvm.org
Mon Oct 8 07:57:41 PDT 2018

HI all,

What's the default size for the stack of the OpenMP threads in x86 and and ppc64 in the OpenMP runtime?

I have a Fortran program which allocates more than a 1MB on the stack for each thread. On x86 runs correctly, but on ppc64 it seg faults.
I am seeing that each thread in x86 has a stacksize of 4096kb while on ppc64 is 1024kb.
If I increase the stacksize with OMP_STACKSIZE the program runs correctly also on Power, but it fails if I only set "ulimit -s unlimited", which make sense since ulimit should only change the stacksize for the main thread but not for the other threads.

Is this the expected behavior and the correct solution is to set OMP_STACKSIZE?


This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20181008/5608c978/attachment.html>

More information about the Openmp-dev mailing list