From 0c9a53ba3a9c94ee60fa3825160e72ff025fb8b7 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Mon, 25 Mar 2024 06:59:21 +0100 Subject: 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"). ``` --- etc/spack/defaults/packages.yaml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'etc') 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] -- cgit v1.2.3-70-g09d2