|
MPI Collective Communications
Collective communication must involve all processes in the scope of a communicator. All processes are by default, members in the communicator MPI_COMM_WORLD.
Some Frequently Used Collective Communication Routines
MPI_Barrier (comm)
MPI_Bcast (&buffer,count,datatype,root,comm)
MPI_Scatter (&sendbuf,sendcnt,sendtype,&recvbuf,recvcnt,recvtype,root,comm)
MPI_Gather (&sendbuf,sendcnt,sendtype,&recvbuf,recvcount,recvtype,root,comm)
MPI_Allgather (&sendbuf,sendcount,sendtype,&recvbuf,recvcount,recvtype,comm)
MPI_Reduce (&sendbuf,&recvbuf,count,datatype,op,root,comm)
MPI Reduction Operation |
C Data Types |
Fortran Data Type |
MPI_MAX
maximum
| integer, float
| integer, real, complex
|
MPI_MIN
minimum
| integer, float
| integer, real, complex
|
MPI_SUM
sum
| integer, float
| integer, real, complex
|
MPI_PROD
product
| integer, float
| integer, real, complex
|
MPI_LAND
logical AND
| integer
| logical
|
MPI_BAND
bit-wise AND
| integer, MPI_BYTE
| integer, MPI_BYTE
|
MPI_LOR
logical OR
| integer
| logical
|
MPI_BOR
bit-wise OR
| integer, MPI_BYTE
| integer, MPI_BYTE
|
MPI_LXOR
logical XOR
| integer
| logical
|
MPI_BXOR
bit-wise XOR
| integer, MPI_BYTE
| integer, MPI_BYTE
|
MPI_MAXLOC
max value and location
| float, double and long double
| real, complex,double precision
|
MPI_MINLOC
min value and location
| float, double and long double
| real, complex, double precision
| | | | | | | | | | | | |
|
|