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.
13 static char MTEST_Descrip[] = "Simple intercomm barrier test";
16 /* This only checks that the Barrier operation accepts intercommunicators.
17 It does not check for the semantics of a intercomm barrier (all processes
18 in the local group can exit when (but not before) all processes in the
19 remote group enter the barrier */
20 int main( int argc, char *argv[] )
25 /* MPI_Datatype datatype; */
27 MTest_Init( &argc, &argv );
29 /* datatype = MPI_INT; */
30 /* Get an intercommunicator */
31 while (MTestGetIntercomm( &comm, &leftGroup, 4 )) {
32 if (comm == MPI_COMM_NULL)
35 /* To improve reporting of problems about operations, we
36 change the error handler to errors return */
37 MPI_Comm_set_errhandler( comm, MPI_ERRORS_RETURN );
39 err = MPI_Barrier( comm );
42 MTestPrintError( err );
46 /* In the right group */
47 err = MPI_Barrier( comm );
50 MTestPrintError( err );
53 MTestFreeComm( &comm );
56 MTest_Finalize( errs );