--- trunk/src/utils/simError.h 2004/09/24 04:16:43 2 +++ trunk/src/utils/simError.h 2009/11/25 20:02:06 1390 @@ -1,70 +1,59 @@ + #ifndef __FORTRAN90 -#ifndef __SIMERROR_H__ -#define __SIMERROR_H__ +#ifndef UTILS_SIMERROR_H +#define UTILS_SIMERROR_H #define MAX_SIM_ERROR_MSG_LENGTH 2000 -#define OOPSE_ERROR 1 -#define OOPSE_WARNING 2 -#define OOPSE_INFO 3 +#define OPENMD_ERROR 1 +#define OPENMD_WARNING 2 +#define OPENMD_INFO 3 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:: OPENMD_ERROR = 1 + INTEGER, PARAMETER:: OPENMD_WARNING = 2 + INTEGER, PARAMETER:: OPENMD_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