From c619e9d16e3061f1d05b187d80bc65eb578fb868 Mon Sep 17 00:00:00 2001 From: Augustin Degomme Date: Thu, 15 Nov 2018 11:02:33 +0100 Subject: [PATCH] handle MPI_ANY_SOURCE in recv replay --- src/instr/instr_private.hpp | 4 +--- src/smpi/internals/smpi_replay.cpp | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/instr/instr_private.hpp b/src/instr/instr_private.hpp index f31fd92d8c..153996b73d 100644 --- a/src/instr/instr_private.hpp +++ b/src/instr/instr_private.hpp @@ -131,9 +131,7 @@ public: std::string print() override { std::stringstream stream; - stream << getName() << " "; - if (endpoint >= 0) - stream << endpoint << " "; + stream << getName() << " " << endpoint << " "; stream << tag << " " << send_size << " " << send_type; return stream.str(); } diff --git a/src/smpi/internals/smpi_replay.cpp b/src/smpi/internals/smpi_replay.cpp index d55ff234b9..b4830ffcf0 100644 --- a/src/smpi/internals/smpi_replay.cpp +++ b/src/smpi/internals/smpi_replay.cpp @@ -447,8 +447,6 @@ void SendAction::kernel(simgrid::xbt::ReplayAction& action) void RecvAction::kernel(simgrid::xbt::ReplayAction& action) { - int src_traced = MPI_COMM_WORLD->group()->actor(args.partner)->get_pid(); - TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData(name, args.partner, args.size, args.tag, Datatype::encode(args.datatype1))); @@ -469,6 +467,7 @@ void RecvAction::kernel(simgrid::xbt::ReplayAction& action) TRACE_smpi_comm_out(my_proc_id); // TODO: Check why this was only activated in the "recv" case and not in the "irecv" case if (name == "recv" && not TRACE_smpi_view_internals()) { + int src_traced = MPI_COMM_WORLD->group()->actor(status.MPI_SOURCE)->get_pid(); TRACE_smpi_recv(src_traced, my_proc_id, args.tag); } } -- 2.20.1