summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2023-12-19`spack config get`/`blame`: with no args, show entire config Massimiliano Culpo3-42/+43
This PR changes the default behavior of `spack config get` and `spack config blame` to print a flattened version of the entire spack configuration, including any active environment, if the commands are invoked with no section arguments. The new behavior is used in Gitlab CI to help debug CI configuration, but it can also be useful when asking for more information in issues, or when simply debugging Spack.
2023-12-18environment modifications for externals (#41723)Greg Becker4-1/+60
* allow externals to configure environment modifications * docs for external env modification --------- Co-authored-by: becker33 <becker33@users.noreply.github.com>
2023-12-18build(deps): bump isort from 5.12.0 to 5.13.2 in /lib/spack/docs (#41651)dependabot[bot]1-1/+1
Bumps [isort](https://github.com/pycqa/isort) from 5.12.0 to 5.13.2. - [Release notes](https://github.com/pycqa/isort/releases) - [Changelog](https://github.com/PyCQA/isort/blob/main/CHANGELOG.md) - [Commits](https://github.com/pycqa/isort/compare/5.12.0...5.13.2) --- updated-dependencies: - dependency-name: isort 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>
2023-12-18spack.config: cleanup and add type hints (#41741)Massimiliano Culpo4-164/+177
2023-12-18asp.py: remove "CLI" reference (#41718)Harmen Stoppels2-6/+6
Can also be an environment root, or programatically `Spec("x").concretized()`.
2023-12-18`spack develop`: convert to config (#35273)Peter Scheibel11-208/+365
Convert the 'develop' section of an environment to a dedicated configuration section. This means for example that instead of having to define `develop` specs in the `spack.yaml`, the environment can `include:` another `develop.yaml` configuration which specifies which specs should be developed in the environment. This change is not expected to be disruptive given that existing environment `spack.yaml` files will conform to the new schema. (Update 11/28/2023) I have implemented the `develop`/`undevelop` commands in terms of more-generic modification functions added to the `config` module: `change_or_add` and `update_all`. It is assumed that the semantics added here (described in 11/18 update) would be desirable to extend to other config update actions (e.g. adding compilers, changing package requirements, adding mirrors). (Update 11/18/2023) I have updated this such that `spack develop`, and `spack undevelop` to potentially modify all writable scopes, like https://github.com/spack/spack/pull/41147. https://github.com/spack/spack/pull/35307 will be useful for modifying included scopes, but generally speaking specifying a `--scope` will not be required for `spack develop`: `spack develop` will add new develop specs to whatever scope already has develop specs defined, or to the highest-priority writable scope (which should be the env scope). TODOs: - [x] If you `spack undevelop` a package which is mentioned at multiple layers of configuration, then currently this would only modify one of them. That's not technically a new issue (has always existed for configuration modification), but may be confusing to users when presented via an interface other than `spack config set` - [x] Need to add (or confirm) the ability to modify individual config files by providing a path (rather than using a scope identifier as a key to retrieve associated config). - [x] `spack develop` adds new develop specs to the scope that defines them (potentially skipping higher priority scopes to e.g. augment included scope files) --------- Co-authored-by: scheibelp <scheibelp@users.noreply.github.com> Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2023-12-14spec parser: precompile quoting-related regular expressions (#41657)Todd Gamblin2-8/+8
This adds a small (~5%) performance improvement to Spec parsing. Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2023-12-13Improve parsing of quoted flags and variants in specs (#41529)Todd Gamblin7-188/+198
This PR does several things: - [x] Allow any character to appear in the quoted values of variants and flags. - [x] Allow easier passing of quoted flags on the command line, e.g. `cflags="-O2 -g"`. - [x] Handle quoting better in spec output, using single quotes around double quotes and vice versa. - [x] Disallow spaces around `=` and `==` when parsing variants and flags. ## Motivation This PR is motivated by the issues above and by ORNL's [tips for launching at scale on Frontier](https://docs.olcf.ornl.gov/systems/frontier_user_guide.html#tips-for-launching-at-scale). ORNL recommends using `sbcast --send-libs` to broadcast executables and their libraries to compute nodes when running large jobs (e.g., 80k ranks). For an executable named `exe`, `sbcast --send-libs` stores the needed libraries in a directory alongside the executable called `exe_libs`. ORNL recommends pointing `LD_LIBRARY_PATH` at that directory so that `exe` will find the local libraries and not overwhelm the filesystem. There are other ways to mitigate this problem: * You could build with `RUNPATH` using `spack config add config:shared_linking:type:runpath`, which would make `LD_LIBRARY_PATH` take precedence over Spack's `RUNPATHs`. I don't recommend this one because `RUNPATH` can cause many other things to go wrong. * You could use `spack config add config:shared_linking:bind:true`, added in #31948, which will greatly reduce the filesystem load for large jobs by pointing `DT_NEEDED` entries in ELF *directly* at the needed `.so` files instead of relying on `RPATH` search via soname. I have not experimented with this at 80,000 ranks, but it should help quite a bit. * You could use [Spindle](https://github.com/hpc/Spindle) (as LLNL does on its machines) which should transparently fix this without any changes to your executable and without any need to use `sbcast` or other tools. But we want to support the `sbcast` use case as well. ## `sbcast` and Spack Spack's `RPATHs` break the `sbcast` fix because they're considered with higher precedence than `LD_LIBRARY_PATH`. So Spack applications will still end up hitting the shared filesystem when searching for libraries. We can avoid this by injecting some `ldflags` in to the build, e.g., if were were going to launch, say, `LAMMPS` at scale, we could add another `RPATH` specifically for use with `sbcast`: spack install lammps ldflags='-Wl,-rpath=$ORIGIN/lmp_libs' This will put the `lmp_libs` directory alongside `LAMMPS`'s `lmp` executable first in the `RPATH`, so it will be searched before any directories on the shared filesystem. ## Issues with quoting Before this PR, the command above would've errored out for two reasons: 1. `$` wasn't an allowed character in our spec parser. 2. You would've had to double quote the flags to get them to pass through correctly: spack install lammps ldflags='"-Wl,-rpath=$ORIGIN/lmp_libs"' This is ugly and I don't think many users will easily figure it out. The behavior was added in #29282, and it improved parsing of specs passed as a single string, e.g.: spack install 'lammps ldflags="-Wl,-rpath=$ORIGIN/lmp_libs"' but a lot of users are naturally going to try to quote arguments *directly* on the command line, without quoting their entire spec. #29282 used a heuristic to detect unquoted flags and warn the user, but the warning could be confusing. In particular, if you wrote `cflags="-O2 -g"` on the command line, it would break the flags up, warn, and tell you that you could fix the issue by writing `cflags="-O2 -g"` even though you just wrote that. It's telling you to *quote* that value, but the user has to know to double quote. ## New heuristic for quoted arguments from the CLI There are only two places where we allow arbitrary quoted strings in specs: flags and variant values, so this PR adds a simpler heuristic to the CLI parser: if an argument in `sys.argv` starts with `name=...`, then we assume the whole argument is quoted. This means you can write: spack install bzip2 cflags="-O2 -g" directly on the command line, without multiple levels of quoting. This also works: spack install 'bzip2 cflags="-O2 -g"' The only place where this heuristic runs into ambiguity is if you attempt to pass anonymous specs that start with `name=...` as one large string. e.g., this will be interpreted as one large flag value: spack find 'cflags="-O2 -g" ~bar +baz' This sets `cflags` to `"-O2 -g" ~bar +baz`, which is likely not what you wanted. You can fix this easily by either removing the quotes: spack find cflags="-O2 -g" ~bar +baz Or by adding a space at the start, which has the same effect: spack find ' cflags="-O2 -g" ~bar +baz' You may wonder why we don't just look for quotes inside of flag arguments, and the reason is that you *might* want them there. If you are passing arguments like: spack install zlib cppflags="-D DEBUG_MSG1='quick fox' -D DEBUG_MSG2='lazy dog'" You *need* the quotes there. So we've opted for one potentially confusing, but easily fixed outcome vs. limiting what you can put in your quoted strings. ## Quotes in formatted spec output In addition to being more lenient about characters accepted in quoted strings, this PR fixes up spec formatting a bit. We now format quoted strings in specs with single quotes, unless the string has a single quote in it, in which case we JSON-escape the string (i.e., we add `\` before `"` and `\`). zlib cflags='-D FOO="bar"' zlib cflags="-D FOO='bar'" zlib cflags="-D FOO='bar' BAR=\"baz\""
2023-12-13spack mirror create --all: include patches (#41579)Harmen Stoppels1-26/+25
2023-12-12mysql: fix issue when using old core API call (#41573)Massimiliano Culpo1-3/+1
MySQL was performing a core API call to `Spec.flat_dependencies` when setting up the build environment. This function is an implementation detail of the old concretizer, where multiple nodes from the same package are not allowed. This PR uses a more idiomatic way to check if "python" is in the DAG. For reference, see #11356 to check why the call was introduced.
2023-12-11Bump up the version for ROCm-5.7.0 and ROCm-5.7.1 releases. (#40724)Sreenivasa Murthy Kolam1-0/+4
* initial commit for rocm-5.7.0 and 5.7.1 releases * bump up ther version for 5.7.0 and 5.7.1 releases * update recipes to support 5.7.0 and 5.7.1 releases * bump up the version for ROCm 5.7.0 and ROCm-5.7.1 releases * bump up the version for composable-kernel amd miopen-hip * fix style errors * fix style errors in hip etc * renaming composable-kernel recipe * changes for composable_kernel * Revert "renaming composable-kernel recipe" This reverts commit 0cf6c6debfc7b12014f514af26144132ae187e71. * Revert "changes for composable_kernel" This reverts commit 05272a10a79cc14dc9c1afbda8fa4de87ea672ad. * bump up the version for hiprand * using the checksum for hiprand-5.7.1 * bump up the version for 5.7.0 and 5.7.1 releases * fix style errors * fix merge conflicts with the develop. * temp workaround for the error seen with rocm-5.7.0 when trying to generate the dependency file for runtime/legion/legion_redop.cu * fix build issue(work around) with legion * add patch for migraphx package to turn off ck * update to hip recipe * fix hip-path detection inside llvm clang driver * update llvm-amdgpu and rocm-validation-suite recipes * fix style errors * bump up the version for amdsmi for rocm-5.7.0 release * add support for gfx941,gfx942 for rocm-5.7.0 release onwards * revert changes to rocm.py file * added gfx941 and gfx942 to rocm.py and add the gfx942 to kokkos and new checksum the new version seem to support gfx942 * bump up the version for rccl for 5.7.1 * update the patch for rocm-openmp-extras for 5.7.0 * update mivisionx recipe for 5.7.0 release * add new dependencies for rocfft tests * port the fix for avx build, the start address of values_ buffer in KernelParameters is not correct as it is computed based on 16-byte alignment * set HIP_PATH=ROCM_PATH for 5.7.0 onwards * address review comments * revert adding xnack- and xnack+ to gfx940,gfx941,gfx942 as the prechecks were failing
2023-12-11Build cache: make signed/unsigned a mirror property (#41507)Harmen Stoppels10-52/+214
* Add `signed` property to mirror config * make unsigned a tri-state: true/false overrides mirror config, none takes mirror config * test commands * Document this * add a test
2023-12-11Add missing build-system/custom phases to the CDash map (#41439)Tamara Dahlgren1-4/+17
2023-12-11Link to GitHub Action spack/setup-spack in docs (#41509)Harmen Stoppels1-78/+4
2023-12-11unit tests: replace /bin/bash with /bin/sh (#41495)Harmen Stoppels3-10/+10
2023-12-11Fix filter_compiler_wrapper where compiler is None (#41502)Dave Keeshan1-1/+1
Fix filer_compiler_wrapper for cases where the compiler returned in None, this happens on some installed gcc systems that do not have fortran built into them as standard, e.g. gcc@11.4.0 on ubuntu 22.04
2023-12-11commands: better install status help formatting (#41527)Todd Gamblin1-4/+5
Before (hard to read, doesn't fit on small terminals): : ```console -I, --install-status show install status of packages packages can be: installed [+], missing and needed by an installed package [-], installed in an upstream instance [^], or not installed (no annotation) ``` After (fits in 80 columns): ```console -I, --install-status show install status of packages [+] installed [^] installed in an upstream - not installed [-] missing dep of installed package ```
2023-12-08Add logic to cache the RPATH variables in CachedCMakePackages. (#41417)Brian Van Essen1-0/+17
2023-12-07cce compiler: remove vestigial compiler names (#41303)Greg Becker1-4/+4
2023-12-07add missing endtime property to CDash (#41498)Tamara Dahlgren1-0/+1
2023-12-07Fix cdash reporter time stamps (#38825)Victor Brunini1-7/+7
* Fix cdash reporter time stamps (#38818). The cdash reporter is created before packages are installed so save the starttime then instead of the endtime. * Use endtime instead of starttime for the endtime of update --------- Co-authored-by: Tamara Dahlgren <dahlgren1@llnl.gov>
2023-12-07freebsd (#41480)Harmen Stoppels1-0/+2
2023-12-07traverse.py: use > 0 instead of >= 0 (#41482)Ataf Fazledin Ahamed1-1/+1
Signed-off-by: fazledyn-or <ataf@openrefactory.com>
2023-12-07Do not use depfile in bootstrap (#41458)Jordan Galby2-32/+10
- we don't have a fallback if make is not installed - we assume file system locking works - we don't verify that make is gnu make (bootstrapping fails on FreeBSD as a result) - there are some weird race conditions in writing spack.yaml on concurrent spack install - the view is updated after every package install instead of post environment install.
2023-12-07audit: forbid nested dependencies in depends_on declarations (#41428)Massimiliano Culpo1-2/+26
Forbid nested dependencies in depends_on declarations, by running an audit in CI. Fix the packages not passing the new audit: - amd-aocl - exago - palace - shapemapper - xsdk-examples ginkgo: add a commit sha to v1.5.0.glu_experimental
2023-12-06bootstrap: Don't catch Ctrl-C (#41449)Jordan Galby3-5/+23
2023-12-06minimal support for freebsd (#41434)Harmen Stoppels6-9/+76
2023-12-06bootstrap status: no bash (#41431)Harmen Stoppels1-1/+0
2023-12-05CDash: Spack dumps stage errors to configure phase (#41436)psakievich1-0/+19
2023-12-05documentation: add instructions on how to use external opengl (#40987)Billae1-0/+25
2023-12-05spack buildcache check: use same interface as push (#41378)Harmen Stoppels1-8/+19
2023-12-05bugfix: sort variants in `spack info --variants-by-name` (#41389)Todd Gamblin1-1/+1
This was missed while backporting the new `spack info` command from #40326. Variants should be sorted by name when invoking `spack info --variants-by-name`.
2023-12-05extensions: improve docs, fix unit-tests (#41425)Massimiliano Culpo3-56/+68
2023-12-04ci.py: fix missing import (#41391)Harmen Stoppels1-1/+4
2023-12-04PythonPackage: type hints (#40539)Adam J. Stewart1-31/+39
* PythonPackage: nested config_settings, type hints * No need to quote PythonPackage * Use narrower types for now until needed
2023-12-03Windows: fix kit base path and reference to windows registry key (#41388)James Smillie1-2/+10
* Proper handling of argument passed as semicolon-separated str * Fix reference to windows registry key in win-wdk
2023-12-01build(deps): bump docutils from 0.18.1 to 0.20.1 in /lib/spack/docs (#38174)dependabot[bot]1-1/+1
Bumps [docutils](https://docutils.sourceforge.io/) from 0.18.1 to 0.20.1. --- updated-dependencies: - dependency-name: docutils 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>
2023-12-01build(deps): bump pygments from 2.17.1 to 2.17.2 in /lib/spack/docs (#41212)dependabot[bot]1-1/+1
Bumps [pygments](https://github.com/pygments/pygments) from 2.17.1 to 2.17.2. - [Release notes](https://github.com/pygments/pygments/releases) - [Changelog](https://github.com/pygments/pygments/blob/2.17.2/CHANGES) - [Commits](https://github.com/pygments/pygments/compare/2.17.1...2.17.2) --- updated-dependencies: - dependency-name: pygments 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>
2023-12-01build(deps): bump sphinx-rtd-theme in /lib/spack/docs (#41305)dependabot[bot]1-1/+1
Bumps [sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme) from 1.3.0 to 2.0.0. - [Changelog](https://github.com/readthedocs/sphinx_rtd_theme/blob/master/docs/changelog.rst) - [Commits](https://github.com/readthedocs/sphinx_rtd_theme/compare/1.3.0...2.0.0) --- updated-dependencies: - dependency-name: sphinx-rtd-theme dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-01build(deps): bump mypy from 1.7.0 to 1.7.1 in /lib/spack/docs (#41243)dependabot[bot]1-1/+1
Bumps [mypy](https://github.com/python/mypy) from 1.7.0 to 1.7.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.7.0...v1.7.1) --- updated-dependencies: - dependency-name: mypy 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>
2023-11-30tests: use temporary_store (#41369)Harmen Stoppels1-1/+1
2023-11-30Fix issue with latest mypy (#41363)Massimiliano Culpo1-4/+8
2023-11-30reuse concretization: allow externals from remote when locally configured ↵Harmen Stoppels3-3/+114
(#35975) This looks to me like the best compromise regarding externals in a build cache. I wouldn't want `spack install` on my machine to install specs that were marked external on another. At the same time there are centers that control the target systems on which spack is used, and would want to use external in buildcaches. As a solution, reuse concretization will now consider those externals used in buildcaches that match a locally configured external in packages.yaml. So for example person A installs and pushes specs with this config: ```yaml packages: ncurses: externals: - spec: ncurses@6.0.12345 +feature prefix: /usr ``` and person B concretizes and installs using that buildcache with the following config: ```yaml packages: ncurses: externals: - spec: ncurses@6 prefix: /usr ``` the spec will be reused (or rather, will be considered for reuse...)
2023-11-30tests: add missing mutable db (#41359)Harmen Stoppels1-3/+7
2023-11-30tests: fix side effects of default_config fixture (#41361)Harmen Stoppels2-4/+4
* tests: default_config drop scope * use default_config elsewhere * use parse_install_tree for missing defaults in default config
2023-11-30test_variant_propagation_with_unify_false: missing fixture (#41345)Harmen Stoppels1-1/+1
2023-11-30--scope: lazy defaults (#41353)Harmen Stoppels9-63/+53
2023-11-30use double quotes where spack style finds errors (#41349)Christopher Christofi11-80/+80
2023-11-30Fix a typo in an integrity constraint (#41334)Massimiliano Culpo1-1/+1
2023-11-30argparse: make scope choices lazy s.t. validation in tests works (#41344)Harmen Stoppels46-78/+76