otherwise the new protocol is used (see variable Ldb).
3) These lines show the bandwidth (= buffer length / execution time)
for both protocols.
- 4) This line shows that the limit is choosen well if the ratio is
- between 0.95 (loosing 5% for buffer length near and >=limit)
+ 4) This line shows that the limit is chosen well if the ratio is
+ between 0.95 (losing 5% for buffer length near and >=limit)
and 1.10 (not gaining 10% for buffer length near and <limit).
5) This line shows that the new protocol is 2..7 times faster
for long counts.
REDUCE_LIMITS
namespace simgrid{
namespace smpi{
-static int MPI_I_anyReduce(const void* Sendbuf, void* Recvbuf, int count, MPI_Datatype mpi_datatype, MPI_Op mpi_op, int root, MPI_Comm comm, int is_all)
+static int MPI_I_anyReduce(const void* Sendbuf, void* Recvbuf, int count, MPI_Datatype mpi_datatype, MPI_Op mpi_op,
+ int root, MPI_Comm comm, bool is_all)
{
char *scr1buf, *scr2buf, *scr3buf, *xxx, *sendbuf, *recvbuf;
int myrank, size, x_base, x_size, computed, idx;
int reduce__rab(const void* Sendbuf, void* Recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm)
{
- return( MPI_I_anyReduce(Sendbuf, Recvbuf, count, datatype, op, root, comm, 0) );
+ return MPI_I_anyReduce(Sendbuf, Recvbuf, count, datatype, op, root, comm, false);
}
int allreduce__rab(const void* Sendbuf, void* Recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
{
- return( MPI_I_anyReduce(Sendbuf, Recvbuf, count, datatype, op, -1, comm, 1) );
+ return MPI_I_anyReduce(Sendbuf, Recvbuf, count, datatype, op, -1, comm, true);
}
}
}