-#include "colls.h"
+#include "colls_private.h"
/*****************************************************************************
MPI_Comm comm)
{
int src, dst, rank, num_procs, mask, relative_rank;
- int tag = 1;
+ int tag = COLL_TAG_BCAST;
- MPI_Comm_rank(comm, &rank);
- MPI_Comm_size(comm, &num_procs);
+ rank = smpi_comm_rank(comm);
+ num_procs = smpi_comm_size(comm);
relative_rank = (rank >= root) ? rank - root : rank - root + num_procs;
src = rank - mask;
if (src < 0)
src += num_procs;
- MPI_Recv(buff, count, data_type, src, tag, comm, MPI_STATUS_IGNORE);
+ smpi_mpi_recv(buff, count, data_type, src, tag, comm, MPI_STATUS_IGNORE);
break;
}
mask <<= 1;
dst = rank + mask;
if (dst >= num_procs)
dst -= num_procs;
- MPI_Send(buff, count, data_type, dst, tag, comm);
+ smpi_mpi_send(buff, count, data_type, dst, tag, comm);
}
mask >>= 1;
}