
mpi-forum.org
https://www.mpi-forum.org/docs/mpi-1.1/mpi-11-html…
Examples using MPI_GATHER, MPI_GATHERV
Same as Example Examples using MPI_GATHER, MPI_GATHERV , but done in a different way at the sending end. We create a datatype that causes the correct striding at the sending end so that that we read a column of a C array. A similar thing was done in Example Examples , Section Examples . MPI_Comm comm; int gsize,sendarray [100] [150],*sptr; int root, *rbuf, stride, myrank, disp [2], blocklen [2 ...