Quantum ESPRESSO crosscompile support#17180
Conversation
alalazo
left a comment
There was a problem hiding this comment.
Ideally we should avoid variants for this.
| # Needed anytime target architecture flags leads to a binary | ||
| # that cannot be executed on the host architecture | ||
| if '+crosscompile' in spec: | ||
| options.append('--host') |
There was a problem hiding this comment.
Isn't it possible to avoid the variant completely and just compare host and target of the spec?
There was a problem hiding this comment.
Yes, I would like to avoid the additional variant as well. I am assuming that the default behavior is that the host and target should match unless the Spack config files say otherwise? Unless there is some cross-compile boolean set somewhere, I will have to do a string comparison.
There was a problem hiding this comment.
You can detect the host using:
import llnl.util.cpu
host = llnl.util.cpu.host()and then compare host.family to self.spec.target.family to check whether you are cross-compiling or not. Would that solve the issue here?
|
@naromero77 Fine with me. I would just note that this addresses cross-compilation on Cray or BG/Q (i.e. platforms for which we explicitly define a front-end and a back-end) and not cross-compilation in general. |
Quantum ESPRESSO crosscompile variant in support of supercomputers.