| 1 |
C $Header: /u/gcmpack/MITgcm/eesupp/inc/EEPARAMS.h,v 1.35 2014/02/10 22:06:32 dimitri Exp $ |
| 2 |
C $Name: $ |
| 3 |
CBOP |
| 4 |
C !ROUTINE: EEPARAMS.h |
| 5 |
C !INTERFACE: |
| 6 |
C include "EEPARAMS.h" |
| 7 |
C |
| 8 |
C !DESCRIPTION: |
| 9 |
C *==========================================================* |
| 10 |
C | EEPARAMS.h | |
| 11 |
C *==========================================================* |
| 12 |
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 |
C *==========================================================* |
| 16 |
CEOP |
| 17 |
|
| 18 |
C ======== EESIZE.h ======================================== |
| 19 |
|
| 20 |
C MAX_LEN_MBUF :: Default message buffer max. size |
| 21 |
C MAX_LEN_FNAM :: Default file name max. size |
| 22 |
C MAX_LEN_PREC :: Default rec len for reading "parameter" files |
| 23 |
|
| 24 |
INTEGER MAX_LEN_MBUF |
| 25 |
PARAMETER ( MAX_LEN_MBUF = 512 ) |
| 26 |
INTEGER MAX_LEN_FNAM |
| 27 |
PARAMETER ( MAX_LEN_FNAM = 512 ) |
| 28 |
INTEGER MAX_LEN_PREC |
| 29 |
PARAMETER ( MAX_LEN_PREC = 200 ) |
| 30 |
|
| 31 |
C MAX_NO_THREADS :: Maximum number of threads allowed. |
| 32 |
CC MAX_NO_PROCS :: Maximum number of processes allowed. |
| 33 |
CC MAX_NO_BARRIERS :: Maximum number of distinct thread "barriers" |
| 34 |
INTEGER MAX_NO_THREADS |
| 35 |
PARAMETER ( MAX_NO_THREADS = 4 ) |
| 36 |
c INTEGER MAX_NO_PROCS |
| 37 |
c PARAMETER ( MAX_NO_PROCS = 70000 ) |
| 38 |
c INTEGER MAX_NO_BARRIERS |
| 39 |
c PARAMETER ( MAX_NO_BARRIERS = 1 ) |
| 40 |
|
| 41 |
C Particularly weird and obscure voodoo numbers |
| 42 |
C lShare :: This wants to be the length in |
| 43 |
C [148]-byte words of the size of |
| 44 |
C the address "window" that is snooped |
| 45 |
C on an SMP bus. By separating elements in |
| 46 |
C the global sum buffer we can avoid generating |
| 47 |
C extraneous invalidate traffic between |
| 48 |
C processors. The length of this window is usually |
| 49 |
C a cache line i.e. small O(64 bytes). |
| 50 |
C The buffer arrays are usually short arrays |
| 51 |
C and are declared REAL ARRA(lShare[148],LBUFF). |
| 52 |
C Setting lShare[148] to 1 is like making these arrays |
| 53 |
C one dimensional. |
| 54 |
INTEGER cacheLineSize |
| 55 |
INTEGER lShare1 |
| 56 |
INTEGER lShare4 |
| 57 |
INTEGER lShare8 |
| 58 |
PARAMETER ( cacheLineSize = 256 ) |
| 59 |
PARAMETER ( lShare1 = cacheLineSize ) |
| 60 |
PARAMETER ( lShare4 = cacheLineSize/4 ) |
| 61 |
PARAMETER ( lShare8 = cacheLineSize/8 ) |
| 62 |
|
| 63 |
CC MAX_VGS :: Maximum buffer size for Global Vector Sum |
| 64 |
c INTEGER MAX_VGS |
| 65 |
c PARAMETER ( MAX_VGS = 8192 ) |
| 66 |
|
| 67 |
C ======== EESIZE.h ======================================== |
| 68 |
|
| 69 |
C Symbolic values |
| 70 |
C precXXXX :: precision used for I/O |
| 71 |
INTEGER precFloat32 |
| 72 |
PARAMETER ( precFloat32 = 32 ) |
| 73 |
INTEGER precFloat64 |
| 74 |
PARAMETER ( precFloat64 = 64 ) |
| 75 |
|
| 76 |
C Real-type constant for some frequently used simple number (0,1,2,1/2): |
| 77 |
_RS zeroRS, oneRS, twoRS, halfRS |
| 78 |
PARAMETER ( zeroRS = 0.0 _d 0 , oneRS = 1.0 _d 0 ) |
| 79 |
PARAMETER ( twoRS = 2.0 _d 0 , halfRS = 0.5 _d 0 ) |
| 80 |
_RL zeroRL, oneRL, twoRL, halfRL |
| 81 |
PARAMETER ( zeroRL = 0.0 _d 0 , oneRL = 1.0 _d 0 ) |
| 82 |
PARAMETER ( twoRL = 2.0 _d 0 , halfRL = 0.5 _d 0 ) |
| 83 |
|
| 84 |
C UNSET_xxx :: Used to indicate variables that have not been given a value |
| 85 |
Real*8 UNSET_FLOAT8 |
| 86 |
PARAMETER ( UNSET_FLOAT8 = 1.234567D5 ) |
| 87 |
Real*4 UNSET_FLOAT4 |
| 88 |
PARAMETER ( UNSET_FLOAT4 = 1.234567E5 ) |
| 89 |
_RL UNSET_RL |
| 90 |
PARAMETER ( UNSET_RL = 1.234567D5 ) |
| 91 |
_RS UNSET_RS |
| 92 |
PARAMETER ( UNSET_RS = 1.234567D5 ) |
| 93 |
INTEGER UNSET_I |
| 94 |
PARAMETER ( UNSET_I = 123456789 ) |
| 95 |
|
| 96 |
C debLevX :: used to decide when to print debug messages |
| 97 |
INTEGER debLevZero |
| 98 |
INTEGER debLevA, debLevB, debLevC, debLevD, debLevE |
| 99 |
PARAMETER ( debLevZero=0 ) |
| 100 |
PARAMETER ( debLevA=1 ) |
| 101 |
PARAMETER ( debLevB=2 ) |
| 102 |
PARAMETER ( debLevC=3 ) |
| 103 |
PARAMETER ( debLevD=4 ) |
| 104 |
PARAMETER ( debLevE=5 ) |
| 105 |
|
| 106 |
C SQUEEZE_RIGHT :: Flag indicating right blank space removal |
| 107 |
C from text field. |
| 108 |
C SQUEEZE_LEFT :: Flag indicating left blank space removal |
| 109 |
C from text field. |
| 110 |
C SQUEEZE_BOTH :: Flag indicating left and right blank |
| 111 |
C space removal from text field. |
| 112 |
C PRINT_MAP_XY :: Flag indicating to plot map as XY slices |
| 113 |
C PRINT_MAP_XZ :: Flag indicating to plot map as XZ slices |
| 114 |
C PRINT_MAP_YZ :: Flag indicating to plot map as YZ slices |
| 115 |
C commentCharacter :: Variable used in column 1 of parameter |
| 116 |
C files to indicate comments. |
| 117 |
C INDEX_I :: Variable used to select an index label |
| 118 |
C INDEX_J for formatted input parameters. |
| 119 |
C INDEX_K |
| 120 |
C INDEX_NONE |
| 121 |
CHARACTER*(*) SQUEEZE_RIGHT |
| 122 |
PARAMETER ( SQUEEZE_RIGHT = 'R' ) |
| 123 |
CHARACTER*(*) SQUEEZE_LEFT |
| 124 |
PARAMETER ( SQUEEZE_LEFT = 'L' ) |
| 125 |
CHARACTER*(*) SQUEEZE_BOTH |
| 126 |
PARAMETER ( SQUEEZE_BOTH = 'B' ) |
| 127 |
CHARACTER*(*) PRINT_MAP_XY |
| 128 |
PARAMETER ( PRINT_MAP_XY = 'XY' ) |
| 129 |
CHARACTER*(*) PRINT_MAP_XZ |
| 130 |
PARAMETER ( PRINT_MAP_XZ = 'XZ' ) |
| 131 |
CHARACTER*(*) PRINT_MAP_YZ |
| 132 |
PARAMETER ( PRINT_MAP_YZ = 'YZ' ) |
| 133 |
CHARACTER*(*) commentCharacter |
| 134 |
PARAMETER ( commentCharacter = '#' ) |
| 135 |
INTEGER INDEX_I |
| 136 |
INTEGER INDEX_J |
| 137 |
INTEGER INDEX_K |
| 138 |
INTEGER INDEX_NONE |
| 139 |
PARAMETER ( INDEX_I = 1, |
| 140 |
& INDEX_J = 2, |
| 141 |
& INDEX_K = 3, |
| 142 |
& INDEX_NONE = 4 ) |
| 143 |
|
| 144 |
C EXCH_IGNORE_CORNERS :: Flag to select ignoring or |
| 145 |
C EXCH_UPDATE_CORNERS updating of corners during an edge exchange. |
| 146 |
INTEGER EXCH_IGNORE_CORNERS |
| 147 |
INTEGER EXCH_UPDATE_CORNERS |
| 148 |
PARAMETER ( EXCH_IGNORE_CORNERS = 0, |
| 149 |
& EXCH_UPDATE_CORNERS = 1 ) |
| 150 |
|
| 151 |
C FORWARD_SIMULATION |
| 152 |
C REVERSE_SIMULATION |
| 153 |
C TANGENT_SIMULATION |
| 154 |
INTEGER FORWARD_SIMULATION |
| 155 |
INTEGER REVERSE_SIMULATION |
| 156 |
INTEGER TANGENT_SIMULATION |
| 157 |
PARAMETER ( FORWARD_SIMULATION = 0, |
| 158 |
& REVERSE_SIMULATION = 1, |
| 159 |
& TANGENT_SIMULATION = 2 ) |
| 160 |
|
| 161 |
C-- COMMON /EEPARAMS_L/ Execution environment public logical variables. |
| 162 |
C eeBootError :: Flags indicating error during multi-processing |
| 163 |
C eeEndError :: initialisation and termination. |
| 164 |
C fatalError :: Flag used to indicate that the model is ended with an error |
| 165 |
C debugMode :: controls printing of debug msg (sequence of S/R calls). |
| 166 |
C useSingleCpuIO :: When useSingleCpuIO is set, MDS_WRITE_FIELD outputs from |
| 167 |
C master MPI process only. -- NOTE: read from main parameter |
| 168 |
C file "data" and not set until call to INI_PARMS. |
| 169 |
C useSingleCpuInput :: When useSingleCpuInput is set, EXF_INTERP_READ |
| 170 |
C reads forcing files from master MPI process only. |
| 171 |
C -- NOTE: read from main parameter file "data" |
| 172 |
C and defaults to useSingleCpuInput = useSingleCpuIO |
| 173 |
C printMapIncludesZeros :: Flag that controls whether character constant |
| 174 |
C map code ignores exact zero values. |
| 175 |
C useCubedSphereExchange :: use Cubed-Sphere topology domain. |
| 176 |
C useCoupler :: use Coupler for a multi-components set-up. |
| 177 |
C useNEST_PARENT :: use Parent Nesting interface (pkg/nest_parent) |
| 178 |
C useNEST_CHILD :: use Child Nesting interface (pkg/nest_child) |
| 179 |
C useOASIS :: use OASIS-coupler for a multi-components set-up. |
| 180 |
COMMON /EEPARAMS_L/ |
| 181 |
c & eeBootError, fatalError, eeEndError, |
| 182 |
& eeBootError, eeEndError, fatalError, debugMode, |
| 183 |
& useSingleCpuIO, useSingleCpuInput, printMapIncludesZeros, |
| 184 |
& useCubedSphereExchange, useCoupler, |
| 185 |
& useNEST_PARENT, useNEST_CHILD, useOASIS, |
| 186 |
& useSETRLSTK, useSIGREG |
| 187 |
LOGICAL eeBootError |
| 188 |
LOGICAL eeEndError |
| 189 |
LOGICAL fatalError |
| 190 |
LOGICAL debugMode |
| 191 |
LOGICAL useSingleCpuIO |
| 192 |
LOGICAL useSingleCpuInput |
| 193 |
LOGICAL printMapIncludesZeros |
| 194 |
LOGICAL useCubedSphereExchange |
| 195 |
LOGICAL useCoupler |
| 196 |
LOGICAL useNEST_PARENT |
| 197 |
LOGICAL useNEST_CHILD |
| 198 |
LOGICAL useOASIS |
| 199 |
LOGICAL useSETRLSTK |
| 200 |
LOGICAL useSIGREG |
| 201 |
|
| 202 |
C-- COMMON /EPARAMS_I/ Execution environment public integer variables. |
| 203 |
C errorMessageUnit :: Fortran IO unit for error messages |
| 204 |
C standardMessageUnit :: Fortran IO unit for informational messages |
| 205 |
C maxLengthPrt1D :: maximum length for printing (to Std-Msg-Unit) 1-D array |
| 206 |
C scrUnit1 :: Scratch file 1 unit number |
| 207 |
C scrUnit2 :: Scratch file 2 unit number |
| 208 |
C eeDataUnit :: Unit # for reading "execution environment" parameter file |
| 209 |
C modelDataUnit :: Unit number for reading "model" parameter file. |
| 210 |
C numberOfProcs :: Number of processes computing in parallel |
| 211 |
C pidIO :: Id of process to use for I/O. |
| 212 |
C myBxLo, myBxHi :: Extents of domain in blocks in X and Y |
| 213 |
C myByLo, myByHi :: that each threads is responsble for. |
| 214 |
C myProcId :: My own "process" id. |
| 215 |
C myPx :: My X coord on the proc. grid. |
| 216 |
C myPy :: My Y coord on the proc. grid. |
| 217 |
C myXGlobalLo :: My bottom-left (south-west) x-index global domain. |
| 218 |
C The x-coordinate of this point in for example m or |
| 219 |
C degrees is *not* specified here. A model needs to |
| 220 |
C provide a mechanism for deducing that information |
| 221 |
C if it is needed. |
| 222 |
C myYGlobalLo :: My bottom-left (south-west) y-index in global domain. |
| 223 |
C The y-coordinate of this point in for example m or |
| 224 |
C degrees is *not* specified here. A model needs to |
| 225 |
C provide a mechanism for deducing that information |
| 226 |
C if it is needed. |
| 227 |
C nThreads :: No. of threads |
| 228 |
C nTx, nTy :: No. of threads in X and in Y |
| 229 |
C This assumes a simple cartesian gridding of the threads |
| 230 |
C which is not required elsewhere but that makes it easier |
| 231 |
C ioErrorCount :: IO Error Counter. Set to zero initially and increased |
| 232 |
C by one every time an IO error occurs. |
| 233 |
COMMON /EEPARAMS_I/ |
| 234 |
& errorMessageUnit, standardMessageUnit, maxLengthPrt1D, |
| 235 |
& scrUnit1, scrUnit2, eeDataUnit, modelDataUnit, |
| 236 |
& numberOfProcs, pidIO, myProcId, |
| 237 |
& myPx, myPy, myXGlobalLo, myYGlobalLo, nThreads, |
| 238 |
& myBxLo, myBxHi, myByLo, myByHi, |
| 239 |
& nTx, nTy, ioErrorCount |
| 240 |
INTEGER errorMessageUnit |
| 241 |
INTEGER standardMessageUnit |
| 242 |
INTEGER maxLengthPrt1D |
| 243 |
INTEGER scrUnit1 |
| 244 |
INTEGER scrUnit2 |
| 245 |
INTEGER eeDataUnit |
| 246 |
INTEGER modelDataUnit |
| 247 |
INTEGER ioErrorCount(MAX_NO_THREADS) |
| 248 |
INTEGER myBxLo(MAX_NO_THREADS) |
| 249 |
INTEGER myBxHi(MAX_NO_THREADS) |
| 250 |
INTEGER myByLo(MAX_NO_THREADS) |
| 251 |
INTEGER myByHi(MAX_NO_THREADS) |
| 252 |
INTEGER myProcId |
| 253 |
INTEGER myPx |
| 254 |
INTEGER myPy |
| 255 |
INTEGER myXGlobalLo |
| 256 |
INTEGER myYGlobalLo |
| 257 |
INTEGER nThreads |
| 258 |
INTEGER nTx |
| 259 |
INTEGER nTy |
| 260 |
INTEGER numberOfProcs |
| 261 |
INTEGER pidIO |
| 262 |
|
| 263 |
CEH3 ;;; Local Variables: *** |
| 264 |
CEH3 ;;; mode:fortran *** |
| 265 |
CEH3 ;;; End: *** |