/* selector for collective algorithms based on openmpi's default coll_tuned_decision_fixed selector */
-/* Copyright (c) 2009-2010, 2013-2017. The SimGrid Team.
+/* Copyright (c) 2009-2019. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "colls_private.h"
+#include "colls_private.hpp"
namespace simgrid{
namespace smpi{
-int Coll_allreduce_ompi::allreduce(void *sbuf, void *rbuf, int count,
+int Coll_allreduce_ompi::allreduce(const void *sbuf, void *rbuf, int count,
MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
{
size_t dsize, block_dsize;
-int Coll_alltoall_ompi::alltoall( void *sbuf, int scount,
+int Coll_alltoall_ompi::alltoall(const void *sbuf, int scount,
MPI_Datatype sdtype,
void* rbuf, int rcount,
MPI_Datatype rdtype,
comm);
}
-int Coll_alltoallv_ompi::alltoallv(void *sbuf, int *scounts, int *sdisps,
+int Coll_alltoallv_ompi::alltoallv(const void *sbuf, const int *scounts, const int *sdisps,
MPI_Datatype sdtype,
- void *rbuf, int *rcounts, int *rdisps,
+ void *rbuf, const int *rcounts, const int *rdisps,
MPI_Datatype rdtype,
MPI_Comm comm
)
{
/* For starters, just keep the original algorithm. */
- return Coll_alltoallv_ompi_basic_linear::alltoallv(sbuf, scounts, sdisps, sdtype,
+ return Coll_alltoallv_ring::alltoallv(sbuf, scounts, sdisps, sdtype,
rbuf, rcounts, rdisps,rdtype,
comm);
}
#endif /* 0 */
}
-int Coll_reduce_ompi::reduce( void *sendbuf, void *recvbuf,
+int Coll_reduce_ompi::reduce(const void *sendbuf, void *recvbuf,
int count, MPI_Datatype datatype,
MPI_Op op, int root,
MPI_Comm comm
#endif /* 0 */
}
-int Coll_reduce_scatter_ompi::reduce_scatter( void *sbuf, void *rbuf,
- int *rcounts,
+int Coll_reduce_scatter_ompi::reduce_scatter(const void *sbuf, void *rbuf,
+ const int *rcounts,
MPI_Datatype dtype,
MPI_Op op,
MPI_Comm comm
}
-int Coll_allgather_ompi::allgather(void *sbuf, int scount,
+int Coll_allgather_ompi::allgather(const void *sbuf, int scount,
MPI_Datatype sdtype,
void* rbuf, int rcount,
MPI_Datatype rdtype,
#endif /* defined(USE_MPICH2_DECISION) */
}
-int Coll_allgatherv_ompi::allgatherv(void *sbuf, int scount,
+int Coll_allgatherv_ompi::allgatherv(const void *sbuf, int scount,
MPI_Datatype sdtype,
- void* rbuf, int *rcounts,
- int *rdispls,
+ void* rbuf, const int *rcounts,
+ const int *rdispls,
MPI_Datatype rdtype,
MPI_Comm comm
)
/* Decision based on allgather decision. */
if (total_dsize < 50000) {
-/* return Coll_allgatherv_intra_bruck::allgatherv(sbuf, scount, sdtype,
- rbuf, rcounts, rdispls, rdtype,
- comm, module);*/
- return Coll_allgatherv_ring::allgatherv(sbuf, scount, sdtype,
+ return Coll_allgatherv_ompi_bruck::allgatherv(sbuf, scount, sdtype,
rbuf, rcounts, rdispls, rdtype,
comm);
}
}
-int Coll_gather_ompi::gather(void *sbuf, int scount,
+int Coll_gather_ompi::gather(const void *sbuf, int scount,
MPI_Datatype sdtype,
void* rbuf, int rcount,
MPI_Datatype rdtype,
}
-int Coll_scatter_ompi::scatter(void *sbuf, int scount,
+int Coll_scatter_ompi::scatter(const void *sbuf, int scount,
MPI_Datatype sdtype,
void* rbuf, int rcount,
MPI_Datatype rdtype,
rbuf, rcount, rdtype,
root, comm);
if(rank!=root){
- xbt_free(sbuf);
+ xbt_free(const_cast<void*>(sbuf));
}
return ret;
}