1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
4 * (C) 2003 by Argonne National Laboratory.
5 * See COPYRIGHT in top-level directory.
11 int main( int argc, char *argv[] )
14 int topo_type, size, dims[1], periods[1];
17 MTest_Init( &argc, &argv );
19 /* Check that topo test returns the correct type, including
22 MPI_Topo_test( MPI_COMM_WORLD, &topo_type );
23 if (topo_type != MPI_UNDEFINED) {
25 printf( "Topo type of comm world is not UNDEFINED\n" );
28 MPI_Comm_size( MPI_COMM_WORLD, &size );
31 MPI_Cart_create( MPI_COMM_WORLD, 1, dims, periods, 0, &comm );
32 MPI_Topo_test( comm, &topo_type );
33 if (topo_type != MPI_CART) {
35 printf( "Topo type of cart comm is not CART\n" );
38 MPI_Comm_free( &comm );
39 /* FIXME: still need graph example */
41 MTest_Finalize( errs );