From 1960663a2867517c7e697436c6b49185faf2422c Mon Sep 17 00:00:00 2001 From: Christian Heinrich Date: Fri, 30 Mar 2018 17:11:29 +0200 Subject: [PATCH] [SMPI] Add 'tag' parameter for instr::Pt2PtTI class --- src/instr/instr_private.hpp | 8 ++++++-- src/smpi/bindings/smpi_pmpi_request.cpp | 12 ++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/instr/instr_private.hpp b/src/instr/instr_private.hpp index a2cf5a17af..5d6d12ec49 100644 --- a/src/instr/instr_private.hpp +++ b/src/instr/instr_private.hpp @@ -113,16 +113,20 @@ public: }; class Pt2PtTIData : public TIData { + int tag; public: + explicit Pt2PtTIData(std::string name, int endpoint, int size, int tag, std::string datatype) + : TIData(name, endpoint, size, datatype), tag(tag) {}; + explicit Pt2PtTIData(std::string name, int endpoint, int size, std::string datatype) - : TIData(name, endpoint, size, datatype){}; + : TIData(name, endpoint, size, datatype), tag(0) {}; std::string print() override { std::stringstream stream; stream << getName() << " "; if (endpoint >= 0) stream << endpoint << " "; - stream << send_size << " " << send_type; + stream << tag << " " << send_size << " " << send_type; return stream.str(); } std::string display_size() override { return std::to_string(send_size); } diff --git a/src/smpi/bindings/smpi_pmpi_request.cpp b/src/smpi/bindings/smpi_pmpi_request.cpp index d9039b47aa..c47791c0e6 100644 --- a/src/smpi/bindings/smpi_pmpi_request.cpp +++ b/src/smpi/bindings/smpi_pmpi_request.cpp @@ -168,7 +168,7 @@ int PMPI_Irecv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MP TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData("Irecv", src, datatype->is_replayable() ? count : count * datatype->size(), - simgrid::smpi::Datatype::encode(datatype))); + tag, simgrid::smpi::Datatype::encode(datatype))); *request = simgrid::smpi::Request::irecv(buf, count, datatype, src, tag, comm); retval = MPI_SUCCESS; @@ -209,7 +209,7 @@ int PMPI_Isend(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MP TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData("Isend", dst, datatype->is_replayable() ? count : count * datatype->size(), - simgrid::smpi::Datatype::encode(datatype))); + tag, simgrid::smpi::Datatype::encode(datatype))); TRACE_smpi_send(my_proc_id, my_proc_id, trace_dst, tag, count * datatype->size()); @@ -251,7 +251,7 @@ int PMPI_Issend(void* buf, int count, MPI_Datatype datatype, int dst, int tag, M TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData("ISsend", dst, datatype->is_replayable() ? count : count * datatype->size(), - simgrid::smpi::Datatype::encode(datatype))); + tag, simgrid::smpi::Datatype::encode(datatype))); TRACE_smpi_send(my_proc_id, my_proc_id, trace_dst, tag, count * datatype->size()); *request = simgrid::smpi::Request::issend(buf, count, datatype, dst, tag, comm); @@ -290,7 +290,7 @@ int PMPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData("recv", src, datatype->is_replayable() ? count : count * datatype->size(), - simgrid::smpi::Datatype::encode(datatype))); + tag, simgrid::smpi::Datatype::encode(datatype))); simgrid::smpi::Request::recv(buf, count, datatype, src, tag, comm, status); retval = MPI_SUCCESS; @@ -333,7 +333,7 @@ int PMPI_Send(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData("send", dst, datatype->is_replayable() ? count : count * datatype->size(), - simgrid::smpi::Datatype::encode(datatype))); + tag, simgrid::smpi::Datatype::encode(datatype))); if (not TRACE_smpi_view_internals()) { TRACE_smpi_send(my_proc_id, my_proc_id, dst_traced, tag, count * datatype->size()); } @@ -371,7 +371,7 @@ int PMPI_Ssend(void* buf, int count, MPI_Datatype datatype, int dst, int tag, MP TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData("Ssend", dst, datatype->is_replayable() ? count : count * datatype->size(), - simgrid::smpi::Datatype::encode(datatype))); + tag, simgrid::smpi::Datatype::encode(datatype))); TRACE_smpi_send(my_proc_id, my_proc_id, dst_traced, tag, count * datatype->size()); simgrid::smpi::Request::ssend(buf, count, datatype, dst, tag, comm); -- 2.20.1