1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
4 * (C) 2012 by Argonne National Laboratory.
5 * See COPYRIGHT in top-level directory.
14 /* Ensure that setting a user-defined error handler on predefined
15 * communicators does not cause a problem at finalize time. Regression
16 * test for ticket #1591 */
17 void errf(MPI_Comm * comm, int *ec);
18 void errf(MPI_Comm * comm, int *ec)
23 int main(int argc, char **argv)
27 MTest_Init(&argc, &argv);
28 MPI_Comm_rank(MPI_COMM_WORLD, &wrank);
29 MPI_Comm_create_errhandler((MPI_Comm_errhandler_function *) errf, &errh);
30 MPI_Comm_set_errhandler(MPI_COMM_WORLD, errh);
31 MPI_Comm_set_errhandler(MPI_COMM_SELF, errh);
32 MPI_Errhandler_free(&errh);