Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] (LAST PATCH) Fix SMPI replay & smpi-replay tesh
authorChristian Heinrich <franz-christian.heinrich@inria.fr>
Wed, 17 Jan 2018 18:11:43 +0000 (19:11 +0100)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Wed, 24 Jan 2018 14:58:19 +0000 (15:58 +0100)
This patch is the last and SMPI should build and run correctly.

examples/smpi/replay/replay.tesh
src/instr/instr_paje_events.cpp
src/smpi/internals/smpi_replay.cpp

index 5c702a0..e2ca245 100644 (file)
@@ -150,11 +150,11 @@ $ tail -n +3 ./simgrid.trace
 > 0 1 0 MPI
 > 2 2 1 MPI_STATE
 > 4 3 0 1 1 MPI_LINK
 > 0 1 0 MPI
 > 2 2 1 MPI_STATE
 > 4 3 0 1 1 MPI_LINK
-> 6 0 1 1 0 "rank-0"
+> 6 0 1 1 0 "rank-1"
 > 5 4 2 computing "0 1 1"
 > 5 5 2 smpi_replay_run_init "0 1 0"
 > 5 4 2 computing "0 1 1"
 > 5 5 2 smpi_replay_run_init "0 1 0"
-> 6 0 2 1 0 "rank-1"
-> 6 0 3 1 0 "rank-2"
+> 6 0 2 1 0 "rank-2"
+> 6 0 3 1 0 "rank-3"
 > 12 0 2 1 5
 > 13 0 2 1
 > 12 0 2 2 5
 > 12 0 2 1 5
 > 13 0 2 1
 > 12 0 2 2 5
index 29b7e34..9719ce5 100644 (file)
@@ -156,7 +156,8 @@ void StateEvent::print()
     if (getContainer()->getName().find("rank-") != 0)
       stream << getContainer()->getName() << " " << extra_->print();
     else
     if (getContainer()->getName().find("rank-") != 0)
       stream << getContainer()->getName() << " " << extra_->print();
     else
-      stream << getContainer()->getName().erase(0, 5) << " " << extra_->print();
+      /* Subtract -1 because this is the process id and we transform it to the rank id */
+      stream << stoi(getContainer()->getName().erase(0, 5)) - 1 << " " << extra_->print();
 
     fprintf(tracing_files.at(getContainer()), "%s\n", stream.str().c_str());
   } else {
 
     fprintf(tracing_files.at(getContainer()), "%s\n", stream.str().c_str());
   } else {
index 421cc29..c59a810 100644 (file)
@@ -220,7 +220,7 @@ static void action_send(const char *const *action)
     MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
 
   int rank = smpi_process()->index();
     MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
 
   int rank = smpi_process()->index();
-  int dst_traced = MPI_COMM_WORLD->group()->rank(to);
+  int dst_traced = MPI_COMM_WORLD->group()->actor(to)->getPid();
 
   TRACE_smpi_comm_in(rank, __FUNCTION__,
                      new simgrid::instr::Pt2PtTIData("send", to, size, encode_datatype(MPI_CURRENT_TYPE)));
 
   TRACE_smpi_comm_in(rank, __FUNCTION__,
                      new simgrid::instr::Pt2PtTIData("send", to, size, encode_datatype(MPI_CURRENT_TYPE)));
@@ -247,7 +247,7 @@ static void action_Isend(const char *const *action)
     MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
 
   int rank = smpi_process()->index();
     MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
 
   int rank = smpi_process()->index();
-  int dst_traced = MPI_COMM_WORLD->group()->rank(to);
+  int dst_traced = MPI_COMM_WORLD->group()->actor(to)->getPid();
   TRACE_smpi_comm_in(rank, __FUNCTION__,
                      new simgrid::instr::Pt2PtTIData("Isend", to, size, encode_datatype(MPI_CURRENT_TYPE)));
   if (not TRACE_smpi_view_internals())
   TRACE_smpi_comm_in(rank, __FUNCTION__,
                      new simgrid::instr::Pt2PtTIData("Isend", to, size, encode_datatype(MPI_CURRENT_TYPE)));
   if (not TRACE_smpi_view_internals())
@@ -275,7 +275,7 @@ static void action_recv(const char *const *action) {
     MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
 
   int rank = smpi_process()->index();
     MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
 
   int rank = smpi_process()->index();
-  int src_traced = MPI_COMM_WORLD->group()->rank(from);
+  int src_traced = MPI_COMM_WORLD->group()->actor(from)->getPid();
 
   TRACE_smpi_comm_in(rank, __FUNCTION__,
                      new simgrid::instr::Pt2PtTIData("recv", from, size, encode_datatype(MPI_CURRENT_TYPE)));
 
   TRACE_smpi_comm_in(rank, __FUNCTION__,
                      new simgrid::instr::Pt2PtTIData("recv", from, size, encode_datatype(MPI_CURRENT_TYPE)));
@@ -309,7 +309,6 @@ static void action_Irecv(const char *const *action)
     MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
 
   int rank = smpi_process()->index();
     MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
 
   int rank = smpi_process()->index();
-  int src_traced = MPI_COMM_WORLD->group()->rank(from);
   TRACE_smpi_comm_in(rank, __FUNCTION__,
                      new simgrid::instr::Pt2PtTIData("Irecv", from, size, encode_datatype(MPI_CURRENT_TYPE)));
   MPI_Status status;
   TRACE_smpi_comm_in(rank, __FUNCTION__,
                      new simgrid::instr::Pt2PtTIData("Irecv", from, size, encode_datatype(MPI_CURRENT_TYPE)));
   MPI_Status status;