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