Duplicating MATSeqAIJ matrix to other PEs
Barry Smith
bsmith at mcs.anl.gov
Tue May 5 16:06:30 CDT 2009
We don't have such a beasty. The simpliest thing is to have
process 0 broadcast the i,j, and a arrays of Mat_SeqAIJ to all
processes then use MatCreateMPIAIJWithArrays()
on all processes except zero. Finally change the free_a and free_ij
fields of the newly created SeqAIJ matrices to PETSC_TRUE so that the
matrix will free the space
when it is destroyed. Note you will need to include src/mat/impls/aij/
seq/aij.h into the source file to access the entries in the Mat_SeqAIJ
data structure.
Barry
On May 5, 2009, at 1:20 PM, Keita Teranishi wrote:
> Hi,
>
> I have been trying to copy a MatSeqAIJ matrix on PE0 to the rest of
> the PEs so that every PE has the exactly the same matrix. What is
> the best way to do that?
>
> Thanks in advance,
>
> ================================
> Keita Teranishi
> Scientific Library Group
> Cray, Inc.
> keita at cray.com
> ================================
>
More information about the petsc-users
mailing list