wiki:XmlDocumentation

Version 1 (modified by skbhate, 16 years ago) ( diff )

--

How to Configure regression test input using XML?

Use this document as a guide to create input files. For further reference, the schematic view of the XML schema can be found at regressionCSTMSchema.xsd

<?xml version="1.0" encoding="ISO-8859-1"?>
<regressionCSTM xmlns="http://www.roms-cstm.org"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.roms-cstm.org  schema/regressionCSTMSchema.xsd">

        <!--  USE THIS XML DOCUMENT AS A GUIDE FOR CREATING NEW ONES.  -->

        <!-- 
         ELEMENT: 
         applicationType [required]: This element is used to specify the CPP application e.g UPWELLING, ESTUARY_TEST etc.
         There can only be one element for each CPP application.  In order to define multiple instances of same
         CPP application, see element <applicationInstance> below.       
         
         ATTRIBUTES: 
         type [required]:  Name of CPP application. e.g. UPWELLING. 
         
         ELEMENT INSTANCE:     1..n [n >= 1]
          -->

        <applicationType type="UPWELLING">

                <!--
                ELEMENT: 
                applicationInstance[required]: Define an instance of  CPP application specified above. 
                This element is the child of element  <applicationType> and has to be nested within the 
                <applicationType> element. With the help of this tag you will be able to set  specific parameters 
                to build and run ROMS for CPP application defined in 'applicationType' tag. The 'applicationInstance' 
                tag can occur more than one time.
                
                ATTRIBUTES: 
                instance [required]:  Instance of above defined CPP application. Can be any user-defined name.
                
                CHILD : <applicationInstance>
                
                ELEMENT INSTANCE:     1..n  [n >= 1]
                -->
                <applicationInstance instance="upwelling_1">

                        <!--
                        ELEMENT: 
                        instanceDir  [optional]: Define  a project directory for application instance defined above.
                        It is used to set 'MY_PROJECT_DIR' variable in ROMS-CSTM build script. 
                        
                        ATTRIBUTES: 
                        dir [required]:  Any user-defined directory. Sets MY_PROJECT_DIR.
                        
                        ELEMENT INSTANCE:     0..1
                        -->
                        <instanceDir dir="/cygdrive/c/skbhate/dev/nopp/myupwelling">

                                <!--
                                ELEMENT: 
                                header  [required]: Define  header directory relative to the instance directory.
                                It is used to set 'MY_HEADER_DIR' variable in ROMS-CSTM build script. 
                                
                                ATTRIBUTES: 
                                dir [optional]:  Any user-defined directory. Sets MY_HEADER_DIR relative to instanceDir.  In absence of 
                                this attribute, the MY_HEADER_DIR will be set to instanceDir.
                                
                                CHILD : <header>, <analytical>
                                -->
                                <header/>
                                <!--   <header dir="/Forward"/>   -->

                                <!--
                                 ELEMENT: 
                                 analytical  [required]: Define analytical directory relative to the instance directory.
                                 It is used to set 'MY_ANALYTICAL_DIR' variable in ROMS-CSTM build script. 
                                 
                                 ATTRIBUTES: 
                                 dir [optional]:  Any user-defined directory. Sets MY_ANALYTICAL_DIR relative to instanceDir.  In absence of 
                                 this attribute, the MY_ANALYTICAL_DIR will be set to instanceDir.
                                -->
                                <analytical/>
                                <!--  <analytical dir="/Functionals"/>    -->

                        </instanceDir>

                        <!--
                        ELEMENT: 
                        compiler  [required]: Define compiler. sets variable 'IFORT'.         
                        
                        ELEMENT INSTANCE:     1                  
                        -->
                        <compiler>

                                <!--
                        ELEMENT: 
                        type  [required]: Define compiler type. Define multiple instances of this element to specify 
                        different compilers. 
                        
                        ATTRIBUTES: 
                        name [required]:  Specify compiler name. ex. ifort, pgi etc.
                        
                        CHILD : <type>
                        
                        ELEMENT INSTANCE:     1..n [n >= 1]
                        -->
                                <type name="ifort"/>
                                <type name="pgi"/>

                        </compiler>

                        <!--
                        ELEMENT: 
                        nestedGrids  [required]: Specify number of nested grids. Sets 'NestedGrids' var.
                        
                        ATTRIBUTES: 
                        number [required]:  Specify number as positive integer.  Currently supported is 1.
                        
                        ELEMENT INSTANCE:     1
                        -->
                        <nestedGrids number="1"/>

                        <!--
                        ELEMENT: 
                        inputFile  [required]: Specify input file name required for ROMS-CSTM run. 
                        
                        ELEMENT INSTANCE:     1
                        -->
                        <inputFile>ocean_upwelling.in</inputFile>

                        <!--
                        ELEMENT: 
                        parallel  [optional]: Specify this element  ROMS-CSTM parallel run e.g MPI or OpenMP.
                        
                        CHILD : <interface>, <mpiF90>
                        
                        ELEMENT INSTANCE:     0..1
                        
                        -->
                        <parallel>

                                <!--
                        ELEMENT: 
                        interface  [required]: Interface for parallel run. OpenMP or MPI. sets USE_MPI/USE_OPENMP var.    
                        
                        ELEMENT INSTANCE:     1
                        -->
                                <interface>MPI</interface>

                                <!--
                        ELEMENT: 
                        mpiF90  [optional]:  sets USE_MPIF90 var.
                        
                        ELEMENT INSTANCE:     0..1
                        -->

                                <mpiF90/>

                        </parallel>

                        <!--
                        ELEMENT: 
                        coupling  [optional]:  sets SWAN_COUPLING var.
                        
                        ELEMENT INSTANCE:     0..1
                        -->
                        <coupling/>

                        <!--
                        ELEMENT: 
                        large  [optional]:  sets USE_LARGE var.
                        
                        ELEMENT INSTANCE:     0..1
                        -->
                        <large/>

                        <!--
                        ELEMENT: 
                        netcdf4  [optional]:  sets USE_NETCDF4 var.
                        
                        ELEMENT INSTANCE:     0..1
                        -->
                        <netcdf4/>

                        <!--
                        ELEMENT: 
                        debug  [optional]:  sets USE_DEBUG var.
                        
                        ELEMENT INSTANCE:     0..1
                        -->
                        <debug/>

                        <!--
                        ELEMENT: 
                        cppFlags  [optional]:  sets MY_CPP_FLAGS  var.
                        
                        ELEMENT INSTANCE:     0..1
                        -->
                        <cppFlags>-DAVERAGES</cppFlags>

                        <!--
                        ELEMENT: 
                        noClean  [optional]:  Recompile code without cleaning.
                        
                        ELEMENT INSTANCE:     0..1
                        -->
                        <noClean/>

                        <!--
                        ELEMENT: 
                        modelRun  [optional]: Define this element to perform model run. In absence of this
                        element model won't run.               
                        
                        CHILD : <ppn>, <nodes>, <ncpus>, <noPbs>
                        
                        ELEMENT INSTANCE:     0..1
                        -->
                        <modelRun>

                                <!--
                        ELEMENT: 
                        ppn  [required]: Define process per nodes                                 
                        
                        VALUE :  positive integer.  Default=1
                        
                        ELEMENT INSTANCE:     1
                        -->
                                <ppn>4</ppn>

                                <!--
                                ELEMENT: 
                                nodes  [required]: Define number of nodes to be assinged for the process.                                 
                                
                                VALUE :  positive integer.  Default=1
                                
                                ELEMENT INSTANCE:     1
                                -->
                                <nodes>1</nodes>

                                <!--
                                ELEMENT: 
                                ncpus  [required]: Define number of cpus to be assigned for the process                                 
                                
                                VALUE :  positive integer.  Default=1
                                
                                ELEMENT INSTANCE:     1
                                -->
                                <ncpus>4</ncpus>

                                <!--
                                ELEMENT: 
                                noPbs  [optional]: Specify, if no PBS script to be generated. By default a pbs script is generated,
                                and the job is submitted via a pbs queing system.
                                          
                                ELEMENT INSTANCE:     0..1
                                -->
                                <noPbs/>

                        </modelRun>

                        <!--
                        ELEMENT: 
                        regressTests  [optional]: Specify for NCO tools tests on ROMS-CSTM output.
                        
                        CHILD : <test>
                        
                        ELEMENT INSTANCE:     0..1
                        -->
                        <regressTests>

                                <!--
                                ELEMENT: 
                                test [required]:  Define NCO tools test types. 
                                
                                ATTRIBUTES: 
                                name [required]:  Specify NCO tool test name. eg. ncdiff, ncks etc.
                                option[optional]:   Specify any command line options required to run each NCO test.
                                fileType[required]: Specify type of ROMS-CSTM output file on which the test will be performed. e.g his,avg
                                
                                ELEMENT INSTANCE:     1..n [n >= 1]
                                -->
                                <test name="ncdiff" fileType="his"/>
                                <test name="ncks" option="-d" fileType="avg"/>

                        </regressTests>

                </applicationInstance>

        </applicationType>

        <!--
        ELEMENT: 
        environment [optional]: Specify this element if you would like to define environmental variables
        specific to each compiler and machine. This will override any environmental variables specified
        in machine specific make files for ROMS-CSTM (e.g.  Linux-ifort.mk).
        
        CHILD : <compiler>
        
        ELEMENT INSTANCE:     0..1 
        Note: Only one instance per XML document. This is the child of parent node  <regressionCSTM>.
        -->
        <environment>
                <!--
                ELEMENT: 
                compiler [required]:  Define this element to specify compilers.
                
                ATTRIBUTES: 
                name [required]:  Specify compiler name. e.g. ifort, pgi etc            
                
                CHILD : <var>, <exe>
                
                ELEMENT INSTANCE:     1..n [n >= 1]
                -->
                <compiler name="ifort">
                        <!--
                        ELEMENT: 
                        var [optional]:  Define this element to specify environmental variables.
                        
                        ATTRIBUTES: 
                        name [required]:  Specify environmental variable. e.g NETCDF_LIBDIR etc.
                        value [required]:   Specify value for the above specified variable.
                        
                        ELEMENT INSTANCE:     0..n [n >= 1]
                        -->
                        <var name="ESMF_COMPILER" value="ifort"/>
                        <var name="NETCDF_LIBDIR" value="/usr/local/netcdf-3.6.2-intel/lib"/>
                        <var name="NETCDF_INCDIR" value="/usr/local/netcdf-3.6.2-intel/include"/>

                        <!--
                        ELEMENT: 
                        exe [optional]:  Define this element to specify compilers.
                        
                        ATTRIBUTES: 
                        name [required]:  Specify executable name. e.g mpirun 
                        path [required]:   Specify  path of the executable specified above.
                        
                        ELEMENT INSTANCE:     0..n [n >= 1]
                        -->

                        <exe name="mpirun" path="/usr/local/mpi/bin/"/>
                </compiler>
                <compiler name="pgi">
                        <var name="NETCDF_LIBDIR" value="/usr/local/netcdf-3.6.2-pgi/lib"/>
                        <var name="NETCDF_INCDIR" value="/usr/local/netcdf-3.6.2-pgi/include"/>
                        <var name="ESMF_COMPILER" value="pgi"/>

                        <exe name="mpirun" path="/usr/local/mpi/bin/"/>
                </compiler>

        </environment>


</regressionCSTM>

Any questions? Email: Sachin Bhate (skbhate@…)

Note: See TracWiki for help on using the wiki.