From: Augustin Degomme Date: Sat, 7 Aug 2021 21:56:19 +0000 (+0200) Subject: try to have reduce_scatter output identically on re-tracing X-Git-Tag: v3.29~152 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/1212cad920eb4766c4613908a1bbf4f408b292a9 try to have reduce_scatter output identically on re-tracing ugly. --- diff --git a/src/smpi/bindings/smpi_pmpi_coll.cpp b/src/smpi/bindings/smpi_pmpi_coll.cpp index 0515a37261..83054976bc 100644 --- a/src/smpi/bindings/smpi_pmpi_coll.cpp +++ b/src/smpi/bindings/smpi_pmpi_coll.cpp @@ -645,7 +645,7 @@ int PMPI_Ireduce_scatter(const void *sendbuf, void *recvbuf, const int *recvcoun TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Reduce_scatter" : "PMPI_Ireduce_scatter", new simgrid::instr::VarCollTIData( request == MPI_REQUEST_IGNORED ? "reducescatter" : "ireducescatter", -1, -1, nullptr, - 0, trace_recvcounts, simgrid::smpi::Datatype::encode(datatype), "")); + -1 , trace_recvcounts, std::to_string(0), simgrid::smpi::Datatype::encode(datatype))); if (request == MPI_REQUEST_IGNORED) simgrid::smpi::colls::reduce_scatter(real_sendbuf, recvbuf, recvcounts, datatype, op, comm); diff --git a/src/smpi/internals/smpi_replay.cpp b/src/smpi/internals/smpi_replay.cpp index c94b93c13a..e3d19a0774 100644 --- a/src/smpi/internals/smpi_replay.cpp +++ b/src/smpi/internals/smpi_replay.cpp @@ -23,7 +23,6 @@ #include XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_replay, smpi, "Trace Replay with SMPI"); - // From https://stackoverflow.com/questions/7110301/generic-hash-for-tuples-in-unordered-map-unordered-set // This is all just to make std::unordered_map work with std::tuple. If we need this in other places, // this could go into a header file. @@ -744,7 +743,9 @@ void ReduceScatterAction::kernel(simgrid::xbt::ReplayAction&) TRACE_smpi_comm_in( get_pid(), "action_reducescatter", new simgrid::instr::VarCollTIData(get_name(), -1, -1, nullptr, -1, args.recvcounts, - std::to_string(args.comp_size), + /* ugly as we use datatype field to pass computation as string */ + /* and because of the trick to avoid getting 0.000000 when 0 is given */ + args.comp_size == 0 ? "0" : std::to_string(args.comp_size), Datatype::encode(args.datatype1))); colls::reduce_scatter(send_buffer(args.recv_size_sum * args.datatype1->size()),