The difference between MPI_allgather and MPI_allgatherv

What is the difference between MPI_allgather()and MPI_allgatherv()?

+3
source share
2 answers

Of MPI standard

MPI_GATHERV extends the functionality of MPI_GATHER, allowing you to change the amount of data from each process, since recvcounts is now an array. It also provides more flexibility as to where the data is placed in the root, providing a new argument, crowding out

MPI_ALLGATHERV is then an extension of this.

Signatures for two functions:

int MPI_Allgather(void * sendbuff, int sendcount, MPI_Datatype sendtype, 
                  void * recvbuf, int recvcount, MPI_Datatype recvtype, 
                  MPI_Comm comm)
int MPI_Allgatherv(void * sendbuff, int sendcount, MPI_Datatype sendtype, 
                   void * recvbuf, int * recvcounts, int * displs, 
                   MPI_Datatype recvtype, MPI_Comm comm)

You can specify the size and destination offset for each process using recvcountsand displsusing option v.

+6
source

, @Scott Wales:

MPI :

  • , / . : MPI_Scatter, MPI_Gather, MPI_Alltoall .. ;

  • / / , - /. "v": MPI_Scatterv, MPI_Gatherv, MPI_Alltoallv .. , , , (, ): ( ) ( );

  • , . "w". MPI_Alltoallw, 2.2 MPI ( ) 3.0.

MPI , MPI ( ), MPI , , .

+3

All Articles