Skip to content

Commit

Permalink
Bring EMC fms_mixedmode up to date with GFDL main (#15)
Browse files Browse the repository at this point in the history
* get_unit warning now only prints on root_pe (NOAA-GFDL#872)

Co-authored-by: Eric Stofferahn <Eric.Stofferahn@noaa.gov>

* Update changelog, version numbers and build info (NOAA-GFDL#873)

Co-authored-by: rem1776 <Ryan.Mulhall@lscamd50-d.gfdl.noaa.gov>

* chore: Change version number to next development version (NOAA-GFDL#874)

* CI: Update build action for yaml parser (NOAA-GFDL#871)

Update build actions
Change images to organization's repo and fix mixed mode parser test failure

* test(parser): Change real comparison value to double (NOAA-GFDL#886)

Co-authored-by: rem1776 <Ryan.Mulhall@lscamd50-d.gfdl.noaa.gov>

* Make 'unsupported kind' error messages more descriptive. Change author of constants4.F90

* Add doxygen comment to valid_types in sat_vapor_pres/sat_vapor_pres_k.F90

* Modify codes for r8-r4 conversion to remove compiler warnings

* Remove OVERLOAD_R8 directives regarding send_data_*d_r8 subroutines

* Add Doxygen comments to constants4.F90

* Updates AM4 regression test suite to run intel 21 only on PW (NOAA-GFDL#893)

* feat: emc changes for mixedmode (NOAA-GFDL#857) (NOAA-GFDL#898)

* Change send_data interface and any necessary routines for mixed real precision support
* Adds an r4 size constants file

BREAKING CHANGE: changes some argument types in diag_manager, tracer_manager, sat_vapor_pres, and time_manager from real to class(*)

Co-authored-by: Minsuk Ji <57227195+MinsukJi-NOAA@users.noreply.github.com>

* feat: adds option to override (ignore) checksum test when reading restarts (NOAA-GFDL#889)

* update to fms2_io to allow reads to ignore embedded checksums on a fileobj basis
* added fms2_io test cases for the ignore_checksum option to restart reads
tests the domain, domain_wrap, and bc restart options

* docs: add CI information file (NOAA-GFDL#899)

* test: Adds check_nml_error after reading a namelist, so it could crash only as expected (NOAA-GFDL#904)

* Revert "feat: emc changes for mixedmode (NOAA-GFDL#857) (NOAA-GFDL#898)" (NOAA-GFDL#914)

This reverts commit 516a5ef.

* fix: clean up unused/uninitialized variables and other warnings (NOAA-GFDL#859)

Remove unused variables throughout and changes/removals for other warnings such as uninitialized values and implicit casts

* docs: update function style and branch names

* Changes master to main in CONTRIBUTING.md

* Claifies function return documentation in CODE_STYLE.md

* feat: adds support for logical variables in the yaml parser (NOAA-GFDL#907)

* Adds support for logical variables in the yaml parser

* correctly determines if a string is true or false

* fix: add check for affinity to self-initialize and update test program (NOAA-GFDL#917)

* fix: adds casts to class(*) calls to match doubles in C routines (NOAA-GFDL#920)

Co-authored-by: rem1776 <Ryan.Mulhall@lscamd50-d.gfdl.noaa.gov>

* build: add intel code coverage build option to autotools (NOAA-GFDL#895)

* refactor: change to inclusive variable names (NOAA-GFDL#926)

* feat: Allow maximum number of restart variables to be set at build time (NOAA-GFDL#909)

* fix: Fixes for linter action and code style (NOAA-GFDL#869)

* test: Test script updates and input tests (NOAA-GFDL#800)

Rewrites test script to use added testing shell functions
Adds previously skipped or removed unit tests and support for testing with input files

Co-authored-by: Seth Underwood <Seth.Underwood@noaa.gov>
Co-authored-by: Uriel Ramirez <uriel.ramirez@noaa.gov>

* chore: 2022.01 release changes (NOAA-GFDL#941)

* chore: change version number to next development version (NOAA-GFDL#945)

* Add option for position independent code (NOAA-GFDL#930)

* fix: document and change parameter names for grid versions (NOAA-GFDL#918)

* fix: Moving empty and non-existent data table handling inside data_override (NOAA-GFDL#933)

Enables the processing of an empty or non-existent data_table or data_table.yaml from within data_override, so that any routine can call data_override_init without worry

* fix: Removal of internal FMS use of fms_io and mpp_io (NOAA-GFDL#928)

* fix: mpp changes to solve compile issues with serial builds (NOAA-GFDL#949)

* feat: adds build option for compiling with different sets of constants (NOAA-GFDL#929)

* feat: add and aggregate mpp_chksum unit tests (NOAA-GFDL#946)

* feat: add module for string utility routines (NOAA-GFDL#911)

Adds module and accompanying test for common string operations

* revert: reinstated the mpp_io routines and put them at the end for future elimination. (NOAA-GFDL#952)

* fix: add back in small_fac parameter to constants .h files (NOAA-GFDL#954)

* fix: root pe bug with fms2_io::flush_file (NOAA-GFDL#958)

* fix: clean up string routines for fms_string_utils_mod (NOAA-GFDL#953)

* Make changes to lines with more than 120 columns

Co-authored-by: Ryan Mulhall <35538242+rem1776@users.noreply.github.com>
Co-authored-by: Eric Stofferahn <Eric.Stofferahn@noaa.gov>
Co-authored-by: rem1776 <Ryan.Mulhall@lscamd50-d.gfdl.noaa.gov>
Co-authored-by: Tom Robinson <33458882+thomas-robinson@users.noreply.github.com>
Co-authored-by: Rusty Benson <6594772+bensonr@users.noreply.github.com>
Co-authored-by: uramirez8707 <49168881+uramirez8707@users.noreply.github.com>
Co-authored-by: Raffaele Montuoro <raffaele.montuoro@outlook.com>
Co-authored-by: Seth Underwood <Seth.Underwood@noaa.gov>
Co-authored-by: Uriel Ramirez <uriel.ramirez@noaa.gov>
Co-authored-by: Matthew Thompson <matthew.thompson@nasa.gov>
Co-authored-by: Eric <7784797+GFDL-Eric@users.noreply.github.com>
  • Loading branch information
12 people authored Apr 15, 2022
1 parent 740443d commit f0f398e
Show file tree
Hide file tree
Showing 357 changed files with 15,795 additions and 9,908 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/am4_regression_parallelWorks_intel_tag.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Tag CI libFMS with AM4 regression

on:
push:
tags:
Expand All @@ -14,12 +14,12 @@ jobs:
max-parallel: 3
matrix:
include:
# Runs AM4 with intel18 on AM4_intel18
- runname: AM4 build and run with intel 18
runscript: python3 /home/Thomas.Robinson/pw/storage/pw_api_python/AM4_intel18StartClusters.py am4_intel18
# Runs AM4 with intel18 on AM4_intel18
# - runname: AM4 build and run with intel 18
# runscript: python3 /home/Thomas.Robinson/pw/storage/pw_api_python/AM4_intel18StartClusters.py am4_intel18
# Runs AM4 using a container to build and run the model with intel 21
- runname: AM4 regression with intel 21 and answer check
runscript: python3 /home/Thomas.Robinson/pw/storage/pw_api_python/AM4_intel21StartClusters.py am4_container
runscript: python3 /home/Thomas.Robinson/pw/storage/pw_api_python/AM4_intel21StartClusters.py main

steps:
- name: FMS make check on paralellWorks
Expand All @@ -34,7 +34,7 @@ jobs:
strategy:
matrix:
include:
- cluster: am4_intel18
# - cluster: am4_intel18
- cluster: am4_container
steps:
- name: Turn off cluster
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_cmake_gnu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-latest
strategy:
matrix:
omp-flags: [ -DOPENMP=on, -DOPENMP=off ]
libyaml-flag: [ "", -DWITH_YAML=on ]
container:
image: noaagfdl/ubuntu_libfms_gnu:cmake-3.22.0
image: noaagfdl/ubuntu_libfms_gnu
env:
CMAKE_FLAGS: "${{ matrix.omp-flags }} ${{ matrix.libyaml-flag }} -D64BIT=on"
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Generate makefiles with CMake
- name: Generate makefiles with CMake
run: cmake $CMAKE_FLAGS .
- name: Build the library
run: make
24 changes: 11 additions & 13 deletions .github/workflows/build_ubuntu_gnu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,26 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
distcheck-conf-flags: [--enable-openmp, --disable-openmp, --enable-mixed-mode, --disable-setting-flags]
fcflags: ["-I/usr/include", "-fdefault-real-8 -fdefault-double-8 -fcray-pointer -ffree-line-length-none -I/usr/include"]
exclude:
- distcheck-conf-flags: --disable-setting-flags
fcflags: -I/usr/include
- distcheck-conf-flags: --enable-mixed-mode
fcflags: "-fdefault-real-8 -fdefault-double-8 -fcray-pointer -ffree-line-length-none -I/usr/include"
distcheck-conf-flags: [--enable-openmp, --disable-openmp, --enable-mixed-mode, --disable-setting-flags ]
yaml-flag: [ --with-yaml, "" ]
container:
image: underwoo/ubuntu_libfms_gnu
image: noaagfdl/ubuntu_libfms_gnu
env:
FCFLAGS: "${{ matrix.fcflags }}"
FCFLAGS: "-I/usr/include"
VERBOSE: 1
DISTCHECK_CONFIGURE_FLAGS: "${{ matrix.distcheck-conf-flags }} ${{ matrix.yaml-flag }}"
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Prepare GNU autoconf for build
run: autoreconf -if
- name: Configure the build
run: ./configure ${{ matrix.distcheck-conf-flags }}
if: ${{ matrix.distcheck-conf-flags != '--disable-setting-flags' }}
run: ./configure ${DISTCHECK_CONFIGURE_FLAGS}
- name: Configure the build with compiler flags
if: ${{ matrix.distcheck-conf-flags == '--disable-setting-flags' }}
run: ./configure ${DISTCHECK_CONFIGURE_FLAGS}
env:
DISTCHECK_CONFIGURE_FLAGS: "${{ matrix.distcheck-conf-flags }}"
FCFLAGS: "-fdefault-real-8 -fdefault-double-8 -fcray-pointer -ffree-line-length-none -I/usr/include"
- name: Build the library
run: make -j distcheck
env:
DISTCHECK_CONFIGURE_FLAGS: "${{ matrix.distcheck-conf-flags }}"
2 changes: 1 addition & 1 deletion .github/workflows/lint_fms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- name: Run Lint
uses: NOAA-GFDL/simple_lint@v2
uses: NOAA-GFDL/simple_lint@v3
4 changes: 2 additions & 2 deletions .github/workflows/parallelWorks_intel_pr.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Pull Request CI libFMS with intel18 and intel21

on: [pull_request,workflow_dispatch]
jobs:
parallelWorks:
Expand All @@ -9,7 +9,7 @@ jobs:
max-parallel: 2
matrix:
include:
# Turn this back on when fixed
# Turn this back on when fixed
- runname: FMS with intel 18
runscript: python3 /home/Thomas.Robinson/pw/storage/pw_api_python/PRFMSintel18StartClusters.py $GITHUB_REF
# Runs on FMS_CONTAINER_CI cluster
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup repo
- name: Setup repo
run: | # do autotool's job for substitutes since we don't need a full build environement
mkdir gen_docs
sed 's/@abs_top_builddir@\/docs/gen_docs/' docs/Doxyfile.in > gen_docs/Doxyfile
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ Makefile.in
/mdate-sh
/py-compile
/test-driver
/tap-driver.sh
/ylwrap
*.log
*.trs
Expand Down
56 changes: 55 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,57 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0),
and this project uses `yyyy.rr[.pp]`, where `yyyy` is the year a patch is released,
`rr` is a sequential release number (starting from `01`), and an optional two-digit
sequential patch number (starting from `01`).
## [2022.01] - 2022-03-25
### Known Issues
- The MPICH MPI implementation is unsupported when used alongside GCC 10 or 11 due to compilation issues with the mixed precision reals. MPICH can still be used to compile FMS with GCC 9 or earlier, or with other compilers.
- GCC 11.1.0 is unsupported due to compilation issues with `select type`. The issue appears to be resolved in later GCC releases
### Added
- FMS2_IO: Added a macro `MAX_NUM_RESTART_VARS_` to allow the max amount of restart variables to be set at compile time
- TESTING: Adds a configure option, `--enable-code-coverage`, to build a code coverage report using intel's codecov
- AFFINITY: Adds an initialization check to `fms_affinity_set`, and updates test program with init/end routines
- FMS2_IO: Adds an optional argument to ignore embedded checksum checks when reading restart files
### Changed
- TESTING: Changes the testing suite scripts for various improvements such improved output, tests with input files, and adding/fixing new tests
- MPP: Change variable names in mpp to use more inclusive language
- DOCS: Updates to correct branch name and doxygen guide for functions, and adds CI information page
### Fixed
- Fixes compilation warnings throughout the code, mainly for uninitialized or unused variables
- Fixed any code not adhering to the projects style guide (mainly line length fixes) so that all future changes can be checked with a linter
- MOSAIC2: Adds `r8_kind` casts to calls to C routines in order match precision of doubles
- TESTS: Fixes crashes in fms2_io tests from namelist read errors
### Tag Commit Hashes
- 2022.01-alpha1 516a5efa681e5ae954c11c0c90677b4444e28ec4
- 2022.01-beta1 12da12884f8dc8bde47b478c997b0e5d49260a1c
- 2022.01-alpha2 28e8e3e751a6d5d81b640fb779304329f3edb82d
- 2022.01-beta2 7b78a73a5ba7acf5d3d932ecfe081e5040e2c778
## [2021.04] - 2021-12-23
### Known Issues
- GCC 11.1.0 is unsupported due to compilation issues with `select type`. The issue appears to be resolved in later GCC releases
### Added
- PARSER: Adds a parser using the libyaml C library to support yaml format input files.
Currently implemented in data override and can be enabled with the configure option `--with-yaml` or with CMake option `-DWITH_YAML`
- FMS: Adds an interface, `fms_c2f_string`, to convert C strings and C pointers to Fortran strings
- MPP: Adds a routine `mpp_shift_nest_domains` and a field to `nest_domain_type` to allow for modifying the position of a given nest domain
- FMS2_IO: Reintroduces the option to flush_nc_files with fms2_io
### Changed
- DIAG_MANAGER: Cleans up IO code and replaces any remaining dependencies to mpp_io with fms2_io
- FMS_IO: Changes to allow for custom paths for namelists, field_table, and the INPUT directory
- EXCHANGE: Changes real sizes in xgrid and gradient modules to be explicitly r8_kind to prevent runtime issues with mixed precision
### Deprecated
- MPP: `get_unit` has been deperecated in favor of the Fortran intrinsic `newunit` and will now generate a warning if used
### Removed
- TIME_MANAGER: Removes deprecated array-based gregorian calender calculations that were replaced in 2021.02
### Fixed
- DIAG_MANAGER: Fixes issues with 3D diurnal diagnostic output and removes a redundant write_data call
- TIME_INTERP: Fixes load_record read_data call for 3d variables with fms2_io and eliminates redundant data loading and validity checking for on-grid interpolations.
- MPP: Fixed a bug with non-blocking domain updates failing on GNU compilers from uninitialized values
- MPP: Fixed issues with the `mpp_type_free` function causing errors and memory leaks when freeing the `mpp_byte` type

### Tag Commit Hashes
- 2021.04-alpha1 (e0b998321611f80f2d0c587a13b8c03c173d5520)
- 2021.04-alpha2 (ab1b0a4cb2beac72d889d94a628e0d02092723b2)
- 2021.04-alpha3 (90583aeb369831b01296ab4b0e7e6a1b69ed91b1)
- 2021.04-beta1 (6d179fcdc189070f74d49e0025d072fa304e96d6)

## [2021.03] - 2021-08-16
### Known Issues
Expand All @@ -27,6 +78,9 @@ sequential patch number (starting from `01`).
- MPP: Fixed uninitialized variables for data domains in mpp domains broadcast routines
- MPP: Minor memory leaks from deallocating domains
- AXIS_UTILS: Fix PGI related error with string length sizes
### Tag Commit Hashes
- 2021.03-alpha1 (87d945d8dba6341f1f56631047ae5d3e5b4ab828)
- 2021.03-beta1 (6d6ff9595ede12ea0a342ae014442708a27041d2)

## [2021.02] - 2021-05-20
### Added
Expand Down Expand Up @@ -74,7 +128,7 @@ sequential patch number (starting from `01`).
### Removed
### Fixed
- MPP: Fixed a bug causing mpp_get_UG_domain_tile_pe_inf to seg fault from the incorrect assignment of an optional argument
- FMS: Fixes issues with FMS unit tests failing from pointer allocations by reworking deallocate_unstruct_pass_type
- FMS: Fixes issues with FMS unit tests failing from pointer allocations by reworking deallocate_unstruct_pass_type
- MPP_IO: Fixes unintentional printing of file attributes
- An issue with the automake build system causing unnecessary rebuilds of source files
- Fixes CMake build of the FMS library to install configuration files in the appropriate directories; and for OpenMP dependencies to the private
Expand Down
62 changes: 62 additions & 0 deletions CI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# CI Information

The CI workflows and checks, and associated container environments for this repository
are listed below.
Actions run via Github-hosted runners unless otherwise noted.
Required CI for pull requests are listed first.

## Pull Request CI and checks

### Build libFMS with autotools
Required GNU build test for all pull requests/pushes.
Runs `make distcheck` after configuring via GNU autotools.

Container environment:
gcc v7.3.0
mpich v3.3a2
netcdf v4.6.0
netcdf-fortran v4.4.4
autoconf v2.69

container hosted at [noaagfdl/ubuntu_libfms_gnu:latest](https://hub.docker.com/r/noaagfdl/ubuntu_libfms_gnu)

`./configure` flags:
- `--enable-openmp`
- `--disable-openmp`
- `--enable-mixed-mode`
- `--disable-setting-flags`
- `--with-yaml`

### Build libfms with cmake
Required GNU build test for all pull requests/pushes.
Runs `make` after configuring via cmake.

Container environment:
gcc v7.3.0
mpich v3.3a2
netcdf v4.6.0
netcdf-fortran v4.4.4
cmake v3.22.0

container hosted at [noaagfdl/ubuntu_libfms_gnu:latest](https://hub.docker.com/r/noaagfdl/ubuntu_libfms_gnu)

cmake flags:
- `-DOPENMP=on`
- `-DOPENMP=on`
- `-DWITH_YAML=on`
- `-D64BIT=on`

### libFMS lint tests
Required test for all pull requests.
Checks code for line lengths, tabs, and trailing whitespace in accordance with
the project's [style guide](https://github.com/NOAA-GFDL/FMS/blob/main/CODE_STYLE.md).
The action is hosted on github [here](https://github.com/NOAA-GFDL/simple_lint).

## Parallelworks CI
The following CI workflows run on self-hosted runners through the parallelworks platform.
### Pull Request CI libFMS with intel
Optional(does not need to pass to merge) intel build test hosted on the parallelworks platform.
Runs `make check` with intel 18 and 21 compilers for all pull requests.

### Tag CI libFMS with AM4 regression
On alpha or beta tag creation, compiles and runs full AM4 model regression testing using the new FMS tag on parallelworks.
13 changes: 10 additions & 3 deletions CMAKE_INSTRUCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ export CC=mpiicc
export NetCDF_ROOT=`nc-config --prefix`
```

### If building with yaml parser (-DWITH_YAML)
```
export LIBYAML_ROOT=<your libyaml install directory>
```

## 2. Build and install FMS with CMake
`<prefix>` is the full install directory for FMS provided by user
Expand All @@ -39,14 +43,17 @@ By default, FMS is built without `OpenMP` and in `single precision (r4)`

The following build options are available:
```
-DOPENMP "Build FMS with OpenMP support" DEFAULT: OFF
-D32BIT "Build 32-bit (r4) FMS library" DEFAULT: ON
-D64BIT "Build 64-bit (r8) FMS library" DEFAULT: OFF
-DOPENMP "Build FMS with OpenMP support" DEFAULT: OFF
-D32BIT "Build 32-bit (r4) FMS library" DEFAULT: ON
-D64BIT "Build 64-bit (r8) FMS library" DEFAULT: OFF
-DFPIC "Build with position independent code" DEFAULT: OFF
-DCONSTANTS "Build with <X> constants parameter definitions" DEFAULT:GFDL OPTIONS:GFS|GEOS|GFDL
-DINTERNAL_FILE_NML "Enable compiler definition -DINTERNAL_FILE_NML" DEFAULT: ON
-DENABLE_QUAD_PRECISION "Enable compiler definition -DENABLE_QUAD_PRECISION" DEFAULT: ON
-DGFS_PHYS "Enable compiler definition -DGFS_PHYS" DEFAULT:OFF
-DLARGEFILE "Enable compiler definition -Duse_LARGEFILE" DEFAULT:OFF
-DWITH_YAML "Enable compiler definition -Duse_yaml" DEFAULT:OFF
```

## 3. Installation structure
Expand Down
Loading

0 comments on commit f0f398e

Please sign in to comment.