[petsc-users] parallel Mat Mult a serial Vec or a serial Mat
Jed Brown
jedbrown at mcs.anl.gov
Sun Jan 20 12:41:01 CST 2013
On Sun, Jan 20, 2013 at 12:26 PM, Hui Zhang <mike.hui.zhang at hotmail.com>wrote:
> I think about the method and find it is not as convenient as allowing
> inter-communicator operations.
>
Supporting general mixed-communicator operations is a non-starter because
the semantics can be ambiguous, it's very easy to get deadlock, and you
can't debug or check invariants.
Also note that inter-communicators require MPI-2 and have historically had
implementation bugs since they are not heavily used.
For example, VecScatter actually allows the two Vec in different
> communicators (or one must include
> the other?).
>
> I have more questions.
> (1) Does MatScatter supports MatMatMult?
>
No, and VecScatter does not keep enough information to support such an
operation. If you have the index sets, you can MatPermute(), but moving
matrix entries around is quite expensive so you should usually avoid it.
> (2) Does MatConvert works on MATNEST?
>
No, the implementation was never quite finished. We still think it's a
useful thing.
> (3) Does MatGetLocalSubMat support localization to a sub-communicator
> instead of a process?
>
No, you might be misunderstanding the purpose MatGetLocalSubMatrix(). It
always returns a Mat object, but the communicator is not specified and it
may not be "functional" in the sense of supporting MatMult, etc. It does,
however, support MatSetValuesLocal() and related operations. See
snes/examples/tutorials/ex28.c for an example of assembling a partitioned
system into nested versus monolithic format without any knowledge of the
representation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130120/560aa58f/attachment.html>
More information about the petsc-users
mailing list