diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2024-03-25 06:59:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-24 22:59:21 -0700 |
commit | 0c9a53ba3a9c94ee60fa3825160e72ff025fb8b7 (patch) | |
tree | 62162f8c017b87af8b55d0829cd663824b15df87 /etc | |
parent | 1fd4353289ec58913a4faf70e4851f66767bb623 (diff) | |
download | spack-0c9a53ba3a9c94ee60fa3825160e72ff025fb8b7.tar.gz spack-0c9a53ba3a9c94ee60fa3825160e72ff025fb8b7.tar.bz2 spack-0c9a53ba3a9c94ee60fa3825160e72ff025fb8b7.tar.xz spack-0c9a53ba3a9c94ee60fa3825160e72ff025fb8b7.zip |
Add `intel-oneapi-runtime`, allow injecting virtual dependencies (#42062)
This PR adds:
- A new runtime for `%oneapi` compilers, called `intel-oneapi-runtime`
- Information to both `gcc-runtime` and `intel-oneapi-runtime`, to ensure
that we don't mix compilers using different soname for either `libgfortran`
or `libifcore`
To do so, the following internal mechanisms have been implemented:
- Possibility to inject virtual dependencies from the `runtime_constraints`
callback on packages
Information has been added to `gcc-runtime` to provide the correct soname
under different conditions on its `%gcc`.
Rules injected into the solver looks like:
```prolog
% Add a dependency on 'gfortran@5' for nodes compiled with gcc@=13.2.0 and using the 'fortran' language
attr("dependency_holds", node(ID, Package), "gfortran", "link") :-
attr("node", node(ID, Package)),
attr("node_compiler", node(ID, Package), "gcc"),
attr("node_compiler_version", node(ID, Package), "gcc", "13.2.0"),
not external(node(ID, Package)),
not runtime(Package),
attr("language", node(ID, Package), "fortran").
attr("virtual_node", node(RuntimeID, "gfortran")) :-
attr("depends_on", node(ID, Package), ProviderNode, "link"),
provider(ProviderNode, node(RuntimeID, "gfortran")),
attr("node", node(ID, Package)),
attr("node_compiler", node(ID, Package), "gcc"),
attr("node_compiler_version", node(ID, Package), "gcc", "13.2.0"),
not external(node(ID, Package)),
not runtime(Package),
attr("language", node(ID, Package), "fortran").
attr("node_version_satisfies", node(RuntimeID, "gfortran"), "5") :-
attr("depends_on", node(ID, Package), ProviderNode, "link"),
provider(ProviderNode, node(RuntimeID, "gfortran")),
attr("node", node(ID, Package)),
attr("node_compiler", node(ID, Package), "gcc"),
attr("node_compiler_version", node(ID, Package), "gcc", "13.2.0"),
not external(node(ID, Package)),
not runtime(Package),
attr("language", node(ID, Package), "fortran").
```
Diffstat (limited to 'etc')
-rw-r--r-- | etc/spack/defaults/packages.yaml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/etc/spack/defaults/packages.yaml b/etc/spack/defaults/packages.yaml index 24d19ac4cb..654875a575 100644 --- a/etc/spack/defaults/packages.yaml +++ b/etc/spack/defaults/packages.yaml @@ -24,6 +24,7 @@ packages: elf: [elfutils] fftw-api: [fftw, amdfftw] flame: [libflame, amdlibflame] + fortran-rt: [gcc-runtime, intel-oneapi-runtime] fuse: [libfuse] gl: [glx, osmesa] glu: [mesa-glu, openglu] @@ -34,7 +35,9 @@ packages: java: [openjdk, jdk, ibm-java] jpeg: [libjpeg-turbo, libjpeg] lapack: [openblas, amdlibflame] + libgfortran: [ gcc-runtime ] libglx: [mesa+glx, mesa18+glx] + libifcore: [ intel-oneapi-runtime ] libllvm: [llvm] libosmesa: [mesa+osmesa, mesa18+osmesa] lua-lang: [lua, lua-luajit-openresty, lua-luajit] |