From: Pierre-Nicolas Clauss Date: Thu, 31 Mar 2011 15:28:13 +0000 (+0200) Subject: Added one more missing call. C-MPI should now compile. X-Git-Tag: v3.6_beta2~72^2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/5d7121829051a971cffab8876327153d40be040a Added one more missing call. C-MPI should now compile. --- diff --git a/include/smpi/smpi.h b/include/smpi/smpi.h index 4b5e72c858..68c9cf996a 100644 --- a/include/smpi/smpi.h +++ b/include/smpi/smpi.h @@ -222,6 +222,7 @@ MPI_CALL(XBT_PUBLIC(int), MPI_Comm_dup, (MPI_Comm comm, MPI_Comm * newcomm)); MPI_CALL(XBT_PUBLIC(int), MPI_Comm_create, (MPI_Comm comm, MPI_Group group, 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)); MPI_CALL(XBT_PUBLIC(int), MPI_Send_init, diff --git a/src/smpi/smpi_mpi.c b/src/smpi/smpi_mpi.c index c709e0aaec..d86fcd8c18 100644 --- a/src/smpi/smpi_mpi.c +++ b/src/smpi/smpi_mpi.c @@ -194,6 +194,11 @@ int MPI_Comm_free(MPI_Comm * comm) return PMPI_Comm_free(comm); } +int MPI_Comm_disconnect(MPI_Comm * comm) +{ + return PMPI_Comm_disconnect(comm); +} + int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm* comm_out) { return PMPI_Comm_split(comm, color, key, comm_out); diff --git a/src/smpi/smpi_pmpi.c b/src/smpi/smpi_pmpi.c index 0422b98b76..ec3da34945 100644 --- a/src/smpi/smpi_pmpi.c +++ b/src/smpi/smpi_pmpi.c @@ -763,6 +763,25 @@ int PMPI_Comm_free(MPI_Comm * comm) return retval; } +int PMPI_Comm_disconnect(MPI_Comm * comm) +{ + /* TODO: wait until all communication in comm are done */ + int retval; + + smpi_bench_end(); + if (comm == NULL) { + retval = MPI_ERR_ARG; + } else if (*comm == MPI_COMM_NULL) { + retval = MPI_ERR_COMM; + } else { + smpi_comm_destroy(*comm); + *comm = MPI_COMM_NULL; + retval = MPI_SUCCESS; + } + smpi_bench_begin(); + return retval; +} + int PMPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm* comm_out) { int retval;