Typically, EESSI should detect the host's architecture and select the best-match target among the available ones.
For example, for a skylake (non-AVX512) system, it will select the haswell software stack, since it does not have skylake one.
This guarantees compatibility and tries to maximize performance.
Spack will detect the host's architecture with archspec (see spack arch -t) and use it as build target by default (e.g. zen4).
If we declare external packages that were built for an ancestor of the detected microarchitecture (e.g. zen2), it will possibly reuse them in future zen4 builds. Although it may not maximize performance, this workflow works.
This is how spood should work as well: if EESSI provided only zen2 but we are using a zen4 system, Spack should be able to reuse the EESSI software stack while building for zen4.
However, it appears that EESSI and Spack do not use exactly the same mechanism to detect the host's architecture, and this can cause incompatibility problems.
For example in this CI run Spack detects a zen2 target, whereas EESSI selected the zen3 software stack. If we declare these EESSI external packages with target=zen3, as we should, Spack will not reuse them because they are not compatible with the host architecture (and Spack is configured to build for the detected host architecture, by default, unless explicitly demanded by the user).
The real impact of this issue is probably very limited in practice, but a mapping EESSI-targets <--> Spack-targets should be carefully implemented in the future.
This also applies to cases like Nvidia-Grace (EESSI: aarch64/nvidia/grace), that is identified with the more general neoverse_v2 in archspec/Spack.
Typically, EESSI should detect the host's architecture and select the best-match target among the available ones.
For example, for a
skylake(non-AVX512) system, it will select thehaswellsoftware stack, since it does not haveskylakeone.This guarantees compatibility and tries to maximize performance.
Spack will detect the host's architecture with
archspec(seespack arch -t) and use it as build target by default (e.g.zen4).If we declare external packages that were built for an ancestor of the detected microarchitecture (e.g.
zen2), it will possibly reuse them in futurezen4builds. Although it may not maximize performance, this workflow works.This is how
spoodshould work as well: if EESSI provided onlyzen2but we are using azen4system, Spack should be able to reuse the EESSI software stack while building forzen4.However, it appears that EESSI and Spack do not use exactly the same mechanism to detect the host's architecture, and this can cause incompatibility problems.
For example in this CI run Spack detects a
zen2target, whereas EESSI selected thezen3software stack. If we declare these EESSI external packages withtarget=zen3, as we should, Spack will not reuse them because they are not compatible with the host architecture (and Spack is configured to build for the detected host architecture, by default, unless explicitly demanded by the user).The real impact of this issue is probably very limited in practice, but a mapping
EESSI-targets <--> Spack-targetsshould be carefully implemented in the future.This also applies to cases like Nvidia-Grace (EESSI:
aarch64/nvidia/grace), that is identified with the more generalneoverse_v2in archspec/Spack.