From bug-request at octave dot org Fri Nov 11 13:39:19 2005 Subject: Re: Data loss during creation of large sparse matrices? From: David Bateman To: Ralf-Michael Vetter CC: bug at octave dot org Date: Fri, 11 Nov 2005 20:34:57 +0100 Ralf-Michael Vetter a écrit : >Hi all, > >there must be a bug in handling large sparse matrices. >When i try to set up a sparse matrix with about 10.000 entries, everything works find. But using more than 30.000-50.000 entries, some data will always get lost. >As an (unrealistic) example, the following sparse matrix should contain 100 non-zero entries. But it actually has only 21 (while the 22th is an invalid number): > >
>octave:1> M = sparse( [1:100]', [1:100]', [1:100]', 100000000,100000000)
>M =
>  
>
As John pointed out using 2.9.x should help here. But this is one big 
matrix even if it is empty. Think about the memory size needed to store 
this beast. You have the cidx vector with (1e8+1) elements of 4bytes 
plus a vector of 100 integers for ridx and 100 doubles for data for a 
total number of bytes of "(1e8+1)*4 + 100*4 + 100*8 = 4e8 = 381 MB". I 
can create this with 2.9.x on my poor laptop, but it swaps quite badly.

D.



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------