Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please codefactor
[simgrid.git] / src / smpi / mpi / smpi_group.cpp
index cbd973a..14d1ff4 100644 (file)
@@ -7,9 +7,6 @@
 #include "smpi_group.hpp"
 #include "smpi_comm.hpp"
 #include <string>
-#include <xbt/log.h>
-
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_group, smpi, "Logging specific to SMPI (group)");
 
 simgrid::smpi::Group mpi_MPI_GROUP_EMPTY;
 MPI_Group MPI_GROUP_EMPTY=&mpi_MPI_GROUP_EMPTY;
@@ -106,7 +103,6 @@ int Group::compare(MPI_Group group2)
 
 int Group::incl(int n, const int* ranks, MPI_Group* newgroup)
 {
-  int i=0;
   if (n == 0) {
     *newgroup = MPI_GROUP_EMPTY;
   } else if (n == size_) {
@@ -115,7 +111,7 @@ int Group::incl(int n, const int* ranks, MPI_Group* newgroup)
       this->ref();
   } else {
     *newgroup = new Group(n);
-    for (i = 0; i < n; i++) {
+    for (int i = 0; i < n; i++) {
       s4u::Actor* actor = this->actor(ranks[i]); // ranks[] was passed as a param!
       (*newgroup)->set_mapping(actor, i);
     }
@@ -223,7 +219,6 @@ int Group::excl(int n, const int *ranks, MPI_Group * newgroup){
   }
   delete[] to_exclude;
   return MPI_SUCCESS;
-
 }
 
 static bool is_rank_in_range(int rank, int first, int last)