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_function *function, MPI_Errhandler *errhandler)
MPI_COMM_CREATE_ERRHANDLER(FUNCTION, ERRHANDLER, IERROR)
EXTERNAL FUNCTION
INTEGER ERRHANDLER, IERROR
{ static MPI::Errhandler MPI::Comm::Create_errhandler(MPI::Comm::Errhandler_function* function) (binding deprecated, see Section Deprecated since MPI-2.2
) }
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_function, which is defined as
2.2 typedef void MPI_Comm_errhandler_function(MPI_Comm *, int *, ...);
In Fortran, the user routine should be of the form:
2.2 SUBROUTINE COMM_ERRHANDLER_FUNCTION(COMM, ERROR_CODE)
2.2 { typedef void MPI::Comm::Errhandler_function(MPI::Comm &, int *, ... ); (binding deprecated, see Section Deprecated since MPI-2.2
) }
The variable argument list is provided because it provides an
ISO-standard
hook for providing additional information to the error
handler; without this hook,
ISO C
prohibits additional arguments.
( End of rationale.)
A newly
created communicator inherits the error
handler that is associated with the ``parent'' communicator.
In particular, the user can specify a ``global'' error handler for
all communicators by
associating this handler with the communicator MPI_COMM_WORLD
immediately after initialization.
( End of advice to users.)
int MPI_Comm_set_errhandler(MPI_Comm comm, MPI_Errhandler errhandler)
MPI_COMM_SET_ERRHANDLER(COMM, ERRHANDLER, IERROR)
{ void MPI::Comm::Set_errhandler(const MPI::Errhandler& errhandler) (binding deprecated, see Section Deprecated since MPI-2.2
) }
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.
int MPI_Comm_get_errhandler(MPI_Comm comm, MPI_Errhandler *errhandler)
MPI_COMM_GET_ERRHANDLER(COMM, ERRHANDLER, IERROR)
{ MPI::Errhandler MPI::Comm::Get_errhandler() const (binding deprecated, see Section Deprecated since MPI-2.2
) }
Retrieves the error handler currently associated with a communicator.
This call is identical to MPI_ERRHANDLER_GET,
whose use is deprecated.
Example:
A library function may register at its entry point the current error
handler for a
communicator, set its own private error handler for this communicator, and
restore before exiting the previous error handler.
The first argument is the communicator in use.
The second is
the error code to be returned by the MPI routine that raised the error.
If the routine would have returned MPI_ERR_IN_STATUS, it is
the error code returned in the status for the request that caused the
error handler to be invoked.
The remaining arguments are ``stdargs'' arguments
whose number and meaning is implementation-dependent. An implementation
should clearly document these arguments.
Addresses are used so that the handler may be written in Fortran.
This typedef replaces MPI_Handler_function, whose use is
deprecated.
INTEGER COMM, ERROR_CODE
2.2
In C++, the user routine should be of the form:
Rationale.
Advice to users.
MPI_COMM_SET_ERRHANDLER(comm, errhandler) INOUT comm communicator (handle) IN errhandler new error handler for communicator (handle)
INTEGER COMM, ERRHANDLER, IERROR
MPI_COMM_GET_ERRHANDLER(comm, errhandler) IN comm communicator (handle) OUT errhandler error handler currently associated with
communicator (handle)
INTEGER COMM, ERRHANDLER, IERROR
Up: Error Handling
Next: Error Handlers for Windows
Previous: Error Handling
Return to MPI-2.2 Standard Index
Return to MPI Forum Home Page
(Unofficial) MPI-2.2 of September 4, 2009
HTML Generated on September 10, 2009