Skip to content

Quantum ESPRESSO crosscompile support#17180

Merged
alalazo merged 3 commits intospack:developfrom
naromero77:QuantumESPRESSO_CrossCompile
Jun 24, 2020
Merged

Quantum ESPRESSO crosscompile support#17180
alalazo merged 3 commits intospack:developfrom
naromero77:QuantumESPRESSO_CrossCompile

Conversation

@naromero77
Copy link
Copy Markdown
Contributor

Quantum ESPRESSO crosscompile variant in support of supercomputers.

Copy link
Copy Markdown
Member

@alalazo alalazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we should avoid variants for this.

Comment on lines +228 to +231
# Needed anytime target architecture flags leads to a binary
# that cannot be executed on the host architecture
if '+crosscompile' in spec:
options.append('--host')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it possible to avoid the variant completely and just compare host and target of the spec?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Contributor Author

@alalazo This commit is a modification of a suggestion from @becker33

@alalazo
Copy link
Copy Markdown
Member

alalazo commented Jun 24, 2020

@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.

@alalazo alalazo merged commit 4c05563 into spack:develop Jun 24, 2020
@naromero77 naromero77 changed the title Quantum ESPRESSO crosscompile variant Quantum ESPRESSO crosscompile support Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants