Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use existing function.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 16 Sep 2022 12:46:44 +0000 (14:46 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 16 Sep 2022 12:53:45 +0000 (14:53 +0200)
src/smpi/bindings/smpi_f77.cpp

index 7a2578a..0cd9600 100644 (file)
@@ -568,10 +568,8 @@ void mpi_op_commutative_(int* op, int* commute, int* ierr)
 
 void mpi_group_free_(int* group, int* ierr)
 {
-  if (MPI_Group tmp = simgrid::smpi::Group::f2c(*group); tmp != MPI_COMM_WORLD->group() && tmp != MPI_GROUP_EMPTY) {
-    simgrid::smpi::Group::unref(tmp);
-  }
-  *ierr = MPI_SUCCESS;
+  MPI_Group tmp = simgrid::smpi::Group::f2c(*group);
+  *ierr         = MPI_Group_free(&tmp);
 }
 
 void mpi_group_size_(int* group, int* size, int* ierr)