Difference between revisions of "GEOS-Chem unit tester for v11-02"

From Geos-chem
Jump to: navigation, search
(Examining the results)
(Redirected page to Unit Tester for GEOS-Chem 12)
 
(39 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Image:Page is under construction.jpg]]
+
#REDIRECT [[Unit Tester for GEOS-Chem 12]]
 
+
This page describes the '''GEOS-Chem Unit Tester''' package that corresponds to [[GEOS-Chem v11-02]]. 
+
 
+
NOTE: If you are still using [[GEOS-Chem v11-01]], then please see [[GEOS-Chem unit tester for v11-01|our ''GEOS-Chem unit tester for v11-01'' wiki page]].
+
 
+
== Overview ==
+
 
+
The '''GEOS-Chem Unit Tester''' contains the various Makefiles, scripts, and run directories that you will need to run GEOS-Chem.  With the Unit Tester, you can:
+
 
+
{| border=1 cellspacing=0 cellpadding=5
+
|-bgcolor="#CCCCCC"
+
!width="300px"|Action
+
!width="700px"|Description
+
 
+
|-valign="top"
+
|[[Creating GEOS-Chem run directories|Create GEOS-Chem run directories]]
+
|You can use a script to create fresh copies of GEOS-Chem run directories for each supported GEOS-Chem simulation.  Each run directory that you create will contain all of the necessary input files with the proper settings.  For detailed instructions, please visit our [[Creating GEOS-Chem run directories|''Creating GEOS-Chem run directories'' wiki page]].
+
 
+
|-valign="top"
+
|Set up GEOS-Chem 7-day timing tests
+
|You can create run directories that can be used to perform 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 [[Timing tests with GEOS-Chem v11-02|our ''Timing tests with GEOS-Chem v11-02'' wiki page]].
+
 
+
|-valign="top"
+
|Run GEOS-Chem unit tests
+
|An individual '''GEOS-Chem Unit Test''' will look for computational and numerical issues in simulations for a given combination of:
+
 
+
# Met field type
+
# Horizontal grid
+
# Simulation type
+
 
+
We recommend that you perform frequent unit tests as you develop code, as this is the best way to find many common types of errors.  For more information about how to submit unit tests, please see [[#Using the GEOS-Chem Unit Tester|the ''Using the Unit Tester'' section below]].
+
 
+
|-valign="top"
+
|[[Performing_Difference_Tests_with_GEOS-Chem|Run GEOS-Chem difference tests]]
+
|A '''Difference Test''' validates that structural updates in a given GEOS-Chem "Development" (or "Dev") produce identical results when compared to a "Reference" (or "Ref") version.
+
 
+
You can use a script that will create difference test run directories for any of the supported GEOS-Chem simulations.  For more information on how to set up GEOS-Chem difference tests, please see [[Performing_Difference_Tests_with_GEOS-Chem|our ''Performing Difference Tests with GEOS-Chem'' wiki page]].
+
 
+
|}
+
 
+
--[[User:Bmy|Bob Yantosca]] ([[User talk:Bmy|talk]]) 19:12, 20 March 2018 (UTC)
+
 
+
== 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:
+
 
+
{| border=1 cellspacing=0 cellpadding=5
+
|-bgcolor="#CCCCCC"
+
!width="300px"|Item
+
!width="350px"|If you use GEOS-Chem<br>on a computer cluster
+
!width="350px"|If you use GEOS-Chem<br>on the Amazon Web Services cloud
+
 
+
|-valign="top"
+
|A modern Unix operating system
+
*CentOS, Ubuntu, Fedora ...
+
|This will be already installed on your cluster.  The particular flavor of Unix should not matter.
+
|This will be included in the Amazon Machine Image (AMI) that you use to initialize your login environment.
+
 
+
|-valign="top"
+
|[http://www.gnu.org/software/bash/bash.html The <tt>bash</tt> Unix shell]
+
|This should be pre-installed with your OS.
+
|" "
+
 
+
|-valign="top"
+
|[http://www.perl.org/ The <tt>Perl</tt> programming language]
+
|" "
+
|" "
+
 
+
|-valign="top"
+
|[http://www.gnu.org/software/make/ The GNU <tt>make</tt> utility]
+
|" "
+
|" "
+
 
+
|}
+
 
+
--[[User:Bmy|Bob Yantosca]] ([[User talk:Bmy|talk]]) 19:24, 20 March 2018 (UTC)
+
 
+
=== Downloading the GEOS-Chem Unit Tester ===
+
 
+
You may download the GEOS-Chem unit tester with Git:
+
 
+
git clone <nowiki>https://bitbucket.org/gcst/geos-chem-unittest</nowiki> UT
+
git checkout master
+
 
+
This will download a fresh copy of the <tt>GEOS-Chem-UnitTest</tt> repository into a directory named <tt>UT</tt>, 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:
+
 
+
# Open the gitk browser by typing '''gitk &''' at the command line.
+
# 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.).
+
# Right click with the mouse.  This will open a context menu.  Select '''Create new branch'''.
+
# A new dialog box will pop up asking you to name the branch.  Type '''OLDER_BRANCH''' and press '''OK'''.
+
# Close gitk and open the Git GUI by typing '''git gui &'''
+
# 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.
+
 
+
# The '''master''' branch represents current state of the unit tester
+
# The '''OLDER_BRANCH''' branch represents the state of the unit tester that you checked out (synced to an older GEOS-Chem version)
+
 
+
--[[User:Bmy|Bob Yantosca]] ([[User talk:Bmy|talk]]) 19:48, 24 April 2017 (UTC)
+
 
+
=== Directory structure ===
+
 
+
The GEOS-Chem Unit Tester adheres to the following directory structure:
+
 
+
{| border=1 cellspacing=0 cellpadding=5
+
|-bgcolor="#CCCCCC"
+
!width="100px"|Directory
+
!width="900px"|Description
+
 
+
|-valign="top"
+
|<tt>jobs/</tt>
+
|Job scripts created by the GEOS-Chem Unit Test driver script <tt>gcUnitTest</tt> will be sent here.
+
 
+
|-valign="top"
+
|<tt>logs/</tt>
+
|Log files containing output from the GEOS-Chem Unit Test simulations will be sent here.
+
 
+
|-valign="top"
+
|<tt>perl/</tt>
+
|Contains the Perl scripts that are used to submit GEOS-Chem Unit Test simulations.
+
*The driver script is called <tt>gcUnitTest</tt>. 
+
*The default input file for <tt>gcUnitTest</tt> is named <tt>UnitTest.input</tt>.
+
*Sample customized versions of <tt>UnitTest.input</tt> are stored in the <tt>perl/inputs</tt> subdirectory. 
+
*The <tt>cleanFiles</tt> script is used to remove job scripts, log files, and output files created by GEOS-Chem.
+
 
+
|-valign="top"
+
|<tt>runs/</tt>
+
|Contains the various run directories.  Each run directory is named according to the met field, horizontal grid, and type of simulation (<tt>4x5_standard</tt>, <tt>2x25_RnPbBe</tt>, etc).
+
 
+
|}
+
 
+
--[[User:Bmy|Bob Yantosca]] ([[User talk:Bmy|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 [[#The RUNS section|RUNS section of the input file]] (more on this below), the GEOS-Chem Unit Tester will do the following:
+
 
+
#Run GEOS-Chem with strict debugging flags with OpenMP parallelization turned OFF
+
#*This is called the '''single processor''' or '''sp''' test phase.
+
#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
+
 
+
#[http://floating-point-gui.de/ Floating-point math exceptions]: div-by-zero, invalid computations (i.e. <tt>SQRT(-1)</tt>, <tt>LOG(-1)</tt>, etc.)
+
#[[Common_GEOS-Chem_error_messages#Array-out-of-bounds_error|Array-out-of-bounds errors]]
+
#[[Passing_array_arguments_efficiently_in_GEOS-Chem|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 [[Parallelizing GEOS-Chem|parallelization error]].
+
 
+
--[[User:Bmy|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 <tt>UnitTest.input</tt>, but you can cut-n-paste this file to create as many customized input files as you need. 
+
 
+
The <tt>UnitTest.input</tt> file looks like this. All lines beginning with a <tt>#</tt> 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:
+
#
+
#    <nowiki>http://wiki.geos-chem.org/GEOS-Chem_Unit_Tester#The_INPUTS_section</nowiki>
+
#    <nowiki>http://wiki.geos-chem.org/GEOS-Chem_Unit_Tester#The_RUNS_section</nowiki>
+
#
+
# !REVISION HISTORY:
+
# Type 'gitk' at the prompt to browse the revision history.
+
#EOP
+
#------------------------------------------------------------------------------
+
#
+
# !INPUTS:
+
#
+
# %%% ID tags %%%
+
#
+
    VERSION          : v11-02
+
    DESCRIPTION      : Tests GEOS-Chem v11-02
+
#
+
# %%% 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 and queue settings %%%
+
#
+
    CODE_DIR        : {HOME}/GC/Code.v11-02
+
    MAKE_CMD        : make -j4 BOUNDS=y DEBUG=y FPEX=y NO_ISO=y BPCH_DIAG=y NC_DIAG=n
+
    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 COMMANDS:                                          %%%
+
#  %%%                                                              %%%
+
#  %%%  If your system uses the SLURM scheduler, then you can      %%%
+
#  %%%  define several #SBATCH tags that will be added to the top  %%%
+
#  %%%  of the job script.  Otherwise you can comment these lines  %%%
+
#  %%%  out with the # comment character.                          %%%
+
#  %%%                                                              %%%
+
#  %%%    NOTE: If you do use these SLURM commands, then also be  %%%
+
#  %%%    sure to set the SUBMIT command above to "sbatch".        %%%
+
#  %%%                                                              %%%
+
#  %%%  The INIT_COMMANDS tag will let you specify any optional    %%%
+
#  %%%  initialization commands that will be placed at the top      %%%
+
#  %%%  of the job script.  For example, if your system requires    %%%
+
#  %%%  that modules need to be loaded from within the job script,  %%%
+
#  %%%  you can specify those instructions here.                    %%%
+
#  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
#
+
    SLURM_CPUS      : 4
+
    SLURM_NODES      : 1
+
    SLURM_TIME      : 1-12:00
+
    SLURM_MEMORY    : 35000
+
    SLURM_PARTITION  : huce_intel
+
    SLURM_CONSTRAINT : broadwell
+
    SLURM_MAILTYPE  : END
+
+
    # Add initialization commands for your system here if necessary
+
    # Otherwise, leave these commented out
+
    #INIT_COMMANDS    : . ~/.bashrc
+
#
+
# !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|
+
#--------|-----------|------|----------------|------------|--------------|-----|
+
# ======= GEOS-Chem benchmark ================================================
+
  geosfp  4x5        -      benchmark        2016070100  201607010020  -
+
# ======= Radon-Lead-Beryllium ===============================================
+
  geosfp  4x5        -      RnPbBe          2016010100  201601010020  -
+
  merra2  4x5        -      RnPbBe          2016010100  201601010020  -
+
  geosfp  2x25        -      RnPbBe          2016010100  201601010020  -
+
  merra2  2x25        -      RnPbBe          2016010100  201601010020  -
+
# ======= Mercury ============================================================
+
  geosfp  4x5        -      Hg              2016010100  201601010020  -
+
  merra2  4x5        -      Hg              2016010100  201601010020  -
+
  geosfp  2x25        -      Hg              2016010100  201601010020  -
+
  merra2  2x25        -      Hg              2016010100  201601010020  -
+
# ======= Tagged Mercury =====================================================
+
  geosfp  4x5        -      tagHg            2016010100  201601010020  -
+
  merra2  4x5        -      tagHg            2016010100  201601010020  -
+
# ======= POPs ===============================================================
+
  geosfp  4x5        -      POPs            2016070100  201607010020  -
+
  merra2  4x5        -      POPs            2016070100  201607010020  -
+
  geosfp  2x25        -      POPs            2016070100  201607010020  -
+
  merra2  2x25        -      POPs            2016070100  201607010020  -
+
# ======= Methane ============================================================
+
  geosfp  4x5        -      CH4              2016070100  201607010020  -
+
  merra2  4x5        -      CH4              2016070100  201607010020  -
+
  geosfp  2x25        -      CH4              2016070100  201607010020  -
+
  merra2  2x25        -      CH4              2016070100  201607010020  -
+
  geosfp  025x03125  na    CH4              2016070100  201607010010  -
+
  merra2  05x0625    na    CH4              2016070100  201607010020  -
+
# ======= Tagged O3 ==========================================================
+
  geosfp  4x5        -      tagO3            2016070100  201607010020  -
+
  merra2  4x5        -      tagO3            2016070100  201607010020  -
+
  geosfp  2x25        -      tagO3            2016070100  201607010020  -
+
  merra2  2x25        -      tagO3            2016070100  201607010020  -
+
# ======= Tagged CO ==========================================================
+
  geosfp  4x5        -      tagCO            2016070100  201607010020  -
+
  merra2  4x5        -      tagCO            2016070100  201607010020  -
+
  geosfp  2x25        -      tagCO            2016070100  201607010020  -
+
  merra2  2x25        -      tagCO            2016070100  201607010020  -
+
# ======= Carbon Dioxide =====================================================
+
  geosfp  2x25        -      CO2              2016070100  201607010020  -
+
  merra2  2x25        -      CO2              2016070100  201607010020  -
+
# ======= Offline Aerosols ===================================================
+
  geosfp  4x5        -      aerosol          2016070100  201607010020  -
+
  merra2  4x5        -      aerosol          2016070100  201607010020  -
+
  geosfp  2x25        -      aerosol          2016070100  201607010020  -
+
  merra2  2x25        -      aerosol          2016070100  201607010020  -
+
# ======= Standard ===========================================================
+
  geosfp  4x5        -      standard        2016070100  201607010020  -
+
  merra2  4x5        -      standard        2016070100  201607010020  -
+
  geosfp  2x25        -      standard        2016070100  201607010020  -
+
  merra2  2x25        -      standard        2016070100  201607010020  -
+
# ======= Tropchem ===========================================================
+
  geosfp  4x5        -      tropchem        2016070100  201607010020  -
+
  merra2  4x5        -      tropchem        2016070100  201607010020  -
+
  geosfp  2x25        -      tropchem        2016070100  201607010020  -
+
  merra2  2x25        -      tropchem        2016070100  201607010020  -
+
# ======= Complex SOA (w/o and w/ SVPOA) =====================================
+
  geosfp  4x5        -      complexSOA      2016070100  201607010020  -
+
  merra2  4x5        -      complexSOA      2016070100  201607010020  -
+
  geosfp  2x25        -      complexSOA      2016070100  201607010020  -
+
  merra2  2x25        -      complexSOA      2016070100  201607010020  -
+
  geosfp  4x5        -      complexSOA_SVPOA 2016070100  201607010020  -
+
  merra2  4x5        -      complexSOA_SVPOA 2016070100  201607010020  -
+
  geosfp  2x25        -      complexSOA_SVPOA 2016070100  201607010020  -
+
  merra2  2x25        -      complexSOA_SVPOA 2016070100  201607010020  -
+
# ======= Acid uptake on dust ================================================
+
  geosfp  4x5        -      aciduptake      2016070100  201607010020  -
+
  geosfp  2x25        -      aciduptake      2016070100  201607010020  -
+
# ======= Marine POA =========================================================
+
  geosfp  4x5        -      marinePOA        2016070100  201607010020  -
+
  geosfp  2x25        -      marinePOA        2016070100  201607010020  -
+
# ======= TOMAS aerosol microphysics =========================================
+
  geosfp  4x5        -      TOMAS15          2016070100  201607010030  -
+
  geosfp  4x5        -      TOMAS40          2016070100  201607010030  -
+
# ======= RRTMG online radiative transfer ====================================
+
  geosfp  4x5        -      RRTMG            2016070100  201607010040  -
+
  merra2  4x5        -      RRTMG            2016070100  201607010040  -
+
# geosfp  2x25        -      RRTMG            2016070100  201607010040  -
+
# merra2  2x25        -      RRTMG            2016070100  201607010040  -
+
# ======= Nested model runs ==================================================
+
  merra2  05x0625    as    tropchem        2016070100  201607010020  -
+
  merra2  05x0625    na    tropchem        2016070100  201607010020  -
+
  geosfp  025x03125  ch    tropchem        2016070100  201607010010  -
+
  geosfp  025x03125  na    tropchem        2016070100  201607010010  -
+
  !END OF RUNS:
+
#EOP
+
#------------------------------------------------------------------------------
+
 
+
==== The INPUTS section ====
+
 
+
Under the <tt>!INPUTS:</tt> section, you can customize the directory paths and other options for your system.  [[#Specifying options in the input file|As seen above]], most of these inputs are self-explanatory.
+
 
+
{| border=1 cellspacing=0 cellpadding=5
+
|-bgcolor="#CCCCCC"
+
!width="150x"|Option
+
!width="825px"|DescriptionMet field type
+
 
+
|-valign="top"
+
|<tt>VERSION</tt>
+
|An ID tag that will be added to all log files and output files.
+
 
+
|-valign="top"
+
|<tt>DESCRIPTION</tt>
+
|A short (1-sentence) description of what features are being validated by this unit test.
+
 
+
|-valign="top"
+
|<tt>DATA_ROOT</tt>
+
|Specifies the path for your root-level data directory. 
+
 
+
|-valign="top"
+
|<tt>HEMCO_ROOT</tt>
+
|Specifies the top-level path for the [[HEMCO data directories|HEMCO data directory tree]].
+
*The <tt>{DATAROOT}</tt> token in <tt>HEMCO_ROOT</tt> will be replaced with the value you specify for <tt>RUN_ROOT</tt> option.  Leave this as-is.
+
 
+
|-valign="top"
+
|<tt>VERBOSE</tt>
+
|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: <tt>0</tt>
+
 
+
|-valign="top"
+
|<tt>WARNINGS</tt>
+
|Specifies the level of warning messages that will be sent to the HEMCO log file. (0=no warnings; 3=max warnings)
+
*Recommended setting: <tt>1</tt>
+
 
+
|-valign="top"
+
|<tt>CODE_DIR</tt>
+
|Specifies the path of the source code directory.
+
 
+
|-valign="top"
+
|<tt>MAKE_CMD</tt>
+
|Specifies the make command for your system.  Usually this is <tt>make</tt>, but on some systems this may be <tt>gmake</tt>.  Recommended options are:
+
*<tt>BOUNDS=y</tt>: Turns on array-out-of-bounds checking
+
*<tt>DEBUG=y</tt>: 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.
+
*<tt>NO_ISO=y</tt>: Disables the ISORROPIA aerosol thermodynamical equilibrium module, which is known to produce random numerical noise.
+
*<tt>FPEX=y</tt>: Turns on checks for floating-point issues (div-by-zero, floating invalid, underflow, overflow, etc).
+
*<tt>BPCH_DIAG=y</tt>: Turns on the bpch diagnostics.  This option is turned on by default in GEOS-Chem v11-02.
+
*<tt>NC_DIAG=y</tt>: Turns on [[List of diagnostics archived to netCDF format|netCDF diagnostics]].  By default, this will prevent the bpch diagnostic code from being compiled into the GEOS-Chem executable.
+
**NOTE: we recommend compiling with either <tt>BPCH_DIAG=y</tt> or <tt>NC_DIAG=y</tt>, but not both.
+
 
+
|-valign="top"
+
|<tt>SUBMIT</tt>
+
|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.
+
 
+
|-valign="top"
+
|<tt>UNIT_TEST_ROOT</tt>
+
|Specifies the path to the GEOS-Chem Unit Tester.
+
 
+
|-valign="top"
+
|<tt>RUN_ROOT</tt>
+
|Specifies the top-level unit test run directories. 
+
<b>Leave this as-is.</b>
+
 
+
|-valign="top"
+
|<tt>RUN_DIR</tt>
+
|Specifies the run directory subdirectory.
+
*The <tt>{RUNDIR}</tt> token in <tt>RUN_DIR</tt> will be replaced with the name of a subdirectory.
+
<b>Leave this as-is.</b>
+
 
+
|-valign="top"
+
|<tt>JOB_DIR</tt>
+
|Specifies the directory where the unit test job script will be created.
+
<b>Leave this as-is.</b>
+
 
+
|-valign="top"
+
|<tt>LOG_DIR</tt>
+
|Specifies the directory where log files from this unit test simulation will be sent.
+
*The <tt>{VERSION}</tt> token in <tt>LOG_DIR</tt> will be replaced with the value of <tt>VERSION</tt> that you specify above.  This allows the Unit Tester to send log files from different unit tests to subdirectories of <tt>LOG_DIR</tt>.  This will let you preserve older log files.
+
 
+
|-valign="top"
+
|<tt>PERL_DIR</tt>
+
|Specifies the directory where the unit test Perl scripts are found.
+
*Leave this as-is.
+
 
+
|-valign="top"
+
|<tt>TEMPLATE</tt>
+
|Specifies the template HTML file that will be used to create a web page with unit test results.
+
*Leave this as-is.
+
 
+
|-valign="top"
+
|<tt>TXT_GRID</tt>
+
|Specifies the path of this summary text file
+
*The <tt>{LOGDIR}</tt> token in <tt>TXT_GRID</tt> will be replaced with the value of <tt>LOG_DIR</tt>. Leave this as-is.
+
*The <tt>{VERSION}</tt> token in <tt>TXT_GRID</tt> will be replaced with the value of <tt>VERSION</tt> that you specify above. Leave this as-is.
+
 
+
|-valign="top"
+
|<tt>WEB_GRID</tt>
+
|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 <tt>TEMPLATE</tt> option.
+
*The <tt>{LOGDIR}</tt> token in <tt>WEB_GRID</tt> will be replaced with the value of <tt>LOG_DIR</tt>.  Leave this as-is.
+
*The <tt>{VERSION}</tt> token in <tt>WEB_GRID</tt> will be replaced with the value of <tt>VERSION</tt> that you specify above. Leave this as-is.
+
 
+
|-valign="top"
+
|<tt>WEB_PUSH</tt>
+
|Specifies the remote server to which the <tt>WEB_GRID</tt> web page will be uploaded.  Options are:
+
*<tt>NONE</tt>: Do not upload the page
+
*<tt>user@host|directory/</tt>: Specifies the remote directory.  (Example: <tt>geoschem@fas.harvard.edu|public_html/ut/</tt>)
+
 
+
|-valign="top"
+
!colspan="2" bgcolor="#CCFFFF"|The following commands are optional.<br>Most of these options are used to schedule the unit test jobs with the SLURM scheduler.<br>If your computer cluster does not use SLURM, you can comment all of these settings out in the <tt>UnitTest.input</tt> file.
+
 
+
|-valign="top"
+
|<tt>SLURM_CPUS</tt>
+
|Specifies the number of CPUs that will be used for the unit test (with <tt>#SBATCH -c</tt>)
+
 
+
|-valign="top"
+
|<tt>SLURM_NODES</tt>
+
|Specifies the number of nodes that will be used for the unit test (with <tt>#SBATCH -n</tt>)
+
*NOTE: For GEOS-Chem "Classic" simulations, this should always = 1.
+
 
+
|-valign="top"
+
|<tt>SLURM_TIME</tt>
+
|Specifies the requested time for the run. Recommended format: <tt>DD-HH:MM</tt>
+
 
+
|-valign="top"
+
|<tt>SLURM_MEM</tt>
+
|Specifies the total amount of memory (in MB) needed to run the unit tests. 
+
*NOTE: If you are going to run 2&deg; x 2.5&deg; and/or nested-grid unit tests, then pick a high number like 30000 MB = 30 GB.
+
 
+
|-valign="top"
+
|<tt>SLURM_PARTITION</tt>
+
|Specifies the partition (aka queue) in which the unit tests will run (with <tt>#SBATCH -p</tt>).
+
 
+
|-valign="top"
+
|<tt>SLURM_CONSTRAINT</tt>
+
|Allows you to restrict the unit test job to CPUs of a specific type (with <tt>#SBATCH --constraint=</tt>.  For example
+
*<tt>intel</tt> will restrict the unit test job to Intel CPUs
+
*<tt>haswell</tt> will restrict the unit test job to Intel CPUs of type "haswell"
+
*<tt>broadwell</tt> will restrict the unit test job to Intel CPUs of type "broadwell"
+
 
+
|-valign="top"
+
|<tt> SLURM_MAILTYPE</tt>
+
|Specifies when you would like to receive updates from the SLURM scheduler (with <tt>#SBATCH --mail-type=</tt>).
+
*The most common option is <tt>END</tt>, which notifies you when the unit test job ends.  You can also use <tt>ALL</tt> which will send you an email when the job starts, ends, and if it dies prematurely.
+
 
+
|-valign="top"
+
|<tt>SLURM_MAILUSER</tt>
+
|Specifies the email address (with <tt>#SBATCH --mail-user=</tt>) where notifications from SLURM will be sent.
+
 
+
|-valign="top"
+
|<tt>SLURM_STDOUT</tt>
+
|Specifies the file that contains the redirected "stdout" stream (i.e. echo-back of commands to the screen).
+
*Normally this is: {LOGDIR}/{VERSION}.stdout.log
+
 
+
|-valign="top"
+
|<tt>SLURM_STDERR</tt>
+
|Specifies the file that contains the redirected "stderr" stream (i.e. echo-back of error messages to the screen).
+
*NOTE: If the unit test fails, you should check this file first to see what the specific error messages were.
+
 
+
|-valign="top"
+
|<tt>INIT_COMMANDS</tt>
+
|Specify can specify any additional commands that are specific to your computer system.  For example, you might need to source a .bashrc file, or to issue a command to load modules.  You can leave this commented out otherwise.
+
 
+
|}
+
 
+
Note that you can use a symbolic link (i.e. <tt>/home/{USER}/UT/</tt> in the <tt>RUN_ROOT</tt>, <tt>RUN_DIR</tt>, <tt>JOB_DIR</tt>, <tt>LOG_DIR</tt> and <tt>PERL_DIR</tt> variables.  This can help you shorten the file paths.
+
 
+
--[[User:Bmy|Bob Yantosca]] ([[User talk:Bmy|talk]]) 14:16, 21 March 2018 (UTC)
+
 
+
==== The RUNS section ====
+
 
+
Under the <tt>!RUNS:</tt> 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 <tt>#</tt> 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        -      benchmark        2016070100  201607010020  -
+
  geosfp  4x5        -      RnPbBe          2016010100  201601010020  -
+
  geosfp  4x5        -      Hg              2016010100  201601010020  -
+
  geosfp  4x5        -      tagHg            2016010100  201601010020  -
+
  geosfp  4x5        -      POPs            2016070100  201607010020  -
+
  geosfp  4x5        -      CH4              2016070100  201607010020  -
+
  geosfp  025x03125  na    CH4              2016070100  201607010010  -
+
  geosfp  4x5        -      tagO3            2016070100  201607010020  -
+
  geosfp  4x5        -      tagCO            2016070100  201607010020  -
+
  geosfp  2x25        -      CO2              2016070100  201607010020  -
+
  geosfp  4x5        -      aerosol          2016070100  201607010020  -
+
  geosfp  4x5        -      standard        2016070100  201607010020  -
+
  geosfp  4x5        -      tropchem        2016070100  201607010020  -
+
  geosfp  4x5        -      complexSOA      2016070100  201607010020  -
+
  geosfp  4x5        -      complexSOA_SVPOA 2016070100  201607010020  -
+
  geosfp  4x5        -      aciduptake      2016070100  201607010020  -
+
  geosfp  4x5        -      marinePOA        2016070100  201607010020  -
+
  geosfp  4x5        -      TOMAS15          2016070100  201607010030  -
+
  geosfp  4x5        -      TOMAS40          2016070100  201607010030  -
+
  geosfp  4x5        -      RRTMG            2016070100  201607010040  -
+
  geosfp  025x03125  ch    tropchem        2016070100  201607010010  -
+
  geosfp  025x03125  na    tropchem        2016070100  201607010010  -
+
  !END OF RUNS:
+
#EOP
+
#------------------------------------------------------------------------------
+
 
+
NOTE: For clarity, only simulations using [[GEOS-FP]] meteorology have been shown above.  You can also schedule simulations using [[MERRA-2]] meteorology.
+
 
+
Options:
+
 
+
;MET: Specifies the met field type.  Allowable values are:
+
 
+
<blockquote>
+
{| border=1 cellspacing=0 cellpadding=5
+
|-bgcolor="#CCCCCC"
+
!width="150px"|Value
+
!width="700px"|Met field type
+
 
+
|-valign="top"
+
|<tt>geosfp</tt>
+
|Selects the [[GEOS-FP|GEOS-FP met fields]].
+
 
+
|-valign="top"
+
|<tt>merra2</tt>
+
|Selects the [[MERRA-2|MERRA-2 met fields]].
+
|}
+
</blockquote>
+
 
+
;GRID: Specifies the horizontal grid.  Allowable values are:
+
 
+
<blockquote>
+
{| border=1 cellspacing=0 cellpadding=5
+
|-bgcolor="#CCCCCC"
+
!width="150px"|Value
+
!width="700px"|Grid type
+
 
+
|-valign="top"
+
|<tt>4x5</tt>
+
|Selects the [[GEOS-Chem_horizontal_grids#GMAO_4_x_5_grid|GMAO 4&deg; x 5&deg; horizontal grid]].
+
 
+
|-valign="top"
+
|<tt>2x25</tt>
+
|Selects the [[GEOS-Chem_horizontal_grids#GMAO_2_x_2.5_grid|GMAO 2&deg; x 2.5&deg; horizontal grid]].
+
 
+
|-valign="top"
+
|<tt>05x0666</tt>
+
|Selects the [[GEOS-Chem_horizontal_grids#GMAO_0.5_x_0.666_grid|GMAO 0.5&deg; x 0.666&deg; grid]] for use with GEOS-5 met fields only.<br>(You must also specify a value for <tt>NEST</tt>.)
+
 
+
|-valign="top"
+
|<tt>05x0625</tt>
+
|Selects the [[GEOS-Chem_horizontal_grids#GMAO_0.5_x_0.625_grid|GMAO 0.5&deg; x 0.625&deg; grid]] for use with MERRA-2 met fields only.<br>(You must also specify a value for <tt>NEST</tt>.)
+
 
+
|-valign="top"
+
|<tt>025x03125</tt>
+
|Selects  the [[GEOS-Chem_horizontal_grids#GMAO_0.25_x_0.3125_grid|GMAO 0.25&deg; x 0.3125&deg; grid]] for use with GEOS-FP met fields only.<br> (You must also specify a value for <tt>NEST</tt>.)
+
|}
+
</blockquote>
+
 
+
;NEST: Specifies the nested grid.  May only be used if the value for <tt>GRID</tt> is <tt>05x0625</tt> or <tt>025x03125</tt>.  Allowable values are:
+
 
+
<blockquote>
+
{| border=1 cellspacing=0 cellpadding=5
+
|-bgcolor="#CCCCCC"
+
!width="150px"|Value
+
!width="700px"|Nested grid option
+
 
+
|-valign="top"
+
|<tt>-</tt>
+
|Skips the nested grid option (default).  Use this for global simulations.
+
 
+
|-valign="top"
+
|<tt>as</tt>
+
|Selects the Asia (AS) nested grid option for use with [[MERRA-2]] met fields only.
+
 
+
|-valign="top"
+
|<tt>ch</tt>
+
|Selects the China (CH) nested grid option for use with [[GEOS-FP]] met fields only.
+
 
+
|-valign="top"
+
|<tt>eu</tt>
+
|Selects the Europe (EU) nested grid option.
+
 
+
|-valign="top"
+
|<tt>na</tt>
+
|Selects the North American (NA) nested grid option.
+
|}
+
</blockquote>
+
 
+
;SIMULATION: Specifies the simulation type.  Allowable values are:
+
 
+
<blockquote>
+
{| border=1 cellspacing=0 cellpadding=5
+
|-bgcolor="#CCCCCC"
+
!width="150px"|Value
+
!width="700px"|Simulation
+
 
+
|-bgcolor="#CCFFFF" valign="top"
+
!
+
!Full-chemistry simulations
+
 
+
|-valign="top"
+
|<tt>benchmark</tt>
+
|Selects the [[GEOS-Chem_chemistry_mechanisms#Mechanisms_in_GEOS-Chem_v10-01_and_later_versions|Benchmark chemistry mechanism]] used in the GEOS-Chem benchmark simulations.  This is the Standard chemistry mechanism, plus both complex SOA and simple SOA.
+
 
+
|-valign="top"
+
|<tt>standard</tt>
+
|Selects the [[GEOS-Chem_chemistry_mechanisms#Mechanisms_in_GEOS-Chem_v10-01_and_later_versions|Standard chemistry mechanism]].
+
 
+
|-valign="top"
+
|<tt>tropchem</tt>
+
|Selects the [[NOx-Ox-HC-aerosol|The NOx-Ox-HC-Aer-Br tropospheric chemistry simulation]].
+
 
+
|-valign="top"
+
|<tt>complexSOA</tt>
+
|Selects the [[Secondary organic aerosols]] simulation, without semi-volatile POA.
+
 
+
|-valign="top"
+
|<tt>complexSOA_SVPOAa</tt>
+
|Selects the [[Secondary organic aerosols]] simulation, with semi-volatile POA.
+
 
+
|-valign="top"
+
|<tt>aciduptake</tt>
+
|Selects the [[GEOS-Chem_chemistry_mechanisms#Mechanisms_in_GEOS-Chem_v10-01_and_later_versions|Standard chemistry simulation]], with [[Mineral_dust_aerosols#Surface_chemistry_on_dust|acid uptake on dust aerosols]] turned on.
+
 
+
|-valign="top"
+
|<tt>marinePOA</tt>
+
|Selects the [[GEOS-Chem_chemistry_mechanisms#Mechanisms_in_GEOS-Chem_v10-01_and_later_versions|Standard chemistry simulation]], with [[Aerosol_emissions#Online_emission_of_marine_primary_organic_aerosol_.28POA.29|marine primary organic aerosols]] turned on.
+
 
+
|-valign="top"
+
|<tt>RRTMG</tt>
+
|Selects the [[NOx-Ox-HC-aerosol|The NOx-Ox-HC-Aer-Br tropospheric chemistry simulation]], with [[Coupling GEOS-Chem with  RRTMG|RRTMG]] turned on.
+
 
+
|-bgcolor="#CCFFFF" valign="top"
+
!
+
!Specialty simulations
+
|-valign="top"
+
|<tt>RnPbBe</tt>
+
|Selects the [[Rn-Pb-Be simulation|Radon-Lead-Beryllium]] simulation.  A passive species is also included in this simulation by default.
+
 
+
|-valign="top"
+
|<tt>Hg</tt>
+
|Selects the [[Mercury]] simulation.
+
 
+
|-valign="top"
+
|<tt>tagHg</tt>
+
|Selects the [[Mercury|Tagged mercury]] simulation.
+
 
+
|-valign="top"
+
|<tt>POPs</tt>
+
|Selects the [[POPs simulation|Persistent Organic Pollutants (POPs) simulation]].
+
 
+
|-valign="top"
+
|<tt>CH4</tt>
+
|Selects the [[CH4 simulation]].
+
 
+
|-valign="top"
+
|<tt>tagCO</tt>
+
|Selects the [[Tagged CO simulation]].
+
 
+
|-valign="top"
+
|<tt>tagO3</tt>
+
|Selects the [[Tagged O3 simulation|Simple tagged O3 simulation]] (w/ 2 tracers: Total O3 and Stratospheric O3).
+
 
+
|-valign="top"
+
|<tt>CO2</tt>
+
|Selects the [[CO2 simulation]].
+
 
+
|-valign="top"
+
|<tt>TOMAS15</tt>
+
|Selects the [[TOMAS aerosol microphysics]] simulation with 15 size bins.
+
 
+
|-valign="top"
+
|<tt>TOMAS40</tt>
+
|Selects the [[TOMAS aerosol microphysics]] simulation with 40 size bins.
+
|}
+
</blockquote>
+
 
+
;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&deg; x 2.5&deg; 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:
+
 
+
Further notes about the <tt>!RUNS</tt> section:
+
 
+
#We typically run from <tt>2016070100</tt> to <tt>2016070101</tt> for [[GEOS-FP]] and [[MERRA-2]] met fields.
+
#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.
+
 
+
--[[User:Bmy|Bob Yantosca]] ([[User talk:Bmy|talk]]) 14:35, 21 March 2018 (UTC)
+
 
+
=== Running the GEOS-Chem Unit Tester ===
+
 
+
Once you have [[#Specifying unit test options with an input file|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 <tt>FILENAME</tt> is the name the input file (e.g. <tt>UnitTest.input</tt>) that you have just edited.  The settings in the input file will be used in the Unit Test simulations.  If <tt>FILENAME</tt> is omitted, then the <tt>gcUnitTest</tt> script will use <tt>UnitTest.input</tt> 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 files created by the Unit Tester|Log-file output generated by the GEOS-Chem Unit Tester]] is sent to the <tt>logs/{VERSION}</tt> directory, where <tt>{VERSION}</tt> 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.) 
+
 
+
--[[User:Bmy|Bob Yantosca]] ([[User talk:Bmy|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 <tt>runs/</tt> directory.  Each individual subdirectory of <tt>runs/</tt> corresponds to a particular unit test, or combination of met field + horizontal grid + simulation type.  Some example run directory names are:
+
 
+
runs/4x5_tropchem  # Run dir for 4x5 "tropchem" simulations (both GEOS-FP and MERRA-2)
+
runs/2x25_CO2      # Run dir for 2x25 "CO2" simulations (both GEOS-FP and MERRA-2)
+
runs/4x5_RnPbBe    # Run dir for 4x5 grid "Rn-Pb-Be" simulations (both GEOS-FP and MERRA-2)
+
etc.
+
 
+
etc.  In each of these run directories, GEOS-Chem will create several output files containing tracer concentrations and diagnostic quantities.  These files are:
+
 
+
{| border=1 cellspacing=0 cellpadding=5
+
|-bgcolor="#CCCCCC"
+
!width="250px"|File
+
!width="400px"|Description
+
!width="400px"|Notes
+
 
+
|-valign="top"
+
|<tt>GEOSChem_restart.*.sp</tt>
+
|Restart file containing instantaneous species concentrations at the end of the single-processor test.
+
|rowspan="2"|Includes all species (advected and non-advected).
+
 
+
For a complete list of GEOS-Chem species, please see [[Species_in_GEOS-Chem|our ''Species in GEOS-Chem'' wiki page]].
+
 
+
|-valign="top"
+
|<tt>GEOSChem_restart.*.mp</tt>
+
|Restart file containing species concentrations at the end of the multi-processor test.
+
 
+
|-valign="top"
+
|<tt>HEMCO_restart.*.sp</tt>
+
|Restart file generated by HEMCO at the end of the single processor test.
+
|rowspan="2"|The HEMCO restart archive certain emissions quantities (such as soil NO deposition) that need to be preserved between multiple stages of a long GEOS-Chem simulation.
+
 
+
|-valign="top"
+
|<tt>HEMCO_restart.*.mp</tt>
+
|Restart file generated by HEMCO at the end of the multi-processor test
+
 
+
|-valign="top"
+
|<tt>HEMCO.log.sp</tt>
+
|HEMCO log file generated by the single-processor test. 
+
|rowspan="2"|The HEMCO log file contains detailed "echo-back" information about the creation of the HEMCO diagnostic containers and I/O processes. 
+
 
+
These files are not scanned by the GEOS-Chem Unit Tester.  If a unit test fails, you should look at these HEMCO.log* files to determine if an error occurred in emissions.
+
 
+
|-valign="top"
+
|<tt>HEMCO.log.mp</tt>
+
|HEMCO log file generated by the multi-processor test. 
+
 
+
|-valign="top"
+
!bgcolor="#CCFFFF" valign="top" colspan="3"|If you specified bpch diagnostic output (with <tt>BPCH_DIAG=y</tt>), the following files will be created:
+
 
+
|-valign="top"
+
|<tt>trac.avg.*.sp</tt>
+
|Binary punch (bpch) format file containing diagnostic output from the the single-processor test.
+
|rowspan="2"|For a list of available diagnostics, please see [[List of diagnostics archived to bpch format|our ''List of diagnostics archived to bpch format'' wiki page]].
+
 
+
|-valign="top"
+
|<tt>trac.avg.*.mp</tt>
+
|Binary punch (bpch) format file containing diagnostic output from the the multi-processor test.
+
 
+
|-valign="top"
+
!bgcolor="#CCFFFF" valign="top" colspan="3"|If you specified netCDF diagnostic output (with <tt>NC_DIAG=y</tt>), the following files will be created:
+
 
+
|-valign="top"
+
|<tt>GEOSChem.*.YYYYMMDD_hhmmz.nc4.sp</tt>
+
|netCDF files containing diagnostic output from the single-processor test. 
+
|One file will be created for each diagnostic collection that is specified in the <tt>HISTORY.rc</tt> input file.
+
 
+
For a list of diagnostic collections, please see [[List of diagnostics archived to netCDF format|our ''List of diagnostics archived to netCDF format'' wiki page]].
+
 
+
|}
+
 
+
--[[User:Bmy|Bob Yantosca]] ([[User talk:Bmy|talk]]) 15:26, 21 March 2018 (UTC)
+
 
+
=== Log files created by the GEOS-Chem Unit Tester ===
+
 
+
The GEOS-Chem Unit Tester will also create a series of log files in the <tt>logs/{VERSION}</tt> directory, where <tt>{VERSION}</tt> is specifed in the The [[#The INPUTS section|<tt>!INPUTS</tt> section]] of the unit test input file.  These log files are:
+
 
+
{| border=1 cellspacing=0 cellpadding=5
+
|-bgcolor="#CCCCCC" valign="top"
+
!width="400px"|File
+
!width="550px"|Description
+
!width="200px"|Notes
+
 
+
|-valign="top"
+
|<tt>{VERSION}.stderr.log</tt><br>(SLURM scheduler)<br><br><tt>job.{VERSION}.o*</tt><br>(GridEngine scheduler)
+
|File containing the Unix <tt>stderr</tt> 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.
+
 
+
|-valign="top"
+
|<tt>{VERSION}.stdout.log</tt>
+
|File containing the Unix <tt>stdout</tt> output. 
+
|In most cases you will not need to look at this file.
+
 
+
|-valign="top"
+
|<tt>{VERSION}.results.log</tt>
+
|Log file containing the results from each individual unit test simulation that you ran. 
+
[[#Interpreting results generated by the GEOS-Chem Unit Tester |More information on this file]] is contained below.
+
|
+
 
+
|-valign="top"
+
|<tt>{VERSION}.results.html</tt>
+
|Web page (HTML) containing a graphical representation of the unit test results.
+
[[#Web page with graphical output|More information on this file]] is contained below.
+
|
+
 
+
|-valign="top"
+
|<tt>{VERSION}.results.txt</tt>
+
|Text file containing a table representation of the unit test results.
+
[[#You can now request a summary of unit test results in plain text format|More information on this file]] is contained below.
+
|
+
 
+
|-valign="top"
+
|<tt>{VERSION}.{MET}_{GRID}_{SIM}.log.sp</tt><br>(Global simulations)<br><br><tt>{VERSION}.{MET}_{GRID}_{SIM}_{NEST}.log.sp</tt><br>(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).
+
|
+
 
+
|-valign="top"
+
|<tt>{VERSION}.{MET}_{GRID}_{SIM}.log.mp</tt><br>(Global simulations)<br><br><tt>{VERSION}.{MET}_{GRID}_{SIM}_{NEST}.log.mp</tt><br>(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).
+
|
+
 
+
 
+
|}
+
 
+
--[[User:Bmy|Bob Yantosca]] ([[User talk:Bmy|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 created by the GEOS-Chem Unit Tester|log files]]:
+
 
+
#<tt>{VERSION}.results.log</tt> (The "results" file)
+
#The <tt>stderr</tt> file:
+
#*<tt>{VERSION}.stderr.log</tt> (SLURM scheduler)
+
#*<tt>job.{VERSION}.o*</tt> (Grid Engine scheduler).
+
 
+
The <tt>{VERSION}.results.log</tt> 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:
+
 
+
{| border=1 cellspacing=0 cellpadding=5
+
|- bgcolor="#CCCCCC" valign="top"
+
!width="50px"|Case
+
!width="500px"|Description
+
!width="550px"|Interpretation
+
|-valign="top"
+
|1
+
|Unit test did not halt prematurely with any errors.<br>In the <tt>{VERSION}.results.log</tt> file we see:
+
 
+
*<tt>trac.avg.*.sp</tt> and <tt>trac_avg.*.mp</tt> are IDENTICAL
+
*<tt>GEOSChem_restart.*.sp</tt> and <tt>GEOSChem_restart.*.mp</tt> are IDENTICAL
+
*<tt>HEMCO_restart.*.sp</tt> and <tt>HEMCO_restart.*.mp</tt> 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.
+
|-valign="top"
+
|2
+
|Unit test did not halt prematurely with any errors.<br>In the <tt>{VERSION}.results.log</tt> file we see:
+
 
+
*<tt>trac.avg.*.sp</tt> and <tt>trac_avg.*.mp</tt> are DIFFERENT
+
*<tt>GEOSChem_restart.*.sp</tt> and <tt>GEOSChem_restart.*.mp</tt> are IDENTICAL
+
*<tt>HEMCO_restart.*.sp</tt> and <tt>HEMCO_restart.*.mp</tt> 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 <tt>trac.avg*</tt> 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 <tt>!$OMP+PRIVATE</tt> in a parallel DO-loop.
+
|-valign="top"
+
|3
+
|Unit test did not halt prematurely with any errors.<br>In the <tt>{VERSION}.results.log</tt> file we see:
+
 
+
*<tt>trac.avg.*.sp</tt> and <tt>trac_avg.*.mp</tt> are DIFFERENT
+
*<tt>GEOSChem_restart.*.sp</tt> and <tt>GEOSChem_restart.*.mp</tt> are DIFFERENT
+
*<tt>HEMCO_restart.*.sp</tt> and <tt>HEMCO_restart.*.mp</tt> 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 <tt>Checksums</tt> and/or <tt>Diffs</tt> lines in the log file may say <tt>FILE NOT FOUND</tt>.  This indicates that the unit test died before the output files could be created.
+
|-valign="top"
+
|4
+
|Unit test halted with an error.<br>In the <tt>stderr</tt> 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 <tt>SQRT(-1)</tt>, <tt>LOG(0)</tt>, etc.) has occurred.  You can use the error trace stack to find the line of code that caused the error.
+
|-valign="top"
+
|5
+
|Unit test halted with an error.<br>In the <tt>stderr</tt> 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 [[Common_GEOS-Chem_error_messages#Array-out-of-bounds_error|'''array-out-of-bounds error''']] has occurred.  For example, we were trying to access <tt>ARRAY(4)</tt>, but <tt>ARRAY</tt> may be declared with less than 4 elements.  This type of error can actually overwrite another variable&mdash;whichever variable happens to be stored next to ARRAY in the computer memory&mdash;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.
+
|-valign="top"
+
|6
+
|Unit tester did not halt prematurely with any errors, but we noticed the following warning message in the <tt>stderr</tt> 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 [[Passing array arguments efficiently in GEOS-Chem|'''array temporary''']].  When GEOS-Chem is passing data to subroutine <tt>MY_ROUTINE</tt>, 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. 
+
 
+
|}
+
 
+
--[[User:Bmy|Bob Yantosca]] ([[User talk:Bmy|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 <tt>WEB_GRID</tt> option in [[#The INPUTS section|the <tt>!INPUTS:</tt> section]] of the unit test input file.  The web page will contain output similar to this example:
+
 
+
 
+
<blockquote>
+
<big><big><big><strong>GEOS-Chem Unit Test Results</strong></big></big></big>
+
<br /><br />
+
 
+
<table border="0" cellspacing="0" cellpadding="5">
+
  <tr>
+
    <td><big><strong>Version:</strong></big></td>
+
    <td><big><strong>v10-01e</strong></big></td>
+
  </tr>
+
  <tr>
+
    <td><big><strong>Date Submitted:</strong></big></td>
+
    <td><big><strong>2014/10/28 12:08:16</strong></big></td>
+
  </tr>
+
  <tr>
+
    <td><big><strong>Description:</strong></big></td>
+
    <td><big><strong>Tests v10-01e -- HEMCO emissions</strong></big></td>
+
  </tr>
+
</table>
+
 
+
<br />
+
 
+
<table border="1" cellspacing="0" cellpadding="5" bordercolor="#000000">
+
 
+
  <!-- 4x5 -->
+
  <tr>
+
    <th scope="col" bgcolor="#CCCCCC" width="150">4&deg; x 5&deg; Unit Tests</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">UCX</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">Trop-<br />chem</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">SOA</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">SOA w/ SVPOA</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">Rn-<br>Pb-Be</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">Hg</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">POPs</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">TagCO</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">TagO3</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">CH4</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">CO2</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">Aer-<br>osols</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">TOMAS<br />40</th>
+
  </tr>
+
  <tr>
+
    <td>GEOS-FP @ 4&deg; x 5&deg;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
  </tr>
+
  <tr>
+
    <td>MERRA @ 4&deg; x 5&deg;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
  </tr>
+
  <tr>
+
    <td>GEOS-5 @ 4&deg; x 5&deg;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
  </tr>
+
  <tr>
+
    <td>GEOS-4 @ 4&deg; x 5&deg;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
  </tr>
+
  <tr>
+
    <td>GCAP @ 4&deg; x 5&deg;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
  </tr>
+
  <tr>
+
    <th scope="col" bgcolor="#CCCCCC" width="150">2&deg; x 2.5&deg; Unit Tests</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">UCX</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">Trop-<br />chem</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">SOA</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">SOA w/ SVPOA</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">Rn-<br>Pb-Be</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">Hg</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">POPs</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">TagCO</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">TagO3</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">CH4</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">CO2</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">Aer-<br>osols</th>
+
    <th scope="col" bgcolor="#CCCCCC" width="55">TOMAS<br />40</th>
+
  </tr>
+
  <tr>
+
    <td>GEOS-FP @ 2&deg; x 2.5&deg;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
  </tr>
+
  <tr>
+
    <td>GEOS-5 @ 2&deg; x 2.5&deg;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#00FF00">&nbsp;</td>
+
    <td bgcolor="#FFFFFF">&nbsp;</td>
+
  </tr>
+
</table>
+
 
+
 
+
<br/>
+
<h3>LEGEND</h3>
+
 
+
<table border="0" cellspacing="0" cellpadding="10">
+
  <tr>
+
    <td bgcolor="#00FF00" width="25" class="legend">&nbsp;</td>
+
    <td>The unit test was successful.</td>
+
  </tr>
+
  <tr>
+
    <td bgcolor="#FFFF00" class="legend">&nbsp;</td>
+
    <td>Further investigation is necessary (e.g. The restart files were
+
    identical but the diagnostic output differed).</td>
+
  </tr>
+
  <tr>
+
    <td bgcolor="#FF0000" class="legend">&nbsp;</td>
+
    <td>The unit test failed.</td>
+
  </tr>
+
  <tr>
+
    <td bgcolor="#FFFFFF" class="legendlast">&nbsp;</td>
+
    <td>A unit test was not performed for this combination of
+
    met field, horizontal grid, and simulation type.</td>
+
  </tr>
+
 
+
</table>
+
 
+
</blockquote>
+
 
+
NOTES:
+
#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.
+
#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 <tt>WEB_PUSH</tt> option in [[#The INPUTS section|the <tt>!INPUTS:</tt> section]] of the unit test input file.
+
#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&deg; x 5&deg; resolution, with a few selected unit tests at 2&deg; x 2.5&deg; 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&deg; x 0.666&deg; or 0.25&deg; x 0.3125&deg;) separately from the global 4&deg; x 5&deg; and 2&deg; x 2.5&deg; 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&deg; x 5&deg; full-chemistry simulation).
+
 
+
--[[User:Bmy|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
+
 
+
--[[User:Bmy|Bob Yantosca]] ([[User talk:Bmy|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 <tt>gcCopyRunDirs</tt> (located in the <tt>perl/</tt> 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|''Creating GEOS-Chem run directories'' wiki page]].
+
 
+
--[[User:Bmy|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]].
+
 
+
=== The GEOS-Chem-UnitTest repository for v11-01 is now on bitbucket.org ===
+
 
+
By [[#We removed the Restart files from the GEOS-Chem-UnitTest repository|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 <tt>GEOS-Chem-UnitTest</tt> Git repository from <tt>git://git.as.harvard.edu</tt> to <tt>https://bitbucket.org/gcst/GEOS-Chem-UnitTest</tt>.  This move was necessitated by technical considerations.
+
 
+
--[[User:Bmy|Bob Yantosca]] ([[User talk:Bmy|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 <tt>gcCreateDiffTest</tt> will generate a difference test directory based on the specifications in the file <tt>DiffTest.input</tt>.
+
 
+
To create a difference test directory, make sure you are in the <tt>perl/</tt> folder, then type:
+
 
+
  ./gcCreateDiffTest DiffTest.input
+
 
+
This feature is present in the GEOS-Chem Unit Tester corresponding to [[GEOS-Chem v11-01]].
+
 
+
--[[User:Bmy|Bob Yantosca]] ([[User talk:Bmy|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 <tt>UnitTest.input</tt> 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 <tt>{HOME}</tt> token would be replaced with the user's home folder (i.e. the value specified by the <tt>$home</tt> 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 <tt>UNIT_TEST_ROOT</tt> 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 <tt>UnitTest.input</tt>:
+
 
+
  <span style="color:green">UNIT_TEST_ROOT  : /fast/scratch/disk/UT</span>
+
  RUN_ROOT        : {UTHOME}/runs
+
  RUN_DIR          : {RUNROOT}/{RUNDIR}
+
  JOB_DIR          : {UTHOME}/jobs
+
  LOG_DIR          : {UTHOME}/logs/{VERSION}
+
  PERL_DIR        : {UTHOME}/perl
+
 
+
NOTE: The <tt>{UTHOME}</tt> token in the will be replaced by the value assinged to <tt>UNIT_TEST_ROOT</tt>. 
+
 
+
On the other hand, if your unit tester is installed into your home directory, then add these lines:
+
 
+
  <span style="color:green">UNIT_TEST_ROOT  : {HOME}/UT</span>
+
  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 <span style="color:green">GREEN</span> has to specify the root folder of the unit tester.
+
 
+
--[[User:Bmy|Bob Yantosca]] ([[User talk:Bmy|talk]]) 19:19, 18 December 2015 (UTC)
+
 
+
=== You can now submit unit tests to the SLURM scheduler ===
+
 
+
We modified the <tt>UnitTest.input</tt> file so that you can specify parameters for submitting the unit test job using the [http://slurm.schedmd.com/ SLURM scheduler].  The following optional settings are now present in [[#The_INPUTS_section|the <tt>INPUTS:</tt> 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 <tt>#SBATCH</tt> 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
+
###############################################################################
+
 
+
--[[User:Bmy|Bob Yantosca]] ([[User talk:Bmy|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 <tt>v11-01.results.html</tt>) 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 <tt>tail -f</tt>). 
+
 
+
You specify the path of this summary text file with the <tt>TXT_GRID</tt> option in the <tt>UnitTest.input</tt> 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 <tt>v11-01.results.txt</tt> 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
+
 
+
--[[User:Bmy|Bob Y.]] ([[User talk:Bmy|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&deg; x 2.5&deg; CO2 simulation).  For more information, please see [[GEOS-Chem_v11-01#Added_a_test_for_mass_conservation|this post on our ''GEOS-Chem v11-01'' wiki page]].
+
 
+
--[[User:Bmy|Bob Y.]] ([[User talk:Bmy|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 [[Timing tests with GEOS-Chem v11-01|our ''Timing tests with GEOS-Chem v11-01'' wiki page]].
+
 
+
--[[User:Bmy|Bob Yantosca]] ([[User talk:Bmy|talk]]) 19:51, 19 December 2016 (UTC)
+

Latest revision as of 19:28, 10 August 2018