From 642d3ee22b11b1eb2feda903773d3e9849fe124a Mon Sep 17 00:00:00 2001 From: Augustin Degomme <26892-adegomme@users.noreply.framagit.org> Date: Mon, 3 Oct 2022 16:43:51 +0000 Subject: [PATCH 1/1] MPI_Win: set to MPI_WIN_NULL after deletion to avoid possibility of calling it multiple times --- src/smpi/bindings/smpi_pmpi_win.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/smpi/bindings/smpi_pmpi_win.cpp b/src/smpi/bindings/smpi_pmpi_win.cpp index cd03d889a0..cf83622f89 100644 --- a/src/smpi/bindings/smpi_pmpi_win.cpp +++ b/src/smpi/bindings/smpi_pmpi_win.cpp @@ -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) -- 2.20.1