1 |
#ifndef __SIMERROR_H__ |
2 |
#define __SIMERROR_H__ |
3 |
|
4 |
#define MAX_SIM_ERROR_MSG_LENGTH 2000 |
5 |
|
6 |
#define OOPSE_ERROR 1 |
7 |
#define OOPSE_WARNING 2 |
8 |
#define OOPSE_INFO 3 |
9 |
|
10 |
typedef struct{ |
11 |
char errMsg[MAX_SIM_ERROR_MSG_LENGTH]; |
12 |
int isFatal; |
13 |
int severity; |
14 |
#ifdef IS_MPI |
15 |
int isEventLoop; |
16 |
#endif // IS_MPI |
17 |
} errorStruct; |
18 |
|
19 |
extern errorStruct painCave; |
20 |
|
21 |
#ifdef IS_MPI |
22 |
|
23 |
extern char checkPointMsg[MAX_SIM_ERROR_MSG_LENGTH]; |
24 |
|
25 |
extern int worldRank; |
26 |
#endif |
27 |
|
28 |
#ifdef __cplusplus |
29 |
extern "C" { |
30 |
#endif // __cplusplus |
31 |
|
32 |
int simError( void ); // returns 1 if handled. 0 otherwise. |
33 |
|
34 |
void initSimError( void ); // needed to be called from main before anything |
35 |
// goes wrong. |
36 |
|
37 |
#ifdef IS_MPI |
38 |
|
39 |
void MPIcheckPoint( void ); |
40 |
|
41 |
#endif // IS_MPI |
42 |
|
43 |
#ifdef __cplusplus |
44 |
} |
45 |
#endif //__cplusplus |
46 |
|
47 |
#endif // __SIMERROR_H__ |