[petsc-users] MatCreateMPIAIJWithSplitArrays for symmetric matrix?
Daniel Langr
daniel.langr at gmail.com
Mon Nov 8 05:14:36 CST 2010
Jed,
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.
Matrices emerge in new methods in nuclear structure computations
(symmetry-adapted no-core shell models). I don't know how to allocate
arrays exactly. But, I can generate a matrix into CSR format and then
probably reorganize it (split into diagonal and off-diagonal entries).
Daniel
Dne 8.11.2010 11:19, Jed Brown napsal(a):
> On Mon, Nov 8, 2010 at 09:32, Daniel Langr <daniel.langr at gmail.com
> <mailto:daniel.langr at gmail.com>> wrote:
>
> Is there an equivalent of MatCreateMPIAIJWithSplitArrays function
> for symmetric matrices? Or does this function work with symmetric
> matrices?
>
>
> There is MatCreateMPISBAIJWithArrays() in petsc-dev.
>
> I work with symmetric matrices that are extremely expensive to
> compute and I don't know their structure in advance. So to do
> preallocation, it is not practical to compute a matrix twice -
> firstly only to get d_nnz and o_nnz arrays and secondly to set
> values. Now, I solve this problem by storing a matrix to a file
> system, which is faster but still far from ideal. The best solution
> I see is to compute a matrix only once, store it in memory as split
> CSR arrays and then just call something like
> MatCreateMPISBAIJWithSplitArrays.
>
>
> Where do the matrices come from? How do you know how to allocate to
> create the arrays?
>
> Jed
More information about the petsc-users
mailing list