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