From: degomme Date: Sat, 11 Feb 2017 13:31:12 +0000 (+0100) Subject: Add MPI_Comm_group_create ... which is basically MPI_Comm_create X-Git-Tag: v3_15~443 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/c31a6a9ac144620fa6f577cda361dd68c3d21e4d Add MPI_Comm_group_create ... which is basically MPI_Comm_create --- diff --git a/include/smpi/smpi.h b/include/smpi/smpi.h index f27f87907a..99e7074eff 100644 --- a/include/smpi/smpi.h +++ b/include/smpi/smpi.h @@ -454,6 +454,7 @@ MPI_CALL(XBT_PUBLIC(int), MPI_Comm_group, (MPI_Comm comm, MPI_Group * group)); MPI_CALL(XBT_PUBLIC(int), MPI_Comm_compare, (MPI_Comm comm1, MPI_Comm comm2, int *result)); MPI_CALL(XBT_PUBLIC(int), MPI_Comm_create, (MPI_Comm comm, MPI_Group group, MPI_Comm * newcomm)); +MPI_CALL(XBT_PUBLIC(int), MPI_Comm_create_group, (MPI_Comm comm, MPI_Group group, int tag, MPI_Comm * newcomm)); MPI_CALL(XBT_PUBLIC(int), MPI_Comm_free, (MPI_Comm * comm)); MPI_CALL(XBT_PUBLIC(int), MPI_Comm_disconnect, (MPI_Comm * comm)); MPI_CALL(XBT_PUBLIC(int), MPI_Comm_split, (MPI_Comm comm, int color, int key, MPI_Comm* comm_out)); diff --git a/src/smpi/smpi_mpi.cpp b/src/smpi/smpi_mpi.cpp index e7dd3fd28c..f462a32db5 100644 --- a/src/smpi/smpi_mpi.cpp +++ b/src/smpi/smpi_mpi.cpp @@ -69,6 +69,7 @@ WRAPPED_PMPI_CALL(int,MPI_Comm_rank,(MPI_Comm comm, int *rank),(comm, rank)) WRAPPED_PMPI_CALL(int,MPI_Comm_set_attr ,(MPI_Comm comm, int comm_keyval, void *attribute_val),( comm, comm_keyval, attribute_val)) WRAPPED_PMPI_CALL(int,MPI_Comm_size,(MPI_Comm comm, int *size),(comm, size)) WRAPPED_PMPI_CALL(int,MPI_Comm_split,(MPI_Comm comm, int color, int key, MPI_Comm* comm_out),(comm, color, key, comm_out)) +WRAPPED_PMPI_CALL(int,MPI_Comm_create_group,(MPI_Comm comm, MPI_Group group, int tag, MPI_Comm* comm_out),(comm, group, tag, comm_out)) WRAPPED_PMPI_CALL(int,MPI_Dims_create,(int nnodes, int ndims, int* dims) ,(nnodes, ndims, dims)) WRAPPED_PMPI_CALL(int,MPI_Error_class,(int errorcode, int* errorclass) ,(errorcode, errorclass)) WRAPPED_PMPI_CALL(int,MPI_Exscan,(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm),(sendbuf, recvbuf, count, datatype, op, comm)) diff --git a/src/smpi/smpi_pmpi.cpp b/src/smpi/smpi_pmpi.cpp index f95467f892..80c9507756 100644 --- a/src/smpi/smpi_pmpi.cpp +++ b/src/smpi/smpi_pmpi.cpp @@ -853,6 +853,23 @@ int PMPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm* comm_out) return retval; } +int PMPI_Comm_create_group(MPI_Comm comm, MPI_Group group, int, MPI_Comm* comm_out) +{ + int retval = 0; + smpi_bench_end(); + + if (comm_out == nullptr) { + retval = MPI_ERR_ARG; + } else if (comm == MPI_COMM_NULL) { + retval = MPI_ERR_COMM; + } else { + retval = MPI_Comm_create(comm, group, comm_out); + } + smpi_bench_begin(); + + return retval; +} + int PMPI_Send_init(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm, MPI_Request * request) { int retval = 0;