1 | .\"Copyright 2006-2008 Sun Microsystems, Inc. |
---|
2 | .\" Copyright (c) 1996 Thinking Machines Corporation |
---|
3 | .TH MPI_File_create_errhandler 3 "Dec 08, 2009" "1.4" "Open MPI" |
---|
4 | .SH NAME |
---|
5 | \fBMPI_File_create_errhandler \fP \- Creates an MPI-style error handler that can be attached to a file. |
---|
6 | |
---|
7 | .SH SYNTAX |
---|
8 | .ft R |
---|
9 | .SH C Syntax |
---|
10 | .nf |
---|
11 | #include <mpi.h> |
---|
12 | int MPI_File_create_errhandler(MPI_File_errhandler_fn \fI*function\fP, |
---|
13 | MPI_Errhandler \fI*errhandler\fP) |
---|
14 | |
---|
15 | .SH Fortran Syntax |
---|
16 | .nf |
---|
17 | INCLUDE 'mpif.h' |
---|
18 | MPI_FILE_CREATE_ERRHANDLER(\fIFUNCTION, ERRHANDLER, IERROR\fP) |
---|
19 | EXTERNAL \fIFUNCTION\fP |
---|
20 | INTEGER \fIERRHANDLER, IERROR\fP |
---|
21 | |
---|
22 | .SH C++ Syntax |
---|
23 | #include <mpi.h> |
---|
24 | static MPI::Errhandler |
---|
25 | MPI::File::Create_errhandler(MPI::File::Errhandler_fn* |
---|
26 | \fIfunction\fP) |
---|
27 | |
---|
28 | .SH INPUT PARAMETER |
---|
29 | .ft R |
---|
30 | .TP 1i |
---|
31 | function |
---|
32 | User-defined error handling procedure (function). |
---|
33 | |
---|
34 | .SH OUTPUT PARAMETERS |
---|
35 | .ft R |
---|
36 | .TP 1i |
---|
37 | errhandler |
---|
38 | MPI error handler (handle). |
---|
39 | .ft R |
---|
40 | .TP 1i |
---|
41 | IERROR |
---|
42 | Fortran only: Error status (integer). |
---|
43 | |
---|
44 | .SH DESCRIPTION |
---|
45 | .ft R |
---|
46 | Registers the user routine \fIfunction\fP for use as an MPI exception handler. Returns in errhandler a handle to the registered exception handler. |
---|
47 | .sp |
---|
48 | In the C language, the user routine \fIfunction\fP should be a C function of type MPI_File_errhandler_fn, which is defined as |
---|
49 | .sp |
---|
50 | .nf |
---|
51 | typedef void (MPI_File_errhandler_fn)(MPI_File *, int *, |
---|
52 | \&...); |
---|
53 | .fi |
---|
54 | .sp |
---|
55 | The first argument to \fIfunction\fP is the file in use. The second is the error code |
---|
56 | to be returned by the MPI routine that raised the error. |
---|
57 | .sp |
---|
58 | In the Fortran language, the user routine should be of the form: |
---|
59 | .sp |
---|
60 | .nf |
---|
61 | SUBROUTINE FILE_ERRHANDLER_FN(FILE, ERROR_CODE, ...) |
---|
62 | INTEGER FILE, ERROR_CODE |
---|
63 | .fi |
---|
64 | .sp |
---|
65 | In C++, the user routine \fIfunction\fP should be of the form: |
---|
66 | .sp |
---|
67 | .nf |
---|
68 | typedef void MPI::File::Errhandler_fn(MPI::File &, int *, |
---|
69 | ...); |
---|
70 | .fi |
---|
71 | .sp |
---|
72 | |
---|
73 | .SH ERRORS |
---|
74 | 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. |
---|
75 | .sp |
---|
76 | Before the error value is returned, the current MPI error handler is |
---|
77 | called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. |
---|
78 | |
---|
79 | |
---|