bugGNU Octave - Bugs: bug #37336, Incorrect result of rcond with...

 
 

bug #37336: Incorrect result of rcond with Netlib LAPACK

Submitted by:  Sébastien Villemot <svillemot>
Submitted on:  Wed 12 Sep 2012 04:19:10 PM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.6.2Operating System: GNU/Linux

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)

Fri 14 Sep 2012 10:06:36 AM UTC, comment #6:

I confirm that this change fixes the issue. Thanks for the prompt reaction.

I am going to upload Octave 3.6.3 with this patch applied to Debian experimental.

Sébastien Villemot <svillemot>
Thu 13 Sep 2012 07:22:28 PM UTC, comment #5:

I checked in the following change:

http://hg.savannah.gnu.org/hgweb/octave/rev/197774b411ec

Could you please verify that this fixes the problem?

I patched on stable, so this fix will appear in 3.6.4.

John W. Eaton <jwe>
Project Administrator
Thu 13 Sep 2012 04:10:42 PM UTC, comment #4:

Thanks, I can duplicate the error. I'll take a look to see what I can find about what is causing the difference.

John W. Eaton <jwe>
Project Administrator
Thu 13 Sep 2012 01:12:04 PM UTC, comment #3:

> sudo update-alternatives --display liblapack.so.3


Btw, just because I like to kill unnecessary usages of sudo, this command does not require it. The --config one does.

Jordi Gutiérrez Hermoso <jordigh>
Project Administrator
Thu 13 Sep 2012 08:12:27 AM UTC, comment #2:

Sorry for the missing pieces of information.

By Netlib LAPACK I mean the reference implementation of LAPACK, distributed on http://www.netlib.org.

By Atlas LAPACK I mean the version created by Atlas: many of its routines directly come from Netlib LAPACK, but some are replaced by optimized versions.

For Netlib LAPACK, I use version 3.4.1 (from Debian wheezy/sid amd64, package liblapack-dev/liblapack3 version 3.4.1-6).

For Atlas LAPACK I use version 3.4.8 (from Debian wheezy/sid amd64, package libatlas3-base version 3.8.4-9).

Note that in Debian we recently switched the default LAPACK flavour: the default used to be Atlas LAPACK, but we recently switched (in atlas 3.8.4-8) to Netlib LAPACK (for reasons which are off-topic here). If you are using Debian wheezy/sid (as I think you do), you can check your current LAPACK flavour with:

sudo update-alternatives --display liblapack.so.3

and change it with:

sudo update-alternatives --config liblapack.so.3

Finally, please find attached the C program which directly does the calculation using LAPACK. You need to link it against libmatio (available in package libmatio-dev), with something like:

gcc rcond-test.c -o rcond-test -lmatio -llapack

The program expects burp.mat in the current directory.

(file #26545)

Sébastien Villemot <svillemot>
Wed 12 Sep 2012 04:29:22 PM UTC, comment #1:

What is "Netlib LAPACK"? What version? How was it compiled? What architecture?

Can you post the C program that you wrote to do the calculation?

John W. Eaton <jwe>
Project Administrator
Wed 12 Sep 2012 04:19:10 PM UTC, original submission:

I attach a MAT-file containing a 2x2 matrix (Finf), whose rcond is different depending on the flavor of LAPACK that I use.

With Netlib LAPACK:

octave:2> rcond(Finf)
ans = 0.40463

With Atlas' LAPACK:

octave:2> rcond(Finf)
ans = 0

MATLAB gives 5.5511e-17.

Since the matrix is quasi-singular, the right answer is (almost) zero. A value of 0.4 is plain wrong.

I cannot determine if this is a bug in Netlib LAPACK or Octave. I wrote a C program reading the matrix with libmatio then calling dgetrf+dgecon and I get the right result with both versions of LAPACK, so this points towards a bug in Octave, but I am still unsure.

Sébastien Villemot <svillemot>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #26545:  rcond-test.c added by svillemot (1KiB - text/x-csrc)
file #26542:  burp.mat added by svillemot (216B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jordigh (Posted a comment)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by svillemot (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 14 Sep 2012 01:52:36 PM UTCjweStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Thu 13 Sep 2012 07:22:28 PM UTCjweStatusNone=>Ready For Test
    Thu 13 Sep 2012 08:12:27 AM UTCsvillemotAttached File-=>Added rcond-test.c, #26545
    Wed 12 Sep 2012 04:19:10 PM UTCsvillemotAttached File-=>Added burp.mat, #26542

    Back to the top


    Powered by Savane 3.1-cleanup1