X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e64ead1c56281b590f80a1eb71d974e76434f0ee..4777522533e6b8879482d71969295f683d6112dc:/src/smpi/smpi_pmpi.c diff --git a/src/smpi/smpi_pmpi.c b/src/smpi/smpi_pmpi.c index 63e69db0f8..367176d3eb 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; @@ -935,13 +935,20 @@ int PMPI_Start(MPI_Request * request) int PMPI_Startall(int count, MPI_Request * requests) { int retval = 0; - + 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); + retval = MPI_SUCCESS; + } } smpi_bench_begin(); return retval;