Skip to content

Commit

Permalink
Merge pull request #102 from climbfuji/update_gsl_develop_from_develo…
Browse files Browse the repository at this point in the history
…p_20210921

Update gsl/develop from develop 2021/09/21
  • Loading branch information
DomHeinzeller authored Sep 22, 2021
2 parents 50f90af + d9decbb commit a41e000
Show file tree
Hide file tree
Showing 105 changed files with 4,688 additions and 5,493 deletions.
2 changes: 1 addition & 1 deletion CICE-interface/CICE
Submodule CICE updated 85 files
+73 −12 cicecore/cicedynB/analysis/ice_diagnostics.F90
+7 −8 cicecore/cicedynB/analysis/ice_diagnostics_bgc.F90
+136 −90 cicecore/cicedynB/analysis/ice_history.F90
+1 −1 cicecore/cicedynB/analysis/ice_history_fsd.F90
+4 −4 cicecore/cicedynB/analysis/ice_history_pond.F90
+51 −48 cicecore/cicedynB/analysis/ice_history_shared.F90
+430 −0 cicecore/cicedynB/analysis/ice_history_snow.F90
+6 −6 cicecore/cicedynB/dynamics/ice_dyn_eap.F90
+112 −115 cicecore/cicedynB/dynamics/ice_dyn_evp.F90
+1,856 −2,050 cicecore/cicedynB/dynamics/ice_dyn_evp_1d.F90
+22 −25 cicecore/cicedynB/dynamics/ice_dyn_shared.F90
+22 −22 cicecore/cicedynB/dynamics/ice_dyn_vp.F90
+21 −4 cicecore/cicedynB/dynamics/ice_transport_driver.F90
+7 −0 cicecore/cicedynB/general/ice_flux.F90
+206 −3 cicecore/cicedynB/general/ice_forcing.F90
+261 −43 cicecore/cicedynB/general/ice_init.F90
+190 −30 cicecore/cicedynB/general/ice_step_mod.F90
+132 −1 cicecore/cicedynB/infrastructure/comm/mpi/ice_boundary.F90
+14 −124 cicecore/cicedynB/infrastructure/comm/mpi/ice_gather_scatter.F90
+132 −1 cicecore/cicedynB/infrastructure/comm/serial/ice_boundary.F90
+8 −32 cicecore/cicedynB/infrastructure/comm/serial/ice_gather_scatter.F90
+1 −1 cicecore/cicedynB/infrastructure/ice_domain.F90
+39 −15 cicecore/cicedynB/infrastructure/ice_grid.F90
+615 −150 cicecore/cicedynB/infrastructure/ice_read_write.F90
+53 −8 cicecore/cicedynB/infrastructure/io/io_binary/ice_restart.F90
+95 −262 cicecore/cicedynB/infrastructure/io/io_netcdf/ice_history_write.F90
+13 −2 cicecore/cicedynB/infrastructure/io/io_netcdf/ice_restart.F90
+248 −200 cicecore/cicedynB/infrastructure/io/io_pio2/ice_history_write.F90
+52 −14 cicecore/cicedynB/infrastructure/io/io_pio2/ice_pio.F90
+17 −6 cicecore/cicedynB/infrastructure/io/io_pio2/ice_restart.F90
+1 −1 cicecore/drivers/nuopc/cmeps/ice_import_export.F90
+43 −9 cicecore/drivers/standalone/cice/CICE_InitMod.F90
+20 −7 cicecore/drivers/standalone/cice/CICE_RunMod.F90
+6 −26 cicecore/drivers/unittest/bcstchk/bcstchk.F90
+28 −5 cicecore/drivers/unittest/calchk/calchk.F90
+3 −2 cicecore/drivers/unittest/helloworld/helloworld.F90
+4 −3 cicecore/drivers/unittest/sumchk/sumchk.F90
+11 −0 cicecore/shared/ice_arrays_column.F90
+31 −2 cicecore/shared/ice_calendar.F90
+6 −0 cicecore/shared/ice_fileunits.F90
+67 −10 cicecore/shared/ice_init_column.F90
+90 −1 cicecore/shared/ice_restart_column.F90
+1 −1 cicecore/version.txt
+17 −0 configuration/scripts/cice.batch.csh
+6 −0 configuration/scripts/cice.launch.csh
+1 −1 configuration/scripts/cice.run.setup.csh
+40 −1 configuration/scripts/ice_in
+56 −0 configuration/scripts/machines/Macros.gaea_intel
+1 −1 configuration/scripts/machines/Macros.onyx_cray
+1 −1 configuration/scripts/machines/Macros.onyx_gnu
+34 −0 configuration/scripts/machines/env.gaea_intel
+7 −6 configuration/scripts/machines/env.onyx_cray
+7 −6 configuration/scripts/machines/env.onyx_gnu
+7 −6 configuration/scripts/machines/env.onyx_intel
+1 −1 configuration/scripts/options/set_nml.alt04
+1 −0 configuration/scripts/options/set_nml.evp1d
+2 −2 configuration/scripts/options/set_nml.gx1prod
+19 −0 configuration/scripts/options/set_nml.gx1prod15
+1 −0 configuration/scripts/options/set_nml.histinst
+0 −1 configuration/scripts/options/set_nml.kevp102
+9 −1 configuration/scripts/options/set_nml.qc
+7 −0 configuration/scripts/options/set_nml.run10year
+5 −0 configuration/scripts/options/set_nml.snw30percent
+10 −0 configuration/scripts/options/set_nml.snwITDrdg
+15 −0 configuration/scripts/options/set_nml.snwgrain
+9 −0 configuration/scripts/tests/QC/cice.t-test.py
+6 −3 configuration/scripts/tests/base_suite.ts
+2 −2 configuration/scripts/tests/comparelog.csh
+6 −0 configuration/scripts/tests/io_suite.ts
+4 −0 configuration/scripts/tests/prod_suite.ts
+1 −0 configuration/scripts/tests/reprosum_suite.ts
+18 −9 configuration/scripts/tests/test_unittest.script
+33 −1 doc/source/cice_index.rst
+2 −2 doc/source/conf.py
+10 −1 doc/source/developer_guide/dg_driver.rst
+14 −24 doc/source/developer_guide/dg_dynamics.rst
+1 −1 doc/source/developer_guide/dg_forcing.rst
+90 −81 doc/source/science_guide/sg_dynamics.rst
+5 −1 doc/source/science_guide/sg_tracers.rst
+ doc/source/user_guide/figures/CICE_Bgrid.png
+37 −2 doc/source/user_guide/ug_case_settings.rst
+27 −12 doc/source/user_guide/ug_implementation.rst
+9 −0 doc/source/user_guide/ug_testing.rst
+0 −3 doc/source/user_guide/ug_troubleshooting.rst
+1 −1 icepack
2 changes: 2 additions & 0 deletions CICE-interface/cice_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ list(APPEND cice_shared_files
CICE/cicecore/cicedynB/analysis/ice_history_mechred.F90
CICE/cicecore/cicedynB/analysis/ice_history_pond.F90
CICE/cicecore/cicedynB/analysis/ice_history_shared.F90
CICE/cicecore/cicedynB/analysis/ice_history_snow.F90

#Dynamics List:
CICE/cicecore/cicedynB/dynamics/ice_dyn_eap.F90
Expand Down Expand Up @@ -74,6 +75,7 @@ list(APPEND icepack_files
CICE/icepack/columnphysics/icepack_orbital.F90
CICE/icepack/columnphysics/icepack_parameters.F90
CICE/icepack/columnphysics/icepack_shortwave.F90
CICE/icepack/columnphysics/icepack_snow.F90
CICE/icepack/columnphysics/icepack_therm_0layer.F90
CICE/icepack/columnphysics/icepack_therm_bl99.F90
CICE/icepack/columnphysics/icepack_therm_itd.F90
Expand Down
3 changes: 3 additions & 0 deletions CMEPS-interface/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# CMEPS compiler flags
if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(CMAKE_Fortran_FLAGS "-g -fbacktrace -ffree-line-length-none")
if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch -fallow-invalid-boz")
endif()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}")
set(CMAKE_Fortran_FLAGS_RELEASE "-O2")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -fcheck=bounds -ffpe-trap=invalid,zero,overflow,underflow" )
Expand Down
2 changes: 1 addition & 1 deletion FV3
1 change: 1 addition & 0 deletions MOM6-interface/mom6_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ list(APPEND mom6_src_files
MOM6/src/tracer/oil_tracer.F90
MOM6/src/tracer/pseudo_salt_tracer.F90
MOM6/src/tracer/tracer_example.F90
MOM6/src/tracer/MOM_CFC_cap.F90

MOM6/src/user/BFB_initialization.F90
MOM6/src/user/BFB_surface_forcing.F90
Expand Down
136 changes: 136 additions & 0 deletions doc/UsersGuide/source/AutomatedTesting.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
.. _AutomatedTesting:

*****************
Automated Testing
*****************

The UFS Weather Model repository on GitHub employs two types of automated testing.
One is the CI/CD on cloud and the other is the AutoRT on NOAA R&D platforms.
Both are application level tests, and utilize the regression testing framework
discussed in :numref:`Section %s <UsingRegressionTest>`.

=====
CI/CD
=====

The following summarizes the CI/CD used in the UFS Weather Model:

* GitHub Actions (GHA), a GitHub-hosted continuous integration service is used.
* Build jobs are done on GHA-provided virtual machines.
* Test jobs are performed on Amazon cloud using a number of EC2 instances.
* Builds and tests are carried out using a Docker container.
* Docker container has prerequisite libraries installed via the hpc-stack.
* Input data needed to run tests are stored as a separate Docker container.


When a developer makes a pull request (PR) to the UFS Weather Model repository, and a code
manager subsequently adds the `run-ci` label, the CI/CD workflow is triggerd:

#. A check is performed to make sure the UFS Weather Model and its first level
subcomponents are up to date with the top of develop branch.

#. If the check is successful, build jobs are started on GHA-provided virtual machines
by downloading the hpc-stack Docker container stored in Docker Hub.

#. Once all build jobs are successful, the created executable files are stored as
artifacts in GHA.

#. A number of AWS EC2 instances are started.

#. Test jobs are started on Amazon cloud by downloading the hpc-stack Docker container,
the executable file from the build job, and the input-data Docker container.

#. When all tests are finished, EC2 instances are stopped. Test results are reported
on GitHub.


The GHA-related yaml scripts are located in the ``.github/workflows/`` directory.
``build_test.yml`` is the main workflow file, and ``aux.yml`` is an auxiliary
file responsible for checking the up-to-dateness of the PR branch, and starting
and stopping the EC2 instances. Other CI-related scrips are located in the ``tests/ci/``
directory. ``ci.sh`` is the main script that invokes Docker build and run. ``Dockerfile``
is used to build UFS Weather Model. Other shell and python scripts help with various
tasks such as checking the up-to-dateness of the PR branch (``repo_check.sh``),
checking the status of EC2 instances (``check_status.py``), and configuring the test cases
to carry out in the CI/CD workflow (``setup.py`` and ``ci.test``).


=======
Auto RT
=======

The Automated Regression Testing (AutoRT) system:

* Automates the process of regression testing on NOAA HPC platforms.

* Written in python.

* Contains the following files:

.. table:: *Files for Automated Regression Testing (AutoRT) system*

+-------------------+-----------------------------------------------------+
| **File Name** | **Description** |
+===================+=====================================================+
| start_rt_auto.sh | Verifies HPC name, sets the python paths |
+-------------------+-----------------------------------------------------+
| rt_auto.py | Python interface between the HPC and the github API |
+-------------------+-----------------------------------------------------+
| jobs/bl.py | Functions for the baseline job |
+-------------------+-----------------------------------------------------+
| jobs/rt.py | Functions for the regression test job |
+-------------------+-----------------------------------------------------+

~~~~~~~~~~~~~~~
AutoRT Workflow
~~~~~~~~~~~~~~~
* Cron-job on supported HPC systems runs start_rt_auto.sh bash script every
15 minutes.

* This script verifies the HPC name, and sets the python paths. Runs
rt_auto.py.

* rt_auto.py: Uses the Github API (Through pyGitHub)

* Checks the pull requests to ufs-community/ufs-weather-model for
labels specific to the HPC name. If no match to HPC name, exits.
(i.e. hera-intel-RT or cheyenne-gnu-BL)

* If the HPC name matches the label in ufs-weather-model pull
request, the label provides the HPC with the compiler and job to run on
the machine.

* For example the label gaea-intel-BL will be recognized by the HPC
machine 'Gaea', set the RT_COMPILER variable to 'intel' and run the
baseline creation script (bl.py).

* Creates a Job class that contains all information from the machine
that the job will need to run. That is sent into the jobs/rt[bl].py script.

* rt.py: Sets directories for storage, gets repo information, runs RT,
post processes.

.. code-block:: python3
def run(job_obj):
logger = logging.getLogger('RT/RUN')
workdir = set_directories(job_obj)
branch, pr_repo_loc, repo_dir_str = clone_pr_repo(job_obj, workdir)
run_regression_test(job_obj, pr_repo_loc)
post_process(job_obj, pr_repo_loc, repo_dir_str, branch)
* bl.py: (similar to rt.py) Adds functionality to create baselines before
running regression testing.

.. code-block:: python3
:emphasize-lines: 5,6,7
def run(job_obj):
logger = logging.getLogger('BL/RUN')
workdir, rtbldir, blstore = set_directories(job_obj)
pr_repo_loc, repo_dir_str = clone_pr_repo(job_obj, workdir)
bldate = get_bl_date(job_obj, pr_repo_loc)
bldir = f'{blstore}/develop-{bldate}/{job_obj.compiler.upper()}'
bldirbool = check_for_bl_dir(bldir, job_obj)
run_regression_test(job_obj, pr_repo_loc)
post_process(job_obj, pr_repo_loc, repo_dir_str, rtbldir, bldir)
1 change: 1 addition & 0 deletions doc/UsersGuide/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Welcome to the UFS Weather Model User's Guide
CodeOverview
BuildingAndRunning
InputsOutputs
AutomatedTesting
FAQ
Acronyms
Glossary
4 changes: 2 additions & 2 deletions modulefiles/ufs_cheyenne.gnu
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ module load mpt/2.22
module load ncarcompilers/0.5.0
module unload netcdf

module use /glade/p/ral/jntp/GMTB/tools/hpc-stack-v1.1.0/modulefiles/stack
module load hpc/1.1.0
module use /glade/p/ral/jntp/GMTB/tools/hpc-stack-v1.2.0/modulefiles/stack
module load hpc/1.2.0
module load hpc-gnu/10.1.0
module load hpc-mpt/2.22

Expand Down
4 changes: 2 additions & 2 deletions modulefiles/ufs_cheyenne.gnu_debug
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ module load mpt/2.22
module load ncarcompilers/0.5.0
module unload netcdf

module use /glade/p/ral/jntp/GMTB/tools/hpc-stack-v1.1.0/modulefiles/stack
module load hpc/1.1.0
module use /glade/p/ral/jntp/GMTB/tools/hpc-stack-v1.2.0/modulefiles/stack
module load hpc/1.2.0
module load hpc-gnu/10.1.0
module load hpc-mpt/2.22

Expand Down
4 changes: 2 additions & 2 deletions modulefiles/ufs_cheyenne.intel
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ module load mpt/2.22
module load ncarcompilers/0.5.0
module unload netcdf

module use /glade/p/ral/jntp/GMTB/tools/hpc-stack-v1.1.0/modulefiles/stack
module load hpc/1.1.0
module use /glade/p/ral/jntp/GMTB/tools/hpc-stack-v1.2.0/modulefiles/stack
module load hpc/1.2.0
module load hpc-intel/2021.2
module load hpc-mpt/2.22

Expand Down
4 changes: 2 additions & 2 deletions modulefiles/ufs_cheyenne.intel_debug
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ module load mpt/2.22
module load ncarcompilers/0.5.0
module unload netcdf

module use /glade/p/ral/jntp/GMTB/tools/hpc-stack-v1.1.0/modulefiles/stack
module load hpc/1.1.0
module use /glade/p/ral/jntp/GMTB/tools/hpc-stack-v1.2.0/modulefiles/stack
module load hpc/1.2.0
module load hpc-intel/2021.2
module load hpc-mpt/2.22

Expand Down
12 changes: 6 additions & 6 deletions modulefiles/ufs_common
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ module load png/1.6.35
module load hdf5/1.10.6
module load netcdf/4.7.4
module load pio/2.5.2
module load esmf/8_1_1
module load fms/2020.04.03
module load esmf/8_2_0_beta_snapshot_14
module load fms/2021.03

module load bacio/2.4.1
module load crtm/2.3.0
Expand All @@ -17,8 +17,8 @@ module load g2tmpl/1.10.0
module load ip/3.3.3
module load sp/2.3.3
module load w3nco/2.4.1
module load upp/10.0.8
module load upp/10.0.9

module load gftl-shared/v1.3.0
module load yafyaml/v0.5.1
module load mapl/v2.7.3
#module load gftl-shared/v1.3.0
#module load yafyaml/v0.5.1
#module load mapl/v2.7.3-esmf820bs14
12 changes: 6 additions & 6 deletions modulefiles/ufs_common_debug
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ module load png/1.6.35
module load hdf5/1.10.6
module load netcdf/4.7.4
module load pio/2.5.2
module load esmf/8_1_1-debug
module load fms/2020.04.03
module load esmf/8_2_0_beta_snapshot_14-debug
module load fms/2021.03

module load bacio/2.4.1
module load crtm/2.3.0
Expand All @@ -17,8 +17,8 @@ module load g2tmpl/1.10.0
module load ip/3.3.3
module load sp/2.3.3
module load w3nco/2.4.1
module load upp/10.0.8
module load upp/10.0.9

module load gftl-shared/v1.3.0
module load yafyaml/v0.5.1
module load mapl/v2.7.3
#module load gftl-shared/v1.3.0
#module load yafyaml/v0.5.1
#module load mapl/v2.7.3-esmf820bs14
3 changes: 3 additions & 0 deletions modulefiles/ufs_hera.gnu
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ module load hpc-mpich/3.3.2

module load ufs_common

module unload fms
module load fms/2021.03-avx

setenv CC mpicc
setenv CXX mpicxx
setenv FC mpif90
Expand Down
6 changes: 6 additions & 0 deletions modulefiles/ufs_hera.intel
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ module load hpc-impi/2018.0.4

module load ufs_common

module unload fms
module load fms/2021.03-avx
module load gftl-shared/v1.3.0
module load yafyaml/v0.5.1
module load mapl/v2.7.3-esmf820bs14

setenv CC mpiicc
setenv CXX mpiicpc
setenv FC mpiifort
Expand Down
4 changes: 4 additions & 0 deletions modulefiles/ufs_hera.intel_debug
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ module load hpc-impi/2018.0.4

module load ufs_common_debug

module load gftl-shared/v1.3.0
module load yafyaml/v0.5.1
module load mapl/v2.7.3-esmf820bs14

setenv CC mpiicc
setenv CXX mpiicpc
setenv FC mpiifort
Expand Down
4 changes: 2 additions & 2 deletions modulefiles/ufs_wcoss_cray
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module load gfsio/1.4.1
module load sfcio/1.4.1
module load sigio/2.3.2

module load upp/10.0.8
module load upp/10.0.9

## WCOSS Cray execution prereqs:
module load rca
Expand All @@ -64,7 +64,7 @@ module load udreg
module load ugni

module load esmf/811
module load fms/2020.04.03
module load fms/2021.03

module swap pmi pmi/5.0.11

Expand Down
4 changes: 2 additions & 2 deletions modulefiles/ufs_wcoss_cray_debug
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module load gfsio/1.4.1
module load sfcio/1.4.1
module load sigio/2.3.2

module load upp/10.0.8
module load upp/10.0.9

## WCOSS Cray execution prereqs:
module load rca
Expand All @@ -64,7 +64,7 @@ module load udreg
module load ugni

module load esmf/811-debug
module load fms/2020.04.03
module load fms/2021.03

module swap pmi pmi/5.0.11

Expand Down
Loading

0 comments on commit a41e000

Please sign in to comment.