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 #include "mpicolltest.h"
14 static char MTEST_Descrip[] = "Simple intercomm barrier test";
17 /* This only checks that the Barrier operation accepts intercommunicators.
18 It does not check for the semantics of a intercomm barrier (all processes
19 in the local group can exit when (but not before) all processes in the
20 remote group enter the barrier */
21 int main(int argc, char *argv[])
26 MPI_Datatype datatype;
28 MTest_Init(&argc, &argv);
31 /* Get an intercommunicator */
32 while (MTestGetIntercomm(&comm, &leftGroup, 4)) {
33 if (comm == MPI_COMM_NULL)
36 /* To improve reporting of problems about operations, we
37 * change the error handler to errors return */
38 MPI_Comm_set_errhandler(comm, MPI_ERRORS_RETURN);
40 err = MTest_Barrier(comm);
47 /* In the right group */
48 err = MTest_Barrier(comm);