Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into gc_2
Browse files Browse the repository at this point in the history
  • Loading branch information
rem1776 authored and rem1776 committed Jul 13, 2023
2 parents 00b7ed8 + 7831d2e commit f20f849
Show file tree
Hide file tree
Showing 135 changed files with 18,273 additions and 12,670 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/github_autotools_gnu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
conf-flags: [--disable-openmp, --enable-mixed-mode, --disable-setting-flags, --with-mpi=no]
input-flag: [--with-yaml, --enable-test-input=/home/fms_test_input]
conf-flag: [--disable-openmp, --enable-mixed-mode, --with-mpi=no]
input-flag: [--with-yaml, --enable-test-input=/home/unit_tests_input]
io-flag: [ --enable-deprecated-io, --disable-deprecated-io]
exclude:
- conf-flag: --with-mpi=no
input-flag: --enable-test-input=/home/unit_tests_input
container:
image: ryanmulhall/fms-ci-rocky-gnu:12.2.0
env:
TEST_VERBOSE: 1
DISTCHECK_CONFIGURE_FLAGS: "${{ matrix.conf-flags }} ${{ matrix.input-flag }}"
DISTCHECK_CONFIGURE_FLAGS: "${{ matrix.conf-flag }} ${{ matrix.input-flag }} ${{ matrix.io-flag }}"
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Prepare GNU autoconf for build
run: autoreconf -if
- name: Configure the build
if: ${{ matrix.conf-flags != '--disable-setting-flags' }}
run: ./configure ${DISTCHECK_CONFIGURE_FLAGS}
- name: Configure the build with explicit required flags
if: ${{ matrix.conf-flags == '--disable-setting-flags' }}
run: ./configure ${DISTCHECK_CONFIGURE_FLAGS} FCFLAGS="-fdefault-real-8 -fdefault-double-8 -fcray-pointer -ffree-line-length-none -I/opt/view/include $FCFLAGS"
- name: Build the library
run: make -k distcheck
if: ${{ matrix.conf-flags != '--with-mpi=no' }}
run: make distcheck
if: ${{ matrix.conf-flag != '--with-mpi=no' }}
- name: Build the library (without test suite for serial build)
run: make
if: ${{ matrix.conf-flags == '--with-mpi=no' }}
if: ${{ matrix.conf-flag == '--with-mpi=no' }}
6 changes: 3 additions & 3 deletions .github/workflows/github_autotools_intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs:
intel-autotools:
runs-on: ubuntu-latest
container:
image: intel/oneapi-hpckit:2022.2-devel-ubuntu20.04
image: intel/oneapi-hpckit:2023.1.0-devel-ubuntu20.04
env:
CC: mpiicc
FC: mpiifort
Expand All @@ -22,7 +22,7 @@ jobs:
path: /libs
key: ${{ runner.os }}-intel-libs
- name: Install packages for building
run: apt update && apt install -y autoconf libtool automake zlibc zlib1g-dev
run: apt-get update && apt-get install -y autoconf libtool automake zlibc zlib1g-dev
- if: steps.cache.outputs.cache-hit != 'true'
name: Build netcdf
run: |
Expand Down Expand Up @@ -50,4 +50,4 @@ jobs:
- name: Compile
run: make -j || make
- name: Run test suite
run: make check LD_LIBRARY_PATH="/libs/lib:$LD_LIBRARY_PATH" SKIP_TESTS="$SKIP_TESTS" VERBOSE=1
run: make check LD_LIBRARY_PATH="/libs/lib:$LD_LIBRARY_PATH" TEST_VERBOSE=1
3 changes: 2 additions & 1 deletion .github/workflows/github_cmake_gnu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ jobs:
matrix:
omp-flags: [ -DOPENMP=on, -DOPENMP=off ]
libyaml-flag: [ "", -DWITH_YAML=on ]
io-flag: [ "", -DUSE_DEPRECATED_IO=on ]
container:
image: noaagfdl/hpc-me.ubuntu-minimal:cmake
env:
CMAKE_FLAGS: "${{ matrix.omp-flags }} ${{ matrix.libyaml-flag }} -D64BIT=on"
CMAKE_FLAGS: "${{ matrix.omp-flags }} ${{ matrix.io-flag }} ${{ matrix.libyaml-flag }} -D64BIT=on"
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down
28 changes: 23 additions & 5 deletions .github/workflows/github_doc_site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
types: [published]
workflow_dispatch:
jobs:
update_docs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -23,8 +23,26 @@ jobs:
run: |
sudo apt -y install doxygen graphviz
doxygen gen_docs/Doxyfile
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./gen_docs/html
path: 'gen_docs/html'
deploy:
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,58 @@ 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.01.01] - 2023-06-06
### Changed
- FMS2_IO: Performance changes for domain_reads_2d and domain_reads_3d:
- Root pe reads the data
- Uses mpp_scatter to send the data to the other pes
- Added unit tests to test all of the domain_read/domain_write interfaces

- FMS2_IO: Performance changes for compressed_writes_1d/2d/3d
- Uses mpp_gather to get data for write
- Added unit tests to test all of the compressed writes interfaces
- Compressed_writes_4d/5d were unchanged

- FMS2_IO: Extended mpp_scatter and mpp_gather to work for int8; added a kludge for scatter since the data is assumed to be (x,y,z)


## [2023.01] - 2023-04-03
### Known Issues
- If using GCC 10 or higher as well as MPICH, compilation errors will occur unless `-fallow-argument-mismatch` is included in the Fortran compiler flags(the flag will now be added automatically if building with autotools or CMake).
- GCC 11.1.0 is unsupported due to compilation issues with select type. The issue is resolved in later GCC releases.
- When outputting sub-region diagnostics, the current diag_manager does not add "tileX" to the filename when using a cube sphere. This leads to trouble when trying to combine the files and regrid them (if the region is in two different tiles)

### Added
- DIAG_MANAGER: Added code refactored as part of larger diag_manager rewrite for the send_data routines. The refactored code is disabled by default and enabled by setting `use_refactored_send` to true in the diag_manager_nml, and should mirror current behaviour.
- FMS2_IO: Added the ability to set deflate_level and shuffle netcdf options in `fms2_io_nml`. Also added functionality for registering dimensions as unlimited compressed.
- YAML_PARSER: Added support for emitting multiple tabbed section keys to allow diag manager yaml output

### Changed
- STRING_UTILS: Extended the `string` interface in fms_string_utils_mod to accept reals of 4 or 8 kind, as well as 1, 2, and 3 dimensional real arrays
- DIAG_MANAGER: Changed the `log_diag_field_info` routine to allow for specifying seperator
- INTERPOLATOR(s): In horiz_interp, amip_interp and interpolator, changed pointers arrays into allocatables

### Fixed
- TRIDIAGONAL: Added OMP directives to prevent race conditions
- DIAG_MANAGER: Added `diag_send_data` routine to fix class(\*) related compiler issues from the refactor update
- SAT_VAPOR_PRES_K: Removed implied saves causing issues with class(\*) type checking
- TIME_INTERP: Fixed naming conflicts between module level and local variables
- YAML_PARSER: Fixed typo in variable name, rename variables to avoid fortran keywords
- DOCS: Fixed incorrect serial build instructions
- COMPILER SUPPORT: Fixed compilation errors with Intel's llvm-based compiler and added support for the CMake build. Also fixed mpp_checksum unit test failures with openmpi and nvhpc compilation issues.
- TIME_MANAGER: Fixed an bug from PR #1169 that was causing answer changes in land models

### Tag Commit Hashes
- 2023.01-beta4 (63626578cb8ed4bed1ce670b88acd6a1ec438e32)
- 2023.01-beta3 (0ff254e409b74d7d17ab234abe5ecd985967256c)
- 2023.01-beta2 (74d8e734bd43b0ce043003da74896e5d747afc2f)
- 2023.01-beta1 (6255971af28381fad22547bdc2c538fc3ea2e8bf)
- 2023.01-alpha4 (4526cc94a3e19fe8fa151f54b0db432e1fb2f7d0)
- 2023.01-alpha3 (f0e8cab3d8e58195f7c2663b84fd0bed12fa8b64)
- 2023.01-alpha2 (91e732473f7cffce070f9ce239f8ffa22c081261)
- 2023.01-alpha1 (203c8bf464ff26fe0fe39b1451caedd026bbce55)


## [2022.04] - 2022-10-13
### Known Issues
- If using GCC 10 or higher as well as MPICH, compilation errors will occur unless `-fallow-argument-mismatch` is included in the Fortran compiler flags(the flag will now be added automatically if building with autotools or CMake).
Expand Down
16 changes: 14 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 2022.04.0
VERSION 2023.01.0
DESCRIPTION "GFDL FMS Library"
HOMEPAGE_URL "https://www.gfdl.noaa.gov/fms"
LANGUAGES C Fortran)
Expand Down Expand Up @@ -66,6 +66,7 @@ option(ENABLE_QUAD_PRECISION "Enable compiler definition -DENABLE_QUAD_PRECISION
option(GFS_PHYS "Enable compiler definition -DGFS_PHYS" OFF)
option(LARGEFILE "Enable compiler definition -Duse_LARGEFILE" OFF)
option(WITH_YAML "Enable compiler definition -Duse_yaml" OFF)
option(USE_DEPRECATED_IO "Enable compiler definition -Duse_deprecated_io (compile with fms_io/mpp_io)" OFF)

if(32BIT)
list(APPEND kinds "r4")
Expand Down Expand Up @@ -246,6 +247,10 @@ if(WITH_YAML)
list(APPEND fms_defs use_yaml)
endif()

if(USE_DEPRECATED_IO)
list(APPEND fms_defs use_deprecated_io)
endif()

if(INTERNAL_FILE_NML)
list(APPEND fms_defs INTERNAL_FILE_NML)
endif()
Expand Down Expand Up @@ -295,12 +300,16 @@ foreach(kind ${kinds})

target_include_directories(${libTgt}_f PRIVATE include
fms
fms/include
fms2_io/include
string_utils/include
mpp/include
sat_vapor_pres/include
horiz_interp/include
diag_manager/include
constants4
constants)
constants
axis_utils/include)
target_compile_definitions(${libTgt}_f PRIVATE "${fms_defs}")
target_compile_definitions(${libTgt}_f PRIVATE "${${kind}_defs}")

Expand Down Expand Up @@ -334,7 +343,10 @@ foreach(kind ${kinds})
target_include_directories(${libTgt} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/fms>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/fms/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/fms2_io/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/sat_vapor_pres/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/horiz_interp/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/string_utils/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/mpp/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/diag_manager/include>)
Expand Down
5 changes: 4 additions & 1 deletion amip_interp/amip_interp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,10 @@ subroutine read_record (type, Date, Adate, dat)
else
call fms2_io_read_data(fileobj, ncfieldname, dat, unlim_dim_level=k)
endif
idat = nint(dat, I2_KIND) ! reconstruct packed data for reproducibility
!TODO This assumes that the data is "packed" (has the scale_factor and add_offset attributes)
! in fms2_io_read_data the data is unpacked (data_in_file*scale_factor + add_offset)
! the line below "packs" the data again. This is needed for reproducibility
idat = nint(dat*100., I2_KIND)

!---- unpacking of data ----

Expand Down
12 changes: 10 additions & 2 deletions axis_utils/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,23 @@
# Ed Hartnett 2/22/19

# Include .h and .mod files.
AM_CPPFLAGS = -I$(top_srcdir)/include
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/axis_utils/include
AM_FCFLAGS = $(FC_MODINC). $(FC_MODOUT)$(MODDIR)

# Build this uninstalled convenience library.
noinst_LTLIBRARIES = libaxis_utils.la

libaxis_utils_la_SOURCES = \
axis_utils.F90 \
axis_utils2.F90
axis_utils2.F90 \
include/axis_utils2_r4.fh \
include/axis_utils2_r8.fh \
include/axis_utils2.inc

axis_utils2.$(FC_MODEXT) : \
include/axis_utils2_r4.fh \
include/axis_utils2_r8.fh \
include/axis_utils2.inc

# Mod file depends on its o file, is built and then installed.
nodist_include_HEADERS = axis_utils_mod.$(FC_MODEXT) axis_utils2_mod.$(FC_MODEXT)
Expand Down
3 changes: 2 additions & 1 deletion axis_utils/axis_utils.F90
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
!> @addtogroup axis_utils_mod
!> @{
module axis_utils_mod
#ifdef use_deprecated_io
use netcdf
use mpp_io_mod, only: axistype, atttype, default_axis, default_att, &
mpp_get_atts, mpp_get_axis_data, mpp_modify_meta, &
Expand Down Expand Up @@ -787,7 +788,7 @@ subroutine find_index(grid1, xs, xe, ks, ke)
if(ke == 0 ) call mpp_error(FATAL,' xe locate outside of grid1')

end subroutine find_index

#endif
end module axis_utils_mod
!> @}
! close documentation grouping
Loading

0 comments on commit f20f849

Please sign in to comment.