Skip to content

Commit 77897cf

Browse files
author
Jesse Lentz
committed
Merge remote-tracking branch 'origin/main' into general_indices_mpp_global_field_impl
2 parents c95f694 + 1b81f1a commit 77897cf

35 files changed

Lines changed: 1180 additions & 561 deletions
Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# 'main' required ci, does a distcheck (builds, tests, check install)
2-
# image created off dockerfile in repo, compile/link flags are set there
3-
name: Build libFMS test with autotools
1+
name: Autotools build and unit testing with GCC
42

53
on: [push, pull_request]
64

@@ -14,31 +12,38 @@ jobs:
1412
runs-on: ubuntu-latest
1513
strategy:
1614
matrix:
17-
conf-flag: [ --disable-openmp, --disable-setting-flags, --with-mpi=no, --disable-r8-default]
15+
conf-flag: [ --disable-openmp, --with-mpi=no, --disable-r8-default]
1816
input-flag: [--with-yaml, --enable-test-input=/home/unit_tests_input]
1917
exclude:
2018
- conf-flag: --with-mpi=no
2119
input-flag: --enable-test-input=/home/unit_tests_input
2220
container:
23-
image: ghcr.io/noaa-gfdl/fms/fms-ci-rocky-gnu:13.2.0
21+
image: ghcr.io/noaa-gfdl/fms/fms-ci-rocky-gnu:15.1.0
2422
env:
25-
TEST_VERBOSE: 1
26-
DISTCHECK_CONFIGURE_FLAGS: "${{ matrix.conf-flag }} ${{ matrix.input-flag }} ${{ matrix.io-flag }}"
23+
DISTCHECK_CONFIGURE_FLAGS: "${{ matrix.conf-flag }} ${{ matrix.input-flag }}"
2724
DEBUG_FLAGS: "-O0 -g -fbounds-check -ffpe-trap=invalid,zero,overflow" # debug compiler flags taken from the mkmf template
25+
# diag manager openmp + logical mask tests fail with gcc, these are reproducible outside the CI
26+
# test_mpp_clock_begin_end_id is an expected fail that is passing, only happens in the CI
27+
# test_time_interp2 tests fail from file issues, only happens in the CI
28+
SKIP_TESTS: "test_time_none.10 test_time_sum.10 test_time_avg.10 test_time_min.10 test_time_max.10 test_time_pow.10 test_time_rms.10 test_mpp_clock_begin_end_id.10 test_time_interp2.7 test_time_interp2.8"
2829
steps:
2930
- name: Checkout code
30-
uses: actions/checkout@v4.2.2
31+
uses: actions/checkout@v6.0.1
3132
- name: Prepare GNU autoconf for build
3233
run: autoreconf -if
3334
- name: Configure the build
34-
if: ${{ matrix.conf-flag != '--disable-setting-flags' }}
35-
run: ./configure ${DISTCHECK_CONFIGURE_FLAGS} FCFLAGS="$FCFLAGS $DEBUG_FLAGS"
36-
- name: Configure the build with compiler flags
37-
if: ${{ matrix.conf-flag == '--disable-setting-flags' }}
38-
run: ./configure ${DISTCHECK_CONFIGURE_FLAGS} FCFLAGS="-fdefault-real-8 -fdefault-double-8 -fcray-pointer -ffree-line-length-none -I/usr/include $FCFLAGS $DEBUG_FLAGS" || cat config.log
39-
- name: Build the library
40-
run: make distcheck
35+
run: ./configure ${DISTCHECK_CONFIGURE_FLAGS} FCFLAGS="$FCFLAGS $DEBUG_FLAGS" || cat config.log
36+
- name: Run distcheck (compiles, tests, and packages)
37+
run: make distcheck 2>&1 > distcheck.log
4138
if: ${{ matrix.conf-flag != '--with-mpi=no' }}
39+
- name: Output errors on failure
40+
run: grep -E "^FAIL:|^XPASS:" distcheck.log
41+
if: failure()
42+
- name: Upload log on failure
43+
uses: actions/upload-artifact@v7.0.0
44+
if: failure()
45+
with:
46+
path: distcheck.log
4247
- name: Build the library (without test suite for serial build)
4348
run: make
4449
if: ${{ matrix.conf-flag == '--with-mpi=no' }}

.github/workflows/github_autotools_intel_classic.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
name: Autotools build and unit testing with Intel Classic (weekly)
2+
13
on:
24
schedule:
35
- cron: '0 0 * * 0' # sundays @ midnight
46

5-
67
# cancel running jobs if theres a newer push
78
concurrency:
89
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/github_autotools_intel_oneapi.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Autotools build and unit testing with Intel Oneapi
2+
13
on: pull_request
24

35
# cancel running jobs if theres a newer push

.github/workflows/github_cmake_gnu.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build libFMS with cmake
1+
name: CMake build and unit testing with GCC
22

33
on: [push, pull_request]
44

@@ -15,19 +15,19 @@ jobs:
1515
libyaml-flag: [ "", -DWITH_YAML=on ]
1616
build-type: [ "-DCMAKE_BUILD_TYPE=Release", "-DCMAKE_BUILD_TYPE=Debug" ]
1717
container:
18-
image: ghcr.io/noaa-gfdl/fms/fms-ci-rocky-gnu:13.2.0
18+
image: ghcr.io/noaa-gfdl/fms/fms-ci-rocky-gnu:15.1.0
1919
env:
2020
CMAKE_FLAGS: "${{ matrix.build-type }} ${{ matrix.libyaml-flag }}"
21-
EXCLUDE_TESTS: "test_mpp_nesting|test_bc_restart|test_collective_io|test_fms2_io|test_io_with_mask"
21+
EXCLUDE_TESTS: "test_mpp_nesting|test_mpp_clock_begin_end_id|test_time_*"
2222
PKG_CONFIG_PATH: "/opt/views/view/lib64/pkgconfig:/opt/views/view/lib/pkgconfig:/opt/views/view/share/pkgconfig"
2323
steps:
2424
- name: Checkout code
25-
uses: actions/checkout@v4.2.2
25+
uses: actions/checkout@v6.0.1
2626
- name: Generate makefiles with CMake
2727
run: |
2828
mkdir build
2929
cd build
30-
cmake $CMAKE_FLAGS -DOPENMP=on -DUNIT_TESTS=on -DNetCDF_ROOT=/opt/view -DLIBYAML_ROOT=/opt/view ..
30+
cmake -DOVERSUBSCRIBE_FLAG="--map-by :OVERSUBSCRIBE" $CMAKE_FLAGS -DOPENMP=on -DNetCDF_ROOT=/opt/view -DLIBYAML_ROOT=/opt/view -DUNIT_TESTS=on ..
3131
- name: Build the library
3232
run: make -C build
3333
- name: Run the unit tests
@@ -40,10 +40,10 @@ jobs:
4040
libyaml-flag: [ "", -DWITH_YAML=on ]
4141
build-type: [ "-DCMAKE_BUILD_TYPE=Release", "-DCMAKE_BUILD_TYPE=Debug" ]
4242
container:
43-
image: ghcr.io/noaa-gfdl/fms/fms-ci-rocky-gnu:13.2.0-arm
43+
image: ghcr.io/noaa-gfdl/fms/fms-ci-rocky-gnu:13.2.0-arm-cmake-update
4444
env:
4545
CMAKE_FLAGS: "${{ matrix.build-type }} ${{ matrix.libyaml-flag }}"
46-
EXCLUDE_TESTS: "test_mpp_nesting|test_bc_restart|test_collective_io|test_fms2_io|test_io_with_mask|test_sat_vapor_pres"
46+
EXCLUDE_TESTS: "test_mpp_nesting|test_sat_vapor_pres|test_mpp_clock_begin_end_id"
4747
PKG_CONFIG_PATH: "/opt/views/view/lib64/pkgconfig:/opt/views/view/lib/pkgconfig:/opt/views/view/share/pkgconfig"
4848
steps:
4949
- name: Checkout code
@@ -52,7 +52,7 @@ jobs:
5252
run: |
5353
mkdir build
5454
cd build
55-
cmake $CMAKE_FLAGS -DOPENMP=on -DUNIT_TESTS=on -DNetCDF_ROOT=/opt/view -DLIBYAML_ROOT=/opt/view ..
55+
cmake $CMAKE_FLAGS -DOVERSUBSCRIBE_FLAG="" -DOPENMP=on -DUNIT_TESTS=on -DNetCDF_ROOT=/opt/view -DLIBYAML_ROOT=/opt/view ..
5656
- name: Build the library
5757
run: make -C build
5858
- name: Run the unit tests

.github/workflows/github_coupler_gnu.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test coupler build
1+
name: FMScoupler null model build with GCC
22
on: [pull_request]
33

44
# cancel running jobs if theres a newer push
@@ -10,7 +10,7 @@ jobs:
1010
coupler-build:
1111
runs-on: ubuntu-latest
1212
container:
13-
image: ghcr.io/noaa-gfdl/fms/fms-ci-rocky-gnu:13.2.0
13+
image: ghcr.io/noaa-gfdl/fms/fms-ci-rocky-gnu:15.1.0
1414
credentials:
1515
username: ${{ github.actor }}
1616
password: ${{ secrets.github_token }}

.github/workflows/github_linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: libFMS lint tests
1+
name: Line length and whitespace linter
22

33
on: [push, pull_request]
44

.github/workflows/github_mom_gnu.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run MOM6 test suite
1+
name: MOM6 test suite with GCC
22

33
# runs on PR's or when manually triggered
44
on: [workflow_dispatch, pull_request]
@@ -11,17 +11,14 @@ concurrency:
1111
jobs:
1212
build:
1313
runs-on: ubuntu-latest
14-
container:
15-
image: ghcr.io/noaa-gfdl/fms/fms-ci-rocky-gnu:13.2.0
16-
credentials:
17-
username: ${{ github.actor }}
18-
password: ${{ secrets.github_token }}
1914
steps:
2015
- name: Checkout MOM6 repository
2116
uses: actions/checkout@v4.2.2
2217
with:
2318
repository: 'NOAA-GFDL/MOM6'
2419
submodules: recursive
20+
- name: Install dependency packages
21+
uses: ./.github/actions/ubuntu-setup/
2522
- name: Checkout FMS into MOM build
2623
uses: actions/checkout@v4.2.2
2724
with:

.github/workflows/version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# appends -dev to the version upon release and opens pr
21
# CI won't run on generated PR, easiest workaround is to close + reopen
2+
name: Append version number and create PR
33
on:
44
release:
55
types: [published]

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ option(PORTABLE_KINDS "Enable compiler definition -DPORTABLE_KINDS"
6565
option(GFS_PHYS "Enable compiler definition -DGFS_PHYS" OFF)
6666
option(WITH_YAML "Enable compiler definition -Duse_yaml" OFF)
6767

68+
# Testing-specific options
69+
set(OVERSUBSCRIBE_FLAG " --oversubscribe " CACHE STRING "Flag for mpirun to use more cores than available")
70+
6871
if(32BIT)
6972
list(APPEND kinds "r4")
7073
message(STATUS "Building library with 4-byte real defaults (with mixed precision real support for most modules).")
@@ -586,6 +589,9 @@ include(CTest)
586589
set(MPI_LAUNCHER "mpirun")
587590
# used in the test-lib.sh.in to make it behave differently when parsed by cmake
588591
set(USING_CMAKE "true")
592+
set(OVERSUBSCRIBE "${OVERSUBSCRIBE_FLAG}")
593+
message(STATUS "Using '${OVERSUBSCRIBE}' flag to oversubscribe ranks in test scripts")
594+
589595
# set the fms library to link tests with based on whats built
590596
if(NOT kinds)
591597
set(fmsLibraryName FMS::fms)
@@ -717,6 +723,7 @@ if(UNIT_TESTS)
717723
test_fms/mpp/test_mpp_domains.F90
718724
test_fms/mpp/test_mpp.F90
719725
test_fms/mpp/test_mpp_gatscat.F90
726+
test_fms/mpp/test_mpp_pelist_gatscat_gen_ind.F90
720727
test_fms/mpp/test_mpp_get_ascii_lines.F90
721728
test_fms/mpp/test_mpp_global_field_ug.F90
722729
test_fms/mpp/test_mpp_global_sum_ad.F90

configure.ac

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ AC_PREREQ([2.69])
2424

2525
# Initialize with name, version, and support email address.
2626
AC_INIT([GFDL FMS Library],
27-
[2026.01.01],
27+
[2026.01.01-dev],
2828
[gfdl.climate.model.info@noaa.gov],
2929
[FMS],
3030
[https://www.github.com/NOAA-GFDL/FMS])
@@ -392,9 +392,12 @@ fi
392392
AC_CHECK_PROGS([MPI_LAUNCHER],[srun aprun mpirun])
393393

394394
# Check if the launcher can oversubscribe the MPI processes
395-
AS_IF([$MPI_LAUNCHER --oversubscribe hostname >/dev/null 2>&1], \
395+
AS_IF([$MPI_LAUNCHER --oversubscribe nproc >/dev/null 2>&1], \
396396
[ AC_SUBST([OVERSUBSCRIBE], [--oversubscribe])])
397397

398+
# newer openmpi versions take a different flag
399+
AS_IF([$MPI_LAUNCHER --map-by :OVERSUBSCRIBE nproc >/dev/null 2>&1], \
400+
[ AC_SUBST([OVERSUBSCRIBE], [--map-by :OVERSUBSCRIBE])])
398401

399402
# Compiler with version information. This consists of the full path
400403
# name of the compiler and the reported version number.

0 commit comments

Comments
 (0)