From: Arnaud Giersch Date: Wed, 6 Feb 2013 21:40:14 +0000 (+0100) Subject: Return MPI_UNDEFINED for negative values too. X-Git-Tag: v3_9_90~510^2~15 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/bee82a5da884fdedb7ee1d9198ceac7d529af7f5?ds=sidebyside Return MPI_UNDEFINED for negative values too. --- diff --git a/src/smpi/smpi_group.c b/src/smpi/smpi_group.c index e84ed8e2dc..0222b881c3 100644 --- a/src/smpi/smpi_group.c +++ b/src/smpi/smpi_group.c @@ -66,7 +66,7 @@ int smpi_group_index(MPI_Group group, int rank) { int index = MPI_UNDEFINED; - if (rank < group->size) { + if (0 <= rank && rank < group->size) { index = group->rank_to_index_map[rank]; } return index;