X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f12b085d941522c6c45e47db742a7fdfedb832da..aa419088c69d4d8398fd921eebcc3a83f5d0d789:/src/smpi/bindings/smpi_pmpi_group.cpp diff --git a/src/smpi/bindings/smpi_pmpi_group.cpp b/src/smpi/bindings/smpi_pmpi_group.cpp index 8adeecc422..93f0cc6d2a 100644 --- a/src/smpi/bindings/smpi_pmpi_group.cpp +++ b/src/smpi/bindings/smpi_pmpi_group.cpp @@ -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" @@ -47,7 +47,7 @@ int PMPI_Group_rank(MPI_Group group, int *rank) } else if (rank == nullptr) { return MPI_ERR_ARG; } else { - *rank = group->rank(smpi_process()->index()); + *rank = group->rank(simgrid::s4u::Actor::self()->getPid()); return MPI_SUCCESS; } } @@ -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;