Skip to content

Commit

Permalink
Merge branch 'main' it version 1.8 nto documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertPincus committed May 21, 2024
2 parents 92dbaf7 + 41c5fcd commit d287ae5
Show file tree
Hide file tree
Showing 48 changed files with 3,933 additions and 781 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
57 changes: 39 additions & 18 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 All @@ -40,11 +38,11 @@ jobs:
fcflags: -Mallocatable=03 -Mstandard -Mbounds -Mchkptr -Kieee -Mchkstk -acc
# Set container images
- fortran-compiler: ifort
image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:ifort
image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:oneapi
- fortran-compiler: ifx
image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:ifort
image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:oneapi
- fortran-compiler: nvfortran
image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:nvfortran
image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:nvhpc
container:
image: ${{ matrix.image }}
env:
Expand Down Expand Up @@ -74,30 +72,53 @@ jobs:
with:
repository: earth-system-radiation/rrtmgp-data
path: rrtmgp-data
ref: v1.8.1
#
# 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
# 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 +131,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
24 changes: 13 additions & 11 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 All @@ -25,7 +27,7 @@ jobs:
FC: ${{ matrix.fortran-compiler }}
FCFLAGS: "-ffree-line-length-none -m64 -std=f2008 -march=native -fbounds-check -fmodule-private -fimplicit-none -finit-real=nan -g -DRTE_USE_CBOOL -DRTE_USE_${{ matrix.fpmodel }}"
# Make variables:
NFHOME: /usr
FCINCLUDE: -I/usr/include
RRTMGP_ROOT: ${{ github.workspace }}
RRTMGP_DATA: ${{ github.workspace }}/rrtmgp-data
RUN_CMD:
Expand All @@ -50,6 +52,7 @@ jobs:
with:
repository: earth-system-radiation/rrtmgp-data
path: rrtmgp-data
ref: v1.8.1
#
# Synchronize the package index
#
Expand All @@ -64,7 +67,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 @@ -77,25 +80,24 @@ jobs:
miniforge-version: latest
activate-environment: rte_rrtmgp_test
environment-file: environment-noplots.yml
python-version: 3.9
python-version: 3.11
auto-activate-base: false
# Use the cache properly:
use-only-tar-bz2: true
#
# 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.1
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/documentation' }}
with:
branch: gh-pages
Expand Down
Loading

0 comments on commit d287ae5

Please sign in to comment.