core dump on 0.64.2 SPARC/Solaris 2.6 in eigen (PR#223)

ripley@stats.ox.ac.uk ripley@stats.ox.ac.uk
Sun, 11 Jul 1999 17:31:13 +0200 (MET DST)


On 10 Jul 1999, Peter Dalgaard BSA wrote:

> > On Fri, 9 Jul 1999 bates@stat.wisc.edu wrote:
> > 
> > > ..
> > > R is now configured for sparc-sun-solaris2.6
> > > 
> > >   Source directory:         .
> > >   Installation directory:   /unsup/R-0.64.2
> > >   C compiler:               gcc -g -O2
> > >   FORTRAN compiler:         g77 -O2

(Why is the default to have -g for C but not Fortran? That has puzzled me
before now. At least for gcc/g77 we could be consistent.)

> > >   Gnome support:            no
> > > 
> > > $ gcc --version
> > > egcs-2.91.66
> > > $ g77 --version
> > > GNU Fortran 0.5.24-19981002
> 
> This is very likely the same trouble that I just spent some time
> analyzing with Vin Everett on Sparc Linux (RedHat 6.0). We traced it
> to something that looks suspiciously like a compiler error. I actually
> considered asking around if anyone used same egcs version on Solaris,
> but though "nah, probably not"....

Solaris 2.6
Same gcc and g77 as above (egcs-1.1.2)

I get the same behaviour if eigen.f is compiled with -O2, but not if it
is compiled without optimization, nor if it is compiled with egcs-1.1
(and -O2) nor if it is compiled with SunPro SC4.x f77.

> Doug, could you 
> 
> - recompile eigen.o with -g 
> - run it with -d gdb
> - see if the crash resembles the one below
> 
> ...
> > eigen(cbind(-1,c(1:2,0),0:2)) # complex values
> 
> Program received signal SIGSEGV, Segmentation fault.
> hqr2_ (nm=0x1, n=0x70d99fc8, low=0xefffed94, igh=0xefffed90,
> h=0x70d99f80,
>     wr=0x70d99f68, wi=0x70d99f50, z=0x70d99f00, ierr=0x70d99ed0)
>     at eigen.f:2120
> 2120                   RA = RA + H(I,J) * H(J,NA)
> Current language:  auto; currently fortran
> (gdb) p j
> $1 = 0
> (gdb) p na
> $2 = 0
> (gdb) p en
> $3 = 3
> (gdb) p n
> $4 = (PTR TO -> ( integer )) 0x70d99fc8
> (gdb) p nm
> $5 = (PTR TO -> ( integer )) 0x1

Does for me (modulo addresses, of course).

The remedy (as usual) seems to be not to optimize when compiling eigen.f
under egcs-1.1.2.

Brian

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._