From: Arnaud Giersch Date: Mon, 31 May 2021 20:53:55 +0000 (+0200) Subject: Parameter 'assert' is a bit field. X-Git-Tag: v3.28~190 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/e91cc1925501232c55672a32b39be16637ebc6bd Parameter 'assert' is a bit field. --- 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;