GEOS-Chem unit tester for v11-02

From Geos-chem
Revision as of 17:59, 20 March 2018 by Bmy (Talk | contribs) (Created page with "The GEOS-Chem Unit Tester is a package of scripts and Makefiles that will compile and run several GEOS-Chem with a set of standard debugging flags. An individual '''GEOS-Chem...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The GEOS-Chem Unit Tester is a package of scripts and Makefiles that will compile and run several GEOS-Chem with a set of standard debugging flags. An individual GEOS-Chem Unit Test will look for computational and numerical issues in simulations for a given combination of:

  1. Met field type
  2. Horizontal grid
  3. Simulation type

You can specify the unit tests that you wish the GEOS-Chem Unit Tester to perform in an customizable input file, as described below.

Installing the GEOS-Chem Unit Tester

Requirements

Most GEOS-Chem users will already have the necessary software to be able to run the GEOS-Chem Unit Test package. These are:

  1. A modern "Linux-like" operating system, e.g.
    • Linux (all flavors)
    • CentOS
    • Ubuntu
    • Fedora
  2. The bash Unix shell (usually comes pre-installed with your OS)
  3. The Perl programming language (usually comes pre-installed with your OS)
  4. The GNU make utility (usually comes pre-installed with your OS)
  5. IMPORTANT! You will also need GEOS-Chem v9-02o or a later version.
    • Previous versions are not compatible with the GEOS-Chem Unit Tester because they use the Headers/define.h file to specify some C-preprocessor switches.
    • In GEOS-Chem v9-02o and higher versions, all C-preprocessor switches will be set from command-line inputs to GNU Make.

--Bob Y. 17:20, 6 September 2013 (EDT)

Downloading the GEOS-Chem Unit Tester

You may download the GEOS-Chem unit tester with Git:

git clone https://bitbucket.org/gcst/geos-chem-unittest UT
git checkout master

This will download a fresh copy of the GEOS-Chem-UnitTest repository into a directory named UT, and place you in the master branch. This branch corresponds to the last publicly-released GEOS-Chem version (which as of Feb 2017 is the v11-01 public release).

Reverting to an older state

Currently, the GEOS-Chem Unit Tester is synchronized with GEOS-Chem v10-01. If you would like to use the Unit Tester to validate an older version of GEOS-Chem, then you can use the gitk browser to open a new branch at a past commit as follows:

  1. Open the gitk browser by typing gitk & at the command line.
  2. In the top-left window of gitk, find the commit that you want to revert to. Usually this will be denoted with a yellow tag (e.g. v9-02-Provisional-Release' or v10-01b, etc.).
  3. Right click with the mouse. This will open a context menu. Select Create new branch.
  4. A new dialog box will pop up asking you to name the branch. Type OLDER_BRANCH and press OK.
  5. Close gitk and open the Git GUI by typing git gui &
  6. From the Git GUI dropdown menu, select Branch / Checkout, and then pick OLDER_BRANCH.

That's it! We now have two branches that represent different GEOS-Chem versions.

  1. The master branch represents current state of the unit tester
  2. The OLDER_BRANCH branch represents the state of the unit tester that you checked out (synced to an older GEOS-Chem version)

--Bob Yantosca (talk) 19:48, 24 April 2017 (UTC)

Directory structure

The GEOS-Chem Unit Tester adheres to the following directory structure:

Directory Description
jobs/ Job scripts created by the GEOS-Chem Unit Test driver script gcUnitTest will be sent here.
logs/ Log files containing output from the GEOS-Chem Unit Test simulations will be sent here.
perl/ Contains the Perl scripts that are used to submit GEOS-Chem Unit Test simulations.
  • The driver script is called gcUnitTest.
  • The default input file for gcUnitTest is named UnitTest.input.
  • Sample customized versions of UnitTest.input are stored in the perl/inputs subdirectory.
  • The cleanFiles script is used to remove job scripts, log files, and output files created by GEOS-Chem.
runs/ Contains the various run directories. Each run directory is named according to the met field, horizontal grid, and type of simulation (4x5_standard, 2x25_RnPbBe, etc).

--Bob Yantosca (talk) 15:08, 20 December 2016 (UTC)

Using the GEOS-Chem Unit Tester

What the GEOS-Chem Unit Tester does

For each individual unit test (met field + horizontal grid + simulation type) that you specify in the RUNS section of the input file (more on this below), the GEOS-Chem Unit Tester will do the following:

  1. Run GEOS-Chem with strict debugging flags with OpenMP parallelization turned OFF
    • This is called the single processor or sp test phase.
  2. Run GEOS-Chem with strict debugging flags with OpenMP parallelization turned ON
    • This is called the multi processor or mp test phase.

The strict debugging flags will look for common computational and numerical issues, such as

  1. Floating-point math exceptions: div-by-zero, invalid computations (i.e. SQRT(-1), LOG(-1), etc.)
  2. Array-out-of-bounds errors
  3. Creation of array temporaries

Furthermore, the Unit Tester compare the output of the sp and mp test phases. If these outputs differ, then this indicates a parallelization error.

--Bob Y. 10:08, 25 April 2014 (EDT)

Specifying unit test options with an input file

Before you can start the GEOS-Chem Unit Tester, you must first specify the options for the unit test simulations in an input file. You can specify the directory paths for your system, the location of the GEOS-Chem code directory, the submit command for your system, and the types of simulations that you want the GEOS-Chem Unit Tester to validate. The default input file is named UnitTest.input, but you can cut-n-paste this file to create as many customized input files as you need.

The UnitTest.input file looks like this. All lines beginning with a # character are treated as comments and will be ignored.

#------------------------------------------------------------------------------
#                  GEOS-Chem Global Chemical Transport Model                  !
#------------------------------------------------------------------------------
#BOP
#
# !INCLUDE: UnitTest.input
#
# !DESCRIPTION: Input file that specifies debugging options for the 
#  GEOS-Chem unit tester.
#\\
#\\
# !REMARKS:  
#  To omit individual unit tests (or input settings), place a # comment
#  character in the first column.
#
#  For a complete explanation of how to customize the settings below for
#  your installation, please see these wiki posts:
#
#    http://wiki.geos-chem.org/GEOS-Chem_Unit_Tester#The_INPUTS_section
#    http://wiki.geos-chem.org/GEOS-Chem_Unit_Tester#The_RUNS_section
#
# !REVISION HISTORY: 
# Type 'gitk' at the prompt to browse the revision history.
#EOP
#------------------------------------------------------------------------------
#
# !INPUTS:
#
# %%% ID tags %%%
#
   VERSION          : v11-01
   DESCRIPTION      : Tests GEOS-Chem v11-01
#
# %%% Data path and HEMCO settings %%%
#
   DATA_ROOT        : /n/holylfs/EXTERNAL_REPOS/GEOS-CHEM/gcgrid/data/ExtData
   HEMCO_ROOT       : {DATAROOT}/HEMCO
   VERBOSE          : 3
   WARNINGS         : 3
#
# %%% Code, compiler, and queue settings %%%
#
   CODE_DIR         : {HOME}/GC/Code.v11-01
   COMPILER         : ifort
   MAKE_CMD         : make -j4 BOUNDS=y DEBUG=y FPE=y NO_ISO=y
   SUBMIT           : sbatch
#
# %%% Unit tester path names %%%
#
   UNIT_TEST_ROOT   : {HOME}/UT
   RUN_ROOT         : {UTROOT}/runs
   RUN_DIR          : {RUNROOT}/{RUNDIR}
   JOB_DIR          : {UTROOT}/jobs
   LOG_DIR          : {UTROOT}/logs/{VERSION}
   PERL_DIR         : {UTROOT}/perl
#
# %%% Web and text display options %%%
#
   TEMPLATE         : {PERLDIR}/ut_template.html
   TXT_GRID         : {LOGDIR}/{VERSION}.results.txt
   WEB_GRID         : {LOGDIR}/{VERSION}.results.html
   WEB_PUSH         : NONE
#
#  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#  %%%  OPTIONAL SLURM COMMANDS:                                    %%%
#  %%%                                                              %%%
#  %%%  Set these if your system uses the SLURM scheduler.          %%%
#  %%%  These will be used to set #SBATCH tags for the job script.  %%%
#  %%%  Otherwise you can comment these lines out.                  %%%
#  %%%                                                              %%%
#  %%%  NOTE: If you do use these SLURM commands, then also be      %%%
#  %%%  sure to set the SUBMIT command above to "sbatch".           %%%
#  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#
   SLURM_CPUS       : 4
   SLURM_NODES      : 1
   SLURM_TIME       : 1-12:00
   SLURM_MEMORY     : 30000
   SLURM_PARTITION  : jacob
   SLURM_CONSTRAINT : intel
   SLURM_MAILTYPE   : END
   SLURM_MAILUSER   : your-email-address
   SLURM_STDOUT     : {LOGDIR}/{VERSION}.stdout.log
   SLURM_STDERR     : {LOGDIR}/{VERSION}.stderr.log
#
# !RUNS:
#  Specify the debugging runs that you want to perform below.
#  You can deactivate runs by commenting them out with "#".
#
#--------|-----------|------|------------|------------|--------------|--------|
# MET    | GRID      | NEST | SIMULATION | START DATE | END DATE     | EXTRA? |
#--------|-----------|------|------------|------------|--------------|--------|
# ======= Radon-Lead-Beryllium ===============================================
  geosfp   4x5         -      RnPbBe       2013070100   201307010020   -
  merra2   4x5         -      RnPbBe       2013070100   201307010020   -
  merra    4x5         -      RnPbBe       2006070100   200607010020   -
  geos5    4x5         -      RnPbBe       2006070100   200607010020   -
  geos4    4x5         -      RnPbBe       2006070100   200607010020   -
  gcap     4x5         -      RnPbBe       2005070100   200507010020   -
  geosfp   2x25        -      RnPbBe       2013070100   201307010020   -
  merra2   2x25        -      RnPbBe       2013070100   201307010020   -
  geos5    2x25        -      RnPbBe       2006070100   200607010020   -
# ======= Mercury ============================================================
  geosfp   4x5         -      Hg           2013010100   201301010020   -
  merra2   4x5         -      Hg           2013010100   201301010020   -
  merra    4x5         -      Hg           2009010100   200901010020   -
  geos5    4x5         -      Hg           2009010100   200901010020   -
  geos4    4x5         -      Hg           2006010100   200601010020   -
  geosfp   2x25        -      Hg           2013010100   201301010020   -
  merra2   2x25        -      Hg           2013010100   201301010020   -
  merra    2x25        -      Hg           2009010100   200901010020   -
  geos5    2x25        -      Hg           2009010100   200901010020   -
# geos5    05x0666     na     Hg           2008010100   200801010020   -
# ======= Tagged Mercury =====================================================
  geos5    4x5         -      tagHg        2010010100   2010010101     -
# ======= POPs ===============================================================
  geosfp   4x5         -      POPs         2013070100   201307010020   -
  merra2   4x5         -      POPs         2013070100   201307010020   -
  merra    4x5         -      POPs         2006070100   200607010020   -
  geos5    4x5         -      POPs         2006070100   200607010020   -
  geos4    4x5         -      POPs         2006070100   200607010020   -
  gcap     4x5         -      POPs         2005070100   200507010020   -
  geosfp   2x25        -      POPs         2013070100   201307010020   -
  merra2   2x25        -      POPs         2013070100   201307010020   -
  geos5    2x25        -      POPs         2006070100   200607010020   -
# ======= Methane ============================================================
  geosfp   4x5         -      CH4          2013070100   201307010020   -
  merra2   4x5         -      CH4          2013070100   201307010020   -
  merra    4x5         -      CH4          2006070100   200607010020   -
  geos5    4x5         -      CH4          2006070100   200607010020   -
  geos4    4x5         -      CH4          2006070100   200607010020   -
  geosfp   2x25        -      CH4          2013070100   201307010020   -
  merra2   2x25        -      CH4          2013070100   201307010020   -
  geos5    2x25        -      CH4          2006070100   200607010020   -
  merra2   05x0625     na     CH4          2013070100   201307010020   -
  geos5    05x0666     na     CH4          2006070100   200607010020   -
# ======= Tagged O3 ==========================================================
  geosfp   4x5         -      tagO3        2013070100   201307010020   -
  merra2   4x5         -      tagO3        2013070100   201307010020   -
  merra    4x5         -      tagO3        2006070100   200607010020   -
  geos5    4x5         -      tagO3        2006070100   200607010020   -
  geos4    4x5         -      tagO3        2006070100   200607010020   -
  geosfp   2x25        -      tagO3        2013070100   201307010020   -
  merra2   2x25        -      tagO3        2013070100   201307010020   -
  geos5    2x25        -      tagO3        2006070100   200607010020   -
# ======= Tagged CO ==========================================================
  geosfp   4x5         -      tagCO        2013070100   201307010020   -
  merra2   4x5         -      tagCO        2013070100   201307010020   -
  merra    4x5         -      tagCO        2006070100   200607010020   -
  geos5    4x5         -      tagCO        2006070100   200607010020   -
# ======= Carbon Dioxide =====================================================
  geosfp   2x25        -      CO2          2013070100   201307010020   -
  merra2   2x25        -      CO2          2013070100   201307010020   -
  geos5    2x25        -      CO2          2006070100   200607010020   -
# ======= Offline Aerosols ===================================================
  geosfp   4x5         -      aerosol      2013070100   201307010020   - 
  merra2   4x5         -      aerosol      2013070100   201307010020   - 
  merra    4x5         -      aerosol      2006070100   200607010020   -
  geos5    4x5         -      aerosol      2006070100   200607010020   -
  geos4    4x5         -      aerosol      2006070100   200607010020   -
  geosfp   2x25        -      aerosol      2013070100   201307010020   -
  merra2   2x25        -      aerosol      2013070100   201307010020   -
  geos5    2x25        -      aerosol      2006070100   200607010020   -
# ======= GEOS-Chem benchmark ================================================
  geosfp   4x5         -      standard     2013070100   201307010020   -
  merra2   4x5         -      standard     2013070100   201307010020   -
  geosfp   2x25        -      standard     2013070100   201307010020   -
# ======= Tropchem ===========================================================
  geosfp   4x5         -      tropchem     2013070100   201307010020   -
  merra2   4x5         -      tropchem     2013070100   201307010020   -
  merra    4x5         -      tropchem     2006070100   200607010020   -
  geos5    4x5         -      tropchem     2006070100   200607010020   -
  geos4    4x5         -      tropchem     2006070100   200607010020   -
# gcap     4x5         -      tropchem     2005070100   200507010020   -
  geosfp   2x25        -      tropchem     2013070100   201307010020   -
  merra2   2x25        -      tropchem     2013070100   201307010020   -
  geos5    2x25        -      tropchem     2006070100   200607010020   -
# ======= SOA (w/o SVPOA) ====================================================
  geosfp   4x5         -      soa          2013070100   201307010020   -
  merra2   4x5         -      soa          2013070100   201307010020   -
  merra    4x5         -      soa          2006070100   200607010020   -
  geos5    4x5         -      soa          2006070100   200607010020   -
  geosfp   2x25        -      soa          2013070100   201307010020   -
  merra2   2x25        -      soa          2013070100   201307010020   -
  geos5    2x25        -      soa          2006070100   200607010020   -
# ======= SOA (w/ SVPOA) =====================================================
  geosfp   4x5         -      soa_svpoa    2013070100   201307010020   -
  merra2   4x5         -      soa_svpoa    2013070100   201307010020   -
  merra    4x5         -      soa_svpoa    2006070100   200607010020   -
  geos5    4x5         -      soa_svpoa    2006070100   200607010020   -
  geosfp   2x25        -      soa_svpoa    2013070100   201307010020   -
  merra2   2x25        -      soa_svpoa    2013070100   201307010020   -
  geos5    2x25        -      soa_svpoa    2006070100   200607010020   -
# ======= Acid uptake on dust ================================================
  geosfp   4x5         -      aciduptake   2013070100   201307010020   -
  geosfp   2x25        -      aciduptake   2013070100   201307010020   -
# ======= Marine POA =========================================================
  geosfp   4x5         -      marinePOA    2013070100   201307010020   -
  geosfp   2x25        -      marinePOA    2013070100   201307010020   -
# ======= TOMAS aerosol microphysics =========================================
  geosfp   4x5         -      TOMAS15      2013070100   201307010020   -
  geos5    4x5         -      TOMAS15      2006070100   200607010020   -
  geosfp   4x5         -      TOMAS40      2013070100   201307010020   -
  geos5    4x5         -      TOMAS40      2006070100   200607010020   -
# ======= UCX strat-trop chemistry ===========================================
  geosfp   4x5         -      UCX          2013070100   201307010020   -
  merra2   4x5         -      UCX          2013070100   201307010020   -
  geos5    4x5         -      UCX          2006070100   200607010020   -
  geosfp   2x25        -      UCX          2013070100   201307010020   -
  merra2   2x25        -      UCX          2013070100   201307010020   -
  geos5    2x25        -      UCX          2006070100   200607010020   -
# ======= RRTMG online radiative transfer ====================================
  geosfp   4x5         -      RRTMG        2013070100   201307010040   -
  merra2   4x5         -      RRTMG        2013070100   201307010040   -
  merra    4x5         -      RRTMG        2006070100   200607010040   -
  geos5    4x5         -      RRTMG        2006070100   200607010040   -
# geosfp   2x25        -      RRTMG        2013070100   201307010040   -
# merra2   2x25        -      RRTMG        2013070100   201307010040   -
# geos5    2x25        -      RRTMG        2006070100   200607010040   -
# ======= Nested model runs ==================================================
# geosfp   025x03125   ch     tropchem     2013070100   201307010010   -
  geosfp   025x03125   na     tropchem     2013070100   201307010010   -
  merra2   05x0625     as     tropchem     2013070100   201307010020   -
  merra2   05x0625     na     tropchem     2013070100   201307010020   -
  geos5    05x0666     ch     tropchem     2006070100   200607010020   -
  geos5    05x0666     na     tropchem     2006070100   200607010020   -
 !END OF RUNS:
#EOP
#------------------------------------------------------------------------------

--Melissa Sulprizio (talk) 15:59, 22 February 2017 (UTC)

The INPUTS section

Under the !INPUTS: section, you can customize the directory paths and other options for your system. As seen above, most of these inputs are self-explanatory.

Option DescriptionMet field type
VERSION An ID tag that will be added to all log files and output files.
DESCRIPTION A short (1-sentence) description of what features are being validated by this unit test.
DATA_ROOT Specifies the path for your root-level data directory.
HEMCO_ROOT Specifies the top-level path for the HEMCO data directory tree.
  • The {DATAROOT} token in HEMCO_ROOT will be replaced with the value you specify for RUN_ROOT option. Leave this as-is.
VERBOSE Specifies the level of debug output that will be sent to the HEMCO log file. (0=no debug output; 3=max debug output)
  • Recommended setting: 0
WARNINGS Specifies the level of warning messages that will be sent to the HEMCO log file. (0=no warnings; 3=max warnings)
  • Recommended setting: 1
CODE_DIR Specifies the path of the source code directory.
COMPILER Specifies the compiler type.
  • Currently allowed values are ifort, gfortran, and pgi.
  • NOTE: In GEOS-Chem v11-02 and newer versions, the value of COMPILER is automatically determined from the FC Unix environment variable. Therefore, the COMPILER setting will be obsolete for the newest versions of GEOS-Chem.
MAKE_CMD Specifies the make command for your system. Usually this is make, but on some systems this may be gmake. Recommended options are:
  • BOUNDS=y: Turns on array-out-of-bounds checking
  • DEBUG=y: Turns off optimization and enables features that will facilitate running GEOS-Chem in a debugger (if need be). Will cause GEOS-Chem to check for array temporaries. Also enables program traceback.
  • NO_ISO=y: Disables the ISORROPIA aerosol thermodynamical equilibrium module, which is known to produce random numerical noise.
  • FPE=y: Turns on checks for floating-point issues (div-by-zero, floating invalid, underflow, overflow, etc).
SUBMIT Specifies the command that will send the Unit Test job to your queue system.
  • If you don't have a queue system, leave this blank, and the Unit Tester will run interactively.
UNIT_TEST_ROOT Specifies the path to the GEOS-Chem Unit Tester.
RUN_ROOT Specifies the top-level unit test run directories.

Leave this as-is.

RUN_DIR Specifies the run directory subdirectory.
  • The {RUNDIR} token in RUN_DIR will be replaced with the name of a subdirectory.

Leave this as-is.

JOB_DIR Specifies the directory where the unit test job script will be created.

Leave this as-is.

LOG_DIR Specifies the directory where log files from this unit test simulation will be sent.
  • The {VERSION} token in LOG_DIR will be replaced with the value of VERSION that you specify above. This allows the Unit Tester to send log files from different unit tests to subdirectories of LOG_DIR. This will let you preserve older log files.
PERL_DIR Specifies the directory where the unit test Perl scripts are found.
  • Leave this as-is.
TEMPLATE Specifies the template HTML file that will be used to create a web page with unit test results.
  • Leave this as-is.
TXT_GRID Specifies the path of this summary text file
  • The {LOGDIR} token in TXT_GRID will be replaced with the value of LOG_DIR. Leave this as-is.
  • The {VERSION} token in TXT_GRID will be replaced with the value of VERSION that you specify above. Leave this as-is.
WEB_GRID Specifies the name of the web page that will contain the unit test results.
  • This web page is created from the template HTML file specified with the TEMPLATE option.
  • The {LOGDIR} token in WEB_GRID will be replaced with the value of LOG_DIR. Leave this as-is.
  • The {VERSION} token in WEB_GRID will be replaced with the value of VERSION that you specify above. Leave this as-is.
WEB_PUSH Specifies the remote server to which the WEB_GRID web page will be uploaded. Options are:
  • NONE: Do not upload the page
  • user@host|directory/: Specifies the remote directory. (Example: geoschem@fas.harvard.edu|public_html/ut/)

Note that you can use a symbolic link (i.e. /home/{USER}/UT/ in the RUN_ROOT, RUN_DIR, JOB_DIR, LOG_DIR and PERL_DIR variables. This can help you shorten the file paths.

--Melissa Sulprizio (talk) 15:59, 22 February 2017 (UTC)

The RUNS section

Under the !RUNS: section, you will list each of the combinations that you want the GEOS-Chem Unit Tester to validate. Simply list the following information under the proper column heading. Lines starting with # will be ignored.

# !RUNS:
#  Specify the debugging runs that you want to perform below.
#  You can deactivate runs by commenting them out with "#".
#
#--------|-----------|------|------------|------------|--------------|---------|
# MET    | GRID      | NEST | SIMULATION | START DATE | END DATE     | EXTRA?  |
#--------|-----------|------|------------|------------|--------------|---------|
  geosfp   4x5         -      RnPbBe       2013070100   2013070101     -
  geosfp   4x5         -      Hg           2013070100   2013070101     -
  geosfp   4x5         -      POPs         2013070100   2013070101     -
  geosfp   4x5         -      CH4          2013070100   2013070101     -
  geosfp   4x5         -      tagO3        2013070100   2013070101     -
  geosfp   4x5         -      tagCO        2013070100   2013070101     -
  geosfp   4x5         -      aerosol      2013070100   2013070101     -
  geosfp   4x5         -      standard     2013070100   2013070101     -
  geosfp   4x5         -      tropchem     2013070100   2013070101     -
  geosfp   4x5         -      soa          2013070100   2013070101     -
  geosfp   4x5         -      soa_svpoa    2013070100   2013070101     -
  geosfp   4x5         -      aciduptake   2013070100   2013070101     -
  geosfp   4x5         -      marinePOA    2013070100   2013070101     -
  geosfp   4x5         -      TOMAS40      2013070100   2013070101     -
  geosfp   4x5         -      UCX          2013070100   2013070101     -
  . . . etc . . .
!END OF RUNS:

Options:

MET
Specifies the met field type. Allowable values are:
Value Met field type
gcap Selects the GCAP met fields.
geos4 Selects the GEOS-4 met fields.
geos5 Selects the GEOS-5 met fields.
geosfp Selects the GEOS-FP met fields.
merra Selects the MERRA met fields.
merra2 Selects the MERRA-2 met fields.
GRID
Specifies the horizontal grid. Allowable values are:
Value Grid type
4x5 Selects the GMAO 4° x 5° horizontal grid.
2x25 Selects the GMAO 2° x 2.5° horizontal grid.
05x0666 Selects the GMAO 0.5° x 0.666° grid for use with GEOS-5 met fields only.
(You must also specify a value for NEST.)
05x0625 Selects the GMAO 0.5° x 0.625° grid for use with MERRA-2 met fields only.
(You must also specify a value for NEST.)
025x03125 Selects the GMAO 0.25° x 0.3125° grid for use with GEOS-FP met fields only.
(You must also specify a value for NEST.)
NEST
Specifies the nested grid. May only be used if the value for GRID is 05x0666, 05x0625, or 025x03125. Allowable values are:
Value Nested grid option
- Skips the nested grid option (default). Use this for global simulations.
as Selects the Asia (AS) nested grid option for use with MERRA-2 met fields only.
ch Selects the China (CH) nested grid option for use with GEOS-5 or GEOS-FP met fields only.
eu Selects the Europe (EU) nested grid option.
na Selects the North American (NA) nested grid option.
SIMULATION
Specifies the simulation type. Allowable values are:
Value Simulation
Full-chemistry simulations
standard Selects the Standard chemistry mechanism used in the GEOS-Chem benchmark simulations.
tropchem Selects the The NOx-Ox-HC-Aer-Br tropospheric chemistry simulation.
soa Selects the Secondary organic aerosols simulation, without semi-volatile POA.
soa_svpoa Selects the Secondary organic aerosols simulation, with semi-volatile POA.
aciduptake Selects the Standard chemistry simulation, with acid uptake on dust aerosols turned on.
marinePOA Selects the Standard chemistry simulation, with marine primary organic aerosols turned on.
UCX Selects the UCX chemistry mechanism: combined stratospheric and tropospheric chemistry
RRTMG Selects the The NOx-Ox-HC-Aer-Br tropospheric chemistry simulation, with RRTMG turned on.
Specialty simulations
RnPbBe Selects the Radon-Lead-Beryllium simulation.
Hg Selects the Mercury simulation.
tagHg Selects the Tagged mercury simulation.
POPs Selects the Persistent Organic Pollutants (POPs) simulation.
CH4 Selects the CH4 simulation.
tagCO Selects the Tagged CO simulation.
tagO3 Selects the Simple tagged O3 simulation (w/ 2 tracers: Total O3 and Stratospheric O3).
CO2 Selects the CO2 simulation.
TOMAS15 Selects the TOMAS aerosol microphysics simulation with 15 size bins.
TOMAS40 Selects the TOMAS aerosol microphysics simulation with 40 size bins.
START DATE
Specifies the start date (YYYYMMDD) and hour (hh) of the unit test.
END DATE
Specifies the ending date (YYYYMMDD), hour (hh), and minutes (mm) of the unit test.
  • In most cases, a 1-hour simulation is sufficient to detect bugs.
  • For unit tests at 2° x 2.5° resolution or higher, you can end the simulation after one timestep, which is less than an hour.
EXTRA?
Specifies any simulation-specific Makefile options that need to be set at compile time for a particular simulation. Typical values are:
Value Met field type
- Skips using an extra Makefile command (default).

Further notes about the !RUNS section:

  1. We typically run from 2005070100 to 2005070101 for GCAP met fields.
  2. We typically run from 2006070100 to 2006070101 for GEOS-4, GEOS-5 and MERRA met fields.
  3. We typically run from 2013070100 to 2013070101 for GEOS-FP and MERRA-2 met fields.
  4. The actual year for the met fields does not matter so much for the unit tests. The unit tests runs the same simulation twice (with and without parallelization) and then tests for identical results.

--Bob Y. 11:05, 25 April 2014 (EDT)
--Melissa Sulprizio (talk) 15:59, 22 February 2017 (UTC)

Running the GEOS-Chem Unit Tester

Once you have added your desired options to the input file, you may then proceed to start the GEOS-Chem Unit Tester. At the Unix prompt, type:

cd perl 
./gcUnitTest FILENAME

where FILENAME is the name the input file (e.g. UnitTest.input) that you have just edited. The settings in the input file will be used in the Unit Test simulations. If FILENAME is omitted, then the gcUnitTest script will use UnitTest.input by default.

You will usually want the Unit Test simulations to run in a queue on your computational cluster. For example, you can set up a Unit Test job to run overnight. The GEOS-Chem Unit Tester will compile and run the code for each of the types of simulations that you specified in the input file. The Unit Tester will compile and run GEOS-Chem twice for each type of simulation (once with OpenMP parallelizaton turned off, and again with OpenMP parallelization turned on). Then the Unit tester will check to see if the output files from both simulations are identical.

Log-file output generated by the GEOS-Chem Unit Tester is sent to the logs/{VERSION} directory, where {VERSION} denotes the version tag that you assigned in the input file. (This allows you to preserve log file output from several previous Unit Test simulations.)

--Bob Yantosca (talk) 19:05, 24 April 2017 (UTC)

Examining the results

Output files generated by the GEOS-Chem Unit Tester

The GEOS-Chem Unit Tester will run GEOS-Chem simulations in the subdirectories of the runs/ directory. Each individual subdirectory of runs/ corresponds to a particular unit test, or combination of met field + horizontal grid + simulation type. Some example run directory names are:

runs/geos5_4x5_tropchem   # Run dir for unit test w/ GEOS-5 met, 4x5 grid, tropospheric-chemistry simulation
runs/geosfp_2x25_CO2      # Run dir for unit test w/ GEOS-FP met, 2x25 grid, CO2 simulation
runs/merra_4x5_RnPbBe     # Run dir for unit test w/ MERRA met, 4x5 grid, and Rn-Pb-Be simulation
etc.

etc. In each of these run directories, GEOS-Chem will create several output files containing tracer concentrations and diagnostic quantities. These files are:

File Description
trac.avg.*.sp Diagnostic output file (aka ctm.bpch) containing averaged diagnostic quantities from the single-processor test.
trac.avg.*.mp Diagnostic output file (aka ctm.bpch) containing averaged diagnostic quantities from the multi-processor test.
GEOSChem_restart.*.sp Restart file containing instantaneous tracer concentrations at the end of the single-processor test.
GEOSChem_restart.*.mp Restart file containing instantaneous tracer concentrations at the end of the multi-processor test.
HEMCO_restart.*.sp Restart file generated by HEMCO at the end of the single processor test.
HEMCO_restart.*.mp Restart file generated by HEMCO at the end of the multi-processor test

The GEOS-Chem Unit Tester will then examine each of these files to determine if the unit test succeeded or not.

In addition, HEMCO will save out log files in each run directory. These are not examined by the GEOS-Chem unit tester, but can be manually viewed in order to determine why particular unit test failed.

File Description
HEMCO.log.sp HEMCO log file generated by the single-processor test.
  • Contains detailed information about the creation of HEMCO diagnostic containers and file I/O processes.
  • Useful for debugging.
HEMCO.log.mp HEMCO log file generated by the multi-processor test.
  • Contains detailed information about the creation of HEMCO diagnostic containers and file I/O processes.
  • Useful for debugging.

--Bob Y. 14:26, 18 March 2015 (EDT)

Log files created by the GEOS-Chem Unit Tester

The GEOS-Chem Unit Tester will also create a series of log files in the logs/{VERSION} directory, where {VERSION} is specifed in the The !INPUTS section of the unit test input file. These log files are:

File Description Notes
{VERSION}.stderr.log
(SLURM scheduler)

job.{VERSION}.o*
(GridEngine scheduler)
File containing the Unix stderr output. All error and warning messages will get sent to this file. This is created if you run the Unit Tester in the Oracle Grid Engine queue system. You normally won't have to look at this file, unless a particular simulation dies unexpectedly. The output contained can be very useful in determining where the error ocurrred.
{VERSION}.stdout.log File containing the Unix stdout output. In most cases you will not need to look at this file.
{VERSION}.results.log Log file containing the results from each individual unit test simulation that you ran.

More information on this file is contained below.

{VERSION}.results.html Web page (HTML) containing a graphical representation of the unit test results.

More information on this file is contained below.

{VERSION}.results.txt Text file containing a table representation of the unit test results.

More information on this file is contained below.

{VERSION}.{MET}_{GRID}_{SIM}.log.sp
(Global simulations)

{VERSION}.{MET}_{GRID}_{SIM}_{NEST}.log.sp
(Nested-grid simulations)
GEOS-Chem log file output from the single-processor test phase of the unit test for the given met field, grid, simulation type (and, if applicable, nested-grid region).
{VERSION}.{MET}_{GRID}_{SIM}.log.mp
(Global simulations)

{VERSION}.{MET}_{GRID}_{SIM}_{NEST}.log.mp
(Nested-grid simulations)
GEOS-Chem log file output from the multi-processor test phase of the unit test for the given met field, grid, simulation type (and, if applicable, nested-grid region).


--Bob Yantosca (talk) 19:20, 24 April 2017 (UTC)

Interpreting results generated by the GEOS-Chem Unit Tester

To determine whether or not the Unit Tests were successful, check the following log files:

  1. {VERSION}.results.log (The "results" file)
  2. The stderr file:
    • {VERSION}.stderr.log (SLURM scheduler)
    • job.{VERSION}.o* (Grid Engine scheduler).

The {VERSION}.results.log file will contain printout similar to the following. Looking at this file will tell you if the output from the sp and mp test phases of each unit test simulation were identical to each other, or if they differed.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%%  GEOS-CHEM UNIT TEST RESULTS FOR VERSION: v10-01e
%%%  job sent to queue @ 2014/10/23 11:50:45
%%%
%%%  DESCRIPTION: Tests v10-01e -- HEMCO emissions
%%%
%%%  This is the main log file, which shows output from
%%%  each individual phase of the unit test sequence.
%%%
%%%  Log files from individual unit-test runs are also
%%%  stored in this same directory.
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
###############################################################################
### VALIDATION OF GEOS-CHEM OUTPUT FILES
### In directory: geosfp_4x5_standard
###
### File 1    : trac_avg.geosfp_4x5_standard.201307010000.sp
### File 2    : trac_avg.geosfp_4x5_standard.201307010000.mp
### Sizes     : IDENTICAL (347020492 and 347020492)
### Checksums : IDENTICAL (3903897761 and 3903897761)
### Diffs     : IDENTICAL
###
### File 1    : GEOSChem_restart.201307010200.nc.sp
### File 2    : GEOSChem_restart.201307010200.nc.mp
### Sizes     : IDENTICAL (125832842 and 125832842)
### Checksums : IDENTICAL (3907029337 and 3907029337)
### Diffs     : IDENTICAL
###
### File 1    : HEMCO_restart.201307010200.nc.mp
### File 2    : HEMCO_restart.201307010200.nc.sp
### Sizes     : IDENTICAL (118525 and 118525)
### Checksums : IDENTICAL (378999821 and 378999821)
### Diffs     : IDENTICAL
###############################################################################

... etc ... 
 
###############################################################################
### VALIDATION OF GEOS-CHEM OUTPUT FILES
### In directory: geosfp_4x5_POPs
###
### File 1    : trac_avg.geosfp_4x5_POPs.201307010000.sp
### File 2    : trac_avg.geosfp_4x5_POPs.201307010000.mp
### Sizes     : IDENTICAL (28256020 and 28256020)
### Checksums : IDENTICAL (560324576 and 560324576)
### Diffs     : IDENTICAL
###
### File 1    : GEOSChem_restart.201307010020.nc.sp
### File 2    : GEOSChem_restart.201307010020.nc.mp
### Sizes     : IDENTICAL (1868497 and 1868497)
### Checksums : IDENTICAL (241223905 and 241223905)
### Diffs     : IDENTICAL
###
### File 1    : HEMCO_restart.201307010020.nc.sp
### File 2    : HEMCO_restart.201307010020.nc.mp
### Sizes     : IDENTICAL (20558 and 20558)
### Checksums : IDENTICAL (804171793 and 804171793)
### Diffs     : IDENTICAL
###############################################################################

... etc ... 

If the unit halted with an error prematurely, then you will also have to look at the stderr log file.

Here is a quick table that you can use to interpret the results of each unit test (i.e. combination of met field + horizontal grid + simulation type) that you selected:

Case Description Interpretation
1 Unit test did not halt prematurely with any errors.
In the {VERSION}.results.log file we see:
  • trac.avg.*.sp and trac_avg.*.mp are IDENTICAL
  • GEOSChem_restart.*.sp and GEOSChem_restart.*.mp are IDENTICAL
  • HEMCO_restart.*.sp and HEMCO_restart.*.mp are IDENTICAL
  • The single processor (sp) test phase produced identical output to the multi-processor (mp) test phase. Likewise, all of the emissions diagnostics saved to the HEMCO restart file (e.g. soil NOx restart-file quantities) are identical. Therefore we can consider this unit test successful.
2 Unit test did not halt prematurely with any errors.
In the {VERSION}.results.log file we see:
  • trac.avg.*.sp and trac_avg.*.mp are DIFFERENT
  • GEOSChem_restart.*.sp and GEOSChem_restart.*.mp are IDENTICAL
  • HEMCO_restart.*.sp and HEMCO_restart.*.mp are IDENTICAL
  • Because the restart files are identical, we can say that the single-processor (sp) test phase yielded identical output to the multi-processor (mp) test phase as far as the tracers are concerned. This indicates that the chemistry is being performed properly.
  • Because the trac.avg* files are DIFFERENT, we can say that there is a numerical issue in one of the archived diagnostics that merits further investigation. In many instances, this can be caused by a parallelization error where GEOS-Chem diagnostics are being archived. It may be that a particular variable needs was not declared !$OMP+PRIVATE in a parallel DO-loop.
3 Unit test did not halt prematurely with any errors.
In the {VERSION}.results.log file we see:
  • trac.avg.*.sp and trac_avg.*.mp are DIFFERENT
  • GEOSChem_restart.*.sp and GEOSChem_restart.*.mp are DIFFERENT
  • HEMCO_restart.*.sp and HEMCO_restart.*.mp are DIFFERENT
  • The multi processor (mp) test phase could not reproduce the results obtained by the single processor (sp) test phase. Therefore, this unit test is not successful. Further debugging will be needed to reveal the source of the discrepancy.
  • In some cases you will see that the Checksums and/or Diffs lines in the log file may say FILE NOT FOUND. This indicates that the unit test died before the output files could be created.
4 Unit test halted with an error.
In the stderr output we see the error output similar to this:
> forrtl: error (65): floating invalid
Image     PC                Routine Line     Source       
    
geos      00000000004703B1  Unknown Unknown  Unknown
geos      000000000040325C  MAIN__  12       main.F
geos      000000000040319C  Unknown Unknown  geos
libc.so.6 00000037B2A21A05  Unknown Unknown  Unknown
geos      0000000000403099  Unknown Unknown  Unknown
  • The floating invalid error indicates that a division by zero or other illegal computation (such as SQRT(-1), LOG(0), etc.) has occurred. You can use the error trace stack to find the line of code that caused the error.
5 Unit test halted with an error.
In the stderr output we see the error output similar to this:
> main.F(12): error #5561: Subscript #1 of the array ARRAY has
value 4 which is greater than the upper bound of 3
      ARRAY(4) = 4.0
  • This output indicates that an array-out-of-bounds error has occurred. For example, we were trying to access ARRAY(4), but ARRAY may be declared with less than 4 elements. This type of error can actually overwrite another variable—whichever variable happens to be stored next to ARRAY in the computer memory—with junk data. This can cause GEOS-Chem to die with an error in a very different location from where the array-out-of-bounds error actually occurred.
6 Unit tester did not halt prematurely with any errors, but we noticed the following warning message in the stderr output:
> forrtl: warning (402): fort: (1): In call to MY_ROUTINE, 
an array temporary was created for argument #1
  • This message indicates the presence of an array temporary. When GEOS-Chem is passing data to subroutine MY_ROUTINE, it has to make a duplicate copy of the data before passing to the subroutine. This can cause GEOS-Chem to execute more slowly, as the creation of the array temporary is wasteful both CPU cycles and memory.

--Bob Yantosca (talk) 19:43, 24 April 2017 (UTC)

Web page with graphical output

The GEOS-Chem Unit Tester will also create a web page that summarizes the results in an easy-to-read table. The name of the web page is specified with the WEB_GRID option in the !INPUTS: section of the unit test input file. The web page will contain output similar to this example:


GEOS-Chem Unit Test Results

Version: v10-01e
Date Submitted: 2014/10/28 12:08:16
Description: Tests v10-01e -- HEMCO emissions


4° x 5° Unit Tests UCX Trop-
chem
SOA SOA w/ SVPOA Rn-
Pb-Be
Hg POPs TagCO TagO3 CH4 CO2 Aer-
osols
TOMAS
40
GEOS-FP @ 4° x 5°                          
MERRA @ 4° x 5°                          
GEOS-5 @ 4° x 5°                          
GEOS-4 @ 4° x 5°                          
GCAP @ 4° x 5°                          
2° x 2.5° Unit Tests UCX Trop-
chem
SOA SOA w/ SVPOA Rn-
Pb-Be
Hg POPs TagCO TagO3 CH4 CO2 Aer-
osols
TOMAS
40
GEOS-FP @ 2° x 2.5°                          
GEOS-5 @ 2° x 2.5°                          



LEGEND

  The unit test was successful.
  Further investigation is necessary (e.g. The restart files were identical but the diagnostic output differed).
  The unit test failed.
  A unit test was not performed for this combination of met field, horizontal grid, and simulation type.

NOTES:

  1. As you can see, each unit test is assigned a color (red, yellow, or green) to denote if the test was successful or not. This lets you easily scan the results at a single glance.
  2. This web page can be pushed to a remote server where it can be viewed online. You can specify the directory where the page can be pushed with the the WEB_PUSH option in the !INPUTS: section of the unit test input file.
  3. We usually do not perform every possible unit test indicated on the grid above, for the following reasons:
    • In order to save time, we typically perform most unit tests at 4° x 5° resolution, with a few selected unit tests at 2° x 2.5° resolution. This is usually sufficient to detect most bugs and numerical issues.
    • We usually have to run the the high-resolution nested grid unit tests (0.5° x 0.666° or 0.25° x 0.3125°) separately from the global 4° x 5° and 2° x 2.5° simulations. The nested-grid simulations require much more memory and thus must be submitted to our high-memory computational queue.
    • We typically focus on GEOS-Chem simulations driven by the GMAO met fields. For this reason we usually only perform a single unit test for GCAP (the 4° x 5° full-chemistry simulation).

--Bob Y. 15:01, 30 October 2014 (EDT)

Cleaning old files

To clean all of the files created by the unit tester (job scripts, logs, bpch files), type:

cd perl  
./cleanFiles

--Bob Yantosca (talk) 19:44, 24 April 2017 (UTC)

Generating GEOS-Chem run directories

The GEOS-Chem Unit Tester contains several run directories for many different types of GEOS-Chem simulations. You can use the script gcCopyRunDirs (located in the perl/ directory) to create fresh copies of these run directories that you can use for your own GEOS-Chem simulations. Please see our Creating GEOS-Chem run directories wiki page.

--Bob Y. 14:31, 18 March 2015 (EDT)

Updates for GEOS-Chem v11-01

The following features were introduced in the GEOS-Chem Unit Tester for GEOS-Chem v11-01.

We removed the Restart files from the GEOS-Chem-UnitTest repository

Melissa Sulprizio wrote:

We now store the tracer restart files in directory {DATA_ROOT}/GC_RESTARTS/. The ocean restart files for the Hg simulations have also been moved to that directory. Users can download GC_RESTARTS using the wget utility. They can choose to download the entire directory or only the resolutions/simulation types that they need.

The path to the input restart file is now hardwired in the input.geos.template files. For users that create run directories using gcCopyRunDirs, they may use the initial_trac_restart file specified to start their simulation, but it is recommended that they spin up a more representative restart file and modify the line for the input restart file in input.geos accordingly.

--Bob Yantosca (talk) 19:38, 18 December 2015 (UTC)

The GEOS-Chem-UnitTest repository for v11-01 is now on bitbucket.org

By removing the restart files from the unit tester repository, we were able to condense the size of the Git repository from over 10GB down to about 200 MB. This allowed us to move the GEOS-Chem-UnitTest Git repository from git://git.as.harvard.edu to https://bitbucket.org/gcst/GEOS-Chem-UnitTest. This move was necessitated by technical considerations.

--Bob Yantosca (talk) 19:38, 18 December 2015 (UTC)

You can now create difference tests with the unit tester

Lizzie Lundgren (GCST) added the capability to generate difference test directories from the unit tester. The script gcCreateDiffTest will generate a difference test directory based on the specifications in the file DiffTest.input.

To create a difference test directory, make sure you are in the perl/ folder, then type:

 ./gcCreateDiffTest DiffTest.input

This feature is present in the GEOS-Chem Unit Tester corresponding to GEOS-Chem v11-01.

--Bob Yantosca (talk) 19:38, 18 December 2015 (UTC)

You can now specify the unit test root directory

The unit tester corresponding to GEOS-Chem v10-01 and earlier versions always assumed that the root folder would be placed into a user's home folder. For example, a typical UnitTest.input file would have these settings:

  RUN_ROOT         : {HOME}/UT/runs
  RUN_DIR          : {RUNROOT}/{RUNDIR}
  JOB_DIR          : {HOME}/UT/jobs
  LOG_DIR          : {HOME}/UT/logs/{VERSION}
  PERL_DIR         : {HOME}/UT/perl

where the {HOME} token would be replaced with the user's home folder (i.e. the value specified by the $home environment variable.)

But on many computer systems, it is necessary to install the unit tester onto a scratch disk instead of a home folder. Scratch disks are often mounted onto fast networks (such as Infiniband) and have much more disk space available than a home folder. We have therefore modified the unit tester corresponding to GEOS-Chem v11-01 so that you may specify the unit test root directory independently of your home folder.

The new UNIT_TEST_ROOT tag lets you specify the location of the unit tester's root directory. If your unit tester is installed on a scratch disk, then make sure these lines are in your UnitTest.input:

  UNIT_TEST_ROOT   : /fast/scratch/disk/UT
  RUN_ROOT         : {UTHOME}/runs
  RUN_DIR          : {RUNROOT}/{RUNDIR}
  JOB_DIR          : {UTHOME}/jobs
  LOG_DIR          : {UTHOME}/logs/{VERSION}
  PERL_DIR         : {UTHOME}/perl

NOTE: The {UTHOME} token in the will be replaced by the value assinged to UNIT_TEST_ROOT.

On the other hand, if your unit tester is installed into your home directory, then add these lines:

  UNIT_TEST_ROOT   : {HOME}/UT
  RUN_ROOT         : {UTHOME}/runs
  RUN_DIR          : {RUNROOT}/{RUNDIR}
  JOB_DIR          : {UTHOME}/jobs
  LOG_DIR          : {UTHOME}/logs/{VERSION}
  PERL_DIR         : {UTHOME}/perl

Note that only the line in GREEN has to specify the root folder of the unit tester.

--Bob Yantosca (talk) 19:19, 18 December 2015 (UTC)

You can now submit unit tests to the SLURM scheduler

We modified the UnitTest.input file so that you can specify parameters for submitting the unit test job using the SLURM scheduler. The following optional settings are now present in the INPUTS: section:

#
# !INPUTS:
#
   VERSION         : v11-01
   ... etc ...
   LOG_DIR         : {HOME}/UT/logs/{VERSION}
   ... etc ...
   SUBMIT          : sbatch
   ... etc ...
#
#  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#  %%%  OPTIONAL SLURM COMMANDS:                                    %%%
#  %%%                                                              %%%
#  %%%  Set these if your system uses the SLURM scheduler.          %%%
#  %%%  These will be used to set #SBATCH tags for the job script.  %%%
#  %%%  Otherwise you can comment these lines out.                  %%%
#  %%%                                                              %%%
#  %%%  NOTE: If you do use these SLURM commands, then also be      %%%
#  %%%  sure to set the SUBMIT command above to "sbatch".           %%%
#  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#
   SLURM_CPUS       : 4
   SLURM_NODES      : 1
   SLURM_TIME       : 1-00:00
   SLURM_MEM        : 7000
   SLURM_PARTITION  : general
   SLURM_CONSTRAINT : intel
   SLURM_MAILTYPE   : ALL
   SLURM_MAILUSER   : person@email.somewhere.edu
   SLURM_STDOUT     : {LOGDIR}/{VERSION}.stdout.log
   SLURM_STDERR     : {LOGDIR}/{VERSION}.stderr.log

These settings are then used to add the appropriate #SBATCH tags at the top of the Unit test job script:

#!/bin/bash
 
#SBATCH -n 4
#SBATCH -N 1
#SBATCH -t 1-00:00
#SBATCH --mem=7000
#SBATCH -p general
#SBATCH --constraint=intel
#SBATCH --mail-user=person@email.somewhere.edu
#SBATCH --mail-type=ALL
#SBATCH -o /home/person/UT/logs/v11-01/v11-01.stdout.log
#SBATCH -e /home/person/UT/logs/v11-01/v11-01.stderr.log
export OMP_NUM_THREADS=4

###############################################################################
# Job script for unit test: v11-01
# Tests v11-01
###############################################################################

--Bob Yantosca (talk) 18:58, 18 December 2015 (UTC)

You can now request a summary of unit test results in plain text format

On some computer systems, a job running in the computational queues does not have access to the internet. This would prevent the GEOS-Chem Unit Tester from being able to push a summary of unit test results in HTML format (e.g v11-01.results.html) to a web server while the unit tests are still running.

We have therefore modified the Unit Tester so that it can create a plain text file containing the unit test results. You can tail this file while the unit tests are running in order to see the status of the jobs (i.e. use Unix command tail -f).

You specify the path of this summary text file with the TXT_GRID option in the UnitTest.input file:

#
# !INPUTS:
#
   VERSION         : v11-01
   ... etc ...
   WEB_GRID        : NONE
   TXT_GRID        : {LOGDIR}/{VERSION}.results.txt
   WEB_PUSH        : NONE

In this case, we are telling the Unit Tester that we want to disable creating the HTML web page, and also want to disable pushing both text and HTML output to a web server. The Unit Tester will place a file named v11-01.results.txt in the log directory, which contains output similar to this:

GEOS-Chem Unit Test             : RESULT
------------------------------------------
geosfp_4x5_RnPbBe               : GREEN
merra_4x5_RnPbBe                : GREEN
... etc ...

As with the HTML web page format:

  • GREEN means that the unit test passed
  • YELLOW means that the unit test passed, but that the diagnostic output differed
  • RED means that the unit test failed

--Bob Y. (talk) 23:30, 23 June 2015 (UTC)

You can now check for mass conservation

We have now modified GEOS-Chem v11-01 and the GEOS-Chem Unit Tester so that you can run a mass conservation test (based on the 2° x 2.5° CO2 simulation). For more information, please see this post on our GEOS-Chem v11-01 wiki page.

--Bob Y. (talk) 22:26, 24 June 2015 (UTC)

You can now generate run directories for timing tests

With the the Unit Tester for v11-01, you may now create one or more run directories for 7-model-day timing tests. This will allow you to quickly evaluate the performance of GEOS-Chem on your system. For more information, please see our Timing tests with GEOS-Chem v11-01 wiki page.

--Bob Yantosca (talk) 19:51, 19 December 2016 (UTC)