ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/utils/simError.h
Revision: 1390
Committed: Wed Nov 25 20:02:06 2009 UTC (15 years, 5 months ago) by gezelter
Content type: text/plain
File size: 1077 byte(s)
Log Message:
Almost all of the changes necessary to create OpenMD out of our old
project (OOPSE-4)

File Contents

# Content
1
2 #ifndef __FORTRAN90
3 #ifndef UTILS_SIMERROR_H
4 #define UTILS_SIMERROR_H
5
6 #define MAX_SIM_ERROR_MSG_LENGTH 2000
7
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 int isEventLoop;
17 } errorStruct;
18
19 extern errorStruct painCave;
20
21 extern char checkPointMsg[MAX_SIM_ERROR_MSG_LENGTH];
22
23 extern int worldRank;
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 int simError( void );
30
31 void initSimError( void );
32
33 void errorCheckPoint( void );
34
35 #ifdef __cplusplus
36 }
37 #endif
38
39 #endif
40
41 #else
42
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
49 PRIVATE
50 SEQUENCE
51 character(len = MAX_SIM_ERROR_MSG_LENGTH) :: errMsg
52 logical :: isFatal
53 integer :: severity
54 logical :: isEventLoop;
55 end type errorStruct
56
57 type (errorStruct), public, save :: painCave
58
59 #endif