help-octave
[Top][All Lists]
Advanced

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

Re: large sparse matrix


From: David Bateman
Subject: Re: large sparse matrix
Date: Mon, 31 Aug 2009 21:53:55 +0200
User-agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103)

Carlo de Falco wrote:

On 31 Aug 2009, at 17:23, dbateman wrote:

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

David,
Thanks for the quick answer!
I understand now that the matrix I used in the previous email was not a good example... Though, the matrix that produced the problem in the first place comes from a Galerkin discretization of Stokes' equation, so it does have a very precise structure, it is essentially of the form

[A B' 0; B 0 E'; 0 E 0]

where A and B are banded, E is a row vector and A is SPD.
Also, I tried to save the matix and rhs and solve the system in matlab and it worked fine on the same hardware. I find this particularly puzzling as I thought that both matlab aand Octave ultimately rely on
SuiteSparse for solving Sparse linear systems...

c.


Yes, but the configuration of SuiteSparse in terms of the pivot threshold is the default that TIm Davis sets for Octave and whatever mathworks chose to use for matlab. So don't expect exactly the behavior. In Octave what does

matrix_type(A)

give? If it doesn't flag your matrix as PD then there might be an issue with the detection of the matrix and PD and the solver used in Octave will be LU. Also, what does the code

[R, p, q] = chol(A);
nnz(R)

work for Octave and Matlab? If so what is the value of NNZ of the factorization in both cases.

Regards
David

--
David Bateman                                address@hidden
35 rue Gambetta                              +33 1 46 04 02 18 (Home)
92100 Boulogne-Billancourt FRANCE            +33 6 72 01 06 33 (Mob)



reply via email to

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