[97] | 1 | .\"Copyright 2006-2008 Sun Microsystems, Inc. |
---|
| 2 | .\" Copyright (c) 1996 Thinking Machines Corporation |
---|
| 3 | .TH MPI_Errhandler_create 3 "Dec 08, 2009" "1.4" "Open MPI" |
---|
| 4 | .SH NAME |
---|
| 5 | \fBMPI_Errhandler_create \fP \- Creates an MPI-style error handler -- use of this routine is deprecated. |
---|
| 6 | |
---|
| 7 | .SH SYNTAX |
---|
| 8 | .ft R |
---|
| 9 | .SH C Syntax |
---|
| 10 | .nf |
---|
| 11 | #include <mpi.h> |
---|
| 12 | int MPI_Errhandler_create(MPI_Handler_function *\fIfunction\fP, |
---|
| 13 | MPI_Errhandler *\fIerrhandler\fP) |
---|
| 14 | |
---|
| 15 | .SH Fortran Syntax |
---|
| 16 | .nf |
---|
| 17 | INCLUDE 'mpif.h' |
---|
| 18 | MPI_ERRHANDLER_CREATE(\fIFUNCTION, ERRHANDLER, IERROR\fP) |
---|
| 19 | EXTERNAL \fIFUNCTION\fP |
---|
| 20 | INTEGER \fIERRHANDLER, IERROR\fP |
---|
| 21 | |
---|
| 22 | |
---|
| 23 | .SH INPUT PARAMETER |
---|
| 24 | .ft R |
---|
| 25 | .TP 1i |
---|
| 26 | function |
---|
| 27 | User-defined error handling procedure. |
---|
| 28 | |
---|
| 29 | .SH OUTPUT PARAMETERS |
---|
| 30 | .ft R |
---|
| 31 | .TP 1i |
---|
| 32 | errhandler |
---|
| 33 | MPI error handler (handle). |
---|
| 34 | .ft R |
---|
| 35 | .TP 1i |
---|
| 36 | IERROR |
---|
| 37 | Fortran only: Error status (integer). |
---|
| 38 | |
---|
| 39 | .SH DESCRIPTION |
---|
| 40 | .ft R |
---|
| 41 | Note that use of this routine is \fIdeprecated\fP as of MPI-2. Please use MPI_Comm_create_errhandler instead. |
---|
| 42 | .sp |
---|
| 43 | This deprecated routine is not available in C++. |
---|
| 44 | .sp |
---|
| 45 | Registers the user routine function for use as an MPI exception handler. Returns in errhandler a handle to the registered exception handler. |
---|
| 46 | .sp |
---|
| 47 | In the C language, the user routine should be a C function of type MPI_Handler_function, which is defined as |
---|
| 48 | .sp |
---|
| 49 | .nf |
---|
| 50 | typedef void (MPI_Handler_function)(MPI_Comm *, int *, \&...); |
---|
| 51 | .fi |
---|
| 52 | .sp |
---|
| 53 | The first argument is the communicator in use. The second is the error code |
---|
| 54 | 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. |
---|
| 55 | |
---|
| 56 | .SH NOTE |
---|
| 57 | .ft R |
---|
| 58 | The MPI-1 Standard states that an implementation may make the output value (errhandler) simply the address of the function. However, the action of MPI_Errhandler_ free makes this impossible, since it is required to set the value of the argument to MPI_ERRHANDLER_NULL. In addition, the actual error handler must remain until all communicators that use it are freed. |
---|
| 59 | |
---|
| 60 | .SH ERRORS |
---|
| 61 | Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI:Exception object. |
---|
| 62 | .sp |
---|
| 63 | Before the error value is returned, the current MPI error handler is |
---|
| 64 | called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. |
---|
| 65 | |
---|
| 66 | .SH SEE ALSO |
---|
| 67 | .br |
---|
| 68 | MPI_Comm_create_errhandler |
---|
| 69 | .br |
---|
| 70 | MPI_Comm_get_errhandler |
---|
| 71 | .br |
---|
| 72 | MPI_Comm_set_errhandler |
---|
| 73 | |
---|
| 74 | |
---|
| 75 | |
---|