Spack prints a warning message before downgrading targets#13513
Spack prints a warning message before downgrading targets#13513tgamblin merged 3 commits intospack:developfrom
Conversation
|
With this PR: $ spack arch
linux-ubuntu18.04-broadwell
$ spack spec zlib %gcc@4.8
Input spec
--------------------------------
zlib%gcc@4.8
Concretized
--------------------------------
==> Warning: cannot build optimized binaries for "broadwell" using gcc@4.8. Downgrading the target to "haswell"
zlib@1.2.11%gcc@4.8+optimize+pic+shared arch=linux-ubuntu18.04-haswell |
|
Marked the PR as draft as I am not sure how we want to treat preferences in |
|
Proposed wording change to make it clear where the limitation is coming from: Instead of:
Say:
|
For now, downgrade and warn here too, as |
The current behavior for target is a hard requirement. With this packages:
all:
target: [icelake]I get the following output when compiling with old compilers: $ spack spec zlib %gcc@4.8
Input spec
--------------------------------
zlib%gcc@4.8
Concretized
--------------------------------
==> Error: cannot produce optimized binary for micro-architecture 'icelake' with gcc@4.8 [supported compiler versions are 8.0:]Is this to be considered a bug that needs fixing? |
d02915b to
b31b73b
Compare
|
@tgamblin With the latest commit target preferences in |
* Make package preferences a soft failure for targets, instead of a hard failure. * Added unit tests for preferences expressed via packages.yaml
fixes #13482
Whenever the default compiler is too old to build for the current host, Spack prints a warning message to make the user aware of the downgrading.