X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/611d822b02f836d7abe031cced6adc4281ef4356..dd96d5146134f3ff468a7835db49556c8e6225a5:/src/smpi/mpi/smpi_group.cpp diff --git a/src/smpi/mpi/smpi_group.cpp b/src/smpi/mpi/smpi_group.cpp index 4a50f6c776..e3eed4d76e 100644 --- a/src/smpi/mpi/smpi_group.cpp +++ b/src/smpi/mpi/smpi_group.cpp @@ -25,17 +25,17 @@ Group::Group() refcount_ = 1; /* refcount_: start > 0 so that this group never gets freed */ } -Group::Group(int n) : size_(n), rank_to_actor_map_(size_, nullptr), rank_to_index_map_(size_, MPI_UNDEFINED), index_to_rank_map_(size_, MPI_UNDEFINED) +Group::Group(int n) : size_(n), rank_to_actor_map_(size_, nullptr), index_to_rank_map_(size_, MPI_UNDEFINED) { refcount_ = 1; } -Group::Group(MPI_Group origin) +Group::Group(Group* origin) { if (origin != MPI_GROUP_NULL && origin != MPI_GROUP_EMPTY) { size_ = origin->size(); refcount_ = 1; - rank_to_index_map_ = origin->rank_to_index_map_; + // FIXME: cheinrich: There is no such thing as an index any more; the two maps should be removed index_to_rank_map_ = origin->index_to_rank_map_; rank_to_actor_map_ = origin->rank_to_actor_map_; actor_to_rank_map_ = origin->actor_to_rank_map_; @@ -46,7 +46,6 @@ void Group::set_mapping(simgrid::s4u::ActorPtr actor, int rank) { if (0 <= rank && rank < size_) { int index = actor->get_pid(); - rank_to_index_map_[rank] = index; if (index != MPI_UNDEFINED) { if ((unsigned)index >= index_to_rank_map_.size()) index_to_rank_map_.resize(index + 1, MPI_UNDEFINED);