Error-Handling
[Environmental Management]

Collaboration diagram for Error-Handling:

Detailed Description

This section describes how errors are handled.

Every function should return an integer if possible. This integer should be MOC_SUCCESS if the operation teminated successfully otherwise an error-code telling the reason of the error is returned.

Every function should return an integer if possible. This integer should be MOC_SUCCESS if the operation teminated successfully otherwise an error-code telling the reason of the error is returned.

For more information see Chapter 7.2 of the MPI 1.3 Standard.


MPI_ERROR-CLASSES

Error-classes defined by the MPI-standard.

Every error-code returned by a MOC-function should belong to an error-class or be an error-class itself. This enables implementation-independend error-handling.

Value-range: 0 = MOC_SUCCESS < MOC_ERR_... <= MOC_ERR_LASTCODE

#define MOC_SUCCESS   0
 No error.
#define MOC_ERR_BUFFER   1000
 Invalid buffer pointer.
#define MOC_ERR_COUNT   2000
 Invalid count argument.
#define MOC_ERR_TYPE   3000
 Invalid datatype argument.
#define MOC_ERR_TAG   4000
 Invalid tag argument.
#define MOC_ERR_COMM   5000
 Invalid communicator.
#define MOC_ERR_RANK   6000
 Invalid rank.
#define MOC_ERR_REQUEST   7000
 Invalid request (handle).
#define MOC_ERR_ROOT   8000
 Invalid root.
#define MOC_ERR_GROUP   9000
 Invalid group.
#define MOC_ERR_OP   10000
 Invalid operation.
#define MOC_ERR_TOPOLOGY   11000
 Invalid topology.
#define MOC_ERR_DIMS   12000
 Invalid dimension argument.
#define MOC_ERR_ARG   13000
 Invalid argument of some other kind.
#define MOC_ERR_UNKNOWN   14000
 Unknown error.
#define MOC_ERR_TRUNCATE   15000
 Message truncated on receive.
#define MOC_ERR_OTHER   16000
 Known error not in this list.
#define MOC_ERR_INTERN   17000
 Internal MOC (implementation) error.
#define MOC_ERR_IN_STATUS   18000
 Error code is in status.
#define MOC_ERR_PENDING   19000
 Pending request.
#define MOC_ERR_LASTCODE   20000
 Last error code.

MOC-Error-Codes

Implementation dependent Error-Codes.

#define MOC_ERR_NOT_IMPLEMENTED   17001
 Function not implemented.
#define MOC_ERR_BUFFER_OVERFLOW   17002
 Internal Buffer Overflow.
#define MOC_ERR_NO_MEMORY   17003
 Insufficient Memory.
#define MOC_ERR_NO_BUFFER   17004
 Insufficient Buffer-Space.
#define MOC_ERR_MESSAGE_EXHAUSTED   17005
 No further messages possible.
#define MOC_ERR_BAD_ALIGNMENT   16001
 Base-Adress of Buffer isn't 16-byte aligned.
#define MOC_ERR_BAD_SIZE   16002
 Bad Size (probably no multiple of 16).

Defines

#define MOC_MAX_ERROR_STRING   255
 Maximal length of error-text.

Functions

int MOC_Error_string (int errorcode, char *string, int *resultlen)
 Returns an error-text for a given error code.
int MOC_Error_class (int errorcode, int *errorclass)
 Converts an error code into an error class.


Function Documentation

int MOC_Error_class ( int  errorcode,
int *  errorclass 
)

Converts an error code into an error class.

Parameters:
errorcode in Error code returned by an MPI routine
errorclass out Error class associated with errorcode
Return values:
MOC_SUCCESS No error; MPI routine completed successfully.
MOC_ERR_COMM Invalid argument. Most likely an error-code out of range.

int MOC_Error_string ( int  errorcode,
char *  string,
int *  resultlen 
)

Returns an error-text for a given error code.

The error-text is already terminated by '\0'.

Parameters:
errorcode in Error code returned by an MPI routine
string out Text that corresponds to the errorcode
resultlen out Length of string
Return values:
MOC_SUCCESS No error; MPI routine completed successfully.
MOC_ERR_ARG Invalid argument. Most likely an error-code out of range.


Generated on Thu Feb 12 13:48:18 2009 for MPI On Cell (Documentation) by  doxygen 1.5.6