Add workflow for weekly kokkos develop testing #2133
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: eamxx-sa | |
on: | |
# Runs on PRs against master | |
pull_request: | |
branches: [ master ] | |
types: [opened, synchronize, ready_for_review, reopened] | |
paths: | |
# first, yes to these | |
- '.github/workflows/eamxx-sa-testing.yml' | |
- '.github/actions/test-all-eamxx/**' | |
- 'cime_config/machine/config_machines.xml' | |
- 'components/eamxx/**' | |
- 'components/homme/**' | |
- 'components/eam/src/physics/rrtmgp/**' | |
- 'externals/ekat' | |
- 'externals/mam4xx' | |
- 'externals/haero' | |
- 'externals/scorpio' | |
# second, no to these | |
- '!components/eamxx/.clang-format' | |
- '!components/eamxx/docs/**' | |
- '!components/eamxx/mkdocs.yml' | |
- '!components/eamxx/cime_config/**' | |
# Manual run is used to bless | |
workflow_dispatch: | |
inputs: | |
job_to_run: | |
description: 'Job to run' | |
required: true | |
type: choice | |
options: | |
- gcc-openmp | |
- gcc-cuda | |
- all | |
bless: | |
description: 'Generate baselines' | |
required: true | |
type: boolean | |
submit: | |
description: 'Force cdash submission' | |
required: true | |
type: boolean | |
# Add schedule trigger for nightly runs at midnight MT (Standard Time) | |
schedule: | |
- cron: '0 7 * * *' # Runs at 7 AM UTC, which is midnight MT during Standard Time | |
- cron: '0 7 * * 1' # Weekly run every Monday at 7 AM UTC (using Kokkos develop branch) | |
concurrency: | |
# Two runs are in the same group if they are testing the same git ref | |
# - if trigger=pull_request, the ref is refs/pull/<PR_NUMBER>/merge | |
# - for other triggers, the ref is the branch tested | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
# Submit to cdash only for nightlies or if the user explicitly forced a submission via workflow dispatch | |
submit: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.submit) }} | |
generate: ${{ github.event_name == 'workflow_dispatch' && inputs.bless }} | |
# Do EKAT testing for nightlies or (TODO: if EKAT label is present) | |
ekat: ${{ github.event_name == 'schedule' }} | |
# For the weekly run, we test using the kokkos develop branch | |
kokkos_dev_test: ${{ github.event_name == 'schedule' && github.event.schedule == '0 7 * * 1' }} | |
jobs: | |
gcc-openmp: | |
if: | | |
${{ | |
github.event_name != 'workflow_dispatch' || | |
( | |
github.event.inputs.job_to_run == 'gcc-openmp' || | |
github.event.inputs.job_to_run == 'all' | |
) | |
}} | |
runs-on: [self-hosted, ghci-snl-cpu, gcc] | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: [dbg] #[sp, dbg, fpe, opt] | |
name: gcc-openmp / ${{ matrix.build_type }} | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v5 | |
with: | |
persist-credentials: false | |
show-progress: false | |
submodules: recursive | |
- name: Show action trigger | |
uses: ./.github/actions/show-workflow-trigger | |
- name: Checkout Kokkos develop branch | |
uses: ./.github/actions/update-to-kokkos-develop | |
- name: Run tests | |
uses: ./.github/actions/test-all-eamxx | |
with: | |
build_type: ${{ matrix.build_type }} | |
machine: ghci-snl-cpu | |
generate: ${{ env.generate }} | |
submit: ${{ env.submit }} | |
cmake-configs: Kokkos_ENABLE_OPENMP=ON | |
ekat: ${{ env.ekat }} | |
gcc-cuda: | |
if: | | |
${{ | |
github.event_name != 'workflow_dispatch' || | |
( | |
github.event.inputs.job_to_run == 'gcc-cuda' || | |
github.event.inputs.job_to_run == 'all' | |
) | |
}} | |
runs-on: [self-hosted, ghci-snl-cuda, cuda, gcc] | |
strategy: | |
fail-fast: false | |
matrix: | |
test: | |
#- build_type: sp | |
# SK: OFF | |
- build_type: dbg | |
SK: ON | |
#- build_type: opt | |
# SK: OFF | |
name: gcc-cuda / ${{ matrix.test.build_type }} | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v5 | |
with: | |
persist-credentials: false | |
show-progress: false | |
submodules: recursive | |
- name: Show action trigger | |
uses: ./.github/actions/show-workflow-trigger | |
- name: Get CUDA Arch | |
run: | | |
# Ensure nvidia-smi is available | |
if ! command -v nvidia-smi &> /dev/null; then | |
echo "nvidia-smi could not be found. Please ensure you have Nvidia drivers installed." | |
exit 1 | |
fi | |
# Get the GPU model from nvidia-smi, and set env for next step | |
gpu_model=$(nvidia-smi --query-gpu=name --format=csv,noheader | head -n 1) | |
case "$gpu_model" in | |
*"H100"*) | |
echo "Hopper=ON" >> $GITHUB_ENV | |
echo "CUDA_ARCH=90" >> $GITHUB_ENV | |
ARCH=90 | |
;; | |
*"A100"*) | |
echo "Ampere=ON" >> $GITHUB_ENV | |
echo "CUDA_ARCH=80" >> $GITHUB_ENV | |
;; | |
*"V100"*) | |
echo "Volta=ON" >> $GITHUB_ENV | |
echo "CUDA_ARCH=70" >> $GITHUB_ENV | |
;; | |
*) | |
echo "Unsupported GPU model: $gpu_model" | |
exit 1 | |
;; | |
esac | |
- name: Checkout Kokkos develop branch | |
uses: ./.github/actions/update-to-kokkos-develop | |
- name: Run tests | |
uses: ./.github/actions/test-all-eamxx | |
with: | |
build_type: ${{ matrix.test.build_type }} | |
machine: ghci-snl-cuda | |
generate: ${{ env.generate }} | |
submit: ${{ env.submit }} | |
cmake-configs: Kokkos_ARCH_HOPPER90=${{ env.Hopper }};Kokkos_ARCH_AMPERE80=${{ env.Ampere }};Kokkos_ARCH_VOLTA70=${{ env.Volta }};CMAKE_CUDA_ARCHITECTURES=${{ env.CUDA_ARCH }};SCREAM_SMALL_KERNELS=${{ matrix.test.SK }} | |
ekat: ${{ env.ekat }} |