Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
catch if MPI_Win_fence was only called once (not enough) when MPI_Win_free is called.
[simgrid.git] / src / smpi / mpi / smpi_win.cpp
index 8eebb21..216a200 100644 (file)
@@ -182,8 +182,7 @@ void Win::set_name(const char* name){
 int Win::fence(int assert)
 {
   XBT_DEBUG("Entering fence");
-  if (opened_ == 0)
-    opened_=1;
+  opened_++;
   if (not (assert & MPI_MODE_NOPRECEDE)) {
     // This is not the first fence => finalize what came before
     bar_->wait();