-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Disjoint set variant defaults prevent selection of non-default option #21911
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingconcretizationtriageThe issue needs to be prioritizedThe issue needs to be prioritized
Description
Steps to reproduce the issue
Any of the following are equivalent, it looks like the bug can be reproduced by attempting to concretize a package that:
- defines a variant whose values are disjoint sets, and
- whose variant provides a default value, and
- the user wishes to select a variant value other than the default
$ spack spec -I "mvapich2 process_managers=slurm" # default is 'auto'
SpecError: 'slurm' or 'auto' cannot be activated along with other process managers [mvapich2, variant 'process_managers']
# in _disjoint_set_validator, `values` is ('auto', 'slurm')
$ spack spec -I "gunrock applications=bc" # default is 'all'
SpecError: select either all or individual applications [gunrock, variant 'applications']
# in _disjoint_set_validator, `values` is ('all', 'bc')
$ spack spec -I "openloops processes=all.coll" # default is 'lhc.coll'
SpecError: this variant accepts combinations of values from exactly one of the following sets '('all.coll', 'lhc.coll')' [openloops, variant 'processes'] [openloops, variant 'processes']
# in _disjoint_set_validator, `values` is ('all.coll', 'lhc.coll')
...Error Message
Described above, a SpecError from _disjoint_set_validator in variant.py
Information on your system
- Spack: 0.16.1
- Python: 3.8.2
- Platform: linux-rhel7-broadwell
- Concretizer: clingo
Additional information
I'll take a look at the corresponding source code but it might be that the default is added unconditionally (even if a variant value is provided by the user), or perhaps it's added before the user-specified value filters through.
- I have run
spack debug reportand reported the version of Spack/Python/Platform - I have searched the issues of this repo and believe this is not a duplicate
- I have run the failing commands in debug mode and reported the output
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingconcretizationtriageThe issue needs to be prioritizedThe issue needs to be prioritized