| 5 |  |  | 
| 6 |  | #define MAX_SIM_ERROR_MSG_LENGTH 2000 | 
| 7 |  |  | 
| 8 | < | #define OOPSE_ERROR   1 | 
| 9 | < | #define OOPSE_WARNING 2 | 
| 10 | < | #define OOPSE_INFO    3 | 
| 8 | > | #define OPENMD_ERROR   1 | 
| 9 | > | #define OPENMD_WARNING 2 | 
| 10 | > | #define OPENMD_INFO    3 | 
| 11 |  |  | 
| 12 |  | typedef struct{ | 
| 13 |  | char errMsg[MAX_SIM_ERROR_MSG_LENGTH]; | 
| 14 |  | int isFatal; | 
| 15 |  | int severity; | 
| 16 | – | #ifdef IS_MPI | 
| 16 |  | int isEventLoop; | 
| 18 | – | #endif // IS_MPI | 
| 17 |  | } errorStruct; | 
| 18 |  |  | 
| 19 |  | extern errorStruct painCave; | 
| 20 |  |  | 
| 23 | – | #ifdef IS_MPI | 
| 24 | – |  | 
| 21 |  | extern char checkPointMsg[MAX_SIM_ERROR_MSG_LENGTH]; | 
| 22 |  |  | 
| 23 |  | extern int worldRank; | 
| 28 | – | #endif | 
| 24 |  |  | 
| 25 |  | #ifdef __cplusplus | 
| 26 |  | extern "C" { | 
| 27 | < | #endif // __cplusplus | 
| 27 | > | #endif | 
| 28 |  |  | 
| 29 | < | int simError( void ); // returns 1 if handled. 0 otherwise. | 
| 29 | > | int simError( void ); | 
| 30 |  |  | 
| 31 | < | void initSimError( void ); // needed to be called from main before anything | 
| 37 | < | // goes wrong. | 
| 31 | > | void initSimError( void ); | 
| 32 |  |  | 
| 33 | < | #ifdef IS_MPI | 
| 34 | < |  | 
| 41 | < | void MPIcheckPoint( void ); | 
| 42 | < |  | 
| 43 | < | #endif // IS_MPI | 
| 44 | < |  | 
| 33 | > | void errorCheckPoint( void ); | 
| 34 | > |  | 
| 35 |  | #ifdef __cplusplus | 
| 36 |  | } | 
| 37 | < | #endif //__cplusplus | 
| 37 | > | #endif | 
| 38 |  |  | 
| 39 | < | #endif // __SIMERROR_H__ | 
| 39 | > | #endif | 
| 40 |  |  | 
| 41 | < | #else // __FORTRAN90 | 
| 41 | > | #else | 
| 42 |  |  | 
| 43 | < | INTEGER, PARAMETER:: OOPSE_ERROR   = 1 | 
| 44 | < | INTEGER, PARAMETER:: OOPSE_WARNING = 2 | 
| 45 | < | INTEGER, PARAMETER:: OOPSE_INFO    = 3 | 
| 43 | > | INTEGER, PARAMETER:: OPENMD_ERROR   = 1 | 
| 44 | > | INTEGER, PARAMETER:: OPENMD_WARNING = 2 | 
| 45 | > | INTEGER, PARAMETER:: OPENMD_INFO    = 3 | 
| 46 |  | INTEGER, PARAMETER:: MAX_SIM_ERROR_MSG_LENGTH = 2000 | 
| 47 |  |  | 
| 48 |  | type, public :: errorStruct | 
| 51 |  | character(len = MAX_SIM_ERROR_MSG_LENGTH) :: errMsg | 
| 52 |  | logical :: isFatal | 
| 53 |  | integer :: severity | 
| 64 | – | #ifdef IS_MPI | 
| 54 |  | logical :: isEventLoop; | 
| 66 | – | #endif // IS_MPI | 
| 55 |  | end type errorStruct | 
| 56 |  |  | 
| 57 |  | type (errorStruct), public, save :: painCave | 
| 58 |  |  | 
| 59 | < | #endif // __FORTRAN90 | 
| 59 | > | #endif |