Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into annual_interp
Browse files Browse the repository at this point in the history
  • Loading branch information
mlee03 authored and mlee03 committed Dec 13, 2023
2 parents e3c9e5c + 51af7e1 commit ffadb8c
Show file tree
Hide file tree
Showing 85 changed files with 1,834 additions and 1,482 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/github_autotools_gnu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ name: Build libFMS test with autotools

on: [push, pull_request]

# cancel running jobs if theres a newer push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -22,7 +27,7 @@ jobs:
SKIP_TESTS: "test_yaml_parser.5" # temporary till fixes are in
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Prepare GNU autoconf for build
run: autoreconf -if
- name: Configure the build
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/github_autotools_intel.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
on: pull_request

# cancel running jobs if theres a newer push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
intel-autotools:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -47,7 +53,7 @@ jobs:
./configure --prefix=/libs
make -j install && cd
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Configure
run: autoreconf -if ./configure.ac && ./configure --with-yaml
- name: Compile
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/github_cmake_gnu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Build libFMS with cmake

on: [push, pull_request]

# cancel running jobs if theres a newer push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -16,7 +21,7 @@ jobs:
CMAKE_FLAGS: "${{ matrix.omp-flags }} ${{ matrix.io-flag }} ${{ matrix.libyaml-flag }} -D64BIT=on"
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Generate makefiles with CMake
run: cmake $CMAKE_FLAGS .
- name: Build the library
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/github_coupler_gnu.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Test coupler build
on: [pull_request]

# cancel running jobs if theres a newer push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
coupler-build:
runs-on: ubuntu-latest
Expand All @@ -17,11 +22,11 @@ jobs:
LDFLAGS: '-L/opt/view/lib'
steps:
- name: Checkout FMS
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: FMS
- name: Checkout FMScoupler
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: 'NOAA-GFDL/FMScoupler'
path: FMScoupler
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github_doc_site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup repo
run: | # do autotool's job for substitutes since we don't need a full build environement
mkdir gen_docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github_linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Run Lint
uses: NOAA-GFDL/simple_lint@f5aa1fe976bd4c231db0536ba00cbfdc26708253
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
add-dev-to-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Append version with dev
run: sed -i '/20[0-9][0-9]\.[0-9][0-9]/ s/]/-dev]/' configure.ac
- name: Create pull request
Expand Down
62 changes: 62 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,68 @@ and this project uses `yyyy.rr[.pp]`, where `yyyy` is the year a patch is releas
`rr` is a sequential release number (starting from `01`), and an optional two-digit
sequential patch number (starting from `01`).

## [2023.04] - 2023-12-04
### Known Issues
- GCC 9 and below as well as GCC 11.1.0 are unsupported due to compilation issues. See prior releases for more details.
- `NO_QUAD_PRECISION` macro is no longer set by FMS, the `ENABLE_QUAD_PRECISION` macro has replaced prior usage of `NO_QUAD_PRECISION`. `-DENABLE_QUAD_PRECISION` should be set if quad precision is to be used, otherwise FMS will not use quad precision reals where applicable.

### Added
- DATA_OVERRIDE: A new namelist flag `use_data_table_yaml` has been added to enable usage of the yaml format data_override tables. This allows an executable built with yaml support be able to accept either format.

### Changed
- RESERVED KEYWORD CHANGES: Various routines in FMS have been updated to not use fortran keywords for variable names. The names changed were: `data`, `unit`, and `value`. This may affect usage of external code if argument names are explicitly used. Only required arguement names were changed to mitigate any breaking changes.
- TESTS: Changes the testing scripts to allow for the `MPI_LAUNCHER` environment variable override to work with any provided arguments.

### Fixed
- CMAKE: Fixed build issue with CMake where precision default flags were being overwritten when using GNU and MPICH.
- AUTOTOOLS: Fixes issue affecting installs where the global libFMS.F90 module was not being installed correctly and adds post-install message.
- DIAG_MANAGER: Fixes issue with incorrect start_time functionality (from the 2023.02.01 patch)

### Tag Commit Hashes
- 2023.04-beta1 be1856c45accfe2fb15953c5f51e0d58a8816882

## [2023.03] - 2023-10-27
### Known Issues
- GCC 9 and below as well as GCC 11.1.0 are unsupported due to compilation issues. See prior releases for more details.
- `NO_QUAD_PRECISION` macro is no longer set by FMS, the `ENABLE_QUAD_PRECISION` macro has replaced prior usage of `NO_QUAD_PRECISION`. `-DENABLE_QUAD_PRECISION` should be set if quad precision is to be used, otherwise FMS will not use quad precision reals where applicable.

### Added
- UNIT_TESTS: New unit tests have been created or and existing ones expanded on for any modules utilizing mixed precision support.

### Changed
- MIXED PRECISION: Most subroutines and functions in FMS have been updated to simultaneously accept both 4 byte and 8 byte reals as arguments. This deprecates the `--enable-mixed-mode` option, which enabled similar functionality but was limited to certain directories and was not enabled by default. To facilitate easier testing of these code changes, the CMake precision options for default real size were left in (along with an equivalent `--disable-r8-default` flag for autotools). The resulting libraries will support mixed-precision real kinds regardless of default real size. It should also be noted that many routines that accept real arguments have been moved to include files along with headers in order to be compiled with both kinds. Most module level variables were explicitly declared as r8_kind for these updates.
- Some type/module changes were made to facilitate mixed precision support. They are **intended** to have minimal impact to other codebases:
- COUPLER_TYPES: In coupler_types.F90, `coupler_nd_field_type` and `coupler_nd_values_type` have been renamed to indicate real kind value: `coupler_nd_real4/8_field_type` and `coupler_nd_real4/8_values_type`. The `bc` field within `coupler_nd_bc_type` was modified to use r8_kind within the value and field types, and an additional field added `bc_r4` to use r4_kind values.
- TRIDIAGONAL: Module state between r4 and r8 calls are distinct (ie. subsequent calls will only be affected by calls of the same precision). This behaviour can be changed via the `save_both_kinds` optional argument to `tri_invert`.
- CODE_STYLE: has been updated to reflect the formatting used for the mixed precision support updates.

### Fixed
- DIAG_MANAGER: Tile number (ie. tileX) will now be added to filenames for sub-regional diagnostics.
- MPP: Bug affecting non-intel compilers coming from uninitialized pointer in the `nest_domain_type`
- MPP: Bug fix for unallocated field causing seg faults in `mpp_check_field`
- FMS2_IO: Fixed segfault occuring from use of cray pointer remapping along with mpp_scatter/gather
- TEST_FMS: Added various fixes for different compilers within test programs for fms2_io, mpp, diag_manager, parser, and sat_vapor_pres.
- INTERPOLATOR: Deallocates fields in the type that were previously left out in `interpolator_end`

### Removed
- CPP MACROS:
- `no_4byte_reals` was removed and will not set any additional macros if used. `no_8byte_integers` is still functional.
- `NO_QUAD_PRECISION` was removed. It was conditionally set if ENABLE_QUAD_PRECISION was undefined. ENABLE_QUAD_PRECISION should be used in model components instead (logic is flipped)
- `use_netCDF` was set by autotools previously but wasn't consistently used in the code. FMS should always be compiled with netcdf installed so this was removed with the exception of its use in deprecated IO modules.
- DRIFTERS: The drifters subdirectory has been deprecated. It will only be compiled if using the `-Duse_drifters` CPP flag.

### Tag Commit Hashes
- 2023.03-beta1 06b94a7f574e7794684b8584391744ded68e2989
- 2023.03-alpha3 b25a7c52a27dfd52edc10bc0ebe12776af0f03df
- 2023.03-alpha2 9983ce308e62e9f7215b04c227cebd30fd75e784
- 2023.03-alpha1 a46bd94fd8dd1f6f021501e29179003ff28180ec


## [2023.02.01] - 2023-10-13
### Fixed
- DIAG_MANAGER: Fixes issue with incorrect start_time functionality


## [2023.02] - 2023-07-27
### Known Issues
- GCC 11.1.0 is unsupported due to compilation issues with select type. The issue is resolved in later GCC releases.
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ set(CMAKE_Fortran_FLAGS_DEBUG)

# Define the CMake project
project(FMS
VERSION 2023.02.0
VERSION 2023.04.0
DESCRIPTION "GFDL FMS Library"
HOMEPAGE_URL "https://www.gfdl.noaa.gov/fms"
LANGUAGES C Fortran)
Expand Down Expand Up @@ -349,7 +349,7 @@ foreach(kind ${kinds})
if ( CMAKE_Fortran_COMPILER_VERSION MATCHES "1[0-9]\.[0-9]*\.[0-9]*" AND CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
if(MPI_C_COMPILER MATCHES ".*mpich.*" )
message(STATUS "Adding -fallow-argument-mismatch flag to compile with GCC >=10 and MPICH")
set_target_properties(${libTgt}_f PROPERTIES COMPILE_FLAGS "-fallow-argument-mismatch -w")
target_compile_options(${libTgt}_f PRIVATE "-fallow-argument-mismatch;-w")
endif()
endif()

Expand Down
21 changes: 19 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = FMS.pc

## Build libFMS module
AM_CPPFLAGS = -I${top_srcdir}/include -I${top_srcdir}/mpp/include
AM_CPPFLAGS = -I${top_srcdir}/include
AM_FCFLAGS = $(FC_MODINC). $(FC_MODOUT)$(MODDIR)

noinst_LTLIBRARIES = libFMS_mod.la
libFMS_mod_la_SOURCES = libFMS.F90

fms.$(FC_MODEXT): .mods/*_mod.$(FC_MODEXT)

nodist_include_HEADERS = libFMS_mod.la
nodist_include_HEADERS = .mods/fms.$(FC_MODEXT)

include $(top_srcdir)/mkmods.mk

Expand Down Expand Up @@ -130,3 +130,20 @@ else
clean-local:
-rm -rf .mods
endif

install-data-hook:
@echo ''
@echo '+-------------------------------------------------------------+'
@echo '| Congratulations! You have successfully installed the FMS |'
@echo '| Fortran library. |'
@echo '| |'
@echo '| After the installed include and link paths have been |'
@echo '| specified, code using FMS should be compiled using the |'
@echo '| "-lFMS" flag. |'
@echo '| |'
@echo '| FMS is developed and maintained at the GFDL publicly on |'
@echo '| Github. To report an issue or view available documentation, |'
@echo '| please see our page: https://www.github.com/NOAA-GFDL/FMS |'
@echo '+-------------------------------------------------------------+'
@echo ''

6 changes: 3 additions & 3 deletions affinity/fms_affinity.F90
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ subroutine fms_affinity_init()
!--- local variables
integer:: io_stat
integer:: ierr
integer:: unit
integer:: iunit

!--- return if module is initialized
if (module_is_initialized) return
Expand All @@ -105,8 +105,8 @@ subroutine fms_affinity_init()

!--- output information to logfile
call write_version_number("fms_affinity_mod", version)
unit = stdlog()
write(unit,nml=fms_affinity_nml)
iunit = stdlog()
write(iunit,nml=fms_affinity_nml)

module_is_initialized = .TRUE.

Expand Down
8 changes: 4 additions & 4 deletions amip_interp/amip_interp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ module amip_interp_mod
! ---- global unit & date ----

integer, parameter :: maxc = 128
integer :: unit
integer :: iunit
character(len=maxc) :: file_name_sst, file_name_ice
type(FmsNetcdfFile_t), target :: fileobj_sst, fileobj_ice

Expand Down Expand Up @@ -367,7 +367,7 @@ module amip_interp_mod

!> initialize @ref amip_interp_mod for use
subroutine amip_interp_init
integer :: unit,io,ierr
integer :: iunit,io,ierr

!-----------------------------------------------------------------------

Expand All @@ -381,9 +381,9 @@ subroutine amip_interp_init
! ----- write namelist/version info -----
call write_version_number("AMIP_INTERP_MOD", version)

unit = stdlog ( )
iunit = stdlog ( )
if (mpp_pe() == 0) then
write (unit,nml=amip_interp_nml)
write (iunit,nml=amip_interp_nml)
endif

if (use_mpp_io) then
Expand Down
6 changes: 3 additions & 3 deletions amip_interp/include/amip_interp.inc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ subroutine GET_AMIP_SST_ (Time, Interp, sst, err_msg, lon_model, lat_model)
! end add by JHC
logical, parameter :: DEBUG = .false. !> switch for debugging output
!> These are fms_io specific
integer :: unit
integer :: iunit
integer, parameter :: lkind = FMS_AMIP_INTERP_KIND_

if(present(err_msg)) err_msg = ''
Expand Down Expand Up @@ -103,7 +103,7 @@ if ( .not.use_daily ) then
Date2 = date_type( year2, month2, 0 )

! -- open/rewind file --
unit = -1
iunit = -1
!-----------------------------------------------------------------------

if (Date1 /= Interp%Date1) then
Expand Down Expand Up @@ -368,7 +368,7 @@ else
Date1 = date_type( year1, month1, 0 )
Date2 = date_type( year2, month2, 0 )

unit = -1
iunit = -1
!-----------------------------------------------------------------------

if (Date1 /= Interp%Date1) then
Expand Down
6 changes: 3 additions & 3 deletions astronomy/astronomy.F90
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ subroutine astronomy_init (latb, lonb)
!-------------------------------------------------------------------
! local variables:
!-------------------------------------------------------------------
integer :: unit, ierr, io, seconds, days, jd, id
integer :: iunit, ierr, io, seconds, days, jd, id
character(len=17) :: err_str

!-------------------------------------------------------------------
Expand All @@ -463,8 +463,8 @@ subroutine astronomy_init (latb, lonb)
!---------------------------------------------------------------------
call write_version_number("ASTRONOMY_MOD", version)
if (mpp_pe() == mpp_root_pe() ) then
unit = stdlog()
write (unit, nml=astronomy_nml)
iunit = stdlog()
write (iunit, nml=astronomy_nml)
endif
!--------------------------------------------------------------------
!> Be sure input values are within valid ranges.
Expand Down
Loading

0 comments on commit ffadb8c

Please sign in to comment.