Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MPI_Win: set to MPI_WIN_NULL after deletion to avoid possibility of calling it multip...
[simgrid.git] / src / smpi / bindings / smpi_pmpi_win.cpp
index cd03d88..cf83622 100644 (file)
@@ -107,7 +107,9 @@ int PMPI_Win_free( MPI_Win* win){
     return MPI_ERR_WIN;
   }
   const SmpiBenchGuard suspend_bench;
-  return simgrid::smpi::Win::del(*win);
+  simgrid::smpi::Win::del(*win);
+  *win = MPI_WIN_NULL;
+  return MPI_SUCCESS;
 }
 
 int PMPI_Win_set_name(MPI_Win  win, const char * name)