From ffade37d440b4ade4577d5baa471cad3fd49b7d9 Mon Sep 17 00:00:00 2001 From: Oskar Weser Date: Wed, 2 Dec 2026 21:21:54 +0100 Subject: [PATCH 1/4] Build the intel HPC legs on the hpc VM runners Co-Authored-By: Claude Opus 5.5 --- .ci/manifest.toml | 55 ++++++++++++++--------- .github/workflows/ci.yml | 97 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 129 insertions(+), 23 deletions(-) diff --git a/.ci/manifest.toml b/.ci/manifest.toml index 87ac2791..3bb99899 100644 --- a/.ci/manifest.toml +++ b/.ci/manifest.toml @@ -108,27 +108,26 @@ platform = "ubuntu-24.04" [[matrix.fortran.include]] -# HPC off along with the ARC runners (hpc-submit): lanes disabled until they are back. -# [matrix.build-hpc] -# packages = ["odc"] -# execution = "hpc-atos" -# container-credentials = true -# triggers = ["upstream-change", "rebuild-request"] - -# [matrix.build-hpc.defaults] -# job-script = "./.ci/build.sh.j2" -# cxx-compiler = "g++-8" -# build-type = "RelWithDebInfo" -# runs-on = "hpc-submit" -# container = "eccr.ecmwf.int/private-ci-images/ubuntu24.04-internal-tools" -# site = "hpc-batch" -# platform = "hpc-atos-gnu" -# # gcc/old, not a version number: as of now gives you 8.5.0 -# # `module avail gcc` lists no 8.5.0 to pin directly. -# modules = ["load prgenv/gnu", "unload gcc", "load gcc/old", "load cmake", "load ninja"] -# c-compiler-binary = "gcc" -# cxx-compiler-binary = "g++" -# time = "00:40:00" +[matrix.build-hpc] +packages = ["odc"] +execution = "hpc-atos" +container-credentials = "ECCR_PULL_ATOS_CITESTER" +triggers = ["upstream-change", "rebuild-request"] + +[matrix.build-hpc.defaults] +job-script = "./.ci/build.sh.j2" +cxx-compiler = "g++-8" +build-type = "RelWithDebInfo" +runs-on = "hpc" +container = "eccr.ecmwf.int/private-ci-images-atos-citester/ubuntu24.04-hpc-runner:latest" +site = "hpc-batch" +platform = "hpc-atos-gnu" +# gcc/old, not a version number: as of now gives you 8.5.0 +# `module avail gcc` lists no 8.5.0 to pin directly. +modules = ["load prgenv/gnu", "unload gcc", "load gcc/old", "load cmake", "load ninja"] +c-compiler-binary = "gcc" +cxx-compiler-binary = "g++" +time = "00:40:00" # [[matrix.build-hpc.include]] @@ -139,6 +138,20 @@ platform = "ubuntu-24.04" # c-compiler-binary = "gcc" # cxx-compiler-binary = "g++" +[[matrix.build-hpc.include]] +cxx-compiler = "icpx-2025.3.1" +platform = "hpc-atos-intel" +modules = ["load prgenv/intel-llvm", "unload intel", "load intel/2025.3.1", "load cmake", "load ninja"] +c-compiler-binary = "icx" +cxx-compiler-binary = "icpx" + +[[matrix.build-hpc.include]] +cxx-compiler = "icpc-2023.2.0" +platform = "hpc-atos-intel" +modules = ["load prgenv/intel", "unload intel", "load intel/2023.2.0", "load cmake", "load ninja"] +c-compiler-binary = "icc" +cxx-compiler-binary = "icpc" + [packages.odc-rust] compiler-inputs = ["cxx-compiler"] allow-stale-deps = true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5bf34d69..d2443294 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: - id: r uses: ecmwf/ci-infrastructure/actions/resolve-deps@main with: - matrix: build,fortran,rust + matrix: build,fortran,build-hpc,rust token: ${{ steps.mint.outputs.token }} rebuild-missing: 'true' - name: Wait for the deps of build, fortran @@ -91,6 +91,36 @@ jobs: client-id: ${{ vars.CI_DISPATCHER_APP_CLIENT_ID }} app-private-key: ${{ secrets.CI_DISPATCHER_APP_PRIVATE_KEY }} + hpc-gate: + needs: ci-approval + runs-on: ubuntu-latest + permissions: + pull-requests: read + outputs: + run: ${{ steps.gate.outputs.run }} + steps: + - id: gate + uses: ecmwf/ci-infrastructure/actions/hpc-gate@main + + wait-build-hpc: + needs: [ci-approval, resolve, rebuild-producers, hpc-gate] + if: needs.hpc-gate.outputs.run == 'true' + runs-on: ubuntu-latest + steps: + - id: mint + uses: ecmwf/ci-infrastructure/actions/mint-token@main + with: + client-id: ${{ vars.CI_READER_APP_CLIENT_ID }} + private-key: ${{ secrets.CI_READER_APP_PRIVATE_KEY }} + repositories: ecbuild,eckit,odc,stack-dependencies + permissions: contents:read actions:read + - name: Wait for the deps of build-hpc + uses: ecmwf/ci-infrastructure/actions/wait-for-deps@main + with: + matrix: ${{ needs.resolve.outputs.matrices }} + kinds: build-hpc + token: ${{ steps.mint.outputs.token }} + build: needs: [ci-approval, resolve, rebuild-producers, pre-commit] name: build+test (${{ matrix._resolved['job-name'] }}) @@ -183,6 +213,56 @@ jobs: install-path: ${{ steps.build.outputs.install-path }} artifact-name: ${{ matrix._resolved['own-artifact-name'] }} + build-hpc: + needs: [ci-approval, resolve, rebuild-producers, pre-commit, hpc-gate, wait-build-hpc] + if: needs.hpc-gate.outputs.run == 'true' + name: build-hpc (${{ matrix._resolved['job-name'] }}) + runs-on: ${{ matrix['runs-on'] }} + container: + image: ${{ matrix.container || '' }} + credentials: + username: ${{ secrets.ECCR_PULL_ATOS_CITESTER_NAME }} + password: ${{ secrets.ECCR_PULL_ATOS_CITESTER_TOKEN }} + strategy: + fail-fast: false + matrix: ${{ fromJSON(needs.resolve.outputs.matrices).build-hpc }} + steps: + - name: Announce image + uses: ecmwf/ci-infrastructure/actions/announce-image@main + - id: mint + uses: ecmwf/ci-infrastructure/actions/mint-token@main + with: + client-id: ${{ vars.CI_READER_APP_CLIENT_ID }} + private-key: ${{ secrets.CI_READER_APP_PRIVATE_KEY }} + repositories: ecbuild,eckit,odc,stack-dependencies + permissions: contents:read actions:read + - uses: actions/checkout@v6 + with: + persist-credentials: false + - name: Fetch resolved deps + id: deps + uses: ecmwf/ci-infrastructure/actions/fetch-deps@main + with: + deps-json: ${{ toJSON(matrix._resolved.deps) }} + token: ${{ steps.mint.outputs.token }} + stage-only: 'true' + - name: Print dependency table + uses: ecmwf/ci-infrastructure/actions/print-dep-table@main + with: + resolved: ${{ toJSON(matrix._resolved) }} + own-source: '' + - name: Build on HPC + id: build + uses: ecmwf/ci-infrastructure/actions/build-on-hpc@main + with: + site: ${{ matrix.site }} + job-script: ${{ matrix.job-script }} + matrix-leg: ${{ toJSON(matrix) }} + artifact-name: ${{ matrix._resolved['own-artifact-name'] }} + cmake-prefix-path: ${{ steps.deps.outputs.cmake-prefix-path }} + work-dir: ${{ vars.HPC_CI_WORK_DIR }} + remote-work-dir: ${{ vars.HPC_CI_REMOTE_WORK_DIR }} + rust: needs: [ci-approval, resolve, rebuild-producers, build] name: rust (${{ matrix._resolved['job-name'] }}) @@ -224,10 +304,23 @@ jobs: package: odc cmake-prefix-path: ${{ steps.deps.outputs.cmake-prefix-path }} + collect-result-hpc: + name: collect HPC results + if: always() && needs['hpc-gate'].outputs.run == 'true' + needs: [ci-approval, hpc-gate, wait-build-hpc, build-hpc] + runs-on: ubuntu-latest + permissions: + statuses: write + steps: + - uses: ecmwf/ci-infrastructure/actions/ci-result@main + with: + needs: ${{ toJSON(needs) }} + context: ci-result/hpc-atos + ci-result: name: collect results if: always() - needs: [ci-approval, pre-commit, resolve, build, fortran, rust] + needs: [ci-approval, hpc-gate, pre-commit, resolve, build, fortran, rust] runs-on: ubuntu-latest permissions: statuses: write From 33cd06a97d66030eb52f3ec1478dd83cf01882ee Mon Sep 17 00:00:00 2001 From: Oskar Weser Date: Thu, 3 Dec 2026 15:08:03 +0100 Subject: [PATCH 2/4] Enable the gcc/old HPC leg Co-Authored-By: Claude Opus 5.5 --- .ci/manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/manifest.toml b/.ci/manifest.toml index 3bb99899..e30e0353 100644 --- a/.ci/manifest.toml +++ b/.ci/manifest.toml @@ -129,7 +129,7 @@ c-compiler-binary = "gcc" cxx-compiler-binary = "g++" time = "00:40:00" -# [[matrix.build-hpc.include]] +[[matrix.build-hpc.include]] # [[matrix.build-hpc.include]] # cxx-compiler = "g++-15" From d638c8b6977d0fa6877aca6f9c40d70a0ad53153 Mon Sep 17 00:00:00 2001 From: Oskar Weser Date: Thu, 3 Dec 2026 17:53:33 +0100 Subject: [PATCH 3/4] Build the icpx HPC leg without fast math Co-Authored-By: Claude Opus 5.5 --- .ci/build.sh.j2 | 4 ++++ .ci/manifest.toml | 3 +++ 2 files changed, 7 insertions(+) diff --git a/.ci/build.sh.j2 b/.ci/build.sh.j2 index c5f942ed..3f118ad5 100644 --- a/.ci/build.sh.j2 +++ b/.ci/build.sh.j2 @@ -1,4 +1,8 @@ {% extends "ci-infrastructure/cmake-all-lanes.sh.j2" %} {% block cmake_args %} +{% if c_flags | default("") %} + -DCMAKE_C_FLAGS={{ c_flags | default("") | quote }} \ + -DCMAKE_CXX_FLAGS={{ cxx_flags | default("") | quote }} \ +{% endif %} -DENABLE_FORTRAN={{ "ON" if "odc-fortran" in ci_packages else "OFF" }} \ {% endblock %} diff --git a/.ci/manifest.toml b/.ci/manifest.toml index e30e0353..d3194d9c 100644 --- a/.ci/manifest.toml +++ b/.ci/manifest.toml @@ -144,6 +144,9 @@ platform = "hpc-atos-intel" modules = ["load prgenv/intel-llvm", "unload intel", "load intel/2025.3.1", "load cmake", "load ninja"] c-compiler-binary = "icx" cxx-compiler-binary = "icpx" +# icx/icpx default to fast math. +c-flags = "-fno-fast-math" +cxx-flags = "-fno-fast-math" [[matrix.build-hpc.include]] cxx-compiler = "icpc-2023.2.0" From e262d24601fd5279a52e7e41c88fc6d894062781 Mon Sep 17 00:00:00 2001 From: Oskar Weser Date: Thu, 3 Dec 2026 18:49:18 +0100 Subject: [PATCH 4/4] Take libaec 1.1.6 from the aec module on the HPC legs Co-Authored-By: Claude Opus 5.5 --- .ci/manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.ci/manifest.toml b/.ci/manifest.toml index d3194d9c..6f8eb6fc 100644 --- a/.ci/manifest.toml +++ b/.ci/manifest.toml @@ -124,7 +124,7 @@ site = "hpc-batch" platform = "hpc-atos-gnu" # gcc/old, not a version number: as of now gives you 8.5.0 # `module avail gcc` lists no 8.5.0 to pin directly. -modules = ["load prgenv/gnu", "unload gcc", "load gcc/old", "load cmake", "load ninja"] +modules = ["load prgenv/gnu", "unload gcc", "load gcc/old", "load cmake", "load ninja", "load aec/1.1.6"] c-compiler-binary = "gcc" cxx-compiler-binary = "g++" time = "00:40:00" @@ -141,7 +141,7 @@ time = "00:40:00" [[matrix.build-hpc.include]] cxx-compiler = "icpx-2025.3.1" platform = "hpc-atos-intel" -modules = ["load prgenv/intel-llvm", "unload intel", "load intel/2025.3.1", "load cmake", "load ninja"] +modules = ["load prgenv/intel-llvm", "unload intel", "load intel/2025.3.1", "load cmake", "load ninja", "load aec/1.1.6"] c-compiler-binary = "icx" cxx-compiler-binary = "icpx" # icx/icpx default to fast math. @@ -151,7 +151,7 @@ cxx-flags = "-fno-fast-math" [[matrix.build-hpc.include]] cxx-compiler = "icpc-2023.2.0" platform = "hpc-atos-intel" -modules = ["load prgenv/intel", "unload intel", "load intel/2023.2.0", "load cmake", "load ninja"] +modules = ["load prgenv/intel", "unload intel", "load intel/2023.2.0", "load cmake", "load ninja", "load aec/1.1.6"] c-compiler-binary = "icc" cxx-compiler-binary = "icpc"