Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill is_replayable() for datatypes.
authorAugustin Degomme <adegomme@users.noreply.github.com>
Thu, 5 Aug 2021 14:48:02 +0000 (16:48 +0200)
committerAugustin Degomme <adegomme@users.noreply.github.com>
Thu, 5 Aug 2021 14:48:02 +0000 (16:48 +0200)
It was useless since we've been encoding/decoding all datatypes for a long time now.
This could break ancient TI traces handling, but I'm really not sure of this actually, and it was causing issues.
We need more testing on TI traces and replay :\

src/smpi/bindings/smpi_pmpi_coll.cpp
src/smpi/bindings/smpi_pmpi_request.cpp
src/smpi/bindings/smpi_pmpi_win.cpp
src/smpi/include/smpi_datatype.hpp
src/smpi/mpi/smpi_datatype.cpp

index 456b233..f5c69f1 100644 (file)
@@ -73,7 +73,7 @@ int PMPI_Ibcast(void *buf, int count, MPI_Datatype datatype,
   aid_t pid = simgrid::s4u::this_actor::get_pid();
   TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Bcast" : "PMPI_Ibcast",
                      new simgrid::instr::CollTIData(request == MPI_REQUEST_IGNORED ? "bcast" : "ibcast", root, -1.0,
-                                                    datatype->is_replayable() ? count : count * datatype->size(), 0,
+                                                    count, 0,
                                                     simgrid::smpi::Datatype::encode(datatype), ""));
   if (comm->size() > 1) {
     if (request == MPI_REQUEST_IGNORED)
@@ -137,8 +137,7 @@ int PMPI_Igather(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void
   TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Gather" : "PMPI_Igather",
                      new simgrid::instr::CollTIData(
                          request == MPI_REQUEST_IGNORED ? "gather" : "igather", root, -1.0,
-                         real_sendtype->is_replayable() ? real_sendcount : real_sendcount * real_sendtype->size(),
-                         (comm->rank() != root || recvtype->is_replayable()) ? recvcount : recvcount * recvtype->size(),
+                         real_sendcount, recvcount,
                          simgrid::smpi::Datatype::encode(real_sendtype), simgrid::smpi::Datatype::encode(recvtype)));
   if (request == MPI_REQUEST_IGNORED)
     simgrid::smpi::colls::gather(real_sendbuf, real_sendcount, real_sendtype, recvbuf, recvcount, recvtype, root, comm);
@@ -195,19 +194,18 @@ int PMPI_Igatherv(const void* sendbuf, int sendcount, MPI_Datatype sendtype, voi
   }
 
   aid_t pid        = simgrid::s4u::this_actor::get_pid();
-  int dt_size_recv = recvtype->is_replayable() ? 1 : recvtype->size();
 
   auto trace_recvcounts = std::make_shared<std::vector<int>>();
   if (rank == root) {
     for (int i = 0; i < comm->size(); i++) // copy data to avoid bad free
-      trace_recvcounts->push_back(recvcounts[i] * dt_size_recv);
+      trace_recvcounts->push_back(recvcounts[i]);
   }
 
   TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Gatherv" : "PMPI_Igatherv",
                      new simgrid::instr::VarCollTIData(
                          request == MPI_REQUEST_IGNORED ? "gatherv" : "igatherv", root,
-                         real_sendtype->is_replayable() ? real_sendcount : real_sendcount * real_sendtype->size(),
-                         nullptr, dt_size_recv, trace_recvcounts, simgrid::smpi::Datatype::encode(real_sendtype),
+                         real_sendcount,
+                         nullptr, recvtype->size(), trace_recvcounts, simgrid::smpi::Datatype::encode(real_sendtype),
                          simgrid::smpi::Datatype::encode(recvtype)));
   if (request == MPI_REQUEST_IGNORED)
     simgrid::smpi::colls::gatherv(real_sendbuf, real_sendcount, real_sendtype, recvbuf, recvcounts, displs, recvtype,
@@ -261,8 +259,7 @@ int PMPI_Iallgather(const void* sendbuf, int sendcount, MPI_Datatype sendtype, v
   TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Allgather" : "PMPI_Iallggather",
                      new simgrid::instr::CollTIData(
                          request == MPI_REQUEST_IGNORED ? "allgather" : "iallgather", -1, -1.0,
-                         sendtype->is_replayable() ? sendcount : sendcount * sendtype->size(),
-                         recvtype->is_replayable() ? recvcount : recvcount * recvtype->size(),
+                         sendcount, recvcount,
                          simgrid::smpi::Datatype::encode(sendtype), simgrid::smpi::Datatype::encode(recvtype)));
   if (request == MPI_REQUEST_IGNORED)
     simgrid::smpi::colls::allgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm);
@@ -308,18 +305,17 @@ int PMPI_Iallgatherv(const void* sendbuf, int sendcount, MPI_Datatype sendtype,
     sendtype  = recvtype;
   }
   aid_t pid        = simgrid::s4u::this_actor::get_pid();
-  int dt_size_recv = recvtype->is_replayable() ? 1 : recvtype->size();
 
   auto trace_recvcounts = std::make_shared<std::vector<int>>();
   for (int i = 0; i < comm->size(); i++) { // copy data to avoid bad free
-    trace_recvcounts->push_back(recvcounts[i] * dt_size_recv);
+    trace_recvcounts->push_back(recvcounts[i]);
   }
 
   TRACE_smpi_comm_in(
       pid, request == MPI_REQUEST_IGNORED ? "PMPI_Allgatherv" : "PMPI_Iallgatherv",
       new simgrid::instr::VarCollTIData(request == MPI_REQUEST_IGNORED ? "allgatherv" : "iallgatherv", -1,
-                                        sendtype->is_replayable() ? sendcount : sendcount * sendtype->size(), nullptr,
-                                        dt_size_recv, trace_recvcounts, simgrid::smpi::Datatype::encode(sendtype),
+                                        sendcount, nullptr,
+                                        recvtype->size(), trace_recvcounts, simgrid::smpi::Datatype::encode(sendtype),
                                         simgrid::smpi::Datatype::encode(recvtype)));
   if (request == MPI_REQUEST_IGNORED)
     simgrid::smpi::colls::allgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm);
@@ -376,8 +372,7 @@ int PMPI_Iscatter(const void* sendbuf, int sendcount, MPI_Datatype sendtype, voi
   TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Scatter" : "PMPI_Iscatter",
                      new simgrid::instr::CollTIData(
                          request == MPI_REQUEST_IGNORED ? "scatter" : "iscatter", root, -1.0,
-                         (rank != root || sendtype->is_replayable()) ? sendcount : sendcount * sendtype->size(),
-                         recvtype->is_replayable() ? recvcount : recvcount * recvtype->size(),
+                         sendcount, recvcount,
                          simgrid::smpi::Datatype::encode(sendtype), simgrid::smpi::Datatype::encode(recvtype)));
   if (request == MPI_REQUEST_IGNORED)
     simgrid::smpi::colls::scatter(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm);
@@ -427,19 +422,18 @@ int PMPI_Iscatterv(const void* sendbuf, const int* sendcounts, const int* displs
   const SmpiBenchGuard suspend_bench;
 
   aid_t pid        = simgrid::s4u::this_actor::get_pid();
-  int dt_size_send = sendtype->is_replayable() ? 1 : sendtype->size();
 
   auto trace_sendcounts = std::make_shared<std::vector<int>>();
   if (rank == root) {
     for (int i = 0; i < comm->size(); i++) { // copy data to avoid bad free
-      trace_sendcounts->push_back(sendcounts[i] * dt_size_send);
+      trace_sendcounts->push_back(sendcounts[i]);
     }
   }
 
   TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Scatterv" : "PMPI_Iscatterv",
                      new simgrid::instr::VarCollTIData(
-                         request == MPI_REQUEST_IGNORED ? "scatterv" : "iscatterv", root, dt_size_send,
-                         trace_sendcounts, recvtype->is_replayable() ? recvcount : recvcount * recvtype->size(),
+                         request == MPI_REQUEST_IGNORED ? "scatterv" : "iscatterv", root, sendtype->size(),
+                         trace_sendcounts, recvcount,
                          nullptr, simgrid::smpi::Datatype::encode(sendtype),
                          simgrid::smpi::Datatype::encode(recvtype)));
   if (request == MPI_REQUEST_IGNORED)
@@ -479,7 +473,7 @@ int PMPI_Ireduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype dat
 
   TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Reduce" : "PMPI_Ireduce",
                      new simgrid::instr::CollTIData(request == MPI_REQUEST_IGNORED ? "reduce" : "ireduce", root, 0,
-                                                    datatype->is_replayable() ? count : count * datatype->size(), 0,
+                                                    count, 0,
                                                     simgrid::smpi::Datatype::encode(datatype), ""));
   if (request == MPI_REQUEST_IGNORED)
     simgrid::smpi::colls::reduce(sendbuf, recvbuf, count, datatype, op, root, comm);
@@ -532,7 +526,7 @@ int PMPI_Iallreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype
 
   TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Allreduce" : "PMPI_Iallreduce",
                      new simgrid::instr::CollTIData(request == MPI_REQUEST_IGNORED ? "allreduce" : "iallreduce", -1, 0,
-                                                    datatype->is_replayable() ? count : count * datatype->size(), 0,
+                                                    count, 0,
                                                     simgrid::smpi::Datatype::encode(datatype), ""));
 
   if (request == MPI_REQUEST_IGNORED)
@@ -568,8 +562,7 @@ int PMPI_Iscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datat
 
   TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Scan" : "PMPI_Iscan",
                      new simgrid::instr::Pt2PtTIData(request == MPI_REQUEST_IGNORED ? "scan" : "iscan", -1,
-                                                     datatype->is_replayable() ? count : count * datatype->size(),
-                                                     simgrid::smpi::Datatype::encode(datatype)));
+                                                     count, simgrid::smpi::Datatype::encode(datatype)));
 
   int retval;
   if (request == MPI_REQUEST_IGNORED)
@@ -604,8 +597,7 @@ int PMPI_Iexscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype dat
 
   TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Exscan" : "PMPI_Iexscan",
                      new simgrid::instr::Pt2PtTIData(request == MPI_REQUEST_IGNORED ? "exscan" : "iexscan", -1,
-                                                     datatype->is_replayable() ? count : count * datatype->size(),
-                                                     simgrid::smpi::Datatype::encode(datatype)));
+                                                     count, simgrid::smpi::Datatype::encode(datatype)));
 
   int retval;
   if (request == MPI_REQUEST_IGNORED)
@@ -642,11 +634,10 @@ int PMPI_Ireduce_scatter(const void *sendbuf, void *recvbuf, const int *recvcoun
   const SmpiBenchGuard suspend_bench;
   aid_t pid                          = simgrid::s4u::this_actor::get_pid();
   auto trace_recvcounts              = std::make_shared<std::vector<int>>();
-  int dt_send_size                   = datatype->is_replayable() ? 1 : datatype->size();
   int totalcount                     = 0;
 
   for (int i = 0; i < comm->size(); i++) { // copy data to avoid bad free
-    trace_recvcounts->push_back(recvcounts[i] * dt_send_size);
+    trace_recvcounts->push_back(recvcounts[i]);
     totalcount += recvcounts[i];
   }
   std::vector<unsigned char> tmp_sendbuf;
@@ -654,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, dt_send_size, nullptr,
+                         request == MPI_REQUEST_IGNORED ? "reducescatter" : "ireducescatter", -1, datatype->size(), nullptr,
                          0, trace_recvcounts, simgrid::smpi::Datatype::encode(datatype), ""));
 
   if (request == MPI_REQUEST_IGNORED)
@@ -689,8 +680,7 @@ int PMPI_Ireduce_scatter_block(const void* sendbuf, void* recvbuf, int recvcount
   int count = comm->size();
 
   aid_t pid                          = simgrid::s4u::this_actor::get_pid();
-  int dt_send_size                   = datatype->is_replayable() ? 1 : datatype->size();
-  auto trace_recvcounts = std::make_shared<std::vector<int>>(recvcount * dt_send_size); // copy data to avoid bad free
+  auto trace_recvcounts = std::make_shared<std::vector<int>>(recvcount); // copy data to avoid bad free
   std::vector<unsigned char> tmp_sendbuf;
   const void* real_sendbuf = smpi_get_in_place_buf(sendbuf, recvbuf, tmp_sendbuf, recvcount * count, datatype);
 
@@ -755,8 +745,7 @@ int PMPI_Ialltoall(const void* sendbuf, int sendcount, MPI_Datatype sendtype, vo
   TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Alltoall" : "PMPI_Ialltoall",
                      new simgrid::instr::CollTIData(
                          request == MPI_REQUEST_IGNORED ? "alltoall" : "ialltoall", -1, -1.0,
-                         real_sendtype->is_replayable() ? real_sendcount : real_sendcount * real_sendtype->size(),
-                         recvtype->is_replayable() ? recvcount : recvcount * recvtype->size(),
+                         real_sendcount, recvcount,
                          simgrid::smpi::Datatype::encode(real_sendtype), simgrid::smpi::Datatype::encode(recvtype)));
   int retval;
   if (request == MPI_REQUEST_IGNORED)
@@ -808,7 +797,7 @@ int PMPI_Ialltoallv(const void* sendbuf, const int* sendcounts, const int* sendd
   int recv_size                      = 0;
   auto trace_sendcounts              = std::make_shared<std::vector<int>>();
   auto trace_recvcounts              = std::make_shared<std::vector<int>>();
-  int dt_size_recv                   = recvtype->is_replayable() ? 1 : recvtype->size();
+  int dt_size_recv                   = recvtype->size();
 
   const int* real_sendcounts = sendcounts;
   const int* real_senddispls  = senddispls;
@@ -816,7 +805,7 @@ int PMPI_Ialltoallv(const void* sendbuf, const int* sendcounts, const int* sendd
   int maxsize              = 0;
   for (int i = 0; i < size; i++) { // copy data to avoid bad free
     recv_size += recvcounts[i] * dt_size_recv;
-    trace_recvcounts->push_back(recvcounts[i] * dt_size_recv);
+    trace_recvcounts->push_back(recvcounts[i]);
     if (((recvdispls[i] + recvcounts[i]) * dt_size_recv) > maxsize)
       maxsize = (recvdispls[i] + recvcounts[i]) * dt_size_recv;
   }
@@ -838,11 +827,9 @@ int PMPI_Ialltoallv(const void* sendbuf, const int* sendcounts, const int* sendd
     return MPI_ERR_TRUNCATE;
   }
 
-  int dt_size_send = real_sendtype->is_replayable() ? 1 : real_sendtype->size();
-
   for (int i = 0; i < size; i++) { // copy data to avoid bad free
-    send_size += real_sendcounts[i] * dt_size_send;
-    trace_sendcounts->push_back(real_sendcounts[i] * dt_size_send);
+    send_size += real_sendcounts[i] * real_sendtype->size();
+    trace_sendcounts->push_back(real_sendcounts[i]);
   }
 
   TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Alltoallv" : "PMPI_Ialltoallv",
@@ -912,9 +899,8 @@ int PMPI_Ialltoallw(const void* sendbuf, const int* sendcounts, const int* sendd
   for (int i = 0; i < size; i++) { // copy data to avoid bad free
     if (recvtypes[i] == MPI_DATATYPE_NULL)
       return MPI_ERR_TYPE;
-    int dt_size_recv = recvtypes[i]->is_replayable() ? 1 : recvtypes[i]->size();
     recv_size += recvcounts[i] * recvtypes[i]->size();
-    trace_recvcounts->push_back(recvcounts[i] * dt_size_recv);
+    trace_recvcounts->push_back(recvcounts[i]);
     if ((recvdispls[i] + (recvcounts[i] * recvtypes[i]->size())) > maxsize)
       maxsize = recvdispls[i] + (recvcounts[i] * recvtypes[i]->size());
   }
@@ -940,9 +926,8 @@ int PMPI_Ialltoallw(const void* sendbuf, const int* sendcounts, const int* sendd
   }
 
   for (int i = 0; i < size; i++) { // copy data to avoid bad free
-    int dt_size_send = real_sendtypes[i]->is_replayable() ? 1 : real_sendtypes[i]->size();
     send_size += real_sendcounts[i] * real_sendtypes[i]->size();
-    trace_sendcounts->push_back(real_sendcounts[i] * dt_size_send);
+    trace_sendcounts->push_back(real_sendcounts[i]);
   }
 
   TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Alltoallw" : "PMPI_Ialltoallw",
index 6a8e563..820a747 100644 (file)
@@ -174,7 +174,7 @@ int PMPI_Irecv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MP
   aid_t my_proc_id = simgrid::s4u::this_actor::get_pid();
   TRACE_smpi_comm_in(my_proc_id, __func__,
                      new simgrid::instr::Pt2PtTIData("irecv", src,
-                                                     datatype->is_replayable() ? count : count * datatype->size(),
+                                                     count,
                                                      tag, simgrid::smpi::Datatype::encode(datatype)));
   *request = simgrid::smpi::Request::irecv(buf, count, datatype, src, tag, comm);
   TRACE_smpi_comm_out(my_proc_id);
@@ -192,7 +192,7 @@ int PMPI_Isend(const void *buf, int count, MPI_Datatype datatype, int dst, int t
   aid_t trace_dst  = getPid(comm, dst);
   TRACE_smpi_comm_in(my_proc_id, __func__,
                      new simgrid::instr::Pt2PtTIData("isend", dst,
-                                                     datatype->is_replayable() ? count : count * datatype->size(),
+                                                     count,
                                                      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::isend(buf, count, datatype, dst, tag, comm);
@@ -217,7 +217,7 @@ int PMPI_Issend(const void* buf, int count, MPI_Datatype datatype, int dst, int
   aid_t trace_dst  = getPid(comm, dst);
   TRACE_smpi_comm_in(my_proc_id, __func__,
                      new simgrid::instr::Pt2PtTIData("ISsend", dst,
-                                                     datatype->is_replayable() ? count : count * datatype->size(),
+                                                     count,
                                                      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);
@@ -248,7 +248,7 @@ int PMPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI
     aid_t my_proc_id = simgrid::s4u::this_actor::get_pid();
     TRACE_smpi_comm_in(my_proc_id, __func__,
                        new simgrid::instr::Pt2PtTIData("recv", src,
-                                                       datatype->is_replayable() ? count : count * datatype->size(),
+                                                       count,
                                                        tag, simgrid::smpi::Datatype::encode(datatype)));
 
     retval = simgrid::smpi::Request::recv(buf, count, datatype, src, tag, comm, status);
@@ -274,7 +274,7 @@ int PMPI_Send(const void *buf, int count, MPI_Datatype datatype, int dst, int ta
   aid_t dst_traced = getPid(comm, dst);
   TRACE_smpi_comm_in(my_proc_id, __func__,
                      new simgrid::instr::Pt2PtTIData("send", dst,
-                                                     datatype->is_replayable() ? count : count * datatype->size(),
+                                                     count,
                                                      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());
@@ -304,7 +304,7 @@ int PMPI_Bsend(const void* buf, int count, MPI_Datatype datatype, int dst, int t
     return MPI_ERR_BUFFER;
   TRACE_smpi_comm_in(my_proc_id, __func__,
                      new simgrid::instr::Pt2PtTIData("bsend", dst,
-                                                     datatype->is_replayable() ? count : count * datatype->size(),
+                                                     count,
                                                      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());
@@ -329,7 +329,7 @@ int PMPI_Ibsend(const void* buf, int count, MPI_Datatype datatype, int dst, int
     return MPI_ERR_BUFFER;
   TRACE_smpi_comm_in(my_proc_id, __func__,
                      new simgrid::instr::Pt2PtTIData("ibsend", dst,
-                                                     datatype->is_replayable() ? count : count * datatype->size(),
+                                                     count,
                                                      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::ibsend(buf, count, datatype, dst, tag, comm);
@@ -364,7 +364,7 @@ int PMPI_Ssend(const void* buf, int count, MPI_Datatype datatype, int dst, int t
   aid_t dst_traced = getPid(comm, dst);
   TRACE_smpi_comm_in(my_proc_id, __func__,
                      new simgrid::instr::Pt2PtTIData("Ssend", dst,
-                                                     datatype->is_replayable() ? count : count * datatype->size(),
+                                                     count,
                                                      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);
@@ -414,8 +414,8 @@ int PMPI_Sendrecv(const void* sendbuf, int sendcount, MPI_Datatype sendtype, int
     src_hack->push_back(src_traced);
     TRACE_smpi_comm_in(my_proc_id, __func__,
                        new simgrid::instr::VarCollTIData(
-                           "sendRecv", -1, sendtype->is_replayable() ? sendcount : sendcount * sendtype->size(),
-                           dst_hack, recvtype->is_replayable() ? recvcount : recvcount * recvtype->size(), src_hack,
+                           "sendRecv", -1, sendcount,
+                           dst_hack, recvcount, src_hack,
                            simgrid::smpi::Datatype::encode(sendtype), simgrid::smpi::Datatype::encode(recvtype)));
 
     TRACE_smpi_send(my_proc_id, my_proc_id, dst_traced, sendtag, sendcount * sendtype->size());
index bebd6f8..014cb17 100644 (file)
@@ -170,9 +170,7 @@ int PMPI_Get( void *origin_addr, int origin_count, MPI_Datatype origin_datatype,
   MPI_Group group;
   win->get_group(&group);
   TRACE_smpi_comm_in(my_proc_id, __func__,
-                     new simgrid::instr::Pt2PtTIData("Get", target_rank, origin_datatype->is_replayable()
-                                                                             ? origin_count
-                                                                             : origin_count * origin_datatype->size(),
+                     new simgrid::instr::Pt2PtTIData("Get", target_rank, origin_count,
                                                      simgrid::smpi::Datatype::encode(origin_datatype)));
    retval = win->get( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count,
                          target_datatype);
@@ -198,8 +196,7 @@ int PMPI_Rget( void *origin_addr, int origin_count, MPI_Datatype origin_datatype
   win->get_group(&group);
   TRACE_smpi_comm_in(my_proc_id, __func__,
                      new simgrid::instr::Pt2PtTIData(
-                         "Rget", target_rank,
-                         origin_datatype->is_replayable() ? origin_count : origin_count * origin_datatype->size(),
+                         "Rget", target_rank, origin_count,
                          simgrid::smpi::Datatype::encode(origin_datatype)));
 
   retval = win->get( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count,
@@ -224,9 +221,7 @@ int PMPI_Put(const void *origin_addr, int origin_count, MPI_Datatype origin_data
   win->get_group(&group);
   aid_t dst_traced = group->actor(target_rank);
   TRACE_smpi_comm_in(my_proc_id, __func__,
-                     new simgrid::instr::Pt2PtTIData("Put", target_rank, origin_datatype->is_replayable()
-                                                                             ? origin_count
-                                                                             : origin_count * origin_datatype->size(),
+                     new simgrid::instr::Pt2PtTIData("Put", target_rank, origin_count,
                                                      simgrid::smpi::Datatype::encode(origin_datatype)));
   TRACE_smpi_send(my_proc_id, my_proc_id, dst_traced, SMPI_RMA_TAG, origin_count * origin_datatype->size());
 
@@ -255,8 +250,7 @@ int PMPI_Rput(const void *origin_addr, int origin_count, MPI_Datatype origin_dat
   aid_t dst_traced = group->actor(target_rank);
   TRACE_smpi_comm_in(my_proc_id, __func__,
                      new simgrid::instr::Pt2PtTIData(
-                         "Rput", target_rank,
-                         origin_datatype->is_replayable() ? origin_count : origin_count * origin_datatype->size(),
+                         "Rput", target_rank, origin_count,
                          simgrid::smpi::Datatype::encode(origin_datatype)));
   TRACE_smpi_send(my_proc_id, my_proc_id, dst_traced, SMPI_RMA_TAG, origin_count * origin_datatype->size());
 
@@ -283,8 +277,7 @@ int PMPI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype orig
   win->get_group(&group);
   TRACE_smpi_comm_in(my_proc_id, __func__,
                      new simgrid::instr::Pt2PtTIData(
-                         "Accumulate", target_rank,
-                         origin_datatype->is_replayable() ? origin_count : origin_count * origin_datatype->size(),
+                         "Accumulate", target_rank, origin_count,
                          simgrid::smpi::Datatype::encode(origin_datatype)));
   retval = win->accumulate( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count,
                                 target_datatype, op);
@@ -313,8 +306,7 @@ int PMPI_Raccumulate(const void *origin_addr, int origin_count, MPI_Datatype ori
   win->get_group(&group);
   TRACE_smpi_comm_in(my_proc_id, __func__,
                      new simgrid::instr::Pt2PtTIData(
-                         "Raccumulate", target_rank,
-                         origin_datatype->is_replayable() ? origin_count : origin_count * origin_datatype->size(),
+                         "Raccumulate", target_rank, origin_count,
                          simgrid::smpi::Datatype::encode(origin_datatype)));
 
   retval = win->accumulate( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count,
@@ -353,8 +345,7 @@ int PMPI_Get_accumulate(const void* origin_addr, int origin_count, MPI_Datatype
   win->get_group(&group);
   TRACE_smpi_comm_in(my_proc_id, __func__,
                      new simgrid::instr::Pt2PtTIData(
-                         "Get_accumulate", target_rank,
-                         target_datatype->is_replayable() ? target_count : target_count * target_datatype->size(),
+                         "Get_accumulate", target_rank, target_count,
                          simgrid::smpi::Datatype::encode(target_datatype)));
 
   retval = win->get_accumulate( origin_addr, origin_count, origin_datatype, result_addr,
@@ -396,8 +387,7 @@ int PMPI_Rget_accumulate(const void* origin_addr, int origin_count, MPI_Datatype
   win->get_group(&group);
   TRACE_smpi_comm_in(my_proc_id, __func__,
                      new simgrid::instr::Pt2PtTIData(
-                         "Rget_accumulate", target_rank,
-                         target_datatype->is_replayable() ? target_count : target_count * target_datatype->size(),
+                         "Rget_accumulate", target_rank, target_count,
                          simgrid::smpi::Datatype::encode(target_datatype)));
 
   retval = win->get_accumulate( origin_addr, origin_count, origin_datatype, result_addr,
@@ -432,8 +422,7 @@ int PMPI_Compare_and_swap(const void* origin_addr, void* compare_addr, void* res
   MPI_Group group;
   win->get_group(&group);
   TRACE_smpi_comm_in(my_proc_id, __func__,
-                     new simgrid::instr::Pt2PtTIData("Compare_and_swap", target_rank,
-                                                     datatype->is_replayable() ? 1 : datatype->size(),
+                     new simgrid::instr::Pt2PtTIData("Compare_and_swap", target_rank, 1,
                                                      simgrid::smpi::Datatype::encode(datatype)));
 
   retval = win->compare_and_swap(origin_addr, compare_addr, result_addr, datatype, target_rank, target_disp);
index 49b6821..044cae6 100644 (file)
@@ -147,7 +147,6 @@ public:
   bool is_basic() const;
   static const char* encode(const Datatype* dt) { return dt->id.c_str(); }
   static MPI_Datatype decode(const std::string& datatype_id);
-  bool is_replayable() const;
   void addflag(int flag);
   int extent(MPI_Aint* lb, MPI_Aint* extent) const;
   MPI_Aint get_extent() const { return ub_ - lb_; };
index 097aaf7..879b9f8 100644 (file)
@@ -249,13 +249,6 @@ bool Datatype::is_basic() const
   return (flags_ & DT_FLAG_BASIC);
 }
 
-bool Datatype::is_replayable() const
-{
-  return (simgrid::instr::trace_format == simgrid::instr::TraceFormat::Ti) &&
-         ((this == MPI_BYTE) || (this == MPI_DOUBLE) || (this == MPI_INT) || (this == MPI_CHAR) ||
-          (this == MPI_SHORT) || (this == MPI_LONG) || (this == MPI_FLOAT));
-}
-
 MPI_Datatype Datatype::decode(const std::string& datatype_id)
 {
   return id2type_lookup.find(datatype_id)->second;