Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
That was a stupid optimization.
authorAugustin Degomme <adegomme@users.noreply.github.com>
Sun, 7 Mar 2021 13:03:21 +0000 (14:03 +0100)
committerAugustin Degomme <adegomme@users.noreply.github.com>
Sun, 7 Mar 2021 18:13:41 +0000 (19:13 +0100)
Processes can be reordered, so count is not a guarantee here at all.

src/smpi/mpi/smpi_group.cpp

index a4e1738..b3916ed 100644 (file)
@@ -111,10 +111,6 @@ int Group::incl(int n, const int* ranks, MPI_Group* newgroup)
 {
   if (n == 0) {
     *newgroup = MPI_GROUP_EMPTY;
-  } else if (n == size_) {
-    *newgroup = this;
-    if (this != MPI_COMM_WORLD->group() && this != MPI_COMM_SELF->group() && this != MPI_GROUP_EMPTY)
-      this->ref();
   } else {
     *newgroup = new Group(n);
     for (int i = 0; i < n; i++) {