From e91cc1925501232c55672a32b39be16637ebc6bd Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Mon, 31 May 2021 22:53:55 +0200 Subject: [PATCH] Parameter 'assert' is a bit field. --- src/smpi/mpi/smpi_win.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/smpi/mpi/smpi_win.cpp b/src/smpi/mpi/smpi_win.cpp index 14f65fc87a..7e8217c96d 100644 --- a/src/smpi/mpi/smpi_win.cpp +++ b/src/smpi/mpi/smpi_win.cpp @@ -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; -- 2.20.1