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

 
 

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

Submitted by:  None
Submitted on:  Fri 10 Jan 2014 07:26:51 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: Wont FixAssigned to: None
Originator Name: Saul MtakulaOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.6.4
Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission 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>
Project Member
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>
Project Member
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>
Project 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>
Project 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>
Project Administrator
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>
Project Administrator
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>
Project 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>
Project 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.001jeye(size(Aa))-Aa);
Z1=Z\Ga;

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by goffioul (Posted a comment)
  • -unavailable- added by andy1978
  • -unavailable- added by andy1978 (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by jordigh (Posted a comment)
  • -unavailable- added by fgnievinski (Posted a comment)
  • -unavailable- added by godfrey (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 24 Feb 2014 03:44:55 AM UTCgoffioulStatusNeed Info=>Wont Fix
      Open/ClosedOpen=>Closed
    Sat 22 Feb 2014 10:17:49 PM UTCmtmillerStatusWorks For Me=>Need Info
      SummaryBasic matrix inversion fails=>Basic matrix inversion fails in MSVC build for Windows
    Sat 01 Feb 2014 09:42:28 AM UTCandy1978Carbon-Copy-=>Added -unavailable-
    Sat 11 Jan 2014 12:33:18 AM UTCmtmillerStatusNone=>Works For Me

    Back to the top


    Powered by Savane 3.1-cleanup1