Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
don't go looking for something that does not exist.
authordegomme <augustin.degomme@unibas.ch>
Sat, 11 Feb 2017 17:41:07 +0000 (18:41 +0100)
committerdegomme <augustin.degomme@unibas.ch>
Sun, 12 Feb 2017 01:08:28 +0000 (02:08 +0100)
src/smpi/smpi_group.cpp

index fe817c5..41eb245 100644 (file)
@@ -109,6 +109,8 @@ int smpi_group_index(MPI_Group group, int rank)
 int smpi_group_rank(MPI_Group group, int index)
 {
   int * ptr_rank = nullptr;
+  if (group==MPI_GROUP_EMPTY)
+    return MPI_UNDEFINED;
   char * key = bprintf("%d", index);
   ptr_rank = static_cast<int*>(xbt_dict_get_or_null(group->index_to_rank_map, key));
   xbt_free(key);