Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] Win::~Win(): Use class member rank_ instead of a local var
authorChristian Heinrich <franz-christian.heinrich@inria.fr>
Mon, 15 Jan 2018 23:09:09 +0000 (00:09 +0100)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Wed, 24 Jan 2018 14:58:18 +0000 (15:58 +0100)
src/smpi/mpi/smpi_win.cpp

index 0827674..d88430e 100644 (file)
@@ -70,8 +70,7 @@ Win::~Win(){
   comm_->remove_rma_win(this);
 
   Colls::barrier(comm_);
   comm_->remove_rma_win(this);
 
   Colls::barrier(comm_);
-  int rank=comm_->rank();
-  if(rank == 0)
+  if (rank_ == 0)
     MSG_barrier_destroy(bar_);
   xbt_mutex_destroy(mut_);
   xbt_mutex_destroy(lock_mut_);
     MSG_barrier_destroy(bar_);
   xbt_mutex_destroy(mut_);
   xbt_mutex_destroy(lock_mut_);