octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #53700] eigs test failure related to ARPACK ge


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #53700] eigs test failure related to ARPACK generating real NaN rather than complex NaN+1i*NaN
Date: Mon, 23 Apr 2018 12:31:05 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0

Follow-up Comment #27, bug #53700 (project octave):

OK, got it.

Note that "lm" ends up being a different case; it doesn't necessarily run the
same ARPACK function or the same implementation of that function.  So let's
not pursue that idea.

Also, an observation here is that on Mint 18.2 I find that ARPACK issues error
-14 when selecting NEV to be 8 or less.  On Ubuntu 18.04 (the system that
produces one convergent real 1.0 eigenvalue) it fails for NEV equal to 5 or
less:


octave:16> d = eigs (A, 5, "sm", opts);
error: __eigs__: eigs: error -14 in dneupd
error: called from
    eigs at line 265 column 18
octave:16> d = eigs (A, 6, "sm", opts);


So, lots of library/compiler variation going  on.  (I don't even see a -14
error listed in the documentation I cited previously.)

Nonetheless, I suspect that the real/complex issue is more likely to occur
when NEV is just above that transition where it doesn't produce an error.  A
more assured way of always getting a complex result would be to push the NEV
higher:


octave:22> for i=9:50; d = eigs (A, i, "sm", opts); printf("%s%s", printf("%d:
",i), disp(d(end))); end
9:  NaN + NaNi
10:  NaN
11:  NaN + NaNi
12:  NaN + NaNi
13:  NaN + NaNi
14:  NaN + NaNi
15:  NaN + NaNi
16:  NaN + NaNi
17:  NaN + NaNi
18:  NaN + NaNi
19:  NaN + NaNi
20:  NaN + NaNi
21:  NaN + NaNi
22:  NaN + NaNi
23:  NaN + NaNi
24:  NaN + NaNi
25:  NaN + NaNi
26:  NaN + NaNi
27:  NaN + NaNi
28:  NaN + NaNi
29:  NaN + NaNi
30:  NaN + NaNi
31:  NaN + NaNi
32:  NaN + NaNi
33:  NaN + NaNi
34:  NaN + NaNi
35:  NaN + NaNi
36:  NaN + NaNi
37:  NaN + NaNi
38:  NaN + NaNi
39:  NaN + NaNi
40:  NaN + NaNi
41:  NaN + NaNi
42:  NaN + NaNi
43:  NaN + NaNi
44:  NaN + NaNi
45:  NaN + NaNi
46:  NaN + NaNi
47:  NaN + NaNi
48:  NaN + NaNi
49:  NaN + NaNi
50:  1.0000e+00 + 6.6006e-13i


That is, the NEV=49 case has so many converged eigenvalues of 1.0 that there
is bound to be complex conjugate pairs, and also plenty of NaN + NaNi as well.
 So the following would also be an easy way of fixing this test:


--- a/scripts/sparse/eigs.m     Thu Apr 19 01:58:44 2018 -0400
+++ b/scripts/sparse/eigs.m     Mon Apr 23 11:28:32 2018 -0500
@@ -1409,8 +1409,8 @@
 %! opts.v0 = (1:100)';
 %! opts.maxit = 10;
 %! warning ("off", "Octave:eigs:UnconvergedEigenvalues", "local");
-%! d = eigs (A, 10, "sm", opts);
-%! assert (d(10), NaN+1i*NaN);
+%! d = eigs (A, floor((length(A)-1)/2), "sm", opts);
+%! assert (d(end), NaN+1i*NaN);
 %!testif HAVE_ARPACK
 %! A = toeplitz ([0, 1, zeros(1, 8)], [0, -1, zeros(1, 8)]);
 %! A = kron (A, eye (10)) + kron (eye (10), A);


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?53700>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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