Skip to content

Commit

Permalink
Merge branch 'develop' into feature-top-at-1
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertPincus committed Apr 18, 2024
2 parents 3fec480 + 9caac5e commit 8da028e
Show file tree
Hide file tree
Showing 38 changed files with 3,914 additions and 348 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/check-api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Check Fortran API
on:
push:
branches:
- main
- develop
pull_request:
branches-ignore:
- documentation
workflow_dispatch:


jobs:
API:
runs-on: ubuntu-22.04
env:
# Core variables:
FC: gfortran-12
FCFLAGS: "-ffree-line-length-none -m64 -std=f2008 -march=native -fbounds-check -fmodule-private -fimplicit-none -finit-real=nan -g -DRTE_USE_CBOOL"
RRTMGP_ROOT: ${{ github.workspace }}
RTE_KERNELS: extern
steps:
#
# Check out repository under $GITHUB_WORKSPACE
#
- name: Check out code
uses: actions/checkout@v4
#
# Build libraries
#
- name: Build libraries
run: |
$FC --version
make -j4 libs
50 changes: 35 additions & 15 deletions .github/workflows/containerized-ci.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,34 @@
name: Continuous integration in a box
on:
push:
branches-ignore:
- documentation
branches:
- main
- develop
pull_request:
branches-ignore:
- documentation
workflow_dispatch:

jobs:
Containerized-CI:
runs-on: ubuntu-22.04
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
fortran-compiler: [ifort, ifx, nvfortran]
rte-kernels: [default, accel]
fpmodel: [DP, SP]
include:
# The tests are not experimental by default:
- experimental: false
# Set flags for Intel Fortran Compiler Classic
- fortran-compiler: ifort
fcflags: -m64 -g -traceback -heap-arrays -assume realloc_lhs -extend-source 132 -check bounds,uninit,pointers,stack -stand f08
fcflags: -m64 -g -traceback -heap-arrays -assume realloc_lhs -extend-source 132 -check bounds,uninit,pointers,stack -stand f08 -diag-disable=10448
# Set flags for Intel Fortran Compiler
- fortran-compiler: ifx
rte-kernels: default
fcflags: -debug -traceback -O0 -heap-arrays -assume realloc_lhs -extend-source 132 -stand f08
- fortran-compiler: ifx
rte-kernels: accel
fcflags: -debug -traceback -O0 -heap-arrays -assume realloc_lhs -extend-source 132 -stand f08 -fiopenmp -fopenmp-targets=spir64
experimental: true
# Set flags for NVIDIA Fortran compiler
- fortran-compiler: nvfortran
rte-kernels: default
Expand Down Expand Up @@ -75,29 +73,51 @@ jobs:
repository: earth-system-radiation/rrtmgp-data
path: rrtmgp-data
#
# Build libraries, examples and tests
# Build libraries, examples and tests (expect success)
#
- name: Build libraries, examples and tests (expect success)
id: build-success
if: matrix.fortran-compiler != 'ifx' || matrix.rte-kernels != 'accel'
run: |
$FC --version
make -j4 libs
#
# Build libraries, examples and tests (expect failure)
#
- name: Build libraries, examples and tests
- name: Build libraries, examples and tests (expect failure)
if: steps.build-success.outcome == 'skipped'
shell: bash
run: |
$FC --version
make libs
make -C build separate-libs
make -j4 libs 2> >(tee make.err >&2) && {
echo "Unexpected success"
exit 1
} || {
grep make.err -e 'Internal compiler error' && {
echo "Expected failure"
} || {
echo "Unexpected failure"
exit 1
}
}
#
# Run examples and tests
#
- name: Run examples and tests
run: make tests
if: steps.build-success.outcome != 'skipped'
run: make -j4 tests
#
# Relax failure thresholds for single precision
#
- name: Relax failure threshold for single precision
if: matrix.fpmodel == 'SP'
if: matrix.fpmodel == 'SP' && steps.build-success.outcome != 'skipped'
run: echo "FAILURE_THRESHOLD=3.5e-1" >> $GITHUB_ENV
#
# Compare the results
#
- name: Compare the results
run: make check
if: steps.build-success.outcome != 'skipped'
run: make -j4 check
#
# Generate validation plots
#
Expand All @@ -110,7 +130,7 @@ jobs:
#
- name: Upload validation plots
if: matrix.fortran-compiler == 'ifort' && matrix.rte-kernels == 'default' && matrix.fpmodel == 'DP'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: valdiation-plot
path: tests/validation-figures.pdf
19 changes: 10 additions & 9 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: Continuous Integration
on:
push:
branches-ignore:
- documentation
branches:
- main
- develop
pull_request:
branches-ignore:
- documentation
workflow_dispatch:

defaults:
run:
Expand Down Expand Up @@ -64,7 +66,7 @@ jobs:
# Cache Conda packages
#
- name: Cache Conda packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/conda_pkgs_dir
key: conda-pkgs
Expand All @@ -84,18 +86,17 @@ jobs:
#
# Build libraries, examples and tests
#
- name: Build libraries, examples and tests
- name: Build libraries
run: |
$FC --version
make libs
make -C build separate-libs
make -j4 libs
#
# Run examples and tests
#
- name: Run examples and tests
run: make tests
- name: Build and run examples and tests
run: make -j4 tests
#
# Compare the results
#
- name: Compare the results
run: make check
run: make -j4 check
4 changes: 2 additions & 2 deletions .github/workflows/doc-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
# Upload documentation
#
- name: Upload Documentation
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: documentation
path: public/
Expand All @@ -70,7 +70,7 @@ jobs:
# Deploy documentation
#
- name: Deploy API Documentation
uses: JamesIves/github-pages-deploy-action@v4.5.0
uses: JamesIves/github-pages-deploy-action@v4.6.0
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/documentation' }}
with:
branch: gh-pages
Expand Down
Loading

0 comments on commit 8da028e

Please sign in to comment.