bugGNU Octave - Bugs: bug #32804, Memory leak solving linear system...

 
 

bug #32804: Memory leak solving linear system (left division "\") with sparse matrix

Submitter:  Paolo G. Ferrandi <paolo>
Submitted:  Wed 16 Mar 2011 11:31:51 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  jordigh
Originator Name:  Open/Closed:  * Closed
Release:  * 3.4.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 01 Apr 2011 09:46:28 AM UTC, comment #3: 
Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Wed 16 Mar 2011 02:21:51 PM UTC, comment #2: 

Thanks for the report. I can confirm it as well. I thought it might be related to #32767, but the memory leaks seems to be specifically in the backslash operator code. Since I've been recently looking at the sparse matrix code, I feel ready to tackle this one. I will keep you posted with any progress I make on squashing this bug.

Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Wed 16 Mar 2011 12:21:33 PM UTC, comment #1: 

I can confirm this behaviour with both the 3.4 and default branches in the development sources.
c.

Carlo de Falco <cdf>
Group Member
Wed 16 Mar 2011 11:31:51 AM UTC, original submission:  

A massive memory allocation is caused by the following code. The allocated memory is never freed until you quit GNU Octave.


nx=1000;
K=spdiags ([-ones(nx+1,1), 2*ones(nx+1,1), ...
           -ones(nx+1,1)],-1:1,nx+1,nx+1);
[L,U]=lu (K);
b=ones (1001,1);
for t=1:1e6
        y=L\b;
end


lu returns L as a permuted-lower sparse matrix. Since L is a lower matrix, you can change matrix type to lower:


nx=1000;
K=spdiags ([-ones(nx+1,1), 2*ones(nx+1,1), ...
           -ones(nx+1,1)],-1:1,nx+1,nx+1);
[L,U]=lu (K);
L=matrix_type (L,'lower');
b=ones (1001,1);
for t=1:1e6
        y=L\b;
end


In the latter case there is not any massive memory allocation  and everything seems to be fine.

Paolo


Paolo G. Ferrandi <paolo>

 

(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 jordigh (Posted a comment)
  • -email is unavailable- added by cdf (Posted a comment)
  • -email is unavailable- added by paolo (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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-04-01 jordigh StatusConfirmed Fixed
        Open/ClosedOpen Closed
        SummaryMemory leak solving linear system (left division &quot;\\&quot;) with sparse matrix Memory leak solving linear system (left division "\") with sparse matrix
    2011-03-16 jordigh StatusNone Confirmed
        Assigned toNone jordigh
        Release3.2.4 3.4.0
        SummaryMemory leak solving linear system (left division &quot;\\&quot;) with sparse matrix Memory leak solving linear system (left division "\") with sparse matrix

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code