1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
3 * (C) 2004 by Argonne National Laboratory.
4 * See COPYRIGHT in top-level directory.
9 /* FIXME: This behavior of this test is implementation specific. */
11 static int verbose = 0;
13 int main(int argc, char **argv)
17 char MY_ERROR_STRING[10];
19 sprintf(MY_ERROR_STRING, "MY ERROR");
21 MPI_Init(&argc, &argv);
24 printf("Adding My Error Class\n");
25 MPI_Add_error_class(&MY_ERROR_CLASS);
27 printf("Adding My Error Code\n");
28 MPI_Add_error_code(MY_ERROR_CLASS, &MY_ERROR_CODE);
30 printf("Adding My Error String\n");
31 MPI_Add_error_string(MY_ERROR_CODE, MY_ERROR_STRING);
34 printf("Calling Error Handler\n");
35 MPI_Comm_call_errhandler(MPI_COMM_WORLD, MY_ERROR_CODE);
37 /* We should not get here, because the default error handler
38 * is ERRORS_ARE_FATAL. This makes sure that the correct error
39 * handler is called and that no failure occurred (such as
40 * a SEGV) in Comm_call_errhandler on the default
42 printf("After the Error Handler Has Been Called\n");