Skip to content

Try newer NVHPC image #261

Try newer NVHPC image

Try newer NVHPC image #261

Workflow file for this run

name: CI Tests
on:
pull_request:
types: [opened, synchronize, reopened]
# Do not run if the only files changed cannot affect the build
paths-ignore:
- "**.md"
- "**.MD"
- "Licence.txt"
- "Copyright.txt"
jobs:
GNU:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04, macos-14, macos-15]
compiler: [gfortran-12, gfortran-13, gfortran-14, gfortran-15]
# gfortran-10 and -11 are only on ubuntu-22.04
# gfortran-13 and -14 and -15 are not on ubuntu-22.04
# gfortran-15 is only on macos
include:
- os: ubuntu-22.04
compiler: gfortran-10
- os: ubuntu-22.04
compiler: gfortran-11
exclude:
- os: ubuntu-22.04
compiler: gfortran-13
- os: ubuntu-22.04
compiler: gfortran-14
- os: ubuntu-22.04
compiler: gfortran-15
- os: ubuntu-24.04
compiler: gfortran-15
# fail-fast if set to 'true' here is good for production, but when
# debugging, set to 'false'. fail-fast means if *any* ci test in the matrix fails
# GitHub Actions will stop any other test immediately. So good for production, bad
# when trying to figure something out. For more info see:
# https://www.edwardthomson.com/blog/github_actions_6_fail_fast_matrix_workflows.html
fail-fast: false
env:
FC: ${{ matrix.compiler }}
LANGUAGE: en_US.UTF-8
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
LC_TYPE: en_US.UTF-8
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
OMPI_MCA_btl_vader_single_copy_mechanism: none
name: ${{ matrix.os }} / ${{ matrix.compiler }}
steps:
- name: Compiler Versions
run: |
${FC} --version
cmake --version
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set all directories as git safe
run: |
git config --global --add safe.directory '*'
- name: Build GFE Prereqs
run: |
bash ./tools/ci-install-gfe.bash
- name: Build gFTL
run: |
mkdir -p build
cd build
cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/gFTL -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE
make -j4
- name: Build Tests
run: |
cd build
make -j4 tests || ctest -j1 --output-on-failure --repeat until-pass:4
- name: Run Tests
run: |
cd build
ctest -j1 --output-on-failure --repeat until-pass:4
- name: Archive log files on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: logfiles
path: |
build/**/*.log
Intel:
runs-on: ubuntu-22.04
env:
FC: ifx
CC: icx
name: Intel Fortran
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set all directories as git safe
run: |
git config --global --add safe.directory '*'
- name: Setup Intel oneAPI repository
run: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
sudo apt-get update
- name: Install Intel oneAPI compilers
timeout-minutes: 5
run: sudo apt-get install intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp
# optional
- name: Install Intel MPI
timeout-minutes: 5
run: sudo apt-get install intel-oneapi-mpi intel-oneapi-mpi-devel
- name: Setup Intel oneAPI environment
run: |
source /opt/intel/oneapi/setvars.sh
printenv >> $GITHUB_ENV
printenv | grep intel
- name: Versions
run: |
${FC} --version
${CC} --version
mpirun --version
cmake --version
- name: Build GFE Prereqs
run: |
bash ./tools/ci-install-gfe.bash
- name: Build gFTL
run: |
mkdir -p build
cd build
cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/gFTL -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE
make -j4
- name: Build Tests
run: |
cd build
make -j4 tests || ctest -j1 --output-on-failure --repeat until-pass:4
- name: Run Tests
run: |
cd build
ctest -j1 --output-on-failure --repeat until-pass:4
- name: Archive log files on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: logfiles
path: |
build/**/*.log
# NOTE: This is weird because the NVHPC image is so large (~8GB) that
# we have to do some tricks to get it to run in GitHub Actions.
Nvidia-Build-Only:
runs-on: ubuntu-24.04
env:
FC: nvfortran
NVHPC_IMAGE: nvcr.io/nvidia/nvhpc:25.7-devel-cuda12.9-ubuntu24.04
steps:
# Reclaim lots of space
- name: Free disk space
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
# Move /var/lib/docker onto the larger ephemeral disk (do this before any docker pulls)
- name: Maximize build space (move Docker storage)
uses: easimon/maximize-build-space@v10
with:
root-reserve-mb: 4096
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
build-mount-path: '/var/lib/docker'
- name: Reset Docker daemon & prune
run: |
sudo systemctl restart docker
docker system prune -af || true
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Pull NVHPC image
run: docker pull "$NVHPC_IMAGE"
# Run everything inside the NVHPC container
- name: Build (inside NVHPC)
run: |
docker run --rm \
-v "$GITHUB_WORKSPACE:/workspace" \
-w /workspace \
-e FC="$FC" \
"$NVHPC_IMAGE" \
bash -lc '
set -euo pipefail
echo "== Versions =="
${FC} --version || true
# Base NVHPC images are minimal; install what you need
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
cmake git python-is-python3 ca-certificates pkg-config make
cmake --version
echo "== Git safe.directory =="
git config --global --add safe.directory "*"
echo "== Build GFE Prereqs =="
bash ./tools/ci-install-gfe.bash
echo "== Build gFTL =="
mkdir -p build
cd build
cmake .. \
-DCMAKE_Fortran_COMPILER=${FC} \
-DCMAKE_INSTALL_PREFIX=${HOME}/Software/gFTL \
-DCMAKE_PREFIX_PATH=${HOME}/Software/GFE
make -j4
echo "== Build Tests (CURRENTLY TURNED OFF DUE TO PFUNIT ISSUES) =="
#make -j4 tests || ctest -j1 --output-on-failure --repeat until-pass:4
echo "== Run Tests (CURRENTLY TURNED OFF DUE TO PFUNIT ISSUES) =="
#ctest -j1 --output-on-failure --repeat until-pass:4
'
- name: Archive log files on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: logfiles
path: |
build/**/*.log
Flang:
runs-on: ubuntu-latest
container: gmao/llvm-flang:latest
env:
FC: flang-new
name: Flang
steps:
- name: Versions
run: |
${FC} --version
cmake --version
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set all directories as git safe
run: |
git config --global --add safe.directory '*'
- name: Add python-is-python3 package
run: |
apt-get update
apt-get install -y python-is-python3
- name: Build GFE Prereqs
run: |
bash ./tools/ci-install-gfe.bash
- name: Build gFTL
run: |
mkdir -p build
cd build
cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/gFTL -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE
make -j4
- name: Build Tests
run: |
cd build
make -j4 tests || ctest -j1 --output-on-failure --repeat until-pass:4
- name: Run Tests
run: |
cd build
ctest -j1 --output-on-failure --repeat until-pass:4
- name: Archive log files on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: logfiles
path: |
build/**/*.log