bugGNU Octave - Bugs: bug #47368, test of svds.m fails on Windows...

 
 

bug #47368: test of svds.m fails on Windows (Octave 4.0.1-rc3)

Submitter:  Hartmut <hardy>
Submitted:  Wed 09 Mar 2016 08:47:25 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.0.1-rc1 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 12 Mar 2016 07:03:20 PM UTC, comment #9: 

@Avinoam: I've noticed bug report #47372 about memory leaks, that seems to go along this direction. So I decided to not open an additional bug report for now.

Hartmut <hardy>
Thu 10 Mar 2016 05:09:34 PM UTC, comment #8: 

@Hartmut:
I think it's a good idea to open
a seperate bug report on this problem.


Avinoam Kalma <avinoam>
Group Member
Thu 10 Mar 2016 09:07:32 AM UTC, comment #7: 

@ Avinoam:
I have had a look at bug report #43505, and this looks very odd, indeed. Seems that some Octave function calls are messed up, once Java stuff has been used before. Rik thought this might be due to memory leaks in Octave.

Should we open a new bug report dedicated to this issue? The facts so far are (at least):

  • bug #43505 : After using java, the image saved by imwrite has all elements lower by one value.
  • this bug (#47386): svds.m gives different results when java has been used before (but I haven't tried to reproduce this yet).


If this points to memory leaks, it should be worth fixing. (My deepest hope would even be to eventually find the root cause of image-i/o crashing Octave on Windows during shutdown, bug #41699, still present in 4.0.1-rc3)

Hartmut <hardy>
Thu 10 Mar 2016 05:50:20 AM UTC, comment #6: 

@Hartmut:


> Do you have an explanation why "test svds.m" passes all tests, whereas run_test_suite gives a failing test on svds.m?)


I do not have an answer, but please see the my original
bug report on bug #46683. It was somehow swept under the carpet,
but this is related in someway to "jobj = javaObject ("java.lang.StringBuffer");" appears in the run_test_suite.

bug #43505 has similar problem.

Avinoam Kalma <avinoam>
Group Member
Wed 09 Mar 2016 08:47:02 PM UTC, comment #5: 

There was an outstanding question by me (Rik) on bug #46683 about whether this should be backported to stable.  I never got a response, but it seems like it should be.  I did that here (http://hg.savannah.gnu.org/hgweb/octave/rev/e169fe73b57e).  This should fix things up when the 4.0.1-rc4 candidate comes out.  Or you can grab the stable branch from Mercurial and use MXE to cross-compile.

Rik <rik5>
Group administrator
Wed 09 Mar 2016 08:34:56 PM UTC, comment #4: 

I have no competence in deciding which patches to backport do stable. But I think an official release (in this case 4.0.1) should normally not have any failing unit tests.

(Do you have an explanation why "test svds.m" passes all tests, whereas _run_test_suite_ gives a failing test on svds.m?)

Hartmut <hardy>
Wed 09 Mar 2016 08:29:02 PM UTC, comment #3: 

That makes sense, because that fix was applied to the default branch, not stable, so it will be available in the Octave 4.2 release. Is this worth backporting to stable?

This was part of bug #46683.

Mike Miller <mtmiller>
Group Member
Wed 09 Mar 2016 08:22:11 PM UTC, comment #2: 

In the file svds.m I find the following code:


    ## We wish to exclude all eigenvalues that are less than zero as these
    ## are artifacts of the way the matrix passed to eigs is formed. There
    ## is also the possibility that the value of sigma chosen is exactly
    ## a singular value, and in that case we're dead!! So have to rely on
    ## the warning from eigs. We exclude the singular values which are
    ## less than or equal to zero to within some tolerance scaled by the
    ## norm since if we don't we might end up with too many singular
    ## values.
    tol = norma * opts.tol;
    ind = find (s > tol);
    if (length (ind) < k)
      ## Too few eigenvalues returned.  Add in any zero eigenvalues of B,
      ## including the nominally negative ones.
      zind = find (abs (s) <= tol);
      p = min (length (zind), k - length (ind));
      ind = [ind; zind(1:p)];
    elseif (length (ind) > k)
      ## Too many eigenvalues returned.  Select according to criterium.
      if (b_sigma == 0)
        ind = ind(end+1-k:end); # smallest eigenvalues
      else
        ind = ind(1:k);         # largest eigenvalues
      endif
    endif
    s = s(ind);


I think this means that the patch you mentioned is NOT included here.

The windows version of 4.0.1-rc3 that gave me this error was installed from the "official" exe-installer at alpha.gnu.org/gnu/octave .

Looking at the mentioned patch, it seems to me that is was only applied to the default branch in the repository. I assume that the 4.0.1 release will be taken from the stable branch. Maybe this is why this patch is not included in the 4.0.1-rc3 release candidate?

Note: When I only run "test svds.m" in this installation then I get 6 passing tests (out of 6), no errors in this case. Even running this test 100 times (in a for loop) only gives me passing tests. I don't understand this. If you want me to rerun the _run_test_suite_ command again on this installation, then please let me know (it takes quite a while on this computer...)


Hartmut <hardy>
Wed 09 Mar 2016 05:45:58 PM UTC, comment #1: 

Can you take a look at the file


C:\Octave\Octave-4.0.1-rc3\share\octave\4.0.1-rc3\m\sparse\svds.m


and make sure it contains the changes in this cset: http://hg.savannah.gnu.org/hgweb/octave/rev/73f62b4bb533.

If those lines are missing, then that is why the test is failing.  If those lines are present, then we have a problem.

Rik <rik5>
Group administrator
Wed 09 Mar 2016 08:47:25 AM UTC, original submission:  

When I run the test suite of Octave 4.0.1-rc3 under Windows 7 I get the following result:


Summary:

  PASS     12956
  FAIL         1
  XFAIL       26
  SKIPPED     54


The one failing test is in svds.m:


>>>>> processing C:\Octave\Octave-4.0.1-rc3\share\octave\4.0.1-rc3\m\sparse\svds.m
***** testif HAVE_ARPACK, HAVE_UMFPACK
 [u2,s2,v2,flag] = svds (A,k,0,opts);
 s2 = diag (s2);
 assert (flag, !1);
 tol = 10 * eps() * norm(s2, 1);
 assert (s2, s(k:-1:1), tol);

!!!!! test failed
ASSERT errors for:  assert (s2,s (k:-1:1),tol)

  Location  |  Observed  |  Expected  |  Reason
     .          O(6x1)       E(7x1)      Dimensions don't match


This is probably related to bug #46683 and others. I nevertheless opened a new report, because I assumed that a release candidate should have zero failing tests, normally.

Hartmut <hardy>

 

(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 avinoam (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by hardy (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-03-09 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code