X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6847a26d9973030337f6ef9f18464b1f04ce7452..9100ed6a1f170718b2bbea8ec36bbc7d1677d4c2:/src/smpi/bindings/smpi_pmpi_coll.cpp diff --git a/src/smpi/bindings/smpi_pmpi_coll.cpp b/src/smpi/bindings/smpi_pmpi_coll.cpp index 48e31cf2be..fa2a53c939 100644 --- a/src/smpi/bindings/smpi_pmpi_coll.cpp +++ b/src/smpi/bindings/smpi_pmpi_coll.cpp @@ -144,7 +144,7 @@ int PMPI_Gatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recv TRACE_smpi_comm_in(rank, __func__, new simgrid::instr::VarCollTIData( - "gatherV", root, + "gatherv", root, sendtmptype->is_replayable() ? sendtmpcount : sendtmpcount * sendtmptype->size(), nullptr, dt_size_recv, trace_recvcounts, simgrid::smpi::Datatype::encode(sendtmptype), simgrid::smpi::Datatype::encode(recvtype))); @@ -224,7 +224,7 @@ int PMPI_Allgatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype, TRACE_smpi_comm_in(rank, __func__, new simgrid::instr::VarCollTIData( - "allGatherV", -1, sendtype->is_replayable() ? sendcount : sendcount * sendtype->size(), + "allgatherv", -1, sendtype->is_replayable() ? sendcount : sendcount * sendtype->size(), nullptr, dt_size_recv, trace_recvcounts, simgrid::smpi::Datatype::encode(sendtype), simgrid::smpi::Datatype::encode(recvtype))); @@ -307,7 +307,7 @@ int PMPI_Scatterv(void *sendbuf, int *sendcounts, int *displs, TRACE_smpi_comm_in(rank, __func__, new simgrid::instr::VarCollTIData( - "scatterV", root, dt_size_send, trace_sendcounts, + "scatterv", root, dt_size_send, trace_sendcounts, recvtype->is_replayable() ? recvcount : recvcount * recvtype->size(), nullptr, simgrid::smpi::Datatype::encode(sendtype), simgrid::smpi::Datatype::encode(recvtype))); @@ -384,7 +384,7 @@ int PMPI_Allreduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatyp int rank = simgrid::s4u::this_actor::get_pid(); TRACE_smpi_comm_in(rank, __func__, - new simgrid::instr::CollTIData("allReduce", -1, 0, + new simgrid::instr::CollTIData("allreduce", -1, 0, datatype->is_replayable() ? count : count * datatype->size(), -1, simgrid::smpi::Datatype::encode(datatype), "")); @@ -415,14 +415,20 @@ int PMPI_Scan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MP retval = MPI_ERR_OP; } else { int rank = simgrid::s4u::this_actor::get_pid(); - + void* sendtmpbuf = sendbuf; + if (sendbuf == MPI_IN_PLACE) { + sendtmpbuf = static_cast(xbt_malloc(count * datatype->size())); + memcpy(sendtmpbuf, recvbuf, count * datatype->size()); + } TRACE_smpi_comm_in(rank, __func__, new simgrid::instr::Pt2PtTIData( "scan", -1, datatype->is_replayable() ? count : count * datatype->size(), simgrid::smpi::Datatype::encode(datatype))); - retval = simgrid::smpi::Colls::scan(sendbuf, recvbuf, count, datatype, op, comm); + retval = simgrid::smpi::Colls::scan(sendtmpbuf, recvbuf, count, datatype, op, comm); TRACE_smpi_comm_out(rank); + if (sendbuf == MPI_IN_PLACE) + xbt_free(sendtmpbuf); } smpi_bench_begin(); @@ -494,7 +500,7 @@ int PMPI_Reduce_scatter(void *sendbuf, void *recvbuf, int *recvcounts, MPI_Datat } TRACE_smpi_comm_in(rank, __func__, new simgrid::instr::VarCollTIData( - "reduceScatter", -1, dt_send_size, nullptr, -1, trace_recvcounts, + "reducescatter", -1, dt_send_size, nullptr, -1, trace_recvcounts, simgrid::smpi::Datatype::encode(datatype), "")); simgrid::smpi::Colls::reduce_scatter(sendtmpbuf, recvbuf, recvcounts, datatype, op, comm); @@ -537,7 +543,7 @@ int PMPI_Reduce_scatter_block(void *sendbuf, void *recvbuf, int recvcount, } TRACE_smpi_comm_in(rank, __func__, - new simgrid::instr::VarCollTIData("reduceScatter", -1, 0, nullptr, -1, trace_recvcounts, + new simgrid::instr::VarCollTIData("reducescatter", -1, 0, nullptr, -1, trace_recvcounts, simgrid::smpi::Datatype::encode(datatype), "")); int* recvcounts = new int[count];