namespace simgrid{
namespace smpi{
// NP pow of 2 for now
-int Coll_allreduce_rab1::allreduce(const void *sbuff, void *rbuff,
- int count, MPI_Datatype dtype,
- MPI_Op op, MPI_Comm comm)
+int allreduce__rab1(const void *sbuff, void *rbuff,
+ int count, MPI_Datatype dtype,
+ MPI_Op op, MPI_Comm comm)
{
MPI_Status status;
MPI_Aint extent;
unsigned int nprocs = comm->size();
if((nprocs&(nprocs-1)))
- THROWF(arg_error,0, "allreduce rab1 algorithm can't be used with non power of two number of processes ! ");
+ throw std::invalid_argument("allreduce rab1 algorithm can't be used with non power of two number of processes!");
extent = dtype->get_extent();
}
memcpy(tmp_buf, recv + recv_idx * extent, recv_cnt * extent);
- Colls::allgather(tmp_buf, recv_cnt, dtype, recv, recv_cnt, dtype, comm);
+ colls::allgather(tmp_buf, recv_cnt, dtype, recv, recv_cnt, dtype, comm);
memcpy(rbuff, recv, count * extent);
smpi_free_tmp_buffer(recv);
}
memcpy(tmp_buf, (char *) rbuff + recv_idx * extent, recv_cnt * extent);
- Colls::allgather(tmp_buf, recv_cnt, dtype, rbuff, recv_cnt, dtype, comm);
+ colls::allgather(tmp_buf, recv_cnt, dtype, rbuff, recv_cnt, dtype, comm);
smpi_free_tmp_buffer(tmp_buf);
}