bugGNU Octave - Bugs: bug #41192, Basic matrix inversion fails in...

 
 

bug #41192: Basic matrix inversion fails in MSVC build for Windows

Submitter:  None
Submitted:  Fri 10 Jan 2014 07:26:51 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Wont Fix Assigned to:  None
Originator Name:  Saul Mtakula Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.6.4
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 24 Feb 2014 03:44:55 AM UTC, comment #12: 

After testing, it appears the problem lies in OpenBLAS. If you select another linear algebra library during installation, the problem does not occur.

The Octave/MSVC 3.6.4 still uses OpenBLAS-0.2.2. I've tried with a newer version of OpenBLAS, 0.2.8, and the problem does not occur either. Looking at OpenBLAS changelog, a couple of bugs have been fixed in gemm/gemv computation on x86/x86_64 CPU. I think you may have hit one of those bugs.

I've uploaded this newer OpenBLAS library here:
https://dl.dropboxusercontent.com/u/45539519/vc100-libblas_openblas.dll
Install it into octave bin/ subdirectory, as vc100-libblas.dll. This is only needed if OpenBLAS was selected as linear algebra library during installation.

I'm closing this bug as it'll be fixed automatically when a new Octave/MSVC binary is ever generated.

Michael Goffioul <goffioul>
Sat 22 Feb 2014 10:28:39 PM UTC, comment #11: 

The Octave/MSVC 3.6.4 installer has been downloaded 130,662 times. By comparison, the Octave/MinGW 3.6.4 base archive has been downloaded 78,286 times (statistics obtained from SF.net). So either not many people are affected by the problem reported, or people are very shy.

It would help to know what BLAS version has been chosen during installation.

I'll give the offending code a try when I get a chance.

Michael Goffioul <goffioul>
Sat 01 Feb 2014 09:42:28 AM UTC, comment #10: 

I've added Michael Goffioul to CC because he did the "Octave 3.6.4 for Windows Microsoft Visual Studio" build.

@Michael: Could you try Saul's testcase?

-- Andy

Andreas Weber <andy1978>
Group Member
Fri 31 Jan 2014 05:26:48 PM UTC, comment #9: 

Hi Andreas
No I did not try the 3.8.0 MXE build but what I found is that the problems are with the Microsoft Visual Studio version of Octave 3.6.4  (octave-3.6.4-vs2010-setup.exe date 2013-05-29). The Windows MinGW version Octave 3.6.4 for  works just fine once I installed it.
In fact the bug reports #41192 and #40892 are a related to the Visual Studio Version.
To summarize the Visual Studio Version will cause crashes for matrix inversion, when there is too much unsuppressed output (if there is no semicolon after a large matrix for e.g), with the control toolbox sigma function if the system in state space form (presumably because there could be some intermediate inversion operation).
In my opinion the Visual Studio Version of Octave should be withdrawn; there must not be that many users with it otherwise there would be a huge outcry.

Saul

Anonymous
Fri 31 Jan 2014 03:31:17 PM UTC, comment #8: 

Saul, could you try the 3.8.0 MXE build?

Andreas Weber <andy1978>
Group Member
Sat 11 Jan 2014 12:33:18 AM UTC, comment #7: 

Works for me in Octave 3.8.0 (mxe build) in a Windows XP VM.

Mike Miller <mtmiller>
Group Member
Sat 11 Jan 2014 12:05:00 AM UTC, comment #6: 

My computer is fairly new. Intel i7-3720QM processor, 2.6 Ghz, 8G Ram, 64 bit

Anonymous
Fri 10 Jan 2014 10:33:55 PM UTC, comment #5: 

Are you using very old hardware? The BLAS library might be compiled with CPU instructions that your machine can't use.

Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Fri 10 Jan 2014 09:23:27 PM UTC, comment #4: 

doesn't crash in windows with 3.8

Felipe G. Nievinski <fgnievinski>
Fri 10 Jan 2014 08:39:10 PM UTC, comment #3: 

I should have mentioned that my test was with
Linux version.  So, this is likely a windows
issue.

Michael Godfrey <godfrey>
Group Member
Fri 10 Jan 2014 08:28:18 PM UTC, comment #2: 

The install is the downloaded windows mingw binary with whatever version of Lapack incorporated.

Anonymous
Fri 10 Jan 2014 08:20:19 PM UTC, comment #1: 

Works for me in 3.6.4 and current devel.

May be a problem with your configuration
and/or LAPACK instalation.

Michael Godfrey <godfrey>
Group Member
Fri 10 Jan 2014 07:26:51 PM UTC, original submission:  

The following code fails in the last statement; the matrix inversion crashes Octave. Changing the code to inv() also results in a crash. Matlab or Scilab execute code without a crash.


clear
clc

A = [ 0 0 1.1320 0 -1
      0 -0.0538 -0.1712 0 0.0705
      0 0 0 1 0
      0 0.0485 0 -0.8556 -1.013
      0 -0.2909 0 1.0532 -0.6859 ];
B = [ 0 0 0
      -0.120 1 0
      0 0 0
      4.4190 0 -1.665
      1.5750 0 -0.0732 ] ;
     
C = [ eye(3,3) zeros(3,2) ] ;

D = zeros(3,3) ;

Gam=B;

      Aw=-0.001*eye(3,3);
      Bw=eye(3,3);
      Cw=eye(3,3);
      Dw=zeros(3,3);
     
      Aa=[A B*Cw; zeros(size(Aw,1), size(A,2)) Aw];
     
     
      Ga=[B*Dw;Bw];
     
    
     
      j=i;
      Z=(0.001*j*eye(size(Aa))-Aa);
      Z1=Z\Ga;

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 andy1978 (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by fgnievinski (Posted a comment)
  • -email is unavailable- added by godfrey (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-02-24 goffioul StatusNeed Info Wont Fix
        Open/ClosedOpen Closed
    2014-02-22 mtmiller StatusWorks For Me Need Info
        SummaryBasic matrix inversion fails Basic matrix inversion fails in MSVC build for Windows
    2014-02-01 andy1978 Carbon-Copy- Added -email is unavailable-
    2014-01-11 mtmiller StatusNone Works For Me

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code