help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: large sparse matrix


From: dbateman
Subject: Re: large sparse matrix
Date: Mon, 31 Aug 2009 08:23:00 -0700 (PDT)



Carlo de Falco-2 wrote:
> 
> Hi,
> 
> I am using the OSX binary version of octave 3.2.2.
> I am having trouble solving a linear system with a large but quite
> sparse coefficient matrix, the problem can be reproduced by:
> 
> octave-3.2.2:1> mat = sprandn (20e3,20e3,6e-3);
> octave-3.2.2:2> rhs = ones (20e3, 1);
> octave-3.2.2:3> x = mat\rhs;
> octave-3.2.2(56985) malloc: *** mmap(size=2147483648) failed (error
> code=12)
> *** error: can't allocate region
> *** set a breakpoint in malloc_error_break to debug
> 
> <and many more simila errors>
> 
> although large, this system seems much smaller than the amount of
> memory I have on my machine (4Gb), and also smaller than the 32 bit
> indexing limits.
> Is this a bug or is there some other limits I should consider that I
> am forgetting?
> 
> 

Its not a bug.. Trying to factorize a sparse random matrix invariably
results in a dense factorization... You need some structure in the original
sparse matrix that the factorization can use to keep the factorization
sparse...  A 20e3-by-20e3 dense matrix is much larger than both the 32bit
limit of 2Gvalues and 4GB..

Try using some of the test matrices from the Florida University sparse
matrix collection instead as these matrices are derived from real problems
and have structure that the factorization can use to keep the matrix sparse.

Regards
David
 

-- 
View this message in context: 
http://www.nabble.com/large-sparse-matrix-tp25224914p25225293.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]