bugGNU Octave - Bugs: bug #62867, wrong result when solving...

 
 

bug #62867: wrong result when solving large-scale linear equation

Submitter:  None
Submitted:  Fri 05 Aug 2022 07:48:14 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Duplicate Assigned to:  None
Originator Name:  Junjie Yu Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 7.2.0
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 05 Aug 2022 11:02:38 PM UTC, comment #1: 

Duplicate (double post) of bug #62866. Closing this instance.

Arun Giridhar <arungiridhar>
Group Member
Fri 05 Aug 2022 07:48:14 PM UTC, original submission:  

I was working on running some Matlab files in Octave (7.2.0) and got an incorrect answer. After digging for a while, I found Octave meets 'matrix singular to machine precision' warning when solving large-size linear equations. Below I provide a simple test case for reproducing the error.
We want to solve a linear system: A*x = rhs(see test.m file)
Where A has dimension 93248*93248 and is very sparse, rhs has the dimension of 93248*1.
we can solve x using x = mldivide(A, rhs);
matlab can solve this correctly, octave lead to precision error and give a totally wrong result.


octave-output:
warning: matrix singular to machine precision, rcond = 1.31465e-17
warning: called from
    test at line 6 column 3

ans = -0.027239

matlab-output:
ans =

   6.7878e+11

Could you check whether you can reproduce this error and give me any suggestions to handle this?
Thanks so much!



Anonymous

 

(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 arungiridhar (Posted a comment)
  • -email is unavailable- added by None (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
    2022-08-05 arungiridhar StatusNone Duplicate
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code