Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] Add 'tag' parameter for instr::Pt2PtTI class
authorChristian Heinrich <franz-christian.heinrich@inria.fr>
Fri, 30 Mar 2018 15:11:29 +0000 (17:11 +0200)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Mon, 9 Apr 2018 13:05:58 +0000 (15:05 +0200)
src/instr/instr_private.hpp
src/smpi/bindings/smpi_pmpi_request.cpp

index a2cf5a1..5d6d12e 100644 (file)
@@ -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); }
index d9039b4..c47791c 100644 (file)
@@ -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);