From 39b78255ac26133c9ebe8a6c0690340ab3e01684 Mon Sep 17 00:00:00 2001 From: tcclevenger Date: Wed, 27 Aug 2025 15:42:09 -0400 Subject: [PATCH] Add weekly test for EAMxx against current Kokkos develop branch --- .github/actions/test-all-eamxx/action.yml | 27 ++++++++++++++++++++++ .github/workflows/eamxx-sa-testing.yml | 9 ++++++++ components/eamxx/scripts/test-all-eamxx | 2 ++ components/eamxx/scripts/test_all_eamxx.py | 7 ++++-- 4 files changed, 43 insertions(+), 2 deletions(-) diff --git a/.github/actions/test-all-eamxx/action.yml b/.github/actions/test-all-eamxx/action.yml index a0b4c838025f..5c3a2a4a1da4 100644 --- a/.github/actions/test-all-eamxx/action.yml +++ b/.github/actions/test-all-eamxx/action.yml @@ -41,6 +41,13 @@ inputs: description: 'Semicolon-separated list of key=value pairs for CMake to pass to test-all-eamxx' required: false default: '' + kokkos_develop: + description: 'Whether or not this is a test using Kokkos develop branch' + required: false + default: 'false' + valid_values: + - 'true' + - 'false' runs: using: "composite" @@ -77,6 +84,18 @@ runs: echo " generate : ${{ inputs.generate }}" echo " submit : ${{ inputs.submit }}" echo " cmake-configs: ${{ inputs.cmake-configs }}" + echo " kokkos dev : ${{ inputs.kokkos_develop }}" + shell: sh + - name: Checkout Kokkos develop branch + if: ${{ inputs.kokkos_develop == 'true' }} + working-directory: externals/ekat/extern/kokkos + run: | + echo "Check out up-to-date Kokkos develop branch" + if ! git remote | grep -q upstream; then + git remote add upstream https://github.com/kokkos/kokkos.git + fi + git fetch upstream + git checkout upstream/develop shell: sh - name: Run test-all-eamxx working-directory: components/eamxx @@ -98,6 +117,14 @@ runs: cmd+=" -c $config" done + # Add suffix for CDASH build name, and necessary cmake vars if this is a kokkos-develop test + if [ "${{ inputs.kokkos_develop }}" = "true" ]; then + cmd+=" --build-name-suffix kokkos_develop" + cmd+=" -c CMAKE_CXX_STANDARD=20" + cmd+=" -c Kokkos_ENABLE_IMPL_VIEW_LEGACY=ON" + cmd+=" -c Kokkos_ENABLE_DEPRECATED_CODE_4=ON" + fi + # Print the full command, then run it echo "test-all-eamxx call: $cmd" $cmd diff --git a/.github/workflows/eamxx-sa-testing.yml b/.github/workflows/eamxx-sa-testing.yml index d95b42177767..9c030ba1d2cf 100644 --- a/.github/workflows/eamxx-sa-testing.yml +++ b/.github/workflows/eamxx-sa-testing.yml @@ -42,10 +42,15 @@ on: description: 'Force cdash submission' required: true type: boolean + use_kokkos_dev: + description: 'Run with Kokkos develop branch' + 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 @@ -60,6 +65,8 @@ env: 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' || (github.event_name == 'workflow_dispatch' && inputs.use_kokkos_dev) }} jobs: gcc-openmp: @@ -95,6 +102,7 @@ jobs: submit: ${{ env.submit }} cmake-configs: Kokkos_ENABLE_OPENMP=ON ekat: ${{ env.ekat }} + kokkos_develop: ${{ env.kokkos_dev_test }} gcc-cuda: if: | ${{ @@ -163,3 +171,4 @@ jobs: 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 }} + kokkos_develop: ${{ env.kokkos_dev_test }} diff --git a/components/eamxx/scripts/test-all-eamxx b/components/eamxx/scripts/test-all-eamxx index 7e6e8e02f316..e0dba370abfa 100755 --- a/components/eamxx/scripts/test-all-eamxx +++ b/components/eamxx/scripts/test-all-eamxx @@ -113,6 +113,8 @@ OR choices_doc = ", ".join(["'{}' ({})".format(k, v) for k, v in get_test_name_dict().items()]) parser.add_argument("-t", "--test", dest="tests", action="append", default=[], help=f"Only run specific test configurations, choices={choices_doc}") + parser.add_argument("--build-name-suffix", default="", + help="Adds a suffix to the test name in dashboard by appending BUILD_NAME_MOD=str(test)+\"_\"+build-name-suffix.") parser.add_argument("-l", "--local", action="store_true", help="Allow to not specify a machine name, and have test-all-eamxx to look" diff --git a/components/eamxx/scripts/test_all_eamxx.py b/components/eamxx/scripts/test_all_eamxx.py index 3b3d289c1e33..e3ccd5de914f 100644 --- a/components/eamxx/scripts/test_all_eamxx.py +++ b/components/eamxx/scripts/test_all_eamxx.py @@ -32,7 +32,8 @@ def __init__(self, cxx_compiler=None, f90_compiler=None, c_compiler=None, local=False, root_dir=None, work_dir=None, quick_rerun=False,quick_rerun_failed=False, make_parallel_level=0, ctest_parallel_level=0, - extra_verbose=False, limit_test_regex=None, test_level="at", test_size=None): + extra_verbose=False, limit_test_regex=None, test_level="at", test_size=None, + build_name_suffix=""): ########################################################################### # When using scripts-tests, we can't pass "-l" to test-all-eamxx, @@ -61,6 +62,7 @@ def __init__(self, cxx_compiler=None, f90_compiler=None, c_compiler=None, self._test_level = test_level self._test_size = test_size self._generate = generate + self._build_name_suffix = build_name_suffix if self._quick_rerun_failed: self._quick_rerun = True @@ -474,7 +476,8 @@ def generate_ctest_config(self, cmake_config, extra_configs, test): result += f"-DBUILD_WORK_DIR={work_dir} " build_name_mod = str(test) - result += f"-DBUILD_NAME_MOD={build_name_mod} " + suffix = "_" + self._build_name_suffix if self._build_name_suffix != "" else "" + result += f"-DBUILD_NAME_MOD={build_name_mod}{suffix} " if self._limit_test_regex: result += f"-DINCLUDE_REGEX={self._limit_test_regex} "