Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Allow null ranks for MPI_Group_incl when n == 0.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 28 May 2021 09:52:30 +0000 (11:52 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 28 May 2021 15:28:17 +0000 (17:28 +0200)
src/smpi/bindings/smpi_pmpi_group.cpp

index 1403317..de21fc6 100644 (file)
@@ -117,7 +117,8 @@ int PMPI_Group_incl(MPI_Group group, int n, const int *ranks, MPI_Group * newgro
 {
   CHECK_GROUP(1, group)
   CHECK_NEGATIVE(2, MPI_ERR_ARG, n)
-  CHECK_NULL(3, MPI_ERR_ARG, ranks)
+  if (n != 0)
+    CHECK_NULL(3, MPI_ERR_ARG, ranks)
   CHECK_NULL(4, MPI_ERR_ARG, newgroup)
   CHECK_GROUP_RANKS(group, n, ranks)
   return group->incl(n, ranks, newgroup);