X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a3da8571d918cd3cbee6676bf229886a6a2ac92d..5d7121829051a971cffab8876327153d40be040a:/src/smpi/smpi_pmpi.c 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;