X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d0ffc37686edcc803601f76ab51fdfed5fc2f241..f23b0fb864cb60978c1fcfd48d50f62dd054fe31:/teshsuite/smpi/mpich3-test/pt2pt/waittestnull.c diff --git a/teshsuite/smpi/mpich3-test/pt2pt/waittestnull.c b/teshsuite/smpi/mpich3-test/pt2pt/waittestnull.c index d23c91d7d3..6de71e3856 100644 --- a/teshsuite/smpi/mpich3-test/pt2pt/waittestnull.c +++ b/teshsuite/smpi/mpich3-test/pt2pt/waittestnull.c @@ -7,8 +7,8 @@ #include "mpi.h" #include "mpitest.h" -/* - * This program checks that the various MPI_Test and MPI_Wait routines +/* + * This program checks that the various MPI_Test and MPI_Wait routines * allow both null requests and in the multiple completion cases, empty * lists of requests. */ @@ -17,65 +17,65 @@ int main(int argc, char **argv) { int errs = 0; MPI_Status status, *status_array = 0; - int count = 0, flag, idx, rc, errlen, *indices=0, outcnt; + int count = 0, flag, idx, rc, errlen, *indices = 0, outcnt; MPI_Request *reqs = 0; char errmsg[MPI_MAX_ERROR_STRING]; MTest_Init(&argc, &argv); - MPI_Comm_set_errhandler( MPI_COMM_WORLD, MPI_ERRORS_RETURN ); + MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN); - rc = MPI_Testall( count, reqs, &flag, status_array ); + rc = MPI_Testall(count, reqs, &flag, status_array); if (rc != MPI_SUCCESS) { - MPI_Error_string( rc, errmsg, &errlen ); - printf( "MPI_Testall returned failure: %s\n", errmsg ); - errs ++; + MPI_Error_string(rc, errmsg, &errlen); + printf("MPI_Testall returned failure: %s\n", errmsg); + errs++; } else if (!flag) { - printf( "MPI_Testall( 0, ... ) did not return a true flag\n") ; - errs++; + printf("MPI_Testall(0, ...) did not return a true flag\n"); + errs++; } - rc = MPI_Waitall( count, reqs, status_array ); + rc = MPI_Waitall(count, reqs, status_array); if (rc != MPI_SUCCESS) { - MPI_Error_string( rc, errmsg, &errlen ); - printf( "MPI_Waitall returned failure: %s\n", errmsg ); - errs ++; + MPI_Error_string(rc, errmsg, &errlen); + printf("MPI_Waitall returned failure: %s\n", errmsg); + errs++; } - rc = MPI_Testany( count, reqs, &idx, &flag, &status ); + rc = MPI_Testany(count, reqs, &idx, &flag, &status); if (rc != MPI_SUCCESS) { - MPI_Error_string( rc, errmsg, &errlen ); - printf( "MPI_Testany returned failure: %s\n", errmsg ); - errs ++; + MPI_Error_string(rc, errmsg, &errlen); + printf("MPI_Testany returned failure: %s\n", errmsg); + errs++; } else if (!flag) { - printf( "MPI_Testany( 0, ... ) did not return a true flag\n") ; - errs++; + printf("MPI_Testany(0, ...) did not return a true flag\n"); + errs++; } - rc = MPI_Waitany( count, reqs, &idx, &status ); + rc = MPI_Waitany(count, reqs, &idx, &status); if (rc != MPI_SUCCESS) { - MPI_Error_string( rc, errmsg, &errlen ); - printf( "MPI_Waitany returned failure: %s\n", errmsg ); - errs ++; + MPI_Error_string(rc, errmsg, &errlen); + printf("MPI_Waitany returned failure: %s\n", errmsg); + errs++; } - rc = MPI_Testsome( count, reqs, &outcnt, indices, status_array ); + rc = MPI_Testsome(count, reqs, &outcnt, indices, status_array); if (rc != MPI_SUCCESS) { - MPI_Error_string( rc, errmsg, &errlen ); - printf( "MPI_Testsome returned failure: %s\n", errmsg ); - errs ++; + MPI_Error_string(rc, errmsg, &errlen); + printf("MPI_Testsome returned failure: %s\n", errmsg); + errs++; } - rc = MPI_Waitsome( count, reqs, &outcnt, indices, status_array ); + rc = MPI_Waitsome(count, reqs, &outcnt, indices, status_array); if (rc != MPI_SUCCESS) { - MPI_Error_string( rc, errmsg, &errlen ); - printf( "MPI_Waitsome returned failure: %s\n", errmsg ); - errs ++; + MPI_Error_string(rc, errmsg, &errlen); + printf("MPI_Waitsome returned failure: %s\n", errmsg); + errs++; } - - MTest_Finalize( errs ); + + MTest_Finalize(errs); MPI_Finalize(); return 0; }