From 260f6acdb4f0d33a1cd039cdf02124ebd9aa54cd Mon Sep 17 00:00:00 2001 From: Augustin Degomme Date: Mon, 1 Jul 2013 12:12:17 +0200 Subject: [PATCH] do not create communicator if process is not inside its group --- src/smpi/smpi_pmpi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/smpi/smpi_pmpi.c b/src/smpi/smpi_pmpi.c index b034aaf69f..1b362b556f 100644 --- a/src/smpi/smpi_pmpi.c +++ b/src/smpi/smpi_pmpi.c @@ -792,7 +792,11 @@ int PMPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm * newcomm) retval = MPI_ERR_GROUP; } else if (newcomm == NULL) { retval = MPI_ERR_ARG; - } else { + } else if(smpi_group_index(group,smpi_process_index())==MPI_UNDEFINED){ + *newcomm= MPI_COMM_NULL; + retval = MPI_SUCCESS; + }else{ + *newcomm = smpi_comm_new(group); retval = MPI_SUCCESS; } -- 2.20.1