This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gfortran47, pgf90 work - ifort segfaults


On Fri, Feb 10, 2012 at 11:43:15AM +0000, Anton Shterenlikht wrote:
> 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
> % ./a.out 
> Segmentation fault
> % limit stack 100000
> % ./a.out 
> % 
> 
> How is stack space related to the available RAM?

fortran@gnu is not an Intel Fortran support forum.

-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]