X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/988f1ee585120cbb07d93e446917648488a76e36..eb5b6b0c3c4d9a38bb205b2c8bc9aeeba8674a25:/src/smpi/smpi_pmpi.c diff --git a/src/smpi/smpi_pmpi.c b/src/smpi/smpi_pmpi.c index 63e69db0f8..573575b20b 100644 --- a/src/smpi/smpi_pmpi.c +++ b/src/smpi/smpi_pmpi.c @@ -923,7 +923,7 @@ int PMPI_Start(MPI_Request * request) smpi_bench_end(); if (request == NULL || *request == MPI_REQUEST_NULL) { - retval = MPI_ERR_ARG; + retval = MPI_ERR_REQUEST; } else { smpi_mpi_start(*request); retval = MPI_SUCCESS; @@ -934,14 +934,21 @@ int PMPI_Start(MPI_Request * request) int PMPI_Startall(int count, MPI_Request * requests) { - int retval = 0; - + int retval; + int i = 0; smpi_bench_end(); if (requests == NULL) { retval = MPI_ERR_ARG; } else { - smpi_mpi_startall(count, requests); retval = MPI_SUCCESS; + for (i = 0 ; i < count ; i++) { + if(requests[i] == MPI_REQUEST_NULL) { + retval = MPI_ERR_REQUEST; + } + } + if(retval != MPI_ERR_REQUEST) { + smpi_mpi_startall(count, requests); + } } smpi_bench_begin(); return retval;