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.


Define Documentation

#define MOC_ERR_ARG   13000

Invalid argument of some other kind.

Definition at line 43 of file moc_error_codes.h.

Referenced by MOC_Error_class(), MOC_Error_string(), MOC_Get_count(), and MOC_Get_version().

#define MOC_ERR_BAD_ALIGNMENT   16001

Base-Adress of Buffer isn't 16-byte aligned.

Definition at line 66 of file moc_error_codes.h.

Referenced by MOC_Get_data(), MOC_IGet_data(), MOC_IPut_data(), and MOC_Put_data().

#define MOC_ERR_BAD_SIZE   16002

Bad Size (probably no multiple of 16).

Definition at line 67 of file moc_error_codes.h.

Referenced by MOC_IPut_data(), and MOC_Put_data().

#define MOC_ERR_BUFFER   1000

Invalid buffer pointer.

Definition at line 31 of file moc_error_codes.h.

#define MOC_ERR_BUFFER_OVERFLOW   17002

Internal Buffer Overflow.

Definition at line 62 of file moc_error_codes.h.

Referenced by MOC_Add_spu_thread().

#define MOC_ERR_COMM   5000

Invalid communicator.

Definition at line 35 of file moc_error_codes.h.

Referenced by MOC_Barrier(), MOC_Comm_rank(), and MOC_Comm_size().

#define MOC_ERR_COUNT   2000

Invalid count argument.

Definition at line 32 of file moc_error_codes.h.

#define MOC_ERR_DIMS   12000

Invalid dimension argument.

Definition at line 42 of file moc_error_codes.h.

#define MOC_ERR_GROUP   9000

Invalid group.

Definition at line 39 of file moc_error_codes.h.

#define MOC_ERR_IN_STATUS   18000

Error code is in status.

Definition at line 48 of file moc_error_codes.h.

#define MOC_ERR_INTERN   17000

#define MOC_ERR_LASTCODE   20000

Last error code.

Definition at line 50 of file moc_error_codes.h.

Referenced by MOC_Error_class(), and MOC_Error_string().

#define MOC_ERR_MESSAGE_EXHAUSTED   17005

No further messages possible.

Definition at line 65 of file moc_error_codes.h.

Referenced by IMOC_getFreeEntry(), and IMOC_getFreeMID().

#define MOC_ERR_NO_BUFFER   17004

Insufficient Buffer-Space.

Definition at line 64 of file moc_error_codes.h.

Referenced by MOC_Bsend().

#define MOC_ERR_NO_MEMORY   17003

Insufficient Memory.

Definition at line 63 of file moc_error_codes.h.

Referenced by MOC_Init().

#define MOC_ERR_NOT_IMPLEMENTED   17001

Function not implemented.

Definition at line 61 of file moc_error_codes.h.

#define MOC_ERR_OP   10000

Invalid operation.

Definition at line 40 of file moc_error_codes.h.

#define MOC_ERR_OTHER   16000

Known error not in this list.

Definition at line 46 of file moc_error_codes.h.

#define MOC_ERR_PENDING   19000

Pending request.

Definition at line 49 of file moc_error_codes.h.

#define MOC_ERR_RANK   6000

Invalid rank.

Definition at line 36 of file moc_error_codes.h.

#define MOC_ERR_REQUEST   7000

Invalid request (handle).

Definition at line 37 of file moc_error_codes.h.

Referenced by MOC_Test(), and MOC_Wait().

#define MOC_ERR_ROOT   8000

Invalid root.

Definition at line 38 of file moc_error_codes.h.

#define MOC_ERR_TAG   4000

Invalid tag argument.

Definition at line 34 of file moc_error_codes.h.

#define MOC_ERR_TOPOLOGY   11000

Invalid topology.

Definition at line 41 of file moc_error_codes.h.

#define MOC_ERR_TRUNCATE   15000

Message truncated on receive.

Definition at line 45 of file moc_error_codes.h.

#define MOC_ERR_TYPE   3000

Invalid datatype argument.

Definition at line 33 of file moc_error_codes.h.

Referenced by MOC_Recv().

#define MOC_ERR_UNKNOWN   14000

Unknown error.

Definition at line 44 of file moc_error_codes.h.

#define MOC_MAX_ERROR_STRING   255

Maximal length of error-text.

Definition at line 101 of file moc.h.

#define MOC_SUCCESS   0


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.

Definition at line 7 of file moc_error_class.c.

References MOC_ERR_ARG, and MOC_ERR_LASTCODE.

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.

Definition at line 68 of file moc_error_string_ppu.c.

References ERROR_STRINGS_COUNT, MOC_ERR_ARG, and MOC_ERR_LASTCODE.


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