X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0e9c0448c6566825b170b98ecff716b098bda10e..b9625f82f86db0674e911887addce45dca31b57f:/teshsuite/smpi/mpich3-test/pt2pt/bsend5.c diff --git a/teshsuite/smpi/mpich3-test/pt2pt/bsend5.c b/teshsuite/smpi/mpich3-test/pt2pt/bsend5.c index 767a586df3..44623624bd 100644 --- a/teshsuite/smpi/mpich3-test/pt2pt/bsend5.c +++ b/teshsuite/smpi/mpich3-test/pt2pt/bsend5.c @@ -5,65 +5,64 @@ */ #include #include "mpi.h" -#include "mpitest.h" +#include "mpitest.h" #define BUFSIZE 2000 -int main( int argc, char *argv[] ) +int main(int argc, char *argv[]) { MPI_Status status; - MPI_Comm comm,scomm; + MPI_Comm comm, scomm; int a[10], b[10]; - int buf[BUFSIZE], *bptr, bl, i, j, rank, size, color, errs=0; + int buf[BUFSIZE], *bptr, bl, i, j, rank, size, color, errs = 0; - MTest_Init( 0, 0 ); - MPI_Comm_rank( MPI_COMM_WORLD, &rank ); + MTest_Init(0, 0); + MPI_Comm_rank(MPI_COMM_WORLD, &rank); color = rank % 2; - MPI_Comm_split( MPI_COMM_WORLD, color, rank, &scomm ); - MPI_Intercomm_create( scomm, 0, MPI_COMM_WORLD, 1-color, 52, &comm); - MPI_Comm_rank( comm, &rank ); - MPI_Comm_remote_size( comm, &size ); - MPI_Buffer_attach( buf, BUFSIZE ); - - for (j=0; j<10; j++) { - for (i=0; i<10; i++) { - a[i] = (rank + 10 * j) * size + i; - } - MPI_Bsend( a, 10, MPI_INT, 0, 27+j, comm ); + MPI_Comm_split(MPI_COMM_WORLD, color, rank, &scomm); + MPI_Intercomm_create(scomm, 0, MPI_COMM_WORLD, 1 - color, 52, &comm); + MPI_Comm_rank(comm, &rank); + MPI_Comm_remote_size(comm, &size); + MPI_Buffer_attach(buf, BUFSIZE); + + for (j = 0; j < 10; j++) { + for (i = 0; i < 10; i++) { + a[i] = (rank + 10 * j) * size + i; + } + MPI_Bsend(a, 10, MPI_INT, 0, 27 + j, comm); } if (rank == 0) { - for (i=0; i