Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Parameter 'assert' is a bit field.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 31 May 2021 20:53:55 +0000 (22:53 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 1 Jun 2021 13:32:21 +0000 (15:32 +0200)
src/smpi/mpi/smpi_win.cpp

index 14f65fc..7e8217c 100644 (file)
@@ -188,7 +188,7 @@ int Win::fence(int assert)
   XBT_DEBUG("Entering fence");
   if (opened_ == 0)
     opened_=1;
-  if (assert != MPI_MODE_NOPRECEDE) {
+  if (not (assert & MPI_MODE_NOPRECEDE)) {
     // This is not the first fence => finalize what came before
     bar_->wait();
     mut_->lock();
@@ -207,7 +207,7 @@ int Win::fence(int assert)
     mut_->unlock();
   }
 
-  if(assert==MPI_MODE_NOSUCCEED)//there should be no ops after this one, tell we are closed.
+  if (assert & MPI_MODE_NOSUCCEED) // there should be no ops after this one, tell we are closed.
     opened_=0;
   assert_ = assert;