summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2021-02-17environment installs: fix reporting. (#20004)Matthias Wolf1-1/+1
PR #15702 changed the invocation of the report context when installing specs, do the same when building environments.
2021-02-17avoid circular import (#20236)Greg Becker1-1/+1
2021-02-17concretizer: call inject_patches_variants() on the roots of the specs (#20203)Andrew W Elble3-4/+14
As was done in the old concretizer. Fixes an issue where conditionally patched dependencies did not show up in spec (gdal+jasper)
2021-02-17concretizer: try hard to infer the real version of compilers (#20099)Massimiliano Culpo3-3/+53
fixes #20055 Compiler with custom versions like gcc@foo are not currently matched to the appropriate targets. This is because the version of spec doesn't match the "real" version of the compiler. This PR replicates the strategy used in the original concretizer to deal with that and tries to detect the real version of compilers if the version in the spec returns no results.
2021-02-17Fix hipcc once more (#20095)Harmen Stoppels2-27/+22
2021-02-17concretizer: don't optimize emitting version_satisfies() (#20128)Andrew W Elble2-4/+5
When all versions were allowed a version_satisfies rule was not emitted, and this caused conditional directives to fail.
2021-02-17spec: return early from concretization if a spec is already concrete (#20196)Massimiliano Culpo1-0/+3
2021-02-17concretizer: remove ad-hoc rule for external packages (#20193)Massimiliano Culpo2-7/+10
fixes #20040 Matching compilers among nodes has been prioritized in #20020. Selection of default variants has been tuned in #20182. With this setup there is no need to have an ad-hoc rule for external packages. On the contrary it should be removed to prefer having default variant values over more external nodes in the DAG.
2021-02-17concretizer: swap priority of selecting provider and default variant (#20182)Massimiliano Culpo2-13/+27
refers #20040 Before this PR optimization rules would have selected default providers at a higher priority than default variants. Here we swap this priority and we consider variants that are forced by any means (root spec or spec in depends_on clause) the same as if they were with a default value. This prevents the solver from avoiding expected configurations just because they contain directives like: depends_on('pkg+foo') and `+foo` is not the default variant value for pkg.
2021-02-17Typos: add missing closing parens (#20174)George Hartzell1-3/+3
2021-02-17concretizer: treat target ranges in directives correctly (#19988)Massimiliano Culpo2-1/+59
fixes #19981 This commit adds support for target ranges in directives, for instance: conflicts('+foo', when='target=x86_64:,aarch64:') If any target in a spec body is not a known target the following clause will be emitted: node_target_satisfies(Package, TargetConstraint) when traversing the spec and a definition of the clause will then be printed at the end similarly to what is done for package and compiler versions.
2021-02-17concretizer: prioritize matching compilers over newer versions (#20020)Massimiliano Culpo3-6/+32
fixes #20019 Before this modification having a newer version of a node came at higher priority in the optimization than having matching compilers. This could result in unexpected configurations for packages with conflict directives on compilers of the type: conflicts('%gcc@X.Y:', when='@:A.B') where changing the compiler for just that node is preferred to lower the node version to less than 'A.B'. Now the priority has been switched so the solver will try to lower the version of the nodes in question before changing their compiler.
2021-02-17concretizer: allow a bool to be passed as argument for tests dependencies ↵Massimiliano Culpo3-8/+54
(#20082) refers #20079 Added docstrings to 'concretize' and 'concretized' to document the format for tests. Added tests for the activation of test dependencies.
2021-02-17concretizer: treat conditional providers correctly (#20086)Massimiliano Culpo2-1/+18
refers #20040 This modification emits rules like: provides_virtual("netlib-lapack","blas") :- variant_value("netlib-lapack","external-blas","False"). for packages that provide virtual dependencies conditionally instead of a fact that doesn't account for the condition.
2021-02-17Docs: remove duplication in Command Reference (#20021)Adam J. Stewart2-2/+2
2021-02-17recognize macOS 11.1 as big sur (#20038)Martin Aumüller1-2/+6
Big Sur versions go 11.0, 11.0.1, 11.1 (vs. prior versions that only used the minor component) Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2021-02-17fix error handling for spack test results command (#19987)Greg Becker1-0/+1
2021-02-17hip support for umpire, chai, raja, camp (#19715)Danny Taller2-0/+139
* create HipPackage base class and do some refactoring * comments and added conflict to raja for openmp with hip
2021-02-17apple-clang: add correct path to compiler wrappers (#21662)Adam J. Stewart1-1/+1
Follow-up to #17110 ### Before ```bash CC=/Users/Adam/spack/lib/spack/env/clang/clang; export CC SPACK_CC=/usr/bin/clang; export SPACK_CC PATH=...:/Users/Adam/spack/lib/spack/env/apple-clang:/Users/Adam/spack/lib/spack/env/case-insensitive:/Users/Adam/spack/lib/spack/env:...; export PATH ``` ### After ```bash CC=/Users/Adam/spack/lib/spack/env/clang/clang; export CC SPACK_CC=/usr/bin/clang; export SPACK_CC PATH=...:/Users/Adam/spack/lib/spack/env/clang:/Users/Adam/spack/lib/spack/env/case-insensitive:/Users/Adam/spack/lib/spack/env:...; export PATH ``` `CC` and `SPACK_CC` were being set correctly, but `PATH` was using the name of the compiler `apple-clang` instead of `clang`. For most packages, since `CC` was set correctly, nothing broke. But for packages using `Makefiles` that set `CC` based on `which clang`, it was using the system compilers instead of the compiler wrappers. Discovered when working on `py-xgboost@0.90`. An alternative fix would be to copy the symlinks in `env/clang` to `env/apple-clang`. Let me know if you think there's a better way to do this, or to test this.
2021-02-16Delete unused "mutable_mock_store" fixture (#21632)Massimiliano Culpo1-31/+0
The fixture was introduced in #19690 maybe accidentally. It's not used in unit tests, and though it should be mutable it seems an exact copy of it's immutable version.
2021-02-16Pipelines: Temporary buildcache storage (#21474)Scott Wittenburg9-83/+427
Before this change, in pipeline environments where runners do not have access to persistent shared file-system storage, the only way to pass buildcaches to dependents in later stages was by using the "enable-artifacts-buildcache" flag in the gitlab-ci section of the spack.yaml. This change supports a second mechanism, named "temporary-storage-url-prefix", which can be provided instead of the "enable-artifacts-buildcache" feature, but the two cannot be used at the same time. If this prefix is provided (only "file://" and "s3://" urls are supported), the gitlab "CI_PIPELINE_ID" will be appended to it to create a url for a mirror where pipeline jobs will write buildcache entries for use by jobs in subsequent stages. If this prefix is provided, a cleanup job will be generated to run after all the rebuild jobs have finished that will delete the contents of the temporary mirror. To support this behavior a new mirror sub-command has been added: "spack mirror destroy" which can take either a mirror name or url. This change also fixes a bug in generation of "needs" list for each job. Each jobs "needs" list is supposed to only contain direct dependencies for scheduling purposes, unless "enable-artifacts-buildcache" is specified. Only in that case are the needs lists supposed to contain all transitive dependencies. This changes fixes a bug that caused the needs lists to always contain all transitive dependencies, regardless of whether or not "enable-artifacts-buildcache" was specified.
2021-02-16NAG compiler: disable forcing RPATH/RUNPATH (#21701)Sergey Kosukhin1-0/+10
2021-02-16Pipelines: DAG Pruning (#20435)Scott Wittenburg9-257/+827
Pipelines: DAG pruning During the pipeline generation staging process we check each spec against all configured mirrors to determine whether it is up to date on any of the mirrors. By default, and with the --prune-dag argument to "spack ci generate", any spec already up to date on at least one remote mirror is omitted from the generated pipeline. To generate jobs for up to date specs instead of omitting them, use the --no-prune-dag argument. To speed up the pipeline generation process, pass the --check-index-only argument. This will cause spack to check only remote buildcache indices and avoid directly fetching any spec.yaml files from mirrors. The drawback is that if the remote buildcache index is out of date, spec rebuild jobs may be scheduled unnecessarily. This change removes the final-stage-rebuild-index block from gitlab-ci section of spack.yaml. Now rebuilding the buildcache index of the mirror specified in the spack.yaml is the default, unless "rebuild-index: False" is set. Spack assigns the generated rebuild-index job runner attributes from an optional new "service-job-attributes" block, which is also used as the source of runner attributes for another generated non-build job, a no-op job, which spack generates to avoid gitlab errors when DAG pruning results in empty pipelines.
2021-02-13Correct the reference to the staged examples files (#21557)Tamara Dahlgren1-3/+3
2021-02-12Introduce a SPACK_PYTHON environment variable (#21222)Chuck Atkins1-0/+8
The SPACK_PYTHON environment variable can be set to a python interpreter to be used by the spack command. This allows the spack command itself to use a consistent and separate interpreter from whatever python might be used for package building.
2021-02-11unit test: refactored bindist.py (#21497)Massimiliano Culpo1-353/+156
Modifications: - Make use of SpackCommand objects wherever possible - Deduplicated code when possible - Moved cleaning of mirrors to fixtures - Ensure mock configuration has a clear initialization order
2021-02-11database: don't create a date object in `query()` unless it's necessaryTodd Gamblin1-5/+6
`query()` calls `datetime.datetime.fromtimestamp` regardless of whether a date query is being done. Guard this with an if statement to avoid the unnecessary work.
2021-02-11version: precompile regexes in Version constructorTodd Gamblin1-6/+9
2021-02-11spack_json: _strify should be a no-op in Python 3Todd Gamblin1-3/+7
_strify traverses *all* of the read-in data and converts strings, but only for Python 2. Ignore it in Python 3.
2021-02-11database: do not redundantly mark specs concreteTodd Gamblin2-5/+9
Speed up reads by not traversing each spec recursively when marking them concrete.
2021-02-11spec performance: don't parse in from_node_dictTodd Gamblin1-1/+3
Constructing a spec from a name instead of setting name directly forces from_node_dict to call Spec.parse(), which is slow. Avoid this by using a zero-arg constructor and setting name directly.
2021-02-10Added a context manager to swap architecturesMassimiliano Culpo5-34/+88
This solves a few FIXMEs in conftest.py, where we were manipulating globals and seeing side effects prior to registering fixtures. This commit solves the FIXMEs, but introduces a performance regression on tests that may need to be investigated
2021-02-10Move context manager to swap the current configuration into spack.configMassimiliano Culpo3-64/+78
The context manager can be used to swap the current configuration temporarily, for any use case that may need it.
2021-02-10Move context manager to swap the current store into spack.storeMassimiliano Culpo3-15/+32
The context manager can be used to swap the current store temporarily, for any use case that may need it.
2021-02-10repo: generalize "swap" context manager to also accept pathsMassimiliano Culpo16-61/+71
The method is now called "use_repositories" and makes it clear in the docstring that it accepts as arguments either Repo objects or paths. Since there was some duplication between this contextmanager and "use_repo" in the testing framework, remove the latter and use spack.repo.use_repositories across the entire code base. Make a few adjustment to MockPackageMultiRepo, since it was stating in the docstring that it was supposed to mock spack.repo.Repo and was instead mocking spack.repo.RepoPath.
2021-02-10Fix: Add a space between -isystem and the directory (#21599)Scott McMillan2-15/+15
Some compilers, such as the NV compilers, do not recognize -isystem dir when specified without a space. Works: -isystem ../include Does not work: -isystem../include This PR updates the compiler wrapper to include the space with -isystem.
2021-02-10Bugfix: environments/views on separate mounts (#20720)Greg Becker1-4/+13
Environment views fail when the tmpdir used for view generation is on a separate mount from the install_tree because the files cannot by symlinked between the two. The fix is to use an alternative tmpdir located alongside the view.
2021-02-09Procedure to deprecate old versions of software (#20767)Adam J. Stewart12-11/+124
* Procedure to deprecate old versions of software * Add documentation * Fix bug in logic * Update tab completion * Deprecate legacy packages * Deprecate old mxnet as well * More explicit docs
2021-02-09Changed stages permissions to 750 (#21425)BenWeber421-3/+3
2021-02-09Fixed uninstall rm parent folder race condition (#21424)BenWeber421-3/+12
2021-02-09Fix typo (#21567)Mark Meredith1-1/+1
2021-02-08Restore verbosity of patching (#21233)Adam J. Stewart1-6/+6
2021-02-05let intel consider cray-mpich as mpich (#21512)albestro1-0/+1
2021-02-04Fix usage of PythonPackage.test outside of PythonPackage (#20555)Adam J. Stewart1-4/+50
2021-02-04Python: add maintainer(s) (#21125)Adam J. Stewart1-0/+2
* Python: add maintainer(s) * Fix unit tests
2021-02-04spack external find: allow to search by tags (#21407)Massimiliano Culpo5-9/+55
This commit adds an option to the `external find` command that allows it to search by tags. In this way group of executables with common purposes can be grouped under a single name and a simple command can be used to detect all of them. As an example introduce the 'build-tools' tag to search for common development tools on a system
2021-02-03concretizer: simplify "fact" method (#21148)Massimiliano Culpo1-23/+5
The "fact" method before was dealing with multiple facts registered per call, which was used when we were emitting grounded rules from knowledge of the problem instance. Now that the encoding is changed we can simplify the method to deal only with a single fact per call.
2021-02-02add intel oneapi to compiler/pkg translations (#21448)Greg Becker1-1/+2
2021-02-01PythonPackage: fewer phases (#20738)Adam J. Stewart2-109/+1
2021-02-01R: add maintainer(s) (#21119)Adam J. Stewart1-0/+2
* R: add maintainer(s) * Add maintainer to base class