[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gsl] bug in gsl_eigen_hermv

From: Patrick Alken
Subject: Re: [Bug-gsl] bug in gsl_eigen_hermv
Date: Mon, 12 Nov 2007 21:08:28 -0700
User-agent: Mutt/

Doing a simple diff of the eigensolvers in 1.4 and 1.10 shows that
the only change made to the hermitian solver was a small change to
qrstep.c which Brian made recently, but as I recall that fix was
designed to deal with these small eigenvalue cases.

But your current message says that your program no longer works with
gcc 4.0/gsl 1.4. If that is the case, then I would recommend compiling
gsl 1.10 with optimization turned off...something like:

make CFLAGS="-g"

in the top level gsl directory and then try running your program again.
Sometimes when dealing with tiny numbers the optimizer can do strange
things as I've found out before.

If you can verify that your program works with optimization turned off
that may be helpful in finding where the problem is.

Patrick Alken

On Mon, Nov 12, 2007 at 07:43:43PM -0700, Matthew B. Hastings wrote:
> Hi Brian,
> I inserted gsl_ieee_env_setup() at the start of the program and ran under
> gdb.  I tried set env GSL_IEEE_MODE double-precision and got
> gsl: fp-darwin.c:35: ERROR: powerpc only supports default precision rounding
> Default GSL error handler invoked.
> I then tried it with set env GSL_IEEE_MODE round-to-nearest and got
> gsl: fp-darwin.c:70: ERROR: powerpc does not support the denormalized
> operand exception. Use 'mask-denormalized' to work around this.
> Default GSL error handler invoked.
> so I also tried set env GSL_IEEE_MODE mask-denormalized.  In this case,
> the program ran, returning the nans, but without trapping any floating
> point exception.  I have not used gsl_ieee_env_setup() to do this before,
> so please let me know if I am doing anything wrong.  I compiled the code
> with the -g flag.
> I did some more checking on different versions of gsl, and it seems like
> it is not just an architecture dependent problem, but maybe also a
> compiled dependent problem.  I rebuilt gsl-1.4 in a different directory,
> and after rebuilding gsl-1.4 I got nan with that one too.  However, the
> old version of gsl-1.4 (that I built some time ago, when gsl-1.4 was the
> latest release) does not gives nan when I run this code.  There are a few
> differences in how it was built, mainly now I have gcc 4.0 installed as
> that is now the default compiled on OS X, and the previous library was
> built under gcc 3.3.  Also, slight update in the version of OS X from
> 10.4.3 (or something around that) to 10.4.9.  I can try rebuilding gsl-1.4
> with gcc 3.3 and see if that gets rid of the bug.  In both cases, I
> configured the library with ./configure --non-shared.
> Thanks,
> Matt Hastings
> > At Sat, 10 Nov 2007 09:05:46 -0700 (MST),
> > Matthew B. Hastings wrote:
> >> I think there is a bug in gsl_eigen_hermv which causes it to give nan if
> >> there ar many very small entries or entries equal to zero.  I checked
> >> the
> >> bug archives, and I found a similar bug report,
> >> http://lists.gnu.org/archive/html/bug-gsl/2002-10/msg00002.html , for
> >> gsl-1.2.  However, I am using gsl-1.10.  The bug does not seem to appear
> >> on gsl-1.4.  I am using Mac OS X 10.4.9 on a PowerPC G4.
> >
> > Thanks for your bug report.
> >
> > It seems to be an architecture dependent problem, I'm not able to
> > reproduce the NaNs on x86 or x86_64.
> >
> > Is is possible for you to identify where the NaNs are coming from? e.g
> > by trapping any division by zero, overflow and invalid operation
> > exceptions while running under GDB.  The function gsl_ieee_env_setup()
> > can be used to enable these.
> >
> > --
> > Brian Gough
> >
> > Network Theory Ltd,
> > Publishing Free Software Manuals --- http://www.network-theory.co.uk/
> >
> _______________________________________________
> Bug-gsl mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-gsl

reply via email to

[Prev in Thread] Current Thread [Next in Thread]