This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: The size of thread level storage under OpenMP.
- From: Tobias Burnus <burnus at net-b dot de>
- To: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Cc: Jakub Jelinek <jakub at redhat dot com>, gfortran <fortran at gcc dot gnu dot org>
- Date: Fri, 23 May 2008 22:25:13 +0200
- Subject: Re: The size of thread level storage under OpenMP.
- References: <483722E6.5010908@moene.indiv.nluug.nl>
Toon Moene wrote:
I have an OpenMP enabled Fortran program that dies a quick death when
compiled with -fopenmp
A classical problem with OpenMP is that one runs out of stack memory.
The current stack setting can be queried using the sh/bash using "ulimit
-s" and using the (t)csh using "limit stacksize". Try to set it to
"unlimited". Often systems limit the available stack memory; A soft
limit of 8192 kbytes is a typical value under Linux.
The problem is that with -fopenmp all local variables are put on the
stack (instead of using static memory), which means that the needed
memory might be large as this includes all arrays which are not
dynamically allocated (allocatable, pointer, automatic arrays). The
variables must not use the static memory as otherwise wrong results are
obtained if several threads access the same procedure simultaneously.
However, there are tons of other things which can go wrong ...
Tobias