Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Improve behavior of SD_application_reinit. Now, you can schedule tasks
[simgrid.git] / src / smpi / smpi_pmpi.c
index 9fde3a0..1e4dc07 100644 (file)
@@ -897,9 +897,10 @@ int PMPI_Request_free(MPI_Request * request)
   int retval;
 
   smpi_bench_end();
-  if (request == MPI_REQUEST_NULL) {
+  if (*request == MPI_REQUEST_NULL) {
     retval = MPI_ERR_ARG;
   } else {
+    if((*request)->flags & PERSISTENT)(*request)->refcount--;
     smpi_mpi_request_free(request);
     retval = MPI_SUCCESS;
   }