[petsc-users] MatCreateMPIAIJWithSplitArrays for symmetric matrix?

Jed Brown jed at 59A2.org
Mon Nov 8 05:45:50 CST 2010


On Mon, Nov 8, 2010 at 12:36, Daniel Langr <daniel.langr at gmail.com> wrote:

> I am looking for several eigenvalues and eigenvectors with SLEPc.
>

Presumably using methods that don't need a solve?

Where does the sparsity of the matrix come from?
>>
>
> Lie algebra, Slater determinants, SU(3) groups, new bases... But I don't
> understand all these things much, I just solve their (physicist's)
> eigenproblems.
>

This more likely explains what the entries are, but not what the sparsity
is.  Sparse problems usually have some spatial locality (and/or locality in
frequency or ensemble space).  It is usually much easier to find a
reasonable upper bound for the sparsity than to figure out exactly what the
entries are.  But I understand that this may be hard, such as if the support
of the basis functions grew without bound due to some nonlinearity in the
system.


> I don't know the exact matrix structure, but I need some estimate about the
> number of nonzeros, since the matrix needs to fit into a memory. And I can
> simply use 85-90% of available memory for arrays, and just left some space
> for vectors (but vectors are very small - matrices are not much sparse). If
> I underestimate arrays' size, I will abort a computation, cause I don't have
> any more memory.
>

Why not use MatMPISBAIJSetPreallocation and MatSetOption
MAT_NEW_NONZERO_ALLOCATION_ERR to abort if you have underestimated?  How
would you do better than this yourself?

Jed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20101108/fbf49dce/attachment-0001.htm>


More information about the petsc-users mailing list