summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
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
2021-02-01Python 3.10 support: collections.abc (#20441)Adam J. Stewart19-42/+140
2021-01-29Print groups properly for spack find -d (#20028)Yang Zongze1-1/+1
2021-01-28Make git fetching even quieter (for git v1.7.2+)(#21013)Adam J. Stewart1-0/+6
2021-01-27Add a context wrapper for mtime preservation (#21258)Sergey Kosukhin2-1/+44
Sometimes we need to patch a file that is a dependency for some other automatically generated file that comes in a release tarball. As a result, make tries to regenerate the dependent file using additional tools (e.g. help2man), which would not be needed otherwise. In some cases, it's preferable to avoid that (e.g. see #21255). A way to do that is to save the modification timestamps before patching and restoring them afterwards. This PR introduces a context wrapper that does that.
2021-01-27Doc default behavior of install tests (#21309)Mark C. Miller1-2/+5
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2021-01-27spack setup: remove the command for v0.17.0 (#20277)Adam J. Stewart3-204/+0
spack setup was deprecated in 0.16 and will be removed in 0.17 Follow-up to #18240
2021-01-22use module and package flags to get more correct mypy behavior (#21225)Tom Scogland2-32/+25
The first of my two upstream patches to mypy landed in the 0.800 tag that was released this morning, which lets us use module and package parameters with a .mypy.ini file that has a files key. This uses those parameters to check all of spack in style, but leaves the packages out for now since they are still very, very broken. If no package has been modified, the packages are not checked, but if one has they are. Includes some fixes for the log tests since they were not type checking. Should also fix all failures related to "duplicate module named package" errors. Hopefully the next drop of mypy will include my other patch so we can just specify the modules and packages in the config file to begin with, but for now we'll have to live with a bare mypy doing a check of the libs but not the packages. * use module and package flags to check packages properly * stop checking package files, use package flag for libs The packages are not type checkable yet, need to finish out another PR before they can be. The previous commit also didn't check the libraries properly, this one does.
2021-01-22Added @property stdcxx_libs to return -lstdc++ for AOCC compiler (#21145)AMD Toolchain Support2-0/+6
2021-01-21docs: Update the CudaPackage (build system) description (#20742)Tamara Dahlgren1-16/+101
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-01-21Added ROCmPackage (build system) documentation (#20743)Tamara Dahlgren3-2/+127
2021-01-20store sbang_install_path in buildinfo, use for subsequent relocation (#20768)eugeneswalker1-0/+11
2021-01-20[WIP] relocate.py: parallelize test replacement logic (#19690)Nathan Hanford9-210/+281
* sbang pushed back to callers; star moved to util.lang * updated unit test * sbang test moved; local tests pass Co-authored-by: Nathan Hanford <hanford1@llnl.gov>
2021-01-18add required libs for sycl programs (#20728)Robert Cohn1-1/+2
2021-01-14improve documentation for Rocm (hip amd builds) (#20812)Danny Taller1-1/+6
* improve documentation
2021-01-12concretizer: require at least a dependency type to say the dependency holdsMassimiliano Culpo2-0/+11
fixes #20784 Similarly to the previous bug, here we were deducing conditions to be imposed on nodes that were not part of the DAG.
2021-01-12concretizer: dependency conditions cannot hold if package is externalMassimiliano Culpo3-2/+9
fixes #20736 Before this one line fix we were erroneously deducing that dependency conditions hold even if a package was external. This may result in answer sets that contain imposed conditions on a node without the node being present in the DAG, hence #20736.
2021-01-12restore ability of dev-build to skip patches (#20351)Robert Underwood1-0/+1
At some point in the past, the skip_patch argument was removed from the call to package.do_install() this broke the --skip-patch flag on the dev-build command.
2021-01-11Package Repositories docs: num packages has grown (#20735)Adam J. Stewart1-1/+1
2021-01-11Update the docs footer copyright (#20741)Tamara Dahlgren1-1/+1
2021-01-06fix gpg user rundir check (#20705)eugeneswalker1-1/+1
2021-01-05concretizer: make rules on virtual packages more linearMassimiliano Culpo1-11/+9
fixes #20679 In this refactor we have a single cardinality rule on the provider, which triggers a rule transforming a dependency on a virtual package into a dependency on the provider of the virtual.
2021-01-05spack python: allow use of IPython (#20329)Vanessasaurus2-12/+76
This adds a -i option to "spack python" which allows use of the IPython interpreter; it can be used with "spack python -i ipython". This assumes it is available in the Python instance used to run Spack (i.e. that you can "import IPython").
2021-01-05bugfix for target adjustments on target ranges (#20537)Greg Becker3-15/+20
2021-01-05concretizer: use consistent naming for compiler predicates (#20677)Todd Gamblin2-10/+8
Every other predicate in the concretizer uses a `_set` suffix to implement user- or package-supplied settings, but compiler settings use a `_hard` suffix for this. There's no difference in how they're used, so make the names the same. - [x] change `node_compiler_hard` to `node_compiler_set` - [x] change `node_compiler_version_hard` to `node_compiler_version_set`
2021-01-04concretizer: simplify handling of virtual version constraintsTodd Gamblin2-18/+29
Previously, the concretizer handled version constraints by comparing all pairs of constraints and ensuring they satisfied each other. This led to INCONSISTENT ressults from clingo, due to ambiguous semantics like: version_constraint_satisfies("mpi", ":1", ":3") version_constraint_satisfies("mpi", ":3", ":1") To get around this, we introduce possible (fake) versions for virtuals, based on their constraints. Essentially, we add any Versions, VersionRange endpoints, and all such Versions and endpoints from VersionLists to the constraint. Virtuals will have one of these synthetic versions "picked" by the solver. This also allows us to remove a special case from handling of `version_satisfies/3` -- virtuals now work just like regular packages.
2021-01-04concretizer: remove rule generation code from concretizerTodd Gamblin1-70/+1
Our program only generates facts now, so remove all unused code related to generating cardinality constraints and rules.
2021-01-04concretizer: convert virtuals to facts; move all rules to `concretize.lp`Todd Gamblin2-116/+164
This converts the virtual handling in the new concretizer from already-ground rules to facts. This is the last thing that needs to be refactored, and it converts the entire concretizer to just use facts. The previous way of handling virtuals hinged on rules involving `single_provider_for` facts that were tied to the virtual and a version range. The new method uses the condition pattern we've been using for dependencies, externals, and conflicts. To handle virtuals as conditions, we impose constraints on "fake" virtual specs in the logic program. i.e., `version_satisfies("mpi", "2.0:", "2.0")` is legal whereas before we wouldn't have seen something like this. Currently, constriants are only handled on versions -- we don't handle variants or anything else yet, but they key change here is that we *could*. For a long time, virtual handling in Spack has only dealt with versions, and we'd like to be able to handle variants as well. We could easily add an integrity constraint to handle variants like the one we use for versions. One issue with the implementation here is that virtual packages don't actually declare possible versions like regular packages do. To get around that, we implement an integrity constraint like this: :- virtual_node(Virtual), version_satisfies(Virtual, V1), version_satisfies(Virtual, V2), not version_constraint_satisfies(Virtual, V1, V2). This requires us to compare every version constraint to every other, both in program generation and within the concretizer -- so there's a potentially quadratic evaluation time on virtual constraints because we don't have a real version to "anchor" things to. We just say that all the constraints need to agree for the virtual constraint to hold. We can investigate adding synthetic versions for virtuals in the future, to speed this up.
2021-01-04concretizer: consolidate handling of virtuals into spec_clausesTodd Gamblin1-26/+20
2021-01-04concretizer: make _condtion_id_counter an iteratorTodd Gamblin1-18/+18
2021-01-04concretizer: more detailed section headers in concretize.lpTodd Gamblin1-51/+69
2021-01-04ci: fix issue with latest sphinx (#20661)Massimiliano Culpo2-1/+17
2021-01-04bugfix: infinite loop when building a set from incomplete specs (#20649)Todd Gamblin1-1/+6
This code in `SpecBuilder.build_specs()` introduced in #20203, can loop seemingly interminably for very large specs: ```python set([spec.root for spec in self._specs.values()]) ``` It's deceptive, because it seems like there must be an issue with `spec.root`, but that works fine. It's building the set afterwards that takes forever, at least on `r-rminer`. Currently if you try running `spack solve r-rminer`, it loops infinitely and spins up your fan. The issue (I think) is that the spec is not yet complete when this is run, and something is going wrong when constructing and comparing so many values produced by `_cmp_key()`. We can investigate the efficiency of `_cmp_key()` separately, but for now, the fix is: ```python roots = [spec.root for spec in self._specs.values()] roots = dict((id(r), r) for r in roots) ``` We know the specs in `self._specs` are distinct (they just came out of the solver), so we can just use their `id()` to unique them here. This gets rid of the infinite loop.
2021-01-02copyrights: update all files with license headers for 2021Todd Gamblin485-486/+504
- [x] add `concretize.lp`, `spack.yaml`, etc. to licensed files - [x] update all licensed files to say 2013-2021 using `spack license update-copyright-year` - [x] appease mypy with some additions to package.py that needed for oneapi.py
2021-01-02commands: add `spack license update-copyright-year`Todd Gamblin2-17/+58
This adds a new subcommand to `spack license` that automatically updates the copyright year in files that should have a license header. - [x] add `spack license update-copyright-year` command - [x] add test
2020-12-30extends: add type kwarg (#20045)Adam J. Stewart9-20/+7
* extends: add type kwarg * Flake8 fix
2020-12-29concretizer: generate facts for externalsMassimiliano Culpo3-41/+42
Generate only facts for external specs. Substitute the use of already grounded rules with non-grounded rules in concretize.lp
2020-12-29PythonPackage: add pypi attribute to infer homepage/url/list_url (#17587)Adam J. Stewart6-63/+119
2020-12-28archspec: fixed a typo in the vendored library (#20584)Massimiliano Culpo2-2/+2
2020-12-24Remove more variables from build environment (#20156)Omri Mor1-2/+7
GCC looks for included files based on several env vars. Remove C_INCLUDE_PATH, CPLUS_INCLUDE_PATH, and OBJC_INCLUDE_PATH from the build environment to ensure it's clean and prevent accidental clobbering.
2020-12-23bugfix: do not write empty default dicts/lists in envs (#20526)Greg Becker3-47/+38
Environment yaml files should not have default values written to them. To accomplish this, we change the validator to not add the default values to yaml. We rely on the code to set defaults for all values (and use defaulting getters like dict.get(key, default)). Includes regression test.
2020-12-23concretizer: remove vestigial code and commentMassimiliano Culpo1-20/+0
2020-12-23style: ensure that all packages pass `spack style -a`Todd Gamblin3-5/+13
- fix trailing whitespace and other issues uncovered by better flake8 checking. - fix extra whitespace printed by `spack style` command