[acts] use variants['cuda_arch'] only when +cuda#27813
Merged
alalazo merged 1 commit intospack:developfrom Dec 6, 2021
Merged
Conversation
Since spack#27185, the cuda_arch variant values are conditional on +cuda. This means that for -cuda specs, the installation fails with: ``` ==> acts: Executing phase: 'cmake' ==> Error: KeyError: 'cuda_arch' /home/wdconinc/git/spack/var/spack/repos/builtin/packages/acts/package.py:222, in cmake_args: 219 log_failure_threshold = spec.variants['log_failure_threshold'].value 220 args.append("-DACTS_LOG_FAILURE_THRESHOLD={0}".format(log_failure_threshold)) 221 >> 222 cuda_arch = spec.variants['cuda_arch'].value 223 if cuda_arch != 'none': 224 args.append('-DCUDA_FLAGS=-arch=sm_{0}'.format(cuda_arch[0])) 225 ```
Contributor
Author
HadrienG2
approved these changes
Dec 6, 2021
alalazo
approved these changes
Dec 6, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since #27185, the
cuda_archvariant values are conditional on+cuda. This means that for-cudaspecs, the installation fails with:This PR ensures that
spec.variants['cuda_arch'].valueis only accessed when+cudais in the spec.Maintainer tag: @HadrienG2