X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c81c99a491282f76757c2673961e3cdee6853539..2bb3a0d042a8a1deb91c18dba0cbdf42237413d4:/teshsuite/smpi/mpich3-test/pt2pt/probenull.c diff --git a/teshsuite/smpi/mpich3-test/pt2pt/probenull.c b/teshsuite/smpi/mpich3-test/pt2pt/probenull.c index 547960522e..6ff87997a6 100644 --- a/teshsuite/smpi/mpich3-test/pt2pt/probenull.c +++ b/teshsuite/smpi/mpich3-test/pt2pt/probenull.c @@ -7,7 +7,7 @@ #include "mpi.h" #include "mpitest.h" -/* +/* * This program checks that MPI_Iprobe and MPI_Probe correctly handle * a source of MPI_PROC_NULL */ @@ -20,40 +20,36 @@ int main(int argc, char **argv) MTest_Init(&argc, &argv); - MPI_Iprobe( MPI_PROC_NULL, 10, MPI_COMM_WORLD, &flag, &status ); + MPI_Iprobe(MPI_PROC_NULL, 10, MPI_COMM_WORLD, &flag, &status); if (!flag) { - errs++; - printf( "Iprobe of source=MPI_PROC_NULL returned flag=false\n" ); + errs++; + printf("Iprobe of source=MPI_PROC_NULL returned flag=false\n"); } else { - if (status.MPI_SOURCE != MPI_PROC_NULL) { - printf( "Status.MPI_SOURCE was %d, should be MPI_PROC_NULL\n", - status.MPI_SOURCE ); - errs++; - } - if (status.MPI_TAG != MPI_ANY_TAG) { - printf( "Status.MPI_TAG was %d, should be MPI_ANY_TAGL\n", - status.MPI_TAG ); - errs++; - } + if (status.MPI_SOURCE != MPI_PROC_NULL) { + printf("Status.MPI_SOURCE was %d, should be MPI_PROC_NULL\n", status.MPI_SOURCE); + errs++; + } + if (status.MPI_TAG != MPI_ANY_TAG) { + printf("Status.MPI_TAG was %d, should be MPI_ANY_TAGL\n", status.MPI_TAG); + errs++; + } } - /* If Iprobe failed, probe is likely to as well. Avoid a possible hang - by testing Probe only if Iprobe test passed */ + /* If Iprobe failed, probe is likely to as well. Avoid a possible hang + * by testing Probe only if Iprobe test passed */ if (errs == 0) { - MPI_Probe( MPI_PROC_NULL, 10, MPI_COMM_WORLD, &status ); - if (status.MPI_SOURCE != MPI_PROC_NULL) { - printf( "Status.MPI_SOURCE was %d, should be MPI_PROC_NULL\n", - status.MPI_SOURCE ); - errs++; - } - if (status.MPI_TAG != MPI_ANY_TAG) { - printf( "Status.MPI_TAG was %d, should be MPI_ANY_TAGL\n", - status.MPI_TAG ); - errs++; - } + MPI_Probe(MPI_PROC_NULL, 10, MPI_COMM_WORLD, &status); + if (status.MPI_SOURCE != MPI_PROC_NULL) { + printf("Status.MPI_SOURCE was %d, should be MPI_PROC_NULL\n", status.MPI_SOURCE); + errs++; + } + if (status.MPI_TAG != MPI_ANY_TAG) { + printf("Status.MPI_TAG was %d, should be MPI_ANY_TAGL\n", status.MPI_TAG); + errs++; + } } - MTest_Finalize( errs ); + MTest_Finalize(errs); MPI_Finalize(); return 0; }