Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] Replay: Cleanup WaitAction a bit
authorChristian Heinrich <franz-christian.heinrich@inria.fr>
Tue, 27 Mar 2018 09:24:28 +0000 (11:24 +0200)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Wed, 28 Mar 2018 15:33:53 +0000 (17:33 +0200)
src/smpi/internals/smpi_replay.cpp

index 6865c2f..4861690 100644 (file)
@@ -143,9 +143,10 @@ public:
 
     int rank = request->comm() != MPI_COMM_NULL ? request->comm()->rank() : -1;
 
-    MPI_Group group          = request->comm()->group();
-    int src_traced           = group->rank(request->src());
-    int dst_traced           = group->rank(request->dst());
+    // Must be taken before Request::wait() since the request may be set to
+    // MPI_REQUEST_NULL by Request::wait!
+    int src                  = request->comm()->group()->rank(request->src());
+    int dst                  = request->comm()->group()->rank(request->dst());
     bool is_wait_for_receive = (request->flags() & RECV);
     // TODO: Here we take the rank while we normally take the process id (look for my_proc_id)
     TRACE_smpi_comm_in(rank, __FUNCTION__, new simgrid::instr::NoOpTIData("wait"));