Skip to content

Commit

Permalink
Merge branch 'mom-ocean:main' into dev/gfdl
Browse files Browse the repository at this point in the history
  • Loading branch information
hdrake authored Aug 14, 2024
2 parents a33588f + aacb909 commit a9a14e7
Show file tree
Hide file tree
Showing 299 changed files with 50,613 additions and 24,337 deletions.
17 changes: 16 additions & 1 deletion .github/actions/macos-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,24 @@ runs:
shell: bash
run: |
echo "::group::Install packages"
brew update
brew reinstall gcc
brew install automake
brew install netcdf
brew install netcdf-fortran
brew install mpich
echo "::endgroup::"
# NOTE: Floating point exceptions are currently disabled due to an error in
# HDF5 1.4.3. They will be re-enabled when the default brew version has
# been updated to a working version.

- name: Set compiler flags
shell: bash
run: |
cd .testing
echo "FCFLAGS_DEBUG = -g -O0 -Wextra -Wno-compare-reals -fbacktrace -fcheck=bounds" >> config.mk
echo "FCFLAGS_REPRO = -g -O2 -fbacktrace" >> config.mk
echo "FCFLAGS_INIT = -finit-real=snan -finit-integer=2147483647 -finit-derived" >> config.mk
echo "FCFLAGS_FMS = -g -fbacktrace -O0" >> config.mk
cat config.mk
echo "::endgroup::"
25 changes: 1 addition & 24 deletions .github/actions/testing-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ inputs:
description: 'If true, will build the symmetric MOM6 executable'
required: false
default: 'true'
install_python:
description: 'If true, will install the local python env needed for .testing'
required: false
default: 'true'
runs:
using: 'composite'
steps:
Expand All @@ -32,18 +28,7 @@ runs:
run: |
echo "::group::Compile FMS library"
cd .testing
REPORT_ERROR_LOGS=true make deps/lib/libFMS.a -s -j
echo "::endgroup::"
- name: Store compiler flags used in Makefile
shell: bash
run: |
echo "::group::config.mk"
cd .testing
echo "FCFLAGS_DEBUG=-g -O0 -Wextra -Wno-compare-reals -fbacktrace -ffpe-trap=invalid,zero,overflow -fcheck=bounds" >> config.mk
echo "FCFLAGS_REPRO=-g -O2 -fbacktrace" >> config.mk
echo "FCFLAGS_INIT=-finit-real=snan -finit-integer=2147483647 -finit-derived" >> config.mk
cat config.mk
REPORT_ERROR_LOGS=true make build/deps/lib/libFMS.a -s -j
echo "::endgroup::"
- name: Compile MOM6 in symmetric memory mode
Expand All @@ -54,14 +39,6 @@ runs:
test ${{ inputs.build_symmetric }} == true && make build/symmetric/MOM6 -j
echo "::endgroup::"
- name: Install local python venv for generating input data
shell: bash
run: |
echo "::group::Create local python env for input data generation"
cd .testing
test ${{ inputs.install_python }} == true && make work/local-env
echo "::endgroup::"
- name: Set flags
shell: bash
run: |
Expand Down
12 changes: 12 additions & 0 deletions .github/actions/ubuntu-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,15 @@ runs:
sudo apt-get install libopenmpi-dev
sudo apt-get install linux-tools-common
echo "::endgroup::"
- name: Store compiler flags used in Makefile
shell: bash
run: |
echo "::group::config.mk"
cd .testing
echo "FCFLAGS_DEBUG = -g -O0 -Wextra -Wno-compare-reals -fbacktrace -ffpe-trap=invalid,zero,overflow -fcheck=bounds" >> config.mk
echo "FCFLAGS_REPRO = -g -O2 -fbacktrace" >> config.mk
echo "FCFLAGS_INIT = -finit-real=snan -finit-integer=2147483647 -finit-derived" >> config.mk
echo "FCFLAGS_FMS = -g -fbacktrace -O0" >> config.mk
cat config.mk
echo "::endgroup::"
7 changes: 1 addition & 6 deletions .github/workflows/coupled-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
working-directory: .testing

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive

Expand All @@ -20,7 +20,6 @@ jobs:
- uses: ./.github/actions/testing-setup
with:
build_symmetric: 'false'
install_python: 'false'

- name: Compile MOM6 for the GFDL coupled driver
shell: bash
Expand All @@ -29,7 +28,3 @@ jobs:
- name: Compile MOM6 for the NUOPC driver
shell: bash
run: make check_mom6_api_nuopc -j

- name: Compile MOM6 for the MCT driver
shell: bash
run: make check_mom6_api_mct -j
30 changes: 15 additions & 15 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,38 @@ jobs:
working-directory: .testing

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: ./.github/actions/ubuntu-setup

- uses: ./.github/actions/testing-setup

- name: Compile unit testing
run: make -j build/unit/MOM_unit_tests
- name: Compile file parser unit tests
run: make -j build/unit/test_MOM_file_parser

- name: Run unit tests
- name: Run file parser unit tests
run: make run.cov.unit

- name: Report unit test coverage to CI (PR)
if: github.event_name == 'pull_request'
run: make report.cov.unit REQUIRE_COVERAGE_UPLOAD=true
- name: Compile unit testing
run: make -j build.unit

- name: Run (single processor) unit tests
run: make run.unit

- name: Report unit test coverage to CI (Push)
if: github.event_name != 'pull_request'
- name: Report unit test coverage to CI
run: make report.cov.unit
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Compile ocean-only MOM6 with code coverage
run: make -j build/cov/MOM6

- name: Run coverage tests
run: make -j -k run.cov

- name: Report coverage to CI (PR)
if: github.event_name == 'pull_request'
run: make report.cov REQUIRE_COVERAGE_UPLOAD=true

- name: Report coverage to CI (Push)
if: github.event_name != 'pull_request'
- name: Report coverage to CI
run: make report.cov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/documentation-and-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/expression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
working-directory: .testing

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive

Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/macos-regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ jobs:
runs-on: macOS-latest

env:
CC: gcc-11
FC: gfortran-11
CC: gcc
FC: gfortran
FMS_COMMIT: 2019.01.03

defaults:
run:
working-directory: .testing

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive

Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/macos-stencil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ jobs:
runs-on: macOS-latest

env:
CC: gcc-11
FC: gfortran-11
CC: gcc
FC: gfortran
FMS_COMMIT: 2019.01.03

defaults:
run:
working-directory: .testing

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/other.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
working-directory: .testing

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive

Expand Down
41 changes: 39 additions & 2 deletions .github/workflows/perfmon.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Performance Monitor

on: [pull_request]
on: [push, pull_request]

jobs:
build-test-perfmon:
Expand All @@ -11,7 +11,7 @@ jobs:
working-directory: .testing

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive

Expand All @@ -20,19 +20,56 @@ jobs:
- uses: ./.github/actions/testing-setup

- name: Compile optimized models
if: ${{ github.event_name == 'pull_request' }}
run: >-
make -j build.prof
MOM_TARGET_SLUG=$GITHUB_REPOSITORY
MOM_TARGET_LOCAL_BRANCH=$GITHUB_BASE_REF
DO_REGRESSION_TESTS=true
- name: Generate profile data
if: ${{ github.event_name == 'pull_request' }}
run: >-
pip install f90nml &&
make profile
DO_REGRESSION_TESTS=true
- name: Generate perf data
if: ${{ github.event_name == 'pull_request' }}
run: |
sudo sysctl -w kernel.perf_event_paranoid=2
make perf DO_REGRESSION_TESTS=true
# This job assumes that build/target_codebase was cloned above
- name: Compile timing tests for reference code
if: ${{ github.event_name == 'pull_request' }}
run: >-
make -j build.timing_target
MOM_TARGET_SLUG=$GITHUB_REPOSITORY
MOM_TARGET_LOCAL_BRANCH=$GITHUB_BASE_REF
DO_REGRESSION_TESTS=true
- name: Compile timing tests
run: |
make -j build.timing
# DO_REGERESSION_TESTS=true is needed here to set the internal macro TARGET_CODEBASE
- name: Run timing tests for reference code
if: ${{ github.event_name == 'pull_request' }}
run: >-
make -j run.timing_target
DO_REGRESSION_TESTS=true
- name: Run timing tests
run: |
make -j run.timing
- name: Display timing results
run: |
make -j show.timing
- name: Display comparison of timing results
if: ${{ github.event_name == 'pull_request' }}
run: >-
make -j compare.timing
DO_REGRESSION_TESTS=true
2 changes: 1 addition & 1 deletion .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
working-directory: .testing

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stencil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
working-directory: .testing

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive

Expand Down
Loading

0 comments on commit a9a14e7

Please sign in to comment.