-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'spack compiler add' can directly register spack installed compilers #7868
'spack compiler add' can directly register spack installed compilers #7868
Conversation
I marked the PR
To what concerns us at EPFL, I'll use this small PR to simplify a bit the CI scripts for deployment (and move logic from a shell script that was driving Spack into Spack itself). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestions for the error messages
supported = spack.compilers.supported_compilers() + ['llvm'] | ||
not_compilers = [x for x in specs if x.abstract.name not in supported] | ||
if not_compilers: | ||
msg = 'these packages are not compilers [{0}]' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe make that "spack-supported compilers"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we decide to continue with this PR, it's probably worth to mark in some way the packages that provide a compiler (a compiler
tag?) and rely on that for the check above. Currently, for instance, flang
and intel-parallel-studio
are not accounted as specs that provide a compiler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The question is more what are we talking about long-term wise. Will compilers become "normal" build dependencies? Then I'd put here a "spack-supported" tag as this is really all it will amount to. If compilers will remain a thing, then we need to have a larger discussions on what constitutes a compiler that is recognised by spack (i.e. there are other languages besides C/C++ and Fortran that are compiled, do they get their own compiler support?)
I really don't have the knowledge to offer a well founded opinion, but it feels like wack a mole to keep up with all possible compilers. And (at least from my well of ignorance) there isn't much difference between py-setuptools
and gcc
, as in both modify the installed package and therefore (sometimes) need to be consistent within a runtime environment.
tty.msg(msg.format(item.request)) | ||
install(item.request, echo=True) | ||
elif not_installed: | ||
msg = 'the following specs need to be installed first [{0}]' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add something like "or provide --install-missing"
for item in not_installed: | ||
msg = "Installing missing spec for '{0}' (might take a while)" | ||
tty.msg(msg.format(item.request)) | ||
install(item.request, echo=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not too familiar with this part of spack, but what does echo
do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It tells a SpackCommand
to echo the output to stdout (by default the output is not echoed, but only captured in a StringIO
and returned to the caller as a string).
The command line interface for `spack compiler add` has been extended with an additional flag (--spec SPEC) that adds the prefix of SPEC to the search paths when registering a compiler. The logic is such that a basic check is performed to ensure that the specified spec is that of a compiler. By default the compiler must be already installed but, if the `--install-missing` flag is passed, it will be bootstrapped.
85e90c3
to
bb9fdcd
Compare
Superseded by #10761 |
The command line interface for
spack compiler add
has been extended with an additional flag that adds the prefix of specs to the search paths when registering a compiler.The logic is such that a basic check is performed to ensure that the specified spec is that of a compiler. By default the compiler must be already installed but, if the
--install-missing
flag is passed, it will be bootstrapped.Examples