[petsc-users] MatCreateMPIAIJWithSplitArrays for symmetric matrix?

Daniel Langr daniel.langr at gmail.com
Mon Nov 8 05:36:39 CST 2010


Dne 8.11.2010 12:24, Jed Brown napsal(a):
> On Mon, Nov 8, 2010 at 12:14, Daniel Langr <daniel.langr at gmail.com
> <mailto:daniel.langr at gmail.com>> wrote:
>
>     MatCreateMPISBAIJWithArrays() copy the arrays, so it won't help me.
>     I need all available memory for a matrix, so I cannot have it in
>     memory twice.
>
>
> What preconditioners do you use?  Block Jacobi with incomplete
> factorization, for example, uses the same amount of memory as the
> matrix, presumably you could free those arrays before factoring.  This
> doesn't help if you use SOR.

I am looking for several eigenvalues and eigenvectors with SLEPc.

>     Matrices emerge in new methods in nuclear structure computations
>     (symmetry-adapted no-core shell models). I don't know how to
>     allocate arrays exactly.
>
>
> 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.

>     But, I can generate a matrix into CSR format and then probably
>     reorganize it (split into diagonal and off-diagonal entries).
>
>
> It's not clear how you could generate it in CSR format to begin with,
> considering that if you underallocate, you will be forced to reallocate
> and copy.  It would be possible to have a
> MatCreateMPISBAIJWithSplitArrays, but it would be very peculiar to be
> able to create the arrays without being able to preallocate correctly.

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.

Daniel

> Jed



More information about the petsc-users mailing list