From 9cabe59d7e54f92d3381ba2a530e49c6431f8814 Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Sat, 21 Nov 2026 07:08:50 -0800 Subject: [PATCH] CI: shard the Phoenix test lanes in two and build the variants side by side --- .github/workflows/common/build.sh | 15 ++++++++++----- .github/workflows/test.yml | 16 +++++++++++----- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/.github/workflows/common/build.sh b/.github/workflows/common/build.sh index 5774be634c..fbc613b17d 100755 --- a/.github/workflows/common/build.sh +++ b/.github/workflows/common/build.sh @@ -111,15 +111,20 @@ if [ "$preflight_rc" -ne 0 ]; then exit "$preflight_rc" fi -# --- Variants side by side (Frontier, when the job was not given one variant) --- +# --- Variants side by side (Frontier and Phoenix, when the job was not given one variant) --- # Built one after another, the variants took 67-89 minutes with CCE on GPUs, of a -# two-hour allocation: a retry after a late failure could not finish. They stage -# under different slugs and the allocation is a whole node, so they build at the -# same time here, each with its own retry and log. The g1 partition caps a user +# two-hour allocation: a retry after a late failure could not finish. On Phoenix they took +# about 80 minutes of a 3.5 h allocation that also holds the tests. They stage +# under different slugs, so they build at the same time here, each with its own +# retry and log. The g1 partition caps a user # at 16 nodes, which is why this is not one job per variant. The full build below # then runs as a sweep: it finds everything in place and builds whatever a variant # missed, so the end state is the same as before. -if [ -z "${job_variant:-}" ] && { [ "$job_cluster" = "frontier" ] || [ "$job_cluster" = "frontier_amd" ]; }; then +if [ -z "${job_variant:-}" ] && [[ "$job_cluster" =~ ^(frontier|frontier_amd|phoenix)$ ]]; then + # Frontier's login node installed the dependencies already. Here the variants would race to build the same ones. + if [ "$job_cluster" = "phoenix" ]; then + run_build_step "${log_base}-deps.log" retry_build ./mfc.sh build --deps-only -j 8 $build_opts + fi variant_pids=() for v in base chem eos; do variant_cmd "$v" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cb4b530020..6ffc5d9746 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -617,7 +617,7 @@ jobs: # Phoenix (GT) runs on pushes to master and on every non-draft PR, like Frontier. phoenix: - name: "${{ matrix.kind == 'case-opt' && 'Case Opt | ' || '' }}Georgia Tech | Phoenix (NVHPC) (gpu-${{ matrix.interface }})" + name: "${{ matrix.kind == 'case-opt' && 'Case Opt | ' || '' }}Georgia Tech | Phoenix (NVHPC) (gpu-${{ matrix.interface }}${{ matrix.shard != '' && format(' [{0}]', matrix.shard) || '' }})" needs: [lint-gate, file-changes] if: >- !cancelled() && @@ -631,8 +631,14 @@ jobs: strategy: fail-fast: false matrix: - kind: [test, case-opt] - interface: [acc, omp] + # The suite is sharded in two: whole, it exceeded the 3.5 h allocation. + include: + - {kind: test, interface: acc, shard: '1/2'} + - {kind: test, interface: acc, shard: '2/2'} + - {kind: test, interface: omp, shard: '1/2'} + - {kind: test, interface: omp, shard: '2/2'} + - {kind: case-opt, interface: acc, shard: ''} + - {kind: case-opt, interface: omp, shard: ''} runs-on: group: phoenix labels: gt @@ -652,7 +658,7 @@ jobs: - name: Build & Test # One allocation so the queue wait is paid once. if: matrix.kind == 'test' - run: bash .github/scripts/submit-slurm-job.sh .github/workflows/common/build-and-test.sh gpu ${{ matrix.interface }} phoenix + run: bash .github/scripts/submit-slurm-job.sh .github/workflows/common/build-and-test.sh gpu ${{ matrix.interface }} phoenix "${{ matrix.shard }}" - name: Pre-Build (SLURM) if: matrix.kind == 'case-opt' @@ -674,6 +680,6 @@ jobs: - name: Print Logs if: always() run: | - for f in build-and-test-gpu-${{ matrix.interface }}.out prebuild-case-optimization-*.out run-case-optimization-*.out; do + for f in build-and-test-gpu-${{ matrix.interface }}*.out prebuild-case-optimization-*.out run-case-optimization-*.out; do if [ -f "$f" ]; then echo "=== $f ==="; cat "$f"; fi done