X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3d39ee2f8a52715e6b417575029faa8a91307f21..7842bd614301712801b9f2b4a117824333cd3e16:/teshsuite/smpi/mpich3-test/comm/cmsplit.c diff --git a/teshsuite/smpi/mpich3-test/comm/cmsplit.c b/teshsuite/smpi/mpich3-test/comm/cmsplit.c index cd14521685..216d8909e5 100644 --- a/teshsuite/smpi/mpich3-test/comm/cmsplit.c +++ b/teshsuite/smpi/mpich3-test/comm/cmsplit.c @@ -13,44 +13,44 @@ static char MTEST_Descrip[] = "Test comm split"; */ -int main( int argc, char *argv[] ) +int main(int argc, char *argv[]) { int errs = 0; int rank, size, color, srank; - MPI_Comm comm, scomm; + MPI_Comm comm, scomm; - MTest_Init( &argc, &argv ); + MTest_Init(&argc, &argv); - MPI_Comm_dup( MPI_COMM_WORLD, &comm ); + MPI_Comm_dup(MPI_COMM_WORLD, &comm); - MPI_Comm_rank( comm, &rank ); - MPI_Comm_size( comm, &size ); + MPI_Comm_rank(comm, &rank); + MPI_Comm_size(comm, &size); if (size < 4) { - fprintf( stderr, "This test requires at least four processes." ); - MPI_Abort( MPI_COMM_WORLD, 1 ); - exit(1); + fprintf(stderr, "This test requires at least four processes."); + MPI_Abort(MPI_COMM_WORLD, 1); } color = MPI_UNDEFINED; - if (rank < 2) color = 1; - MPI_Comm_split( comm, color, size - rank, &scomm ); - + if (rank < 2) + color = 1; + MPI_Comm_split(comm, color, size - rank, &scomm); + if (rank < 2) { - /* Check that the ranks are ordered correctly */ - MPI_Comm_rank( scomm, &srank ); - if (srank != 1 - rank) { - errs++; - } - MPI_Comm_free( &scomm ); + /* Check that the ranks are ordered correctly */ + MPI_Comm_rank(scomm, &srank); + if (srank != 1 - rank) { + errs++; + } + MPI_Comm_free(&scomm); } else { - if (scomm != MPI_COMM_NULL) { - errs++; - } + if (scomm != MPI_COMM_NULL) { + errs++; + } } - MPI_Comm_free( &comm ); - MTest_Finalize( errs ); + MPI_Comm_free(&comm); + MTest_Finalize(errs); MPI_Finalize(); return 0; }