|
Packit Service |
c5cf8c |
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
|
|
Packit Service |
c5cf8c |
/*
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
* (C) 2001 by Argonne National Laboratory.
|
|
Packit Service |
c5cf8c |
* See COPYRIGHT in top-level directory.
|
|
Packit Service |
c5cf8c |
*/
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#ifndef ERRCODES_H_INCLUDED
|
|
Packit Service |
c5cf8c |
#define ERRCODES_H_INCLUDED
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* Prototypes for internal routines for the errhandling module */
|
|
Packit Service |
c5cf8c |
int MPIR_Err_set_msg(int, const char *);
|
|
Packit Service |
c5cf8c |
int MPIR_Err_add_class(void);
|
|
Packit Service |
c5cf8c |
int MPIR_Err_add_code(int);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/*
|
|
Packit Service |
c5cf8c |
This file contains the definitions of the error code fields
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
An error code is organized as
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
is-dynamic? specific-msg-sequence# specific-msg-index
|
|
Packit Service |
c5cf8c |
generic-code is-fatal? class
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
where
|
|
Packit Service |
c5cf8c |
class: The MPI error class (including dynamically defined classes)
|
|
Packit Service |
c5cf8c |
is-dynamic?: Set if this is a dynamically created error code (using
|
|
Packit Service |
c5cf8c |
the routines to add error classes and codes at runtime). This *must*
|
|
Packit Service |
c5cf8c |
be the top bit so that MPI_ERR_LASTCODE and MPI_LASTUSEDCODE can
|
|
Packit Service |
c5cf8c |
be set properly. (MPI_ERR_LASTCODE must be the largest valid
|
|
Packit Service |
c5cf8c |
error *code* from the predefined codes. The standard text is poorly
|
|
Packit Service |
c5cf8c |
worded here, but users and the rationale will expect to be able to
|
|
Packit Service |
c5cf8c |
perform (errcode <= MPI_ERR_LASTCODE). See Section 8.5 in the MPI-2
|
|
Packit Service |
c5cf8c |
standard for MPI_LASTUSEDCODE.
|
|
Packit Service |
c5cf8c |
generic-code: Index into the array of generic messages
|
|
Packit Service |
c5cf8c |
specific-msg-index: index to the *buffer* containing recent
|
|
Packit Service |
c5cf8c |
instance-specific error messages.
|
|
Packit Service |
c5cf8c |
specific-msg-sequence#: A sequence number used to check that the specific
|
|
Packit Service |
c5cf8c |
message text is still valid.
|
|
Packit Service |
c5cf8c |
is-fatal?: the error is fatal and should not be returned to the user
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
Note that error codes must also be positive integers, so we lose one
|
|
Packit Service |
c5cf8c |
bit (if they aren't positive, the comparisons agains MPI_ERR_LASTCODE
|
|
Packit Service |
c5cf8c |
and the value of the attribute MPI_LASTUSEDCODE will fail).
|
|
Packit Service |
c5cf8c |
*/
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* the error class bits are defined in mpir_err.h, are 0x0000007f */
|
|
Packit Service |
c5cf8c |
#define ERROR_CLASS_MASK MPIR_ERR_CLASS_MASK
|
|
Packit Service |
c5cf8c |
#define ERROR_CLASS_SIZE MPIR_ERR_CLASS_SIZE
|
|
Packit Service |
c5cf8c |
#define ERROR_DYN_MASK 0x40000000
|
|
Packit Service |
c5cf8c |
#define ERROR_DYN_SHIFT 30
|
|
Packit Service |
c5cf8c |
#define ERROR_GENERIC_MASK 0x0007FF00
|
|
Packit Service |
c5cf8c |
#define ERROR_GENERIC_SIZE 2048
|
|
Packit Service |
c5cf8c |
#define ERROR_GENERIC_SHIFT 8
|
|
Packit Service |
c5cf8c |
#define ERROR_SPECIFIC_INDEX_MASK 0x03F80000
|
|
Packit Service |
c5cf8c |
#define ERROR_SPECIFIC_INDEX_SIZE 128
|
|
Packit Service |
c5cf8c |
#define ERROR_SPECIFIC_INDEX_SHIFT 19
|
|
Packit Service |
c5cf8c |
#define ERROR_SPECIFIC_SEQ_MASK 0x3C000000
|
|
Packit Service |
c5cf8c |
/* Size is size of field as an integer, not the number of bits */
|
|
Packit Service |
c5cf8c |
#define ERROR_SPECIFIC_SEQ_SIZE 16
|
|
Packit Service |
c5cf8c |
#define ERROR_SPECIFIC_SEQ_SHIFT 26
|
|
Packit Service |
c5cf8c |
#define ERROR_FATAL_MASK 0x00000080
|
|
Packit Service |
c5cf8c |
#define ERROR_GET_CLASS(mpi_errno_) MPIR_ERR_GET_CLASS(mpi_errno_)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* These must correspond to the masks defined above */
|
|
Packit Service |
c5cf8c |
#define ERROR_MAX_NCLASS ERROR_CLASS_SIZE
|
|
Packit Service |
c5cf8c |
#define ERROR_MAX_NCODE 8192
|
|
Packit Service |
c5cf8c |
#endif /* ERRCODES_H_INCLUDED */
|