Changes between Version 6 and Version 7 of RegressionTest


Ignore:
Timestamp:
07/17/08 03:13:09 (16 years ago)
Author:
skbhate
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RegressionTest

    v6 v7  
    22
    33== Introduction ==
    4 Regression test package provides a '''''test framework for Community sediment transport model'''''. User can automate model runs as well as various tests on
    5 model output. The package is written in '''''Perl'''''. It has been tested to run on Linux (2.6.15) and Windows under 'Cygwin'.
    6 Supported version of '''''ROMS: 3.0.''''' (Successfully tested SVN version 843).
     4
     5
     6
     7Regression test package provides a '''''test framework for Community sediment transport model'''''. User can automate model runs as well as various tests on[[BR]]
     8model output. The package is written in '''''Perl''''' and '''''XML'''''. XML serves as a tool to automate the ROMS run as well as NCO tools tests on output.[[BR]]
     9It has been tested to run on Linux (2.6.15) and Windows under 'Cygwin'. Supported version of '''''ROMS: 3.2.'''''.[[BR]]
     10(Successfully tested with Revision: 1553 of URL: https://www.myroms.org/svn/cstm/trunk).
     11
    712
    813== Configure ==
     
    1419}}}
    1520
    16 Configuration script checks for availability of various utilities (perl, ncotools, etc) and updates path and relevant information in various files.
    17 You must run 'Configure' before proceeding further.
     21Configuration script checks for availability of various utilities (perl, ncotools, libxml, qsub etc) and updates path and relevant information in various files.[[BR]]
     22'''You must run 'Configure before proceeding further.'''
    1823
    1924== How to Run? ==
     
    2227$ ./bin/runRegression
    2328}}}
    24 If you see the output as shown below means there is future ahead. The default run is 'serial mode'. The MPI run is executed if ROMS 'build.sh' macro {{{'USE_MPI'}}}or {{{'USE_OPENMP'}}} is set to 'on'.
     29If you see the output as shown below means there is future ahead.
    2530{{{
     31------------------- Regression Test Environment for ROMS ----------------------                                                       
     32                                 Version 1.1
    2633
    27  runRegression: Run various regression tests for ROMS-SED ocean model.
    2834
    29  Usage: runRegression [options]
    30  Options:
     35 runRegression: Automate model run and apply regression tests to ROMS-SED ocean model.
    3136
    32    -all                :   Run all applications set for regression test.
    33    -app <application>  :   Run only specific application for regression test.
    34    -d, -display        :   Display list of applications set for regression test.
    35    -h, -help           :   Display options.
    36    -noclean            :   Do not perform clean on existing compiled code.
     37 Usage: runRegression -xml <file>
     38 Where:
    3739
    38    -m, -mpi            :   Compile and run using MPI.
    39  MPI options. (should only be used along with '-m'/'-mpi').
     40   -xml <file>     :   XML file which defines the regression test scenario/task.
    4041
    41    -pbs                :   Create PBS script. Use 'qsub'.   
    42    -nodes <number>     :   Number of Nodes.
    43    -ppn  <number>      :   Processes Per Node.
    44 
    45  Test options. (Should only be used along with '-all' or '-app').
    46 
    47    -nck                :   Run 'ncks' test on model output.
    48    -ncd                :   Run 'ncdiff' test on model output.
     42................................................................................
     43Questions/Queries:
     44Sachin Kumar Bhate (skbhate@ngi.msstate.edu
    4945
    5046}}}
     47
     48In order to automate the model run(s), you will have to specify the compile and run parameters,[[BR]]
     49in an XML document. Follow the instructions below on how to configure XML.
     50
     51== Configuring XML? ==
     52
     53XML provides an easy way to  configure model runs and tests. User can configure various ROMS applications (e.g. UPWELLING, CBLAST etc)
     54[Configuration file help coming soon]
     55 
    5156
    5257== Understanding the Directory Structure ==
    5358It is important to understand the directory structure before you proceed. It provides a quick overview of where, what and how the data and test results are located.
    5459
    55  * '''/bin:''' Regression test executable.
     60 * '''/bin:''' Regression test executables.
    5661 * '''/lib:''' Required modules and libraries. It contains the properties file [wiki:RegressionProps regression.props].
    5762 * '''/log:''' Test run log 'regression.log'. It logs the build and run activities for the model.
    5863 * '''/data:''' Data and files in support of running the tests.
    59  * '''/data/regression.tests:''' List of applications defined for regression test. New applications needs to be added to this file before running the test.  See example file below:
    60 {{{
    61 #List applications for regression test.
    62 #Use '-coupled' with application name, to enable SWAN coupling.
     64 * '''/data/Master:''' Master {{{NetCDF}}} output data files for various model applications (e.g. {{{SED_TOY, SHOREFACE}}} etc.). These datasets are used in [http://nco.sourceforge.net/ NCO-tools] (e.g. ncdiff) tests.[[BR]]
     65 Here, the master file refers to a ''true'' data file against which a user would compare the model output. User must populate this directory with their master data files before proceeding[[BR]]to run any tests. 'ncdiff' would result in error without these files. The files could be of type 'history','averages','diagnostics' or 'restart'. This directory needs to be populated only[[BR]]in case you are running any nco-tools tests.
     66 * '''/data/metadata:''' Contains XML files for environment setup. Use 'regressionCSTM.xml' as a guide to create new xml configuration files.
     67 * '''/data/metadata/schema:''' Schema for XML document validation. Please do not edit files in this directory.
     68 * '''/data/metadata/example:''' Example XML files to be used for environment setup. User should edit these files before running the regression application.
     69 * '''/test-run:''' Test results. Each time test is run, it creates a time-stamped directory in '/test-run' where it stores all test results for each model application. User can have the test[[BR]]
     70 results be saved to another location by modifying the ''$TEST_RUN'' variable in [wiki:RegressionProps regression.props] file. The 'STDERR' and 'STDOUT' from model compilation are also saved in this directory.
    6371
    64 BENCHMARK
    65 ESTUARY_TEST
    66 GRAV_ADJ
    67 LAKE_SIGNELL
    68 MIXED_LAYER
    69 SED_TEST
    70 SED_TOY
    71 SHOREFACE
    72 TEST_CHAN
    73 TEST_HEAD
    74 UPWELLING
    75 INLET_TEST -coupled
    76 BEVANO -coupled
    77 }}}
    78 
    79  * '''/data/Master:''' Master {{{NetCDF}}} output data files for various model applications (e.g. {{{SED_TOY, SHOREFACE}}} etc.). These datasets are used in [http://nco.sourceforge.net/ NCO-tools] (e.g. ncdiff) tests. Here, the master file refers to a ''true'' data file against which a user would compare the model output. User must populate this directory with their master data files before proceeding to run any tests. 'ncdiff' would result in error without these files. The files could be of type 'history','averages','diagnostics' or 'restart'. This directory needs to be populated only in case you are running any nco-tools tests.
    80  * '''/data/inputList:''' Contains list of input files associated with each model application. If there is an application listed in '/data/regression.tests' file, then user must include the application name and associated input file name in 'inputList' file. List file names without any directory path. Example file:
    81 {{{
    82 ESTUARY_TEST = ocean_estuary_test.in
    83 INLET_TEST   = ocean_inlet_test.in
    84 UPWELLING    = ocean_upwelling.in
    85 }}}
    86 
    87  * '''/test-run:''' Test results. Each time test is run, it creates a time-stamped directory in '/test-run' where it stores all test results for each model application. User can have the test results be saved to another location by modifying the ''$TEST_RUN'' variable in [wiki:RegressionProps regression.props] file. The 'STDERR' and 'STDOUT' from model compilation are also saved in this directory.
    8872== Understanding Results ==
    89 Test results, which are stored in '''/test-run/<time-stamped-dir/<application>''' can contain following data files.
     73Test results, which are stored in '''/test-run/<time-stamped-dir/<application>/<application_instance>/<compiler>''' may contain following data files.
    9074 * '''ocean_<file_type>.nc:''' Model output data files. ''<file_type>'' can be ''his(history)'', ''dia(diagnostics)'', ''rst(restart)'', ''avg(averages)'' etc.
    9175 * '''output_<application>.out:''' STDOUT from model run. ''<application>'' can be e.g.'SED_TOY', 'SHOREFACE', etc.
     
    9478 * '''ncdiff_<file_type>.nc:''' [http://nco.sourceforge.net/ NCO-tools] 'ncdiff' output. ''<file_type>'' can be 'history', 'average', etc.
    9579 * '''ncks<file_type>.nc:''' [http://nco.sourceforge.net/ NCO-tools] 'ncks' output. ''<file_type>'' can be 'history', 'average', etc.
     80 * '''roms_pbs.sh:''' PBS script auto-generated for the run.
     81
    9682== Understanding Logs ==
    9783Log 'regression.log' contains the time line of test execution. It reports both success and failure of test. Example log shown below:
    9884{{{
    99 >>>> New Log: Fri Jul 13 10:54:50 2007
     85>>>> New Log: Tue Jul 15 15:22:48 2008
    10086
    101 [SUCCESS][Fri Jul 13 10:54:50 2007][Read /cygdrive/c/skbhate/dev/nopp/regression/data/regression.tests.]
     87ROMS PATH: /home/skbhate/cstm/current_roms/roms3.2_070808
    10288
    103 Running Application: INLET_TEST .
     89[SUCCESS][Tue Jul 15 15:22:48 2008][XML document data/metadata/example/example_complex.xml parsed succesfully.]
    10490
    105 [ERROR][Fri Jul 13 10:56:07 2007][./runRegression,run_application][ROMS build failed. ROMS executables not created.
    106 Check 'build.err' for more info.]
    107 [ERROR][Fri Jul 13 10:56:07 2007][./runRegression,][Model run for INLET_TEST could not be completed.]
     91Application: WAKE:wake_1:ifort.
    10892
     93[ERROR][Tue Jul 15 15:22:48 2008][./bin/runRegression,][ROMS WAKE:wake_1:ifort build failed. Check 'build.err' for more info.]
    10994
    110  >>>> New Log: Fri Jul 13 12:28:49 2007
     95>>>> New Log: Tue Jul 15 16:18:55 2008
    11196
    112 [SUCCESS][Fri Jul 13 12:28:49 2007][Read /cygdrive/c/skbhate/dev/nopp/regression/data/regression.tests.]
     97ROMS PATH: /home/skbhate/cstm/current_roms/roms3.2_070808
    11398
    114 Running Application: UPWELLING .
     99[SUCCESS][Tue Jul 15 16:18:55 2008][XML document data/metadata/example/example_complex2.xml parsed succesfully.]
    115100
    116 [SUCCESS][Fri Jul 13 12:28:50 2007][Compiled ROMS successfully.]
    117 [SUCCESS][Fri Jul 13 12:28:50 2007][Starting ROMS-SED in serial mode...]
    118 [SUCCESS][Fri Jul 13 12:28:57 2007][ROMS run successful. History or Restart file created.]
     101Application: UPWELLING:upwelling_1:ifort.
     102
     103[SUCCESS][Tue Jul 15 16:18:55 2008][Project directory does not exist:  . Setting MY_PROJECT_DIR to ROMS ROOT DIR.]
     104[SUCCESS][Tue Jul 15 16:27:17 2008][Compiled application instance UPWELLING:upwelling_1:ifort successfully.]
     105[SUCCESS][Tue Jul 15 16:27:17 2008][Created PBS script: /home/skbhate/cstm/current_roms/roms3.2_070808/roms_pbs.sh]
     106[SUCCESS][Tue Jul 15 16:27:17 2008][Starting ROMS-SED MPI version using PBS script /home/skbhate/cstm/current_roms/roms3.2_070808/roms_pbs.sh]
     107[SUCCESS][Tue Jul 15 16:27:17 2008][PBS JOB ID:  14467.pikmin.cl.whoi.edu]
     108[SUCCESS][Tue Jul 15 16:39:17 2008][PBS job 14467.pikmin.cl.whoi.edu finished. Check output.]
     109[SUCCESS][Tue Jul 15 16:39:17 2008][ROMS run successful. History or Restart file created.]
    119110
    120111Running NCO tools tests.......
    121112
    122113File type: his
    123 [SUCCESS][Fri Jul 13 12:29:01 2007][Created ncdiff output.]
    124 [SUCCESS][Fri Jul 13 12:29:01 2007][Created ncks output.]
     114[SUCCESS][Tue Jul 15 16:39:18 2008][Created ncdiff output.]
    125115
    126 File type: avg
    127 [ERROR][Fri Jul 13 12:29:02 2007][./bin/runRegression,run_application][Master file for file type 'avg' not found
    128 in /cygdrive/c/skbhate/dev/nopp/regression/data/Master/UPWELLING. 'ncdiff' or 'ncks' output won't be created.]
    129116}}}
    130117
     
    133120== Things to Remember ==
    134121Please make appropriate changes or updates based on the following points before you proceed to run the tests.
    135  * Update the variables ''$ROMS_BUILD_FILE'' and ''$MY_CPUS'' in [wiki:RegressionProps regression.props] file.
    136  * The environmental variable ''$MY_PROJECT_DIR'' in build.sh should always be relative to variable ''$MY_ROOT_DIR''.
    137  * The project space for each model application should be declared with ''$MY_PROJECT_DIR'' following this convention.
    138         $MY_PROJECT_DIR=${MY_ROOT_DIR}/Projects/<application_name>    (e.g. application_name can be 'upwelling', 'benchmark' etc.)
    139 
    140  * If $MY_PROJECT_DIR is defined, then HEADER_DIR and ANALYTICAL DIR will be defined to MY_PROJECT_DIR unless these variables are commented out.
    141  * Define model applications in file ''regression.tests'', which is located in /data directory.
    142  * Define input file associated with each model application in file ''inputList'', which is located in /data directory.
    143  * Using option '-pbs' it will generate a pbs script and will start the job as '$ qsub <pbs_script>'. You have to supply 'ppn' and 'node' values for generating the script.
    144  * Without option '-pbs' user can still run the job in MPI mode without generating a PBS script as long as '-mpi' option is used. If you do not supply 'ppn' and 'node' values, the NtileI and NtileJ is used to calculate the number of processors (NtileI * NtileJ).
    145  * If you use option '-mpi' then make sure the 'USE_MPI'/'USE_OPENMP' is set to 'on' otherwise the run will default to serial mode.
     122 * Customize the variables ''$ROMS_BUILD_FILE'' and ''$MY_CPUS'' in [wiki:RegressionProps regression.props] file.
     123 * Make sure you run 'validation tool' on your xml document frequently while editing the xml document.   
    146124 * You can always send an email to [mailto:skbhate@ngi.msstate.edu skbhate@ngi.msstate.edu]in case of any problems/issues with testing package.
    147125