Skip to content

Commit

Permalink
Merge remote-tracking branch 'scream/master' into jgfouca/final_screa…
Browse files Browse the repository at this point in the history
…m_downstream_2024_11_21

* scream/master: (145 commits)
  Mergify: dismiss reviews when new commits are pushed
  EAMxx: Add aerosols and gases outputs to ensure the microscopy baseline test is sensitive to changes in the interface.
  fix standard names for low/med/hgh cloud area fraction types
  Add standard name metadata to most EAMxx output variables
  EAMxx: Update mam4xx submodule to fix CUDA test.
  EAMxx:  Modify microphysics interface to include sethet (washout rates) computations.
  Bump DavidAnson/markdownlint-cli2-action from 17 to 18
  EAMxx: Moves fences into the interface and remove extra comments
  EAMxx: Adds missing namelist entries for multi process test
  EAMxx: Remove all diffs from microphysics cpp file
  ff mam4xx to current main
  Revert "EAMxx: Clang format"
  EAMxx:Inits constituent fluxes to zero
  fix cuda compile warnings
  EAMxx: Moves online emiss and constituent init to a new function hpp file
  EAMxx: Fixed some comments paths and other minor cleanup
  EAMxx: Clang format
  EAMxx: Fixes a gpu bug requiring a particular format for dstflx
  update mam4xx submodule to fix gpu compilation error
  EAMxx:Removes accidently added file
  ...
  • Loading branch information
jgfouca committed Nov 21, 2024
2 parents de2142e + 767c2a0 commit 28474c3
Show file tree
Hide file tree
Showing 124 changed files with 4,010 additions and 3,452 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e3sm-gh-md-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
files: '**/*.md'
separator: ","
- uses: DavidAnson/markdownlint-cli2-action@v17
- uses: DavidAnson/markdownlint-cli2-action@v18
if: steps.changed-files.outputs.any_changed == 'true'
with:
config: 'docs/.markdownlint.json'
Expand Down
39 changes: 37 additions & 2 deletions .github/workflows/eamxx-sa-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: eamxx-sa-coverage

on:
workflow_dispatch:
inputs:
submit:
description: 'Force cdash submission'
required: true
type: boolean

# Add schedule trigger for nightly runs at midnight MT (Standard Time)
schedule:
Expand All @@ -13,7 +18,8 @@ concurrency:
cancel-in-progress: true

env:
submit: ${{ github.event_name == 'schedule' && 'true' || 'false' }} # Submit to cdash only for nightlies
# 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) }}

jobs:
gcc-openmp:
Expand Down Expand Up @@ -48,11 +54,40 @@ jobs:
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: Run tests
uses: ./.github/actions/test-all-scream
with:
build_type: cov
machine: ghci-snl-cuda
generate: false
submit: ${{ env.submit }}
cmake-configs: Kokkos_ARCH_VOLTA70=ON;CMAKE_CUDA_ARCHITECTURES=70
cmake-configs: Kokkos_ARCH_HOPPER90=${{ env.Hopper }};Kokkos_ARCH_AMPERE80=${{ env.Ampere }};Kokkos_ARCH_VOLTA70=${{ env.Volta }};CMAKE_CUDA_ARCHITECTURES=${{ env.CUDA_ARCH }}
41 changes: 38 additions & 3 deletions .github/workflows/eamxx-sa-sanitizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: eamxx-sa-sanitizer

on:
workflow_dispatch:
inputs:
submit:
description: 'Force cdash submission'
required: true
type: boolean

# Add schedule trigger for nightly runs at midnight MT (Standard Time)
schedule:
Expand All @@ -13,12 +18,13 @@ concurrency:
cancel-in-progress: true

env:
submit: ${{ github.event_name == 'schedule' && 'true' || 'false' }} # Submit to cdash only for nightlies
# 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) }}

jobs:
gcc-openmp:
runs-on: [self-hosted, ghci-snl-cpu, gcc]
name: gcc-openmp / cov
name: gcc-openmp / valg
steps:
- name: Check out the repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -52,11 +58,40 @@ jobs:
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: Run tests
uses: ./.github/actions/test-all-scream
with:
build_type: ${{ matrix.build_type }}
machine: ghci-snl-cuda
generate: false
submit: ${{ env.submit }}
cmake-configs: Kokkos_ARCH_VOLTA70=ON;CMAKE_CUDA_ARCHITECTURES=70
cmake-configs: Kokkos_ARCH_HOPPER90=${{ env.Hopper }};Kokkos_ARCH_AMPERE80=${{ env.Ampere }};Kokkos_ARCH_VOLTA70=${{ env.Volta }};CMAKE_CUDA_ARCHITECTURES=${{ env.CUDA_ARCH }}
113 changes: 84 additions & 29 deletions .github/workflows/eamxx-sa-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on:
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:
Expand All @@ -34,7 +38,8 @@ concurrency:
cancel-in-progress: true

env:
submit: ${{ github.event_name == 'schedule' && 'true' || 'false' }} # Submit to cdash only for nightlies
# 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) }}

jobs:
pre_process_pr:
Expand All @@ -44,7 +49,8 @@ jobs:
relevant_paths: ${{ steps.check_paths.outputs.value }}
labels: ${{ steps.get_labels.outputs.labels }}
steps:
- id: check_paths
- name: Check files modified by PR
id: check_paths
run: |
paths=(
components/eamxx
Expand All @@ -61,9 +67,22 @@ jobs:
pattern=$(IFS=\|; echo "${paths[*]}")
# Use the GitHub API to get the list of changed files
response=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.number }}/files")
changed_files=$(echo "$response" | grep -o '"filename": *"[^"]*"' | sed 's/"filename": *//; s/"//g')
# There are page size limits, so do it in chunks
page=1
while true; do
response=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/E3SM-Project/scream/pulls/${{ github.event.number }}/files?per_page=100&page=$page")
# Check if the response is empty, and break if it is
[ -z "$response" ] && break
changed_files+=$(echo "$response" | grep -o '"filename": *"[^"]*"' | sed 's/"filename": *//; s/"//g')$'\n'
# Check if there are more pages, and quite if there aren't
[[ $(echo "$response" | jq '. | length') -lt 100 ]] && break
page=$((page + 1))
done
# Check for matches and echo the matching files (or "" if none)
matching_files=$(echo "$changed_files" | grep -E "^($pattern)" || echo "")
Expand All @@ -74,25 +93,29 @@ jobs:
echo "No relevant files touched by this PR."
echo "value=false" >> $GITHUB_OUTPUT
fi
- id: get_labels
- name: Retrieve PR labels
id: get_labels
run: |
labels="${{ join(github.event.pull_request.labels.*.name, ',') }}"
echo "labels=${labels}" >> $GITHUB_OUTPUT
gcc-openmp:
needs: [pre_process_pr]
if: |
github.event_name == 'schedule' ||
!failure() && !cancelled() &&
(
github.event_name == 'pull_request' &&
needs.pre_process_pr.outputs.relevant_paths=='true' &&
!contains(needs.pre_process_pr.outputs.labels,'CI: skip gcc') &&
!contains(needs.pre_process_pr.outputs.labels,'CI: skip openmp') &&
!contains(needs.pre_process_pr.outputs.labels,'CI: skip eamxx-sa') &&
!contains(needs.pre_process_pr.outputs.labels,'CI: skip eamxx-all')
) || (
github.event_name == 'workflow_dispatch' &&
github.event.inputs.job_to_run == 'gcc-openmp' ||
github.event.inputs.job_to_run == 'all'
github.event_name == 'schedule' ||
(
github.event_name == 'pull_request' &&
needs.pre_process_pr.outputs.relevant_paths=='true' &&
!contains(needs.pre_process_pr.outputs.labels,'CI: skip gcc') &&
!contains(needs.pre_process_pr.outputs.labels,'CI: skip openmp') &&
!contains(needs.pre_process_pr.outputs.labels,'CI: skip eamxx-sa') &&
!contains(needs.pre_process_pr.outputs.labels,'CI: skip eamxx-all')
) || (
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:
Expand Down Expand Up @@ -128,18 +151,21 @@ jobs:
gcc-cuda:
needs: [pre_process_pr]
if: |
github.event_name == 'schedule' ||
!failure() && !cancelled() &&
(
github.event_name == 'pull_request' &&
needs.pre_process_pr.outputs.relevant_paths=='true' &&
!contains(needs.pre_process_pr.outputs.labels,'CI: skip gcc') &&
!contains(needs.pre_process_pr.outputs.labels,'CI: skip cuda') &&
!contains(needs.pre_process_pr.outputs.labels,'CI: skip eamxx-sa') &&
!contains(needs.pre_process_pr.outputs.labels,'CI: skip eamxx-all')
) || (
github.event_name == 'workflow_dispatch' &&
github.event.inputs.job_to_run == 'gcc-cuda' ||
github.event.inputs.job_to_run == 'all'
github.event_name == 'schedule' ||
(
github.event_name == 'pull_request' &&
needs.pre_process_pr.outputs.relevant_paths=='true' &&
!contains(needs.pre_process_pr.outputs.labels,'CI: skip gcc') &&
!contains(needs.pre_process_pr.outputs.labels,'CI: skip cuda') &&
!contains(needs.pre_process_pr.outputs.labels,'CI: skip eamxx-sa') &&
!contains(needs.pre_process_pr.outputs.labels,'CI: skip eamxx-all')
) || (
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:
Expand All @@ -164,11 +190,40 @@ jobs:
echo "generate=true" >> $GITHUB_ENV
fi
fi
- 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: Run tests
uses: ./.github/actions/test-all-scream
with:
build_type: ${{ matrix.build_type }}
machine: ghci-snl-cuda
generate: ${{ env.generate }}
submit: ${{ env.submit }}
cmake-configs: Kokkos_ARCH_VOLTA70=ON;CMAKE_CUDA_ARCHITECTURES=70
cmake-configs: Kokkos_ARCH_HOPPER90=${{ env.Hopper }};Kokkos_ARCH_AMPERE80=${{ env.Ampere }};Kokkos_ARCH_VOLTA70=${{ env.Volta }};CMAKE_CUDA_ARCHITECTURES=${{ env.CUDA_ARCH }}
Loading

0 comments on commit 28474c3

Please sign in to comment.