To make it possible for an application to interpret an error code, the routine MPI_ERROR_CLASS converts any error code into one of a small set of standard error codes, called error classes. Valid error classes include
MPI_SUCCESS | No error |
MPI_ERR_BUFFER | Invalid buffer pointer |
MPI_ERR_COUNT | Invalid count argument |
MPI_ERR_TYPE | Invalid datatype argument |
MPI_ERR_TAG | Invalid tag argument |
MPI_ERR_COMM | Invalid communicator |
MPI_ERR_RANK | Invalid rank |
MPI_ERR_REQUEST | Invalid request (handle) |
MPI_ERR_ROOT | Invalid root |
MPI_ERR_GROUP | Invalid group |
MPI_ERR_OP | Invalid operation |
MPI_ERR_TOPOLOGY | Invalid topology |
MPI_ERR_DIMS | Invalid dimension argument |
MPI_ERR_ARG | Invalid argument of some other kind |
MPI_ERR_UNKNOWN | Unknown error |
MPI_ERR_TRUNCATE | Message truncated on receive |
MPI_ERR_OTHER | Known error not in this list |
MPI_ERR_INTERN | Internal MPI (implementation) error |
MPI_ERR_IN_STATUS | Error code is in status |
MPI_ERR_PENDING | Pending request |
MPI_ERR_LASTCODE | Last error code |
The error classes are a subset of the error codes: an MPI function
may return an error class number; and the function
MPI_ERROR_STRING can be used to compute the error string
associated with an error class.
Enhancement/Correction in the MPI-1.2 Standard:
Note that MPI_SUCCESS is necessary to be
consistent with C practice; the separation of error classes and error codes
allows us to define the error classes this way. Having a known
LASTCODE is often a nice sanity check as well.(End of rationale.)
MPI_ERROR_CLASS( errorcode, errorclass )
int MPI_Error_class(int errorcode, int *errorclass)
MPI_ERROR_CLASS(ERRORCODE, ERRORCLASS, IERROR)
INTEGER ERRORCODE, ERRORCLASS, IERROR
The function MPI_ERROR_CLASS maps each standard error code (error class) onto itself.
MPI-Standard for MARMOT