Explicitly synchronizes all processes in the group of a communicator by blocking until all processes
have entered the procedure.
33 LARGE NUMBERS
LARGE COUNT EXAMPLE
C
intMPI_Scatterv(const void* sendbuf,const intsendcounts[],
const intdispls[], MPI_Datatype sendtype, void* recvbuf,
intrecvcount, MPI_Datatype recvtype, introot, MPI_Comm
comm)
↪
↪
↪
intMPI_Scatterv_c(const void* sendbuf,constMPI_Count
sendcounts[],constMPI_Aint displs[], MPI_Datatype
sendtype,void* recvbuf, MPI_Count recvcount, MPI_Datatype
recvtype,introot, MPI_Comm comm)
↪
↪
↪
F08
MPI_Scatterv(sendbuf, sendcounts, displs, sendtype, recvbuf,
recvcount, recvtype, root, comm, ierror)↪
type(*),dimension(..),intent(in)::sendbuf
integer,intent(in)::sendcounts(*), displs(*), recvcount,
root↪
type(MPI_Datatype), intent(in)::sendtype, recvtype
type(*),dimension(..)::recvbuf
type(MPI_Comm),intent(in)::comm
integer,optional,intent(out)::ierrorF08
MPI_Scatterv(sendbuf, sendcounts, displs, sendtype, recvbuf,
recvcount, recvtype, root, comm, ierror)↪
type(*),dimension(..),intent(in)::sendbuf
integer(MPI_COUNT_KIND), intent(in)::sendcounts(*),
recvcount↪
integer(MPI_ADDRESS_KIND), intent(in)::displs(*)
type(MPI_Datatype), intent(in)::sendtype, recvtype
type(*),dimension(..)::recvbuf
integer,intent(in)::root
type(MPI_Comm),intent(in)::comm
integer,optional,intent(out)::ierror
34 NONBLOCKING COLLECTIVE COMMUNICATION
PROPERTIES
Properties similar to nonblocking point-to-point communication
1.Initiate communication
•Routine names:MPI_I...(I for immediate)
•Nonblocking routines return before the operation has completed.
•Nonblocking routines have the same arguments as their blocking counterparts plus
an extrarequestargument.
2.User-application proceeds with something else
3.Complete operation
•Same completion routines (MPI_Test,MPI_Wait, …)
Caution: Nonblocking collective operations cannot be matched with blocking collective
operations.
Nonblocking Barrier
Barrier is entered throughMPI_Ibarrier(which returns immediately). Completion (e.g.
MPI_Wait) blocks until all processes have entered.
NONBLOCKING BROADCAST [MPI-4.0, 6.12.2]
Blocking operation
CintMPI_Bcast(void* buffer,intcount, MPI_Datatype datatype,
introot, MPI_Comm comm)↪
Nonblocking operation
CintMPI_Ibcast(void* buffer,intcount, MPI_Datatype datatype,
introot, MPI_Comm comm, MPI_Request* request)↪
F08
MPI_Bcast(buffer, count, datatype, root, comm, ierror)
type(*),dimension(..)::buffer
integer,intent(in)::count, root
type(MPI_Datatype), intent(in)::datatype
type(MPI_Comm),intent(in)::comm
integer,optional,intent(out)::ierror
25