On Jan 20, 2013, at 7:41 PM, Jed Brown wrote: > > 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.
Thanks very much! I am taking a look of this example. But MATNEST does not support factorization. I understand now I must do it in a basic way using MatSetValuesLocal.
