Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
(painfully) constify colls.
authorAugustin Degomme <adegomme@gmail.com>
Fri, 26 Apr 2019 14:13:56 +0000 (16:13 +0200)
committerAugustin Degomme <adegomme@gmail.com>
Fri, 26 Apr 2019 14:25:57 +0000 (16:25 +0200)
89 files changed:
include/smpi/smpi.h
src/smpi/bindings/smpi_mpi.cpp
src/smpi/bindings/smpi_pmpi_coll.cpp
src/smpi/colls/allgather/allgather-2dmesh.cpp
src/smpi/colls/allgather/allgather-3dmesh.cpp
src/smpi/colls/allgather/allgather-GB.cpp
src/smpi/colls/allgather/allgather-NTSLR-NB.cpp
src/smpi/colls/allgather/allgather-NTSLR.cpp
src/smpi/colls/allgather/allgather-SMP-NTS.cpp
src/smpi/colls/allgather/allgather-bruck.cpp
src/smpi/colls/allgather/allgather-loosely-lr.cpp
src/smpi/colls/allgather/allgather-mvapich-smp.cpp
src/smpi/colls/allgather/allgather-ompi-neighborexchange.cpp
src/smpi/colls/allgather/allgather-pair.cpp
src/smpi/colls/allgather/allgather-rdb.cpp
src/smpi/colls/allgather/allgather-rhv.cpp
src/smpi/colls/allgather/allgather-ring.cpp
src/smpi/colls/allgather/allgather-smp-simple.cpp
src/smpi/colls/allgather/allgather-spreading-simple.cpp
src/smpi/colls/allgatherv/allgatherv-GB.cpp
src/smpi/colls/allgatherv/allgatherv-mpich-rdb.cpp
src/smpi/colls/allgatherv/allgatherv-mpich-ring.cpp
src/smpi/colls/allgatherv/allgatherv-ompi-bruck.cpp
src/smpi/colls/allgatherv/allgatherv-ompi-neighborexchange.cpp
src/smpi/colls/allgatherv/allgatherv-pair.cpp
src/smpi/colls/allgatherv/allgatherv-ring.cpp
src/smpi/colls/allreduce/allreduce-lr.cpp
src/smpi/colls/allreduce/allreduce-mvapich-rs.cpp
src/smpi/colls/allreduce/allreduce-mvapich-two-level.cpp
src/smpi/colls/allreduce/allreduce-ompi-ring-segmented.cpp
src/smpi/colls/allreduce/allreduce-rab-rdb.cpp
src/smpi/colls/allreduce/allreduce-rab1.cpp
src/smpi/colls/allreduce/allreduce-rab2.cpp
src/smpi/colls/allreduce/allreduce-rdb.cpp
src/smpi/colls/allreduce/allreduce-redbcast.cpp
src/smpi/colls/allreduce/allreduce-smp-binomial-pipeline.cpp
src/smpi/colls/allreduce/allreduce-smp-binomial.cpp
src/smpi/colls/allreduce/allreduce-smp-rdb.cpp
src/smpi/colls/allreduce/allreduce-smp-rsag-lr.cpp
src/smpi/colls/allreduce/allreduce-smp-rsag-rab.cpp
src/smpi/colls/allreduce/allreduce-smp-rsag.cpp
src/smpi/colls/alltoall/alltoall-2dmesh.cpp
src/smpi/colls/alltoall/alltoall-3dmesh.cpp
src/smpi/colls/alltoall/alltoall-basic-linear.cpp
src/smpi/colls/alltoall/alltoall-bruck.cpp
src/smpi/colls/alltoall/alltoall-mvapich-scatter-dest.cpp
src/smpi/colls/alltoall/alltoall-pair-light-barrier.cpp
src/smpi/colls/alltoall/alltoall-pair-mpi-barrier.cpp
src/smpi/colls/alltoall/alltoall-pair-one-barrier.cpp
src/smpi/colls/alltoall/alltoall-pair.cpp
src/smpi/colls/alltoall/alltoall-rdb.cpp
src/smpi/colls/alltoall/alltoall-ring-light-barrier.cpp
src/smpi/colls/alltoall/alltoall-ring-mpi-barrier.cpp
src/smpi/colls/alltoall/alltoall-ring-one-barrier.cpp
src/smpi/colls/alltoall/alltoall-ring.cpp
src/smpi/colls/alltoallv/alltoallv-bruck.cpp
src/smpi/colls/alltoallv/alltoallv-ompi-basic-linear.cpp
src/smpi/colls/alltoallv/alltoallv-pair-light-barrier.cpp
src/smpi/colls/alltoallv/alltoallv-pair-mpi-barrier.cpp
src/smpi/colls/alltoallv/alltoallv-pair-one-barrier.cpp
src/smpi/colls/alltoallv/alltoallv-pair.cpp
src/smpi/colls/alltoallv/alltoallv-ring-light-barrier.cpp
src/smpi/colls/alltoallv/alltoallv-ring-mpi-barrier.cpp
src/smpi/colls/alltoallv/alltoallv-ring-one-barrier.cpp
src/smpi/colls/alltoallv/alltoallv-ring.cpp
src/smpi/colls/gather/gather-mvapich.cpp
src/smpi/colls/gather/gather-ompi.cpp
src/smpi/colls/reduce/reduce-NTSL.cpp
src/smpi/colls/reduce/reduce-arrival-pattern-aware.cpp
src/smpi/colls/reduce/reduce-binomial.cpp
src/smpi/colls/reduce/reduce-flat-tree.cpp
src/smpi/colls/reduce/reduce-mvapich-knomial.cpp
src/smpi/colls/reduce/reduce-mvapich-two-level.cpp
src/smpi/colls/reduce/reduce-ompi.cpp
src/smpi/colls/reduce/reduce-rab.cpp
src/smpi/colls/reduce/reduce-scatter-gather.cpp
src/smpi/colls/reduce_scatter/reduce_scatter-mpich.cpp
src/smpi/colls/reduce_scatter/reduce_scatter-ompi.cpp
src/smpi/colls/scatter/scatter-mvapich-two-level.cpp
src/smpi/colls/scatter/scatter-ompi.cpp
src/smpi/colls/smpi_coll.cpp
src/smpi/colls/smpi_default_selector.cpp
src/smpi/colls/smpi_intel_mpi_selector.cpp
src/smpi/colls/smpi_mpich_selector.cpp
src/smpi/colls/smpi_mvapich2_selector.cpp
src/smpi/colls/smpi_mvapich2_selector_stampede.hpp
src/smpi/colls/smpi_nbc_impl.cpp
src/smpi/colls/smpi_openmpi_selector.cpp
src/smpi/include/smpi_coll.hpp

index 637a9ce..fb6259b 100644 (file)
@@ -570,71 +570,71 @@ MPI_CALL(XBT_PUBLIC int, MPI_Bcast, (void* buf, int count, MPI_Datatype datatype
 MPI_CALL(XBT_PUBLIC int, MPI_Barrier, (MPI_Comm comm));
 MPI_CALL(XBT_PUBLIC int, MPI_Ibarrier, (MPI_Comm comm, MPI_Request *request));
 MPI_CALL(XBT_PUBLIC int, MPI_Ibcast, (void* buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm, MPI_Request *request));
 MPI_CALL(XBT_PUBLIC int, MPI_Barrier, (MPI_Comm comm));
 MPI_CALL(XBT_PUBLIC int, MPI_Ibarrier, (MPI_Comm comm, MPI_Request *request));
 MPI_CALL(XBT_PUBLIC int, MPI_Ibcast, (void* buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm, MPI_Request *request));
-MPI_CALL(XBT_PUBLIC int, MPI_Igather, (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+MPI_CALL(XBT_PUBLIC int, MPI_Igather, (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
                                       MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request));
                                       MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request));
-MPI_CALL(XBT_PUBLIC int, MPI_Igatherv, (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
-                                       int* recvcounts, int* displs, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request));
-MPI_CALL(XBT_PUBLIC int, MPI_Iallgather, (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
+MPI_CALL(XBT_PUBLIC int, MPI_Igatherv, (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
+                                       const int* recvcounts, const int* displs, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request));
+MPI_CALL(XBT_PUBLIC int, MPI_Iallgather, (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
                                          int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request));
                                          int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request));
-MPI_CALL(XBT_PUBLIC int, MPI_Iallgatherv, (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
-                                          int* recvcounts, int* displs, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request));
-MPI_CALL(XBT_PUBLIC int, MPI_Iscatter, (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
+MPI_CALL(XBT_PUBLIC int, MPI_Iallgatherv, (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
+                                          const int* recvcounts, const int* displs, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request));
+MPI_CALL(XBT_PUBLIC int, MPI_Iscatter, (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
                                        int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request));
                                        int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request));
-MPI_CALL(XBT_PUBLIC int, MPI_Iscatterv, (void* sendbuf, int* sendcounts, int* displs, MPI_Datatype sendtype,
+MPI_CALL(XBT_PUBLIC int, MPI_Iscatterv, (const void* sendbuf, const int* sendcounts, const int* displs, MPI_Datatype sendtype,
                                         void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request));
 MPI_CALL(XBT_PUBLIC int, MPI_Ireduce,
                                         void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request));
 MPI_CALL(XBT_PUBLIC int, MPI_Ireduce,
-         (void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm, MPI_Request *request));
+         (const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm, MPI_Request *request));
 MPI_CALL(XBT_PUBLIC int, MPI_Iallreduce,
 MPI_CALL(XBT_PUBLIC int, MPI_Iallreduce,
-         (void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request));
+         (const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request));
 MPI_CALL(XBT_PUBLIC int, MPI_Iscan,
 MPI_CALL(XBT_PUBLIC int, MPI_Iscan,
-         (void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request));
+         (const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request));
 MPI_CALL(XBT_PUBLIC int, MPI_Iexscan,
 MPI_CALL(XBT_PUBLIC int, MPI_Iexscan,
-         (void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request));
+         (const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request));
 MPI_CALL(XBT_PUBLIC int, MPI_Ireduce_scatter,
 MPI_CALL(XBT_PUBLIC int, MPI_Ireduce_scatter,
-         (void* sendbuf, void* recvbuf, int* recvcounts, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request));
+         (const void* sendbuf, void* recvbuf, const int* recvcounts, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request));
 MPI_CALL(XBT_PUBLIC int, MPI_Ireduce_scatter_block,
 MPI_CALL(XBT_PUBLIC int, MPI_Ireduce_scatter_block,
-         (void* sendbuf, void* recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request));
-MPI_CALL(XBT_PUBLIC int, MPI_Ialltoall, (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
+         (const void* sendbuf, void* recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request));
+MPI_CALL(XBT_PUBLIC int, MPI_Ialltoall, (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
                                         int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request));
 MPI_CALL(XBT_PUBLIC int, MPI_Ialltoallv,
                                         int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request));
 MPI_CALL(XBT_PUBLIC int, MPI_Ialltoallv,
-         (void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype sendtype, void* recvbuf, int* recvcounts,
-          int* recvdisps, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request));
+         (const void* sendbuf, const int* sendcounts, const int* senddisps, MPI_Datatype sendtype, void* recvbuf, const int* recvcounts,
+          const int* recvdisps, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request));
 MPI_CALL(XBT_PUBLIC int, MPI_Ialltoallw,
 MPI_CALL(XBT_PUBLIC int, MPI_Ialltoallw,
-         (void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype* sendtypes, void* recvbuf, int* recvcounts,
-          int* recvdisps, MPI_Datatype* recvtypes, MPI_Comm comm, MPI_Request *request));
-MPI_CALL(XBT_PUBLIC int, MPI_Gather, (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+         (const void* sendbuf, const int* sendcounts, const int* senddisps, const MPI_Datatype* sendtypes, void* recvbuf, const int* recvcounts,
+          const int* recvdisps, const MPI_Datatype* recvtypes, MPI_Comm comm, MPI_Request *request));
+MPI_CALL(XBT_PUBLIC int, MPI_Gather, (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
                                       MPI_Datatype recvtype, int root, MPI_Comm comm));
                                       MPI_Datatype recvtype, int root, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC int, MPI_Gatherv, (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
-                                       int* recvcounts, int* displs, MPI_Datatype recvtype, int root, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC int, MPI_Allgather, (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
+MPI_CALL(XBT_PUBLIC int, MPI_Gatherv, (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
+                                       const int* recvcounts, const int* displs, MPI_Datatype recvtype, int root, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Allgather, (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
                                          int recvcount, MPI_Datatype recvtype, MPI_Comm comm));
                                          int recvcount, MPI_Datatype recvtype, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC int, MPI_Allgatherv, (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
-                                          int* recvcounts, int* displs, MPI_Datatype recvtype, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC int, MPI_Scatter, (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
+MPI_CALL(XBT_PUBLIC int, MPI_Allgatherv, (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
+                                          const int* recvcounts, const int* displs, MPI_Datatype recvtype, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Scatter, (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
                                        int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm));
                                        int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC int, MPI_Scatterv, (void* sendbuf, int* sendcounts, int* displs, MPI_Datatype sendtype,
+MPI_CALL(XBT_PUBLIC int, MPI_Scatterv, (const void* sendbuf, const int* sendcounts, const int* displs, MPI_Datatype sendtype,
                                         void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm));
 MPI_CALL(XBT_PUBLIC int, MPI_Reduce,
                                         void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm));
 MPI_CALL(XBT_PUBLIC int, MPI_Reduce,
-         (void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm));
+         (const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm));
 MPI_CALL(XBT_PUBLIC int, MPI_Allreduce,
 MPI_CALL(XBT_PUBLIC int, MPI_Allreduce,
-         (void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
+         (const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
 MPI_CALL(XBT_PUBLIC int, MPI_Scan,
 MPI_CALL(XBT_PUBLIC int, MPI_Scan,
-         (void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
+         (const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
 MPI_CALL(XBT_PUBLIC int, MPI_Exscan,
 MPI_CALL(XBT_PUBLIC int, MPI_Exscan,
-         (void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
+         (const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
 MPI_CALL(XBT_PUBLIC int, MPI_Reduce_scatter,
 MPI_CALL(XBT_PUBLIC int, MPI_Reduce_scatter,
-         (void* sendbuf, void* recvbuf, int* recvcounts, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
+         (const void* sendbuf, void* recvbuf, const int* recvcounts, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
 MPI_CALL(XBT_PUBLIC int, MPI_Reduce_scatter_block,
 MPI_CALL(XBT_PUBLIC int, MPI_Reduce_scatter_block,
-         (void* sendbuf, void* recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC int, MPI_Alltoall, (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
+         (const void* sendbuf, void* recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Alltoall, (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
                                         int recvcount, MPI_Datatype recvtype, MPI_Comm comm));
 MPI_CALL(XBT_PUBLIC int, MPI_Alltoallv,
                                         int recvcount, MPI_Datatype recvtype, MPI_Comm comm));
 MPI_CALL(XBT_PUBLIC int, MPI_Alltoallv,
-         (void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype sendtype, void* recvbuf, int* recvcounts,
-          int* recvdisps, MPI_Datatype recvtype, MPI_Comm comm));
+         (const void* sendbuf, const int* sendcounts, const int* senddisps, MPI_Datatype sendtype, void* recvbuf, const int* recvcounts,
+          const int* recvdisps, MPI_Datatype recvtype, MPI_Comm comm));
 MPI_CALL(XBT_PUBLIC int, MPI_Alltoallw,
 MPI_CALL(XBT_PUBLIC int, MPI_Alltoallw,
-         (void* sendbuf, int* sendcnts, int* sdispls, MPI_Datatype* sendtypes, void* recvbuf, int* recvcnts,
-          int* rdispls, MPI_Datatype* recvtypes, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC int, MPI_Reduce_local, (void* inbuf, void* inoutbuf, int count, MPI_Datatype datatype, MPI_Op op));
+         (const void* sendbuf, const int* sendcnts, const int* sdispls, const MPI_Datatype* sendtypes, void* recvbuf, const int* recvcnts,
+          const int* rdispls, const MPI_Datatype* recvtypes, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Reduce_local, (const void* inbuf, void* inoutbuf, int count, MPI_Datatype datatype, MPI_Op op));
 
 MPI_CALL(XBT_PUBLIC int, MPI_Info_create, (MPI_Info * info));
 MPI_CALL(XBT_PUBLIC int, MPI_Info_set, (MPI_Info info, const char* key, const char* value));
 
 MPI_CALL(XBT_PUBLIC int, MPI_Info_create, (MPI_Info * info));
 MPI_CALL(XBT_PUBLIC int, MPI_Info_set, (MPI_Info info, const char* key, const char* value));
index c054d7d..958060d 100644 (file)
@@ -74,13 +74,13 @@ WRAPPED_PMPI_CALL_NORETURN(double, MPI_Wtime,(void),())
 WRAPPED_PMPI_CALL(int,MPI_Abort,(MPI_Comm comm, int errorcode),(comm, errorcode))
 WRAPPED_PMPI_CALL(int,MPI_Accumulate,(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank,MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win),( origin_addr,origin_count, origin_datatype,target_rank,target_disp, target_count,target_datatype,op, win))
 WRAPPED_PMPI_CALL(int,MPI_Address,(void *location, MPI_Aint * address),(location, address))
 WRAPPED_PMPI_CALL(int,MPI_Abort,(MPI_Comm comm, int errorcode),(comm, errorcode))
 WRAPPED_PMPI_CALL(int,MPI_Accumulate,(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank,MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win),( origin_addr,origin_count, origin_datatype,target_rank,target_disp, target_count,target_datatype,op, win))
 WRAPPED_PMPI_CALL(int,MPI_Address,(void *location, MPI_Aint * address),(location, address))
-WRAPPED_PMPI_CALL(int,MPI_Allgather,(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm),(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm))
-WRAPPED_PMPI_CALL(int,MPI_Allgatherv,(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int *recvcounts, int *displs,MPI_Datatype recvtype, MPI_Comm comm),(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm))
+WRAPPED_PMPI_CALL(int,MPI_Allgather,(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm),(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm))
+WRAPPED_PMPI_CALL(int,MPI_Allgatherv,(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs,MPI_Datatype recvtype, MPI_Comm comm),(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm))
 WRAPPED_PMPI_CALL(int,MPI_Alloc_mem,(MPI_Aint size, MPI_Info info, void *baseptr),(size, info, baseptr))
 WRAPPED_PMPI_CALL(int,MPI_Alloc_mem,(MPI_Aint size, MPI_Info info, void *baseptr),(size, info, baseptr))
-WRAPPED_PMPI_CALL(int,MPI_Allreduce,(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm),(sendbuf, recvbuf, count, datatype, op, comm))
-WRAPPED_PMPI_CALL(int,MPI_Alltoall,(void *sendbuf, int sendcount, MPI_Datatype sendtype,void *recvbuf, int recvcount,MPI_Datatype recvtype, MPI_Comm comm),(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm))
-WRAPPED_PMPI_CALL(int,MPI_Alltoallv,(void *sendbuf, int *sendcounts, int *senddisps, MPI_Datatype sendtype, void *recvbuf, int *recvcounts, int *recvdisps, MPI_Datatype recvtype, MPI_Comm comm),(sendbuf, sendcounts, senddisps, sendtype, recvbuf, recvcounts, recvdisps, recvtype, comm))
-WRAPPED_PMPI_CALL(int,MPI_Alltoallw,( void *sendbuf, int *sendcnts, int *sdispls, MPI_Datatype *sendtypes, void *recvbuf, int *recvcnts, int *rdispls, MPI_Datatype *recvtypes, MPI_Comm comm),( sendbuf, sendcnts, sdispls, sendtypes, recvbuf, recvcnts, rdispls, recvtypes, comm))
+WRAPPED_PMPI_CALL(int,MPI_Allreduce,(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm),(sendbuf, recvbuf, count, datatype, op, comm))
+WRAPPED_PMPI_CALL(int,MPI_Alltoall,(const void *sendbuf, int sendcount, MPI_Datatype sendtype,void *recvbuf, int recvcount,MPI_Datatype recvtype, MPI_Comm comm),(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm))
+WRAPPED_PMPI_CALL(int,MPI_Alltoallv,(const void *sendbuf, const int *sendcounts, const int *senddisps, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *recvdisps, MPI_Datatype recvtype, MPI_Comm comm),(sendbuf, sendcounts, senddisps, sendtype, recvbuf, recvcounts, recvdisps, recvtype, comm))
+WRAPPED_PMPI_CALL(int,MPI_Alltoallw,(const void *sendbuf, const int *sendcnts, const int *sdispls, const MPI_Datatype *sendtypes, void *recvbuf, const int *recvcnts, const int *rdispls, const MPI_Datatype *recvtypes, MPI_Comm comm),( sendbuf, sendcnts, sdispls, sendtypes, recvbuf, recvcnts, rdispls, recvtypes, comm))
 WRAPPED_PMPI_CALL(int,MPI_Attr_delete,(MPI_Comm comm, int keyval) ,(comm, keyval))
 WRAPPED_PMPI_CALL(int,MPI_Attr_get,(MPI_Comm comm, int keyval, void* attr_value, int* flag) ,(comm, keyval, attr_value, flag))
 WRAPPED_PMPI_CALL(int,MPI_Attr_put,(MPI_Comm comm, int keyval, void* attr_value) ,(comm, keyval, attr_value))
 WRAPPED_PMPI_CALL(int,MPI_Attr_delete,(MPI_Comm comm, int keyval) ,(comm, keyval))
 WRAPPED_PMPI_CALL(int,MPI_Attr_get,(MPI_Comm comm, int keyval, void* attr_value, int* flag) ,(comm, keyval, attr_value, flag))
 WRAPPED_PMPI_CALL(int,MPI_Attr_put,(MPI_Comm comm, int keyval, void* attr_value) ,(comm, keyval, attr_value))
@@ -118,12 +118,12 @@ WRAPPED_PMPI_CALL(int,MPI_Compare_and_swap,(const void *origin_addr, void *compa
 WRAPPED_PMPI_CALL(int,MPI_Dims_create,(int nnodes, int ndims, int* dims) ,(nnodes, ndims, dims))
 WRAPPED_PMPI_CALL(int,MPI_Error_class,(int errorcode, int* errorclass) ,(errorcode, errorclass))
 WRAPPED_PMPI_CALL_NORETURN(int,MPI_Error_string,(int errorcode, char* string, int* resultlen) ,(errorcode, string, resultlen))
 WRAPPED_PMPI_CALL(int,MPI_Dims_create,(int nnodes, int ndims, int* dims) ,(nnodes, ndims, dims))
 WRAPPED_PMPI_CALL(int,MPI_Error_class,(int errorcode, int* errorclass) ,(errorcode, errorclass))
 WRAPPED_PMPI_CALL_NORETURN(int,MPI_Error_string,(int errorcode, char* string, int* resultlen) ,(errorcode, string, resultlen))
-WRAPPED_PMPI_CALL(int,MPI_Exscan,(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm),(sendbuf, recvbuf, count, datatype, op, comm))
+WRAPPED_PMPI_CALL(int,MPI_Exscan,(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm),(sendbuf, recvbuf, count, datatype, op, comm))
 WRAPPED_PMPI_CALL(int,MPI_Finalized,(int * flag),(flag))
 WRAPPED_PMPI_CALL(int,MPI_Finalize,(void),())
 WRAPPED_PMPI_CALL(int,MPI_Free_mem,(void *baseptr),(baseptr))
 WRAPPED_PMPI_CALL(int,MPI_Finalized,(int * flag),(flag))
 WRAPPED_PMPI_CALL(int,MPI_Finalize,(void),())
 WRAPPED_PMPI_CALL(int,MPI_Free_mem,(void *baseptr),(baseptr))
-WRAPPED_PMPI_CALL(int,MPI_Gather,(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm),(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm))
-WRAPPED_PMPI_CALL(int,MPI_Gatherv,(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int *recvcounts, int *displs,MPI_Datatype recvtype, int root, MPI_Comm comm),(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm))
+WRAPPED_PMPI_CALL(int,MPI_Gather,(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm),(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm))
+WRAPPED_PMPI_CALL(int,MPI_Gatherv,(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs,MPI_Datatype recvtype, int root, MPI_Comm comm),(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm))
 WRAPPED_PMPI_CALL(int,MPI_Get_address,(void *location, MPI_Aint * address),(location, address))
 WRAPPED_PMPI_CALL(int,MPI_Get_count,(MPI_Status * status, MPI_Datatype datatype, int *count),(status, datatype, count))
 WRAPPED_PMPI_CALL(int,MPI_Get_library_version ,(char *version,int *len),(version,len))
 WRAPPED_PMPI_CALL(int,MPI_Get_address,(void *location, MPI_Aint * address),(location, address))
 WRAPPED_PMPI_CALL(int,MPI_Get_count,(MPI_Status * status, MPI_Datatype datatype, int *count),(status, datatype, count))
 WRAPPED_PMPI_CALL(int,MPI_Get_library_version ,(char *version,int *len),(version,len))
@@ -147,21 +147,21 @@ WRAPPED_PMPI_CALL(int,MPI_Group_union,(MPI_Group group1, MPI_Group group2, MPI_G
 WRAPPED_PMPI_CALL(int,MPI_Ibarrier,(MPI_Comm comm, MPI_Request *request),(comm,request))
 WRAPPED_PMPI_CALL(int,MPI_Ibcast,(void* buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm, MPI_Request *request),(buf, count, datatype, root, comm, request))
 
 WRAPPED_PMPI_CALL(int,MPI_Ibarrier,(MPI_Comm comm, MPI_Request *request),(comm,request))
 WRAPPED_PMPI_CALL(int,MPI_Ibcast,(void* buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm, MPI_Request *request),(buf, count, datatype, root, comm, request))
 
-WRAPPED_PMPI_CALL(int,MPI_Iallgather,(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request),(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request))
-WRAPPED_PMPI_CALL(int,MPI_Iallgatherv,(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int *recvcounts, int *displs,MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request),(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request))
-WRAPPED_PMPI_CALL(int,MPI_Iallreduce,(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request),(sendbuf, recvbuf, count, datatype, op, comm, request))
-WRAPPED_PMPI_CALL(int,MPI_Ialltoall,(void *sendbuf, int sendcount, MPI_Datatype sendtype,void *recvbuf, int recvcount,MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request),(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request))
-WRAPPED_PMPI_CALL(int,MPI_Ialltoallv,(void *sendbuf, int *sendcounts, int *senddisps, MPI_Datatype sendtype, void *recvbuf, int *recvcounts, int *recvdisps, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request),(sendbuf, sendcounts, senddisps, sendtype, recvbuf, recvcounts, recvdisps, recvtype, comm, request))
-WRAPPED_PMPI_CALL(int,MPI_Ialltoallw,( void *sendbuf, int *sendcnts, int *sdispls, MPI_Datatype *sendtypes, void *recvbuf, int *recvcnts, int *rdispls, MPI_Datatype *recvtypes, MPI_Comm comm, MPI_Request *request),( sendbuf, sendcnts, sdispls, sendtypes, recvbuf, recvcnts, rdispls, recvtypes, comm, request))
-WRAPPED_PMPI_CALL(int,MPI_Igather,(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request),(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request))
-WRAPPED_PMPI_CALL(int,MPI_Igatherv,(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int *recvcounts, int *displs,MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request),(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, request))
-WRAPPED_PMPI_CALL(int,MPI_Ireduce_scatter_block,(void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op,MPI_Comm comm, MPI_Request *request),(sendbuf, recvbuf, recvcount, datatype, op, comm, request))
-WRAPPED_PMPI_CALL(int,MPI_Ireduce_scatter,(void *sendbuf, void *recvbuf, int *recvcounts, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request),(sendbuf, recvbuf, recvcounts, datatype, op, comm, request))
-WRAPPED_PMPI_CALL(int,MPI_Ireduce,(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm, MPI_Request *request),(sendbuf, recvbuf, count, datatype, op, root, comm, request))
-WRAPPED_PMPI_CALL(int,MPI_Iexscan,(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request),(sendbuf, recvbuf, count, datatype, op, comm, request))
-WRAPPED_PMPI_CALL(int,MPI_Iscan,(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request),(sendbuf, recvbuf, count, datatype, op, comm, request))
-WRAPPED_PMPI_CALL(int,MPI_Iscatter,(void *sendbuf, int sendcount, MPI_Datatype sendtype,void *recvbuf, int recvcount, MPI_Datatype recvtype,int root, MPI_Comm comm, MPI_Request *request),(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request))
-WRAPPED_PMPI_CALL(int,MPI_Iscatterv,(void *sendbuf, int *sendcounts, int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount,MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request),(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, request))
+WRAPPED_PMPI_CALL(int,MPI_Iallgather,(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request),(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request))
+WRAPPED_PMPI_CALL(int,MPI_Iallgatherv,(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs,MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request),(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request))
+WRAPPED_PMPI_CALL(int,MPI_Iallreduce,(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request),(sendbuf, recvbuf, count, datatype, op, comm, request))
+WRAPPED_PMPI_CALL(int,MPI_Ialltoall,(const void *sendbuf, int sendcount, MPI_Datatype sendtype,void *recvbuf, int recvcount,MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request),(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request))
+WRAPPED_PMPI_CALL(int,MPI_Ialltoallv,(const void *sendbuf, const int *sendcounts, const int *senddisps, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *recvdisps, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request),(sendbuf, sendcounts, senddisps, sendtype, recvbuf, recvcounts, recvdisps, recvtype, comm, request))
+WRAPPED_PMPI_CALL(int,MPI_Ialltoallw,(const void *sendbuf, const int *sendcnts, const int *sdispls, const MPI_Datatype *sendtypes, void *recvbuf, const int *recvcnts, const int *rdispls, const MPI_Datatype *recvtypes, MPI_Comm comm, MPI_Request *request),( sendbuf, sendcnts, sdispls, sendtypes, recvbuf, recvcnts, rdispls, recvtypes, comm, request))
+WRAPPED_PMPI_CALL(int,MPI_Igather,(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request),(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request))
+WRAPPED_PMPI_CALL(int,MPI_Igatherv,(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs,MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request),(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, request))
+WRAPPED_PMPI_CALL(int,MPI_Ireduce_scatter_block,(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op,MPI_Comm comm, MPI_Request *request),(sendbuf, recvbuf, recvcount, datatype, op, comm, request))
+WRAPPED_PMPI_CALL(int,MPI_Ireduce_scatter,(const void *sendbuf, void *recvbuf, const int *recvcounts, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request),(sendbuf, recvbuf, recvcounts, datatype, op, comm, request))
+WRAPPED_PMPI_CALL(int,MPI_Ireduce,(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm, MPI_Request *request),(sendbuf, recvbuf, count, datatype, op, root, comm, request))
+WRAPPED_PMPI_CALL(int,MPI_Iexscan,(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request),(sendbuf, recvbuf, count, datatype, op, comm, request))
+WRAPPED_PMPI_CALL(int,MPI_Iscan,(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request),(sendbuf, recvbuf, count, datatype, op, comm, request))
+WRAPPED_PMPI_CALL(int,MPI_Iscatter,(const void *sendbuf, int sendcount, MPI_Datatype sendtype,void *recvbuf, int recvcount, MPI_Datatype recvtype,int root, MPI_Comm comm, MPI_Request *request),(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request))
+WRAPPED_PMPI_CALL(int,MPI_Iscatterv,(const void *sendbuf, const int *sendcounts, const int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount,MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request),(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, request))
 
 WRAPPED_PMPI_CALL(int,MPI_Info_create,( MPI_Info *info),( info))
 WRAPPED_PMPI_CALL(int,MPI_Info_delete,(MPI_Info info, const char *key),(info, key))
 
 WRAPPED_PMPI_CALL(int,MPI_Info_create,( MPI_Info *info),( info))
 WRAPPED_PMPI_CALL(int,MPI_Info_delete,(MPI_Info info, const char *key),(info, key))
@@ -193,17 +193,17 @@ WRAPPED_PMPI_CALL(int,MPI_Query_thread,(int *provided),(provided))
 WRAPPED_PMPI_CALL(int,MPI_Raccumulate,(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank,MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request* request),( origin_addr,origin_count, origin_datatype,target_rank,target_disp, target_count,target_datatype,op, win, request))
 WRAPPED_PMPI_CALL(int,MPI_Recv_init,(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Request * request),(buf, count, datatype, src, tag, comm, request))
 WRAPPED_PMPI_CALL(int,MPI_Recv,(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Status * status),(buf, count, datatype, src, tag, comm, status))
 WRAPPED_PMPI_CALL(int,MPI_Raccumulate,(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank,MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request* request),( origin_addr,origin_count, origin_datatype,target_rank,target_disp, target_count,target_datatype,op, win, request))
 WRAPPED_PMPI_CALL(int,MPI_Recv_init,(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Request * request),(buf, count, datatype, src, tag, comm, request))
 WRAPPED_PMPI_CALL(int,MPI_Recv,(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Status * status),(buf, count, datatype, src, tag, comm, status))
-WRAPPED_PMPI_CALL(int,MPI_Reduce_local,(void *inbuf, void *inoutbuf, int count, MPI_Datatype datatype, MPI_Op op),(inbuf, inoutbuf, count, datatype, op))
-WRAPPED_PMPI_CALL(int,MPI_Reduce_scatter_block,(void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op,MPI_Comm comm),(sendbuf, recvbuf, recvcount, datatype, op, comm))
-WRAPPED_PMPI_CALL(int,MPI_Reduce_scatter,(void *sendbuf, void *recvbuf, int *recvcounts, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm),(sendbuf, recvbuf, recvcounts, datatype, op, comm))
-WRAPPED_PMPI_CALL(int,MPI_Reduce,(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm),(sendbuf, recvbuf, count, datatype, op, root, comm))
+WRAPPED_PMPI_CALL(int,MPI_Reduce_local,(const void *inbuf, void *inoutbuf, int count, MPI_Datatype datatype, MPI_Op op),(inbuf, inoutbuf, count, datatype, op))
+WRAPPED_PMPI_CALL(int,MPI_Reduce_scatter_block,(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op,MPI_Comm comm),(sendbuf, recvbuf, recvcount, datatype, op, comm))
+WRAPPED_PMPI_CALL(int,MPI_Reduce_scatter,(const void *sendbuf, void *recvbuf, const int *recvcounts, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm),(sendbuf, recvbuf, recvcounts, datatype, op, comm))
+WRAPPED_PMPI_CALL(int,MPI_Reduce,(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm),(sendbuf, recvbuf, count, datatype, op, root, comm))
 WRAPPED_PMPI_CALL(int,MPI_Request_free,(MPI_Request * request),(request))
 WRAPPED_PMPI_CALL(int,MPI_Rget,(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank,MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win, MPI_Request* request),(origin_addr,origin_count, origin_datatype,target_rank, target_disp, target_count,target_datatype,win, request))
 WRAPPED_PMPI_CALL(int,MPI_Rget_accumulate, (const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request* request),(origin_addr, origin_count, origin_datatype, result_addr, result_count, result_datatype, target_rank, target_disp, target_count, target_datatype, op, win, request))
 WRAPPED_PMPI_CALL(int,MPI_Rput,(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win, MPI_Request* request),(origin_addr,origin_count, origin_datatype,target_rank,target_disp, target_count,target_datatype, win, request))
 WRAPPED_PMPI_CALL(int,MPI_Request_free,(MPI_Request * request),(request))
 WRAPPED_PMPI_CALL(int,MPI_Rget,(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank,MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win, MPI_Request* request),(origin_addr,origin_count, origin_datatype,target_rank, target_disp, target_count,target_datatype,win, request))
 WRAPPED_PMPI_CALL(int,MPI_Rget_accumulate, (const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request* request),(origin_addr, origin_count, origin_datatype, result_addr, result_count, result_datatype, target_rank, target_disp, target_count, target_datatype, op, win, request))
 WRAPPED_PMPI_CALL(int,MPI_Rput,(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win, MPI_Request* request),(origin_addr,origin_count, origin_datatype,target_rank,target_disp, target_count,target_datatype, win, request))
-WRAPPED_PMPI_CALL(int,MPI_Scan,(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm),(sendbuf, recvbuf, count, datatype, op, comm))
-WRAPPED_PMPI_CALL(int,MPI_Scatter,(void *sendbuf, int sendcount, MPI_Datatype sendtype,void *recvbuf, int recvcount, MPI_Datatype recvtype,int root, MPI_Comm comm),(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm))
-WRAPPED_PMPI_CALL(int,MPI_Scatterv,(void *sendbuf, int *sendcounts, int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount,MPI_Datatype recvtype, int root, MPI_Comm comm),(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm))
+WRAPPED_PMPI_CALL(int,MPI_Scan,(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm),(sendbuf, recvbuf, count, datatype, op, comm))
+WRAPPED_PMPI_CALL(int,MPI_Scatter,(const void *sendbuf, int sendcount, MPI_Datatype sendtype,void *recvbuf, int recvcount, MPI_Datatype recvtype,int root, MPI_Comm comm),(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm))
+WRAPPED_PMPI_CALL(int,MPI_Scatterv,(const void *sendbuf, const int *sendcounts, const int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount,MPI_Datatype recvtype, int root, MPI_Comm comm),(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm))
 WRAPPED_PMPI_CALL(int,MPI_Send_init,(const void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm, MPI_Request * request),(buf, count, datatype, dst, tag, comm, request))
 WRAPPED_PMPI_CALL(int,MPI_Sendrecv_replace,(void *buf, int count, MPI_Datatype datatype, int dst, int sendtag, int src, int recvtag,MPI_Comm comm, MPI_Status * status),(buf, count, datatype, dst, sendtag, src, recvtag, comm, status))
 WRAPPED_PMPI_CALL(int,MPI_Sendrecv,(const void *sendbuf, int sendcount, MPI_Datatype sendtype,int dst, int sendtag, void *recvbuf, int recvcount,MPI_Datatype recvtype, int src, int recvtag, MPI_Comm comm, MPI_Status * status),(sendbuf, sendcount, sendtype, dst, sendtag, recvbuf, recvcount, recvtype, src, recvtag,comm, status))
 WRAPPED_PMPI_CALL(int,MPI_Send_init,(const void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm, MPI_Request * request),(buf, count, datatype, dst, tag, comm, request))
 WRAPPED_PMPI_CALL(int,MPI_Sendrecv_replace,(void *buf, int count, MPI_Datatype datatype, int dst, int sendtag, int src, int recvtag,MPI_Comm comm, MPI_Status * status),(buf, count, datatype, dst, sendtag, src, recvtag, comm, status))
 WRAPPED_PMPI_CALL(int,MPI_Sendrecv,(const void *sendbuf, int sendcount, MPI_Datatype sendtype,int dst, int sendtag, void *recvbuf, int recvcount,MPI_Datatype recvtype, int src, int recvtag, MPI_Comm comm, MPI_Status * status),(sendbuf, sendcount, sendtype, dst, sendtag, recvbuf, recvcount, recvtype, src, recvtag,comm, status))
index bd7205b..7ae768c 100644 (file)
@@ -85,12 +85,12 @@ int PMPI_Ibcast(void *buf, int count, MPI_Datatype datatype,
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-int PMPI_Gather(void *sendbuf, int sendcount, MPI_Datatype sendtype,void *recvbuf, int recvcount, MPI_Datatype recvtype,
+int PMPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,void *recvbuf, int recvcount, MPI_Datatype recvtype,
                 int root, MPI_Comm comm){
   return PMPI_Igather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, MPI_REQUEST_IGNORED);
 }
 
                 int root, MPI_Comm comm){
   return PMPI_Igather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, MPI_REQUEST_IGNORED);
 }
 
-int PMPI_Igather(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+int PMPI_Igather(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
                  MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request* request)
 {
   if (comm == MPI_COMM_NULL)
                  MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request* request)
 {
   if (comm == MPI_COMM_NULL)
@@ -108,7 +108,7 @@ int PMPI_Igather(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recv
     return MPI_ERR_ARG;
 
   smpi_bench_end();
     return MPI_ERR_ARG;
 
   smpi_bench_end();
-  char* sendtmpbuf         = static_cast<char*>(sendbuf);
+  const char* sendtmpbuf   = static_cast<const char*>(sendbuf);
   int sendtmpcount         = sendcount;
   MPI_Datatype sendtmptype = sendtype;
   if ((comm->rank() == root) && (sendbuf == MPI_IN_PLACE)) {
   int sendtmpcount         = sendcount;
   MPI_Datatype sendtmptype = sendtype;
   if ((comm->rank() == root) && (sendbuf == MPI_IN_PLACE)) {
@@ -134,12 +134,12 @@ int PMPI_Igather(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recv
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-int PMPI_Gatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int *recvcounts, int *displs,
+int PMPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs,
                 MPI_Datatype recvtype, int root, MPI_Comm comm){
   return PMPI_Igatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, MPI_REQUEST_IGNORED);
 }
 
                 MPI_Datatype recvtype, int root, MPI_Comm comm){
   return PMPI_Igatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, MPI_REQUEST_IGNORED);
 }
 
-int PMPI_Igatherv(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int* recvcounts, int* displs,
+int PMPI_Igatherv(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, const int* recvcounts, const int* displs,
                   MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request* request)
 {
   if (comm == MPI_COMM_NULL)
                   MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request* request)
 {
   if (comm == MPI_COMM_NULL)
@@ -164,7 +164,7 @@ int PMPI_Igatherv(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* rec
   }
 
   smpi_bench_end();
   }
 
   smpi_bench_end();
-  char* sendtmpbuf         = static_cast<char*>(sendbuf);
+  const char* sendtmpbuf   = static_cast<const char*>(sendbuf);
   int sendtmpcount         = sendcount;
   MPI_Datatype sendtmptype = sendtype;
   if ((comm->rank() == root) && (sendbuf == MPI_IN_PLACE)) {
   int sendtmpcount         = sendcount;
   MPI_Datatype sendtmptype = sendtype;
   if ((comm->rank() == root) && (sendbuf == MPI_IN_PLACE)) {
@@ -199,12 +199,12 @@ int PMPI_Igatherv(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* rec
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-int PMPI_Allgather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
+int PMPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                    void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm){
   return PMPI_Iallgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, MPI_REQUEST_IGNORED);
 }
 
                    void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm){
   return PMPI_Iallgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, MPI_REQUEST_IGNORED);
 }
 
-int PMPI_Iallgather(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+int PMPI_Iallgather(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
                     MPI_Datatype recvtype, MPI_Comm comm, MPI_Request* request)
 {
   if (comm == MPI_COMM_NULL)
                     MPI_Datatype recvtype, MPI_Comm comm, MPI_Request* request)
 {
   if (comm == MPI_COMM_NULL)
@@ -242,12 +242,12 @@ int PMPI_Iallgather(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* r
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-int PMPI_Allgatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
-                   void *recvbuf, int *recvcounts, int *displs, MPI_Datatype recvtype, MPI_Comm comm){
+int PMPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
+                   void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPI_Comm comm){
   return PMPI_Iallgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, MPI_REQUEST_IGNORED);
 }
 
   return PMPI_Iallgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, MPI_REQUEST_IGNORED);
 }
 
-int PMPI_Iallgatherv(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int* recvcounts, int* displs,
+int PMPI_Iallgatherv(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, const int* recvcounts, const int* displs,
                      MPI_Datatype recvtype, MPI_Comm comm, MPI_Request* request)
 {
   if (comm == MPI_COMM_NULL)
                      MPI_Datatype recvtype, MPI_Comm comm, MPI_Request* request)
 {
   if (comm == MPI_COMM_NULL)
@@ -299,12 +299,12 @@ int PMPI_Iallgatherv(void* sendbuf, int sendcount, MPI_Datatype sendtype, void*
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-int PMPI_Scatter(void *sendbuf, int sendcount, MPI_Datatype sendtype,
+int PMPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                 void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm){
   return PMPI_Iscatter(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, MPI_REQUEST_IGNORED);
 }
 
                 void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm){
   return PMPI_Iscatter(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, MPI_REQUEST_IGNORED);
 }
 
-int PMPI_Iscatter(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+int PMPI_Iscatter(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
                   MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request* request)
 {
   if (comm == MPI_COMM_NULL)
                   MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request* request)
 {
   if (comm == MPI_COMM_NULL)
@@ -345,12 +345,12 @@ int PMPI_Iscatter(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* rec
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-int PMPI_Scatterv(void *sendbuf, int *sendcounts, int *displs,
+int PMPI_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
                  MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm){
   return PMPI_Iscatterv(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, MPI_REQUEST_IGNORED);
 }
 
                  MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm){
   return PMPI_Iscatterv(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, MPI_REQUEST_IGNORED);
 }
 
-int PMPI_Iscatterv(void* sendbuf, int* sendcounts, int* displs, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+int PMPI_Iscatterv(const void* sendbuf, const int* sendcounts, const int* displs, MPI_Datatype sendtype, void* recvbuf, int recvcount,
                    MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request* request)
 {
   if (comm == MPI_COMM_NULL)
                    MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request* request)
 {
   if (comm == MPI_COMM_NULL)
@@ -407,12 +407,12 @@ int PMPI_Iscatterv(void* sendbuf, int* sendcounts, int* displs, MPI_Datatype sen
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-int PMPI_Reduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm)
+int PMPI_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm)
 {
   return PMPI_Ireduce(sendbuf, recvbuf, count, datatype, op, root, comm, MPI_REQUEST_IGNORED);
 }
 
 {
   return PMPI_Ireduce(sendbuf, recvbuf, count, datatype, op, root, comm, MPI_REQUEST_IGNORED);
 }
 
-int PMPI_Ireduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm, MPI_Request* request)
+int PMPI_Ireduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm, MPI_Request* request)
 {
   if (comm == MPI_COMM_NULL)
     return MPI_ERR_COMM;
 {
   if (comm == MPI_COMM_NULL)
     return MPI_ERR_COMM;
@@ -446,7 +446,7 @@ int PMPI_Ireduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-int PMPI_Reduce_local(void* inbuf, void* inoutbuf, int count, MPI_Datatype datatype, MPI_Op op)
+int PMPI_Reduce_local(const void* inbuf, void* inoutbuf, int count, MPI_Datatype datatype, MPI_Op op)
 {
   if (datatype == MPI_DATATYPE_NULL || not datatype->is_valid())
     return MPI_ERR_TYPE;
 {
   if (datatype == MPI_DATATYPE_NULL || not datatype->is_valid())
     return MPI_ERR_TYPE;
@@ -461,12 +461,12 @@ int PMPI_Reduce_local(void* inbuf, void* inoutbuf, int count, MPI_Datatype datat
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-int PMPI_Allreduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
+int PMPI_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 {
   return PMPI_Iallreduce(sendbuf, recvbuf, count, datatype, op, comm, MPI_REQUEST_IGNORED);
 }
 
 {
   return PMPI_Iallreduce(sendbuf, recvbuf, count, datatype, op, comm, MPI_REQUEST_IGNORED);
 }
 
-int PMPI_Iallreduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request)
+int PMPI_Iallreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request)
 {
   if (comm == MPI_COMM_NULL)
     return MPI_ERR_COMM;
 {
   if (comm == MPI_COMM_NULL)
     return MPI_ERR_COMM;
@@ -482,10 +482,10 @@ int PMPI_Iallreduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype dataty
     return MPI_ERR_ARG;
 
   smpi_bench_end();
     return MPI_ERR_ARG;
 
   smpi_bench_end();
-  char* sendtmpbuf = static_cast<char*>(sendbuf);
+  const char* sendtmpbuf = static_cast<const char*>(sendbuf);
   if (sendbuf == MPI_IN_PLACE) {
     sendtmpbuf = static_cast<char*>(xbt_malloc(count * datatype->get_extent()));
   if (sendbuf == MPI_IN_PLACE) {
     sendtmpbuf = static_cast<char*>(xbt_malloc(count * datatype->get_extent()));
-    simgrid::smpi::Datatype::copy(recvbuf, count, datatype, sendtmpbuf, count, datatype);
+    simgrid::smpi::Datatype::copy(recvbuf, count, datatype, const_cast<char*>(sendtmpbuf), count, datatype);
   }
   int rank = simgrid::s4u::this_actor::get_pid();
 
   }
   int rank = simgrid::s4u::this_actor::get_pid();
 
@@ -500,19 +500,19 @@ int PMPI_Iallreduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype dataty
     simgrid::smpi::Colls::iallreduce(sendtmpbuf, recvbuf, count, datatype, op, comm, request);
 
   if (sendbuf == MPI_IN_PLACE)
     simgrid::smpi::Colls::iallreduce(sendtmpbuf, recvbuf, count, datatype, op, comm, request);
 
   if (sendbuf == MPI_IN_PLACE)
-    xbt_free(sendtmpbuf);
+    xbt_free(const_cast<char*>(sendtmpbuf));
 
   TRACE_smpi_comm_out(rank);
   smpi_bench_begin();
   return MPI_SUCCESS;
 }
 
 
   TRACE_smpi_comm_out(rank);
   smpi_bench_begin();
   return MPI_SUCCESS;
 }
 
-int PMPI_Scan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
+int PMPI_Scan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 {
   return PMPI_Iscan(sendbuf, recvbuf, count, datatype, op, comm, MPI_REQUEST_IGNORED);
 }
 
 {
   return PMPI_Iscan(sendbuf, recvbuf, count, datatype, op, comm, MPI_REQUEST_IGNORED);
 }
 
-int PMPI_Iscan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request* request)
+int PMPI_Iscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request* request)
 {
   if (comm == MPI_COMM_NULL)
     return MPI_ERR_COMM;
 {
   if (comm == MPI_COMM_NULL)
     return MPI_ERR_COMM;
@@ -529,10 +529,10 @@ int PMPI_Iscan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, M
 
   smpi_bench_end();
   int rank         = simgrid::s4u::this_actor::get_pid();
 
   smpi_bench_end();
   int rank         = simgrid::s4u::this_actor::get_pid();
-  void* sendtmpbuf = sendbuf;
+  const void* sendtmpbuf = sendbuf;
   if (sendbuf == MPI_IN_PLACE) {
   if (sendbuf == MPI_IN_PLACE) {
-    sendtmpbuf = static_cast<void*>(xbt_malloc(count * datatype->size()));
-    memcpy(sendtmpbuf, recvbuf, count * datatype->size());
+    sendtmpbuf = static_cast<const void*>(xbt_malloc(count * datatype->size()));
+    memcpy(const_cast<void*>(sendtmpbuf), recvbuf, count * datatype->size());
   }
   TRACE_smpi_comm_in(rank, request == MPI_REQUEST_IGNORED ? "PMPI_Scan" : "PMPI_Iscan",
                      new simgrid::instr::Pt2PtTIData(request == MPI_REQUEST_IGNORED ? "scan" : "iscan", -1,
   }
   TRACE_smpi_comm_in(rank, request == MPI_REQUEST_IGNORED ? "PMPI_Scan" : "PMPI_Iscan",
                      new simgrid::instr::Pt2PtTIData(request == MPI_REQUEST_IGNORED ? "scan" : "iscan", -1,
@@ -547,17 +547,17 @@ int PMPI_Iscan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, M
 
   TRACE_smpi_comm_out(rank);
   if (sendbuf == MPI_IN_PLACE)
 
   TRACE_smpi_comm_out(rank);
   if (sendbuf == MPI_IN_PLACE)
-    xbt_free(sendtmpbuf);
+    xbt_free(const_cast<void*>(sendtmpbuf));
   smpi_bench_begin();
   return retval;
 }
 
   smpi_bench_begin();
   return retval;
 }
 
-int PMPI_Exscan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
+int PMPI_Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 {
   return PMPI_Iexscan(sendbuf, recvbuf, count, datatype, op, comm, MPI_REQUEST_IGNORED);
 }
 
 {
   return PMPI_Iexscan(sendbuf, recvbuf, count, datatype, op, comm, MPI_REQUEST_IGNORED);
 }
 
-int PMPI_Iexscan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request* request){
+int PMPI_Iexscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request* request){
   if (comm == MPI_COMM_NULL)
     return MPI_ERR_COMM;
   if (not datatype->is_valid())
   if (comm == MPI_COMM_NULL)
     return MPI_ERR_COMM;
   if (not datatype->is_valid())
@@ -573,10 +573,10 @@ int PMPI_Iexscan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
 
   smpi_bench_end();
   int rank         = simgrid::s4u::this_actor::get_pid();
 
   smpi_bench_end();
   int rank         = simgrid::s4u::this_actor::get_pid();
-  void* sendtmpbuf = sendbuf;
+  const void* sendtmpbuf = sendbuf;
   if (sendbuf == MPI_IN_PLACE) {
   if (sendbuf == MPI_IN_PLACE) {
-    sendtmpbuf = static_cast<void*>(xbt_malloc(count * datatype->size()));
-    memcpy(sendtmpbuf, recvbuf, count * datatype->size());
+    sendtmpbuf = static_cast<const void*>(xbt_malloc(count * datatype->size()));
+    memcpy(const_cast<void*>(sendtmpbuf), recvbuf, count * datatype->size());
   }
 
   TRACE_smpi_comm_in(rank, request == MPI_REQUEST_IGNORED ? "PMPI_Exscan" : "PMPI_Iexscan",
   }
 
   TRACE_smpi_comm_in(rank, request == MPI_REQUEST_IGNORED ? "PMPI_Exscan" : "PMPI_Iexscan",
@@ -592,17 +592,17 @@ int PMPI_Iexscan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
 
   TRACE_smpi_comm_out(rank);
   if (sendbuf == MPI_IN_PLACE)
 
   TRACE_smpi_comm_out(rank);
   if (sendbuf == MPI_IN_PLACE)
-    xbt_free(sendtmpbuf);
+    xbt_free(const_cast<void*>(sendtmpbuf));
   smpi_bench_begin();
   return retval;
 }
 
   smpi_bench_begin();
   return retval;
 }
 
-int PMPI_Reduce_scatter(void *sendbuf, void *recvbuf, int *recvcounts, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
+int PMPI_Reduce_scatter(const void *sendbuf, void *recvbuf, const int *recvcounts, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 {
   return PMPI_Ireduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm, MPI_REQUEST_IGNORED);
 }
 
 {
   return PMPI_Ireduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm, MPI_REQUEST_IGNORED);
 }
 
-int PMPI_Ireduce_scatter(void *sendbuf, void *recvbuf, int *recvcounts, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request)
+int PMPI_Ireduce_scatter(const void *sendbuf, void *recvbuf, const int *recvcounts, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request)
 {
   if (comm == MPI_COMM_NULL)
     return MPI_ERR_COMM;
 {
   if (comm == MPI_COMM_NULL)
     return MPI_ERR_COMM;
@@ -633,10 +633,10 @@ int PMPI_Ireduce_scatter(void *sendbuf, void *recvbuf, int *recvcounts, MPI_Data
     totalcount += recvcounts[i];
   }
 
     totalcount += recvcounts[i];
   }
 
-  void* sendtmpbuf = sendbuf;
+  const void* sendtmpbuf = sendbuf;
   if (sendbuf == MPI_IN_PLACE) {
   if (sendbuf == MPI_IN_PLACE) {
-    sendtmpbuf = static_cast<void*>(xbt_malloc(totalcount * datatype->size()));
-    memcpy(sendtmpbuf, recvbuf, totalcount * datatype->size());
+    sendtmpbuf = static_cast<const void*>(xbt_malloc(totalcount * datatype->size()));
+    memcpy(const_cast<void*>(sendtmpbuf), recvbuf, totalcount * datatype->size());
   }
 
   TRACE_smpi_comm_in(rank, request == MPI_REQUEST_IGNORED ? "PMPI_Reduce_scatter" : "PMPI_Ireduce_scatter",
   }
 
   TRACE_smpi_comm_in(rank, request == MPI_REQUEST_IGNORED ? "PMPI_Reduce_scatter" : "PMPI_Ireduce_scatter",
@@ -651,18 +651,18 @@ int PMPI_Ireduce_scatter(void *sendbuf, void *recvbuf, int *recvcounts, MPI_Data
 
   TRACE_smpi_comm_out(rank);
   if (sendbuf == MPI_IN_PLACE)
 
   TRACE_smpi_comm_out(rank);
   if (sendbuf == MPI_IN_PLACE)
-    xbt_free(sendtmpbuf);
+    xbt_free(const_cast<void*>(sendtmpbuf));
   smpi_bench_begin();
   return MPI_SUCCESS;
 }
 
   smpi_bench_begin();
   return MPI_SUCCESS;
 }
 
-int PMPI_Reduce_scatter_block(void *sendbuf, void *recvbuf, int recvcount,
+int PMPI_Reduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount,
                               MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 {
   return PMPI_Ireduce_scatter_block(sendbuf, recvbuf, recvcount, datatype, op, comm, MPI_REQUEST_IGNORED);
 }
 
                               MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 {
   return PMPI_Ireduce_scatter_block(sendbuf, recvbuf, recvcount, datatype, op, comm, MPI_REQUEST_IGNORED);
 }
 
-int PMPI_Ireduce_scatter_block(void* sendbuf, void* recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op,
+int PMPI_Ireduce_scatter_block(const void* sendbuf, void* recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op,
                                MPI_Comm comm, MPI_Request* request)
 {
   if (comm == MPI_COMM_NULL)
                                MPI_Comm comm, MPI_Request* request)
 {
   if (comm == MPI_COMM_NULL)
@@ -683,10 +683,10 @@ int PMPI_Ireduce_scatter_block(void* sendbuf, void* recvbuf, int recvcount, MPI_
   int dt_send_size                   = datatype->is_replayable() ? 1 : datatype->size();
   std::vector<int>* trace_recvcounts = new std::vector<int>(recvcount * dt_send_size); // copy data to avoid bad free
 
   int dt_send_size                   = datatype->is_replayable() ? 1 : datatype->size();
   std::vector<int>* trace_recvcounts = new std::vector<int>(recvcount * dt_send_size); // copy data to avoid bad free
 
-  void* sendtmpbuf = sendbuf;
+  const void* sendtmpbuf = sendbuf;
   if (sendbuf == MPI_IN_PLACE) {
   if (sendbuf == MPI_IN_PLACE) {
-    sendtmpbuf = static_cast<void*>(xbt_malloc(recvcount * count * datatype->size()));
-    memcpy(sendtmpbuf, recvbuf, recvcount * count * datatype->size());
+    sendtmpbuf = static_cast<const void*>(xbt_malloc(recvcount * count * datatype->size()));
+    memcpy(const_cast<void*>(sendtmpbuf), recvbuf, recvcount * count * datatype->size());
   }
 
   TRACE_smpi_comm_in(
   }
 
   TRACE_smpi_comm_in(
@@ -705,17 +705,17 @@ int PMPI_Ireduce_scatter_block(void* sendbuf, void* recvbuf, int recvcount, MPI_
 
   TRACE_smpi_comm_out(rank);
   if (sendbuf == MPI_IN_PLACE)
 
   TRACE_smpi_comm_out(rank);
   if (sendbuf == MPI_IN_PLACE)
-    xbt_free(sendtmpbuf);
+    xbt_free(const_cast<void*>(sendtmpbuf));
   smpi_bench_begin();
   return MPI_SUCCESS;
 }
 
   smpi_bench_begin();
   return MPI_SUCCESS;
 }
 
-int PMPI_Alltoall(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+int PMPI_Alltoall(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
                   MPI_Datatype recvtype, MPI_Comm comm){
   return PMPI_Ialltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, MPI_REQUEST_IGNORED);
 }
 
                   MPI_Datatype recvtype, MPI_Comm comm){
   return PMPI_Ialltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, MPI_REQUEST_IGNORED);
 }
 
-int PMPI_Ialltoall(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+int PMPI_Ialltoall(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
                    MPI_Datatype recvtype, MPI_Comm comm, MPI_Request* request)
 {
   if (comm == MPI_COMM_NULL)
                    MPI_Datatype recvtype, MPI_Comm comm, MPI_Request* request)
 {
   if (comm == MPI_COMM_NULL)
@@ -731,14 +731,14 @@ int PMPI_Ialltoall(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* re
 
   smpi_bench_end();
   int rank                 = simgrid::s4u::this_actor::get_pid();
 
   smpi_bench_end();
   int rank                 = simgrid::s4u::this_actor::get_pid();
-  void* sendtmpbuf         = static_cast<char*>(sendbuf);
+  const void* sendtmpbuf         = static_cast<const char*>(sendbuf);
   int sendtmpcount         = sendcount;
   MPI_Datatype sendtmptype = sendtype;
   if (sendbuf == MPI_IN_PLACE) {
     sendtmpbuf = static_cast<void*>(xbt_malloc(recvcount * comm->size() * recvtype->size()));
     // memcpy(??,nullptr,0) is actually undefined behavor, even if harmless.
     if (recvbuf != nullptr)
   int sendtmpcount         = sendcount;
   MPI_Datatype sendtmptype = sendtype;
   if (sendbuf == MPI_IN_PLACE) {
     sendtmpbuf = static_cast<void*>(xbt_malloc(recvcount * comm->size() * recvtype->size()));
     // memcpy(??,nullptr,0) is actually undefined behavor, even if harmless.
     if (recvbuf != nullptr)
-      memcpy(sendtmpbuf, recvbuf, recvcount * comm->size() * recvtype->size());
+      memcpy(const_cast<void*>(sendtmpbuf), recvbuf, recvcount * comm->size() * recvtype->size());
     sendtmpcount = recvcount;
     sendtmptype  = recvtype;
   }
     sendtmpcount = recvcount;
     sendtmptype  = recvtype;
   }
@@ -758,19 +758,19 @@ int PMPI_Ialltoall(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* re
 
   TRACE_smpi_comm_out(rank);
   if (sendbuf == MPI_IN_PLACE)
 
   TRACE_smpi_comm_out(rank);
   if (sendbuf == MPI_IN_PLACE)
-    xbt_free(sendtmpbuf);
+    xbt_free(const_cast<void*>(sendtmpbuf));
   smpi_bench_begin();
   return retval;
 }
 
   smpi_bench_begin();
   return retval;
 }
 
-int PMPI_Alltoallv(void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype sendtype, void* recvbuf,
-                   int* recvcounts, int* recvdisps, MPI_Datatype recvtype, MPI_Comm comm)
+int PMPI_Alltoallv(const void* sendbuf, const int* sendcounts, const int* senddisps, MPI_Datatype sendtype, void* recvbuf,
+                   const int* recvcounts, const int* recvdisps, MPI_Datatype recvtype, MPI_Comm comm)
 {
   return PMPI_Ialltoallv(sendbuf, sendcounts, senddisps, sendtype, recvbuf, recvcounts, recvdisps, recvtype, comm, MPI_REQUEST_IGNORED);
 }
 
 {
   return PMPI_Ialltoallv(sendbuf, sendcounts, senddisps, sendtype, recvbuf, recvcounts, recvdisps, recvtype, comm, MPI_REQUEST_IGNORED);
 }
 
-int PMPI_Ialltoallv(void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype sendtype, void* recvbuf,
-                    int* recvcounts, int* recvdisps, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request* request)
+int PMPI_Ialltoallv(const void* sendbuf, const int* sendcounts, const int* senddisps, MPI_Datatype sendtype, void* recvbuf,
+                    const int* recvcounts, const int* recvdisps, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request* request)
 {
   if (comm == MPI_COMM_NULL)
     return MPI_ERR_COMM;
 {
   if (comm == MPI_COMM_NULL)
     return MPI_ERR_COMM;
@@ -798,9 +798,9 @@ int PMPI_Ialltoallv(void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype
   std::vector<int>* trace_recvcounts = new std::vector<int>;
   int dt_size_recv                   = recvtype->size();
 
   std::vector<int>* trace_recvcounts = new std::vector<int>;
   int dt_size_recv                   = recvtype->size();
 
-  void* sendtmpbuf         = static_cast<char*>(sendbuf);
-  int* sendtmpcounts       = sendcounts;
-  int* sendtmpdisps        = senddisps;
+  const void* sendtmpbuf   = static_cast<const char*>(sendbuf);
+  const int* sendtmpcounts       = sendcounts;
+  const int* sendtmpdisps        = senddisps;
   MPI_Datatype sendtmptype = sendtype;
   int maxsize              = 0;
   for (int i = 0; i < size; i++) { // copy data to avoid bad free
   MPI_Datatype sendtmptype = sendtype;
   int maxsize              = 0;
   for (int i = 0; i < size; i++) { // copy data to avoid bad free
@@ -812,11 +812,11 @@ int PMPI_Ialltoallv(void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype
 
   if (sendbuf == MPI_IN_PLACE) {
     sendtmpbuf = static_cast<void*>(xbt_malloc(maxsize));
 
   if (sendbuf == MPI_IN_PLACE) {
     sendtmpbuf = static_cast<void*>(xbt_malloc(maxsize));
-    memcpy(sendtmpbuf, recvbuf, maxsize);
+    memcpy(const_cast<void*>(sendtmpbuf), recvbuf, maxsize);
     sendtmpcounts = static_cast<int*>(xbt_malloc(size * sizeof(int)));
     sendtmpcounts = static_cast<int*>(xbt_malloc(size * sizeof(int)));
-    memcpy(sendtmpcounts, recvcounts, size * sizeof(int));
+    memcpy(const_cast<int*>(sendtmpcounts), recvcounts, size * sizeof(int));
     sendtmpdisps = static_cast<int*>(xbt_malloc(size * sizeof(int)));
     sendtmpdisps = static_cast<int*>(xbt_malloc(size * sizeof(int)));
-    memcpy(sendtmpdisps, recvdisps, size * sizeof(int));
+    memcpy(const_cast<int*>(sendtmpdisps), recvdisps, size * sizeof(int));
     sendtmptype = recvtype;
   }
 
     sendtmptype = recvtype;
   }
 
@@ -843,22 +843,22 @@ int PMPI_Ialltoallv(void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype
 
   TRACE_smpi_comm_out(rank);
   if (sendbuf == MPI_IN_PLACE) {
 
   TRACE_smpi_comm_out(rank);
   if (sendbuf == MPI_IN_PLACE) {
-    xbt_free(sendtmpbuf);
-    xbt_free(sendtmpcounts);
-    xbt_free(sendtmpdisps);
+    xbt_free(const_cast<void*>(sendtmpbuf));
+    xbt_free(const_cast<int*>(sendtmpcounts));
+    xbt_free(const_cast<int*>(sendtmpdisps));
   }
   smpi_bench_begin();
   return retval;
 }
 
   }
   smpi_bench_begin();
   return retval;
 }
 
-int PMPI_Alltoallw(void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype* sendtypes, void* recvbuf,
-                   int* recvcounts, int* recvdisps, MPI_Datatype* recvtypes, MPI_Comm comm)
+int PMPI_Alltoallw(const void* sendbuf, const int* sendcounts, const int* senddisps, const MPI_Datatype* sendtypes, void* recvbuf,
+                   const int* recvcounts, const int* recvdisps, const MPI_Datatype* recvtypes, MPI_Comm comm)
 {
   return PMPI_Ialltoallw(sendbuf, sendcounts, senddisps, sendtypes, recvbuf, recvcounts, recvdisps, recvtypes, comm, MPI_REQUEST_IGNORED);
 }
 
 {
   return PMPI_Ialltoallw(sendbuf, sendcounts, senddisps, sendtypes, recvbuf, recvcounts, recvdisps, recvtypes, comm, MPI_REQUEST_IGNORED);
 }
 
-int PMPI_Ialltoallw(void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype* sendtypes, void* recvbuf,
-                    int* recvcounts, int* recvdisps, MPI_Datatype* recvtypes, MPI_Comm comm, MPI_Request* request)
+int PMPI_Ialltoallw(const void* sendbuf, const int* sendcounts, const int* senddisps, const MPI_Datatype* sendtypes, void* recvbuf,
+                    const int* recvcounts, const int* recvdisps, const MPI_Datatype* recvtypes, MPI_Comm comm, MPI_Request* request)
 {
   if (comm == MPI_COMM_NULL)
     return MPI_ERR_COMM;
 {
   if (comm == MPI_COMM_NULL)
     return MPI_ERR_COMM;
@@ -884,10 +884,10 @@ int PMPI_Ialltoallw(void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype
   std::vector<int>* trace_sendcounts = new std::vector<int>;
   std::vector<int>* trace_recvcounts = new std::vector<int>;
 
   std::vector<int>* trace_sendcounts = new std::vector<int>;
   std::vector<int>* trace_recvcounts = new std::vector<int>;
 
-  void* sendtmpbuf           = static_cast<char*>(sendbuf);
-  int* sendtmpcounts         = sendcounts;
-  int* sendtmpdisps          = senddisps;
-  MPI_Datatype* sendtmptypes = sendtypes;
+  const void* sendtmpbuf           = static_cast<const char*>(sendbuf);
+  const int* sendtmpcounts         = sendcounts;
+  const int* sendtmpdisps          = senddisps;
+  const MPI_Datatype* sendtmptypes = sendtypes;
   unsigned long maxsize      = 0;
   for (int i = 0; i < size; i++) { // copy data to avoid bad free
     if (recvtypes[i] == MPI_DATATYPE_NULL) {
   unsigned long maxsize      = 0;
   for (int i = 0; i < size; i++) { // copy data to avoid bad free
     if (recvtypes[i] == MPI_DATATYPE_NULL) {
@@ -903,13 +903,13 @@ int PMPI_Ialltoallw(void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype
 
   if (sendbuf == MPI_IN_PLACE) {
     sendtmpbuf = static_cast<void*>(xbt_malloc(maxsize));
 
   if (sendbuf == MPI_IN_PLACE) {
     sendtmpbuf = static_cast<void*>(xbt_malloc(maxsize));
-    memcpy(sendtmpbuf, recvbuf, maxsize);
+    memcpy(const_cast<void*>(sendtmpbuf), recvbuf, maxsize);
     sendtmpcounts = static_cast<int*>(xbt_malloc(size * sizeof(int)));
     sendtmpcounts = static_cast<int*>(xbt_malloc(size * sizeof(int)));
-    memcpy(sendtmpcounts, recvcounts, size * sizeof(int));
+    memcpy(const_cast<int*>(sendtmpcounts), recvcounts, size * sizeof(int));
     sendtmpdisps = static_cast<int*>(xbt_malloc(size * sizeof(int)));
     sendtmpdisps = static_cast<int*>(xbt_malloc(size * sizeof(int)));
-    memcpy(sendtmpdisps, recvdisps, size * sizeof(int));
+    memcpy(const_cast<int*>(sendtmpdisps), recvdisps, size * sizeof(int));
     sendtmptypes = static_cast<MPI_Datatype*>(xbt_malloc(size * sizeof(MPI_Datatype)));
     sendtmptypes = static_cast<MPI_Datatype*>(xbt_malloc(size * sizeof(MPI_Datatype)));
-    memcpy(sendtmptypes, recvtypes, size * sizeof(MPI_Datatype));
+    memcpy(const_cast<MPI_Datatype*>(sendtmptypes), recvtypes, size * sizeof(MPI_Datatype));
   }
 
   for (int i = 0; i < size; i++) { // copy data to avoid bad free
   }
 
   for (int i = 0; i < size; i++) { // copy data to avoid bad free
@@ -933,10 +933,10 @@ int PMPI_Ialltoallw(void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype
 
   TRACE_smpi_comm_out(rank);
   if (sendbuf == MPI_IN_PLACE) {
 
   TRACE_smpi_comm_out(rank);
   if (sendbuf == MPI_IN_PLACE) {
-    xbt_free(sendtmpbuf);
-    xbt_free(sendtmpcounts);
-    xbt_free(sendtmpdisps);
-    xbt_free(sendtmptypes);
+    xbt_free(const_cast<void*>(sendtmpbuf));
+    xbt_free(const_cast<int*>(sendtmpcounts));
+    xbt_free(const_cast<int*>(sendtmpdisps));
+    xbt_free(const_cast<MPI_Datatype*>(sendtmptypes));
   }
   smpi_bench_begin();
   return retval;
   }
   smpi_bench_begin();
   return retval;
index 2b49ff3..02bd09b 100644 (file)
@@ -111,7 +111,7 @@ namespace smpi{
 
 
 int
 
 
 int
-Coll_allgather_2dmesh::allgather(void *send_buff, int send_count, MPI_Datatype
+Coll_allgather_2dmesh::allgather(const void *send_buff, int send_count, MPI_Datatype
                                  send_type, void *recv_buff, int recv_count,
                                  MPI_Datatype recv_type, MPI_Comm comm)
 {
                                  send_type, void *recv_buff, int recv_count,
                                  MPI_Datatype recv_type, MPI_Comm comm)
 {
index e27aa4b..38ef2b0 100644 (file)
@@ -96,7 +96,7 @@ namespace simgrid{
 namespace smpi{
 
 
 namespace smpi{
 
 
-int Coll_allgather_3dmesh::allgather(void *send_buff, int send_count,
+int Coll_allgather_3dmesh::allgather(const void *send_buff, int send_count,
                                      MPI_Datatype send_type, void *recv_buff,
                                      int recv_count, MPI_Datatype recv_type,
                                      MPI_Comm comm)
                                      MPI_Datatype send_type, void *recv_buff,
                                      int recv_count, MPI_Datatype recv_type,
                                      MPI_Comm comm)
index ee859c6..26ded0b 100644 (file)
@@ -9,7 +9,7 @@
 namespace simgrid{
 namespace smpi{
 // Allgather - gather/bcast algorithm
 namespace simgrid{
 namespace smpi{
 // Allgather - gather/bcast algorithm
-int Coll_allgather_GB::allgather(void *send_buff, int send_count,
+int Coll_allgather_GB::allgather(const void *send_buff, int send_count,
                                  MPI_Datatype send_type, void *recv_buff,
                                  int recv_count, MPI_Datatype recv_type,
                                  MPI_Comm comm)
                                  MPI_Datatype send_type, void *recv_buff,
                                  int recv_count, MPI_Datatype recv_type,
                                  MPI_Comm comm)
index a636040..608e026 100644 (file)
@@ -12,7 +12,7 @@ namespace smpi{
 
 // Allgather-Non-Topoloty-Scecific-Logical-Ring algorithm
 int
 
 // Allgather-Non-Topoloty-Scecific-Logical-Ring algorithm
 int
-Coll_allgather_NTSLR_NB::allgather(void *sbuf, int scount, MPI_Datatype stype,
+Coll_allgather_NTSLR_NB::allgather(const void *sbuf, int scount, MPI_Datatype stype,
                                    void *rbuf, int rcount, MPI_Datatype rtype,
                                    MPI_Comm comm)
 {
                                    void *rbuf, int rcount, MPI_Datatype rtype,
                                    MPI_Comm comm)
 {
index 27c5b70..3aa5365 100644 (file)
@@ -13,7 +13,7 @@ namespace smpi{
 
 // Allgather-Non-Topoloty-Scecific-Logical-Ring algorithm
 int
 
 // Allgather-Non-Topoloty-Scecific-Logical-Ring algorithm
 int
-Coll_allgather_NTSLR::allgather(void *sbuf, int scount, MPI_Datatype stype,
+Coll_allgather_NTSLR::allgather(const void *sbuf, int scount, MPI_Datatype stype,
                                 void *rbuf, int rcount, MPI_Datatype rtype,
                                 MPI_Comm comm)
 {
                                 void *rbuf, int rcount, MPI_Datatype rtype,
                                 MPI_Comm comm)
 {
index bce3f6e..9e5986b 100644 (file)
@@ -10,7 +10,7 @@ namespace simgrid{
 namespace smpi{
 
 
 namespace smpi{
 
 
-int Coll_allgather_SMP_NTS::allgather(void *sbuf, int scount,
+int Coll_allgather_SMP_NTS::allgather(const void *sbuf, int scount,
                                       MPI_Datatype stype, void *rbuf,
                                       int rcount, MPI_Datatype rtype,
                                       MPI_Comm comm)
                                       MPI_Datatype stype, void *rbuf,
                                       int rcount, MPI_Datatype rtype,
                                       MPI_Comm comm)
index 44578b2..1e7cf37 100644 (file)
@@ -73,7 +73,7 @@ namespace smpi{
 
 
 
 
 
 
-int Coll_allgather_bruck::allgather(void *send_buff, int send_count,
+int Coll_allgather_bruck::allgather(const void *send_buff, int send_count,
                                     MPI_Datatype send_type, void *recv_buff,
                                     int recv_count, MPI_Datatype recv_type,
                                     MPI_Comm comm)
                                     MPI_Datatype send_type, void *recv_buff,
                                     int recv_count, MPI_Datatype recv_type,
                                     MPI_Comm comm)
index 575356a..3da2263 100644 (file)
@@ -10,7 +10,7 @@ namespace simgrid{
 namespace smpi{
 
 
 namespace smpi{
 
 
-int Coll_allgather_loosely_lr::allgather(void *sbuf, int scount,
+int Coll_allgather_loosely_lr::allgather(const void *sbuf, int scount,
                                          MPI_Datatype stype, void *rbuf,
                                          int rcount, MPI_Datatype rtype,
                                          MPI_Comm comm)
                                          MPI_Datatype stype, void *rbuf,
                                          int rcount, MPI_Datatype rtype,
                                          MPI_Comm comm)
index 0d641c6..1a624eb 100644 (file)
@@ -38,7 +38,7 @@
 namespace simgrid{
 namespace smpi{
 
 namespace simgrid{
 namespace smpi{
 
-int Coll_allgather_mvapich2_smp::allgather(void *sendbuf,int sendcnt, MPI_Datatype sendtype,
+int Coll_allgather_mvapich2_smp::allgather(const void *sendbuf,int sendcnt, MPI_Datatype sendtype,
                             void *recvbuf, int recvcnt,MPI_Datatype recvtype,
                             MPI_Comm  comm)
 {
                             void *recvbuf, int recvcnt,MPI_Datatype recvtype,
                             MPI_Comm  comm)
 {
index f9bc2b9..0b0a0b2 100644 (file)
@@ -68,7 +68,7 @@ namespace simgrid{
 namespace smpi{
 
 int
 namespace smpi{
 
 int
-Coll_allgather_ompi_neighborexchange::allgather(void *sbuf, int scount,
+Coll_allgather_ompi_neighborexchange::allgather(const void *sbuf, int scount,
                                                  MPI_Datatype sdtype,
                                                  void* rbuf, int rcount,
                                                  MPI_Datatype rdtype,
                                                  MPI_Datatype sdtype,
                                                  void* rbuf, int rcount,
                                                  MPI_Datatype rdtype,
index 51c0364..7f0ec36 100644 (file)
@@ -70,7 +70,7 @@ namespace smpi{
 
 
 int
 
 
 int
-Coll_allgather_pair::allgather(void *send_buff, int send_count,
+Coll_allgather_pair::allgather(const void *send_buff, int send_count,
                                MPI_Datatype send_type, void *recv_buff,
                                int recv_count, MPI_Datatype recv_type,
                                MPI_Comm comm)
                                MPI_Datatype send_type, void *recv_buff,
                                int recv_count, MPI_Datatype recv_type,
                                MPI_Comm comm)
index e580aca..5811d72 100644 (file)
@@ -10,7 +10,7 @@ namespace simgrid{
 namespace smpi{
 
 int
 namespace smpi{
 
 int
-Coll_allgather_rdb::allgather(void *sbuf, int send_count,
+Coll_allgather_rdb::allgather(const void *sbuf, int send_count,
                               MPI_Datatype send_type, void *rbuf,
                               int recv_count, MPI_Datatype recv_type,
                               MPI_Comm comm)
                               MPI_Datatype send_type, void *rbuf,
                               int recv_count, MPI_Datatype recv_type,
                               MPI_Comm comm)
index e4b504e..bcbb4d1 100644 (file)
@@ -13,7 +13,7 @@ namespace smpi{
 // now only work with power of two processes
 
 int
 // now only work with power of two processes
 
 int
-Coll_allgather_rhv::allgather(void *sbuf, int send_count,
+Coll_allgather_rhv::allgather(const void *sbuf, int send_count,
                               MPI_Datatype send_type, void *rbuf,
                               int recv_count, MPI_Datatype recv_type,
                               MPI_Comm comm)
                               MPI_Datatype send_type, void *rbuf,
                               int recv_count, MPI_Datatype recv_type,
                               MPI_Comm comm)
index f6537a5..26e369d 100644 (file)
@@ -69,7 +69,7 @@ namespace smpi{
 
 
 int
 
 
 int
-Coll_allgather_ring::allgather(void *send_buff, int send_count,
+Coll_allgather_ring::allgather(const void *send_buff, int send_count,
                                MPI_Datatype send_type, void *recv_buff,
                                int recv_count, MPI_Datatype recv_type,
                                MPI_Comm comm)
                                MPI_Datatype send_type, void *recv_buff,
                                int recv_count, MPI_Datatype recv_type,
                                MPI_Comm comm)
index b559ba4..06bf8d8 100644 (file)
@@ -10,7 +10,7 @@ namespace simgrid{
 namespace smpi{
 
 
 namespace smpi{
 
 
-int Coll_allgather_smp_simple::allgather(void *send_buf, int scount,
+int Coll_allgather_smp_simple::allgather(const void *send_buf, int scount,
                                          MPI_Datatype stype, void *recv_buf,
                                          int rcount, MPI_Datatype rtype,
                                          MPI_Comm comm)
                                          MPI_Datatype stype, void *recv_buf,
                                          int rcount, MPI_Datatype rtype,
                                          MPI_Comm comm)
index e500907..af20e8f 100644 (file)
@@ -72,7 +72,7 @@ namespace smpi{
 
 
 int
 
 
 int
-Coll_allgather_spreading_simple::allgather(void *send_buff, int send_count,
+Coll_allgather_spreading_simple::allgather(const void *send_buff, int send_count,
                                            MPI_Datatype send_type,
                                            void *recv_buff, int recv_count,
                                            MPI_Datatype recv_type,
                                            MPI_Datatype send_type,
                                            void *recv_buff, int recv_count,
                                            MPI_Datatype recv_type,
index 39b4406..d3de949 100644 (file)
@@ -10,9 +10,9 @@ namespace simgrid{
 namespace smpi{
 
 // Allgather - gather/bcast algorithm
 namespace smpi{
 
 // Allgather - gather/bcast algorithm
-int Coll_allgatherv_GB::allgatherv(void *send_buff, int send_count,
+int Coll_allgatherv_GB::allgatherv(const void *send_buff, int send_count,
                                  MPI_Datatype send_type, void *recv_buff,
                                  MPI_Datatype send_type, void *recv_buff,
-                                 int *recv_counts, int *recv_disps, MPI_Datatype recv_type,
+                                 const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type,
                                  MPI_Comm comm)
 {
   Colls::gatherv(send_buff, send_count, send_type, recv_buff, recv_counts, recv_disps, recv_type, 0, comm);
                                  MPI_Comm comm)
 {
   Colls::gatherv(send_buff, send_count, send_type, recv_buff, recv_counts, recv_disps, recv_type, 0, comm);
index df72733..a359f44 100644 (file)
@@ -14,12 +14,12 @@ namespace simgrid{
 namespace smpi{
 
 int Coll_allgatherv_mpich_rdb::allgatherv (
 namespace smpi{
 
 int Coll_allgatherv_mpich_rdb::allgatherv (
-  void *sendbuf,
+  const void *sendbuf,
   int sendcount,
   MPI_Datatype sendtype,
   void *recvbuf,
   int sendcount,
   MPI_Datatype sendtype,
   void *recvbuf,
-  int *recvcounts,
-  int *displs,
+  const int *recvcounts,
+  const int *displs,
   MPI_Datatype recvtype,
   MPI_Comm comm)
 {
   MPI_Datatype recvtype,
   MPI_Comm comm)
 {
index c0d9dc9..155b24f 100644 (file)
@@ -29,9 +29,9 @@ namespace simgrid{
 namespace smpi{
 
 int
 namespace smpi{
 
 int
-Coll_allgatherv_mpich_ring::allgatherv(void *sendbuf, int sendcount,
+Coll_allgatherv_mpich_ring::allgatherv(const void *sendbuf, int sendcount,
     MPI_Datatype send_type, void *recvbuf,
     MPI_Datatype send_type, void *recvbuf,
-    int *recvcounts, int *displs, MPI_Datatype recvtype,
+    const int *recvcounts, const int *displs, MPI_Datatype recvtype,
     MPI_Comm comm)
 {
 
     MPI_Comm comm)
 {
 
index b4c2b03..91d9977 100644 (file)
 namespace simgrid{
 namespace smpi{
 
 namespace simgrid{
 namespace smpi{
 
-int Coll_allgatherv_ompi_bruck::allgatherv(void *sbuf, int scount,
+int Coll_allgatherv_ompi_bruck::allgatherv(const void *sbuf, int scount,
                                            MPI_Datatype sdtype,
                                            MPI_Datatype sdtype,
-                                           void *rbuf, int *rcounts,
-                                           int *rdispls,
+                                           void *rbuf, const int *rcounts,
+                                           const int *rdispls,
                                            MPI_Datatype rdtype,
                                            MPI_Comm comm)
 {
                                            MPI_Datatype rdtype,
                                            MPI_Comm comm)
 {
index bdeacab..74542de 100644 (file)
@@ -69,9 +69,9 @@ namespace simgrid{
 namespace smpi{
 
 int
 namespace smpi{
 
 int
-Coll_allgatherv_ompi_neighborexchange::allgatherv(void *sbuf, int scount,
+Coll_allgatherv_ompi_neighborexchange::allgatherv(const void *sbuf, int scount,
                                                   MPI_Datatype sdtype,
                                                   MPI_Datatype sdtype,
-                                                  void* rbuf, int *rcounts, int *rdispls,
+                                                  void* rbuf, const int *rcounts, const int *rdispls,
                                                   MPI_Datatype rdtype,
                                                   MPI_Comm comm)
 {
                                                   MPI_Datatype rdtype,
                                                   MPI_Comm comm)
 {
index ae5fbde..f066747 100644 (file)
@@ -69,9 +69,9 @@ namespace simgrid{
 namespace smpi{
 
 int
 namespace smpi{
 
 int
-Coll_allgatherv_pair::allgatherv(void *send_buff, int send_count,
+Coll_allgatherv_pair::allgatherv(const void *send_buff, int send_count,
                                MPI_Datatype send_type, void *recv_buff,
                                MPI_Datatype send_type, void *recv_buff,
-                               int *recv_counts, int *recv_disps, MPI_Datatype recv_type,
+                               const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type,
                                MPI_Comm comm)
 {
 
                                MPI_Comm comm)
 {
 
index 8d0a65d..b092435 100644 (file)
@@ -68,9 +68,9 @@ namespace simgrid{
 namespace smpi{
 
 int
 namespace smpi{
 
 int
-Coll_allgatherv_ring::allgatherv(void *send_buff, int send_count,
+Coll_allgatherv_ring::allgatherv(const void *send_buff, int send_count,
                                MPI_Datatype send_type, void *recv_buff,
                                MPI_Datatype send_type, void *recv_buff,
-                               int *recv_counts, int *recv_disps, MPI_Datatype recv_type,
+                               const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type,
                                MPI_Comm comm)
 {
 
                                MPI_Comm comm)
 {
 
index 9d92883..380e093 100644 (file)
@@ -21,7 +21,7 @@
 namespace simgrid{
 namespace smpi{
 int
 namespace simgrid{
 namespace smpi{
 int
-Coll_allreduce_lr::allreduce(void *sbuf, void *rbuf, int rcount,
+Coll_allreduce_lr::allreduce(const void *sbuf, void *rbuf, int rcount,
                              MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
 {
   int tag = COLL_TAG_ALLREDUCE;
                              MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
 {
   int tag = COLL_TAG_ALLREDUCE;
index 669c347..d5102b1 100644 (file)
@@ -26,7 +26,7 @@
 
 namespace simgrid{
 namespace smpi{
 
 namespace simgrid{
 namespace smpi{
-int Coll_allreduce_mvapich2_rs::allreduce(void *sendbuf,
+int Coll_allreduce_mvapich2_rs::allreduce(const void *sendbuf,
                             void *recvbuf,
                             int count,
                             MPI_Datatype datatype,
                             void *recvbuf,
                             int count,
                             MPI_Datatype datatype,
index 4c206c4..8a89d28 100644 (file)
 #define MPIR_Allreduce_pt2pt_rd_MV2 Coll_allreduce_rdb::allreduce
 #define MPIR_Allreduce_pt2pt_rs_MV2 Coll_allreduce_mvapich2_rs::allreduce
 
 #define MPIR_Allreduce_pt2pt_rd_MV2 Coll_allreduce_rdb::allreduce
 #define MPIR_Allreduce_pt2pt_rs_MV2 Coll_allreduce_mvapich2_rs::allreduce
 
-extern int (*MV2_Allreducection)(void *sendbuf,
+extern int (*MV2_Allreducection)(const void *sendbuf,
     void *recvbuf,
     int count,
     MPI_Datatype datatype,
     MPI_Op op, MPI_Comm comm);
 
 
     void *recvbuf,
     int count,
     MPI_Datatype datatype,
     MPI_Op op, MPI_Comm comm);
 
 
-extern int (*MV2_Allreduce_intra_function)( void *sendbuf,
+extern int (*MV2_Allreduce_intra_function)(const void *sendbuf,
     void *recvbuf,
     int count,
     MPI_Datatype datatype,
     void *recvbuf,
     int count,
     MPI_Datatype datatype,
@@ -56,7 +56,7 @@ extern int (*MV2_Allreduce_intra_function)( void *sendbuf,
 
 namespace simgrid{
 namespace smpi{
 
 namespace simgrid{
 namespace smpi{
-static  int MPIR_Allreduce_reduce_p2p_MV2( void *sendbuf,
+static  int MPIR_Allreduce_reduce_p2p_MV2(const void *sendbuf,
     void *recvbuf,
     int count,
     MPI_Datatype datatype,
     void *recvbuf,
     int count,
     MPI_Datatype datatype,
@@ -66,7 +66,7 @@ static  int MPIR_Allreduce_reduce_p2p_MV2( void *sendbuf,
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-static  int MPIR_Allreduce_reduce_shmem_MV2( void *sendbuf,
+static  int MPIR_Allreduce_reduce_shmem_MV2(const void *sendbuf,
     void *recvbuf,
     int count,
     MPI_Datatype datatype,
     void *recvbuf,
     int count,
     MPI_Datatype datatype,
@@ -78,7 +78,7 @@ static  int MPIR_Allreduce_reduce_shmem_MV2( void *sendbuf,
 
 
 /* general two level allreduce helper function */
 
 
 /* general two level allreduce helper function */
-int Coll_allreduce_mvapich2_two_level::allreduce(void *sendbuf,
+int Coll_allreduce_mvapich2_two_level::allreduce(const void *sendbuf,
                              void *recvbuf,
                              int count,
                              MPI_Datatype datatype,
                              void *recvbuf,
                              int count,
                              MPI_Datatype datatype,
index cea8087..e20328f 100644 (file)
 namespace simgrid{
 namespace smpi{
 int
 namespace simgrid{
 namespace smpi{
 int
-Coll_allreduce_ompi_ring_segmented::allreduce(void *sbuf, void *rbuf, int count,
+Coll_allreduce_ompi_ring_segmented::allreduce(const void *sbuf, void *rbuf, int count,
                                                MPI_Datatype dtype,
                                                MPI_Op op,
                                                MPI_Comm comm)
                                                MPI_Datatype dtype,
                                                MPI_Op op,
                                                MPI_Comm comm)
index 60f093f..4c9f338 100644 (file)
@@ -7,7 +7,7 @@
 #include "../colls_private.hpp"
 namespace simgrid{
 namespace smpi{
 #include "../colls_private.hpp"
 namespace simgrid{
 namespace smpi{
-int Coll_allreduce_rab_rdb::allreduce(void *sbuff, void *rbuff, int count,
+int Coll_allreduce_rab_rdb::allreduce(const void *sbuff, void *rbuff, int count,
                                       MPI_Datatype dtype, MPI_Op op,
                                       MPI_Comm comm)
 {
                                       MPI_Datatype dtype, MPI_Op op,
                                       MPI_Comm comm)
 {
index 9563c03..9910b14 100644 (file)
@@ -9,7 +9,7 @@
 namespace simgrid{
 namespace smpi{
 // NP pow of 2 for now
 namespace simgrid{
 namespace smpi{
 // NP pow of 2 for now
-int Coll_allreduce_rab1::allreduce(void *sbuff, void *rbuff,
+int Coll_allreduce_rab1::allreduce(const void *sbuff, void *rbuff,
                                    int count, MPI_Datatype dtype,
                                    MPI_Op op, MPI_Comm comm)
 {
                                    int count, MPI_Datatype dtype,
                                    MPI_Op op, MPI_Comm comm)
 {
index bad546c..0a45358 100644 (file)
@@ -10,7 +10,7 @@
 namespace simgrid{
 namespace smpi{
 // this requires that count >= NP
 namespace simgrid{
 namespace smpi{
 // this requires that count >= NP
-int Coll_allreduce_rab2::allreduce(void *sbuff, void *rbuff,
+int Coll_allreduce_rab2::allreduce(const void *sbuff, void *rbuff,
                                    int count, MPI_Datatype dtype,
                                    MPI_Op op, MPI_Comm comm)
 {
                                    int count, MPI_Datatype dtype,
                                    MPI_Op op, MPI_Comm comm)
 {
@@ -62,7 +62,7 @@ int Coll_allreduce_rab2::allreduce(void *sbuff, void *rbuff,
     smpi_free_tmp_buffer(tmp);
     smpi_free_tmp_buffer(send);
   } else {
     smpi_free_tmp_buffer(tmp);
     smpi_free_tmp_buffer(send);
   } else {
-    send = sbuff;
+    send = const_cast<void*>(sbuff);
     send_size = count / nprocs;
     nbytes = send_size * s_extent;
     r_offset = rank * nbytes;
     send_size = count / nprocs;
     nbytes = send_size * s_extent;
     r_offset = rank * nbytes;
index 1916341..4afddb4 100644 (file)
@@ -8,7 +8,7 @@
 //#include <star-reduction.c>
 namespace simgrid{
 namespace smpi{
 //#include <star-reduction.c>
 namespace simgrid{
 namespace smpi{
-int Coll_allreduce_rdb::allreduce(void *sbuff, void *rbuff, int count,
+int Coll_allreduce_rdb::allreduce(const void *sbuff, void *rbuff, int count,
                                   MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
 {
   int nprocs, rank, tag = COLL_TAG_ALLREDUCE;
                                   MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
 {
   int nprocs, rank, tag = COLL_TAG_ALLREDUCE;
index b389899..1f5863c 100644 (file)
@@ -7,7 +7,7 @@
 #include "../colls_private.hpp"
 namespace simgrid{
 namespace smpi{
 #include "../colls_private.hpp"
 namespace simgrid{
 namespace smpi{
-int Coll_allreduce_redbcast::allreduce(void *buf, void *buf2, int count,
+int Coll_allreduce_redbcast::allreduce(const void *buf, void *buf2, int count,
                                        MPI_Datatype datatype, MPI_Op op,
                                        MPI_Comm comm)
 {
                                        MPI_Datatype datatype, MPI_Op op,
                                        MPI_Comm comm)
 {
index 723eb42..7de6db7 100644 (file)
@@ -40,7 +40,7 @@ This fucntion performs all-reduce operation as follow. ** in a pipeline fashion
 */
 namespace simgrid{
 namespace smpi{
 */
 namespace simgrid{
 namespace smpi{
-int Coll_allreduce_smp_binomial_pipeline::allreduce(void *send_buf,
+int Coll_allreduce_smp_binomial_pipeline::allreduce(const void *send_buf,
                                                     void *recv_buf, int count,
                                                     MPI_Datatype dtype,
                                                     MPI_Op op, MPI_Comm comm)
                                                     void *recv_buf, int count,
                                                     MPI_Datatype dtype,
                                                     MPI_Op op, MPI_Comm comm)
index c9b0076..3b1c401 100644 (file)
@@ -29,7 +29,7 @@ This fucntion performs all-reduce operation as follow.
 */
 namespace simgrid{
 namespace smpi{
 */
 namespace simgrid{
 namespace smpi{
-int Coll_allreduce_smp_binomial::allreduce(void *send_buf, void *recv_buf,
+int Coll_allreduce_smp_binomial::allreduce(const void *send_buf, void *recv_buf,
                                            int count, MPI_Datatype dtype,
                                            MPI_Op op, MPI_Comm comm)
 {
                                            int count, MPI_Datatype dtype,
                                            MPI_Op op, MPI_Comm comm)
 {
index 1c8d99d..a9a5739 100644 (file)
@@ -28,7 +28,7 @@ This fucntion performs all-reduce operation as follow.
 */
 namespace simgrid{
 namespace smpi{
 */
 namespace simgrid{
 namespace smpi{
-int Coll_allreduce_smp_rdb::allreduce(void *send_buf, void *recv_buf, int count,
+int Coll_allreduce_smp_rdb::allreduce(const void *send_buf, void *recv_buf, int count,
                                       MPI_Datatype dtype, MPI_Op op,
                                       MPI_Comm comm)
 {
                                       MPI_Datatype dtype, MPI_Op op,
                                       MPI_Comm comm)
 {
index e2753d1..9babeb9 100644 (file)
@@ -16,7 +16,7 @@ This fucntion performs all-reduce operation as follow.
 */
 namespace simgrid{
 namespace smpi{
 */
 namespace simgrid{
 namespace smpi{
-int Coll_allreduce_smp_rsag_lr::allreduce(void *send_buf, void *recv_buf,
+int Coll_allreduce_smp_rsag_lr::allreduce(const void *send_buf, void *recv_buf,
                                           int count, MPI_Datatype dtype,
                                           MPI_Op op, MPI_Comm comm)
 {
                                           int count, MPI_Datatype dtype,
                                           MPI_Op op, MPI_Comm comm)
 {
index 2286a05..0b20bf2 100644 (file)
@@ -20,7 +20,7 @@ This fucntion performs all-reduce operation as follow.
 */
 namespace simgrid{
 namespace smpi{
 */
 namespace simgrid{
 namespace smpi{
-int Coll_allreduce_smp_rsag_rab::allreduce(void *sbuf, void *rbuf, int count,
+int Coll_allreduce_smp_rsag_rab::allreduce(const void *sbuf, void *rbuf, int count,
                                            MPI_Datatype dtype, MPI_Op op,
                                            MPI_Comm comm)
 {
                                            MPI_Datatype dtype, MPI_Op op,
                                            MPI_Comm comm)
 {
index d53d29e..1be58c9 100644 (file)
@@ -15,7 +15,7 @@ This fucntion performs all-reduce operation as follow.
 */
 namespace simgrid{
 namespace smpi{
 */
 namespace simgrid{
 namespace smpi{
-int Coll_allreduce_smp_rsag::allreduce(void *send_buf, void *recv_buf,
+int Coll_allreduce_smp_rsag::allreduce(const void *send_buf, void *recv_buf,
                                        int count, MPI_Datatype dtype, MPI_Op op,
                                        MPI_Comm comm)
 {
                                        int count, MPI_Datatype dtype, MPI_Op op,
                                        MPI_Comm comm)
 {
index 03f0a87..e27e5de 100644 (file)
@@ -55,7 +55,7 @@ static int alltoall_check_is_2dmesh(int num, int *i, int *j)
 namespace simgrid{
 namespace smpi{
 
 namespace simgrid{
 namespace smpi{
 
-int Coll_alltoall_2dmesh::alltoall(void *send_buff, int send_count,
+int Coll_alltoall_2dmesh::alltoall(const void *send_buff, int send_count,
                                     MPI_Datatype send_type,
                                     void *recv_buff, int recv_count,
                                     MPI_Datatype recv_type, MPI_Comm comm)
                                     MPI_Datatype send_type,
                                     void *recv_buff, int recv_count,
                                     MPI_Datatype recv_type, MPI_Comm comm)
index 258058d..3870c52 100644 (file)
@@ -47,7 +47,7 @@ static int alltoall_check_is_3dmesh(int num, int *i, int *j, int *k)
 }
 namespace simgrid{
 namespace smpi{
 }
 namespace simgrid{
 namespace smpi{
-int Coll_alltoall_3dmesh::alltoall(void *send_buff, int send_count,
+int Coll_alltoall_3dmesh::alltoall(const void *send_buff, int send_count,
                                     MPI_Datatype send_type,
                                     void *recv_buff, int recv_count,
                                     MPI_Datatype recv_type, MPI_Comm comm)
                                     MPI_Datatype send_type,
                                     void *recv_buff, int recv_count,
                                     MPI_Datatype recv_type, MPI_Comm comm)
index 39c764e..06c5382 100644 (file)
@@ -13,7 +13,7 @@ namespace simgrid{
 namespace smpi{
 
 
 namespace smpi{
 
 
-int Coll_alltoall_basic_linear::alltoall(void *sendbuf, int sendcount, MPI_Datatype sendtype,
+int Coll_alltoall_basic_linear::alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                                           void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm)
 {
   int system_tag = COLL_TAG_ALLTOALL;
                                           void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm)
 {
   int system_tag = COLL_TAG_ALLTOALL;
@@ -29,7 +29,7 @@ int Coll_alltoall_basic_linear::alltoall(void *sendbuf, int sendcount, MPI_Datat
   sendtype->extent(&lb, &sendext);
   recvtype->extent(&lb, &recvext);
   /* simple optimization */
   sendtype->extent(&lb, &sendext);
   recvtype->extent(&lb, &recvext);
   /* simple optimization */
-  int err = Datatype::copy(static_cast<char *>(sendbuf) + rank * sendcount * sendext, sendcount, sendtype,
+  int err = Datatype::copy(static_cast<const char *>(sendbuf) + rank * sendcount * sendext, sendcount, sendtype,
                                static_cast<char *>(recvbuf) + rank * recvcount * recvext, recvcount, recvtype);
   if (err == MPI_SUCCESS && size > 1) {
     /* Initiate all send/recv to/from others. */
                                static_cast<char *>(recvbuf) + rank * recvcount * recvext, recvcount, recvtype);
   if (err == MPI_SUCCESS && size > 1) {
     /* Initiate all send/recv to/from others. */
@@ -47,7 +47,7 @@ int Coll_alltoall_basic_linear::alltoall(void *sendbuf, int sendcount, MPI_Datat
      * TODO: check the previous assertion
      */
     for (i = (rank + size - 1) % size; i != rank; i = (i + size - 1) % size) {
      * TODO: check the previous assertion
      */
     for (i = (rank + size - 1) % size; i != rank; i = (i + size - 1) % size) {
-      requests[count] = Request::isend_init(static_cast<char *>(sendbuf) + i * sendcount * sendext, sendcount,
+      requests[count] = Request::isend_init(static_cast<const char *>(sendbuf) + i * sendcount * sendext, sendcount,
                                         sendtype, i, system_tag, comm);
       count++;
     }
                                         sendtype, i, system_tag, comm);
       count++;
     }
index 0d971d8..c2ea5ed 100644 (file)
@@ -32,7 +32,7 @@ namespace smpi{
 
 
 int
 
 
 int
-Coll_alltoall_bruck::alltoall(void *send_buff, int send_count,
+Coll_alltoall_bruck::alltoall(const void *send_buff, int send_count,
                                MPI_Datatype send_type, void *recv_buff,
                                int recv_count, MPI_Datatype recv_type,
                                MPI_Comm comm)
                                MPI_Datatype send_type, void *recv_buff,
                                int recv_count, MPI_Datatype recv_type,
                                MPI_Comm comm)
index 6fc2d7d..5d77d38 100644 (file)
@@ -45,7 +45,7 @@
 namespace simgrid{
 namespace smpi{
 int Coll_alltoall_mvapich2_scatter_dest::alltoall(
 namespace simgrid{
 namespace smpi{
 int Coll_alltoall_mvapich2_scatter_dest::alltoall(
-                            void *sendbuf,
+                            const void *sendbuf,
                             int sendcount,
                             MPI_Datatype sendtype,
                             void *recvbuf,
                             int sendcount,
                             MPI_Datatype sendtype,
                             void *recvbuf,
index 8e823e1..34e2897 100644 (file)
@@ -30,7 +30,7 @@
 namespace simgrid{
 namespace smpi{
 int
 namespace simgrid{
 namespace smpi{
 int
-Coll_alltoall_pair_light_barrier::alltoall(void *send_buff, int send_count,
+Coll_alltoall_pair_light_barrier::alltoall(const void *send_buff, int send_count,
                                             MPI_Datatype send_type,
                                             void *recv_buff, int recv_count,
                                             MPI_Datatype recv_type,
                                             MPI_Datatype send_type,
                                             void *recv_buff, int recv_count,
                                             MPI_Datatype recv_type,
index 14ea779..2c40264 100644 (file)
@@ -30,7 +30,7 @@
 namespace simgrid{
 namespace smpi{
 int
 namespace simgrid{
 namespace smpi{
 int
-Coll_alltoall_pair_mpi_barrier::alltoall(void *send_buff, int send_count,
+Coll_alltoall_pair_mpi_barrier::alltoall(const void *send_buff, int send_count,
                                           MPI_Datatype send_type,
                                           void *recv_buff, int recv_count,
                                           MPI_Datatype recv_type, MPI_Comm comm)
                                           MPI_Datatype send_type,
                                           void *recv_buff, int recv_count,
                                           MPI_Datatype recv_type, MPI_Comm comm)
index 914d19c..d626bab 100644 (file)
@@ -29,7 +29,7 @@
 namespace simgrid{
 namespace smpi{
 int
 namespace simgrid{
 namespace smpi{
 int
-Coll_alltoall_pair_one_barrier::alltoall(void *send_buff, int send_count,
+Coll_alltoall_pair_one_barrier::alltoall(const void *send_buff, int send_count,
                                           MPI_Datatype send_type,
                                           void *recv_buff, int recv_count,
                                           MPI_Datatype recv_type, MPI_Comm comm)
                                           MPI_Datatype send_type,
                                           void *recv_buff, int recv_count,
                                           MPI_Datatype recv_type, MPI_Comm comm)
index 1d3b4cf..652a40e 100644 (file)
@@ -30,7 +30,7 @@
  ****************************************************************************/
 namespace simgrid{
 namespace smpi{
  ****************************************************************************/
 namespace simgrid{
 namespace smpi{
-int Coll_alltoall_pair_rma::alltoall(void *send_buff, int send_count, MPI_Datatype send_type,
+int Coll_alltoall_pair_rma::alltoall(const void *send_buff, int send_count, MPI_Datatype send_type,
                   void *recv_buff, int recv_count, MPI_Datatype recv_type,
                   MPI_Comm comm)
 {
                   void *recv_buff, int recv_count, MPI_Datatype recv_type,
                   MPI_Comm comm)
 {
@@ -64,7 +64,7 @@ int Coll_alltoall_pair_rma::alltoall(void *send_buff, int send_count, MPI_Dataty
 }
 
 
 }
 
 
-int Coll_alltoall_pair::alltoall(void *send_buff, int send_count,
+int Coll_alltoall_pair::alltoall(const void *send_buff, int send_count,
                                   MPI_Datatype send_type,
                                   void *recv_buff, int recv_count,
                                   MPI_Datatype recv_type, MPI_Comm comm)
                                   MPI_Datatype send_type,
                                   void *recv_buff, int recv_count,
                                   MPI_Datatype recv_type, MPI_Comm comm)
index e52cbc7..2461845 100644 (file)
@@ -30,7 +30,7 @@
  ****************************************************************************/
 namespace simgrid{
 namespace smpi{
  ****************************************************************************/
 namespace simgrid{
 namespace smpi{
-int Coll_alltoall_rdb::alltoall(void *send_buff, int send_count,
+int Coll_alltoall_rdb::alltoall(const void *send_buff, int send_count,
                                  MPI_Datatype send_type,
                                  void *recv_buff, int recv_count,
                                  MPI_Datatype recv_type, MPI_Comm comm)
                                  MPI_Datatype send_type,
                                  void *recv_buff, int recv_count,
                                  MPI_Datatype recv_type, MPI_Comm comm)
index adbbccc..7aa92f9 100644 (file)
@@ -30,7 +30,7 @@
 namespace simgrid{
 namespace smpi{
 int
 namespace simgrid{
 namespace smpi{
 int
-Coll_alltoall_ring_light_barrier::alltoall(void *send_buff, int send_count,
+Coll_alltoall_ring_light_barrier::alltoall(const void *send_buff, int send_count,
                                             MPI_Datatype send_type,
                                             void *recv_buff, int recv_count,
                                             MPI_Datatype recv_type,
                                             MPI_Datatype send_type,
                                             void *recv_buff, int recv_count,
                                             MPI_Datatype recv_type,
index e6a35bd..c8e4c34 100644 (file)
@@ -29,7 +29,7 @@
 namespace simgrid{
 namespace smpi{
 int
 namespace simgrid{
 namespace smpi{
 int
-Coll_alltoall_ring_mpi_barrier::alltoall(void *send_buff, int send_count,
+Coll_alltoall_ring_mpi_barrier::alltoall(const void *send_buff, int send_count,
                                           MPI_Datatype send_type,
                                           void *recv_buff, int recv_count,
                                           MPI_Datatype recv_type, MPI_Comm comm)
                                           MPI_Datatype send_type,
                                           void *recv_buff, int recv_count,
                                           MPI_Datatype recv_type, MPI_Comm comm)
index 459c77b..be7e089 100644 (file)
@@ -28,7 +28,7 @@
 namespace simgrid{
 namespace smpi{
 int
 namespace simgrid{
 namespace smpi{
 int
-Coll_alltoall_ring_one_barrier::alltoall(void *send_buff, int send_count,
+Coll_alltoall_ring_one_barrier::alltoall(const void *send_buff, int send_count,
                                           MPI_Datatype send_type,
                                           void *recv_buff, int recv_count,
                                           MPI_Datatype recv_type, MPI_Comm comm)
                                           MPI_Datatype send_type,
                                           void *recv_buff, int recv_count,
                                           MPI_Datatype recv_type, MPI_Comm comm)
index 620e2ac..8144198 100644 (file)
@@ -28,7 +28,7 @@
 namespace simgrid{
 namespace smpi{
 int
 namespace simgrid{
 namespace smpi{
 int
-Coll_alltoall_ring::alltoall(void *send_buff, int send_count,
+Coll_alltoall_ring::alltoall(const void *send_buff, int send_count,
                               MPI_Datatype send_type, void *recv_buff,
                               int recv_count, MPI_Datatype recv_type,
                               MPI_Comm comm)
                               MPI_Datatype send_type, void *recv_buff,
                               int recv_count, MPI_Datatype recv_type,
                               MPI_Comm comm)
index c80bffe..6bb0147 100644 (file)
@@ -15,9 +15,9 @@
  **/
 namespace simgrid{
 namespace smpi{
  **/
 namespace simgrid{
 namespace smpi{
-int Coll_alltoallv_bruck::alltoallv(void *sendbuf, int *sendcounts, int *senddisps,
+int Coll_alltoallv_bruck::alltoallv(const void *sendbuf, const int *sendcounts, const int *senddisps,
                                    MPI_Datatype sendtype, void *recvbuf,
                                    MPI_Datatype sendtype, void *recvbuf,
-                                   int *recvcounts, int *recvdisps, MPI_Datatype recvtype,
+                                   const int *recvcounts,const int *recvdisps, MPI_Datatype recvtype,
                                    MPI_Comm comm)
 {
   int system_tag = COLL_TAG_ALLTOALLV;
                                    MPI_Comm comm)
 {
   int system_tag = COLL_TAG_ALLTOALLV;
index 501d15e..5b646c6 100644 (file)
@@ -17,9 +17,9 @@
 namespace simgrid{
 namespace smpi{
 int
 namespace simgrid{
 namespace smpi{
 int
-Coll_alltoallv_ompi_basic_linear::alltoallv(void *sbuf, int *scounts, int *sdisps,
+Coll_alltoallv_ompi_basic_linear::alltoallv(const void *sbuf, const int *scounts, const int *sdisps,
                                             MPI_Datatype sdtype,
                                             MPI_Datatype sdtype,
-                                            void *rbuf, int *rcounts, int *rdisps,
+                                            void *rbuf, const int *rcounts, const int *rdisps,
                                             MPI_Datatype rdtype,
                                             MPI_Comm comm)
 {
                                             MPI_Datatype rdtype,
                                             MPI_Comm comm)
 {
index 4a529a6..f171d0f 100644 (file)
@@ -30,9 +30,9 @@
 namespace simgrid{
 namespace smpi{
 int
 namespace simgrid{
 namespace smpi{
 int
-Coll_alltoallv_pair_light_barrier::alltoallv(void *send_buff, int *send_counts, int *send_disps,
+Coll_alltoallv_pair_light_barrier::alltoallv(const void *send_buff, const int *send_counts, const int *send_disps,
                                             MPI_Datatype send_type,
                                             MPI_Datatype send_type,
-                                            void *recv_buff, int *recv_counts, int *recv_disps,
+                                            void *recv_buff, const int *recv_counts, const int *recv_disps,
                                             MPI_Datatype recv_type,
                                             MPI_Comm comm)
 {
                                             MPI_Datatype recv_type,
                                             MPI_Comm comm)
 {
index 4624cb0..2055ef1 100644 (file)
@@ -30,9 +30,9 @@
 namespace simgrid{
 namespace smpi{
 int
 namespace simgrid{
 namespace smpi{
 int
-Coll_alltoallv_pair_mpi_barrier::alltoallv(void *send_buff, int *send_counts, int *send_disps,
+Coll_alltoallv_pair_mpi_barrier::alltoallv(const void *send_buff, const int *send_counts, const int *send_disps,
                                           MPI_Datatype send_type,
                                           MPI_Datatype send_type,
-                                          void *recv_buff, int *recv_counts, int *recv_disps,
+                                          void *recv_buff, const int *recv_counts, const int *recv_disps,
                                           MPI_Datatype recv_type, MPI_Comm comm)
 {
   MPI_Status s;
                                           MPI_Datatype recv_type, MPI_Comm comm)
 {
   MPI_Status s;
index 135afd0..dd5b2f7 100644 (file)
@@ -29,9 +29,9 @@
 namespace simgrid{
 namespace smpi{
 int
 namespace simgrid{
 namespace smpi{
 int
-Coll_alltoallv_pair_one_barrier::alltoallv(void *send_buff, int *send_counts, int *send_disps,
+Coll_alltoallv_pair_one_barrier::alltoallv(const void *send_buff, const int *send_counts, const int *send_disps,
                                           MPI_Datatype send_type,
                                           MPI_Datatype send_type,
-                                          void *recv_buff,  int *recv_counts, int *recv_disps,                                                                                  MPI_Datatype recv_type, MPI_Comm comm)
+                                          void *recv_buff,  const int *recv_counts, const int *recv_disps,                                                                                  MPI_Datatype recv_type, MPI_Comm comm)
 {
 
   MPI_Aint send_chunk, recv_chunk;
 {
 
   MPI_Aint send_chunk, recv_chunk;
index 78fef83..c3ed962 100644 (file)
@@ -29,9 +29,9 @@
  ****************************************************************************/
 namespace simgrid{
 namespace smpi{
  ****************************************************************************/
 namespace simgrid{
 namespace smpi{
-int Coll_alltoallv_pair::alltoallv(void *send_buff, int *send_counts, int *send_disps,
+int Coll_alltoallv_pair::alltoallv(const void *send_buff, const int *send_counts, const int *send_disps,
                                   MPI_Datatype send_type,
                                   MPI_Datatype send_type,
-                                  void *recv_buff, int *recv_counts, int *recv_disps,
+                                  void *recv_buff, const int *recv_counts, const int *recv_disps,
                                   MPI_Datatype recv_type, MPI_Comm comm)
 {
 
                                   MPI_Datatype recv_type, MPI_Comm comm)
 {
 
index ef6d087..a1773f1 100644 (file)
@@ -30,9 +30,9 @@
 namespace simgrid{
 namespace smpi{
 int
 namespace simgrid{
 namespace smpi{
 int
-Coll_alltoallv_ring_light_barrier::alltoallv(void *send_buff, int *send_counts, int *send_disps,
+Coll_alltoallv_ring_light_barrier::alltoallv(const void *send_buff, const int *send_counts, const int *send_disps,
                                             MPI_Datatype send_type,
                                             MPI_Datatype send_type,
-                                            void *recv_buff, int *recv_counts, int *recv_disps,
+                                            void *recv_buff, const int *recv_counts, const int *recv_disps,
                                             MPI_Datatype recv_type,
                                             MPI_Comm comm)
 {
                                             MPI_Datatype recv_type,
                                             MPI_Comm comm)
 {
index 8bcf2f4..211347b 100644 (file)
@@ -29,9 +29,9 @@
 namespace simgrid{
 namespace smpi{
 int
 namespace simgrid{
 namespace smpi{
 int
-Coll_alltoallv_ring_mpi_barrier::alltoallv(void *send_buff, int *send_counts, int *send_disps,
+Coll_alltoallv_ring_mpi_barrier::alltoallv(const void *send_buff, const int *send_counts, const int *send_disps,
                                           MPI_Datatype send_type,
                                           MPI_Datatype send_type,
-                                          void *recv_buff, int *recv_counts, int *recv_disps,
+                                          void *recv_buff, const int *recv_counts, const int *recv_disps,
                                           MPI_Datatype recv_type, MPI_Comm comm)
 {
   MPI_Status s;
                                           MPI_Datatype recv_type, MPI_Comm comm)
 {
   MPI_Status s;
index cb8e063..de58b9f 100644 (file)
@@ -28,9 +28,9 @@
 namespace simgrid{
 namespace smpi{
 int
 namespace simgrid{
 namespace smpi{
 int
-Coll_alltoallv_ring_one_barrier::alltoallv(void *send_buff, int *send_counts, int *send_disps,
+Coll_alltoallv_ring_one_barrier::alltoallv(const void *send_buff, const int *send_counts, const int *send_disps,
                                           MPI_Datatype send_type,
                                           MPI_Datatype send_type,
-                                          void *recv_buff, int *recv_counts, int *recv_disps,
+                                          void *recv_buff, const int *recv_counts, const int *recv_disps,
                                           MPI_Datatype recv_type, MPI_Comm comm)
 {
   MPI_Status s;
                                           MPI_Datatype recv_type, MPI_Comm comm)
 {
   MPI_Status s;
index 35bc4c7..88e27c0 100644 (file)
@@ -27,8 +27,8 @@
  ****************************************************************************/
 namespace simgrid{
 namespace smpi{
  ****************************************************************************/
 namespace simgrid{
 namespace smpi{
-int Coll_alltoallv_ring::alltoallv(void* send_buff, int* send_counts, int* send_disps, MPI_Datatype send_type,
-                                   void* recv_buff, int* recv_counts, int* recv_disps, MPI_Datatype recv_type,
+int Coll_alltoallv_ring::alltoallv(const void* send_buff, const int* send_counts, const int* send_disps, MPI_Datatype send_type,
+                                   void* recv_buff, const int* recv_counts, const int* recv_disps, MPI_Datatype recv_type,
                                    MPI_Comm comm)
 {
   MPI_Status s;
                                    MPI_Comm comm)
 {
   MPI_Status s;
index d4cdf81..7d0a4e3 100644 (file)
@@ -41,7 +41,7 @@
 #define MPIR_Gather_MV2_Direct Coll_gather_ompi_basic_linear::gather
 #define MPIR_Gather_MV2_two_level_Direct Coll_gather_ompi_basic_linear::gather
 #define MPIR_Gather_intra Coll_gather_mpich::gather
 #define MPIR_Gather_MV2_Direct Coll_gather_ompi_basic_linear::gather
 #define MPIR_Gather_MV2_two_level_Direct Coll_gather_ompi_basic_linear::gather
 #define MPIR_Gather_intra Coll_gather_mpich::gather
-typedef int (*MV2_Gather_function_ptr) (void *sendbuf,
+typedef int (*MV2_Gather_function_ptr) (const void *sendbuf,
     int sendcnt,
     MPI_Datatype sendtype,
     void *recvbuf,
     int sendcnt,
     MPI_Datatype sendtype,
     void *recvbuf,
@@ -80,7 +80,7 @@ namespace smpi{
  *                      intra node gather function
  * errflag           - (out) to record errors
  */
  *                      intra node gather function
  * errflag           - (out) to record errors
  */
-static int MPIR_pt_pt_intra_gather( void *sendbuf, int sendcnt, MPI_Datatype sendtype,
+static int MPIR_pt_pt_intra_gather( const void *sendbuf, int sendcnt, MPI_Datatype sendtype,
                             void *recvbuf, int recvcnt, MPI_Datatype recvtype,
                             int root, int rank,
                             void *tmp_buf, int nbytes,
                             void *recvbuf, int recvcnt, MPI_Datatype recvtype,
                             int root, int rank,
                             void *tmp_buf, int nbytes,
@@ -127,7 +127,7 @@ static int MPIR_pt_pt_intra_gather( void *sendbuf, int sendcnt, MPI_Datatype sen
 
 
 
 
 
 
-int Coll_gather_mvapich2_two_level::gather(void *sendbuf,
+int Coll_gather_mvapich2_two_level::gather(const void *sendbuf,
                                             int sendcnt,
                                             MPI_Datatype sendtype,
                                             void *recvbuf,
                                             int sendcnt,
                                             MPI_Datatype sendtype,
                                             void *recvbuf,
index 7ee16c2..c81c7b8 100644 (file)
@@ -25,7 +25,7 @@
 namespace simgrid{
 namespace smpi{
 
 namespace simgrid{
 namespace smpi{
 
-int Coll_gather_ompi_binomial::gather(void* sbuf, int scount, MPI_Datatype sdtype, void* rbuf, int rcount,
+int Coll_gather_ompi_binomial::gather(const void* sbuf, int scount, MPI_Datatype sdtype, void* rbuf, int rcount,
                                       MPI_Datatype rdtype, int root, MPI_Comm comm)
 {
     int line = -1;
                                       MPI_Datatype rdtype, int root, MPI_Comm comm)
 {
     int line = -1;
@@ -199,7 +199,7 @@ int Coll_gather_ompi_binomial::gather(void* sbuf, int scount, MPI_Datatype sdtyp
  *  Accepts:  - same arguments as MPI_Gather(), first segment size
  *  Returns:  - MPI_SUCCESS or error code
  */
  *  Accepts:  - same arguments as MPI_Gather(), first segment size
  *  Returns:  - MPI_SUCCESS or error code
  */
-int Coll_gather_ompi_linear_sync::gather(void *sbuf, int scount,
+int Coll_gather_ompi_linear_sync::gather(const void *sbuf, int scount,
                                          MPI_Datatype sdtype,
                                          void *rbuf, int rcount,
                                          MPI_Datatype rdtype,
                                          MPI_Datatype sdtype,
                                          void *rbuf, int rcount,
                                          MPI_Datatype rdtype,
@@ -247,7 +247,7 @@ int Coll_gather_ompi_linear_sync::gather(void *sbuf, int scount,
        first_segment_count = scount;
        COLL_TUNED_COMPUTED_SEGCOUNT((size_t)first_segment_size, typelng, first_segment_count);
 
        first_segment_count = scount;
        COLL_TUNED_COMPUTED_SEGCOUNT((size_t)first_segment_size, typelng, first_segment_count);
 
-       Request::recv(sbuf, 0, MPI_BYTE, root, COLL_TAG_GATHER, comm, MPI_STATUS_IGNORE);
+       Request::recv(const_cast<void*>(sbuf), 0, MPI_BYTE, root, COLL_TAG_GATHER, comm, MPI_STATUS_IGNORE);
 
        Request::send(sbuf, first_segment_count, sdtype, root, COLL_TAG_GATHER, comm);
 
 
        Request::send(sbuf, first_segment_count, sdtype, root, COLL_TAG_GATHER, comm);
 
@@ -352,7 +352,7 @@ int Coll_gather_ompi_linear_sync::gather(void *sbuf, int scount,
  *  Accepts:  - same arguments as MPI_Gather()
  *  Returns:  - MPI_SUCCESS or error code
  */
  *  Accepts:  - same arguments as MPI_Gather()
  *  Returns:  - MPI_SUCCESS or error code
  */
-int Coll_gather_ompi_basic_linear::gather(void* sbuf, int scount, MPI_Datatype sdtype, void* rbuf, int rcount,
+int Coll_gather_ompi_basic_linear::gather(const void* sbuf, int scount, MPI_Datatype sdtype, void* rbuf, int rcount,
                                           MPI_Datatype rdtype, int root, MPI_Comm comm)
 {
     int i;
                                           MPI_Datatype rdtype, int root, MPI_Comm comm)
 {
     int i;
index 3f48c44..e07d5ac 100644 (file)
@@ -14,7 +14,7 @@ int reduce_NTSL_segment_size_in_byte = 8192;
 */
 namespace simgrid{
 namespace smpi{
 */
 namespace simgrid{
 namespace smpi{
-int Coll_reduce_NTSL::reduce(void *buf, void *rbuf, int count,
+int Coll_reduce_NTSL::reduce(const void *buf, void *rbuf, int count,
                                 MPI_Datatype datatype, MPI_Op op, int root,
                                 MPI_Comm comm)
 {
                                 MPI_Datatype datatype, MPI_Op op, int root,
                                 MPI_Comm comm)
 {
index d5a03ba..63454dc 100644 (file)
@@ -19,7 +19,7 @@ int reduce_arrival_pattern_aware_segment_size_in_byte = 8192;
 namespace simgrid{
 namespace smpi{
 /* Non-topology-specific pipelined linear-reduce function */
 namespace simgrid{
 namespace smpi{
 /* Non-topology-specific pipelined linear-reduce function */
-int Coll_reduce_arrival_pattern_aware::reduce(void *buf, void *rbuf,
+int Coll_reduce_arrival_pattern_aware::reduce(const void *buf, void *rbuf,
                                                  int count,
                                                  MPI_Datatype datatype,
                                                  MPI_Op op, int root,
                                                  int count,
                                                  MPI_Datatype datatype,
                                                  MPI_Op op, int root,
index 76dc6b6..df3bd42 100644 (file)
@@ -10,7 +10,7 @@
 //#include <star-reduction.c>
 namespace simgrid{
 namespace smpi{
 //#include <star-reduction.c>
 namespace simgrid{
 namespace smpi{
-int Coll_reduce_binomial::reduce(void *sendbuf, void *recvbuf, int count,
+int Coll_reduce_binomial::reduce(const void *sendbuf, void *recvbuf, int count,
                                     MPI_Datatype datatype, MPI_Op op, int root,
                                     MPI_Comm comm)
 {
                                     MPI_Datatype datatype, MPI_Op op, int root,
                                     MPI_Comm comm)
 {
index 46b0496..ef3ae9c 100644 (file)
@@ -9,7 +9,7 @@
 namespace simgrid{
 namespace smpi{
 int
 namespace simgrid{
 namespace smpi{
 int
-Coll_reduce_flat_tree::reduce(void *sbuf, void *rbuf, int count,
+Coll_reduce_flat_tree::reduce(const void *sbuf, void *rbuf, int count,
                                  MPI_Datatype dtype, MPI_Op op,
                                  int root, MPI_Comm comm)
 {
                                  MPI_Datatype dtype, MPI_Op op,
                                  int root, MPI_Comm comm)
 {
@@ -18,7 +18,7 @@ Coll_reduce_flat_tree::reduce(void *sbuf, void *rbuf, int count,
   int rank;
   MPI_Aint extent;
   char *origin = 0;
   int rank;
   MPI_Aint extent;
   char *origin = 0;
-  char *inbuf;
+  const char *inbuf;
   MPI_Status status;
 
   rank = comm->rank();
   MPI_Status status;
 
   rank = comm->rank();
@@ -50,7 +50,7 @@ Coll_reduce_flat_tree::reduce(void *sbuf, void *rbuf, int count,
 
   for (i = size - 2; i >= 0; --i) {
     if (rank == i)
 
   for (i = size - 2; i >= 0; --i) {
     if (rank == i)
-      inbuf = static_cast<char*>(sbuf);
+      inbuf = static_cast<const char*>(sbuf);
     else {
       Request::recv(origin, count, dtype, i, tag, comm, &status);
       inbuf = origin;
     else {
       Request::recv(origin, count, dtype, i, tag, comm, &status);
       inbuf = origin;
index 13454c2..25b6757 100644 (file)
@@ -119,7 +119,7 @@ static int MPIR_Reduce_knomial_trace(int root, int reduce_knomial_factor,
 namespace simgrid{
 namespace smpi{
 int Coll_reduce_mvapich2_knomial::reduce (
 namespace simgrid{
 namespace smpi{
 int Coll_reduce_mvapich2_knomial::reduce (
-        void *sendbuf,
+        const void *sendbuf,
         void *recvbuf,
         int count,
         MPI_Datatype datatype,
         void *recvbuf,
         int count,
         MPI_Datatype datatype,
index a10160d..e24faf6 100644 (file)
@@ -50,7 +50,7 @@
 #define MPIR_Reduce_redscat_gather_MV2 Coll_reduce_scatter_gather::reduce
 #define MPIR_Reduce_shmem_MV2 Coll_reduce_ompi_basic_linear::reduce
 
 #define MPIR_Reduce_redscat_gather_MV2 Coll_reduce_scatter_gather::reduce
 #define MPIR_Reduce_shmem_MV2 Coll_reduce_ompi_basic_linear::reduce
 
-extern int (*MV2_Reduce_function)( void *sendbuf,
+extern int (*MV2_Reduce_function)( const void *sendbuf,
     void *recvbuf,
     int count,
     MPI_Datatype datatype,
     void *recvbuf,
     int count,
     MPI_Datatype datatype,
@@ -58,7 +58,7 @@ extern int (*MV2_Reduce_function)( void *sendbuf,
     int root,
     MPI_Comm  comm_ptr);
 
     int root,
     MPI_Comm  comm_ptr);
 
-extern int (*MV2_Reduce_intra_function)( void *sendbuf,
+extern int (*MV2_Reduce_intra_function)( const void *sendbuf,
     void *recvbuf,
     int count,
     MPI_Datatype datatype,
     void *recvbuf,
     int count,
     MPI_Datatype datatype,
@@ -68,14 +68,14 @@ extern int (*MV2_Reduce_intra_function)( void *sendbuf,
 
 
 /*Fn pointers for collectives */
 
 
 /*Fn pointers for collectives */
-static int (*reduce_fn)(void *sendbuf,
+static int (*reduce_fn)(const void *sendbuf,
                              void *recvbuf,
                              int count,
                              MPI_Datatype datatype,
                              MPI_Op op, int root, MPI_Comm  comm);
 namespace simgrid{
 namespace smpi{
                              void *recvbuf,
                              int count,
                              MPI_Datatype datatype,
                              MPI_Op op, int root, MPI_Comm  comm);
 namespace simgrid{
 namespace smpi{
-int Coll_reduce_mvapich2_two_level::reduce( void *sendbuf,
+int Coll_reduce_mvapich2_two_level::reduce( const void *sendbuf,
                                      void *recvbuf,
                                      int count,
                                      MPI_Datatype datatype,
                                      void *recvbuf,
                                      int count,
                                      MPI_Datatype datatype,
index d6f2a85..ad11934 100644 (file)
@@ -25,7 +25,7 @@
 namespace simgrid{
 namespace smpi{
 
 namespace simgrid{
 namespace smpi{
 
-int smpi_coll_tuned_ompi_reduce_generic( void* sendbuf, void* recvbuf, int original_count,
+int smpi_coll_tuned_ompi_reduce_generic(const void* sendbuf, void* recvbuf, int original_count,
                                     MPI_Datatype datatype, MPI_Op  op,
                                     int root, MPI_Comm comm,
                                     ompi_coll_tree_t* tree, int count_by_segment,
                                     MPI_Datatype datatype, MPI_Op  op,
                                     int root, MPI_Comm comm,
                                     ompi_coll_tree_t* tree, int count_by_segment,
@@ -41,7 +41,7 @@ int smpi_coll_tuned_ompi_reduce_generic( void* sendbuf, void* recvbuf, int origi
  * for the first block: thus we must copy sendbuf to accumbuf on intermediate
  * to keep the optimized loop happy.
  */
  * for the first block: thus we must copy sendbuf to accumbuf on intermediate
  * to keep the optimized loop happy.
  */
-int smpi_coll_tuned_ompi_reduce_generic( void* sendbuf, void* recvbuf, int original_count,
+int smpi_coll_tuned_ompi_reduce_generic(const void* sendbuf, void* recvbuf, int original_count,
                                     MPI_Datatype datatype, MPI_Op  op,
                                     int root, MPI_Comm comm,
                                     ompi_coll_tree_t* tree, int count_by_segment,
                                     MPI_Datatype datatype, MPI_Op  op,
                                     int root, MPI_Comm comm,
                                     ompi_coll_tree_t* tree, int count_by_segment,
@@ -323,7 +323,7 @@ int smpi_coll_tuned_ompi_reduce_generic( void* sendbuf, void* recvbuf, int origi
 */
 
 
 */
 
 
-int Coll_reduce_ompi_chain::reduce( void *sendbuf, void *recvbuf, int count,
+int Coll_reduce_ompi_chain::reduce(const void *sendbuf, void *recvbuf, int count,
                                         MPI_Datatype datatype,
                                         MPI_Op  op, int root,
                                         MPI_Comm  comm
                                         MPI_Datatype datatype,
                                         MPI_Op  op, int root,
                                         MPI_Comm  comm
@@ -351,7 +351,7 @@ int Coll_reduce_ompi_chain::reduce( void *sendbuf, void *recvbuf, int count,
 }
 
 
 }
 
 
-int Coll_reduce_ompi_pipeline::reduce( void *sendbuf, void *recvbuf,
+int Coll_reduce_ompi_pipeline::reduce(const void *sendbuf, void *recvbuf,
                                            int count, MPI_Datatype datatype,
                                            MPI_Op  op, int root,
                                            MPI_Comm  comm  )
                                            int count, MPI_Datatype datatype,
                                            MPI_Op  op, int root,
                                            MPI_Comm  comm  )
@@ -395,7 +395,7 @@ int Coll_reduce_ompi_pipeline::reduce( void *sendbuf, void *recvbuf,
                                            segcount, 0);
 }
 
                                            segcount, 0);
 }
 
-int Coll_reduce_ompi_binary::reduce( void *sendbuf, void *recvbuf,
+int Coll_reduce_ompi_binary::reduce(const void *sendbuf, void *recvbuf,
                                          int count, MPI_Datatype datatype,
                                          MPI_Op  op, int root,
                                          MPI_Comm  comm)
                                          int count, MPI_Datatype datatype,
                                          MPI_Op  op, int root,
                                          MPI_Comm  comm)
@@ -425,7 +425,7 @@ int Coll_reduce_ompi_binary::reduce( void *sendbuf, void *recvbuf,
                                            segcount, 0);
 }
 
                                            segcount, 0);
 }
 
-int Coll_reduce_ompi_binomial::reduce( void *sendbuf, void *recvbuf,
+int Coll_reduce_ompi_binomial::reduce(const void *sendbuf, void *recvbuf,
                                            int count, MPI_Datatype datatype,
                                            MPI_Op  op, int root,
                                            MPI_Comm  comm)
                                            int count, MPI_Datatype datatype,
                                            MPI_Op  op, int root,
                                            MPI_Comm  comm)
@@ -472,7 +472,7 @@ int Coll_reduce_ompi_binomial::reduce( void *sendbuf, void *recvbuf,
  * Acecpts:       same as MPI_Reduce()
  * Returns:       MPI_SUCCESS or error code
  */
  * Acecpts:       same as MPI_Reduce()
  * Returns:       MPI_SUCCESS or error code
  */
-int Coll_reduce_ompi_in_order_binary::reduce( void *sendbuf, void *recvbuf,
+int Coll_reduce_ompi_in_order_binary::reduce(const void *sendbuf, void *recvbuf,
                                                   int count,
                                                   MPI_Datatype datatype,
                                                   MPI_Op  op, int root,
                                                   int count,
                                                   MPI_Datatype datatype,
                                                   MPI_Op  op, int root,
@@ -504,7 +504,7 @@ int Coll_reduce_ompi_in_order_binary::reduce( void *sendbuf, void *recvbuf,
        operations for non-commutative ops.
     */
     io_root = size - 1;
        operations for non-commutative ops.
     */
     io_root = size - 1;
-    use_this_sendbuf = sendbuf;
+    use_this_sendbuf = const_cast<void*>(sendbuf);
     use_this_recvbuf = recvbuf;
     if (io_root != root) {
         ptrdiff_t text, ext;
     use_this_recvbuf = recvbuf;
     if (io_root != root) {
         ptrdiff_t text, ext;
@@ -584,7 +584,7 @@ int Coll_reduce_ompi_in_order_binary::reduce( void *sendbuf, void *recvbuf,
  */
 
 int
  */
 
 int
-Coll_reduce_ompi_basic_linear::reduce(void *sbuf, void *rbuf, int count,
+Coll_reduce_ompi_basic_linear::reduce(const void *sbuf, void *rbuf, int count,
                                           MPI_Datatype dtype,
                                           MPI_Op op,
                                           int root,
                                           MPI_Datatype dtype,
                                           MPI_Op op,
                                           int root,
index 5b2f4b2..584ffd8 100644 (file)
@@ -517,7 +517,7 @@ static void MPI_I_do_op(void* b1, void* b2, void* rslt, int cnt,
 REDUCE_LIMITS
 namespace simgrid{
 namespace smpi{
 REDUCE_LIMITS
 namespace simgrid{
 namespace smpi{
-static int MPI_I_anyReduce(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, int is_all)
 {
   char *scr1buf, *scr2buf, *scr3buf, *xxx, *sendbuf, *recvbuf;
   int myrank, size, x_base, x_size, computed, idx;
 {
   char *scr1buf, *scr2buf, *scr3buf, *xxx, *sendbuf, *recvbuf;
   int myrank, size, x_base, x_size, computed, idx;
@@ -949,12 +949,12 @@ static int MPI_I_anyReduce(void* Sendbuf, void* Recvbuf, int count, MPI_Datatype
 #endif /*REDUCE_LIMITS*/
 
 
 #endif /*REDUCE_LIMITS*/
 
 
-int Coll_reduce_rab::reduce(void* Sendbuf, void* Recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm)
+int Coll_reduce_rab::reduce(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, 0) );
 }
 
-int Coll_allreduce_rab::allreduce(void* Sendbuf, void* Recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
+int Coll_allreduce_rab::allreduce(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, 1) );
 }
index 196fa20..5bfa4ed 100644 (file)
@@ -12,7 +12,7 @@
  */
 namespace simgrid{
 namespace smpi{
  */
 namespace simgrid{
 namespace smpi{
-int Coll_reduce_scatter_gather::reduce(void *sendbuf, void *recvbuf,
+int Coll_reduce_scatter_gather::reduce(const void *sendbuf, void *recvbuf,
                                           int count, MPI_Datatype datatype,
                                           MPI_Op op, int root, MPI_Comm comm)
 {
                                           int count, MPI_Datatype datatype,
                                           MPI_Op op, int root, MPI_Comm comm)
 {
index 5134808..a3a1c79 100644 (file)
@@ -24,7 +24,7 @@ static inline int MPIU_Mirror_permutation(unsigned int x, int bits)
 namespace simgrid{
 namespace smpi{
 
 namespace simgrid{
 namespace smpi{
 
-int Coll_reduce_scatter_mpich_pair::reduce_scatter(void *sendbuf, void *recvbuf, int recvcounts[],
+int Coll_reduce_scatter_mpich_pair::reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[],
                               MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 {
     int   rank, comm_size, i;
                               MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 {
     int   rank, comm_size, i;
@@ -93,11 +93,11 @@ int Coll_reduce_scatter_mpich_pair::reduce_scatter(void *sendbuf, void *recvbuf,
             if (is_commutative || (src < rank)) {
                 if (sendbuf != MPI_IN_PLACE) {
                   if (op != MPI_OP_NULL)
             if (is_commutative || (src < rank)) {
                 if (sendbuf != MPI_IN_PLACE) {
                   if (op != MPI_OP_NULL)
-                    op->apply(tmp_recvbuf, recvbuf, &recvcounts[rank], datatype);
+                    op->apply(tmp_recvbuf, recvbuf, &((const_cast<int*>(recvcounts))[rank]), datatype);
                 }
                 else {
                   if (op != MPI_OP_NULL)
                 }
                 else {
                   if (op != MPI_OP_NULL)
-                    op->apply(tmp_recvbuf, ((char*)recvbuf + disps[rank] * extent), &recvcounts[rank], datatype);
+                    op->apply(tmp_recvbuf, ((char*)recvbuf + disps[rank] * extent), &((const_cast<int*>(recvcounts))[rank]), datatype);
                   /* we can't store the result at the beginning of
                      recvbuf right here because there is useful data
                      there that other process/processes need. at the
                   /* we can't store the result at the beginning of
                      recvbuf right here because there is useful data
                      there that other process/processes need. at the
@@ -108,7 +108,7 @@ int Coll_reduce_scatter_mpich_pair::reduce_scatter(void *sendbuf, void *recvbuf,
             else {
                 if (sendbuf != MPI_IN_PLACE) {
                   if (op != MPI_OP_NULL)
             else {
                 if (sendbuf != MPI_IN_PLACE) {
                   if (op != MPI_OP_NULL)
-                    op->apply(recvbuf, tmp_recvbuf, &recvcounts[rank], datatype);
+                    op->apply(recvbuf, tmp_recvbuf, &((const_cast<int*>(recvcounts))[rank]), datatype);
                   /* copy result back into recvbuf */
                   mpi_errno =
                       Datatype::copy(tmp_recvbuf, recvcounts[rank], datatype, recvbuf, recvcounts[rank], datatype);
                   /* copy result back into recvbuf */
                   mpi_errno =
                       Datatype::copy(tmp_recvbuf, recvcounts[rank], datatype, recvbuf, recvcounts[rank], datatype);
@@ -117,7 +117,7 @@ int Coll_reduce_scatter_mpich_pair::reduce_scatter(void *sendbuf, void *recvbuf,
                 }
                 else {
                   if (op != MPI_OP_NULL)
                 }
                 else {
                   if (op != MPI_OP_NULL)
-                    op->apply(((char*)recvbuf + disps[rank] * extent), tmp_recvbuf, &recvcounts[rank], datatype);
+                    op->apply(((char*)recvbuf + disps[rank] * extent), tmp_recvbuf, &((const_cast<int*>(recvcounts))[rank]), datatype);
                   /* copy result back into recvbuf */
                   mpi_errno = Datatype::copy(tmp_recvbuf, recvcounts[rank], datatype,
                                              ((char*)recvbuf + disps[rank] * extent), recvcounts[rank], datatype);
                   /* copy result back into recvbuf */
                   mpi_errno = Datatype::copy(tmp_recvbuf, recvcounts[rank], datatype,
                                              ((char*)recvbuf + disps[rank] * extent), recvcounts[rank], datatype);
@@ -145,7 +145,7 @@ int Coll_reduce_scatter_mpich_pair::reduce_scatter(void *sendbuf, void *recvbuf,
 }
 
 
 }
 
 
-int Coll_reduce_scatter_mpich_noncomm::reduce_scatter(void *sendbuf, void *recvbuf, int recvcounts[],
+int Coll_reduce_scatter_mpich_noncomm::reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[],
                               MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 {
     int mpi_errno = MPI_SUCCESS;
                               MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -262,7 +262,7 @@ int Coll_reduce_scatter_mpich_noncomm::reduce_scatter(void *sendbuf, void *recvb
 
 
 
 
 
 
-int Coll_reduce_scatter_mpich_rdb::reduce_scatter(void *sendbuf, void *recvbuf, int recvcounts[],
+int Coll_reduce_scatter_mpich_rdb::reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[],
                               MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 {
     int   rank, comm_size, i;
                               MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 {
     int   rank, comm_size, i;
index 850fe90..3a7eb37 100644 (file)
@@ -44,9 +44,9 @@
 namespace simgrid{
 namespace smpi{
 int
 namespace simgrid{
 namespace smpi{
 int
-Coll_reduce_scatter_ompi_basic_recursivehalving::reduce_scatter(void *sbuf,
+Coll_reduce_scatter_ompi_basic_recursivehalving::reduce_scatter(const void *sbuf,
                                                             void *rbuf,
                                                             void *rbuf,
-                                                            int *rcounts,
+                                                            const int *rcounts,
                                                             MPI_Datatype dtype,
                                                             MPI_Op op,
                                                             MPI_Comm comm
                                                             MPI_Datatype dtype,
                                                             MPI_Op op,
                                                             MPI_Comm comm
@@ -362,7 +362,7 @@ Coll_reduce_scatter_ompi_basic_recursivehalving::reduce_scatter(void *sbuf,
  *
  */
 int
  *
  */
 int
-Coll_reduce_scatter_ompi_ring::reduce_scatter(void *sbuf, void *rbuf, int *rcounts,
+Coll_reduce_scatter_ompi_ring::reduce_scatter(const void *sbuf, void *rbuf, const int *rcounts,
                                           MPI_Datatype dtype,
                                           MPI_Op op,
                                           MPI_Comm comm
                                           MPI_Datatype dtype,
                                           MPI_Op op,
                                           MPI_Comm comm
@@ -483,7 +483,7 @@ Coll_reduce_scatter_ompi_ring::reduce_scatter(void *sbuf, void *rbuf, int *rcoun
            rbuf[prevblock] = inbuf[inbi ^ 0x1] (op) rbuf[prevblock]
         */
         tmprecv = accumbuf + (ptrdiff_t)displs[prevblock] * extent;
            rbuf[prevblock] = inbuf[inbi ^ 0x1] (op) rbuf[prevblock]
         */
         tmprecv = accumbuf + (ptrdiff_t)displs[prevblock] * extent;
-        if(op!=MPI_OP_NULL) op->apply( inbuf[inbi ^ 0x1], tmprecv, &(rcounts[prevblock]), dtype);
+        if(op!=MPI_OP_NULL) op->apply( inbuf[inbi ^ 0x1], tmprecv, &((const_cast<int*>(rcounts))[prevblock]), dtype);
 
         /* send previous block to send_to */
         Request::send(tmprecv, rcounts[prevblock], dtype, send_to,
 
         /* send previous block to send_to */
         Request::send(tmprecv, rcounts[prevblock], dtype, send_to,
@@ -497,7 +497,7 @@ Coll_reduce_scatter_ompi_ring::reduce_scatter(void *sbuf, void *rbuf, int *rcoun
     /* Apply operation on the last block (my block)
        rbuf[rank] = inbuf[inbi] (op) rbuf[rank] */
     tmprecv = accumbuf + (ptrdiff_t)displs[rank] * extent;
     /* Apply operation on the last block (my block)
        rbuf[rank] = inbuf[inbi] (op) rbuf[rank] */
     tmprecv = accumbuf + (ptrdiff_t)displs[rank] * extent;
-    if(op!=MPI_OP_NULL) op->apply( inbuf[inbi], tmprecv, &(rcounts[rank]), dtype);
+    if(op!=MPI_OP_NULL) op->apply( inbuf[inbi], tmprecv, &((const_cast<int*>(rcounts))[rank]), dtype);
 
     /* Copy result from tmprecv to rbuf */
     ret = Datatype::copy(tmprecv, rcounts[rank], dtype, (char*)rbuf, rcounts[rank], dtype);
 
     /* Copy result from tmprecv to rbuf */
     ret = Datatype::copy(tmprecv, rcounts[rank], dtype, (char*)rbuf, rcounts[rank], dtype);
index 3cb8003..c485a88 100644 (file)
 #define MPIR_Scatter_MV2_Binomial Coll_scatter_ompi_binomial::scatter
 #define MPIR_Scatter_MV2_Direct Coll_scatter_ompi_basic_linear::scatter
 
 #define MPIR_Scatter_MV2_Binomial Coll_scatter_ompi_binomial::scatter
 #define MPIR_Scatter_MV2_Direct Coll_scatter_ompi_basic_linear::scatter
 
-extern int (*MV2_Scatter_intra_function) (void *sendbuf, int sendcount, MPI_Datatype sendtype,
+extern int (*MV2_Scatter_intra_function) (const void *sendbuf, int sendcount, MPI_Datatype sendtype,
     void *recvbuf, int recvcount, MPI_Datatype recvtype,
     int root, MPI_Comm comm);
 
 namespace simgrid{
 namespace smpi{
 
     void *recvbuf, int recvcount, MPI_Datatype recvtype,
     int root, MPI_Comm comm);
 
 namespace simgrid{
 namespace smpi{
 
-int Coll_scatter_mvapich2_two_level_direct::scatter(void *sendbuf,
+int Coll_scatter_mvapich2_two_level_direct::scatter(const void *sendbuf,
                                       int sendcnt,
                                       MPI_Datatype sendtype,
                                       void *recvbuf,
                                       int sendcnt,
                                       MPI_Datatype sendtype,
                                       void *recvbuf,
@@ -223,7 +223,7 @@ int Coll_scatter_mvapich2_two_level_direct::scatter(void *sendbuf,
 }
 
 
 }
 
 
-int Coll_scatter_mvapich2_two_level_binomial::scatter(void *sendbuf,
+int Coll_scatter_mvapich2_two_level_binomial::scatter(const void *sendbuf,
                                         int sendcnt,
                                         MPI_Datatype sendtype,
                                         void *recvbuf,
                                         int sendcnt,
                                         MPI_Datatype sendtype,
                                         void *recvbuf,
index c4c41b0..5163124 100644 (file)
@@ -25,7 +25,7 @@
 namespace simgrid{
 namespace smpi{
 
 namespace simgrid{
 namespace smpi{
 
-int Coll_scatter_ompi_binomial::scatter(void* sbuf, int scount, MPI_Datatype sdtype, void* rbuf, int rcount,
+int Coll_scatter_ompi_binomial::scatter(const void* sbuf, int scount, MPI_Datatype sdtype, void* rbuf, int rcount,
                                         MPI_Datatype rdtype, int root, MPI_Comm comm)
 {
     int line = -1;
                                         MPI_Datatype rdtype, int root, MPI_Comm comm)
 {
     int line = -1;
@@ -191,7 +191,7 @@ int Coll_scatter_ompi_binomial::scatter(void* sbuf, int scount, MPI_Datatype sdt
  *  Accepts:  - same arguments as MPI_Scatter()
  *  Returns:  - MPI_SUCCESS or error code
  */
  *  Accepts:  - same arguments as MPI_Scatter()
  *  Returns:  - MPI_SUCCESS or error code
  */
-int Coll_scatter_ompi_basic_linear::scatter(void* sbuf, int scount, MPI_Datatype sdtype, void* rbuf, int rcount,
+int Coll_scatter_ompi_basic_linear::scatter(const void* sbuf, int scount, MPI_Datatype sdtype, void* rbuf, int rcount,
                                             MPI_Datatype rdtype, int root, MPI_Comm comm)
 {
     int i, rank, size, err;
                                             MPI_Datatype rdtype, int root, MPI_Comm comm)
 {
     int i, rank, size, err;
index 4f16a56..ffb2dd4 100644 (file)
@@ -115,9 +115,9 @@ void Colls::set_collectives(){
   }
 }
 
   }
 }
 
-//Implementations of the single algorith collectives
+//Implementations of the single algorithm collectives
 
 
-int Colls::gatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int *recvcounts, int *displs,
+int Colls::gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs,
                       MPI_Datatype recvtype, int root, MPI_Comm comm)
 {
   MPI_Request request;
                       MPI_Datatype recvtype, int root, MPI_Comm comm)
 {
   MPI_Request request;
@@ -126,7 +126,7 @@ int Colls::gatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *re
 }
 
 
 }
 
 
-int Colls::scatterv(void *sendbuf, int *sendcounts, int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount,
+int Colls::scatterv(const void *sendbuf, const int *sendcounts, const int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount,
                        MPI_Datatype recvtype, int root, MPI_Comm comm)
 {
   MPI_Request request;
                        MPI_Datatype recvtype, int root, MPI_Comm comm)
 {
   MPI_Request request;
@@ -135,7 +135,7 @@ int Colls::scatterv(void *sendbuf, int *sendcounts, int *displs, MPI_Datatype se
 }
 
 
 }
 
 
-int Colls::scan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
+int Colls::scan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 {
   int system_tag = -888;
   MPI_Aint lb      = 0;
 {
   int system_tag = -888;
   MPI_Aint lb      = 0;
@@ -196,7 +196,7 @@ int Colls::scan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-int Colls::exscan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
+int Colls::exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 {
   int system_tag = -888;
   MPI_Aint lb         = 0;
 {
   int system_tag = -888;
   MPI_Aint lb         = 0;
@@ -263,8 +263,8 @@ int Colls::exscan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-int Colls::alltoallw(void *sendbuf, int *sendcounts, int *senddisps, MPI_Datatype* sendtypes,
-                              void *recvbuf, int *recvcounts, int *recvdisps, MPI_Datatype* recvtypes, MPI_Comm comm)
+int Colls::alltoallw(const void *sendbuf, const int *sendcounts, const int *senddisps, const MPI_Datatype* sendtypes,
+                              void *recvbuf, const int *recvcounts, const int *recvdisps, const MPI_Datatype* recvtypes, MPI_Comm comm)
 {
   MPI_Request request;
   Colls::ialltoallw(sendbuf, sendcounts, senddisps, sendtypes, recvbuf, recvcounts, recvdisps, recvtypes, comm, &request);  
 {
   MPI_Request request;
   Colls::ialltoallw(sendbuf, sendcounts, senddisps, sendtypes, recvbuf, recvcounts, recvdisps, recvtypes, comm, &request);  
index 69b2029..8c5db82 100644 (file)
@@ -22,7 +22,7 @@ int Coll_barrier_default::barrier(MPI_Comm comm)
 }
 
 
 }
 
 
-int Coll_gather_default::gather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
+int Coll_gather_default::gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                      void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
 {
   MPI_Request request;
                      void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
 {
   MPI_Request request;
@@ -30,7 +30,7 @@ int Coll_gather_default::gather(void *sendbuf, int sendcount, MPI_Datatype sendt
   return Request::wait(&request, MPI_STATUS_IGNORE);
 }
 
   return Request::wait(&request, MPI_STATUS_IGNORE);
 }
 
-int Coll_reduce_scatter_default::reduce_scatter(void *sendbuf, void *recvbuf, int *recvcounts, MPI_Datatype datatype, MPI_Op op,
+int Coll_reduce_scatter_default::reduce_scatter(const void *sendbuf, void *recvbuf, const int *recvcounts, MPI_Datatype datatype, MPI_Op op,
                              MPI_Comm comm)
 {
   int rank = comm->rank();
                              MPI_Comm comm)
 {
   int rank = comm->rank();
@@ -54,7 +54,7 @@ int Coll_reduce_scatter_default::reduce_scatter(void *sendbuf, void *recvbuf, in
 }
 
 
 }
 
 
-int Coll_allgather_default::allgather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
+int Coll_allgather_default::allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                         void *recvbuf,int recvcount, MPI_Datatype recvtype, MPI_Comm comm)
 {
   MPI_Request request;
                         void *recvbuf,int recvcount, MPI_Datatype recvtype, MPI_Comm comm)
 {
   MPI_Request request;
@@ -62,8 +62,8 @@ int Coll_allgather_default::allgather(void *sendbuf, int sendcount, MPI_Datatype
   return Request::wait(&request, MPI_STATUS_IGNORE);
 }
 
   return Request::wait(&request, MPI_STATUS_IGNORE);
 }
 
-int Coll_allgatherv_default::allgatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
-                         int *recvcounts, int *displs, MPI_Datatype recvtype, MPI_Comm comm)
+int Coll_allgatherv_default::allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
+                         const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPI_Comm comm)
 {
   MPI_Request request;
   Colls::iallgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, &request);
 {
   MPI_Request request;
   Colls::iallgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, &request);
@@ -78,7 +78,7 @@ int Coll_allgatherv_default::allgatherv(void *sendbuf, int sendcount, MPI_Dataty
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-int Coll_scatter_default::scatter(void *sendbuf, int sendcount, MPI_Datatype sendtype,
+int Coll_scatter_default::scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                       void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
 {
   MPI_Request request;
                       void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
 {
   MPI_Request request;
@@ -86,7 +86,7 @@ int Coll_scatter_default::scatter(void *sendbuf, int sendcount, MPI_Datatype sen
   return Request::wait(&request, MPI_STATUS_IGNORE);
 }
 
   return Request::wait(&request, MPI_STATUS_IGNORE);
 }
 
-int Coll_reduce_default::reduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root,
+int Coll_reduce_default::reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root,
                      MPI_Comm comm)
 {
   //non commutative case, use a working algo from openmpi
                      MPI_Comm comm)
 {
   //non commutative case, use a working algo from openmpi
@@ -98,7 +98,7 @@ int Coll_reduce_default::reduce(void *sendbuf, void *recvbuf, int count, MPI_Dat
   return Request::wait(&request, MPI_STATUS_IGNORE);
 }
 
   return Request::wait(&request, MPI_STATUS_IGNORE);
 }
 
-int Coll_allreduce_default::allreduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
+int Coll_allreduce_default::allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 {
   //FIXME: have mpi_ireduce and iallreduce handle derived datatypes correctly
   if(datatype->flags() & DT_FLAG_DERIVED)
 {
   //FIXME: have mpi_ireduce and iallreduce handle derived datatypes correctly
   if(datatype->flags() & DT_FLAG_DERIVED)
@@ -110,13 +110,13 @@ int Coll_allreduce_default::allreduce(void *sendbuf, void *recvbuf, int count, M
   return ret;
 }
 
   return ret;
 }
 
-int Coll_alltoall_default::alltoall( void *sbuf, int scount, MPI_Datatype sdtype, void* rbuf, int rcount, MPI_Datatype rdtype, MPI_Comm comm)
+int Coll_alltoall_default::alltoall(const void *sbuf, int scount, MPI_Datatype sdtype, void* rbuf, int rcount, MPI_Datatype rdtype, MPI_Comm comm)
 {
   return Coll_alltoall_ompi::alltoall(sbuf, scount, sdtype, rbuf, rcount, rdtype, comm);
 }
 
 {
   return Coll_alltoall_ompi::alltoall(sbuf, scount, sdtype, rbuf, rcount, rdtype, comm);
 }
 
-int Coll_alltoallv_default::alltoallv(void *sendbuf, int *sendcounts, int *senddisps, MPI_Datatype sendtype,
-                              void *recvbuf, int *recvcounts, int *recvdisps, MPI_Datatype recvtype, MPI_Comm comm)
+int Coll_alltoallv_default::alltoallv(const void *sendbuf, const int *sendcounts, const int *senddisps, MPI_Datatype sendtype,
+                              void *recvbuf, const int *recvcounts, const int *recvdisps, MPI_Datatype recvtype, MPI_Comm comm)
 {
   MPI_Request request;
   Colls::ialltoallv(sendbuf, sendcounts, senddisps, sendtype, recvbuf, recvcounts, recvdisps, recvtype, comm, &request);
 {
   MPI_Request request;
   Colls::ialltoallv(sendbuf, sendcounts, senddisps, sendtype, recvbuf, recvcounts, recvdisps, recvtype, comm, &request);
index 5166533..26bdbf4 100644 (file)
@@ -50,7 +50,7 @@ MPI_Allreduce
 namespace simgrid{
 namespace smpi{
 
 namespace simgrid{
 namespace smpi{
 
-int (*intel_allreduce_functions_table[])(void *sendbuf,
+int (*intel_allreduce_functions_table[])(const void *sendbuf,
       void *recvbuf,
       int count,
       MPI_Datatype datatype,
       void *recvbuf,
       int count,
       MPI_Datatype datatype,
@@ -634,7 +634,7 @@ intel_tuning_table_element intel_alltoall_table[] =
   }
   }
 };
   }
   }
 };
-int (*intel_alltoall_functions_table[])(void *sbuf, int scount,
+int (*intel_alltoall_functions_table[])(const void *sbuf, int scount,
                                              MPI_Datatype sdtype,
                                              void* rbuf, int rcount,
                                              MPI_Datatype rdtype,
                                              MPI_Datatype sdtype,
                                              void* rbuf, int rcount,
                                              MPI_Datatype rdtype,
@@ -967,7 +967,7 @@ MPI_Reduce
 
 */
 
 
 */
 
-int (*intel_reduce_functions_table[])(void *sendbuf, void *recvbuf,
+int (*intel_reduce_functions_table[])(const void *sendbuf, void *recvbuf,
                                             int count, MPI_Datatype  datatype,
                                             MPI_Op   op, int root,
                                             MPI_Comm   comm) ={
                                             int count, MPI_Datatype  datatype,
                                             MPI_Op   op, int root,
                                             MPI_Comm   comm) ={
@@ -1055,8 +1055,8 @@ MPI_Reduce_scatter
 5. Topology aware Reduce + Scatterv algorithm
 
 */
 5. Topology aware Reduce + Scatterv algorithm
 
 */
-static  int intel_reduce_scatter_reduce_scatterv(void *sbuf, void *rbuf,
-                                                    int *rcounts,
+static  int intel_reduce_scatter_reduce_scatterv(const void *sbuf, void *rbuf,
+                                                    const int *rcounts,
                                                     MPI_Datatype dtype,
                                                     MPI_Op  op,
                                                     MPI_Comm  comm)
                                                     MPI_Datatype dtype,
                                                     MPI_Op  op,
                                                     MPI_Comm  comm)
@@ -1065,8 +1065,8 @@ static  int intel_reduce_scatter_reduce_scatterv(void *sbuf, void *rbuf,
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-static  int  intel_reduce_scatter_recursivehalving(void *sbuf, void *rbuf,
-                                                    int *rcounts,
+static  int  intel_reduce_scatter_recursivehalving(const void *sbuf, void *rbuf,
+                                                    const int *rcounts,
                                                     MPI_Datatype dtype,
                                                     MPI_Op  op,
                                                     MPI_Comm  comm)
                                                     MPI_Datatype dtype,
                                                     MPI_Op  op,
                                                     MPI_Comm  comm)
@@ -1077,8 +1077,8 @@ static  int  intel_reduce_scatter_recursivehalving(void *sbuf, void *rbuf,
     return Coll_reduce_scatter_mvapich2::reduce_scatter(sbuf, rbuf, rcounts,dtype, op,comm);
 }
 
     return Coll_reduce_scatter_mvapich2::reduce_scatter(sbuf, rbuf, rcounts,dtype, op,comm);
 }
 
-int (*intel_reduce_scatter_functions_table[])( void *sbuf, void *rbuf,
-                                                    int *rcounts,
+int (*intel_reduce_scatter_functions_table[])( const void *sbuf, void *rbuf,
+                                                    const int *rcounts,
                                                     MPI_Datatype dtype,
                                                     MPI_Op  op,
                                                     MPI_Comm  comm
                                                     MPI_Datatype dtype,
                                                     MPI_Op  op,
                                                     MPI_Comm  comm
@@ -1487,7 +1487,7 @@ MPI_Allgather
 
 */
 
 
 */
 
-int (*intel_allgather_functions_table[])(void *sbuf, int scount,
+int (*intel_allgather_functions_table[])(const void *sbuf, int scount,
                                               MPI_Datatype sdtype,
                                               void* rbuf, int rcount,
                                               MPI_Datatype rdtype,
                                               MPI_Datatype sdtype,
                                               void* rbuf, int rcount,
                                               MPI_Datatype rdtype,
@@ -1656,10 +1656,10 @@ MPI_Allgatherv
 
 */
 
 
 */
 
-int (*intel_allgatherv_functions_table[])(void *sbuf, int scount,
+int (*intel_allgatherv_functions_table[])(const void *sbuf, int scount,
                                                MPI_Datatype sdtype,
                                                MPI_Datatype sdtype,
-                                               void* rbuf, int *rcounts,
-                                               int *rdispls,
+                                               void* rbuf, const int *rcounts,
+                                               const int *rdispls,
                                                MPI_Datatype rdtype,
                                                MPI_Comm  comm
                                                     ) ={
                                                MPI_Datatype rdtype,
                                                MPI_Comm  comm
                                                     ) ={
@@ -1867,7 +1867,7 @@ MPI_Gather
 
 */
 
 
 */
 
-int (*intel_gather_functions_table[])(void *sbuf, int scount,
+int (*intel_gather_functions_table[])(const void *sbuf, int scount,
                                            MPI_Datatype sdtype,
                                            void* rbuf, int rcount,
                                            MPI_Datatype rdtype,
                                            MPI_Datatype sdtype,
                                            void* rbuf, int rcount,
                                            MPI_Datatype rdtype,
@@ -1971,7 +1971,7 @@ MPI_Scatter
 
 */
 
 
 */
 
-int (*intel_scatter_functions_table[])(void *sbuf, int scount,
+int (*intel_scatter_functions_table[])(const void *sbuf, int scount,
                                             MPI_Datatype sdtype,
                                             void* rbuf, int rcount,
                                             MPI_Datatype rdtype,
                                             MPI_Datatype sdtype,
                                             void* rbuf, int rcount,
                                             MPI_Datatype rdtype,
@@ -2145,9 +2145,9 @@ MPI_Alltoallv
 
 */
 
 
 */
 
-int (*intel_alltoallv_functions_table[])(void *sbuf, int *scounts, int *sdisps,
+int (*intel_alltoallv_functions_table[])(const void *sbuf, const int *scounts, const int *sdisps,
                                               MPI_Datatype sdtype,
                                               MPI_Datatype sdtype,
-                                              void *rbuf, int *rcounts, int *rdisps,
+                                              void *rbuf, const int *rcounts, const int *rdisps,
                                               MPI_Datatype rdtype,
                                               MPI_Comm  comm
                                                     ) ={
                                               MPI_Datatype rdtype,
                                               MPI_Comm  comm
                                                     ) ={
index 6cf26f2..5e0dd82 100644 (file)
@@ -58,7 +58,7 @@
 */
 namespace simgrid{
 namespace smpi{
 */
 namespace simgrid{
 namespace smpi{
-int Coll_allreduce_mpich::allreduce(void *sbuf, void *rbuf, int count,
+int Coll_allreduce_mpich::allreduce(const void *sbuf, void *rbuf, int count,
                         MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
 {
     size_t dsize, block_dsize;
                         MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
 {
     size_t dsize, block_dsize;
@@ -138,7 +138,7 @@ int Coll_allreduce_mpich::allreduce(void *sbuf, void *rbuf, int count,
    End Algorithm: MPI_Alltoall
 */
 
    End Algorithm: MPI_Alltoall
 */
 
-int Coll_alltoall_mpich::alltoall( void *sbuf, int scount,
+int Coll_alltoall_mpich::alltoall(const void *sbuf, int scount,
                                              MPI_Datatype sdtype,
                                              void* rbuf, int rcount,
                                              MPI_Datatype rdtype,
                                              MPI_Datatype sdtype,
                                              void* rbuf, int rcount,
                                              MPI_Datatype rdtype,
@@ -187,9 +187,9 @@ int Coll_alltoall_mpich::alltoall( void *sbuf, int scount,
                                                     comm);
 }
 
                                                     comm);
 }
 
-int Coll_alltoallv_mpich::alltoallv(void *sbuf, int *scounts, int *sdisps,
+int Coll_alltoallv_mpich::alltoallv(const void *sbuf, const int *scounts, const int *sdisps,
                                               MPI_Datatype sdtype,
                                               MPI_Datatype sdtype,
-                                              void *rbuf, int *rcounts, int *rdisps,
+                                              void *rbuf, const int *rcounts, const int *rdisps,
                                               MPI_Datatype rdtype,
                                               MPI_Comm  comm
                                               )
                                               MPI_Datatype rdtype,
                                               MPI_Comm  comm
                                               )
@@ -353,7 +353,7 @@ int Coll_bcast_mpich::bcast(void *buff, int count,
 */
 
 
 */
 
 
-int Coll_reduce_mpich::reduce( void *sendbuf, void *recvbuf,
+int Coll_reduce_mpich::reduce(const void *sendbuf, void *recvbuf,
                                             int count, MPI_Datatype  datatype,
                                             MPI_Op   op, int root,
                                             MPI_Comm   comm
                                             int count, MPI_Datatype  datatype,
                                             MPI_Op   op, int root,
                                             MPI_Comm   comm
@@ -436,8 +436,8 @@ int Coll_reduce_mpich::reduce( void *sendbuf, void *recvbuf,
 */
 
 
 */
 
 
-int Coll_reduce_scatter_mpich::reduce_scatter( void *sbuf, void *rbuf,
-                                                    int *rcounts,
+int Coll_reduce_scatter_mpich::reduce_scatter(const void *sbuf, void *rbuf,
+                                                    const int *rcounts,
                                                     MPI_Datatype dtype,
                                                     MPI_Op  op,
                                                     MPI_Comm  comm
                                                     MPI_Datatype dtype,
                                                     MPI_Op  op,
                                                     MPI_Comm  comm
@@ -532,7 +532,7 @@ int Coll_reduce_scatter_mpich::reduce_scatter( void *sbuf, void *rbuf,
    End Algorithm: MPI_Allgather
 */
 
    End Algorithm: MPI_Allgather
 */
 
-int Coll_allgather_mpich::allgather(void *sbuf, int scount,
+int Coll_allgather_mpich::allgather(const void *sbuf, int scount,
                                               MPI_Datatype sdtype,
                                               void* rbuf, int rcount,
                                               MPI_Datatype rdtype,
                                               MPI_Datatype sdtype,
                                               void* rbuf, int rcount,
                                               MPI_Datatype rdtype,
@@ -610,10 +610,10 @@ int Coll_allgather_mpich::allgather(void *sbuf, int scount,
 
    End Algorithm: MPI_Allgatherv
 */
 
    End Algorithm: MPI_Allgatherv
 */
-int Coll_allgatherv_mpich::allgatherv(void *sbuf, int scount,
+int Coll_allgatherv_mpich::allgatherv(const void *sbuf, int scount,
                                                MPI_Datatype sdtype,
                                                MPI_Datatype sdtype,
-                                               void* rbuf, int *rcounts,
-                                               int *rdispls,
+                                               void* rbuf, const int *rcounts,
+                                               const int *rdispls,
                                                MPI_Datatype rdtype,
                                                MPI_Comm  comm
                                                )
                                                MPI_Datatype rdtype,
                                                MPI_Comm  comm
                                                )
@@ -668,7 +668,7 @@ int Coll_allgatherv_mpich::allgatherv(void *sbuf, int scount,
    End Algorithm: MPI_Gather
 */
 
    End Algorithm: MPI_Gather
 */
 
-int Coll_gather_mpich::gather(void *sbuf, int scount,
+int Coll_gather_mpich::gather(const void *sbuf, int scount,
                                            MPI_Datatype sdtype,
                                            void* rbuf, int rcount,
                                            MPI_Datatype rdtype,
                                            MPI_Datatype sdtype,
                                            void* rbuf, int rcount,
                                            MPI_Datatype rdtype,
@@ -703,7 +703,7 @@ int Coll_gather_mpich::gather(void *sbuf, int scount,
 */
 
 
 */
 
 
-int Coll_scatter_mpich::scatter(void *sbuf, int scount,
+int Coll_scatter_mpich::scatter(const void *sbuf, int scount,
                                             MPI_Datatype sdtype,
                                             void* rbuf, int rcount,
                                             MPI_Datatype rdtype,
                                             MPI_Datatype sdtype,
                                             void* rbuf, int rcount,
                                             MPI_Datatype rdtype,
@@ -719,7 +719,7 @@ int Coll_scatter_mpich::scatter(void *sbuf, int scount,
                                                        rbuf, rcount, rdtype,
                                                        root, comm);
   if(comm->rank()!=root){
                                                        rbuf, rcount, rdtype,
                                                        root, comm);
   if(comm->rank()!=root){
-      xbt_free(sbuf);
+      xbt_free(const_cast<void*>(sbuf));
   }
   return ret;
 }
   }
   return ret;
 }
index 549f5a9..6812846 100644 (file)
@@ -14,7 +14,7 @@ namespace simgrid{
 namespace smpi{
 
 
 namespace smpi{
 
 
-int Coll_alltoall_mvapich2::alltoall( void *sendbuf, int sendcount,
+int Coll_alltoall_mvapich2::alltoall( const void *sendbuf, int sendcount,
     MPI_Datatype sendtype,
     void* recvbuf, int recvcount,
     MPI_Datatype recvtype,
     MPI_Datatype sendtype,
     void* recvbuf, int recvcount,
     MPI_Datatype recvtype,
@@ -84,7 +84,7 @@ int Coll_alltoall_mvapich2::alltoall( void *sendbuf, int sendcount,
   return (mpi_errno);
 }
 
   return (mpi_errno);
 }
 
-int Coll_allgather_mvapich2::allgather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
+int Coll_allgather_mvapich2::allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
     void *recvbuf, int recvcount, MPI_Datatype recvtype,
     MPI_Comm comm)
 {
     void *recvbuf, int recvcount, MPI_Datatype recvtype,
     MPI_Comm comm)
 {
@@ -185,7 +185,7 @@ int Coll_allgather_mvapich2::allgather(void *sendbuf, int sendcount, MPI_Datatyp
   return mpi_errno;
 }
 
   return mpi_errno;
 }
 
-int Coll_gather_mvapich2::gather(void *sendbuf,
+int Coll_gather_mvapich2::gather(const void *sendbuf,
     int sendcnt,
     MPI_Datatype sendtype,
     void *recvbuf,
     int sendcnt,
     MPI_Datatype sendtype,
     void *recvbuf,
@@ -259,8 +259,8 @@ int Coll_gather_mvapich2::gather(void *sendbuf,
   return mpi_errno;
 }
 
   return mpi_errno;
 }
 
-int Coll_allgatherv_mvapich2::allgatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
-    void *recvbuf, int *recvcounts, int *displs,
+int Coll_allgatherv_mvapich2::allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
+    void *recvbuf, const int *recvcounts, const int *displs,
     MPI_Datatype recvtype, MPI_Comm  comm )
 {
   int mpi_errno = MPI_SUCCESS;
     MPI_Datatype recvtype, MPI_Comm  comm )
 {
   int mpi_errno = MPI_SUCCESS;
@@ -321,7 +321,7 @@ int Coll_allgatherv_mvapich2::allgatherv(void *sendbuf, int sendcount, MPI_Datat
 
 
 
 
 
 
-int Coll_allreduce_mvapich2::allreduce(void *sendbuf,
+int Coll_allreduce_mvapich2::allreduce(const void *sendbuf,
     void *recvbuf,
     int count,
     MPI_Datatype datatype,
     void *recvbuf,
     int count,
     MPI_Datatype datatype,
@@ -440,9 +440,9 @@ int Coll_allreduce_mvapich2::allreduce(void *sendbuf,
 }
 
 
 }
 
 
-int Coll_alltoallv_mvapich2::alltoallv(void *sbuf, int *scounts, int *sdisps,
+int Coll_alltoallv_mvapich2::alltoallv(const void *sbuf, const int *scounts, const int *sdisps,
     MPI_Datatype sdtype,
     MPI_Datatype sdtype,
-    void *rbuf, int *rcounts, int *rdisps,
+    void *rbuf, const int *rcounts, const int *rdisps,
     MPI_Datatype rdtype,
     MPI_Comm  comm
 )
     MPI_Datatype rdtype,
     MPI_Comm  comm
 )
@@ -662,7 +662,7 @@ int Coll_bcast_mvapich2::bcast(void *buffer,
 
 
 
 
 
 
-int Coll_reduce_mvapich2::reduce( void *sendbuf,
+int Coll_reduce_mvapich2::reduce(const void *sendbuf,
     void *recvbuf,
     int count,
     MPI_Datatype datatype,
     void *recvbuf,
     int count,
     MPI_Datatype datatype,
@@ -780,7 +780,7 @@ int Coll_reduce_mvapich2::reduce( void *sendbuf,
 }
 
 
 }
 
 
-int Coll_reduce_scatter_mvapich2::reduce_scatter(void *sendbuf, void *recvbuf, int *recvcnts,
+int Coll_reduce_scatter_mvapich2::reduce_scatter(const void *sendbuf, void *recvbuf, const int *recvcnts,
     MPI_Datatype datatype, MPI_Op op,
     MPI_Comm comm)
 {
     MPI_Datatype datatype, MPI_Op op,
     MPI_Comm comm)
 {
@@ -855,7 +855,7 @@ int Coll_reduce_scatter_mvapich2::reduce_scatter(void *sendbuf, void *recvbuf, i
 
 
 
 
 
 
-int Coll_scatter_mvapich2::scatter(void *sendbuf,
+int Coll_scatter_mvapich2::scatter(const void *sendbuf,
     int sendcnt,
     MPI_Datatype sendtype,
     void *recvbuf,
     int sendcnt,
     MPI_Datatype sendtype,
     void *recvbuf,
index e6dfc43..9762cf2 100644 (file)
@@ -21,7 +21,7 @@ XBT_PUBLIC void smpi_coll_cleanup_mvapich2(void);
 struct mv2_alltoall_tuning_element {
   int min;
   int max;
 struct mv2_alltoall_tuning_element {
   int min;
   int max;
-  int (*MV2_pt_Alltoall_function)(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+  int (*MV2_pt_Alltoall_function)(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
                                   MPI_Datatype recvtype, MPI_Comm comm_ptr);
 };
 
                                   MPI_Datatype recvtype, MPI_Comm comm_ptr);
 };
 
@@ -32,7 +32,7 @@ struct mv2_alltoall_tuning_table {
   mv2_alltoall_tuning_element in_place_algo_table[MV2_MAX_NB_THRESHOLDS];
 };
 
   mv2_alltoall_tuning_element in_place_algo_table[MV2_MAX_NB_THRESHOLDS];
 };
 
-int (*MV2_Alltoall_function)(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+int (*MV2_Alltoall_function)(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
                              MPI_Datatype recvtype, MPI_Comm comm_ptr) = NULL;
 
 /* Indicates number of processes per node */
                              MPI_Datatype recvtype, MPI_Comm comm_ptr) = NULL;
 
 /* Indicates number of processes per node */
@@ -333,7 +333,7 @@ static void init_mv2_alltoall_tables_stampede()
 struct mv2_allgather_tuning_element {
   int min;
   int max;
 struct mv2_allgather_tuning_element {
   int min;
   int max;
-  int (*MV2_pt_Allgatherction)(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+  int (*MV2_pt_Allgatherction)(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
                                MPI_Datatype recvtype, MPI_Comm comm_ptr);
 };
 
                                MPI_Datatype recvtype, MPI_Comm comm_ptr);
 };
 
@@ -344,7 +344,7 @@ struct mv2_allgather_tuning_table {
   mv2_allgather_tuning_element inter_leader[MV2_MAX_NB_THRESHOLDS];
 };
 
   mv2_allgather_tuning_element inter_leader[MV2_MAX_NB_THRESHOLDS];
 };
 
-int (*MV2_Allgatherction)(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+int (*MV2_Allgatherction)(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
                           MPI_Datatype recvtype, MPI_Comm comm);
 
 int* mv2_allgather_table_ppn_conf                           = NULL;
                           MPI_Datatype recvtype, MPI_Comm comm);
 
 int* mv2_allgather_table_ppn_conf                           = NULL;
@@ -352,7 +352,7 @@ int mv2_allgather_num_ppn_conf                              = 1;
 int* mv2_size_allgather_tuning_table                        = NULL;
 mv2_allgather_tuning_table** mv2_allgather_thresholds_table = NULL;
 
 int* mv2_size_allgather_tuning_table                        = NULL;
 mv2_allgather_tuning_table** mv2_allgather_thresholds_table = NULL;
 
-static int MPIR_Allgather_RD_Allgather_Comm_MV2(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
+static int MPIR_Allgather_RD_Allgather_Comm_MV2(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
                                                 int recvcount, MPI_Datatype recvtype, MPI_Comm comm_ptr)
 {
   return 0;
                                                 int recvcount, MPI_Datatype recvtype, MPI_Comm comm_ptr)
 {
   return 0;
@@ -562,7 +562,7 @@ static void init_mv2_allgather_tables_stampede()
 struct mv2_gather_tuning_element {
   int min;
   int max;
 struct mv2_gather_tuning_element {
   int min;
   int max;
-  int (*MV2_pt_Gather_function)(void* sendbuf, int sendcnt, MPI_Datatype sendtype, void* recvbuf, int recvcnt,
+  int (*MV2_pt_Gather_function)(const void* sendbuf, int sendcnt, MPI_Datatype sendtype, void* recvbuf, int recvcnt,
                                 MPI_Datatype recvtype, int root, MPI_Comm comm_ptr);
 };
 
                                 MPI_Datatype recvtype, int root, MPI_Comm comm_ptr);
 };
 
@@ -577,7 +577,7 @@ struct mv2_gather_tuning_table {
 int mv2_size_gather_tuning_table                     = 7;
 mv2_gather_tuning_table* mv2_gather_thresholds_table = NULL;
 
 int mv2_size_gather_tuning_table                     = 7;
 mv2_gather_tuning_table* mv2_gather_thresholds_table = NULL;
 
-typedef int (*MV2_Gather_function_ptr)(void* sendbuf, int sendcnt, MPI_Datatype sendtype, void* recvbuf, int recvcnt,
+typedef int (*MV2_Gather_function_ptr)(const void* sendbuf, int sendcnt, MPI_Datatype sendtype, void* recvbuf, int recvcnt,
                                        MPI_Datatype recvtype, int root, MPI_Comm comm);
 
 MV2_Gather_function_ptr MV2_Gather_inter_leader_function = NULL;
                                        MPI_Datatype recvtype, int root, MPI_Comm comm);
 
 MV2_Gather_function_ptr MV2_Gather_inter_leader_function = NULL;
@@ -652,8 +652,8 @@ static void init_mv2_gather_tables_stampede()
 struct mv2_allgatherv_tuning_element {
   int min;
   int max;
 struct mv2_allgatherv_tuning_element {
   int min;
   int max;
-  int (*MV2_pt_Allgatherv_function)(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int* recvcounts,
-                                    int* displs, MPI_Datatype recvtype, MPI_Comm commg);
+  int (*MV2_pt_Allgatherv_function)(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, const int* recvcounts,
+                                    const int* displs, MPI_Datatype recvtype, MPI_Comm commg);
 };
 
 struct mv2_allgatherv_tuning_table {
 };
 
 struct mv2_allgatherv_tuning_table {
@@ -662,8 +662,8 @@ struct mv2_allgatherv_tuning_table {
   mv2_allgatherv_tuning_element inter_leader[MV2_MAX_NB_THRESHOLDS];
 };
 
   mv2_allgatherv_tuning_element inter_leader[MV2_MAX_NB_THRESHOLDS];
 };
 
-int (*MV2_Allgatherv_function)(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int* recvcounts,
-                               int* displs, MPI_Datatype recvtype, MPI_Comm comm);
+int (*MV2_Allgatherv_function)(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, const int* recvcounts,
+                               const int* displs, MPI_Datatype recvtype, MPI_Comm comm);
 
 int mv2_size_allgatherv_tuning_table                         = 0;
 mv2_allgatherv_tuning_table* mv2_allgatherv_thresholds_table = NULL;
 
 int mv2_size_allgatherv_tuning_table                         = 0;
 mv2_allgatherv_tuning_table* mv2_allgatherv_thresholds_table = NULL;
@@ -731,7 +731,7 @@ static void init_mv2_allgatherv_tables_stampede()
 struct mv2_allreduce_tuning_element {
   int min;
   int max;
 struct mv2_allreduce_tuning_element {
   int min;
   int max;
-  int (*MV2_pt_Allreducection)(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
+  int (*MV2_pt_Allreducection)(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
                                MPI_Comm comm);
 };
 
                                MPI_Comm comm);
 };
 
@@ -745,35 +745,35 @@ struct mv2_allreduce_tuning_table {
   mv2_allreduce_tuning_element intra_node[MV2_MAX_NB_THRESHOLDS];
 };
 
   mv2_allreduce_tuning_element intra_node[MV2_MAX_NB_THRESHOLDS];
 };
 
-int (*MV2_Allreducection)(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
+int (*MV2_Allreducection)(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
                           MPI_Comm comm) = NULL;
 
                           MPI_Comm comm) = NULL;
 
-int (*MV2_Allreduce_intra_function)(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
+int (*MV2_Allreduce_intra_function)(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
                                     MPI_Comm comm) = NULL;
 
 int mv2_size_allreduce_tuning_table                        = 0;
 mv2_allreduce_tuning_table* mv2_allreduce_thresholds_table = NULL;
 
                                     MPI_Comm comm) = NULL;
 
 int mv2_size_allreduce_tuning_table                        = 0;
 mv2_allreduce_tuning_table* mv2_allreduce_thresholds_table = NULL;
 
-static int MPIR_Allreduce_mcst_reduce_two_level_helper_MV2(void* sendbuf, void* recvbuf, int count,
+static int MPIR_Allreduce_mcst_reduce_two_level_helper_MV2(const void* sendbuf, void* recvbuf, int count,
                                                            MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 {
   return 0;
 }
 
                                                            MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 {
   return 0;
 }
 
-static int MPIR_Allreduce_mcst_reduce_redscat_gather_MV2(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype,
+static int MPIR_Allreduce_mcst_reduce_redscat_gather_MV2(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype,
                                                          MPI_Op op, MPI_Comm comm)
 {
   return 0;
 }
 
                                                          MPI_Op op, MPI_Comm comm)
 {
   return 0;
 }
 
-static int MPIR_Allreduce_reduce_p2p_MV2(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
+static int MPIR_Allreduce_reduce_p2p_MV2(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
                                          MPI_Comm comm)
 {
   simgrid::smpi::Colls::reduce(sendbuf, recvbuf, count, datatype, op, 0, comm);
   return MPI_SUCCESS;
 }
 
                                          MPI_Comm comm)
 {
   simgrid::smpi::Colls::reduce(sendbuf, recvbuf, count, datatype, op, 0, comm);
   return MPI_SUCCESS;
 }
 
-static int MPIR_Allreduce_reduce_shmem_MV2(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
+static int MPIR_Allreduce_reduce_shmem_MV2(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
                                            MPI_Comm comm)
 {
   simgrid::smpi::Colls::reduce(sendbuf, recvbuf, count, datatype, op, 0, comm);
                                            MPI_Comm comm)
 {
   simgrid::smpi::Colls::reduce(sendbuf, recvbuf, count, datatype, op, 0, comm);
@@ -1149,7 +1149,7 @@ static void init_mv2_bcast_tables_stampede()
 struct mv2_reduce_tuning_element {
   int min;
   int max;
 struct mv2_reduce_tuning_element {
   int min;
   int max;
-  int (*MV2_pt_Reduce_function)(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root,
+  int (*MV2_pt_Reduce_function)(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root,
                                 MPI_Comm comm_ptr);
 };
 
                                 MPI_Comm comm_ptr);
 };
 
@@ -1170,10 +1170,10 @@ mv2_reduce_tuning_table* mv2_reduce_thresholds_table = NULL;
 int mv2_reduce_intra_knomial_factor = -1;
 int mv2_reduce_inter_knomial_factor = -1;
 
 int mv2_reduce_intra_knomial_factor = -1;
 int mv2_reduce_inter_knomial_factor = -1;
 
-int (*MV2_Reduce_function)(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root,
+int (*MV2_Reduce_function)(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root,
                            MPI_Comm comm_ptr) = NULL;
 
                            MPI_Comm comm_ptr) = NULL;
 
-int (*MV2_Reduce_intra_function)(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root,
+int (*MV2_Reduce_intra_function)(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root,
                                  MPI_Comm comm_ptr) = NULL;
 
 #define MPIR_Reduce_inter_knomial_wrapper_MV2 simgrid::smpi::Coll_reduce_mvapich2_knomial::reduce
                                  MPI_Comm comm_ptr) = NULL;
 
 #define MPIR_Reduce_inter_knomial_wrapper_MV2 simgrid::smpi::Coll_reduce_mvapich2_knomial::reduce
@@ -1381,7 +1381,7 @@ static void init_mv2_reduce_tables_stampede()
 struct mv2_red_scat_tuning_element {
   int min;
   int max;
 struct mv2_red_scat_tuning_element {
   int min;
   int max;
-  int (*MV2_pt_Red_scat_function)(void* sendbuf, void* recvbuf, int* recvcnts, MPI_Datatype datatype, MPI_Op op,
+  int (*MV2_pt_Red_scat_function)(const void* sendbuf, void* recvbuf, const int* recvcnts, MPI_Datatype datatype, MPI_Op op,
                                   MPI_Comm comm_ptr);
 };
 
                                   MPI_Comm comm_ptr);
 };
 
@@ -1394,10 +1394,10 @@ struct mv2_red_scat_tuning_table {
 int mv2_size_red_scat_tuning_table                       = 0;
 mv2_red_scat_tuning_table* mv2_red_scat_thresholds_table = NULL;
 
 int mv2_size_red_scat_tuning_table                       = 0;
 mv2_red_scat_tuning_table* mv2_red_scat_thresholds_table = NULL;
 
-int (*MV2_Red_scat_function)(void* sendbuf, void* recvbuf, int* recvcnts, MPI_Datatype datatype, MPI_Op op,
+int (*MV2_Red_scat_function)(const void* sendbuf, void* recvbuf, const int* recvcnts, MPI_Datatype datatype, MPI_Op op,
                              MPI_Comm comm_ptr);
 
                              MPI_Comm comm_ptr);
 
-static int MPIR_Reduce_Scatter_Basic_MV2(void* sendbuf, void* recvbuf, int* recvcnts, MPI_Datatype datatype, MPI_Op op,
+static int MPIR_Reduce_Scatter_Basic_MV2(const void* sendbuf, void* recvbuf, const int* recvcnts, MPI_Datatype datatype, MPI_Op op,
                                          MPI_Comm comm)
 {
   simgrid::smpi::Coll_reduce_scatter_default::reduce_scatter(sendbuf, recvbuf, recvcnts, datatype, op, comm);
                                          MPI_Comm comm)
 {
   simgrid::smpi::Coll_reduce_scatter_default::reduce_scatter(sendbuf, recvbuf, recvcnts, datatype, op, comm);
@@ -1473,7 +1473,7 @@ static void init_mv2_reduce_scatter_tables_stampede()
 struct mv2_scatter_tuning_element {
   int min;
   int max;
 struct mv2_scatter_tuning_element {
   int min;
   int max;
-  int (*MV2_pt_Scatter_function)(void* sendbuf, int sendcnt, MPI_Datatype sendtype, void* recvbuf, int recvcnt,
+  int (*MV2_pt_Scatter_function)(const void* sendbuf, int sendcnt, MPI_Datatype sendtype, void* recvbuf, int recvcnt,
                                  MPI_Datatype recvtype, int root, MPI_Comm comm);
 };
 
                                  MPI_Datatype recvtype, int root, MPI_Comm comm);
 };
 
@@ -1490,15 +1490,15 @@ int mv2_scatter_num_ppn_conf                            = 1;
 int* mv2_size_scatter_tuning_table                      = NULL;
 mv2_scatter_tuning_table** mv2_scatter_thresholds_table = NULL;
 
 int* mv2_size_scatter_tuning_table                      = NULL;
 mv2_scatter_tuning_table** mv2_scatter_thresholds_table = NULL;
 
-int (*MV2_Scatter_function)(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+int (*MV2_Scatter_function)(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
                             MPI_Datatype recvtype, int root, MPI_Comm comm) = NULL;
 
                             MPI_Datatype recvtype, int root, MPI_Comm comm) = NULL;
 
-int (*MV2_Scatter_intra_function)(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+int (*MV2_Scatter_intra_function)(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
                                   MPI_Datatype recvtype, int root, MPI_Comm comm) = NULL;
                                   MPI_Datatype recvtype, int root, MPI_Comm comm) = NULL;
-int MPIR_Scatter_mcst_wrap_MV2(void* sendbuf, int sendcnt, MPI_Datatype sendtype, void* recvbuf, int recvcnt,
+int MPIR_Scatter_mcst_wrap_MV2(const void* sendbuf, int sendcnt, MPI_Datatype sendtype, void* recvbuf, int recvcnt,
                                MPI_Datatype recvtype, int root, MPI_Comm comm_ptr);
 
                                MPI_Datatype recvtype, int root, MPI_Comm comm_ptr);
 
-int MPIR_Scatter_mcst_wrap_MV2(void* sendbuf, int sendcnt, MPI_Datatype sendtype, void* recvbuf, int recvcnt,
+int MPIR_Scatter_mcst_wrap_MV2(const void* sendbuf, int sendcnt, MPI_Datatype sendtype, void* recvbuf, int recvcnt,
                                MPI_Datatype recvtype, int root, MPI_Comm comm_ptr)
 {
   return 0;
                                MPI_Datatype recvtype, int root, MPI_Comm comm_ptr)
 {
   return 0;
index b8de308..4193b13 100644 (file)
@@ -69,7 +69,7 @@ int Colls::ibcast(void *buf, int count, MPI_Datatype datatype, int root, MPI_Com
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-int Colls::iallgather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
+int Colls::iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                         void *recvbuf,int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request* request)
 {
 
                         void *recvbuf,int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request* request)
 {
 
@@ -103,7 +103,7 @@ int Colls::iallgather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-int Colls::iscatter(void *sendbuf, int sendcount, MPI_Datatype sendtype,
+int Colls::iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                       void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request* request)
 {
   const int system_tag = COLL_TAG_SCATTER;
                       void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request* request)
 {
   const int system_tag = COLL_TAG_SCATTER;
@@ -123,7 +123,7 @@ int Colls::iscatter(void *sendbuf, int sendcount, MPI_Datatype sendtype,
     sendtype->extent(&lb, &sendext);
     // Local copy from root
     if(recvbuf!=MPI_IN_PLACE){
     sendtype->extent(&lb, &sendext);
     // Local copy from root
     if(recvbuf!=MPI_IN_PLACE){
-        Datatype::copy(static_cast<char *>(sendbuf) + root * sendcount * sendext,
+        Datatype::copy(static_cast<const char *>(sendbuf) + root * sendcount * sendext,
                            sendcount, sendtype, recvbuf, recvcount, recvtype);
     }
     // Send buffers to receivers
                            sendcount, sendtype, recvbuf, recvcount, recvtype);
     }
     // Send buffers to receivers
@@ -131,7 +131,7 @@ int Colls::iscatter(void *sendbuf, int sendcount, MPI_Datatype sendtype,
     int index = 0;
     for(int dst = 0; dst < size; dst++) {
       if(dst != root) {
     int index = 0;
     for(int dst = 0; dst < size; dst++) {
       if(dst != root) {
-        requests[index] = Request::isend_init(static_cast<char *>(sendbuf) + dst * sendcount * sendext, sendcount, sendtype,
+        requests[index] = Request::isend_init(static_cast<const char *>(sendbuf) + dst * sendcount * sendext, sendcount, sendtype,
                                           dst, system_tag, comm);
         index++;
       }
                                           dst, system_tag, comm);
         index++;
       }
@@ -143,8 +143,8 @@ int Colls::iscatter(void *sendbuf, int sendcount, MPI_Datatype sendtype,
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-int Colls::iallgatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
-                         int *recvcounts, int *displs, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request* request)
+int Colls::iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
+                         const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request* request)
 {
   const int system_tag = COLL_TAG_ALLGATHERV;
   MPI_Aint lb = 0;
 {
   const int system_tag = COLL_TAG_ALLGATHERV;
   MPI_Aint lb = 0;
@@ -177,7 +177,7 @@ int Colls::iallgatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype, void
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-int Colls::ialltoall( void *sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request* request){
+int Colls::ialltoall( const void *sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request* request){
   int system_tag   = COLL_TAG_ALLTOALL;
   MPI_Aint lb      = 0;
   MPI_Aint sendext = 0;
   int system_tag   = COLL_TAG_ALLTOALL;
   MPI_Aint lb      = 0;
   MPI_Aint sendext = 0;
@@ -191,7 +191,7 @@ int Colls::ialltoall( void *sendbuf, int sendcount, MPI_Datatype sendtype, void*
   sendtype->extent(&lb, &sendext);
   recvtype->extent(&lb, &recvext);
   /* simple optimization */
   sendtype->extent(&lb, &sendext);
   recvtype->extent(&lb, &recvext);
   /* simple optimization */
-  int err = Datatype::copy(static_cast<char *>(sendbuf) + rank * sendcount * sendext, sendcount, sendtype,
+  int err = Datatype::copy(static_cast<const char *>(sendbuf) + rank * sendcount * sendext, sendcount, sendtype,
                                static_cast<char *>(recvbuf) + rank * recvcount * recvext, recvcount, recvtype);
   if (err == MPI_SUCCESS && size > 1) {
     /* Initiate all send/recv to/from others. */
                                static_cast<char *>(recvbuf) + rank * recvcount * recvext, recvcount, recvtype);
   if (err == MPI_SUCCESS && size > 1) {
     /* Initiate all send/recv to/from others. */
@@ -209,7 +209,7 @@ int Colls::ialltoall( void *sendbuf, int sendcount, MPI_Datatype sendtype, void*
      * TODO: check the previous assertion
      */
     for (int i = (rank + size - 1) % size; i != rank; i = (i + size - 1) % size) {
      * TODO: check the previous assertion
      */
     for (int i = (rank + size - 1) % size; i != rank; i = (i + size - 1) % size) {
-      requests[count] = Request::isend_init(static_cast<char *>(sendbuf) + i * sendcount * sendext, sendcount,
+      requests[count] = Request::isend_init(static_cast<const char *>(sendbuf) + i * sendcount * sendext, sendcount,
                                         sendtype, i, system_tag, comm);
       count++;
     }
                                         sendtype, i, system_tag, comm);
       count++;
     }
@@ -220,8 +220,8 @@ int Colls::ialltoall( void *sendbuf, int sendcount, MPI_Datatype sendtype, void*
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-int Colls::ialltoallv(void *sendbuf, int *sendcounts, int *senddisps, MPI_Datatype sendtype,
-                              void *recvbuf, int *recvcounts, int *recvdisps, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request){
+int Colls::ialltoallv(const void *sendbuf, const int *sendcounts, const int *senddisps, MPI_Datatype sendtype,
+                              void *recvbuf, const int *recvcounts, const int *recvdisps, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request){
   const int system_tag = COLL_TAG_ALLTOALLV;
   MPI_Aint lb = 0;
   MPI_Aint sendext = 0;
   const int system_tag = COLL_TAG_ALLTOALLV;
   MPI_Aint lb = 0;
   MPI_Aint sendext = 0;
@@ -235,7 +235,7 @@ int Colls::ialltoallv(void *sendbuf, int *sendcounts, int *senddisps, MPI_Dataty
   sendtype->extent(&lb, &sendext);
   recvtype->extent(&lb, &recvext);
   /* Local copy from self */
   sendtype->extent(&lb, &sendext);
   recvtype->extent(&lb, &recvext);
   /* Local copy from self */
-  int err = Datatype::copy(static_cast<char *>(sendbuf) + senddisps[rank] * sendext, sendcounts[rank], sendtype,
+  int err = Datatype::copy(static_cast<const char *>(sendbuf) + senddisps[rank] * sendext, sendcounts[rank], sendtype,
                                static_cast<char *>(recvbuf) + recvdisps[rank] * recvext, recvcounts[rank], recvtype);
   if (err == MPI_SUCCESS && size > 1) {
     /* Initiate all send/recv to/from others. */
                                static_cast<char *>(recvbuf) + recvdisps[rank] * recvext, recvcounts[rank], recvtype);
   if (err == MPI_SUCCESS && size > 1) {
     /* Initiate all send/recv to/from others. */
@@ -254,7 +254,7 @@ int Colls::ialltoallv(void *sendbuf, int *sendcounts, int *senddisps, MPI_Dataty
     /* Now create all sends  */
     for (int i = 0; i < size; ++i) {
       if (i != rank) {
     /* Now create all sends  */
     for (int i = 0; i < size; ++i) {
       if (i != rank) {
-      requests[count] = Request::isend_init(static_cast<char *>(sendbuf) + senddisps[i] * sendext,
+      requests[count] = Request::isend_init(static_cast<const char *>(sendbuf) + senddisps[i] * sendext,
                                         sendcounts[i], sendtype, i, system_tag, comm);
       count++;
       }else{
                                         sendcounts[i], sendtype, i, system_tag, comm);
       count++;
       }else{
@@ -268,8 +268,8 @@ int Colls::ialltoallv(void *sendbuf, int *sendcounts, int *senddisps, MPI_Dataty
   return err;
 }
 
   return err;
 }
 
-int Colls::ialltoallw(void *sendbuf, int *sendcounts, int *senddisps, MPI_Datatype* sendtypes,
-                              void *recvbuf, int *recvcounts, int *recvdisps, MPI_Datatype* recvtypes, MPI_Comm comm, MPI_Request *request){
+int Colls::ialltoallw(const void *sendbuf, const int *sendcounts, const int *senddisps, const MPI_Datatype* sendtypes,
+                              void *recvbuf, const int *recvcounts, const int *recvdisps, const MPI_Datatype* recvtypes, MPI_Comm comm, MPI_Request *request){
   const int system_tag = COLL_TAG_ALLTOALLV;
 
   /* Initialize. */
   const int system_tag = COLL_TAG_ALLTOALLV;
 
   /* Initialize. */
@@ -278,7 +278,7 @@ int Colls::ialltoallw(void *sendbuf, int *sendcounts, int *senddisps, MPI_Dataty
   (*request) = new Request( nullptr, 0, MPI_BYTE,
                          rank,rank, system_tag, comm, MPI_REQ_PERSISTENT);
   /* Local copy from self */
   (*request) = new Request( nullptr, 0, MPI_BYTE,
                          rank,rank, system_tag, comm, MPI_REQ_PERSISTENT);
   /* Local copy from self */
-  int err = (sendcounts[rank]>0 && recvcounts[rank]) ? Datatype::copy(static_cast<char *>(sendbuf) + senddisps[rank], sendcounts[rank], sendtypes[rank],
+  int err = (sendcounts[rank]>0 && recvcounts[rank]) ? Datatype::copy(static_cast<const char *>(sendbuf) + senddisps[rank], sendcounts[rank], sendtypes[rank],
                                static_cast<char *>(recvbuf) + recvdisps[rank], recvcounts[rank], recvtypes[rank]): MPI_SUCCESS;
   if (err == MPI_SUCCESS && size > 1) {
     /* Initiate all send/recv to/from others. */
                                static_cast<char *>(recvbuf) + recvdisps[rank], recvcounts[rank], recvtypes[rank]): MPI_SUCCESS;
   if (err == MPI_SUCCESS && size > 1) {
     /* Initiate all send/recv to/from others. */
@@ -297,7 +297,7 @@ int Colls::ialltoallw(void *sendbuf, int *sendcounts, int *senddisps, MPI_Dataty
     /* Now create all sends  */
     for (int i = 0; i < size; ++i) {
       if (i != rank) {
     /* Now create all sends  */
     for (int i = 0; i < size; ++i) {
       if (i != rank) {
-      requests[count] = Request::isend_init(static_cast<char *>(sendbuf) + senddisps[i] ,
+      requests[count] = Request::isend_init(static_cast<const char *>(sendbuf) + senddisps[i] ,
                                         sendcounts[i], sendtypes[i], i, system_tag, comm);
       count++;
       }else{
                                         sendcounts[i], sendtypes[i], i, system_tag, comm);
       count++;
       }else{
@@ -311,7 +311,7 @@ int Colls::ialltoallw(void *sendbuf, int *sendcounts, int *senddisps, MPI_Dataty
   return err;
 }
 
   return err;
 }
 
-int Colls::igather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
+int Colls::igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                      void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request)
 {
   const int system_tag = COLL_TAG_GATHER;
                      void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request)
 {
   const int system_tag = COLL_TAG_GATHER;
@@ -349,7 +349,7 @@ int Colls::igather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-int Colls::igatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int *recvcounts, int *displs,
+int Colls::igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs,
                       MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request)
 {
   int system_tag = COLL_TAG_GATHERV;
                       MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request)
 {
   int system_tag = COLL_TAG_GATHERV;
@@ -386,7 +386,7 @@ int Colls::igatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *r
   }
   return MPI_SUCCESS;
 }
   }
   return MPI_SUCCESS;
 }
-int Colls::iscatterv(void *sendbuf, int *sendcounts, int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount,
+int Colls::iscatterv(const void *sendbuf, const int *sendcounts, const int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount,
                        MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request)
 {
   int system_tag = COLL_TAG_SCATTERV;
                        MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request)
 {
   int system_tag = COLL_TAG_SCATTERV;
@@ -406,7 +406,7 @@ int Colls::iscatterv(void *sendbuf, int *sendcounts, int *displs, MPI_Datatype s
     sendtype->extent(&lb, &sendext);
     // Local copy from root
     if(recvbuf!=MPI_IN_PLACE){
     sendtype->extent(&lb, &sendext);
     // Local copy from root
     if(recvbuf!=MPI_IN_PLACE){
-      Datatype::copy(static_cast<char *>(sendbuf) + displs[root] * sendext, sendcounts[root],
+      Datatype::copy(static_cast<const char *>(sendbuf) + displs[root] * sendext, sendcounts[root],
                        sendtype, recvbuf, recvcount, recvtype);
     }
     // Send buffers to receivers
                        sendtype, recvbuf, recvcount, recvtype);
     }
     // Send buffers to receivers
@@ -414,7 +414,7 @@ int Colls::iscatterv(void *sendbuf, int *sendcounts, int *displs, MPI_Datatype s
     int index = 0;
     for (int dst = 0; dst < size; dst++) {
       if (dst != root) {
     int index = 0;
     for (int dst = 0; dst < size; dst++) {
       if (dst != root) {
-        requests[index] = Request::isend_init(static_cast<char *>(sendbuf) + displs[dst] * sendext, sendcounts[dst],
+        requests[index] = Request::isend_init(static_cast<const char *>(sendbuf) + displs[dst] * sendext, sendcounts[dst],
                             sendtype, dst, system_tag, comm);
         index++;
       }
                             sendtype, dst, system_tag, comm);
         index++;
       }
@@ -426,14 +426,14 @@ int Colls::iscatterv(void *sendbuf, int *sendcounts, int *displs, MPI_Datatype s
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-int Colls::ireduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root,
+int Colls::ireduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root,
                      MPI_Comm comm, MPI_Request* request)
 {
   const int system_tag = COLL_TAG_REDUCE;
   MPI_Aint lb = 0;
   MPI_Aint dataext = 0;
 
                      MPI_Comm comm, MPI_Request* request)
 {
   const int system_tag = COLL_TAG_REDUCE;
   MPI_Aint lb = 0;
   MPI_Aint dataext = 0;
 
-  char* sendtmpbuf = static_cast<char *>(sendbuf);
+  void* sendtmpbuf = const_cast<void *>(sendbuf);
 
   int rank = comm->rank();
   int size = comm->size();
 
   int rank = comm->rank();
   int size = comm->size();
@@ -442,7 +442,7 @@ int Colls::ireduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatyp
     return MPI_ERR_COMM;
 
   if( sendbuf == MPI_IN_PLACE ) {
     return MPI_ERR_COMM;
 
   if( sendbuf == MPI_IN_PLACE ) {
-    sendtmpbuf = static_cast<char *>(smpi_get_tmp_sendbuffer(count*datatype->get_extent()));
+    sendtmpbuf = static_cast<void *>(smpi_get_tmp_sendbuffer(count*datatype->get_extent()));
     Datatype::copy(recvbuf, count, datatype,sendtmpbuf, count, datatype);
   }
 
     Datatype::copy(recvbuf, count, datatype,sendtmpbuf, count, datatype);
   }
 
@@ -484,7 +484,7 @@ int Colls::ireduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatyp
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-int Colls::iallreduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
+int Colls::iallreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
                       MPI_Op op, MPI_Comm comm, MPI_Request* request)
 {
 
                       MPI_Op op, MPI_Comm comm, MPI_Request* request)
 {
 
@@ -517,7 +517,7 @@ int Colls::iallreduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype data
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-int Colls::iscan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request* request)
+int Colls::iscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request* request)
 {
   int system_tag = -888;
   MPI_Aint lb      = 0;
 {
   int system_tag = -888;
   MPI_Aint lb      = 0;
@@ -549,7 +549,7 @@ int Colls::iscan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-int Colls::iexscan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request* request)
+int Colls::iexscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request* request)
 {
   int system_tag = -888;
   MPI_Aint lb         = 0;
 {
   int system_tag = -888;
   MPI_Aint lb         = 0;
@@ -579,7 +579,7 @@ int Colls::iexscan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatyp
   return MPI_SUCCESS;
 }
 
   return MPI_SUCCESS;
 }
 
-int Colls::ireduce_scatter(void *sendbuf, void *recvbuf, int *recvcounts, MPI_Datatype datatype, MPI_Op op,
+int Colls::ireduce_scatter(const void *sendbuf, void *recvbuf, const int *recvcounts, MPI_Datatype datatype, MPI_Op op,
                              MPI_Comm comm, MPI_Request* request){
 //Version where each process performs the reduce for its own part. Alltoall pattern for comms.
   const int system_tag = COLL_TAG_REDUCE_SCATTER;
                              MPI_Comm comm, MPI_Request* request){
 //Version where each process performs the reduce for its own part. Alltoall pattern for comms.
   const int system_tag = COLL_TAG_REDUCE_SCATTER;
@@ -599,14 +599,14 @@ int Colls::ireduce_scatter(void *sendbuf, void *recvbuf, int *recvcounts, MPI_Da
   int recvdisp=0;
   for (int other = 0; other < size; other++) {
     if(other != rank) {
   int recvdisp=0;
   for (int other = 0; other < size; other++) {
     if(other != rank) {
-      requests[index] = Request::isend_init(static_cast<char *>(sendbuf) + recvdisp * dataext, recvcounts[other], datatype, other, system_tag,comm);
+      requests[index] = Request::isend_init(static_cast<const char *>(sendbuf) + recvdisp * dataext, recvcounts[other], datatype, other, system_tag,comm);
       XBT_VERB("sending with recvdisp %d", recvdisp);
       index++;
       requests[index] = Request::irecv_init(smpi_get_tmp_sendbuffer(count * dataext), count, datatype,
                                         other, system_tag, comm);
       index++;
     }else{
       XBT_VERB("sending with recvdisp %d", recvdisp);
       index++;
       requests[index] = Request::irecv_init(smpi_get_tmp_sendbuffer(count * dataext), count, datatype,
                                         other, system_tag, comm);
       index++;
     }else{
-      Datatype::copy(static_cast<char *>(sendbuf) + recvdisp * dataext, count, datatype, recvbuf, count, datatype);
+      Datatype::copy(static_cast<const char *>(sendbuf) + recvdisp * dataext, count, datatype, recvbuf, count, datatype);
     }
     recvdisp+=recvcounts[other];
   }
     }
     recvdisp+=recvcounts[other];
   }
index 1464d17..3d8134d 100644 (file)
@@ -11,7 +11,7 @@
 namespace simgrid{
 namespace smpi{
 
 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;
                         MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
 {
     size_t dsize, block_dsize;
@@ -55,7 +55,7 @@ int Coll_allreduce_ompi::allreduce(void *sbuf, void *rbuf, int count,
 
 
 
 
 
 
-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,
                                              MPI_Datatype sdtype,
                                              void* rbuf, int rcount,
                                              MPI_Datatype rdtype,
@@ -88,9 +88,9 @@ int Coll_alltoall_ompi::alltoall( void *sbuf, int scount,
                                                     comm);
 }
 
                                                     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,
                                               MPI_Datatype sdtype,
-                                              void *rbuf, int *rcounts, int *rdisps,
+                                              void *rbuf, const int *rcounts, const int *rdisps,
                                               MPI_Datatype rdtype,
                                               MPI_Comm  comm
                                               )
                                               MPI_Datatype rdtype,
                                               MPI_Comm  comm
                                               )
@@ -224,7 +224,7 @@ int Coll_bcast_ompi::bcast(void *buff, int count,
 #endif  /* 0 */
 }
 
 #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
                                             int count, MPI_Datatype  datatype,
                                             MPI_Op   op, int root,
                                             MPI_Comm   comm
@@ -327,8 +327,8 @@ int Coll_reduce_ompi::reduce( void *sendbuf, void *recvbuf,
 #endif  /* 0 */
 }
 
 #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
                                                     MPI_Datatype dtype,
                                                     MPI_Op  op,
                                                     MPI_Comm  comm
@@ -381,7 +381,7 @@ int Coll_reduce_scatter_ompi::reduce_scatter( void *sbuf, void *rbuf,
 
 }
 
 
 }
 
-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,
                                               MPI_Datatype sdtype,
                                               void* rbuf, int rcount,
                                               MPI_Datatype rdtype,
@@ -461,10 +461,10 @@ int Coll_allgather_ompi::allgather(void *sbuf, int scount,
 #endif  /* defined(USE_MPICH2_DECISION) */
 }
 
 #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,
                                                MPI_Datatype sdtype,
-                                               void* rbuf, int *rcounts,
-                                               int *rdispls,
+                                               void* rbuf, const int *rcounts,
+                                               const int *rdispls,
                                                MPI_Datatype rdtype,
                                                MPI_Comm  comm
                                                )
                                                MPI_Datatype rdtype,
                                                MPI_Comm  comm
                                                )
@@ -508,7 +508,7 @@ int Coll_allgatherv_ompi::allgatherv(void *sbuf, int scount,
     }
 }
 
     }
 }
 
-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,
                                            MPI_Datatype sdtype,
                                            void* rbuf, int rcount,
                                            MPI_Datatype rdtype,
@@ -568,7 +568,7 @@ int Coll_gather_ompi::gather(void *sbuf, int scount,
 }
 
 
 }
 
 
-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,
                                             MPI_Datatype sdtype,
                                             void* rbuf, int rcount,
                                             MPI_Datatype rdtype,
@@ -604,7 +604,7 @@ int Coll_scatter_ompi::scatter(void *sbuf, int scount,
             rbuf, rcount, rdtype,
             root, comm);
         if(rank!=root){
             rbuf, rcount, rdtype,
             root, comm);
         if(rank!=root){
-            xbt_free(sbuf);
+            xbt_free(const_cast<void*>(sbuf));
         }
         return ret;
     }
         }
         return ret;
     }
index e4c5df3..3e73854 100644 (file)
@@ -41,39 +41,39 @@ static ret cat  (COLL_UNPAREN args); \
 #define COLL_NOTHING(...)
 
 #define COLL_GATHER_SIG gather, int, \
 #define COLL_NOTHING(...)
 
 #define COLL_GATHER_SIG gather, int, \
-                      (void *send_buff, int send_count, MPI_Datatype send_type, \
+                      (const void *send_buff, int send_count, MPI_Datatype send_type, \
                        void *recv_buff, int recv_count, MPI_Datatype recv_type, \
                            int root, MPI_Comm comm)
 #define COLL_ALLGATHER_SIG allgather, int, \
                        void *recv_buff, int recv_count, MPI_Datatype recv_type, \
                            int root, MPI_Comm comm)
 #define COLL_ALLGATHER_SIG allgather, int, \
-                      (void *send_buff, int send_count, MPI_Datatype send_type, \
+                      (const void *send_buff, int send_count, MPI_Datatype send_type, \
                        void *recv_buff, int recv_count, MPI_Datatype recv_type, \
                            MPI_Comm comm)
 #define COLL_ALLGATHERV_SIG allgatherv, int, \
                        void *recv_buff, int recv_count, MPI_Datatype recv_type, \
                            MPI_Comm comm)
 #define COLL_ALLGATHERV_SIG allgatherv, int, \
-                      (void *send_buff, int send_count, MPI_Datatype send_type, \
-                       void *recv_buff, int *recv_count, int *recv_disps, \
+                      (const void *send_buff, int send_count, MPI_Datatype send_type, \
+                       void *recv_buff, const int *recv_count, const int *recv_disps, \
                MPI_Datatype recv_type, MPI_Comm comm)
 #define COLL_ALLTOALL_SIG alltoall, int, \
                MPI_Datatype recv_type, MPI_Comm comm)
 #define COLL_ALLTOALL_SIG alltoall, int, \
-                     (void *send_buff, int send_count, MPI_Datatype send_type, \
+                     (const void *send_buff, int send_count, MPI_Datatype send_type, \
                       void *recv_buff, int recv_count, MPI_Datatype recv_type, \
                           MPI_Comm comm)
 #define COLL_ALLTOALLV_SIG alltoallv, int, \
                       void *recv_buff, int recv_count, MPI_Datatype recv_type, \
                           MPI_Comm comm)
 #define COLL_ALLTOALLV_SIG alltoallv, int, \
-                     (void *send_buff, int *send_counts, int *send_disps, MPI_Datatype send_type, \
-                      void *recv_buff, int *recv_counts, int *recv_disps, MPI_Datatype recv_type, \
+                     (const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, \
+                      void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, \
                           MPI_Comm comm)
 #define COLL_BCAST_SIG bcast, int, \
                   (void *buf, int count, MPI_Datatype datatype, \
                    int root, MPI_Comm comm)
 #define COLL_REDUCE_SIG reduce, int, \
                           MPI_Comm comm)
 #define COLL_BCAST_SIG bcast, int, \
                   (void *buf, int count, MPI_Datatype datatype, \
                    int root, MPI_Comm comm)
 #define COLL_REDUCE_SIG reduce, int, \
-                   (void *buf, void *rbuf, int count, MPI_Datatype datatype, \
+                   (const void *buf, void *rbuf, int count, MPI_Datatype datatype, \
                         MPI_Op op, int root, MPI_Comm comm)
 #define COLL_ALLREDUCE_SIG allreduce, int, \
                         MPI_Op op, int root, MPI_Comm comm)
 #define COLL_ALLREDUCE_SIG allreduce, int, \
-                      (void *sbuf, void *rbuf, int rcount, \
+                      (const void *sbuf, void *rbuf, int rcount, \
                            MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
 #define COLL_REDUCE_SCATTER_SIG reduce_scatter, int, \
                            MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
 #define COLL_REDUCE_SCATTER_SIG reduce_scatter, int, \
-                      (void *sbuf, void *rbuf, int *rcounts,\
+                      (const void *sbuf, void *rbuf, const int *rcounts,\
                     MPI_Datatype dtype,MPI_Op  op,MPI_Comm  comm)
 #define COLL_SCATTER_SIG scatter, int, \
                     MPI_Datatype dtype,MPI_Op  op,MPI_Comm  comm)
 #define COLL_SCATTER_SIG scatter, int, \
-                (void *sendbuf, int sendcount, MPI_Datatype sendtype,\
+                (const void *sendbuf, int sendcount, MPI_Datatype sendtype,\
                 void *recvbuf, int recvcount, MPI_Datatype recvtype,\
                 int root, MPI_Comm comm)
 #define COLL_BARRIER_SIG barrier, int, \
                 void *recvbuf, int recvcount, MPI_Datatype recvtype,\
                 int root, MPI_Comm comm)
 #define COLL_BARRIER_SIG barrier, int, \
@@ -109,52 +109,52 @@ public:
   COLL_APPLY(COLL_DEFS, COLL_ALLTOALLV_SIG, "");
 
   // These fairly unused collectives only have one implementation in SMPI
   COLL_APPLY(COLL_DEFS, COLL_ALLTOALLV_SIG, "");
 
   // These fairly unused collectives only have one implementation in SMPI
-  static int gatherv(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int* recvcounts, int* displs,
+  static int gatherv(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, const int* recvcounts, const int* displs,
                      MPI_Datatype recvtype, int root, MPI_Comm comm);
                      MPI_Datatype recvtype, int root, MPI_Comm comm);
-  static int scatterv(void* sendbuf, int* sendcounts, int* displs, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+  static int scatterv(const void* sendbuf, const int* sendcounts, const int* displs, MPI_Datatype sendtype, void* recvbuf, int recvcount,
                       MPI_Datatype recvtype, int root, MPI_Comm comm);
                       MPI_Datatype recvtype, int root, MPI_Comm comm);
-  static int scan(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm);
-  static int exscan(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm);
+  static int scan(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm);
+  static int exscan(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm);
   static int alltoallw
   static int alltoallw
-         (void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype* sendtypes, void* recvbuf, int* recvcounts,
-          int* recvdisps, MPI_Datatype* recvtypes, MPI_Comm comm);
+         (const void* sendbuf, const int* sendcounts, const int* senddisps, const MPI_Datatype* sendtypes, void* recvbuf, const int* recvcounts,
+          const int* recvdisps, const MPI_Datatype* recvtypes, MPI_Comm comm);
 
   //async collectives
   static int ibarrier(MPI_Comm comm, MPI_Request* request);
   static int ibcast(void *buf, int count, MPI_Datatype datatype, 
                    int root, MPI_Comm comm, MPI_Request* request);
 
   //async collectives
   static int ibarrier(MPI_Comm comm, MPI_Request* request);
   static int ibcast(void *buf, int count, MPI_Datatype datatype, 
                    int root, MPI_Comm comm, MPI_Request* request);
-  static int igather (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+  static int igather (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
                                       MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request);
                                       MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request);
-  static int igatherv (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
-                                       int* recvcounts, int* displs, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request);
-  static int iallgather (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
+  static int igatherv (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
+                                       const int* recvcounts, const int* displs, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request);
+  static int iallgather (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
                                          int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request);
                                          int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request);
-  static int iallgatherv (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
-                                          int* recvcounts, int* displs, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request);
-  static int iscatter (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
+  static int iallgatherv (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
+                                          const int* recvcounts, const int* displs, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request);
+  static int iscatter (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
                                        int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request);
                                        int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request);
-  static int iscatterv (void* sendbuf, int* sendcounts, int* displs, MPI_Datatype sendtype,
+  static int iscatterv (const void* sendbuf, const int* sendcounts, const int* displs, MPI_Datatype sendtype,
                                         void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request);
   static int ireduce
                                         void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request);
   static int ireduce
-         (void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm, MPI_Request *request);
+         (const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm, MPI_Request *request);
   static int iallreduce
   static int iallreduce
-         (void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request);
+         (const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request);
   static int iscan
   static int iscan
-         (void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request);
+         (const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request);
   static int iexscan
   static int iexscan
-         (void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request);
+         (const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request);
   static int ireduce_scatter
   static int ireduce_scatter
-         (void* sendbuf, void* recvbuf, int* recvcounts, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request);
+         (const void* sendbuf, void* recvbuf, const int* recvcounts, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request);
   static int ireduce_scatter_block
   static int ireduce_scatter_block
-         (void* sendbuf, void* recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request);
-  static int ialltoall (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
+         (const void* sendbuf, void* recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request);
+  static int ialltoall (const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
                                         int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request);
   static int ialltoallv
                                         int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request);
   static int ialltoallv
-         (void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype sendtype, void* recvbuf, int* recvcounts,
-          int* recvdisps, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request);
+         (const void* sendbuf, const int* sendcounts, const int* senddisps, MPI_Datatype sendtype, void* recvbuf, const int* recvcounts,
+          const int* recvdisps, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request);
   static int ialltoallw
   static int ialltoallw
-         (void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype* sendtypes, void* recvbuf, int* recvcounts,
-          int* recvdisps, MPI_Datatype* recvtypes, MPI_Comm comm, MPI_Request *request);
+         (const void* sendbuf, const int* sendcounts, const int* senddisps, const MPI_Datatype* sendtypes, void* recvbuf, const int* recvcounts,
+          const int* recvdisps, const MPI_Datatype* recvtypes, MPI_Comm comm, MPI_Request *request);
 
 
   static void (*smpi_coll_cleanup_callback)();
 
 
   static void (*smpi_coll_cleanup_callback)();