From 42dea4a34e3ba91218f61afac7a79058ca91c6cc Mon Sep 17 00:00:00 2001 From: Rohit Goswami Date: Fri, 20 Nov 2026 06:38:04 +0000 Subject: [PATCH] fix(hierarchy): fall back to NVHPC recipe for GCCcore level Pre-2025 nvompi toolchains pin an NVHPC easyconfig directly without a companion nvidia-compilers recipe. Fall back to the NVHPC recipe in nvidia_compilers_gcccore when no nvidia-compilers recipe matches so the GCCcore level stays in the nvompi hierarchy. --- changelog.d/+nvidia-nvhpc-gcccore.bugfix.md | 3 + src/hierarchy.rs | 89 +++++++++++++++++---- 2 files changed, 76 insertions(+), 16 deletions(-) create mode 100644 changelog.d/+nvidia-nvhpc-gcccore.bugfix.md diff --git a/changelog.d/+nvidia-nvhpc-gcccore.bugfix.md b/changelog.d/+nvidia-nvhpc-gcccore.bugfix.md new file mode 100644 index 00000000..1c86701f --- /dev/null +++ b/changelog.d/+nvidia-nvhpc-gcccore.bugfix.md @@ -0,0 +1,3 @@ +Fall back to the `NVHPC` easyconfig in `nvidia_compilers_gcccore` when +no `nvidia-compilers` recipe exists, restoring the `GCCcore` hierarchy +level for pre-2025 `NVHPC` and `nvompi` toolchains. diff --git a/src/hierarchy.rs b/src/hierarchy.rs index df4e12f6..d42c2060 100644 --- a/src/hierarchy.rs +++ b/src/hierarchy.rs @@ -979,7 +979,6 @@ fn derive_nvidia_family_hierarchy( /// `nvidia-compilers-25.3` still answers for `25.3-CUDA-12.8.0` (both pin the /// same GCCcore in practice). fn nvidia_compilers_gcccore(nvhpc_ver: &str, cands: &[Candidate]) -> Option { - let is_nvc = |c: &Candidate| c.name == "nvidia-compilers"; let joined = |c: &Candidate| { format!( "{}{}", @@ -987,21 +986,24 @@ fn nvidia_compilers_gcccore(nvhpc_ver: &str, cands: &[Candidate]) -> Option = h.members.iter().map(Toolchain::label).collect(); + assert!( + labels.iter().any(|l| l == "GCCcore-11.3.0"), + "nvompi-2022.07 hierarchy must include GCCcore-11.3.0, got {labels:?}" + ); + let dep_check = crate::check_recipe_deps(&hdf5, &universe); + assert!( + dep_check.ok(), + "HDF5 -> zlib must resolve via GCCcore-11.3.0: {:?}", + dep_check.missing + ); + } }