1 #include "colls_private.h"
4 smpi_coll_tuned_bcast_flattree(void *buff, int count, MPI_Datatype data_type,
5 int root, MPI_Comm comm)
10 int i, rank, num_procs;
11 int tag = COLL_TAG_BCAST;
13 rank = smpi_comm_rank(comm);
14 num_procs = smpi_comm_size(comm);
17 smpi_mpi_recv(buff, count, data_type, root, tag, comm, MPI_STATUS_IGNORE);
21 reqs = (MPI_Request *) xbt_malloc((num_procs - 1) * sizeof(MPI_Request));
24 // Root sends data to all others
25 for (i = 0; i < num_procs; i++) {
28 *(req_ptr++) = smpi_mpi_isend(buff, count, data_type, i, tag, comm);
31 // wait on all requests
32 smpi_mpi_waitall(num_procs - 1, reqs, MPI_STATUSES_IGNORE);