summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-11-07Propagate variant across nodes that don't have that variant (#38512)Richarda Butler8-18/+175
Before this PR, variant were not propagated to leaf nodes that could accept the propagated value, if some intermediate node couldn't accept it. This PR fixes that issue by marking nodes as "candidate" for propagation and by setting the variant only if it can be accepted by the node. Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2023-11-07tutorial pipeline: force gcc@12.3.0 (#40937)Harmen Stoppels1-1/+1
2023-11-07Ensure global command line arguments end up in args like before (#40929)Harmen Stoppels1-1/+1
2023-11-07superlu-dist: add +parmetis variant. (#40746)Jacob King1-11/+17
* Expose ability to make parmetis an optional superlu-dist dependency to spack package management. * rename parmetis variant: Enable ParMETIS library --------- Co-authored-by: eugeneswalker <eugenesunsetwalker@gmail.com>
2023-11-07ci: do not retry timed out build jobs (#40936)Scott Wittenburg1-1/+16
2023-11-07Update the branch for the tutorial command (#40934)Massimiliano Culpo1-1/+1
2023-11-07catch exceptions in which_string (#40935)Harmen Stoppels1-2/+5
2023-11-07fix configure args for darshan-runtime (#40873)Vanessasaurus1-2/+2
Problem: the current configure arguments are added lists to a list, and this needs to be adding strings to the same list. Solution: ensure we add each item (string) separately. Signed-off-by: vsoch <vsoch@users.noreply.github.com> Co-authored-by: vsoch <vsoch@users.noreply.github.com>
2023-11-07Update package.py for new release 2.30.0 (#40907)Rob Falgout1-0/+1
2023-11-07Change container labeling so that "latest" is the latest tag (#40593)Massimiliano Culpo1-24/+22
* Use `major.minor.patch`, `major.minor`, `major` in tags * Ensure `latest` is the semver largest version, and not "latest in time" * Remove Ubuntu 18.04 from the list of images
2023-11-07ASP: targets, compilers and providers soft-preferences are only global (#31261)Massimiliano Culpo11-207/+209
Modify the packages.yaml schema so that soft-preferences on targets, compilers and providers can only be specified under the "all" attribute. This makes them effectively global preferences. Version preferences instead can only be specified under a package specific section. If a preference attribute is found in a section where it should not be, it will be ignored and a warning is printed to screen.
2023-11-07archspec: update to v0.2.2 (#40917)Massimiliano Culpo3-4/+202
Adds support for Neoverse V2
2023-11-07database: optimize query() by skipping unnecessary virtual checks (#40898)Todd Gamblin2-9/+42
Most queries will end up calling `spec.satisfies(query)` on everything in the DB, which will cause Spack to ask whether the query spec is virtual if its name doesn't match the target spec's. This can be expensive, because it can cause Spack to check if any new virtuals showed up in *all* the packages it knows about. That can currently trigger thousands of `stat()` calls. We can avoid the virtual check for most successful queries if we consider that if there *is* a match by name, the query spec *can't* be virtual. This PR adds an optimization to the query loop to save any comparisons that would trigger a virtual check for last. - [x] Add a `deferred` list to the `query()` loop. - [x] First run through the `query()` loop *only* checks for name matches. - [x] Query loop now returns early if there's a name match, skipping most `satisfies()` calls. - [x] Second run through the `deferred()` list only runs if query spec is virtual. - [x] Fix up handling of concrete specs. - [x] Add test for querying virtuals in DB. - [x] Avoid allocating deferred if not necessary. --------- Co-authored-by: Harmen Stoppels <me@harmenstoppels.nl>
2023-11-06spack compiler find --[no]-mixed-toolchain (#40902)Harmen Stoppels8-76/+151
Currently there's some hacky logic in the AppleClang compiler that makes it also accept `gfortran` as a fortran compiler if `flang` is not found. This is guarded by `if sys.platform` checks s.t. it only applies to Darwin. But on Linux the feature of detecting mixed toolchains is highly requested too, cause it's rather annoying to run into a failed build of `openblas` after dozens of minutes of compiling its dependencies, just because clang doesn't have a fortran compiler. In particular in CI where the system compilers may change during system updates, it's typically impossible to fix compilers in a hand-written compilers.yaml config file: the config will almost certainly be outdated sooner or later, and maintaining one config file per target machine and writing logic to select the correct config is rather undesirable too. --- This PR introduces a flag `spack compiler find --mixed-toolchain` that fills out missing `fc` and `f77` entries in `clang` / `apple-clang` by picking the best matching `gcc`. It is enabled by default on macOS, but not on Linux, matching current behavior of `spack compiler find`. The "best matching gcc" logic and compiler path updates are identical to how compiler path dictionaries are currently flattened "horizontally" (per compiler id). This just adds logic to do the same "vertically" (across different compiler ids). So, with this change on Ubuntu 22.04: ``` $ spack compiler find --mixed-toolchain ==> Added 6 new compilers to /home/harmen/.spack/linux/compilers.yaml gcc@13.1.0 gcc@12.3.0 gcc@11.4.0 gcc@10.5.0 clang@16.0.0 clang@15.0.7 ==> Compilers are defined in the following files: /home/harmen/.spack/linux/compilers.yaml ``` you finally get: ``` compilers: - compiler: spec: clang@=15.0.7 paths: cc: /usr/bin/clang cxx: /usr/bin/clang++ f77: /usr/bin/gfortran fc: /usr/bin/gfortran flags: {} operating_system: ubuntu23.04 target: x86_64 modules: [] environment: {} extra_rpaths: [] - compiler: spec: clang@=16.0.0 paths: cc: /usr/bin/clang-16 cxx: /usr/bin/clang++-16 f77: /usr/bin/gfortran fc: /usr/bin/gfortran flags: {} operating_system: ubuntu23.04 target: x86_64 modules: [] environment: {} extra_rpaths: [] ``` The "best gcc" is automatically default system gcc, since it has no suffixes / prefixes.
2023-11-06package/qgis: add latest ltr (#40752)Sinan1-2/+8
* package/qgis: add latest ltr * fix bug * [@spackbot] updating style on behalf of Sinan81 * make flake happy --------- Co-authored-by: sbulut <sbulut@3vgeomatics.com> Co-authored-by: Sinan81 <Sinan81@users.noreply.github.com>
2023-11-06docs: expand section about relocation, suggest padding (#40909)Harmen Stoppels1-10/+27
2023-11-06Add support for aliases (#17229)Michael Kuhn6-14/+101
Add a new config section: `config:aliases`, which is a dictionary mapping aliases to commands. For instance: ```yaml config: aliases: sp: spec -I ``` will define a new command `sp` that will execute `spec` with the `-I` argument. Aliases cannot override existing commands, and this is ensured with a test. We cannot currently alias subcommands. Spack will warn about any aliases containing a space, but will not error, which leaves room for subcommand aliases in the future. --------- Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2023-11-06Don't let runtime env variables of compiler like deps leak into the build ↵Harmen Stoppels5-2/+66
environment (#40916) * Test that setup_run_environment changes to CC/CXX/FC/F77 are dropped in build env * compilers set in run env shouldn't impact build Adds `drop` to EnvironmentModifications courtesy of @haampie, and uses it to clear modifications of CC, CXX, F77 and FC made by `setup_{,dependent_}run_environment` routines when producing an environment in BUILD context. * comment / style * comment --------- Co-authored-by: Tom Scogland <scogland1@llnl.gov>
2023-11-06fix prefix_inspections keys in example (#40904)Harmen Stoppels1-4/+4
2023-11-06docs: mention public build cache for GHA (#40908)Harmen Stoppels1-23/+47
2023-11-06adios2: add v2.9.2 release (#40832)Vicente Bolea2-2/+43
2023-11-06defaults/modules.yaml: hide implicits (#40906)Harmen Stoppels1-0/+2
2023-11-06Introduce `default_args` context manager (#39964)Harmen Stoppels5-19/+95
This adds a rather trivial context manager that lets you deduplicate repeated arguments in directives, e.g. ```python depends_on("py-x@1", when="@1", type=("build", "run")) depends_on("py-x@2", when="@2", type=("build", "run")) depends_on("py-x@3", when="@3", type=("build", "run")) depends_on("py-x@4", when="@4", type=("build", "run")) ``` can be condensed to ```python with default_args(type=("build", "run")): depends_on("py-x@1", when="@1") depends_on("py-x@2", when="@2") depends_on("py-x@3", when="@3") depends_on("py-x@4", when="@4") ``` The advantage is it's clear for humans, the downside it's less clear for type checkers due to type erasure.
2023-11-06error messages: condition chaining (#40173)Greg Becker6-113/+592
Create chains of causation for error messages. The current implementation is only completed for some of the many errors presented by the concretizer. The rest will need to be filled out over time, but this demonstrates the capability. The basic idea is to associate conditions in the solver with one another in causal relationships, and to associate errors with the proximate causes of their facts in the condition graph. Then we can construct causal trees to explain errors, which will hopefully present users with useful information to avoid the error or report issues. Technically, this is implemented as a secondary solve. The concretizer computes the optimal model, and if the optimal model contains an error, then a secondary solve computes causation information about the error(s) in the concretizer output. Examples: $ spack solve hdf5 ^cmake@3.0.1 ==> Error: concretization failed for the following reasons: 1. Cannot satisfy 'cmake@3.0.1' 2. Cannot satisfy 'cmake@3.0.1' required because hdf5 ^cmake@3.0.1 requested from CLI 3. Cannot satisfy 'cmake@3.18:' and 'cmake@3.0.1 required because hdf5 ^cmake@3.0.1 requested from CLI required because hdf5 depends on cmake@3.18: when @1.13: required because hdf5 ^cmake@3.0.1 requested from CLI 4. Cannot satisfy 'cmake@3.12:' and 'cmake@3.0.1 required because hdf5 depends on cmake@3.12: required because hdf5 ^cmake@3.0.1 requested from CLI required because hdf5 ^cmake@3.0.1 requested from CLI $ spack spec cmake ^curl~ldap # <-- with curl configured non-buildable and an external with `+ldap` ==> Error: concretization failed for the following reasons: 1. Attempted to use external for 'curl' which does not satisfy any configured external spec 2. Attempted to build package curl which is not buildable and does not have a satisfying external attr('variant_value', 'curl', 'ldap', 'True') is an external constraint for curl which was not satisfied 3. Attempted to build package curl which is not buildable and does not have a satisfying external attr('variant_value', 'curl', 'gssapi', 'True') is an external constraint for curl which was not satisfied 4. Attempted to build package curl which is not buildable and does not have a satisfying external 'curl+ldap' is an external constraint for curl which was not satisfied 'curl~ldap' required required because cmake ^curl~ldap requested from CLI $ spack solve yambo+mpi ^hdf5~mpi ==> Error: concretization failed for the following reasons: 1. 'hdf5' required multiple values for single-valued variant 'mpi' 2. 'hdf5' required multiple values for single-valued variant 'mpi' Requested '~mpi' and '+mpi' required because yambo depends on hdf5+mpi when +mpi required because yambo+mpi ^hdf5~mpi requested from CLI required because yambo+mpi ^hdf5~mpi requested from CLI 3. 'hdf5' required multiple values for single-valued variant 'mpi' Requested '~mpi' and '+mpi' required because netcdf-c depends on hdf5+mpi when +mpi required because netcdf-fortran depends on netcdf-c required because yambo depends on netcdf-fortran required because yambo+mpi ^hdf5~mpi requested from CLI required because netcdf-fortran depends on netcdf-c@4.7.4: when @4.5.3: required because yambo depends on netcdf-fortran required because yambo+mpi ^hdf5~mpi requested from CLI required because yambo depends on netcdf-c required because yambo+mpi ^hdf5~mpi requested from CLI required because yambo depends on netcdf-c+mpi when +mpi required because yambo+mpi ^hdf5~mpi requested from CLI required because yambo+mpi ^hdf5~mpi requested from CLI Future work: In addition to fleshing out the causes of other errors, I would like to find a way to associate different components of the error messages with different causes. In this example it's pretty easy to infer which part is which, but I'm not confident that will always be the case. See the previous PR #34500 for discussion of how the condition chains are incomplete. In the future, we may need custom logic for individual attributes to associate some important choice rules with conditions such that clingo choices or other derivations can be part of the explanation. --------- Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2023-11-06c-blosc2: add v2.11.1 (#40889)Michael Kuhn1-0/+1
2023-11-06Environments: remove environments created with SpackYAMLErrors (#40878)Tamara Dahlgren4-21/+68
2023-11-06pythia8: fix configure args (#40644)Juan Miguel Carceller1-4/+4
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2023-11-06enable threading in amdlibflame (#40852)AMD Toolchain Support2-5/+17
Co-authored-by: vkallesh <Vijay-teekinavar.Kallesh@amd.com>
2023-11-06Add Python as build dependency of Julia (#40903)Sergio Sánchez Ramírez1-0/+1
2023-11-06mpich: remove unnecessary tuples and upperbounds (#40899)Harmen Stoppels1-7/+7
* mpich: remove unnecessary tuples * remove redundant :3.3.99 upperbound
2023-11-06qt: new version 5.15.11 (#40884)Wouter Deconinck1-1/+2
* qt: new version 5.15.11 * qt: open end patch for qtlocation when gcc-10:
2023-11-05spack env activate: create & activate default environment without args (#40756)Harmen Stoppels5-8/+51
This PR implements the concept of "default environment", which doesn't have to be created explicitly. The aim is to lower the barrier for adopting environments. To (create and) activate the default environment, run ``` $ spack env activate ``` This mimics the behavior of ``` $ cd ``` which brings you to your home directory. This is not a breaking change, since `spack env activate` without arguments currently errors. It is similar to the already existing `spack env activate --temp` command which always creates an env in a temporary directory, the difference is that the default environment is a managed / named environment named `default`. The name `default` is not a reserved name, it's just that `spack env activate` creates it for you if you don't have it already. With this change, you can get started with environments faster: ``` $ spack env activate [--prompt] $ spack install --add x y z ``` instead of ``` $ spack env create default ==> Created environment 'default in /Users/harmenstoppels/spack/var/spack/environments/default ==> You can activate this environment with: ==> spack env activate default $ spack env activate [--prompt] default $ spack install --add x y z ``` Notice that Spack supports switching (but not stacking) environments, so the parallel with `cd` is pretty clear: ``` $ spack env activate named_env $ spack env status ==> In environment named_env $ spack env activate $ spack env status ==> In environment default ```
2023-11-05Add command and package suggestions (#40895)Michael Kuhn5-12/+35
* Add command suggestions This adds suggestions of similar commands in case users mistype a command. Before: ``` $ spack spack ==> Error: spack is not a recognized Spack command or extension command; check with `spack commands`. ``` After: ``` $ spack spack ==> Error: spack is not a recognized Spack command or extension command; check with `spack commands`. Did you mean one of the following commands? spec patch ``` * Add package name suggestions * Remove suggestion to run spack clean -m
2023-11-05bugfix: compress aliases for first command in completion (#40890)Todd Gamblin2-2/+2
This completes to `spack concretize`: ``` spack conc<tab> ``` but this still gets hung up on the difference between `concretize` and `concretise`: ``` spack -e . conc<tab> ``` We were checking `"$COMP_CWORD" = 1`, which tracks the word on the command line including any flags and their args, but we should track `"$COMP_CWORD_NO_FLAGS" = 1` to figure out if the arg we're completing is the first real command.
2023-11-05Hidden modules: always append hash (#40868)Harmen Stoppels10-150/+153
2023-11-05Environments: Add support for including definitions files (#33960)Tamara Dahlgren11-152/+299
This PR adds support for including separate definitions from `spack.yaml`. Supporting the inclusion of files with definitions enables user to make curated/standardized collections of packages that can re-used by others.
2023-11-04mfem: allow cuda/rocm builds with superlu-dist built without cuda/rocm (#40847)Veselin Dobrev2-8/+15
2023-11-04c-blosc: add v1.21.5 (#40888)Michael Kuhn1-0/+1
2023-11-04spack.modules.commmon: pass spec to SetupContext (#40886)Harmen Stoppels1-1/+3
Currently module globals aren't set before running `setup_[dependent_]run_environment` to compute environment modifications for module files. This commit fixes that.
2023-11-04hdf5-vol-async: better specify dependency condition (#40882)Massimiliano Culpo2-3/+4
2023-11-04hiop: fix cuda constraints (#40875)Cameron Rutherford1-1/+1
2023-11-04sundials +sycl: add cxxflags=-fsycl via flag_handler (#40845)eugeneswalker2-1/+7
2023-11-04linux-headers: support multiple versions (#40877)zv-io1-0/+4
The download URL for linux-headers was hardcoded to 4.x; we need to derive the correct URL from the version number.
2023-11-03environment: solve one spec per child process (#40876)Massimiliano Culpo2-3/+12
Looking at the memory profiles of concurrent solves for environment with unify:false, it seems memory is only ramping up. This exchange in the potassco mailing list: https://sourceforge.net/p/potassco/mailman/potassco-users/thread/b55b5b8c2e8945409abb3fa3c935c27e%40lohn.at/#msg36517698 Seems to suggest that clingo doesn't release memory until end of the application. Since when unify:false we distribute work to processes, here we give a maxtaskperchild=1, so we clean memory after each solve.
2023-11-03GDAL: add v3.7.3 (#40865)Adam J. Stewart1-0/+1
2023-11-03Bugfix: propagation of multivalued variants (#39833)Richarda Butler4-1/+18
Don't encourage use of default value if propagating a multivalued variant.
2023-11-03clingo-bootstrap: force setuptools through variant (#40866)Massimiliano Culpo3-0/+14
2023-11-03squashfuse: remove url_for_version (#40862)Andrew W Elble1-8/+1
0.5.0 tarball now has the 'v' removed from the name
2023-11-03xdmf3: fix compilation with hdf5@1.10 and above (#37551)Thomas-Ulrich2-3/+45
2023-11-03ASP-based solver: fix for unsplittable providers (#40859)Massimiliano Culpo4-1/+57
Some providers must provide virtuals "together", i.e. if they provide one virtual of a set, they must be the providers also of the others. There was a bug though, where we were not checking if the other virtuals in the set were needed at all in the DAG. This commit fixes the bug.