7.12.2. Nonblocking Broadcast

PreviousUpNext
Up: Nonblocking Collective Operations Next: Example using MPI_IBCAST Previous: Nonblocking Barrier Synchronization

MPI_IBCAST(buffer, count, datatype, root, comm, request)
INOUT bufferstarting address of buffer (choice)
IN countnumber of entries in buffer (nonnegative integer)
IN datatypedatatype of buffer (handle)
IN rootrank of broadcast root (integer)
IN commcommunicator (handle)
OUT requestcommunication request (handle)
C binding
int MPI_Ibcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm, MPI_Request *request)
int MPI_Ibcast_c(void *buffer, MPI_Count count, MPI_Datatype datatype, int root, MPI_Comm comm, MPI_Request *request)
Fortran 2008 binding
MPI_Ibcast(buffer, count, datatype, root, comm, request, ierror)
TYPE(*), DIMENSION(..), ASYNCHRONOUS :: buffer
INTEGER, INTENT(IN) :: count, root
TYPE(MPI_Datatype), INTENT(IN) :: datatype
TYPE(MPI_Comm), INTENT(IN) :: comm
TYPE(MPI_Request), INTENT(OUT) :: request
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
MPI_Ibcast(buffer, count, datatype, root, comm, request, ierror) !(_c)
TYPE(*), DIMENSION(..), ASYNCHRONOUS :: buffer
INTEGER(KIND=MPI_COUNT_KIND), INTENT(IN) :: count
TYPE(MPI_Datatype), INTENT(IN) :: datatype
INTEGER, INTENT(IN) :: root
TYPE(MPI_Comm), INTENT(IN) :: comm
TYPE(MPI_Request), INTENT(OUT) :: request
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
Fortran binding
MPI_IBCAST(BUFFER, COUNT, DATATYPE, ROOT, COMM, REQUEST, IERROR)
<type> BUFFER(*)
INTEGER COUNT, DATATYPE, ROOT, COMM, REQUEST, IERROR

This call starts a nonblocking variant of MPI_BCAST (see Section Broadcast).


PreviousUpNext
Up: Nonblocking Collective Operations Next: Example using MPI_IBCAST Previous: Nonblocking Barrier Synchronization


7.12.2.1. Example using MPI_IBCAST

PreviousUpNext
Up: Nonblocking Broadcast Next: Nonblocking Gather Previous: Nonblocking Broadcast

The example in this section uses an intra-communicator.


Example Start a broadcast of 100 ints from MPI process 0 to every MPI process in the group, perform some computation on independent data, and then complete the outstanding broadcast operation.


MPI_Comm comm; 
int array1[100], array2[100]; 
int root=0; 
MPI_Request req; 
... 
MPI_Ibcast(array1, 100, MPI_INT, root, comm, &req); 
compute(array2, 100); 
MPI_Wait(&req, MPI_STATUS_IGNORE); 


PreviousUpNext
Up: Nonblocking Broadcast Next: Nonblocking Gather Previous: Nonblocking Broadcast


Return to MPI-5.0 Standard Index
Return to MPI Forum Home Page

(Unofficial) MPI-5.0 of June 9, 2025
HTML Generated on March 2, 2025