diff --git a/.github/actions/macos-setup/action.yml b/.github/actions/macos-setup/action.yml index 4c248abd11..caa6f193bb 100644 --- a/.github/actions/macos-setup/action.yml +++ b/.github/actions/macos-setup/action.yml @@ -26,7 +26,7 @@ runs: 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_REPRO = -g -O1 -ffp-contract=off -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 diff --git a/.github/workflows/coupled-api.yml b/.github/workflows/coupled-api.yml deleted file mode 100644 index ace02ee790..0000000000 --- a/.github/workflows/coupled-api.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: API for coupled drivers - -on: [push, pull_request] - -jobs: - test-top-api: - - runs-on: ubuntu-latest - defaults: - run: - working-directory: .testing - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - uses: ./.github/actions/ubuntu-setup - - - uses: ./.github/actions/testing-setup - with: - build_symmetric: 'false' - - - name: Compile MOM6 for the GFDL coupled driver - shell: bash - run: make check_mom6_api_coupled -j - - - name: Compile MOM6 for the NUOPC driver - shell: bash - run: make check_mom6_api_nuopc -j diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml deleted file mode 100644 index 22b9e471bc..0000000000 --- a/.github/workflows/coverage.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Code coverage - -on: [push, pull_request] - -jobs: - build-coverage: - - runs-on: ubuntu-latest - defaults: - run: - working-directory: .testing - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - uses: ./.github/actions/ubuntu-setup - - - uses: ./.github/actions/testing-setup - - - name: Compile unit tests - run: make -j build.unit - - - name: Run unit tests - run: make run.cov.unit - - - 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 -k run.cov - - - name: Report coverage to CI - run: make report.cov - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/documentation-and-style.yml b/.github/workflows/documentation-and-style.yml deleted file mode 100644 index 857db917b6..0000000000 --- a/.github/workflows/documentation-and-style.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Doxygen and style - -on: [push, pull_request] - -jobs: - doxygen: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Check white space (non-blocking) - run: | - ./.testing/trailer.py -e TEOS10 -l 120 src config_src 2>&1 | tee style_errors - continue-on-error: true - - - name: Install packages used when generating documentation - run: | - sudo apt-get update - sudo apt-get install python3-sphinx python3-lxml perl - sudo apt-get install texlive-binaries texlive-base bibtool tex-common texlive-bibtex-extra - sudo apt-get install graphviz - - - name: Build doxygen HTML - run: | - cd docs - perl -e 'print "perl version $^V" . "\n"' - mkdir _build && make nortd DOXYGEN_RELEASE=Release_1_8_13 UPDATEHTMLEQS=Y - cat _build/doxygen_warn_nortd_log.txt - - - name: Report doxygen or style errors - run: | - grep "warning:" docs/_build/doxygen_warn_nortd_log.txt | grep -v "as part of a" | tee doxy_errors - cat style_errors doxy_errors > all_errors - cat all_errors - test ! -s all_errors diff --git a/.github/workflows/expression.yml b/.github/workflows/expression.yml deleted file mode 100644 index 3cd19ee18c..0000000000 --- a/.github/workflows/expression.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Expression verification - -on: [push, pull_request] - -jobs: - test-repro-and-dims: - - runs-on: ubuntu-latest - defaults: - run: - working-directory: .testing - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - uses: ./.github/actions/ubuntu-setup - - - uses: ./.github/actions/testing-setup - - - name: Compile MOM6 using repro optimization - run: make build/repro/MOM6 -j - - - name: Create validation data - run: make run.symmetric -k -s - - - name: Run tests - run: make test.repro test.dim -k -s diff --git a/.github/workflows/macos-regression.yml b/.github/workflows/macos-regression.yml deleted file mode 100644 index 16e2e15f80..0000000000 --- a/.github/workflows/macos-regression.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: MacOS regression - -on: [pull_request] - -jobs: - test-macos-regression: - - runs-on: macOS-latest - - env: - CC: gcc - FC: gfortran - FMS_COMMIT: 2019.01.03 - - defaults: - run: - working-directory: .testing - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - uses: ./.github/actions/macos-setup - - - uses: ./.github/actions/testing-setup - - - name: Compile reference model - run: make build.regressions MOM_TARGET_SLUG=$GITHUB_REPOSITORY MOM_TARGET_LOCAL_BRANCH=$GITHUB_BASE_REF DO_REGRESSION_TESTS=true -j - - - name: Create validation data - run: make run.symmetric -k -s - - - name: Regression test - run: make test.regression DO_REGRESSION_TESTS=true -k -s diff --git a/.github/workflows/macos-stencil.yml b/.github/workflows/macos-stencil.yml deleted file mode 100644 index a30ad17199..0000000000 --- a/.github/workflows/macos-stencil.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: MacOS stencil tests - -on: [push, pull_request] - -jobs: - test-macos-stencil: - - runs-on: macOS-latest - - env: - CC: gcc - FC: gfortran - FMS_COMMIT: 2019.01.03 - - defaults: - run: - working-directory: .testing - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - uses: ./.github/actions/macos-setup - - - uses: ./.github/actions/testing-setup - - - name: Compile MOM6 in asymmetric memory mode - run: make build/asymmetric/MOM6 -j - - - name: Create validation data - run: make run.symmetric -k -s - - - name: Run tests - run: make test.grid test.layout test.rotate -k -s diff --git a/.github/workflows/other.yml b/.github/workflows/other.yml deleted file mode 100644 index 9a941bafa9..0000000000 --- a/.github/workflows/other.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: OpenMP and Restart verification - -on: [push, pull_request] - -jobs: - test-openmp-nan-restarts: - - runs-on: ubuntu-latest - defaults: - run: - working-directory: .testing - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - uses: ./.github/actions/ubuntu-setup - - - uses: ./.github/actions/testing-setup - - - name: Compile with openMP - run: make build/openmp/MOM6 -j - - - name: Create validation data - run: make run.symmetric -k -s - - - name: Run tests - run: make test.openmp test.nan test.restart -k -s diff --git a/.github/workflows/perfmon.yml b/.github/workflows/perfmon.yml deleted file mode 100644 index a66ba90643..0000000000 --- a/.github/workflows/perfmon.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: Performance Monitor - -on: [push, pull_request] - -jobs: - build-test-perfmon: - - runs-on: ubuntu-latest - defaults: - run: - working-directory: .testing - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - uses: ./.github/actions/ubuntu-setup - - - 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 diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml deleted file mode 100644 index 107948d5da..0000000000 --- a/.github/workflows/regression.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Regression - -on: [pull_request] - -jobs: - build-test-regression: - - runs-on: ubuntu-latest - defaults: - run: - working-directory: .testing - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - uses: ./.github/actions/ubuntu-setup - - - uses: ./.github/actions/testing-setup - - - name: Compile reference model - run: make build.regressions MOM_TARGET_SLUG=$GITHUB_REPOSITORY MOM_TARGET_LOCAL_BRANCH=$GITHUB_BASE_REF DO_REGRESSION_TESTS=true -j - - - name: Create validation data - run: make run.symmetric -k -s - - - name: Regression test - run: make test.regression DO_REGRESSION_TESTS=true -k -s diff --git a/.github/workflows/stencil.yml b/.github/workflows/stencil.yml deleted file mode 100644 index d46da6e4fa..0000000000 --- a/.github/workflows/stencil.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Stencil related verification - -on: [push, pull_request] - -jobs: - test-symmetric-layout-rotation: - - runs-on: ubuntu-latest - defaults: - run: - working-directory: .testing - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - uses: ./.github/actions/ubuntu-setup - - - uses: ./.github/actions/testing-setup - - - name: Compile MOM6 in asymmetric memory mode - run: make build/asymmetric/MOM6 -j - - - name: Create validation data - run: make run.symmetric -k -s - - - name: Run tests - run: make test.grid test.layout test.rotate -k -s diff --git a/.github/workflows/verify-linux.yml b/.github/workflows/verify-linux.yml new file mode 100644 index 0000000000..c15daee448 --- /dev/null +++ b/.github/workflows/verify-linux.yml @@ -0,0 +1,928 @@ +name: Linux verification + +on: [push, pull_request] + +jobs: + # Documentation + check-style-and-docstrings: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Check white space (non-blocking) + run: | + ./.testing/trailer.py -e TEOS10 -l 120 src config_src 2>&1 | tee style_errors + continue-on-error: true + + - name: Install packages used when generating documentation + run: | + sudo apt-get update + sudo apt-get install python3-sphinx python3-lxml perl + sudo apt-get install texlive-binaries texlive-base bibtool tex-common texlive-bibtex-extra + sudo apt-get install graphviz + + - name: Build doxygen HTML + run: | + cd docs + perl -e 'print "perl version $^V" . "\n"' + mkdir _build && make nortd DOXYGEN_RELEASE=Release_1_8_13 UPDATEHTMLEQS=Y + cat _build/doxygen_warn_nortd_log.txt + + - name: Report doxygen or style errors + run: | + grep "warning:" docs/_build/doxygen_warn_nortd_log.txt | grep -v "as part of a" | tee doxy_errors + cat style_errors doxy_errors > all_errors + cat all_errors + test ! -s all_errors + + # Dependencies + + build-fms: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - uses: ./.github/actions/ubuntu-setup/ + + - name: Build libFMS.a + run: make -C .testing build/deps/lib/libFMS.a -j + + - name: Upload libFMS.a and dependencies + uses: actions/upload-artifact@v4 + with: + name: fms-artifact + path: | + .testing/build/deps/include/ + .testing/build/deps/lib/libFMS.a + retention-days: 1 + + # Executables + + build-symmetric: + runs-on: ubuntu-latest + needs: build-fms + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup/ + + - uses: actions/download-artifact@v4 + with: + name: fms-artifact + path: .testing/build/deps/ + + - name: Compile MOM6 with symmetric indexing + run: | + make -C .testing build/symmetric/MOM6 -j \ + -o build/deps/lib/libFMS.a + + - uses: actions/upload-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/MOM6 + retention-days: 1 + + build-asymmetric: + runs-on: ubuntu-latest + needs: build-fms + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup/ + + - uses: actions/download-artifact@v4 + with: + name: fms-artifact + path: .testing/build/deps/ + + - name: Compile MOM6 with asymmetric indexing + run: | + make -C .testing build/asymmetric/MOM6 -j \ + -o build/deps/lib/libFMS.a + + - uses: actions/upload-artifact@v4 + with: + name: mom6-asymmetric-artifact + path: .testing/build/asymmetric/MOM6 + retention-days: 1 + + build-repro: + runs-on: ubuntu-latest + needs: build-fms + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup/ + + - uses: actions/download-artifact@v4 + with: + name: fms-artifact + path: .testing/build/deps/ + + - name: Compile repro + run: | + make -C .testing build/repro/MOM6 -j \ + -o build/deps/lib/libFMS.a + + - uses: actions/upload-artifact@v4 + with: + name: mom6-repro-artifact + path: .testing/build/repro/MOM6 + retention-days: 1 + + build-openmp: + runs-on: ubuntu-latest + needs: build-fms + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup/ + + - uses: actions/download-artifact@v4 + with: + name: fms-artifact + path: .testing/build/deps/ + + - name: Compile MOM6 supporting OpenMP + run: make -C .testing build/openmp/MOM6 -j -o build/deps/lib/libFMS.a + + - uses: actions/upload-artifact@v4 + with: + name: mom6-openmp-artifact + path: .testing/build/openmp/MOM6 + retention-days: 1 + + build-target: + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + needs: build-fms + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup/ + + - uses: actions/download-artifact@v4 + with: + name: fms-artifact + path: .testing/build/deps/ + + - name: Compile target MOM6 + run: | + make -C .testing build/target/MOM6 -j \ + -o build/deps/lib/libFMS.a \ + MOM_TARGET_SLUG=$GITHUB_REPOSITORY \ + MOM_TARGET_LOCAL_BRANCH=$GITHUB_BASE_REF \ + DO_REGRESSION_TESTS=True + + - uses: actions/upload-artifact@v4 + with: + name: mom6-target-artifact + path: .testing/build/target/MOM6 + retention-days: 1 + + build-opt: + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + needs: build-fms + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup/ + + - uses: actions/download-artifact@v4 + with: + name: fms-artifact + path: .testing/build/deps/ + + - name: Compile optimized model + run: | + make -C .testing build/opt/MOM6 -j \ + -o build/deps/lib/libFMS.a + + - uses: actions/upload-artifact@v4 + with: + name: mom6-opt-artifact + path: .testing/build/opt/MOM6 + retention-days: 1 + + - name: Compile unit tests + run: | + make -C .testing build.timing -j \ + -o build/deps/lib/libFMS.a + + - uses: actions/upload-artifact@v4 + with: + name: mom6-unit-artifact + path: | + .testing/build/timing/time_MOM_EOS + .testing/build/timing/time_MOM_remapping + retention-days: 1 + + build-opt-target: + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + needs: build-fms + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup/ + + - uses: actions/download-artifact@v4 + with: + name: fms-artifact + path: .testing/build/deps/ + + - name: Compile target MOM6 + run: | + make -C .testing build/opt_target/MOM6 -j \ + -o build/deps/lib/libFMS.a \ + MOM_TARGET_SLUG=$GITHUB_REPOSITORY \ + MOM_TARGET_LOCAL_BRANCH=$GITHUB_BASE_REF \ + DO_REGRESSION_TESTS=True + + - uses: actions/upload-artifact@v4 + with: + name: mom6-opt-target-artifact + path: .testing/build/opt_target/MOM6 + retention-days: 1 + + - name: Compile target unit tests + run: | + make -C .testing build.timing_target -j \ + -o build/deps/lib/libFMS.a + MOM_TARGET_SLUG=$GITHUB_REPOSITORY \ + MOM_TARGET_LOCAL_BRANCH=$GITHUB_BASE_REF \ + DO_REGRESSION_TESTS=true + + # XXX: This attempts to create an empty artifact! + - uses: actions/upload-artifact@v4 + with: + name: mom6-unit-target-artifact + path: | + .testing/build/target_codebase/.testing/build/timing/time_MOM_EOS + .testing/build/target_codebase/.testing/build/timing/time_MOM_remapping + retention-days: 1 + + build-coverage: + runs-on: ubuntu-latest + needs: build-fms + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup/ + + - uses: actions/download-artifact@v4 + with: + name: fms-artifact + path: .testing/build/deps/ + + - name: Compile MOM6 with code coverage + run: make -C .testing build/cov/MOM6 -j -o build/deps/lib/libFMS.a + + - name: Compile MOM6 unit tests + run: | + make -C .testing build/unit/test_MOM_file_parser -j \ + -o build/deps/lib/libFMS.a + make -C .testing build.unit -j \ + -o build/deps/lib/libFMS.a + + - uses: actions/upload-artifact@v4 + with: + name: mom6-coverage-artifact + path: | + .testing/build/cov/MOM6 + .testing/build/cov/*.gcno + .testing/build/unit/test_MOM_EOS + .testing/build/unit/test_MOM_file_parser + .testing/build/unit/test_MOM_mixedlayer_restrat + .testing/build/unit/test_MOM_remapping + .testing/build/unit/test_MOM_string_functions + .testing/build/unit/test_numerical_testing_type + .testing/build/unit/*.gcno + retention-days: 1 + + build-coupled-api: + runs-on: ubuntu-latest + needs: build-fms + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup/ + + - uses: actions/download-artifact@v4 + with: + name: fms-artifact + path: .testing/build/deps/ + + - name: Compile MOM6 for the GFDL coupled driver + run: | + make -C .testing check_mom6_api_coupled -j \ + -o build/deps/lib/libFMS.a + + #--- + + test-grid: + runs-on: ubuntu-latest + needs: + - build-symmetric + - build-asymmetric + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup + + - name: Download symmetric MOM6 + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Download asymmetric MOM6 + uses: actions/download-artifact@v4 + with: + name: mom6-asymmetric-artifact + path: .testing/build/asymmetric/ + + - name: Verify symmetric-asymmetric grid invariance + run: | + chmod u+rx .testing/build/symmetric/MOM6 + chmod u+rx .testing/build/asymmetric/MOM6 + make -C .testing test.grid -o build/symmetric/MOM6 -o build/asymmetric/MOM6 + + test-layout: + runs-on: ubuntu-latest + needs: build-symmetric + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup + + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Verify processor domain layout + run: | + chmod u+rx .testing/build/symmetric/MOM6 + make -C .testing test.layout -o build/symmetric/MOM6 + + test-rotate: + runs-on: ubuntu-latest + needs: build-symmetric + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup + + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Verify rotational invariance + run: | + chmod u+rx .testing/build/symmetric/MOM6 + make -C .testing test.rotate -o build/symmetric/MOM6 + + test-restart: + runs-on: ubuntu-latest + needs: build-symmetric + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup + + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Verify restart invariance + run: | + chmod u+rx .testing/build/symmetric/MOM6 + make -C .testing test.restart -o build/symmetric/MOM6 + + test-nan: + runs-on: ubuntu-latest + needs: build-symmetric + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup + + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Verify aggressive initialization + run: | + chmod u+rx .testing/build/symmetric/MOM6 + make -C .testing test.nan -o build/symmetric/MOM6 + + test-dim-t: + runs-on: ubuntu-latest + needs: build-symmetric + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup + + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Verify time dimensional invariance + run: | + chmod u+rx .testing/build/symmetric/MOM6 + make -C .testing test.dim.t -o build/symmetric/MOM6 + + test-dim-l: + runs-on: ubuntu-latest + needs: build-symmetric + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup + + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Verify horizontal length dimensional invariance + run: | + chmod u+rx .testing/build/symmetric/MOM6 + make -C .testing test.dim.l -o build/symmetric/MOM6 + + test-dim-h: + runs-on: ubuntu-latest + needs: build-symmetric + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup + + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Verify vertical thickness dimensional invariance + run: | + chmod u+rx .testing/build/symmetric/MOM6 + make -C .testing test.dim.h -o build/symmetric/MOM6 + + test-dim-z: + runs-on: ubuntu-latest + needs: build-symmetric + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup + + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Verify vertical coordinate dimensional invariance + run: | + chmod u+rx .testing/build/symmetric/MOM6 + make -C .testing test.dim.z -o build/symmetric/MOM6 + + test-dim-q: + runs-on: ubuntu-latest + needs: build-symmetric + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup + + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Verify heat dimensional invariance + run: | + chmod u+rx .testing/build/symmetric/MOM6 + make -C .testing test.dim.z -o build/symmetric/MOM6 + + test-dim-r: + runs-on: ubuntu-latest + needs: build-symmetric + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup + + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Verify density dimensional invariance + run: | + chmod u+rx .testing/build/symmetric/MOM6 + make -C .testing test.dim.r -o build/symmetric/MOM6 + + test-openmp: + runs-on: ubuntu-latest + needs: + - build-symmetric + - build-openmp + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup + + - name: Download symmetric MOM6 + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Download OpenMP MOM6 + uses: actions/download-artifact@v4 + with: + name: mom6-openmp-artifact + path: .testing/build/openmp/ + + - name: Verify OpenMP invariance + run: | + chmod u+rx .testing/build/symmetric/MOM6 + chmod u+rx .testing/build/openmp/MOM6 + make -C .testing test.openmp -o build/symmetric/MOM6 -o build/openmp/MOM6 + + test-repro: + runs-on: ubuntu-latest + needs: + - build-symmetric + - build-repro + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup + + - name: Download DEBUG MOM6 + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Download REPRO MOM6 + uses: actions/download-artifact@v4 + with: + name: mom6-repro-artifact + path: .testing/build/repro/ + + - name: Verify REPRO equivalence + run: | + chmod u+rx .testing/build/symmetric/MOM6 + chmod u+rx .testing/build/repro/MOM6 + make -C .testing test.repro \ + -o build/symmetric/MOM6 \ + -o build/repro/MOM6 + + test-regression: + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + needs: + - build-symmetric + - build-target + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup + + - name: Download symmetric MOM6 + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Download target MOM6 + uses: actions/download-artifact@v4 + with: + name: mom6-target-artifact + path: .testing/build/target/ + + - name: Check for regressions + run: | + chmod u+rx .testing/build/symmetric/MOM6 + chmod u+rx .testing/build/target/MOM6 + make -C .testing test.regression \ + -o build/symmetric/MOM6 \ + -o build/target/MOM6 \ + DO_REGRESSION_TESTS=true + + run-coverage: + runs-on: ubuntu-latest + needs: build-coverage + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup + + - name: Download unit coverage tests + uses: actions/download-artifact@v4 + with: + name: mom6-coverage-artifact + path: .testing/build/ + + - name: Generate MOM6 coverage + run: | + chmod u+rx .testing/build/cov/MOM6 + make -C .testing -j run.cov \ + -o build/cov/MOM6 + + - name: Generate unit test coverage + run: | + chmod u+rx .testing/build/unit/test_MOM_EOS + chmod u+rx .testing/build/unit/test_MOM_file_parser + chmod u+rx .testing/build/unit/test_MOM_mixedlayer_restrat + chmod u+rx .testing/build/unit/test_MOM_remapping + chmod u+rx .testing/build/unit/test_MOM_string_functions + chmod u+rx .testing/build/unit/test_numerical_testing_type + make -C .testing -j run.cov.unit \ + -o build/unit/test_MOM_file_parser \ + -o build/unit/test_MOM_EOS \ + -o build/unit/test_MOM_mixedlayer_restrat \ + -o build/unit/test_MOM_remapping \ + -o build/unit/test_MOM_string_functions \ + -o build/unit/test_numerical_testing_type + + - name: Report coverage to CI + run: | + make -C .testing report.cov \ + -o build/cov/MOM6 + make -C .testing report.cov.unit \ + -o build/unit/test_MOM_file_parser \ + -o build/unit/test_MOM_EOS \ + -o build/unit/test_MOM_mixedlayer_restrat \ + -o build/unit/test_MOM_remapping \ + -o build/unit/test_MOM_string_functions \ + -o build/unit/test_numerical_testing_type + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + # These are most likely nonsense on a GitHub node, but someday it could work. + run-timings: + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + needs: + - build-opt + - build-opt-target + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/ubuntu-setup + + - name: Download optimized MOM6 + uses: actions/download-artifact@v4 + with: + name: mom6-opt-artifact + path: .testing/build/opt/ + + - name: Download optimized target MOM6 + uses: actions/download-artifact@v4 + with: + name: mom6-opt-target-artifact + path: .testing/build/opt_target/ + + # TODO: Move f90nml and chmod setup to another step? + - name: Profile with FMS clocks + run: | + pip install f90nml + chmod u+rx .testing/build/opt/MOM6 + chmod u+rx .testing/build/opt_target/MOM6 + make -C .testing profile -j \ + -o build/opt/MOM6 \ + -o build/opt_target/MOM6 \ + DO_REGRESSION_TESTS=true + + - name: Profile with perf + run: | + sudo sysctl -w kernel.perf_event_paranoid=2 + make -C .testing perf -j \ + -o build/opt/MOM6 \ + -o build/opt_target/MOM6 \ + DO_REGRESSION_TESTS=true + + # Collapse run.timing run.timing_target and show.timing into one rule + # TODO: Should this be a separate thing? + + - name: Download unit tests + uses: actions/download-artifact@v4 + with: + name: mom6-unit-artifact + path: .testing/build/timing + + # XXX: This fails because the files do not yet build. + #- name: Download unit tests + # uses: actions/download-artifact@v4 + # with: + # name: mom6-unit-target-artifact + # path: .testing/build/timing + + - name: Run unit test timings + run: | + chmod u+rx .testing/build/timing/time_MOM_EOS + chmod u+rx .testing/build/timing/time_MOM_remapping + make -C .testing run.timing -j \ + -o build/timing/time_MOM_EOS \ + -o build/timing/time_MOM_remapping + + - name: Run unit test target timings + run: | + make -C .testing run.timing_target -j \ + -o build/target_codebase/.testing/build/timing/time_MOM_EOS \ + -o build/target_codebase/.testing/build/timing/time_MOM_remapping \ + DO_REGRESSION_TESTS=true + + - name: Show timing results + run: | + make -C .testing show.timing \ + DO_REGRESSION_TESTS=true + + - name: Compare unit test timings + run: | + make -C .testing compare.timing \ + DO_REGRESSION_TESTS=true + + cleanup-common: + runs-on: ubuntu-latest + permissions: + id-token: write + needs: + - test-grid + - test-openmp + - test-repro + - run-coverage + + steps: + - uses: geekyeggo/delete-artifact@v5 + with: + name: | + fms-artifact + mom6-asymmetric-artifact + mom6-openmp-artifact + mom6-repro-artifact + mom6-coverage-artifact + + # NOTE: There is no way to conditionally define the elements in `needs`. + # For now, we must create separate rules for each case. + + cleanup-push: + if: github.event_name != 'pull_request' + runs-on: ubuntu-latest + permissions: + id-token: write + needs: + - test-layout + - test-rotate + - test-restart + - test-nan + - test-dim-t + - test-dim-l + - test-dim-h + - test-dim-z + - test-dim-q + - test-dim-r + - test-grid + - test-openmp + - test-repro + - run-coverage + + steps: + - uses: geekyeggo/delete-artifact@v5 + with: + name: | + mom6-symmetric-artifact + + cleanup-pr: + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + permissions: + id-token: write + needs: + - test-layout + - test-rotate + - test-restart + - test-nan + - test-dim-t + - test-dim-l + - test-dim-h + - test-dim-z + - test-dim-q + - test-dim-r + - test-grid + - test-openmp + - test-repro + - run-coverage + - test-regression + - run-timings + + steps: + - uses: geekyeggo/delete-artifact@v5 + with: + name: | + mom6-symmetric-artifact + mom6-target-artifact + mom6-opt-artifact + mom6-opt-target-artifact + mom6-unit-artifact + mom6-unit-target-artifact diff --git a/.github/workflows/verify-macos.yml b/.github/workflows/verify-macos.yml new file mode 100644 index 0000000000..790cac3e52 --- /dev/null +++ b/.github/workflows/verify-macos.yml @@ -0,0 +1,542 @@ +name: MacOS verification + +on: [push, pull_request] + +env: + CC: gcc + FC: gfortran + +jobs: + # Dependencies + build-fms: + runs-on: macOS-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - uses: ./.github/actions/macos-setup/ + + - name: Build libFMS.a + run: make -C .testing build/deps/lib/libFMS.a -j + + - name: Upload libFMS.a and dependencies + uses: actions/upload-artifact@v4 + with: + name: fms-artifact + path: | + .testing/build/deps/include/ + .testing/build/deps/lib/libFMS.a + retention-days: 1 + + build-symmetric: + runs-on: macOS-latest + needs: build-fms + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/macos-setup/ + + - uses: actions/download-artifact@v4 + with: + name: fms-artifact + path: .testing/build/deps/ + + - name: Compile symmetric index layout + run: | + make -C .testing build/symmetric/MOM6 -j -o build/deps/lib/libFMS.a + + - uses: actions/upload-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/MOM6 + retention-days: 1 + + build-asymmetric: + runs-on: macOS-latest + needs: build-fms + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/macos-setup/ + + - uses: actions/download-artifact@v4 + with: + name: fms-artifact + path: .testing/build/deps/ + + - name: Compile asymmetric index layout + run: | + make -C .testing build/asymmetric/MOM6 -j -o build/deps/lib/libFMS.a + + - uses: actions/upload-artifact@v4 + with: + name: mom6-asymmetric-artifact + path: .testing/build/asymmetric/MOM6 + retention-days: 1 + + build-repro: + runs-on: macOS-latest + needs: build-fms + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/macos-setup/ + + - uses: actions/download-artifact@v4 + with: + name: fms-artifact + path: .testing/build/deps/ + + - name: Compile repro + run: make -C .testing build/repro/MOM6 -j -o build/deps/lib/libFMS.a + + - uses: actions/upload-artifact@v4 + with: + name: mom6-repro-artifact + path: .testing/build/repro/MOM6 + retention-days: 1 + + build-openmp: + runs-on: macOS-latest + needs: build-fms + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/macos-setup/ + + - uses: actions/download-artifact@v4 + with: + name: fms-artifact + path: .testing/build/deps/ + + - name: Compile MOM6 supporting OpenMP + run: make -C .testing build/openmp/MOM6 -j -o build/symmetric/Makefile + + - uses: actions/upload-artifact@v4 + with: + name: mom6-openmp-artifact + path: .testing/build/openmp/MOM6 + retention-days: 1 + + build-target: + if: github.event_name == 'pull_request' + runs-on: macos-latest + needs: build-fms + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/macos-setup/ + + - uses: actions/download-artifact@v4 + with: + name: fms-artifact + path: .testing/build/deps/ + + - name: Compile target MOM6 + run: | + make -C .testing build/target/MOM6 -j \ + -o build/deps/lib/libFMS.a \ + MOM_TARGET_SLUG=$GITHUB_REPOSITORY \ + MOM_TARGET_LOCAL_BRANCH=$GITHUB_BASE_REF \ + DO_REGRESSION_TESTS=True + + - uses: actions/upload-artifact@v4 + with: + name: mom6-target-artifact + path: .testing/build/target/MOM6 + retention-days: 1 + + #--- + + test-grid: + runs-on: macOS-latest + needs: + - build-symmetric + - build-asymmetric + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/macos-setup + + - name: Download symmetric MOM6 + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Download asymmetric MOM6 + uses: actions/download-artifact@v4 + with: + name: mom6-asymmetric-artifact + path: .testing/build/asymmetric/ + + - name: Verify symmetric-asymmetric grid invariance + run: | + chmod u+rx .testing/build/symmetric/MOM6 + chmod u+rx .testing/build/asymmetric/MOM6 + make -C .testing -k test.grid \ + -o build/symmetric/MOM6 \ + -o build/asymmetric/MOM6 + + test-layout: + runs-on: macOS-latest + needs: build-symmetric + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/macos-setup + + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Verify processor domain layout + run: | + chmod u+rx .testing/build/symmetric/MOM6 + make -C .testing -k test.layout \ + -o build/symmetric/MOM6 + + test-rotate: + runs-on: macOS-latest + needs: build-symmetric + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/macos-setup + + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Verify rotational invariance + run: | + chmod u+rx .testing/build/symmetric/MOM6 + make -C .testing -k test.rotate -o build/symmetric/MOM6 + + test-restart: + runs-on: macOS-latest + needs: build-symmetric + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/macos-setup + + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Verify restart invariance + run: | + chmod u+rx .testing/build/symmetric/MOM6 + make -C .testing -k test.restart -o build/symmetric/MOM6 + + test-nan: + runs-on: macOS-latest + needs: build-symmetric + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/macos-setup + + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Verify aggressive initialization + run: | + chmod u+rx .testing/build/symmetric/MOM6 + make -C .testing -k test.nan -o build/symmetric/MOM6 + + test-dim-t: + runs-on: macos-latest + needs: build-symmetric + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/macos-setup + + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Verify time dimensional invariance + run: | + chmod u+rx .testing/build/symmetric/MOM6 + make -C .testing test.dim.t -o build/symmetric/MOM6 + + test-dim-l: + runs-on: macos-latest + needs: build-symmetric + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/macos-setup + + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Verify horizontal length dimensional invariance + run: | + chmod u+rx .testing/build/symmetric/MOM6 + make -C .testing test.dim.l -o build/symmetric/MOM6 + + test-dim-h: + runs-on: macos-latest + needs: build-symmetric + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/macos-setup + + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Verify vertical thickness dimensional invariance + run: | + chmod u+rx .testing/build/symmetric/MOM6 + make -C .testing test.dim.h -o build/symmetric/MOM6 + + test-dim-z: + runs-on: macos-latest + needs: build-symmetric + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/macos-setup + + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Verify vertical coordinate dimensional invariance + run: | + chmod u+rx .testing/build/symmetric/MOM6 + make -C .testing test.dim.z -o build/symmetric/MOM6 + + test-dim-q: + runs-on: macos-latest + needs: build-symmetric + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/macos-setup + + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Verify heat dimensional invariance + run: | + chmod u+rx .testing/build/symmetric/MOM6 + make -C .testing test.dim.z -o build/symmetric/MOM6 + + test-dim-r: + runs-on: macos-latest + needs: build-symmetric + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/macos-setup + + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Verify density dimensional invariance + run: | + chmod u+rx .testing/build/symmetric/MOM6 + make -C .testing test.dim.r -o build/symmetric/MOM6 + + test-openmp: + runs-on: macOS-latest + needs: + - build-symmetric + - build-openmp + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/macos-setup + + - name: Download symmetric MOM6 + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Download OpenMP MOM6 + uses: actions/download-artifact@v4 + with: + name: mom6-openmp-artifact + path: .testing/build/openmp/ + + - name: Verify OpenMP invariance + run: | + chmod u+rx .testing/build/symmetric/MOM6 + chmod u+rx .testing/build/openmp/MOM6 + make -C .testing -k test.openmp -k -o build/symmetric/MOM6 -o build/openmp/MOM6 + + test-repro: + runs-on: macOS-latest + needs: + - build-symmetric + - build-repro + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/macos-setup + + - name: Download DEBUG MOM6 + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Download REPRO MOM6 + uses: actions/download-artifact@v4 + with: + name: mom6-repro-artifact + path: .testing/build/repro/ + + - name: Verify optimized equivalence + run: | + chmod u+rx .testing/build/symmetric/MOM6 + chmod u+rx .testing/build/repro/MOM6 + make -C .testing -k test.repro -o build/symmetric/MOM6 -o build/repro/MOM6 + + test-regression: + if: github.event_name == 'pull_request' + runs-on: macOS-latest + needs: + - build-symmetric + - build-target + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/macos-setup + + - name: Download symmetric MOM6 + uses: actions/download-artifact@v4 + with: + name: mom6-symmetric-artifact + path: .testing/build/symmetric/ + + - name: Download target MOM6 + uses: actions/download-artifact@v4 + with: + name: mom6-target-artifact + path: .testing/build/target/ + + - name: Check for regressions + run: | + chmod u+rx .testing/build/symmetric/MOM6 + chmod u+rx .testing/build/target/MOM6 + make -C .testing test.regression \ + -o build/symmetric/MOM6 \ + -o build/target/MOM6 \ + DO_REGRESSION_TESTS=true + + cleanup: + runs-on: macos-latest + permissions: + id-token: write + needs: + - test-grid + - test-layout + - test-rotate + - test-restart + - test-nan + - test-dim-t + - test-dim-l + - test-dim-h + - test-dim-z + - test-dim-q + - test-dim-r + - test-openmp + - test-repro + + steps: + - uses: geekyeggo/delete-artifact@v5 + with: + name: | + fms-artifact + mom6-*-artifact diff --git a/.testing/Makefile b/.testing/Makefile index 1a87a5f36c..0253bcb3a8 100644 --- a/.testing/Makefile +++ b/.testing/Makefile @@ -65,7 +65,10 @@ SHELL = bash # No implicit rules, suffixes, or variables -MAKEFLAGS += -rR +MAKEFLAGS += --no-builtin-rules +MAKEFLAGS += --no-builtin-variables + +.SUFFIXES: # Determine the MOM6 autoconf srcdir AC_SRCDIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))../ac @@ -551,8 +554,8 @@ $(WORK)/%/$(1)/ocean.stats $(WORK)/%/$(1)/chksum_diag: $(BUILD)/$(2)/MOM6 | prep && $(TIME) $(5) $(MPIRUN) -n $(6) $$(abspath $$<) 2> std.err > std.out \ || !( \ mkdir -p ../../../results/$$*/ ; \ - cat std.out | tee ../../../results/$$*/std.$(1).out | tail -n 40 ; \ - cat std.err | tee ../../../results/$$*/std.$(1).err | tail -n 40 ; \ + cat std.out | tee ../../../results/$$*/std.$(1).out | tail -n 100 ; \ + cat std.err | tee ../../../results/$$*/std.$(1).err | tail -n 100 ; \ rm ocean.stats chksum_diag ; \ echo -e "$(FAIL): $$*.$(1) failed at runtime." \ ) @@ -635,8 +638,8 @@ $(WORK)/%/restart/ocean.stats: $(BUILD)/symmetric/MOM6 | preproc # Run the first half-period cd $(@D) && $(TIME) $(MPIRUN) -n 1 $(abspath $<) 2> std1.err > std1.out \ || !( \ - cat std1.out | tee ../../../results/$*/std.restart1.out | tail -n 40 ; \ - cat std1.err | tee ../../../results/$*/std.restart1.err | tail -n 40 ; \ + cat std1.out | tee ../../../results/$*/std.restart1.out | tail -n 100 ; \ + cat std1.err | tee ../../../results/$*/std.restart1.err | tail -n 100 ; \ echo -e "$(FAIL): $*.restart failed at runtime." \ ) # Setup the next inputs @@ -646,8 +649,8 @@ $(WORK)/%/restart/ocean.stats: $(BUILD)/symmetric/MOM6 | preproc # Run the second half-period cd $(@D) && $(TIME) $(MPIRUN) -n 1 $(abspath $<) 2> std2.err > std2.out \ || !( \ - cat std2.out | tee ../../../results/$*/std.restart2.out | tail -n 40 ; \ - cat std2.err | tee ../../../results/$*/std.restart2.err | tail -n 40 ; \ + cat std2.out | tee ../../../results/$*/std.restart2.out | tail -n 100 ; \ + cat std2.err | tee ../../../results/$*/std.restart2.err | tail -n 100 ; \ echo -e "$(FAIL): $*.restart failed at runtime." \ )