1 |
cnh |
1.10 |
C $Header: /u/gcmpack/models/MITgcmUV/eesupp/inc/EEPARAMS.h,v 1.9 2001/05/29 14:01:35 adcroft Exp $ |
2 |
adcroft |
1.9 |
C $Name: $ |
3 |
cnh |
1.10 |
CBOP |
4 |
|
|
C !ROUTINE: EEPARAMS.h |
5 |
|
|
C !INTERFACE: |
6 |
|
|
C include "EEPARAMS.h" |
7 |
cnh |
1.1 |
C |
8 |
cnh |
1.10 |
C !DESCRIPTION: |
9 |
|
|
C *==========================================================* |
10 |
cnh |
1.1 |
C | EEPARAMS.h | |
11 |
cnh |
1.10 |
C *==========================================================* |
12 |
cnh |
1.1 |
C | Parameters for "execution environemnt". These are used | |
13 |
|
|
C | by both the particular numerical model and the "execution| |
14 |
|
|
C | environment" support routines. | |
15 |
cnh |
1.10 |
C *==========================================================* |
16 |
|
|
CEOP |
17 |
cnh |
1.1 |
|
18 |
|
|
C MAX_LEN_MBUF - Default message buffer max. size |
19 |
|
|
C MAX_LEN_FNAM - Default file name max. size |
20 |
|
|
C MAX_LEN_PREC - Default record length for reading "parameter" files |
21 |
|
|
INTEGER MAX_LEN_MBUF |
22 |
|
|
PARAMETER ( MAX_LEN_MBUF = 512 ) |
23 |
|
|
INTEGER MAX_LEN_FNAM |
24 |
|
|
PARAMETER ( MAX_LEN_FNAM = 512 ) |
25 |
|
|
INTEGER MAX_LEN_PREC |
26 |
|
|
PARAMETER ( MAX_LEN_PREC = 200 ) |
27 |
|
|
|
28 |
|
|
C SQUEEZE_RIGHT - Flag indicating right blank space removal |
29 |
|
|
C from text field. |
30 |
|
|
C SQUEEZE_LEFT - Flag indicating left blank space removal |
31 |
|
|
C from text field. |
32 |
|
|
C SQUEEZE_BOTH - Flag indicating left and right blank |
33 |
|
|
C space removal from text field. |
34 |
|
|
C PRINT_MAP_XY - Flag indicating to plot map as XY slices |
35 |
|
|
C PRINT_MAP_XZ - Flag indicating to plot map as XZ slices |
36 |
|
|
C PRINT_MAP_YZ - Flag indicating to plot map as YZ slices |
37 |
|
|
C commentCharacter - Variable used in column 1 of parameter files to |
38 |
|
|
C indicate comments. |
39 |
cnh |
1.3 |
C INDEX_I - Variable used to select an index label |
40 |
|
|
C INDEX_J for formatted input parameters. |
41 |
|
|
C INDEX_K |
42 |
|
|
C INDEX_NONE |
43 |
cnh |
1.1 |
CHARACTER*(*) SQUEEZE_RIGHT |
44 |
|
|
PARAMETER ( SQUEEZE_RIGHT = 'R' ) |
45 |
|
|
CHARACTER*(*) SQUEEZE_LEFT |
46 |
|
|
PARAMETER ( SQUEEZE_LEFT = 'L' ) |
47 |
|
|
CHARACTER*(*) SQUEEZE_BOTH |
48 |
|
|
PARAMETER ( SQUEEZE_BOTH = 'B' ) |
49 |
|
|
CHARACTER*(*) PRINT_MAP_XY |
50 |
|
|
PARAMETER ( PRINT_MAP_XY = 'XY' ) |
51 |
|
|
CHARACTER*(*) PRINT_MAP_XZ |
52 |
|
|
PARAMETER ( PRINT_MAP_XZ = 'XZ' ) |
53 |
|
|
CHARACTER*(*) PRINT_MAP_YZ |
54 |
|
|
PARAMETER ( PRINT_MAP_YZ = 'YZ' ) |
55 |
|
|
CHARACTER*(*) commentCharacter |
56 |
|
|
PARAMETER ( commentCharacter = '#' ) |
57 |
cnh |
1.3 |
INTEGER INDEX_I |
58 |
|
|
INTEGER INDEX_J |
59 |
|
|
INTEGER INDEX_K |
60 |
|
|
INTEGER INDEX_NONE |
61 |
|
|
PARAMETER ( INDEX_I = 1, |
62 |
|
|
& INDEX_J = 2, |
63 |
|
|
& INDEX_K = 3, |
64 |
|
|
& INDEX_NONE = 4 ) |
65 |
cnh |
1.1 |
|
66 |
cnh |
1.5 |
|
67 |
|
|
C EXCH_IGNORE_CORNERS - Flag to select ignoring or |
68 |
|
|
C EXCH_UPDATE_CORNERS updating of corners during |
69 |
|
|
C an edge exchange. |
70 |
|
|
INTEGER EXCH_IGNORE_CORNERS |
71 |
|
|
INTEGER EXCH_UPDATE_CORNERS |
72 |
|
|
PARAMETER ( EXCH_IGNORE_CORNERS = 0, |
73 |
|
|
& EXCH_UPDATE_CORNERS = 1 ) |
74 |
|
|
|
75 |
|
|
C FORWARD_SIMULATION |
76 |
|
|
C REVERSE_SIMULATION |
77 |
|
|
INTEGER FORWARD_SIMULATION |
78 |
|
|
INTEGER REVERSE_SIMULATION |
79 |
|
|
PARAMETER ( FORWARD_SIMULATION = 0, |
80 |
|
|
& REVERSE_SIMULATION = 1 ) |
81 |
|
|
|
82 |
|
|
|
83 |
cnh |
1.1 |
C Particularly weird and obscure voodoo numbers |
84 |
|
|
C lShare - This wants to be the length in |
85 |
|
|
C [148]-byte words of the size of |
86 |
|
|
C the address "window" that is snooped |
87 |
|
|
C on an SMP bus. By separating elements in |
88 |
|
|
C the global sum buffer we can avoid generating |
89 |
|
|
C extraneous invalidate traffic between |
90 |
|
|
C processors. The length of this window is usually |
91 |
|
|
C a cache line i.e. small O(64 bytes). |
92 |
|
|
C The buffer arrays are usually short arrays |
93 |
|
|
C and are declared REAL ARRA(lShare[148],LBUFF). |
94 |
|
|
C Setting lShare[148] to 1 is like making these arrays |
95 |
|
|
C one dimensional. |
96 |
cnh |
1.5 |
INTEGER cacheLineSize |
97 |
cnh |
1.1 |
INTEGER lShare1 |
98 |
|
|
INTEGER lShare4 |
99 |
|
|
INTEGER lShare8 |
100 |
cnh |
1.5 |
PARAMETER ( cacheLineSize = 256 ) |
101 |
|
|
PARAMETER ( lShare1 = cacheLineSize ) |
102 |
|
|
PARAMETER ( lShare4 = cacheLineSize/4 ) |
103 |
|
|
PARAMETER ( lShare8 = cacheLineSize/8 ) |
104 |
cnh |
1.1 |
|
105 |
|
|
C MAX_NO_THREADS - Maximum number of threads allowed. |
106 |
|
|
C MAX_NO_PROCS - Maximum number of processes allowed. |
107 |
|
|
C MAX_NO_BARRIERS - Maximum number of distinct thread "barriers" |
108 |
|
|
INTEGER MAX_NO_THREADS |
109 |
heimbach |
1.7 |
PARAMETER ( MAX_NO_THREADS = 32 ) |
110 |
cnh |
1.1 |
INTEGER MAX_NO_PROCS |
111 |
|
|
PARAMETER ( MAX_NO_PROCS = 128 ) |
112 |
|
|
INTEGER MAX_NO_BARRIERS |
113 |
|
|
PARAMETER ( MAX_NO_BARRIERS = 1 ) |
114 |
|
|
|
115 |
|
|
C-- COMMON /EEPARAMS_L/ Execution environment public logical variables. |
116 |
|
|
C eeBootError - Flag indicating error during multi-processing |
117 |
|
|
C eeEndError initialisation/termination. |
118 |
|
|
C fatalError - Flag used to indicate that the model is ended with |
119 |
|
|
C an error |
120 |
adcroft |
1.9 |
COMMON /EEPARAMS_L/ eeBootError, fatalError, eeEndError, |
121 |
|
|
& useCubedSphereExchange |
122 |
cnh |
1.1 |
LOGICAL eeBootError |
123 |
|
|
LOGICAL eeEndError |
124 |
|
|
LOGICAL fatalError |
125 |
adcroft |
1.9 |
LOGICAL useCubedSphereExchange |
126 |
cnh |
1.1 |
|
127 |
|
|
C-- COMMON /EPARAMS_I/ Execution environment public integer variables. |
128 |
|
|
C errorMessageUnit - Fortran IO unit for error messages |
129 |
|
|
C standardMessageUnit - Fortran IO unit for informational messages |
130 |
|
|
C scrUnit1 - Scratch file 1 unit number |
131 |
|
|
C scrUnit2 - Scratch file 2 unit number |
132 |
|
|
C eeDataUnit - Unit number used for reading "execution environment" parameter file. |
133 |
|
|
C modelDataUnit - Unit number for reading "model" parameter file. |
134 |
|
|
C numberOfProcs - Number of processes computing in parallel |
135 |
|
|
C pidIO - Id of process to use for I/O. |
136 |
|
|
C myBxLo, myBxHi - Extents of domain in blocks in X and Y |
137 |
|
|
C myByLo, myByHi that each threads is responsble for. |
138 |
|
|
C myProcId - My own "process" id. |
139 |
|
|
C myPx - My X coord on the proc. grid. |
140 |
|
|
C myPy - My Y coord on the proc. grid. |
141 |
|
|
C myXGlobalLo - My bottom-left (south-west) x-index |
142 |
|
|
C global domain. The x-coordinate of this |
143 |
|
|
C point in for example m or degrees is *not* |
144 |
|
|
C specified here. A model needs to provide a |
145 |
|
|
C mechanism for deducing that information if it |
146 |
|
|
C is needed. |
147 |
|
|
C myYGlobalLo - My bottom-left (south-west) y-index in |
148 |
|
|
C global domain. The y-coordinate of this |
149 |
|
|
C point in for example m or degrees is *not* |
150 |
|
|
C specified here. A model needs to provide a |
151 |
|
|
C mechanism for deducing that information if it |
152 |
|
|
C is needed. |
153 |
|
|
C nThreads - No. of threads |
154 |
|
|
C nTx - No. of threads in X |
155 |
|
|
C nTy - No. of threads in Y |
156 |
|
|
C This assumes a simple cartesian |
157 |
|
|
C gridding of the threads which is not required elsewhere |
158 |
|
|
C but that makes it easier. |
159 |
cnh |
1.4 |
C ioErrorCount - IO Error Counter. Set to zero initially and increased |
160 |
|
|
C by one every time an IO error occurs. |
161 |
cnh |
1.1 |
COMMON /EEPARAMS_I/ errorMessageUnit, standardMessageUnit, |
162 |
|
|
& scrUnit1, scrUnit2, eeDataUnit, modelDataUnit, |
163 |
|
|
& numberOfProcs, pidIO, myProcId, |
164 |
|
|
& myPx, myPy, myXGlobalLo, myYGlobalLo, nThreads, |
165 |
|
|
& myBxLo, myBxHi, myByLo, myByHi, |
166 |
cnh |
1.4 |
& nTx, nTy, ioErrorCount |
167 |
cnh |
1.1 |
INTEGER eeDataUnit |
168 |
|
|
INTEGER errorMessageUnit |
169 |
cnh |
1.4 |
INTEGER ioErrorCount(MAX_NO_THREADS) |
170 |
cnh |
1.1 |
INTEGER modelDataUnit |
171 |
|
|
INTEGER myBxLo(MAX_NO_THREADS) |
172 |
|
|
INTEGER myBxHi(MAX_NO_THREADS) |
173 |
|
|
INTEGER myByLo(MAX_NO_THREADS) |
174 |
|
|
INTEGER myByHi(MAX_NO_THREADS) |
175 |
|
|
INTEGER myProcId |
176 |
|
|
INTEGER myPx |
177 |
|
|
INTEGER myPy |
178 |
|
|
INTEGER myXGlobalLo |
179 |
|
|
INTEGER myYGlobalLo |
180 |
|
|
INTEGER nThreads |
181 |
|
|
INTEGER nTx |
182 |
|
|
INTEGER nTy |
183 |
|
|
INTEGER numberOfProcs |
184 |
|
|
INTEGER pidIO |
185 |
|
|
INTEGER scrUnit1 |
186 |
|
|
INTEGER scrUnit2 |
187 |
|
|
INTEGER standardMessageUnit |