Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Empty status when request is NULL.
[simgrid.git] / src / smpi / smpi_pmpi.c
index de11ee9..f9a06a5 100644 (file)
@@ -1374,10 +1374,11 @@ int PMPI_Test(MPI_Request * request, int *flag, MPI_Status * status)
   int retval = 0;
 
   smpi_bench_end();
-  if (*request == MPI_REQUEST_NULL || flag == NULL) {
+  if (request == NULL || flag == NULL) {
     retval = MPI_ERR_ARG;
   } else if (*request == MPI_REQUEST_NULL) {
     *flag= TRUE;
+    smpi_empty_status(status);
     retval = MPI_ERR_REQUEST;
   } else {
     *flag = smpi_mpi_test(request, status);