Problem with error handlers

Jeff Squyres (jsquyres@lsc.nd.edu)
Thu, 19 Jun 1997 23:36:10 -0500 (EST)

There is a problem with error handlers -- what is the type of
MPI_ERRORS_RETURN? It used to be MPI_Handler_function, but that is now
deprecated in favor of MPI_Comm_errhandler_fn, MPI_File_errhandler_fn, and
MPI_Win_errhandler_fn.

Since there are now three types of errorhandler functions,
MPI_ERRORS_RETURN, MPI_ERRORS_ABORT, and MPI_ERRORS_THROW_EXCEPTIONS will
have type matching problems. I see two choices:

1) Have three types of each errorhandler function (yuk!):

MPI_COMM_ERRORS_RETURN, MPI_FILE_ERRORS_RETURN, MPI_WIN_ERRORS_RETURN,
etc.

2) Consolidate the errorhandler typedefs into one typedef with the first
argument being (void *):

typedef void MPI_Errhandler_fn(void *, int *, ...)

This would also eliminate the need for different functions to create an
errhandler: MPI_Comm_create_errhandler, MPI_Win_create_errhandler, and
MPI_File_create_errhandler can all be consolidated into one function.

In fact, if the MPI_Handler_function typedef from MPI-1 is relaxed to have
its first argument be (void *), the original binding (from MPI-1) for
MPI_Errhandler_create would be sufficient. Note that this would *not*
break any existing MPI-1 codes.

And if the Create errhandler functions are consolidated, there's no
reason not to consolidate the Get and Set errhandler functions as well...

{+} Jeff Squyres
{+} squyres@cse.nd.edu
{+} Perpetual Obsessive Notre Dame Student Craving Utter Madness
{+} "I came to ND for 4 years and ended up staying for a decade"