I'm trying to recombine sub-arrays without the dark-grey rows with MPI_Gatherv
. Picture's worth a thousand words:
How would you send only parts of *sendbuf
(the first parameter in MPI_Gatherv manual) to the root process (without a wasteful rewriting in another structure, this time without the dark-grey rows)? The *displacements
(the 4th parameter) is only relevant to the *recvbuf
of the root process.
Thank you.
Update (or, being more precise)
I wanted to also send the "boundary" (light-grey) cells ... not just the "interior" (white) cells. As osgx correctly pointed out: in this case the MPI_Gatherv
suffices ... some conditional array indexing will do it.