[Openmp-dev] Default value for OpenMP thread stacksize
Simone Atzeni via Openmp-dev
openmp-dev at lists.llvm.org
Mon Oct 8 08:16:20 PDT 2018
It looks though the LLVM OpenMP runtime has two different stack size for x86 (4096kb) and power (1024kb), so I thought that this is not implementation related but maybe architecture dependent?
Anyway, makes sense to set the OMP_STACKSIZE.
From: Cownie, James H <james.h.cownie at intel.com>
Sent: Monday, October 8, 2018 5:05 PM
To: Simone Atzeni <satzeni at nvidia.com>
Cc: openmp-dev at lists.llvm.org
Subject: RE: Default value for OpenMP thread stacksize
I do not know what the default OpenMP stack size is on PPC, but the rest of your logic seems sound, and setting OMP_STACKSIZE seems entirely reasonable.
The standard says that the default stack size is "implementation defined", so it is entirely reasonable that different implementations have different default values.
Jim Cownie <james.h.cownie at intel.com<mailto:james.h.cownie at intel.com>>
CVCG/DPD/TCAR (Technical Computing, Analyzers, and Runtimes)
Tel: +44 117 9071438
From: Openmp-dev [mailto:openmp-dev-bounces at lists.llvm.org] On Behalf Of Simone Atzeni via Openmp-dev
Sent: Monday, October 8, 2018 3:58 PM
To: openmp-dev at lists.llvm.org<mailto:openmp-dev at lists.llvm.org>
Subject: [Openmp-dev] Default value for OpenMP thread stacksize
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.
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Openmp-dev