[petsc-users] VecScatter from comm to subcomm: should I aggregate?

Hui Zhang mike.hui.zhang at hotmail.com
Sun Apr 21 06:23:25 CDT 2013


On Apr 19, 2013, at 5:15 PM, Hui Zhang wrote:

> I'm doing something like gasm.c.  I can construct one VecScatte from comm to each subcomm.  But I can also construct VecScatter's from comm to the processors in subcomm.  Which mode do you think is good? Why? Thanks for teaching me!

After reading the source codes, I think I mis-understood VecScatterCreate.  There is no direct support for Scatter between comm and subcomm unless one of them is Seq (MPI_Comm_size == 1).
Anyway, gasm.c provides a very good example for the 'MPI to MPI' (the same comm) Scatter.  And asm.c provides that for 'MPI to Seq'.  Learned a lot!  Thanks for petsc's source codes!



More information about the petsc-users mailing list