Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
if we send 0 data, don't bother with subtypes
[simgrid.git] / src / smpi / smpi_group.c
index e84ed8e..0222b88 100644 (file)
@@ -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;