From: Marion Guthmuller Date: Fri, 7 Jun 2013 10:06:14 +0000 (+0200) Subject: cosmetics : indent X-Git-Tag: v3_9_90~307 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/aa9957cdf6eccf9ed8f1001c41273ea2115b75b4?hp=6a57d49726f4ad02cbe5f8764024bcc3a9bdbabb;ds=sidebyside cosmetics : indent --- diff --git a/teshsuite/smpi/mpich-test/pt2pt/isndrcv2.c b/teshsuite/smpi/mpich-test/pt2pt/isndrcv2.c index 531e51bc98..9538887772 100644 --- a/teshsuite/smpi/mpich-test/pt2pt/isndrcv2.c +++ b/teshsuite/smpi/mpich-test/pt2pt/isndrcv2.c @@ -3,39 +3,39 @@ int main( int argc, char **argv ) { - int rank, size; - MPI_Request r1, r2; - MPI_Status s; - int buf[10000], buf2[10000], count, tag1, tag2; + int rank, size; + MPI_Request r1, r2; + MPI_Status s; + int buf[10000], buf2[10000], count, tag1, tag2; - count = 10000; - tag1 = 100; - tag2 = 1000; + count = 10000; + tag1 = 100; + tag2 = 1000; - MPI_Init( &argc, &argv ); - MPI_Comm_rank( MPI_COMM_WORLD, &rank ); - MPI_Comm_size( MPI_COMM_WORLD, &size ); + MPI_Init( &argc, &argv ); + MPI_Comm_rank( MPI_COMM_WORLD, &rank ); + MPI_Comm_size( MPI_COMM_WORLD, &size ); - if (rank == 0) { - MPI_Isend( buf, count, MPI_INT, 1, tag1, MPI_COMM_WORLD, &r1 ); - MPI_Isend( buf2, count, MPI_INT, 1, tag2, MPI_COMM_WORLD, &r2 ); - MPI_Wait( &r1, &s ); - MPI_Wait( &r2, &s ); - } - else if (rank == 1) { - MPI_Irecv( buf2, count, MPI_INT, 0, tag2, MPI_COMM_WORLD, &r2 ); - MPI_Irecv( buf, count, MPI_INT, 0, tag1, MPI_COMM_WORLD, &r1 ); - MPI_Wait( &r2, &s ); - if (s.MPI_TAG != tag2) { + if (rank == 0) { + MPI_Isend( buf, count, MPI_INT, 1, tag1, MPI_COMM_WORLD, &r1 ); + MPI_Isend( buf2, count, MPI_INT, 1, tag2, MPI_COMM_WORLD, &r2 ); + MPI_Wait( &r1, &s ); + MPI_Wait( &r2, &s ); + } + else if (rank == 1) { + MPI_Irecv( buf2, count, MPI_INT, 0, tag2, MPI_COMM_WORLD, &r2 ); + MPI_Irecv( buf, count, MPI_INT, 0, tag1, MPI_COMM_WORLD, &r1 ); + MPI_Wait( &r2, &s ); + if (s.MPI_TAG != tag2) { printf( "Error in receive order\n" ); - } - MPI_Wait( &r1, &s ); } + MPI_Wait( &r1, &s ); + } - MPI_Barrier( MPI_COMM_WORLD ); - if (rank == 0) { - printf( "Test completed\n" ); - } - MPI_Finalize( ); - return 0; + MPI_Barrier( MPI_COMM_WORLD ); + if (rank == 0) { + printf( "Test completed\n" ); + } + MPI_Finalize( ); + return 0; }