From 494a74324ff615dd06410c3cd4feaeee6f717450 Mon Sep 17 00:00:00 2001 From: bcumming Date: Fri, 17 Apr 2026 09:46:05 +0200 Subject: [PATCH 1/5] add intel-oneapi-compilers support --- stackinator/recipe.py | 9 +++++++++ stackinator/schema/compilers.json | 16 ++++++++++++++++ stackinator/schema/environments.json | 2 +- stackinator/templates/Makefile.compilers | 6 ++++++ stackinator/templates/Makefile.generate-config | 4 ++-- 5 files changed, 34 insertions(+), 3 deletions(-) diff --git a/stackinator/recipe.py b/stackinator/recipe.py index 7850d036..ad4d5edf 100644 --- a/stackinator/recipe.py +++ b/stackinator/recipe.py @@ -477,6 +477,15 @@ def generate_compiler_specs(self, raw): llvm_amdgpu["exclude_from_cache"] = cache_exclude compilers["llvm-amdgpu"] = llvm_amdgpu + if raw["intel-oneapi"] is not None: + oneapi = {} + oneapi_version = raw["oneapi"]["version"] + oneapi["packages"] = False + oneapi["specs"] = [f"intel-oneapi-compilers@{oneapi_version}"] + + oneapi["exclude_from_cache"] = cache_exclude + compilers["intel-oneapi"] = oneapi + self.compilers = compilers # The path of the default configuration for the target system/cluster diff --git a/stackinator/schema/compilers.json b/stackinator/schema/compilers.json index 19ab0123..9cb38bff 100644 --- a/stackinator/schema/compilers.json +++ b/stackinator/schema/compilers.json @@ -60,6 +60,22 @@ } ], "default": null + }, + "intel-oneapi": { + "oneOf": [ + { + "type": "object", + "properties": { + "version": {"type": "string"} + }, + "additionalProperties": false, + "required": ["version"] + }, + { + "type": "null" + } + ], + "default": null } } } diff --git a/stackinator/schema/environments.json b/stackinator/schema/environments.json index 99fb0076..f8789446 100644 --- a/stackinator/schema/environments.json +++ b/stackinator/schema/environments.json @@ -63,7 +63,7 @@ "type": "array", "items": { "type": "string", - "enum": ["gcc", "nvhpc", "llvm", "llvm-amdgpu"] + "enum": ["gcc", "nvhpc", "llvm", "llvm-amdgpu", "intel-oneapi"] } }, "specs": { diff --git a/stackinator/templates/Makefile.compilers b/stackinator/templates/Makefile.compilers index f9520bd6..0485e751 100644 --- a/stackinator/templates/Makefile.compilers +++ b/stackinator/templates/Makefile.compilers @@ -51,12 +51,18 @@ llvm-amdgpu/packages.yaml: gcc/generated/env $(SPACK) compiler find --scope=user $(call compiler_bin_dirs, $$($(SPACK_HELPER) -e ./gcc find --explicit --format '{prefix}' {{ compilers.get('llvm-amdgpu').requires }})) {% endif %} +{% if compilers.get('intel-oneapi') %} +intel-oneapi/packages.yaml: gcc/generated/env + $(SPACK) compiler find --scope=user $(call compiler_bin_dirs, $$($(SPACK_HELPER) -e ./gcc find --explicit --format '{prefix}' {{ compilers.get('intel-oneapi').requires }})) +{% endif %} + {% if compilers.nvhpc %} nvhpc/packages.yaml: gcc/generated/env $(SPACK) compiler find --scope=user $(call compiler_bin_dirs, $$($(SPACK_HELPER) -e ./gcc find --explicit --format '{prefix}' {{ compilers.nvhpc.requires }})) {% endif %} + include ../Make.inc # GNU Make isn't very smart about dependencies across included Makefiles, so we diff --git a/stackinator/templates/Makefile.generate-config b/stackinator/templates/Makefile.generate-config index 1ab96844..a53a1c8c 100644 --- a/stackinator/templates/Makefile.generate-config +++ b/stackinator/templates/Makefile.generate-config @@ -4,10 +4,10 @@ CONFIG_DIR = $(STORE)/config MODULE_DIR = $(BUILD_ROOT)/modules # These will be the prefixes of the GCCs, LLVMs and NVHPCs in the respective environments. -ALL_COMPILER_PREFIXES ={% for compiler in all_compilers %} $$($(SPACK_HELPER) -e ../compilers/{{ compiler }} find --explicit --format='{prefix}' gcc llvm llvm-amdgpu nvhpc){% endfor %} +ALL_COMPILER_PREFIXES ={% for compiler in all_compilers %} $$($(SPACK_HELPER) -e ../compilers/{{ compiler }} find --explicit --format='{prefix}' gcc llvm llvm-amdgpu nvhpc intel-oneapi){% endfor %} -COMPILER_PREFIXES ={% for compiler in release_compilers %} $$($(SPACK_HELPER) -e ../compilers/{{ compiler }} find --explicit --format='{prefix}' gcc llvm llvm-amdgpu nvhpc){% endfor %} +COMPILER_PREFIXES ={% for compiler in release_compilers %} $$($(SPACK_HELPER) -e ../compilers/{{ compiler }} find --explicit --format='{prefix}' gcc llvm llvm-amdgpu nvhpc intel-oneapi){% endfor %} all: $(CONFIG_DIR)/upstreams.yaml $(CONFIG_DIR)/packages.yaml $(CONFIG_DIR)/repos.yaml{% if modules %} $(MODULE_DIR)/upstreams.yaml $(MODULE_DIR)/compilers.yaml{% endif %} From 7ddf103f9bb60c8df6cb2d55dc613fc4456237fd Mon Sep 17 00:00:00 2001 From: bcumming Date: Fri, 17 Apr 2026 10:42:00 +0200 Subject: [PATCH 2/5] tweaks to get stack-config to run --- stackinator/recipe.py | 2 +- .../templates/compilers.intel-oneapi.spack.yaml | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 stackinator/templates/compilers.intel-oneapi.spack.yaml diff --git a/stackinator/recipe.py b/stackinator/recipe.py index ad4d5edf..9a94ea85 100644 --- a/stackinator/recipe.py +++ b/stackinator/recipe.py @@ -479,7 +479,7 @@ def generate_compiler_specs(self, raw): if raw["intel-oneapi"] is not None: oneapi = {} - oneapi_version = raw["oneapi"]["version"] + oneapi_version = raw["intel-oneapi"]["version"] oneapi["packages"] = False oneapi["specs"] = [f"intel-oneapi-compilers@{oneapi_version}"] diff --git a/stackinator/templates/compilers.intel-oneapi.spack.yaml b/stackinator/templates/compilers.intel-oneapi.spack.yaml new file mode 100644 index 00000000..e567b226 --- /dev/null +++ b/stackinator/templates/compilers.intel-oneapi.spack.yaml @@ -0,0 +1,13 @@ +spack: + include: + - packages.yaml + - config.yaml + specs: +{% for spec in config.specs %} + - {{ spec }} +{% endfor %} + view: false + concretizer: + unify: when_possible + reuse: false + From dc95a8caa957b6a8de30c709e0a3d90e17008bae Mon Sep 17 00:00:00 2001 From: bcumming Date: Fri, 17 Apr 2026 11:09:07 +0200 Subject: [PATCH 3/5] add missing intel-oneapi make target --- stackinator/templates/Makefile.compilers | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stackinator/templates/Makefile.compilers b/stackinator/templates/Makefile.compilers index 0485e751..ab192221 100644 --- a/stackinator/templates/Makefile.compilers +++ b/stackinator/templates/Makefile.compilers @@ -83,6 +83,12 @@ include llvm-amdgpu/Makefile endif {% endif %} +{% if compilers.get('intel-oneapi') %} +ifneq (,$(wildcard gcc/Makefile)) +include intel-oneapi/Makefile +endif +{% endif %} + {% if compilers.nvhpc %} ifneq (,$(wildcard gcc/Makefile)) include nvhpc/Makefile From fdc6a8b9fdcc7db8591e1d28d804b1dcec14877c Mon Sep 17 00:00:00 2001 From: bcumming Date: Fri, 17 Apr 2026 16:14:35 +0200 Subject: [PATCH 4/5] latest fixes --- stackinator/etc/Make.inc | 2 +- stackinator/recipe.py | 6 +++--- stackinator/schema/compilers.json | 2 +- stackinator/schema/environments.json | 2 +- stackinator/templates/Makefile.compilers | 10 +++++----- ...aml => compilers.intel-oneapi-compilers.spack.yaml} | 0 6 files changed, 11 insertions(+), 11 deletions(-) rename stackinator/templates/{compilers.intel-oneapi.spack.yaml => compilers.intel-oneapi-compilers.spack.yaml} (100%) diff --git a/stackinator/etc/Make.inc b/stackinator/etc/Make.inc index fc92dcac..cf05543d 100644 --- a/stackinator/etc/Make.inc +++ b/stackinator/etc/Make.inc @@ -29,4 +29,4 @@ store: touch $@ # Because Spack doesn't know how to find compilers, we help it by getting the bin folder of gcc, clang, nvc given a install prefix -compiler_bin_dirs = $$(find $(1) '(' -name gcc -o -name clang -o -name nvc ')' -path '*/bin/*' '(' -type f -o -type l ')' -exec dirname {} +) +compiler_bin_dirs = $$(find $(1) '(' -name gcc -o -name clang -o -name nvc -o -name icx ')' -path '*/bin/*' '(' -type f -o -type l ')' -exec dirname {} +) diff --git a/stackinator/recipe.py b/stackinator/recipe.py index 9a94ea85..79e4b07a 100644 --- a/stackinator/recipe.py +++ b/stackinator/recipe.py @@ -477,14 +477,14 @@ def generate_compiler_specs(self, raw): llvm_amdgpu["exclude_from_cache"] = cache_exclude compilers["llvm-amdgpu"] = llvm_amdgpu - if raw["intel-oneapi"] is not None: + if raw["intel-oneapi-compilers"] is not None: oneapi = {} - oneapi_version = raw["intel-oneapi"]["version"] + oneapi_version = raw["intel-oneapi-compilers"]["version"] oneapi["packages"] = False oneapi["specs"] = [f"intel-oneapi-compilers@{oneapi_version}"] oneapi["exclude_from_cache"] = cache_exclude - compilers["intel-oneapi"] = oneapi + compilers["intel-oneapi-compilers"] = oneapi self.compilers = compilers diff --git a/stackinator/schema/compilers.json b/stackinator/schema/compilers.json index 9cb38bff..810ad0b7 100644 --- a/stackinator/schema/compilers.json +++ b/stackinator/schema/compilers.json @@ -61,7 +61,7 @@ ], "default": null }, - "intel-oneapi": { + "intel-oneapi-compilers": { "oneOf": [ { "type": "object", diff --git a/stackinator/schema/environments.json b/stackinator/schema/environments.json index f8789446..c8ee0df9 100644 --- a/stackinator/schema/environments.json +++ b/stackinator/schema/environments.json @@ -63,7 +63,7 @@ "type": "array", "items": { "type": "string", - "enum": ["gcc", "nvhpc", "llvm", "llvm-amdgpu", "intel-oneapi"] + "enum": ["gcc", "nvhpc", "llvm", "llvm-amdgpu", "intel-oneapi-compilers"] } }, "specs": { diff --git a/stackinator/templates/Makefile.compilers b/stackinator/templates/Makefile.compilers index ab192221..8418fbf0 100644 --- a/stackinator/templates/Makefile.compilers +++ b/stackinator/templates/Makefile.compilers @@ -51,9 +51,9 @@ llvm-amdgpu/packages.yaml: gcc/generated/env $(SPACK) compiler find --scope=user $(call compiler_bin_dirs, $$($(SPACK_HELPER) -e ./gcc find --explicit --format '{prefix}' {{ compilers.get('llvm-amdgpu').requires }})) {% endif %} -{% if compilers.get('intel-oneapi') %} -intel-oneapi/packages.yaml: gcc/generated/env - $(SPACK) compiler find --scope=user $(call compiler_bin_dirs, $$($(SPACK_HELPER) -e ./gcc find --explicit --format '{prefix}' {{ compilers.get('intel-oneapi').requires }})) +{% if compilers.get('intel-oneapi-compilers') %} +intel-oneapi-compilers/packages.yaml: gcc/generated/env + $(SPACK) compiler find --scope=user $(call compiler_bin_dirs, $$($(SPACK_HELPER) -e ./gcc find --explicit --format '{prefix}' {{ compilers.get('intel-oneapi-compilers').requires }})) {% endif %} {% if compilers.nvhpc %} @@ -83,9 +83,9 @@ include llvm-amdgpu/Makefile endif {% endif %} -{% if compilers.get('intel-oneapi') %} +{% if compilers.get('intel-oneapi-compilers') %} ifneq (,$(wildcard gcc/Makefile)) -include intel-oneapi/Makefile +include intel-oneapi-compilers/Makefile endif {% endif %} diff --git a/stackinator/templates/compilers.intel-oneapi.spack.yaml b/stackinator/templates/compilers.intel-oneapi-compilers.spack.yaml similarity index 100% rename from stackinator/templates/compilers.intel-oneapi.spack.yaml rename to stackinator/templates/compilers.intel-oneapi-compilers.spack.yaml From 2bf83e8a279a2a129742b8d7b4a2ef0c0bfc7bc1 Mon Sep 17 00:00:00 2001 From: bcumming Date: Fri, 17 Apr 2026 16:44:23 +0200 Subject: [PATCH 5/5] fix naming of intel compilers --- stackinator/recipe.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stackinator/recipe.py b/stackinator/recipe.py index 79e4b07a..30bf8b58 100644 --- a/stackinator/recipe.py +++ b/stackinator/recipe.py @@ -391,6 +391,10 @@ def generate_environment_specs(self, raw): # Which will compile the upstream MPI with nvfortran, as well as downstream dependendencies. if config["prefer"] is None: compiler = config["compiler"][0] + # spack uses a different name for the intel oneapi compilers + # than the package that installs them. + if compiler == "intel-oneapi-compilers": + compiler = "oneapi" config["prefer"] = [ f"%[when=%c] c={compiler} %[when=%cxx] cxx={compiler} %[when=%fortran] fortran={compiler}" ]