| 1 | == How to Configure regression test input using XML? == |
| 2 | Use this document as a guide to create input files. For further reference, the schematic view of the XML schema can be found at [http://www2.msstate.edu/~skb12/nopp/regression/regressionCSTMSchema.html regressionCSTMSchema.xsd] |
| 3 | {{{ |
| 4 | #!xml |
| 5 | |
| 6 | <?xml version="1.0" encoding="ISO-8859-1"?> |
| 7 | <regressionCSTM xmlns="http://www.roms-cstm.org" |
| 8 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | xsi:schemaLocation="http://www.roms-cstm.org schema/regressionCSTMSchema.xsd"> |
| 10 | |
| 11 | <!-- USE THIS XML DOCUMENT AS A GUIDE FOR CREATING NEW ONES. --> |
| 12 | |
| 13 | <!-- |
| 14 | ELEMENT: |
| 15 | applicationType [required]: This element is used to specify the CPP application e.g UPWELLING, ESTUARY_TEST etc. |
| 16 | There can only be one element for each CPP application. In order to define multiple instances of same |
| 17 | CPP application, see element <applicationInstance> below. |
| 18 | |
| 19 | ATTRIBUTES: |
| 20 | type [required]: Name of CPP application. e.g. UPWELLING. |
| 21 | |
| 22 | ELEMENT INSTANCE: 1..n [n >= 1] |
| 23 | --> |
| 24 | |
| 25 | <applicationType type="UPWELLING"> |
| 26 | |
| 27 | <!-- |
| 28 | ELEMENT: |
| 29 | applicationInstance[required]: Define an instance of CPP application specified above. |
| 30 | This element is the child of element <applicationType> and has to be nested within the |
| 31 | <applicationType> element. With the help of this tag you will be able to set specific parameters |
| 32 | to build and run ROMS for CPP application defined in 'applicationType' tag. The 'applicationInstance' |
| 33 | tag can occur more than one time. |
| 34 | |
| 35 | ATTRIBUTES: |
| 36 | instance [required]: Instance of above defined CPP application. Can be any user-defined name. |
| 37 | |
| 38 | CHILD : <applicationInstance> |
| 39 | |
| 40 | ELEMENT INSTANCE: 1..n [n >= 1] |
| 41 | --> |
| 42 | <applicationInstance instance="upwelling_1"> |
| 43 | |
| 44 | <!-- |
| 45 | ELEMENT: |
| 46 | instanceDir [optional]: Define a project directory for application instance defined above. |
| 47 | It is used to set 'MY_PROJECT_DIR' variable in ROMS-CSTM build script. |
| 48 | |
| 49 | ATTRIBUTES: |
| 50 | dir [required]: Any user-defined directory. Sets MY_PROJECT_DIR. |
| 51 | |
| 52 | ELEMENT INSTANCE: 0..1 |
| 53 | --> |
| 54 | <instanceDir dir="/cygdrive/c/skbhate/dev/nopp/myupwelling"> |
| 55 | |
| 56 | <!-- |
| 57 | ELEMENT: |
| 58 | header [required]: Define header directory relative to the instance directory. |
| 59 | It is used to set 'MY_HEADER_DIR' variable in ROMS-CSTM build script. |
| 60 | |
| 61 | ATTRIBUTES: |
| 62 | dir [optional]: Any user-defined directory. Sets MY_HEADER_DIR relative to instanceDir. In absence of |
| 63 | this attribute, the MY_HEADER_DIR will be set to instanceDir. |
| 64 | |
| 65 | CHILD : <header>, <analytical> |
| 66 | --> |
| 67 | <header/> |
| 68 | <!-- <header dir="/Forward"/> --> |
| 69 | |
| 70 | <!-- |
| 71 | ELEMENT: |
| 72 | analytical [required]: Define analytical directory relative to the instance directory. |
| 73 | It is used to set 'MY_ANALYTICAL_DIR' variable in ROMS-CSTM build script. |
| 74 | |
| 75 | ATTRIBUTES: |
| 76 | dir [optional]: Any user-defined directory. Sets MY_ANALYTICAL_DIR relative to instanceDir. In absence of |
| 77 | this attribute, the MY_ANALYTICAL_DIR will be set to instanceDir. |
| 78 | --> |
| 79 | <analytical/> |
| 80 | <!-- <analytical dir="/Functionals"/> --> |
| 81 | |
| 82 | </instanceDir> |
| 83 | |
| 84 | <!-- |
| 85 | ELEMENT: |
| 86 | compiler [required]: Define compiler. sets variable 'IFORT'. |
| 87 | |
| 88 | ELEMENT INSTANCE: 1 |
| 89 | --> |
| 90 | <compiler> |
| 91 | |
| 92 | <!-- |
| 93 | ELEMENT: |
| 94 | type [required]: Define compiler type. Define multiple instances of this element to specify |
| 95 | different compilers. |
| 96 | |
| 97 | ATTRIBUTES: |
| 98 | name [required]: Specify compiler name. ex. ifort, pgi etc. |
| 99 | |
| 100 | CHILD : <type> |
| 101 | |
| 102 | ELEMENT INSTANCE: 1..n [n >= 1] |
| 103 | --> |
| 104 | <type name="ifort"/> |
| 105 | <type name="pgi"/> |
| 106 | |
| 107 | </compiler> |
| 108 | |
| 109 | <!-- |
| 110 | ELEMENT: |
| 111 | nestedGrids [required]: Specify number of nested grids. Sets 'NestedGrids' var. |
| 112 | |
| 113 | ATTRIBUTES: |
| 114 | number [required]: Specify number as positive integer. Currently supported is 1. |
| 115 | |
| 116 | ELEMENT INSTANCE: 1 |
| 117 | --> |
| 118 | <nestedGrids number="1"/> |
| 119 | |
| 120 | <!-- |
| 121 | ELEMENT: |
| 122 | inputFile [required]: Specify input file name required for ROMS-CSTM run. |
| 123 | |
| 124 | ELEMENT INSTANCE: 1 |
| 125 | --> |
| 126 | <inputFile>ocean_upwelling.in</inputFile> |
| 127 | |
| 128 | <!-- |
| 129 | ELEMENT: |
| 130 | parallel [optional]: Specify this element ROMS-CSTM parallel run e.g MPI or OpenMP. |
| 131 | |
| 132 | CHILD : <interface>, <mpiF90> |
| 133 | |
| 134 | ELEMENT INSTANCE: 0..1 |
| 135 | |
| 136 | --> |
| 137 | <parallel> |
| 138 | |
| 139 | <!-- |
| 140 | ELEMENT: |
| 141 | interface [required]: Interface for parallel run. OpenMP or MPI. sets USE_MPI/USE_OPENMP var. |
| 142 | |
| 143 | ELEMENT INSTANCE: 1 |
| 144 | --> |
| 145 | <interface>MPI</interface> |
| 146 | |
| 147 | <!-- |
| 148 | ELEMENT: |
| 149 | mpiF90 [optional]: sets USE_MPIF90 var. |
| 150 | |
| 151 | ELEMENT INSTANCE: 0..1 |
| 152 | --> |
| 153 | |
| 154 | <mpiF90/> |
| 155 | |
| 156 | </parallel> |
| 157 | |
| 158 | <!-- |
| 159 | ELEMENT: |
| 160 | coupling [optional]: sets SWAN_COUPLING var. |
| 161 | |
| 162 | ELEMENT INSTANCE: 0..1 |
| 163 | --> |
| 164 | <coupling/> |
| 165 | |
| 166 | <!-- |
| 167 | ELEMENT: |
| 168 | large [optional]: sets USE_LARGE var. |
| 169 | |
| 170 | ELEMENT INSTANCE: 0..1 |
| 171 | --> |
| 172 | <large/> |
| 173 | |
| 174 | <!-- |
| 175 | ELEMENT: |
| 176 | netcdf4 [optional]: sets USE_NETCDF4 var. |
| 177 | |
| 178 | ELEMENT INSTANCE: 0..1 |
| 179 | --> |
| 180 | <netcdf4/> |
| 181 | |
| 182 | <!-- |
| 183 | ELEMENT: |
| 184 | debug [optional]: sets USE_DEBUG var. |
| 185 | |
| 186 | ELEMENT INSTANCE: 0..1 |
| 187 | --> |
| 188 | <debug/> |
| 189 | |
| 190 | <!-- |
| 191 | ELEMENT: |
| 192 | cppFlags [optional]: sets MY_CPP_FLAGS var. |
| 193 | |
| 194 | ELEMENT INSTANCE: 0..1 |
| 195 | --> |
| 196 | <cppFlags>-DAVERAGES</cppFlags> |
| 197 | |
| 198 | <!-- |
| 199 | ELEMENT: |
| 200 | noClean [optional]: Recompile code without cleaning. |
| 201 | |
| 202 | ELEMENT INSTANCE: 0..1 |
| 203 | --> |
| 204 | <noClean/> |
| 205 | |
| 206 | <!-- |
| 207 | ELEMENT: |
| 208 | modelRun [optional]: Define this element to perform model run. In absence of this |
| 209 | element model won't run. |
| 210 | |
| 211 | CHILD : <ppn>, <nodes>, <ncpus>, <noPbs> |
| 212 | |
| 213 | ELEMENT INSTANCE: 0..1 |
| 214 | --> |
| 215 | <modelRun> |
| 216 | |
| 217 | <!-- |
| 218 | ELEMENT: |
| 219 | ppn [required]: Define process per nodes |
| 220 | |
| 221 | VALUE : positive integer. Default=1 |
| 222 | |
| 223 | ELEMENT INSTANCE: 1 |
| 224 | --> |
| 225 | <ppn>4</ppn> |
| 226 | |
| 227 | <!-- |
| 228 | ELEMENT: |
| 229 | nodes [required]: Define number of nodes to be assinged for the process. |
| 230 | |
| 231 | VALUE : positive integer. Default=1 |
| 232 | |
| 233 | ELEMENT INSTANCE: 1 |
| 234 | --> |
| 235 | <nodes>1</nodes> |
| 236 | |
| 237 | <!-- |
| 238 | ELEMENT: |
| 239 | ncpus [required]: Define number of cpus to be assigned for the process |
| 240 | |
| 241 | VALUE : positive integer. Default=1 |
| 242 | |
| 243 | ELEMENT INSTANCE: 1 |
| 244 | --> |
| 245 | <ncpus>4</ncpus> |
| 246 | |
| 247 | <!-- |
| 248 | ELEMENT: |
| 249 | noPbs [optional]: Specify, if no PBS script to be generated. By default a pbs script is generated, |
| 250 | and the job is submitted via a pbs queing system. |
| 251 | |
| 252 | ELEMENT INSTANCE: 0..1 |
| 253 | --> |
| 254 | <noPbs/> |
| 255 | |
| 256 | </modelRun> |
| 257 | |
| 258 | <!-- |
| 259 | ELEMENT: |
| 260 | regressTests [optional]: Specify for NCO tools tests on ROMS-CSTM output. |
| 261 | |
| 262 | CHILD : <test> |
| 263 | |
| 264 | ELEMENT INSTANCE: 0..1 |
| 265 | --> |
| 266 | <regressTests> |
| 267 | |
| 268 | <!-- |
| 269 | ELEMENT: |
| 270 | test [required]: Define NCO tools test types. |
| 271 | |
| 272 | ATTRIBUTES: |
| 273 | name [required]: Specify NCO tool test name. eg. ncdiff, ncks etc. |
| 274 | option[optional]: Specify any command line options required to run each NCO test. |
| 275 | fileType[required]: Specify type of ROMS-CSTM output file on which the test will be performed. e.g his,avg |
| 276 | |
| 277 | ELEMENT INSTANCE: 1..n [n >= 1] |
| 278 | --> |
| 279 | <test name="ncdiff" fileType="his"/> |
| 280 | <test name="ncks" option="-d" fileType="avg"/> |
| 281 | |
| 282 | </regressTests> |
| 283 | |
| 284 | </applicationInstance> |
| 285 | |
| 286 | </applicationType> |
| 287 | |
| 288 | <!-- |
| 289 | ELEMENT: |
| 290 | environment [optional]: Specify this element if you would like to define environmental variables |
| 291 | specific to each compiler and machine. This will override any environmental variables specified |
| 292 | in machine specific make files for ROMS-CSTM (e.g. Linux-ifort.mk). |
| 293 | |
| 294 | CHILD : <compiler> |
| 295 | |
| 296 | ELEMENT INSTANCE: 0..1 |
| 297 | Note: Only one instance per XML document. This is the child of parent node <regressionCSTM>. |
| 298 | --> |
| 299 | <environment> |
| 300 | <!-- |
| 301 | ELEMENT: |
| 302 | compiler [required]: Define this element to specify compilers. |
| 303 | |
| 304 | ATTRIBUTES: |
| 305 | name [required]: Specify compiler name. e.g. ifort, pgi etc |
| 306 | |
| 307 | CHILD : <var>, <exe> |
| 308 | |
| 309 | ELEMENT INSTANCE: 1..n [n >= 1] |
| 310 | --> |
| 311 | <compiler name="ifort"> |
| 312 | <!-- |
| 313 | ELEMENT: |
| 314 | var [optional]: Define this element to specify environmental variables. |
| 315 | |
| 316 | ATTRIBUTES: |
| 317 | name [required]: Specify environmental variable. e.g NETCDF_LIBDIR etc. |
| 318 | value [required]: Specify value for the above specified variable. |
| 319 | |
| 320 | ELEMENT INSTANCE: 0..n [n >= 1] |
| 321 | --> |
| 322 | <var name="ESMF_COMPILER" value="ifort"/> |
| 323 | <var name="NETCDF_LIBDIR" value="/usr/local/netcdf-3.6.2-intel/lib"/> |
| 324 | <var name="NETCDF_INCDIR" value="/usr/local/netcdf-3.6.2-intel/include"/> |
| 325 | |
| 326 | <!-- |
| 327 | ELEMENT: |
| 328 | exe [optional]: Define this element to specify compilers. |
| 329 | |
| 330 | ATTRIBUTES: |
| 331 | name [required]: Specify executable name. e.g mpirun |
| 332 | path [required]: Specify path of the executable specified above. |
| 333 | |
| 334 | ELEMENT INSTANCE: 0..n [n >= 1] |
| 335 | --> |
| 336 | |
| 337 | <exe name="mpirun" path="/usr/local/mpi/bin/"/> |
| 338 | </compiler> |
| 339 | <compiler name="pgi"> |
| 340 | <var name="NETCDF_LIBDIR" value="/usr/local/netcdf-3.6.2-pgi/lib"/> |
| 341 | <var name="NETCDF_INCDIR" value="/usr/local/netcdf-3.6.2-pgi/include"/> |
| 342 | <var name="ESMF_COMPILER" value="pgi"/> |
| 343 | |
| 344 | <exe name="mpirun" path="/usr/local/mpi/bin/"/> |
| 345 | </compiler> |
| 346 | |
| 347 | </environment> |
| 348 | |
| 349 | |
| 350 | </regressionCSTM> |
| 351 | }}} |
| 352 | ''Any questions? Email: Sachin Bhate (skbhate@ngi.msstate.edu)'' |