X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3928c9b3860770cd5efbaa3515e9df6d09273e52..cbc0be326e8b850c93bea7d50949a92c9eae0bf6:/teshsuite/smpi/mpich3-test/pt2pt/eagerdt.c diff --git a/teshsuite/smpi/mpich3-test/pt2pt/eagerdt.c b/teshsuite/smpi/mpich3-test/pt2pt/eagerdt.c index 7855b75e4f..529d490394 100644 --- a/teshsuite/smpi/mpich3-test/pt2pt/eagerdt.c +++ b/teshsuite/smpi/mpich3-test/pt2pt/eagerdt.c @@ -14,65 +14,67 @@ static char MTEST_Descrip[] = "Test of a large number of derived-datatype messag #define MAX_MSGS 30 -int main( int argc, char *argv[] ) +int main(int argc, char *argv[]) { int errs = 0; int rank, size, dest, source; int i, indices[40]; MPI_Aint extent; int *buf, *bufs[MAX_MSGS]; - MPI_Comm comm; - MPI_Datatype dtype; - MPI_Request req[MAX_MSGS]; + MPI_Comm comm; + MPI_Datatype dtype; + MPI_Request req[MAX_MSGS]; - MTest_Init( &argc, &argv ); + MTest_Init(&argc, &argv); comm = MPI_COMM_WORLD; - MPI_Comm_rank( comm, &rank ); - MPI_Comm_size( comm, &size ); + MPI_Comm_rank(comm, &rank); + MPI_Comm_size(comm, &size); source = 0; - dest = size - 1; - + dest = size - 1; + /* Setup by creating a blocked datatype that is likely to be processed - in a piecemeal fashion */ - for (i=0; i<30; i++) { - indices[i] = i*40; + * in a piecemeal fashion */ + for (i = 0; i < 30; i++) { + indices[i] = i * 40; } /* 30 blocks of size 10 */ - MPI_Type_create_indexed_block( 30, 10, indices, MPI_INT, &dtype ); - MPI_Type_commit( &dtype ); - + MPI_Type_create_indexed_block(30, 10, indices, MPI_INT, &dtype); + MPI_Type_commit(&dtype); + /* Create the corresponding message buffers */ - MPI_Type_extent( dtype, &extent ); - for (i=0; i