Sun MPI 4.0 Programming and Reference Guide

MPI I/O Error Handling

Sun MPI I/O error reporting follows the MPI-2 standard. By default, errors are reported in the form of standard error codes (found in /opt/SUNWhpc/include/mpi.h). Error classes and their meanings are listed in Table B-2. They can also be found in mpif.h (for Fortran) and mpi++.h (for C++).

You can change the default error handler by specifying MPI_FILE_NULL as the file handle with the routine MPI_File_set_errhandler, even no file is currently open. Or, you can use the same routine to change a specific file's error handler.

Table B-2 Sun MPI I/O Error Classes

Error Class 

Value 

Meaning 

MPI_ERR_FILE

20

Bad file handle.  

MPI_ERR_NOT_SAME

21

Collective argument not identical on all processes.  

MPI_ERR_AMODE

22

Unsupported amode passed to open.

MPI_ERR_UNSUPPORTED_DATAREP

23

Unsupported datarep passed to MPI_File_set_view.

MPI_ERR_UNSUPPORTED_OPERATION

24

Unsupported operation, such as seeking on a file that supports only sequential access.  

MPI_ERR_NO_SUCH_FILE

25

File (or directory) does not exist.  

MPI_ERR_FILE_EXISTS

26

File exists.  

MPI_ERR_BAD_FILE

27

Invalid file name (for example, path name too long).  

MPI_ERR_ACCESS

28

Permission denied.  

MPI_ERR_NO_SPACE

29

Not enough space.  

MPI_ERR_QUOTA

30

Quota exceeded.  

MPI_ERR_READ_ONLY

31

Read-only file system.  

MPI_ERR_FILE_IN_USE

32

File operation could not be completed, as the file is currently open by some process.  

MPI_ERR_DUP_DATAREP

33

Conversion functions could not be registered because a data representation identifier that was already defined was passed to MPI_REGISTER_DATAREP.

MPI_ERR_CONVERSION

34

An error occurred in a user-supplied data-conversion function.  

MPI_ERR_IO

35

I/O error.  

MPI_ERR_INFO

37

Invalid info object.  

MPI_ERR_INFO_KEY

38

Illegal info key.  

MPI_ERR_INFO_NOKEY

39

No such key . 

MPI_ERR_INFO_VALUE

40

Illegal info value.  

MPI_ERR_LASTCODE

46

Last error code.