bugGNU Octave - Bugs: bug #53433, tests: eigs.m: two failing tests...

 
 

bug #53433: tests: eigs.m: two failing tests on i686

Submitter:  Mike Miller <mtmiller>
Submitted:  Fri 23 Mar 2018 06:27:34 AM UTC
   
 
Category:  Test Suite Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 19 Apr 2018 04:52:15 PM UTC, comment #7: 

I created a new bug report here:

https://savannah.gnu.org/bugs/index.php?53700

There are a couple other similar bug reports that may have more to do with ARPACK library changes which I will post to.

Dan Sebald <sebald>
Thu 19 Apr 2018 04:42:39 PM UTC, comment #6: 

I have one test failing on a very up-to-date Ubuntu 18.04 with KDE (not that the latter matters, I suppose), and it seems along the lines of this bug report.  If it isn't the same, I'll create a separate bug report.

I will isolate just the failing test:


octave:1> test eigs
***** testif HAVE_ARPACK
 A = magic (100) / 10 + eye (100);
 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);
!!!!! test failed
ASSERT errors for:  assert (d (10),NaN + 1i * NaN)

  Location  |  Observed  |  Expected  |  Reason
     ()           O            E         real != complex


and a more detailed breakdown


octave:2> A = magic (100) / 10 + eye (100);
octave:3> opts.v0 = (1:100)';
octave:4> opts.maxit = 10;
octave:5> d = eigs (A, 10, "sm", opts);
warning: eigs: Only 1 of the 10 requested eigenvalues converged
warning: called from
    eigs at line 265 column 18
octave:6> assert (d(10), NaN+1i*NaN);
error: ASSERT errors for:  assert (d (10),NaN + 1i * NaN)

  Location  |  Observed  |  Expected  |  Reason
     ()           O            E         real != complex
octave:6> d(10)
ans =  NaN
[snip]
octave:8> d
d =

   1.00000
       NaN
       NaN
       NaN
       NaN
       NaN
       NaN
       NaN
       NaN
       NaN


So, it appears that there is non-convergence but this is probably expected behavior because the test is disabling the printout of warning messages about non-convergence.  It may be the only issue is that ARPACK is generating "real" (float) values where another library is generating "complex" values.  Perhaps there is a change in recent versions of ARPACK, don't know.  If you want me to investigate further, I can.

Dan Sebald <sebald>
Mon 26 Mar 2018 08:38:30 PM UTC, comment #5: 

I pushed the change to two tests on the stable branch

https://hg.savannah.gnu.org/hgweb/octave/rev/4a6284b53933

Mike Miller <mtmiller>
Group Member
Mon 26 Mar 2018 07:36:01 AM UTC, comment #4: 

It is ok with me.

Marco Caliari <caliari>
Group Member
Fri 23 Mar 2018 08:09:07 PM UTC, comment #3: 

On another machine I need to increment d to 6 for the last test only. The following diff works for me on all my 32-bit test cases:


--- a/scripts/sparse/eigs.m
+++ b/scripts/sparse/eigs.m
@@ -1425,8 +1425,8 @@ endfunction
 %! opts.v0 = (1:100)';
 %! opts.maxit = 1;
 %! warning ("off", "Octave:eigs:UnconvergedEigenvalues", "local");
-%! d = eigs (A, 4, "lm", opts);
-%! assert (d(4), NaN+1i*NaN);
+%! d = eigs (A, 5, "lm", opts);
+%! assert (d(5), NaN+1i*NaN);
 %!testif HAVE_ARPACK
 %! A = 1i * magic (100) + eye (100);
 %! opts.v0 = (1:100)';
@@ -1441,5 +1441,5 @@ endfunction
 %! opts.maxit = 1;
 %! opts.isreal = false;
 %! warning ("off", "Octave:eigs:UnconvergedEigenvalues", "local");
-%! d = eigs (Afun, 100, 4, "lm", opts);
-%! assert (d(4), NaN+1i*NaN);
+%! d = eigs (Afun, 100, 6, "lm", opts);
+%! assert (d(6), NaN+1i*NaN);


Let me know if this is ok with you, or if both should just be bumped to 8 as you suggested, or if this needs more investigation.

Mike Miller <mtmiller>
Group Member
Fri 23 Mar 2018 04:39:02 PM UTC, comment #2: 

What I mean is all of the libraries and Octave are built for i686, Intel 32 bit, as opposed to all of my normal testing and all of our buildbots which are x86_64.

Yes, I get 3 eigenvalues on x86_64 but 4 on i686. So changing both tests from 4 to 5 works for me.

Mike Miller <mtmiller>
Group Member
Fri 23 Mar 2018 10:33:24 AM UTC, comment #1: 

@Mike: what do you mean by "built for i686"? Did you use explicit flags for it?
Anyway, I cannot reproduce, but I have already seen different behaviors depending on BLAS. I do not know how to have a test in which ARPACK fails (aka does not find all eigenvalues) on any platform/blas/flags. I propose the following: what happens if you run the test with


d = eigs (A, 8, "lm", opts); % 8 instead of 4


Do you see any NaN in the result? If yes, I would modify the assert. And wait for the next counterexample.

Marco Caliari <caliari>
Group Member
Fri 23 Mar 2018 06:27:34 AM UTC, original submission:  

In testing Octave built for i686, I am seeing 2 test failures in eigs.m.

Octave is built against OpenBLAS in this configuration.


 A = 1i * magic (100);
 opts.v0 = (1:100)';
 opts.maxit = 1;
 warning ("off", "Octave:eigs:UnconvergedEigenvalues", "local");
 d = eigs (A, 4, "lm", opts);
 assert (d(4), NaN+1i*NaN);
!!!!! test failed
ASSERT errors for:  assert (d (4),NaN + 1i * NaN)

  Location  |  Observed  |  Expected  |  Reason
     ()      6.662e-15+5.0765e-12i   NaN+NaNi     'NaN' mismatch


 A = 1i * magic (100);
 Afun = @(x) A * x;
 opts.v0 = (1:100)';
 opts.maxit = 1;
 opts.isreal = false;
 warning ("off", "Octave:eigs:UnconvergedEigenvalues", "local");
 d = eigs (Afun, 100, 4, "lm", opts);
 assert (d(4), NaN+1i*NaN);
!!!!! test failed
ASSERT errors for:  assert (d (4),NaN + 1i * NaN)

  Location  |  Observed  |  Expected  |  Reason
     ()      -6.8217e-22+9.1207e-12i   NaN+NaNi     'NaN' mismatch


Mike Miller <mtmiller>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by sebald (Posted a comment)
  • -email is unavailable- added by caliari (Posted a comment)
  • -email is unavailable- added by mtmiller (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-26 mtmiller StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2018-03-23 mtmiller StatusNone Patch Submitted

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code