Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] (SECOND PATCH) Fix destinations/origins for tracing *TIData objects
[simgrid.git] / src / smpi / bindings / smpi_pmpi_group.cpp
index 8adeecc..0c52427 100644 (file)
@@ -3,9 +3,9 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "private.h"
-#include "smpi_comm.hpp"
+#include "private.hpp"
 #include "smpi_coll.hpp"
+#include "smpi_comm.hpp"
 #include "smpi_datatype_derived.hpp"
 #include "smpi_op.hpp"
 #include "smpi_process.hpp"
@@ -61,8 +61,8 @@ int PMPI_Group_translate_ranks(MPI_Group group1, int n, int *ranks1, MPI_Group g
       if(ranks1[i]==MPI_PROC_NULL){
         ranks2[i]=MPI_PROC_NULL;
       }else{
-        int index = group1->index(ranks1[i]);
-        ranks2[i] = group2->rank(index);
+        simgrid::s4u::ActorPtr actor = group1->actor(ranks1[i]);
+        ranks2[i] = group2->rank(actor);
       }
     }
     return MPI_SUCCESS;
@@ -136,9 +136,8 @@ int PMPI_Group_excl(MPI_Group group, int n, int *ranks, MPI_Group * newgroup)
   } else {
     if (n == 0) {
       *newgroup = group;
-      if (group != MPI_COMM_WORLD->group()
-                && group != MPI_COMM_SELF->group() && group != MPI_GROUP_EMPTY)
-      group->ref();
+      if (group != MPI_COMM_WORLD->group() && group != MPI_COMM_SELF->group() && group != MPI_GROUP_EMPTY)
+        group->ref();
       return MPI_SUCCESS;
     } else if (n == group->size()) {
       *newgroup = MPI_GROUP_EMPTY;