Running the GEOS-5 SBU Benchmark

Build and install the model

First, untar the model tarball (in $NOBACKUP!!!):

$ tar xf Heracles-UNSTABLE-MPT-Benchmark.2017Feb13.tar.gz

Next, set up ESMADIR:

$ setenv ESMADIR <directory-to>/Heracles-UNSTABLE-MPT-Benchmark/GEOSagcm

it is just below the src/ directory.

Go into the src/ directory of your model. Following above:

$ cd $ESMADIR/src

Setup the environment by sourcing the g5_modules file:

$ source g5_modules

To build the model, you have one of two choices. First, you can use the parallel_build.csh script to submit a PBS job that compiles the model:

$ ./parallel_build.csh

or you can interactively build the model using:

$ make install

To capture the install log, we recommend tee'ing the output to a file:

$ make install |& tee make.install.log (on tcsh)
$ make install 2>&1 | tee make.install.log (on bash)

Note you can also build in parallel interactively with:

$ make -j8 pinstall |& tee make.pinstall.log (on tcsh)

where N is the number of parallel processes. From testing, 8 jobs is about as much as is useful. You can use more, but no benefit will accrue.

By default, the Intel Fortran compiler (ifort) is used for the build process. For other compilers, contact matthew.thompson@nasa.gov for instructions to use GCC or PGI compilers.

Monitor build process

The build can be monitored using the utility gmh.pl in the directory Config. From the src directory:

$ Config/gmh.pl -Av make.install.log

outputs the build status as

                          --------
                          Packages
                          --------

         >>>> Fatal Error           .... Ignored Error

 [ok]      Config
 [ok]      GMAO_Shared
 [ok]      |    GMAO_mpeu
 [ok]      |    |    mpi0
 [ok]      |    GMAO_pilgrim
 [ok]      |    GMAO_gfio
 [ok]      |    |    r4
 [ok]      |    |    r8
 [ok]      |    GMAO_perllib
 [ok]      |    MAPL_cfio
 [ok]      |    |    r4
 [ok]      |    |    r8
 [ok]      |    MAPL_Base
 [ok]      |    |    TeX
 [ok]      |    GEOS_Shared
 [ 1] .... .... Chem_Base
 [ok]      |    Chem_Shared
 [ok]      |    GMAO_etc
 [ok]      |    GMAO_hermes
 [ 2] .... .... GFDL_fms
 [ok]      |    GEOS_Util
 [ok]      |    |    post 

                          -------
                          Summary
                          -------

IGNORED mpp_comm_sma.d mpp_transmit_sma.d Chem_AodMod.d (3 files in 2 packages)
All 22 packages compiled successfully.

In case of errors, gmh summarizes exactly where it happens by indicating the package where it occured. Caveat: it does not work in parallel (output is scrambled). So, if the parallel build fails, rerun it sequentially (it will go quickly and die in the same place) and run gmh on the output for a summary.

Run the model

To make sure all works, we will first try setting up a simple one-day experiment.

Setting up a one-day experiment

Go into the model application directory and do a couple of preliminary commands:

$ cd $ESMADIR/src/Applications/GEOSgcm_App
$ echo $NOBACKUP > ~/.HOMDIRroot
$ echo $NOBACKUP > ~/.EXPDIRroot

These echos set up some defaults. While they both don't have to be in the same location, it's highly recommended they are and the use of the script below assumes they are. Also, make sure they are in a nobackup directory.

Now you can run create_expt.py:

$ ~mathomp4/bin/create_exp.py -h
usage: create_expt.py [-h] [-v] [-q] [--expdsc EXPDSC]
                      [--horz {a,b,c,d,e,c12,c24,c48,c90,c180,c360,c720,c1440,c2880}]
                      [--vert {72,132}] [--ocean {o1,o2,o3}] [--land {1,2}]
                      [--runoff {yes,no}] [--gocart {A,C}]
                      [--emission {MERRA2,PIESA,CMIP,NR,MERRA2-DD,OPS}]
                      [--history HISTORY] [--account ACCOUNT] [--gpu]
                      expid

Utility to quickly create experiment. At present, it creates an experiment in
the same manner as gcm_setup would with home and experiment directories as
usual.

positional arguments:
  expid                 Experiment ID

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         Verbose output
  -q, --quiet           Quietly Setup Experiment (no printing)
  --expdsc EXPDSC       Experiment Description (Default: same as expid)
  --horz {a,b,c,d,e,c12,c24,c48,c90,c180,c360,c720,c1440,c2880}
                        Horizontal Resolution (Default: c48 on clusters, c12
                        on desktop)
  --vert {72,132}       Vertical Resolution (Default: 72)
  --ocean {o1,o2,o3}    Data Ocean Resolution (Default: o1)
  --land {1,2}          Land Surface Model (Default: 1)
  --runoff {yes,no}     Runoff Routing Model (Default: no)
  --gocart {A,C}        GOCART aerosols: Actual (A) or Climatological (C)
                        (Default: A on clusters, C on desktops)
  --emission {MERRA2,PIESA,CMIP,NR,MERRA2-DD,OPS}
                        GOCART Emissions to use (Default: MERRA2)
  --history HISTORY     History Template (Default: Current)
  --account ACCOUNT     Account Number to Use (Default: g0620 at NCCS, g26141
                        at NAS)
  --gpu                 Setup Experiment to use GPUs

This is a script that attempts to ease setting up a GEOS-5 AGCM run. It has some "smarts" in that it will detect from an experiment ID some information, but you can be explicit (to the point you can specify impossible experiments too).

To actually create the experiment, run the script:

$ ~mathomp4/bin/create_expt.py test-1day-expt --horz c48
Horizontal resolution c48 passed in
Using c48 horizontal resolution 

Assuming default vertical resolution of 72
Using 72 vertical resolution

Assuming default ocean resolution of o1
Using o1 ocean resolution 

Using actual aerosols
 Running gcm_setup...done.

Experiment is located in directory: /discover/nobackup/mathomp4/test-1day-expt

Run a one-day test

To run a test one-day run, go to the experiment directory:

(1617) $ cd /discover/nobackup/mathomp4/test-1day-expt                                                       [discover08:...Applications/GEOSgcm_App 2:47pm]

total 96M -rwxr-xr-x 1 mathomp4 g0620 96M Feb 13 11:11 GEOSgcm.x* -rwxr-xr-x 1 mathomp4 g0620 573 Feb 13 14:47 CAP.rc* -rwxr-xr-x 1 mathomp4 g0620 364 Feb 13 14:47 fvcore_layout.rc* -rw-r--r-- 1 mathomp4 g0620 25K Feb 13 14:47 AGCM.rc -rwxr-xr-x 1 mathomp4 g0620 21K Feb 13 14:47 gcm_run.j* -rw-r--r-- 1 mathomp4 g0620 61K Feb 13 14:47 HISTORY.rc drwxr-xr-x 2 mathomp4 g0620 512 Feb 13 14:47 post/ drwxr-xr-x 2 mathomp4 g0620 512 Feb 13 14:47 plot/ drwxr-xr-x 2 mathomp4 g0620 512 Feb 13 14:47 archive/ drwxr-xr-x 2 mathomp4 g0620 512 Feb 13 14:47 regress/ drwxr-xr-x 2 mathomp4 g0620 512 Feb 13 14:47 convert/ drwxr-xr-x 2 mathomp4 g0620 512 Feb 13 14:47 forecasts/ drwxr-xr-x 2 mathomp4 g0620 16K Feb 13 14:47 RC/ Directory: /discover/nobackup/mathomp4/test-1day-expt