Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Persistent comms may be reused after a wait, do not put their handle to MPI_REQUEST_NULL
[simgrid.git] / src / smpi / smpi_base.c
index b72d6ce..eb2103e 100644 (file)
@@ -771,7 +771,8 @@ void smpi_mpi_wait(MPI_Request * request, MPI_Status * status)
   }
 
   finish_wait(request, status);
-  *request = MPI_REQUEST_NULL;
+  if (*request != MPI_REQUEST_NULL && !((*request)->flags & PERSISTENT))
+      *request = MPI_REQUEST_NULL;
   // FIXME for a detached send, finish_wait is not called:
 }