Skip to content

Commit adcd4f7

Browse files
committed
Merge branch 'tcclevenger/eamxx/add_kokkos_dev_test' into next (PR #7643)
This is in an effort to continually update Kokkos with new releases, instead of large subversion jumps each time a component needs a new version. [BFB]
2 parents 85b7d40 + 39b7825 commit adcd4f7

File tree

4 files changed

+43
-2
lines changed

4 files changed

+43
-2
lines changed

.github/actions/test-all-eamxx/action.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ inputs:
4141
description: 'Semicolon-separated list of key=value pairs for CMake to pass to test-all-eamxx'
4242
required: false
4343
default: ''
44+
kokkos_develop:
45+
description: 'Whether or not this is a test using Kokkos develop branch'
46+
required: false
47+
default: 'false'
48+
valid_values:
49+
- 'true'
50+
- 'false'
4451

4552
runs:
4653
using: "composite"
@@ -77,6 +84,18 @@ runs:
7784
echo " generate : ${{ inputs.generate }}"
7885
echo " submit : ${{ inputs.submit }}"
7986
echo " cmake-configs: ${{ inputs.cmake-configs }}"
87+
echo " kokkos dev : ${{ inputs.kokkos_develop }}"
88+
shell: sh
89+
- name: Checkout Kokkos develop branch
90+
if: ${{ inputs.kokkos_develop == 'true' }}
91+
working-directory: externals/ekat/extern/kokkos
92+
run: |
93+
echo "Check out up-to-date Kokkos develop branch"
94+
if ! git remote | grep -q upstream; then
95+
git remote add upstream https://github.com/kokkos/kokkos.git
96+
fi
97+
git fetch upstream
98+
git checkout upstream/develop
8099
shell: sh
81100
- name: Run test-all-eamxx
82101
working-directory: components/eamxx
@@ -98,6 +117,14 @@ runs:
98117
cmd+=" -c $config"
99118
done
100119
120+
# Add suffix for CDASH build name, and necessary cmake vars if this is a kokkos-develop test
121+
if [ "${{ inputs.kokkos_develop }}" = "true" ]; then
122+
cmd+=" --build-name-suffix kokkos_develop"
123+
cmd+=" -c CMAKE_CXX_STANDARD=20"
124+
cmd+=" -c Kokkos_ENABLE_IMPL_VIEW_LEGACY=ON"
125+
cmd+=" -c Kokkos_ENABLE_DEPRECATED_CODE_4=ON"
126+
fi
127+
101128
# Print the full command, then run it
102129
echo "test-all-eamxx call: $cmd"
103130
$cmd

.github/workflows/eamxx-sa-testing.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,15 @@ on:
4242
description: 'Force cdash submission'
4343
required: true
4444
type: boolean
45+
use_kokkos_dev:
46+
description: 'Run with Kokkos develop branch'
47+
required: true
48+
type: boolean
4549

4650
# Add schedule trigger for nightly runs at midnight MT (Standard Time)
4751
schedule:
4852
- cron: '0 7 * * *' # Runs at 7 AM UTC, which is midnight MT during Standard Time
53+
- cron: '0 7 * * 1' # Weekly run every Monday at 7 AM UTC (using Kokkos develop branch)
4954

5055
concurrency:
5156
# Two runs are in the same group if they are testing the same git ref
@@ -60,6 +65,8 @@ env:
6065
generate: ${{ github.event_name == 'workflow_dispatch' && inputs.bless }}
6166
# Do EKAT testing for nightlies or (TODO: if EKAT label is present)
6267
ekat: ${{ github.event_name == 'schedule' }}
68+
# For the weekly run, we test using the kokkos develop branch
69+
kokkos_dev_test: ${{ github.event_name == 'schedule' && github.event.schedule == '0 7 * * 1' || (github.event_name == 'workflow_dispatch' && inputs.use_kokkos_dev) }}
6370

6471
jobs:
6572
gcc-openmp:
@@ -95,6 +102,7 @@ jobs:
95102
submit: ${{ env.submit }}
96103
cmake-configs: Kokkos_ENABLE_OPENMP=ON
97104
ekat: ${{ env.ekat }}
105+
kokkos_develop: ${{ env.kokkos_dev_test }}
98106
gcc-cuda:
99107
if: |
100108
${{
@@ -163,3 +171,4 @@ jobs:
163171
submit: ${{ env.submit }}
164172
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 }}
165173
ekat: ${{ env.ekat }}
174+
kokkos_develop: ${{ env.kokkos_dev_test }}

components/eamxx/scripts/test-all-eamxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ OR
113113
choices_doc = ", ".join(["'{}' ({})".format(k, v) for k, v in get_test_name_dict().items()])
114114
parser.add_argument("-t", "--test", dest="tests", action="append", default=[],
115115
help=f"Only run specific test configurations, choices={choices_doc}")
116+
parser.add_argument("--build-name-suffix", default="",
117+
help="Adds a suffix to the test name in dashboard by appending BUILD_NAME_MOD=str(test)+\"_\"+build-name-suffix.")
116118

117119
parser.add_argument("-l", "--local", action="store_true",
118120
help="Allow to not specify a machine name, and have test-all-eamxx to look"

components/eamxx/scripts/test_all_eamxx.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ def __init__(self, cxx_compiler=None, f90_compiler=None, c_compiler=None,
3232
local=False, root_dir=None, work_dir=None,
3333
quick_rerun=False,quick_rerun_failed=False,
3434
make_parallel_level=0, ctest_parallel_level=0,
35-
extra_verbose=False, limit_test_regex=None, test_level="at", test_size=None):
35+
extra_verbose=False, limit_test_regex=None, test_level="at", test_size=None,
36+
build_name_suffix=""):
3637
###########################################################################
3738

3839
# 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,
6162
self._test_level = test_level
6263
self._test_size = test_size
6364
self._generate = generate
65+
self._build_name_suffix = build_name_suffix
6466

6567
if self._quick_rerun_failed:
6668
self._quick_rerun = True
@@ -474,7 +476,8 @@ def generate_ctest_config(self, cmake_config, extra_configs, test):
474476
result += f"-DBUILD_WORK_DIR={work_dir} "
475477

476478
build_name_mod = str(test)
477-
result += f"-DBUILD_NAME_MOD={build_name_mod} "
479+
suffix = "_" + self._build_name_suffix if self._build_name_suffix != "" else ""
480+
result += f"-DBUILD_NAME_MOD={build_name_mod}{suffix} "
478481

479482
if self._limit_test_regex:
480483
result += f"-DINCLUDE_REGEX={self._limit_test_regex} "

0 commit comments

Comments
 (0)