X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5d308c961af3ea5f561363d2e42b157e8d02b202..e8f8350f07c1b13dd8628f56d5a5050da18264d3:/src/smpi/smpi_pmpi.c diff --git a/src/smpi/smpi_pmpi.c b/src/smpi/smpi_pmpi.c index b8d53b5ddc..0422b98b76 100644 --- a/src/smpi/smpi_pmpi.c +++ b/src/smpi/smpi_pmpi.c @@ -622,6 +622,8 @@ int PMPI_Comm_rank(MPI_Comm comm, int *rank) smpi_bench_end(); if (comm == MPI_COMM_NULL) { retval = MPI_ERR_COMM; + } else if (rank == NULL) { + retval = MPI_ERR_ARG; } else { *rank = smpi_comm_rank(comm); retval = MPI_SUCCESS; @@ -647,6 +649,23 @@ int PMPI_Comm_size(MPI_Comm comm, int *size) return retval; } +int PMPI_Comm_get_name (MPI_Comm comm, char* name, int* len) +{ + int retval; + + smpi_bench_end(); + if (comm == MPI_COMM_NULL) { + retval = MPI_ERR_COMM; + } else if (name == NULL || len == NULL) { + retval = MPI_ERR_ARG; + } else { + smpi_comm_get_name(comm, name, len); + retval = MPI_SUCCESS; + } + smpi_bench_begin(); + return retval; +} + int PMPI_Comm_group(MPI_Comm comm, MPI_Group * group) { int retval;