Skip to content

Revised timing info in all-sky example #945

Revised timing info in all-sky example

Revised timing info in all-sky example #945

name: Continuous integration in a box
on:
push:
branches-ignore:
- documentation
pull_request:
branches-ignore:
- documentation
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]
include:
# 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"
experimental: false
# Set flags for Intel ifx Fortran Compiler
- fortran-compiler: ifx
rte-kernels: default
fcflags: "-debug -traceback -O0 -heap-arrays -assume realloc_lhs -extend-source 132 -stand f08"
experimental: false
- 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
fcflags: "-Mallocatable=03 -Mstandard -Mbounds -Mchkptr -Kieee -Mchkstk"
experimental: false
- fortran-compiler: nvfortran
rte-kernels: accel
fcflags: "-Mallocatable=03 -Mstandard -Mbounds -Mchkptr -Kieee -Mchkstk -acc"
experimental: false
# Set container images
- fortran-compiler: ifort
image: "ghcr.io/earth-system-radiation/rte-rrtmgp-ci:ifort"
- fortran-compiler: ifx
image: "ghcr.io/earth-system-radiation/rte-rrtmgp-ci:ifort"
- fortran-compiler: nvfortran
image: "ghcr.io/earth-system-radiation/rte-rrtmgp-ci:nvfortran"
container:
image: ${{ matrix.image }}
env:
# Core variables:
FC: ${{ matrix.fortran-compiler }}
FCFLAGS: ${{ matrix.fcflags }}
# Make variables:
NFHOME: /opt/netcdf-fortran
RRTMGP_ROOT: ${{ github.workspace }}
RRTMGP_DATA: ${{ github.workspace }}/rrtmgp-data
RTE_KERNELS: ${{ matrix.rte-kernels }}
RUN_CMD:
# https://github.com/earth-system-radiation/rte-rrtmgp/issues/194
OMP_TARGET_OFFLOAD: DISABLED
# Auxiliary variables:
RFMIP_CACHEDIR: .testcache
steps:
#
# Checks-out repository under $GITHUB_WORKSPACE
#
- uses: actions/checkout@v3
#
# Check out data
#
- name: Check out data
uses: actions/checkout@v3
with:
repository: earth-system-radiation/rrtmgp-data
path: rrtmgp-data
ref: feature-timing
#
# Cache RFMIP files
#
- name: Cache RFMIP files
uses: actions/cache@v3
with:
path: ${{ env.RFMIP_CACHEDIR }}
key: rfmip-files
#
# Stage RFMIP files
#
- name: Stage RFMIP files
run: |
if test ! -d "${RFMIP_CACHEDIR}"; then
mkdir -p "${RFMIP_CACHEDIR}"
( cd "${RFMIP_CACHEDIR}" && python "${GITHUB_WORKSPACE}/examples/rfmip-clear-sky/stage_files.py" )
fi
for file in "${RFMIP_CACHEDIR}"/*; do
if test ! -d "${file}"; then
echo "copying '${file}'..."
cp "${file}" "${GITHUB_WORKSPACE}/examples/rfmip-clear-sky/"
fi
done
#
# Build libraries, examples and tests
#
- name: Build libraries, examples and tests
run: |
$FC --version
make libs
make -C build separate-libs
#
# Run examples and tests
#
- name: Run examples and tests
run: make tests
#
# Compare the results
#
- name: Compare the results
run: make check
#
# Generate validation plots
#
- name: Generate validation plots
if: matrix.fortran-compiler == 'ifort' && matrix.rte-kernels == 'default'
working-directory: tests
run: python validation-plots.py
#
# Upload validation plots
#
- name: Upload validation plots
if: matrix.fortran-compiler == 'ifort' && matrix.rte-kernels == 'default'
uses: actions/upload-artifact@v3
with:
name: valdiation-plot
path: tests/validation-figures.pdf