octave-maintainers
[Top][All Lists]
Advanced

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

Re: test failures for svds.m


From: Marco Atzeri
Subject: Re: test failures for svds.m
Date: Fri, 28 May 2010 03:41:39 +0000 (GMT)

--- Gio 27/5/10, Rik  ha scritto:

> 
> > With my last build, I encountered a test error for
> svds.m. My tip is
> > 
> > changeset:   10665:0f310fce905d
> > tag:         tip
> > user:        Jaroslav Hajek <address@hidden>
> > date:        Thu May 27 08:54:44
> 2010 +0200
> > summary:     implement
> octave_base_matrix::matrix_ref const
> > 
> > The test error is …
> > 
> >>>>>> processing
> /Users/bpabbott/Development/mercurial/local_clone/scripts/sparse/svds.m
> >   ***** testif HAVE_ARPACK
> >  [u2,s2,v2,flag] = svds(a,k,0,opts);
> >  s2 = diag(s2);
> >  assert(flag,!1);
> >  assert(s(k:-1:1), s2, 1e-10); 
> > !!!!! test failed
> > assert (s (k:-1:1),s2,1e-10) expected
> >    38.060
> >    38.060
> >    38.034
> >    38.034
> >    38.015
> >    38.015
> >    38.004
> > but got
> >    38.060
> >    38.034
> >    38.034
> >    38.015
> >    38.015
> >    38.004
> >    38.004
> > maximum absolute error 0.0263523 exceeds tolerance
> 1e-10
> > 
> > If I make the change below, the test passes.
> > 
> > %! [u2,s2,v2,flag] = svds(a,k,0);#,opts);
> > 
> 
> Interesting, as I went to a lot of trouble to fix this.
> Previously, svds was failing ~30% of the time with no
> discernible pattern.
> 
> The issue seems to be that svds calls eigs which in turn
> calls routines from ARPACK.  The ARPACK routines are
> iterative and depend upon an initial starting point. 
> In
> the Octave test code we are careful to initialize all
> the random number generators so that results are
> reproducible.
> However, in this case we were letting ARPACK choose the
> initial starting point using its own random number
> generator.
> 
> My solution was to pass in a starting point to ARPACK that
> the Octave test code generates and therefore can make
> reproducible.  This was my changeset
> 10660:4cdc43c095c5.
> 

for me on cygwin 1-7 your changeset is working

$ hg tip
changeset:   10667:6769fbfec739
tag:         tip
user:        Rik <address@hidden>
date:        Thu May 27 10:56:45 2010 -0700
summary:     eigs.cc: Improve documentation string.


> I've run the svds tests over 3,000 times now and I can't
> get them to fail.

1000 times and no error ;-)

> 
> --Rik
> 

Thanks 
Marco



      




reply via email to

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