## 4.13.2. Error Handlers for Windows

Up: Error Handlers Next: Error Handlers for Files Previous: Error Handlers for Communicators

MPI_WIN_CREATE_ERRHANDLER(function, errhandler)
IN function | user defined error handling procedure (function)
OUT errhandler | MPI error handler (handle)

`int MPI_Win_create_errhandler(MPI_Win_errhandler_fn *function, MPI_Errhandler *errhandler)
`

`MPI_WIN_CREATE_ERRHANDLER(FUNCTION, ERRHANDLER, IERROR)
EXTERNAL FUNCTION
INTEGER ERRHANDLER, IERROR
`

`static MPI::Errhandler MPI::Win::Create_errhandler(MPI::Win::Errhandler_fn* function)
`

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

`typedef void MPI_Win_errhandler_fn(MPI_Win *, int *, ...);
`

The first argument is the window in use, the second is the error code to be returned.

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

`SUBROUTINE WIN_ERRHANDLER_FN(WIN, ERROR_CODE, ... )
INTEGER WIN, ERROR_CODE
`

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

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

MPI_WIN_SET_ERRHANDLER(win, errhandler)
INOUT win | window (handle)
IN errhandler | new error handler for window (handle)

`int MPI_Win_set_errhandler(MPI_Win win, MPI_Errhandler errhandler)
`

`MPI_WIN_SET_ERRHANDLER(WIN, ERRHANDLER, IERROR)
INTEGER WIN, ERRHANDLER, IERROR
`

`void MPI::Win::Set_errhandler(const MPI::Errhandler& errhandler)
`

Attaches a new error handler to a window. The error handler must be either a predefined error handler, or an error handler created by a call to MPI_WIN_CREATE_ERRHANDLER.

MPI_WIN_GET_ERRHANDLER(win, errhandler)
IN win | window (handle)
OUT errhandler | error handler currently associated with window (handle)

`int MPI_Win_get_errhandler(MPI_Win win, MPI_Errhandler *errhandler)
`

`MPI_WIN_GET_ERRHANDLER(WIN, ERRHANDLER, IERROR)
INTEGER WIN, ERRHANDLER, IERROR
`

`MPI::Errhandler MPI::Win::Get_errhandler() const
`

Retrieves the error handler currently associated with a window.

Up: Error Handlers Next: Error Handlers for Files Previous: Error Handlers for Communicators

Return to MPI-2 Standard Index
Return to MPI 1.1 Standard Index
Return to MPI Forum Home Page

MPI-2.0 of July 18, 1997
HTML Generated on September 10, 2001