-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Cross-compiling detection/stored in the spec object #17239
Description
In support of large scale supercomputer and even mid-tier linux clusters, it would be desirable to store in the spec whether the the current spack install invocation is a cross-compiling scenario.
Rationale
Here is a concrete use case:
#17180
Quantum ESPRESSO uses autoconf and does not have much of a concept of cross-compilation AFAIK. You have to manually add --host if you are in a cross-compile scenario. This flag suppresses autoconf from running config tests on the login node. That is all it does.
For package developers, it would be desirable if in the spec there was a boolean that took into account the architecture/platform and the compilation target to determine whether we are in a cross-compilation scenario.
Description
The platform/architecture object stores information about the frontend and backend for both the os and the target. I think it would be simple if the spec where to take this information along with the target and determine if the package needs to be cross-compiled.
Both @becker33 and @alalazo where helpful for the aforementioned pull request. It is possible to detect cross-compilation fairly easily with spec.satisfies(...) for BG/Q and Cray, but it does not cover a Linux cluster with host login nodes that are different in architecture from the compute nodes. Also, cross-compilation is not as simple as just comparing target of the frontend versus the backend -- possibly also need to compare the os. We haven't even added accelerated into the mix here.
It would of been possible for me to just hack something together to get this done based on @alalazo suggestion, but it would be more desirable to have a consistent way for package developers to do this.
Additional information
General information
naromero@thetalogin6:~/spack> spack --version
0.14.2-1489-a20ba315f
- I have run
spack --versionand reported the version of Spack - I have searched the issues of this repo and believe this is not a duplicate