From f41a9b687780b454310de3b8cd63b81380968449 Mon Sep 17 00:00:00 2001 From: Christian Heinrich Date: Fri, 15 Dec 2017 14:47:55 +0100 Subject: [PATCH] [SMPI] Remove local variable sz in smpi_group.cpp We already tested before if size_ != group2->size() -- and since sz = group2->size(), we have here size_ == sz. So just use size_. --- src/smpi/mpi/smpi_group.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/smpi/mpi/smpi_group.cpp b/src/smpi/mpi/smpi_group.cpp index 4506de673e..89fbf5901a 100644 --- a/src/smpi/mpi/smpi_group.cpp +++ b/src/smpi/mpi/smpi_group.cpp @@ -95,8 +95,7 @@ int Group::compare(MPI_Group group2) if (size_ != group2->size()) { result = MPI_UNEQUAL; } else { - int sz = group2->size(); - for (int i = 0; i < sz; i++) { + for (int i = 0; i < size_; i++) { int index = this->index(i); int rank = group2->rank(index); if (rank == MPI_UNDEFINED) { -- 2.20.1