4.13.1 Error Handlers for Communicators



MPI_COMM_CREATE_ERRHANDLER(function, errhandler)

IN
function user defined error handling procedure (function)
OUT
errhandler MPI-/ error handler (handle)

int MPI_Comm_create_errhandler(MPI_Comm_errhandler_fn *function, MPI_Errhandler *errhandler)



MPI_COMM_CREATE_ERRHANDLER(FUNCTION, ERRHANDLER, IERROR)EXTERNAL FUNCTION
INTEGER ERRHANDLER, IERROR



int MPI::Comm::Create_errhandler(MPI::Comm::Errhandler_fn* function)



static MPI::Errhandler

Creates an error handler that can be attached to communicators. This function is identical to MPI_ERRHANDLER_CREATE, whose use is deprecated.

The user routine should be, in C, a function of type MPI_Comm_errhandler_fn, which is defined as

typedef void MPI_Comm_errhandler_fn(MPI_Comm *, int *, ...);



The first argument is the communicator in use, the second is the error code to be returned. This typedef replaces MPI_Handler_function, whose use is deprecated.

In Fortran, the user routine should be of the form:

SUBROUTINE COMM_ERRHANDLER_FN(COMM, ERROR_CODE, ...) INTEGER COMM, ERROR_CODE



In C++, the user routine should be of the form:

typedef void MPI::Comm::Errhandler_fn(MPI::Comm &, int *, ...);





MPI_COMM_SET_ERRHANDLER(comm, errhandler)

INOUT
comm communicator (handle)
IN
errhandler new error handler for communicator (handle)

int MPI_Comm_set_errhandler(MPI_Comm comm, MPI_Errhandler errhandler)



MPI_COMM_SET_ERRHANDLER(COMM, ERRHANDLER, IERROR) INTEGER COMM, ERRHANDLER, IERROR



int MPI::Comm::Set_errhandler(const MPI::Errhandler& errhandler)



void

Attaches a new error handler to a communicator. The error handler must be either a predefined error handler, or an error handler created by a call to MPI_COMM_CREATE_ERRHANDLER. This call is identical to MPI_ERRHANDLER_SET, whose use is deprecated.



MPI_COMM_GET_ERRHANDLER(comm, errhandler)

IN
comm communicator (handle)
OUT
errhandler error handler currently associated with communicator (handle)

int MPI_Comm_get_errhandler(MPI_Comm comm, MPI_Errhandler *errhandler)



MPI_COMM_GET_ERRHANDLER(COMM, ERRHANDLER, IERROR) INTEGER COMM, ERRHANDLER, IERROR



int MPI::Comm::Get_errhandler() const



MPI::Errhandler

Retrieves the error handler currently associated with a communicator. This call is identical to MPI_ERRHANDLER_GET, whose use is deprecated.

MPI-Standard for MARMOT