Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Forgot that ifort needs argv to stay alive.
[simgrid.git] / src / smpi / internals / smpi_replay.cpp
index a11183d..d55ff23 100644 (file)
@@ -134,7 +134,10 @@ public:
     /* Sometimes we need to re-insert MPI_REQUEST_NULL but we still need src,dst and tag */
     void addNullRequest(int src, int dst, int tag)
     {
-      store.insert({req_key_t(src, dst, tag), MPI_REQUEST_NULL});
+      store.insert({req_key_t(
+            MPI_COMM_WORLD->group()->actor(src)->get_pid()-1,
+            MPI_COMM_WORLD->group()->actor(dst)->get_pid()-1,
+            tag), MPI_REQUEST_NULL});
     }
 };
 
@@ -701,7 +704,9 @@ static std::unordered_map<aid_t, simgrid::smpi::replay::RequestStorage> storage;
 /** @brief Only initialize the replay, don't do it for real */
 void smpi_replay_init(int* argc, char*** argv)
 {
-  simgrid::smpi::ActorExt::init(argc, argv);
+  if (not smpi_process()->initializing()){
+    simgrid::smpi::ActorExt::init(argc, argv);
+  }
   smpi_process()->mark_as_initialized();
   smpi_process()->set_replaying(true);