179. Error Handlers for Files


Up: Error Handling Next: Freeing Errorhandlers and Retrieving Error Strings Previous: Error Handlers for Windows

MPI_FILE_CREATE_ERRHANDLER(function, errhandler)
IN functionuser defined error handling procedure (function)
OUT errhandler MPI error handler (handle)

2.2 int MPI_File_create_errhandler(MPI_File_errhandler_function *function, MPI_Errhandler *errhandler)
MPI_FILE_CREATE_ERRHANDLER(FUNCTION, ERRHANDLER, IERROR)
EXTERNAL FUNCTION
INTEGER ERRHANDLER, IERROR

2.2 { static MPI::Errhandler MPI::File::Create_errhandler(MPI::File::Errhandler_function* function) (binding deprecated, see Section Deprecated since MPI-2.2 ) }

Creates an error handler that can be attached to a file object. The user routine should be, in C, a function of type MPI_File_errhandler_function, which is defined as

2.2 typedef void MPI_File_errhandler_function(MPI_File *, int *, ...);
The first argument is the file in use, the second is the error code to be returned.

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

2.2 SUBROUTINE FILE_ERRHANDLER_FUNCTION(FILE, ERROR_CODE)
INTEGER FILE, ERROR_CODE

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

2.2 { typedef void MPI::File::Errhandler_function(MPI::File &, int *, ... ); (binding deprecated, see Section Deprecated since MPI-2.2 ) }

MPI_FILE_SET_ERRHANDLER(file, errhandler)
INOUT filefile (handle)
IN errhandlernew error handler for file (handle)

int MPI_File_set_errhandler(MPI_File file, MPI_Errhandler errhandler)

MPI_FILE_SET_ERRHANDLER(FILE, ERRHANDLER, IERROR)
INTEGER FILE, ERRHANDLER, IERROR

{ void MPI::File::Set_errhandler(const MPI::Errhandler& errhandler) (binding deprecated, see Section Deprecated since MPI-2.2 ) }

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

MPI_FILE_GET_ERRHANDLER(file, errhandler)
IN filefile (handle)
OUT errhandlererror handler currently associated with file (handle)

int MPI_File_get_errhandler(MPI_File file, MPI_Errhandler *errhandler)

MPI_FILE_GET_ERRHANDLER(FILE, ERRHANDLER, IERROR)
INTEGER FILE, ERRHANDLER, IERROR

{ MPI::Errhandler MPI::File::Get_errhandler() const (binding deprecated, see Section Deprecated since MPI-2.2 ) }

Retrieves the error handler currently associated with a file.



Up: Error Handling Next: Freeing Errorhandlers and Retrieving Error Strings Previous: Error Handlers for Windows


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