summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2024-06-26Simplify and improve solver heuristic (#44893)Massimiliano Culpo3-39/+23
When we changed how to deal with errors in November, we didn't realize that for an unconstrained choice rule it is more important in the heuristic to guess what is NOT in the answer set, since it will be the majority of options. Previously this was following automatically from what was in the answer set, via `1 { ... } 1` cardinality constraints. Here we improve the heuristic and the solve time for specs.
2024-06-25Steal source was not assigning the package class (#44886)psakievich1-0/+1
Fetcher was missing the package class assignment
2024-06-25Docs: Update stand-alone test information (#44755)Tamara Dahlgren1-246/+387
Update and slightly reorganize stand-alone test information to include new and improved examples and more links that can be used in PR feedback.
2024-06-25add documentation for make_jobs variable (#44838)Miguel1-0/+21
* add documentation for make_jobs variable * apply suggested changes * Update packaging_guide.rst add suggestions to the documentation * Update packaging_guide.rst fix missing quotes in the documentation * suggestions to packaging_guide.rst
2024-06-25Make url_fetch tests work on Windows (#44809)Nicole C1-3/+0
2024-06-24spec_list: do not resolve abstract hashes (#44760)Harmen Stoppels2-21/+28
2024-06-21Bugfix: test_is_externally_detectable needs to use mockpackages (#44795)Tamara Dahlgren1-2/+2
2024-06-20build_environment: fix ccache error handling (#44740)Harmen Stoppels1-4/+2
2024-06-18build(deps): bump flake8 from 7.0.0 to 7.1.0 in /lib/spack/docs (#44752)dependabot[bot]1-1/+1
2024-06-18build(deps): bump urllib3 from 2.2.1 to 2.2.2 in /lib/spack/docs (#44751)dependabot[bot]1-1/+1
2024-06-11MFEM: add new version v4.7 (#44010)Veselin Dobrev2-2/+6
* Core change: logic for extracting RPATHs from modules may return `None`: filter this out of the set of RPATHs that is auto-generated * Core change: `CachedCMakePackage` no longer adds ldflags to `CMAKE_STATIC_LINKER_FLAGS`: generally these flags are not appropriate for static linking (e.g. invocation of `ar`) * [mfem] Add version 4.7 * [mfem] Add variant for precision (single/double). Enforce consistency for precision amongst mfem and hypre/petsc/mumps dependencies * [mfem] Add cxxstd (and related constraints preventing use of old cxxstd values for newer versions of some dependencies) * [hypre] In line with prior point, added support for specifying precision * [petsc] Add config option to avoid error when building against `superlu-dist+rocm` * [hiop] add proper `raja`/`umpire`/`camp` version constraints for `hiop` versions 0.3.99-0.4.x; require `+raja` for `+rocm`, and add dependency on `hiprand` for `+rocm` * [butterflypack, mfem, strumpack, suite-sparse] Require `CRAYLIBS_{target-family}` env var to be defined * [suite-sparse] versions `@7.4:` changed install location of headers: add symlink from old location to new location * [zlib-ng] Fix error where shared libs were not successfully built for `%cce@17` (the build did not fail, but the finished `zlib-ng%cce@17` install did not have shared libs)
2024-06-11Enable and constrain reuse for GitVersion installations (#43859)psakievich3-4/+56
* Preserve higher weight for CLI git ref versions Currently the concretizer fails if you reuse a git ref version that has already been installed but modify the spec at all. See #38484 for futher diagnosis The issue here is that since there is no established provenance for these versions the highest weight they are currently assigned is that of prior install. Re-use checks then fail because the weight of the version is identical to the solver. Ironically, these versions are given the highest weights possible when specified on the CLI for the first time. They should only appear in a DAG if they are an exact match or if the user specifies them at the CLI. Therefore it makes sense to preserve their higher ordering. Getting this right is critical to moving all branch based versions to a pinned git-ref in the future. * [@spackbot] updating style on behalf of psakievich * Update lib/spack/spack/solver/asp.py Co-authored-by: Greg Becker <becker33@llnl.gov> * Add provenance specific to git ref installs * Sensitvity to name that I could not track down * Add regression test * Adjust test * Add prefer standard unit-test * Style * Add required mock * Format and mark * Make unit-test case reproduce CLI investigation * Remove unnecessary mock package * [@spackbot] updating style on behalf of psakievich * Use already developed fixture * Add zlib-ng to mocks again * Remove accidental adds * Remove maintainer * [@spackbot] updating style on behalf of psakievich * Rename test file * [@spackbot] updating style on behalf of psakievich * Remove unused imports * Update tests * [@spackbot] updating style on behalf of psakievich * Style * Update lib/spack/spack/test/concretize.py Co-authored-by: Greg Becker <becker33@llnl.gov> * Update solver rule * Duplicate installed rules for installed_git_version * Revert "Duplicate installed rules for installed_git_version" This reverts commit 17223fc8d1c9461cb87e5a230f397167d1ab6d40. --------- Co-authored-by: psakievich <psakievich@users.noreply.github.com> Co-authored-by: Greg Becker <becker33@llnl.gov>
2024-06-06build(deps): bump sphinx-design from 0.5.0 to 0.6.0 in /lib/spack/docs (#44360)dependabot[bot]1-1/+1
Bumps [sphinx-design](https://github.com/executablebooks/sphinx-design) from 0.5.0 to 0.6.0. - [Release notes](https://github.com/executablebooks/sphinx-design/releases) - [Changelog](https://github.com/executablebooks/sphinx-design/blob/main/CHANGELOG.md) - [Commits](https://github.com/executablebooks/sphinx-design/compare/v0.5.0...v0.6.0) --- updated-dependencies: - dependency-name: sphinx-design dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-06build(deps): bump pytest from 8.2.1 to 8.2.2 in /lib/spack/docs (#44553)dependabot[bot]1-1/+1
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.2.1 to 8.2.2. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.2.1...8.2.2) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-05spack edit: allow edit multiple files at once (#44416)Harmen Stoppels2-61/+104
2024-06-04python: make every view a `venv` (#44382)Todd Gamblin3-53/+85
#40773 introduced python-venv, which improved build isolation and avoids issues with, e.g., `ubuntu`'s system python modifying `sysconfig` to include a (very unwanted) `local` directory within the default install layout. This addresses a few cases where #40773 removed functionality, without harming the default cases where we use `python-venv`. Traditionally, *every* view with `python` in it was essentially a virtual environment, because we would copy the `python` interpreter and `os.py` into every view when linking. We now rely on `python-venv` to do that, but only when it's used (i.e. new builds) and only for packages that have an `extends("python")` directive. This again makes every view with `python` in it a virtual environment, but only if we're not already using a package like `python-venv`. This uses a different mechanism from before -- instead of using the `virtualenv` trick of copying `python` into the prefix, we instead create a `pyvenv.cfg` like `venv` (the more modern way to do it). This fixes two things: 1. If you already had an environment before Spack `v0.22` that worked, it would stop working without a reconcretize and rebuild in `v0.22`, because we no longer copy the python interpreter on link. Adding `pyvenv.cfg` fixes this in a more modern way, so old views will keep working. 2. If you have an env that only includes python packages that use `depends_on("python")` instead of `extends("python")`, those packages will now be importable as before, though they won't have the same level of build isolation you'd get with `extends` and `python-venv`. * views: avoid making client code deal with link functions Users of views and ViewDescriptors shouldn't have to deal with link functions -- they should just say what type of linking they want. - [x] views take a link_type, not a link function - [x] views work out the link function from the link type - [x] view descriptors and commands now just tell the view what they want. * python: simplify logic for avoiding pyvenv.cfg in copy views Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-06-04nvhpc: Do not use `-Wno-error` with `nvhpc` (#44142)Todd Gamblin2-9/+31
In #30882, we made Spack ignore `-Werror` calls so that it could more easily build projects that inject `-Werror` into their builds. We did this by translating them to `-Wno-error` in the compiler wrapper. However, some compilers (like `nvhpc`) do not support `-Wno-error`. We need to exclude them from this feature until they do. - [x] make a property on `PackageBase` for `keep_werror` that knows not to use it for `nvhpc`. - [x] update property so that it keeps only the specific `-Werror=...` args for newer nvhpc's, which support `-Wno-error` but not `-Wno-error=...` --------- Co-authored-by: William Mou <william.mou1024@gmail.com> Co-authored-by: Tom Scogland <scogland1@llnl.gov> Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-06-03Consolidate concretization output for environments (#44489)Todd Gamblin6-87/+161
When Spack concretizes environments, it prints every (newly concretized) root spec individually with all of its dependencies. For most reasonably sized environments, this is too much output. This is true for three commands: * `spack concretize` when concretizing an environment with newly added specs * `spack install` when installing an environment with newly added specs * `spack spec` with no arguments in an environment The output dates back to before we had unified environments or nicer spec traversal routines, and we can improve it. This PR makes environment concretization output analogous to what we do for regular specs. Just like `spack spec` for a single spec, we show all root specs with no indentation, so you can easily see the specs you explicitly requested. Dependencies are shown: 1. With indentation according to their depth in a breadth-first traversal starting at the roots; 2. Only once if they appear on paths from multiple roots So, the default is now consistent with `spack spec` for one spec--it's `--cover=nodes`. i.e., if there are 100 specs in your environment, you'll get 100 lines of output. If you want to see more details, you can do that with `spack spec` using the arguments you're already familiar with. For example, if you wanted to see dependency types and *all* dependencies, you could use `spack spec -l --cover=edges`. Or you could add deptypes and namespaces with, e.g. `spack spec -ltN`. With no arguments in an environment, `spack spec` concretizes (if necessary) and shows the concretized environment. If you run `spack concretize` *first*, inspecting the environment repeatedly with `spack spec` will be fast, as everything is already in the `spack.lock` file. - [x] factor most logic of `Spec.tree()` out of `Spec` class into `spack.spec.tree()`, which can take multiple specs as roots. - [x] make `Spec.tree()` call `spack.spec.tree()` - [x] `spack.environment.display_specs()` now uses `spack.spec.tree()` - [x] Update `spack concretize` - [x] Update `spack install` - [x] Update `spack spec` to call `spack.spec.tree()` for environments. - [x] Continue to output specs individually for `spack spec` when using `--yaml` or `--json`
2024-05-31traverse: pass key correctly (#44460)Harmen Stoppels2-2/+25
Fixes a bug where custom keys to identify nodes were not passed correctly.
2024-05-30Bootstrapping: don't use Mac OS binaries on Windows (#44193)John W. Parent1-2/+5
`BuildcacheBootstrapper` uses `Spec.intersects` to match specs needed for bootstrapping against the binary cache. The specs were not sufficiently-detailed to prevent matching e.g. cached binaries for Mac OS on Windows; this commit adds the platform to each requested bootstrap spec to prevent that.
2024-05-30remove platform=cray (#43796)Massimiliano Culpo25-995/+24
Remove support for `cray` as a separate platform. Any platform previously detected as `cray` is now detected as `linux`. Users who still need platform=cray have to stick to Spack 0.22
2024-05-30tests: use fewer default paths (#44432)Harmen Stoppels5-69/+60
Set config:install_tree:root and modules:default:roots to something sensible.
2024-05-30concretizer: enforce host compat when reuse only (#44428)Harmen Stoppels3-4/+35
Fixes a bug in the concretizer where specs depending on a host incompatible libc would be used. This bug triggers when nothing is built. In the case where everything is reused, there is no libc provider from the perspective of the solver, there is only compatible_libc. This commit ensures that we require a host compatible libc on any reused spec, additionally to requiring compat with the chosen libc provider. Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-05-29installer: improve init signature and explicits (#44374)Harmen Stoppels6-225/+132
Change the installer to take `([pkg], args)` in the constructor instead of `[(pkg, args)]`. The reason is that certain arguments are global settings, and the new API ensures that those arguments cannot be different across different "build requests". The `explicit` install arg is now a list of hashes, and the installer is no longer responsible for determining what package is installed explicitly. This way environment installs can simply pass the list of environment roots, without them necessarily being explicit build requests. For example an env with two roots [a, b], where b depends on a, would not always cause spack install to mark b as explicit. Notice that `overwrite` already took a list of hashes, this makes `explicit` consistent. `package.do_install(explicit=True)` continues to take a boolean.
2024-05-27link: directly bind to os.* on non-windows (#44400)Harmen Stoppels5-117/+80
The windows wrappers for basic functions like `os.symlink`, `os.readlink` and `os.path.islink` in the `llnl.util.symlink` module have bugs, and trigger more file system operations on non-windows than they should. This commit just binds `llnl.util.symlink.symlink = os.symlink` etc so built-in functions are used on non-windows
2024-05-24Make `spack clean` env-aware (#44227)Peter Scheibel2-1/+17
`spack clean <spec>` will now resolve specs based on the active environment if one is active. If an env is active but no matching spec is found, this will fall back on fully concretizing.
2024-05-24Make strong preferences even stronger (#44373)Massimiliano Culpo2-14/+57
Before this PR, if Spack could see a possibility to reuse a spec that doesn't match a strong preference, it would do so. After the PR, a strong preference would take precedence.
2024-05-24add mvapich support for intel scalapack_libs (#44246)Samuel Khuvis1-0/+1
* add mvapich support for intel scalapack_libs * Add mvapich support for oneapi scalapack_libs
2024-05-24bugfix: external detection for compilers with os but not target (#44156)Greg Becker1-3/+3
avoid calling `spec.target` when None. When an external compiler package has an `os` set but no `target` set, Spack currently falls into a codepath that calls `spec.target` (which itself calls `spec.architecture.target.Microarchitecture`) when `spec.architecture.target` is None, throwing an error. e.g. ``` packages: gcc: externals: - spec: gcc@12.3.1 os=rhel7 prefix: /usr ``` --------- Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2024-05-23absolutify_elf_sonames.py: fix _patchelf (#44343)Harmen Stoppels1-4/+2
2024-05-23ASP-based solver: fix reusing externals on linux (#44316)Massimiliano Culpo3-6/+36
We need to tell clingo the libc compatibility of external nodes in buildcaches or stores, to allow reuse.
2024-05-22docs: update chain.rst to improve discussion of upstreams (#43918)mSamiolo1-2/+4
* Update chain.rst * Update lib/spack/docs/chain.rst Co-authored-by: Wouter Deconinck <wdconinc@gmail.com> * Update lib/spack/docs/chain.rst Co-authored-by: Wouter Deconinck <wdconinc@gmail.com> * docs: rm leading spaces to avoid indent --------- Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2024-05-22cuda: add v12.4.1 (#43488)pauleonix1-1/+4
2024-05-21Take a lock before querying installed_dependents (#44301)Massimiliano Culpo1-1/+2
Co-authored-by: Harmen Stoppels <me@harmenstoppels.nl>
2024-05-21Demote a warning to debug message, if C compiler is not there (#44182)Massimiliano Culpo2-0/+19
2024-05-21bump pytest from 8.2.0 to 8.2.1 --- (#44282)dependabot[bot]1-1/+1
updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21ASP-based solver: fix version optimization for roots (#44272)Massimiliano Culpo3-5/+36
This fixes a bug occurring when two root specs need to select old versions, and these versions have the same penalty in the optimization. This sometimes caused an older version to be preferred to a more recent one. The issue was the omission of `PackageNode` in the optimization tuple.
2024-05-21gitlab ci: fix untouched spec pruning on windows (#44279)Scott Wittenburg1-2/+2
Use correct path separator in get_all_package_diffs for all platforms. Ensures correct package change computation on Windows when pruning unchanged specs in Gitlab CI
2024-05-19audit: disallow github.com/org/repo/pull/n/commits/hash.patch?full_index=1 ↵Wouter Deconinck2-7/+21
(#44212) * audit: disallow github.com/org/repo/pull/n/commits/hash.patch?full_index=1 * [@spackbot] updating style on behalf of wdconinc * audit: fix style * audit: github.com/o/r/pull/n/commits/sha.patch -> sha.patch * [@spackbot] updating style on behalf of wdconinc * Revert "[@spackbot] updating style on behalf of wdconinc" This reverts commit 2ecec9923829c9514f6e09885ee57cda3688b2f4. * Revert "audit: github.com/o/r/pull/n/commits/sha.patch -> sha.patch" This reverts commit 5bd7da2cadee9dae44ce14f35a4fb72323c0b98e. * fix: modify audit message with suggested fix * audit: github.com/o/r/pull/n/commits/sha.patch -> /o/r/commit/sha.patch?full_index=1 --------- Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
2024-05-18oci buildcache: handle pagination of tags (#43136)Scott Wittenburg6-10/+171
This fixes an issue where ghcr, gitlab and possibly other container registries paginate tags by default, which violates the OCI spec v1.0, but is common practice (the spec was broken itself). After this commit, you can create build cache indices of > 100 specs on ghcr. Co-authored-by: Harmen Stoppels <me@harmenstoppels.nl>
2024-05-17docs: remove warning about repositories and package extension (#44247)Todd Gamblin1-6/+0
Local package repositories are very well supported and we test them extensively, so this warning from 8 years ago can be removed from the docs.
2024-05-17hpcviewer: Update URLs to use GitLab release assets (#44129)Jonathon Anderson2-0/+9
2024-05-17docs: show phase signature for builders (#44067)Chris Marsh1-0/+9
2024-05-17Fix broken link in docs (#44217)Andrew-Dunning-NNL1-1/+1
2024-05-17build_environment.py: deal with rpathing identical packages (#44219)Harmen Stoppels2-7/+42
When multiple gcc-runtime packages exist in the same link sub-dag, only rpath the latest.
2024-05-16Gitlab CI: Windows Configs (#43967)John W. Parent3-6/+43
Add support for Gitlab CI on Windows This PR adds the config changes required to configure and execute Gitlab pipelines running Windows builds on Windows runners using the existing Gitlab CI infrastructure (and newly added Windows infrastructure). * Adds support for generating child pipelines dispatched to Windows runners * Refactors the relevant pre-scripts, scripts, and post scripts to be compatible with Windows * Adds Windows config section describing Windows jobs * Adds VTK as Windows build stack (to be expanded later) * Modifies proj to build on Windows * Refactors Windows rpath symlinking to avoid system libs and externals --------- Co-authored-by: Ryan Krattiger <ryan.krattiger@kitware.com> Co-authored-by: Mike VanDenburgh <michael.vandenburgh@kitware.com> Co-authored-by: Todd Gamblin <tgamblin@llnl.gov> Co-authored-by: Scott Wittenburg <scott.wittenburg@kitware.com>
2024-05-16Prefer llnl.util.symlink.readlink to os.readlink (#44126)John W. Parent13-25/+33
Symlinks on Windows can use longpath prefixes (\\?\); these are fine in the context of win32 API interactions but break numerous facets of Spack behavior that rely on string parsing/matching (archiving, binary distributions, tarball extraction, view regen, etc). Spack's internal readlink method (llnl.util.symlink.readlink) gracefully handles this by removing the prefix and otherwise behaving exactly as os.readlink does, so we should prefer that in all cases.
2024-05-15bugfix: add arg to `write_line_break()` in `spack_yaml` (#42727)Todd Gamblin1-2/+2
`ruamel`'s `Emitter.write_line_break()` method takes an extra argument that we forgot to implement in our custom emitter.
2024-05-15Cdash reporting timeout (#44213)John W. Parent3-6/+8
* Add timeout to cdash reporter PUT request Add cdash timeout everywhere Correct mock responder api * Style * brief doc
2024-05-13glibc: detect from "Free Software Foundation" not "gnu" (#44154)Harmen Stoppels1-2/+2
which should be more generic