bugGNU Octave - Bugs: bug #32364, problem multiplying permutation...

 
 

bug #32364: problem multiplying permutation and sparse matrices

Submitted by:  John W. Eaton <jwe>
Submitted on:  Sat 05 Feb 2011 03:02:24 PM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: NoneAssigned to: David Bateman <dbateman>
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 13 Feb 2011 05:36:51 PM UTC, comment #4:

Well as you accidentally pushed my patch in

http://hg.savannah.gnu.org/hgweb/octave/rev/afb65a7bc065

I pushed a changelog and am closing this bug

D.

David Bateman <dbateman>
Project MemberIn charge of this item.
Wed 09 Feb 2011 07:02:26 AM UTC, comment #3:

It seems to work for me. Would you please add a ChangeLog entry and commit the change?

Thanks.

John W. Eaton <jwe>
Project Administrator
Tue 08 Feb 2011 11:53:48 PM UTC, comment #2:

Strictly speaking the sparse code doesn't need to make the assumption that the row indexes are in order, however doing so makes some code simpler, while making other code more difficult. I made the choice when I started writing the sparse code to assume that the row indexes were ordered and all of the sparse code would have to be gone over to remove this assumption. So probably the best thing to do here is to modify PM * SM so that it to orders the row indexes. Fortunately, by its nature SM * PM already does so.

Here is a patch that I think does the right thing but its received little testing

D.

(file #22632)

David Bateman <dbateman>
Project MemberIn charge of this item.
Tue 08 Feb 2011 07:57:56 AM UTC, comment #1:

[Reposting because I screwed up a verbatim tag and the report on the web was incomplete; I wish this thing had a preview button...]

While investigating the following bug report

https://mailman.cae.wisc.edu/pipermail/bug-octave/2011-February/017300.html

I uncovered a problem with multiplying permutation and sparse matrices.

Given

I was trying to verify that

was numerically zero, but found

Note the strange result that some elements apparently have two values!

However,

returns a matrix of zeros. Playing around a bit more, I noticed

Note the elements in columns 7 and 8 are out of order. I assume that the sparse matrix multiplication algorithm assumes that the elements in each column are ordered by ascending row number.

I've looked at the code in Sparse-perm-op-defs.h, but I think it will take me a while to figure this out, so I would really appreciate it if someone who understands this code better could take a look at this problem.

I'm adding the following people to the CC list for this report: Jason Reidy since he is listed as the author of Sparse-perm-op-defs.h, Jaroslav Hajek because he is the author of the permutation matrix code, and David Bateman because he has good knowledge of the sparse matrix code.

John W. Eaton <jwe>
Project Administrator
Sat 05 Feb 2011 03:02:24 PM UTC, original submission:

While investigating the following bug report

https://mailman.cae.wisc.edu/pipermail/bug-octave/2011-February/017300.html

I uncovered a problem with multiplying permutation and sparse matrices.

Given

I was trying to verify that

John W. Eaton <jwe>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #22632:  patch.perm added by dbateman (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dbateman (Updated the item)
  • -unavailable- added by jwe (Submitted the item)
  • -unavailable- added by jwe
  • -unavailable- added by jwe
  • -unavailable- added by jwe
  •  

    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
    Sun 13 Feb 2011 05:36:51 PM UTCdbatemanAssigned toNone=>dbateman
      Open/ClosedOpen=>Closed
    Tue 08 Feb 2011 11:53:48 PM UTCdbatemanAttached File-=>Added patch.perm, #22632
    Sat 05 Feb 2011 03:02:24 PM UTCjweCarbon-Copy-=>Added -unavailable-
      Carbon-Copy-=>Added highegg
      Carbon-Copy-=>Added dbateman

    Back to the top


    Powered by Savane 3.1-cleanup1