--- trunk/src/utils/simError.h 2004/09/24 04:16:43 2 +++ trunk/src/utils/simError.h 2008/04/25 15:14:47 1241 @@ -1,6 +1,7 @@ + #ifndef __FORTRAN90 -#ifndef __SIMERROR_H__ -#define __SIMERROR_H__ +#ifndef UTILS_SIMERROR_H +#define UTILS_SIMERROR_H #define MAX_SIM_ERROR_MSG_LENGTH 2000 @@ -12,59 +13,47 @@ typedef struct{ char errMsg[MAX_SIM_ERROR_MSG_LENGTH]; int isFatal; int severity; -#ifdef IS_MPI int isEventLoop; -#endif // IS_MPI } errorStruct; extern errorStruct painCave; -#ifdef IS_MPI - extern char checkPointMsg[MAX_SIM_ERROR_MSG_LENGTH]; extern int worldRank; -#endif #ifdef __cplusplus extern "C" { -#endif // __cplusplus +#endif - int simError( void ); // returns 1 if handled. 0 otherwise. + int simError( void ); - void initSimError( void ); // needed to be called from main before anything - // goes wrong. + void initSimError( void ); -#ifdef IS_MPI - - void MPIcheckPoint( void ); - -#endif // IS_MPI - + void errorCheckPoint( void ); + #ifdef __cplusplus } -#endif //__cplusplus +#endif -#endif // __SIMERROR_H__ +#endif -#else // __FORTRAN90 +#else INTEGER, PARAMETER:: OOPSE_ERROR = 1 INTEGER, PARAMETER:: OOPSE_WARNING = 2 INTEGER, PARAMETER:: OOPSE_INFO = 3 INTEGER, PARAMETER:: MAX_SIM_ERROR_MSG_LENGTH = 2000 -type, public :: errorStruct - PRIVATE - SEQUENCE - character(len = MAX_SIM_ERROR_MSG_LENGTH) :: errMsg - logical :: isFatal - integer :: severity -#ifdef IS_MPI - logical :: isEventLoop; -#endif // IS_MPI -end type errorStruct + type, public :: errorStruct + PRIVATE + SEQUENCE + character(len = MAX_SIM_ERROR_MSG_LENGTH) :: errMsg + logical :: isFatal + integer :: severity + logical :: isEventLoop; + end type errorStruct -type (errorStruct), public, save :: painCave + type (errorStruct), public, save :: painCave -#endif // __FORTRAN90 +#endif