bugGNU Octave - Bugs: bug #35049, Test fail in svds.m (MinGW)

 
 

bug #35049: Test fail in svds.m (MinGW)

Submitter:  Tatsuro MATSUOKA <tmacchant>
Submitted:  Tue 13 Dec 2011 04:33:38 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 14 Dec 2011 12:16:37 AM UTC, comment #1: 

Fixed by deleting old onCleanup.oct file.

Rik <rik5>
Group administrator
Tue 13 Dec 2011 04:33:38 AM UTC, original submission:  

changeset 14036:29e9eb59f917
date Mon Dec 12 13:52:35 2011 -0800


>>>>> processing e:\usr\Tatsu\mingwhome\octaves\hg\octave-work\scripts\sparse\svds.m
  ***** shared n, k, A, u, s, v, opts
 n = 100;
 k = 7;
 A = sparse([3:n,1:n,1:(n-2)],[1:(n-2),1:n,3:n],[ones(1,n-2),0.4*n*ones(1,n),ones(1,n-2)]);
 [u,s,v] = svd(full(A));
 s = diag(s);
 [~, idx] = sort(abs(s));
 s = s(idx);
 u = u(:,idx);
 v = v(:,idx);
 old_state1 = randn ("state");
 restore_state1 = onCleanup (@() randn ("state", old_state1));
 old_state2 = rand ("state");
 restore_state2 = onCleanup (@() rand ("state", old_state2));
 randn ('state', 42);      % Initialize to make normest function reproducible
 rand ('state', 42);
 opts.v0 = rand (2*n,1); % Initialize eigs ARPACK starting vector
                         % to guarantee reproducible results
!!!!! test failed
API version api-v45+ found in .oct file function `onCleanup'
       does not match the running Octave (API version api-v46+)
       this can lead to incorrect results or other failures
       you can fix this problem by recompiling this .oct file
shared variables   scalar structure containing the fields:
    n = [](0x0)
    k = [](0x0)
    A = [](0x0)
    u = [](0x0)
    s = [](0x0)
    v = [](0x0)
    opts = [](0x0)
  ***** test
 [u2,s2,v2,flag] = svds(A,k);
 s2 = diag(s2);
 assert(flag,!1);
 assert(s2, s(end:-1:end-k+1), 1e-10);
!!!!! test failed
operator /: nonconformant arguments (op1 is 0x0, op2 is 0x1)
shared variables   scalar structure containing the fields:
    n = [](0x0)
    k = [](0x0)
    A = [](0x0)
    u = [](0x0)
    s = [](0x0)
    v = [](0x0)
    opts = [](0x0)
  ***** testif HAVE_UMFPACK
 [u2,s2,v2,flag] = svds(A,k,0,opts);
 s2 = diag(s2);
 assert(flag,!1);
 assert(s2, s(k:-1:1), 1e-10);
!!!!! test failed
svds: OPTS must be a structure
  ***** testif HAVE_UMFPACK
 idx = floor(n/2);
 % Don't put sigma right on a singular value or there are convergence issues
 sigma = 0.99*s(idx) + 0.01*s(idx+1);
 [u2,s2,v2,flag] = svds(A,k,sigma,opts);
 s2 = diag(s2);
 assert(flag,!1);
 assert(s2, s((idx+floor(k/2)):-1:(idx-floor(k/2))), 1e-10);
!!!!! test failed
svds: OPTS must be a structure
  ***** test
 [u2,s2,v2,flag] = svds(zeros (10), k);
 assert (isequal(u2, eye (10, k)) && isequal (s2, zeros(k)) && isequal (v2, eye(10, 7)));
!!!!! test failed
zeros (A): use zeros (size (A)) instead
shared variables   scalar structure containing the fields:
    n = [](0x0)
    k = [](0x0)
    A = [](0x0)
    u = [](0x0)
    s = [](0x0)
    v = [](0x0)
    opts = [](0x0)


Tatsuro MATSUOKA <tmacchant>

 

(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 rik5 (Posted a comment)
  • -email is unavailable- added by tmacchant (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
    2011-12-14 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code