Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move the implem of a function out of the header to reduce issues
[simgrid.git] / src / smpi / bindings / smpi_pmpi_group.cpp
index 1403317..43733df 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2023. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -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);