This is the mail archive of the
mailing list for the GNU Fortran project.
Re: gfortran47, pgf90 work - ifort segfaults
On Fri, Feb 10, 2012 at 11:40:55AM +0100, Tobias Burnus wrote:
> On 02/10/2012 11:08 AM, Anton Shterenlikht wrote:
> >Intel: 12.0.2 20110112
> >The code below segfaults only when compiled with Intel compiler.
> The code looks valid - and using ifort 11.1, 12.0.3 and 12.1.1, it does
> not crash for me; thus, it could be fixed in later 12.0.x versions or
> might have different reasons.
> On issue which can lead to segfaults is a too small stack. And in
> particular the Intel compiler uses a lot of stack space by default.
> Stack memory is fast - faster than memory allocated on the heap. But the
> down side is: By default the available stack size is rather limited.
> Thus, one easily runs into stack issues. Having large arrays can require
> a lot of stack size - exceeding the available space leads to segfaults.
> If ifort places "space1" on the stack, you need 31.5 MB stack space.
> That's not very much but might be still too much. Could you check what
> "ulimit -s" (POSIX shell, bash) or "limit stack" (csh, tcsh) prints?
Tobias, thanks, you are right:
% ifort z.f90
% limit stack
stacksize 10240 kbytes
% limit stack 100000
How is stack space related to the available RAM?
I naively assumed that if I have e.g. 8GB RAM in a node,
I can operate with, say, 7GB RAM arrays, and leave
the remaining 1GB for the OS needs. I guess this
is far too simple a view?
Maybe you can point me to a good resource to
read more on this. I don't want to take too much
of your time.
Room 2.6, Queen's Building
Mech Eng Dept
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423