Hi, On Sun, 10 Apr 2011, Dominique Dhumieres wrote:
> > I find that both nf.f90 and capacita.f90 segfault in runtime for any stack > > size. > > On x86_64-apple-darwin10, nf.f90 "works". However if I run it through > valgrind I get > > ==64815== Memcheck, a memory error detector > ==64815== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al. > ==64815== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info > ==64815== Command: a.out --max-stackframe=2118496 > ==64815== > ==64815== Warning: set address range perms: large range [0x7ffe6c000000, > 0x7fff5bc01000) (defined) > ==64815== Warning: client switching stacks? SP change: 0x7fff5bffe410 --> > 0x7fff5be0cef0 > ==64815== to suppress, use: --max-stackframe=2037024 or greater See? That's whay I meant with having to use a large ulimit for stack size. Usually stack overflows symptom is a simple segfault. What ulimit -s have you used for your capacita tests? > The segfault for capacita.f90 occurs in the subroutine fourir at the line > > write(unit=*, fmt=*) "error in fourier: n=", ntot > > AFAICT the problem occurs in the loop > > do m=1,ntot/4-1 > E(m) = exp(m*h) > end do > > If I print ntot, loc(ntot) before it I get > > 2048 140734799794712 > > After the loop loc(ntot) is > > 9205357642636066816 > > and any attemp to print its values yields a segfault. I'll poke at polyhedron somewhat. Ciao, Michael.