Skip to content
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

Move compiler detection logic to packages #17525

Closed

Conversation

alalazo
Copy link
Member

@alalazo alalazo commented Jul 14, 2020

This PR builds on the detection mechanism introduced in #15158 and refined in #16526 and moves all the compiler detection logic to packages. This includes finding compilers on Cray by inspection of the environment modules. To this end the spack external find command has been extended with a new option --craype and new logic to inspect Cray Programming Environments has been added.

The spack compiler find command has been modified to rely on spack external find for compiler detection

Modifications:

  • Compiler detection logic is moved from spack.compilers to builtin packages
  • Added a mechanism to search for external packages on Cray
  • Added packages for each compiler supported by Spack
  • XL compilers have been split into xlc and xlf
  • CCE compilers have been split into cce-classic (Cray frontend) and cce (LLVM frontend)
  • Added a way to bundle detection tests with packages by a detection_test.yaml file living alongside package.py
  • Document how to make a package detectable on Cray

@alalazo alalazo force-pushed the features/move_compiler_detection_logic branch 3 times, most recently from 4546831 to 39fe3f7 Compare July 14, 2020 16:32
@alalazo alalazo force-pushed the features/move_compiler_detection_logic branch from 39fe3f7 to f9697a8 Compare July 27, 2020 15:40
@alalazo alalazo closed this Jul 27, 2020
@alalazo alalazo reopened this Jul 27, 2020
@alalazo alalazo force-pushed the features/move_compiler_detection_logic branch 2 times, most recently from c1eb804 to 7c639e3 Compare July 28, 2020 09:14
@alalazo alalazo force-pushed the features/move_compiler_detection_logic branch from 7c639e3 to 400e143 Compare August 11, 2020 13:53
@alalazo alalazo mentioned this pull request Aug 12, 2020
3 tasks
Moved data for compiler version detection in YAML file

The test is unique and parametrized on different compilers.
Each package might define a YAML file in the same
directory where the package.py resides. The file
should be called "detection_test.yaml" and contain
specifications to setup different detection scenarios.

Currently only specs are checked, but we can extend
the test to do a finer check on extra attributes.
The code in spack.cmd.external related to package detection
has been moved to the spack.detection package. Added
docstrings to functions.
The ExternalPackageEntry class was used to carry
information on detected specs. Now this information
is attached to the spec directly, so only specs
are manipulated during the detection process.
@alalazo alalazo force-pushed the features/move_compiler_detection_logic branch from 400e143 to f7ac7d0 Compare August 14, 2020 07:57
@becker33
Copy link
Member

becker33 commented Jun 5, 2024

Closing this as superseded by #43464

@becker33 becker33 closed this Jun 5, 2024
@alalazo alalazo deleted the features/move_compiler_detection_logic branch June 5, 2024 12:05
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