| 1 |
+ |
|
| 2 |
|
#ifndef __FORTRAN90 |
| 3 |
< |
#ifndef __SIMERROR_H__ |
| 4 |
< |
#define __SIMERROR_H__ |
| 3 |
> |
#ifndef UTILS_SIMERROR_H |
| 4 |
> |
#define UTILS_SIMERROR_H |
| 5 |
|
|
| 6 |
|
#define MAX_SIM_ERROR_MSG_LENGTH 2000 |
| 7 |
|
|
| 15 |
|
int severity; |
| 16 |
|
#ifdef IS_MPI |
| 17 |
|
int isEventLoop; |
| 18 |
< |
#endif // IS_MPI |
| 18 |
> |
#endif |
| 19 |
|
} errorStruct; |
| 20 |
|
|
| 21 |
|
extern errorStruct painCave; |
| 29 |
|
|
| 30 |
|
#ifdef __cplusplus |
| 31 |
|
extern "C" { |
| 32 |
< |
#endif // __cplusplus |
| 32 |
> |
#endif |
| 33 |
|
|
| 34 |
< |
int simError( void ); // returns 1 if handled. 0 otherwise. |
| 34 |
> |
int simError( void ); |
| 35 |
|
|
| 36 |
< |
void initSimError( void ); // needed to be called from main before anything |
| 37 |
< |
// goes wrong. |
| 36 |
> |
void initSimError( void ); |
| 37 |
> |
|
| 38 |
|
|
| 39 |
|
#ifdef IS_MPI |
| 40 |
|
|
| 41 |
|
void MPIcheckPoint( void ); |
| 42 |
|
|
| 43 |
< |
#endif // IS_MPI |
| 43 |
> |
#endif |
| 44 |
|
|
| 45 |
|
#ifdef __cplusplus |
| 46 |
|
} |
| 47 |
< |
#endif //__cplusplus |
| 47 |
> |
#endif |
| 48 |
|
|
| 49 |
< |
#endif // __SIMERROR_H__ |
| 49 |
> |
#endif |
| 50 |
|
|
| 51 |
< |
#else // __FORTRAN90 |
| 51 |
> |
#else |
| 52 |
|
|
| 53 |
|
INTEGER, PARAMETER:: OOPSE_ERROR = 1 |
| 54 |
|
INTEGER, PARAMETER:: OOPSE_WARNING = 2 |
| 55 |
|
INTEGER, PARAMETER:: OOPSE_INFO = 3 |
| 56 |
|
INTEGER, PARAMETER:: MAX_SIM_ERROR_MSG_LENGTH = 2000 |
| 57 |
|
|
| 58 |
< |
type, public :: errorStruct |
| 59 |
< |
PRIVATE |
| 60 |
< |
SEQUENCE |
| 61 |
< |
character(len = MAX_SIM_ERROR_MSG_LENGTH) :: errMsg |
| 62 |
< |
logical :: isFatal |
| 63 |
< |
integer :: severity |
| 58 |
> |
type, public :: errorStruct |
| 59 |
> |
PRIVATE |
| 60 |
> |
SEQUENCE |
| 61 |
> |
character(len = MAX_SIM_ERROR_MSG_LENGTH) :: errMsg |
| 62 |
> |
logical :: isFatal |
| 63 |
> |
integer :: severity |
| 64 |
|
#ifdef IS_MPI |
| 65 |
< |
logical :: isEventLoop; |
| 66 |
< |
#endif // IS_MPI |
| 67 |
< |
end type errorStruct |
| 65 |
> |
logical :: isEventLoop; |
| 66 |
> |
#endif |
| 67 |
> |
end type errorStruct |
| 68 |
|
|
| 69 |
< |
type (errorStruct), public, save :: painCave |
| 69 |
> |
type (errorStruct), public, save :: painCave |
| 70 |
|
|
| 71 |
< |
#endif // __FORTRAN90 |
| 71 |
> |
#endif |