Commit Graph

1202 Commits

Author SHA1 Message Date
Ryan Krattiger
f32b5e572a
ci: remove --keep-stage flag (#49467)
logs are now copied from the install dir
2025-03-15 09:41:25 +01:00
Harmen Stoppels
87926e40a9
style.py: add spack style --spec-strings for compat with v1.0 (#49485)
* style.py: add spack style --spec-strings for compat with v1.0

* add --fix also, and avoid infinite recursion and too large files

* tests: check identify and check edit files
2025-03-14 19:10:39 +00:00
eugeneswalker
d09c5a4bd4
e4s cray rhel: petsc: require +batch (#49472) 2025-03-14 05:39:02 +00:00
Zack Galbreath
f5ff63e68d
ci: use stack-specific local mirrors (#49449)
This should help resolve the "No binary found when cache-only was specified"
errors we've recently seen in our GitLab CI pipelines.

example failing job here:
https://gitlab.spack.io/spack/spack/-/jobs/15570931#L370

This error is caused when a generate job finds a spec in the local root
binary mirror, and that spec does not yet exist in the stack-specific mirror.

The fix here is to instead locally cache the stack-specific mirrors and only
use the root-level mirror for public use.
2025-03-13 12:04:46 +01:00
Harmen Stoppels
f89a2ada4c
Move %compiler last in static spec strings (#49438) 2025-03-12 19:41:43 +01:00
Massimiliano Culpo
d352b71df0
Error when an anonymous spec is required for a virtual package (#49385)
When requiring a constraint on a virtual package, it makes little
sense to use anonymous specs, and our documentation shows no example
of requirements on virtual packages starting with `^`.

Right now, due to how `^` is implemented in the solver, writing:
```yaml
mpi:
  require: "^openmpi"
```
is equivalent to the more correct form:
```yaml
mpi:
  require: "openmpi"
```
but the situation will change when `%` will shift its meaning to be a
direct dependency.

To avoid later errors that are both unclear, and quite slow to get to the user,
this commit makes anonymous specs under virtual requirements an error,
and shows a clear error message pointing to the file and line where the
spec needs to be changed.

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-12 08:33:42 +01:00
John W. Parent
f3257cea90
Windows Ci: Ensure consistent EOL (#49377) 2025-03-10 18:06:02 -07:00
Tamara Dahlgren
3f8dcfc6ed
Support independent includes with conditional, optional, and remote entries (#48784)
Supersedes #46792.
Closes #40018.
Closes #31026.
Closes #2700.

There were a number of feature requests for os-specific config. This enables os-specific
config without adding a lot of special sub-scopes.

Support `include:` as an independent configuration schema, allowing users to include
configuration scopes from files or directories. Includes can be:
* conditional (similar to definitions in environments), and/or
* optional (i.e., the include will be skipped if it does not exist).

Includes can be paths or URLs (`ftp`, `https`, `http` or `file`). Paths can be absolute or
relative . Environments can include configuration files using the same schema. Remote includes 
must be checked by `sha256`.

Includes can also be recursive, and this modifies the config system accordingly so that
we push included configuration scopes on the stack *before* their including scopes, and
we remove configuration scopes from the stack when their including scopes are removed.

For example, you could have an `include.yaml` file (e.g., under `$HOME/.spack`) to specify
global includes:

```
include:
- ./enable_debug.yaml
- path: https://github.com/spack/spack-configs/blob/main/NREL/configs/mac/config.yaml
  sha256: 37f982915b03de18cc4e722c42c5267bf04e46b6a6d6e0ef3a67871fcb1d258b
```

Or an environment `spack.yaml`:

```
spack:
  include:
  - path: "/path/to/a/config-dir-or-file"
    when: os == "ventura"
  - ./path/relative/to/containing/file/that/is/required
  - path: "/path/with/spack/variables/$os/$target"
    optional: true
  - path: https://raw.githubusercontent.com/spack/spack-configs/refs/heads/main/path/to/required/raw/config.yaml
    sha256: 26e871804a92cd07bb3d611b31b4156ae93d35b6a6d6e0ef3a67871fcb1d258b
```

Updated TODO:
- [x] Get existing unit tests to pass with Todd's changes
- [x] Resolve new (or old) circular imports
- [x] Ensure remote includes (global) work
- [x] Ensure remote includes for environments work (note: caches remote
      files under user cache root)
- [x] add sha256 field to include paths, validate, and require for remote includes
- [x] add sha256 remote file unit tests
- [x] revisit how diamond includes should work
- [x] support recursive includes
- [x] add recursive include unit tests
- [x] update docs and unit test to indicate ordering of recursive includes with
      conflicting options is deferred to follow-on work

---------

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
Co-authored-by: Peter Scheibel <scheibel1@llnl.gov>
Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2025-03-09 19:33:44 -07:00
Ryan Krattiger
77ff574d94
Revert "CI: Set the cache path for all platforms (#49373)" (#49381)
This reverts commit 50b56ee1ce.
2025-03-08 08:29:05 +01:00
Ryan Krattiger
50b56ee1ce
CI: Set the cache path for all platforms (#49373)
The SPACK_USER_CACHE_PATH was being overwritten in the windows CI
before_script. This should set the path for all systems unless
explicitly overridden.
2025-03-07 17:07:56 -06:00
Wouter Deconinck
61ffb87757
actsvg: add v0.4.51 (#49352) 2025-03-07 16:53:02 +01:00
Zack Galbreath
cacdf84964
ci: add support for high priority local mirror (#49264) 2025-03-04 14:47:37 -06:00
Scott Wittenburg
60544a4e84
ci: avoid py-mpi4py tests on darwin (#49227) 2025-02-27 18:07:59 -07:00
Massimiliano Culpo
12fe7aef65
pipelines: extract changes from compiler as nodes (#49222)
* Split requirements to get better error messages in case of unsat solves.
* use list requirements instead of string
* activate static_analysis in a few pipelines

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-02-27 12:13:34 +01:00
eugeneswalker
677caec3c6
Ci reactivate darwin pipelines (#48453)
* ci: darwin stacks: update tags following system updates

* disable SPACK_CI_DISABLE_STACKS; only enable *darwin* stacks for testing

* manually chmod u+w tmp/ before cleanup due to issue#49147

* comment out failing specs for now

* re-enable logic for disabling stacks

* add explanatory comment for darwin after_script additions

* remove more darwin-only targetting

* restore build_stage to default location

* move build-job-remove out of individual darwin stacks into darwin top level config

* keep build_stage in $spack/tmp for now
2025-02-26 17:34:22 -06:00
eugeneswalker
b914bd6638
e4s oneapi ci stack: mpi: require intel-oneapi-mpi (#49043)
* e4s oneapi ci stack: mpi: require intel-oneapi-mpi

* nrm ^py-scipy cflags="-Wno-error=incompatible-function-pointer-types"

* add explanatory comment
2025-02-26 23:07:57 +00:00
Massimiliano Culpo
dbd531112c
Assign priorities to configuration scopes (take 2) (#49187)
Currently, the custom config scopes are pushed at the top when constructing
configuration, and are demoted whenever a context manager activating an
environment is used - see #48414 for details. Workflows that rely on the order
in the [docs](https://spack.readthedocs.io/en/latest/configuration.html#custom-scopes)
are thus fragile, and may break

This PR allows to assign priorities to scopes, and ensures that scopes of lower priorities
are always "below" scopes of higher priorities. When scopes have the same priority,
what matters is the insertion order.

Modifications:
- [x] Add a mapping that iterates over keys according to priorities set when
      adding the key/value pair
- [x] Use that mapping to allow assigning priorities to configuration scopes
- [x] Assign different priorities for different kind of scopes, to fix a bug, and
      add a regression test
- [x] Simplify `Configuration` constructor
- [x] Remove `Configuration.pop_scope`

---------

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-02-26 10:52:19 -08:00
Cédric Chevalier
35013773ba
Fix setup.fish syntax (#49176)
* Fix setup.fish syntax

* Simplify conditional in share/spack/setup-env.fish

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2025-02-25 07:11:55 -06:00
Massimiliano Culpo
9e508b0321
Revert "Assign priorities to configuration scopes (#48420)" (#49185)
All the build jobs in pipelines are apparently relying on the bug that was fixed.

The issue was not caught in the PR because generation jobs were fine, and
there was nothing to rebuild.

Reverting to fix pipelines in a new PR.

This reverts commit 3ad99d75f9.
2025-02-25 02:33:41 -08:00
Massimiliano Culpo
3ad99d75f9
Assign priorities to configuration scopes (#48420)
Currently, environments can end up with higher priority than `-C` custom
config scopes and `-c` command line arguments sometimes. This shouldn't
happen -- those explicit CLI scopes should override active environments.

Up to now configuration behaved like a stack, where scopes could be only be
pushed at the top. This PR allows to assign priorities to scopes, and ensures
that scopes of lower priorities are always "below" scopes of higher priorities.

When scopes have the same priority, what matters is the insertion order.

Modifications:
- [x] Add a mapping that iterates over keys according to priorities set when
      adding the key/value pair
- [x] Use that mapping to allow assigning priorities to configuration scopes
- [x] Assign different priorities for different kind of scopes, to fix a bug, and
      add a regression test
- [x] Simplify `Configuration` constructor
- [x] Remove `Configuration.pop_scope`
- [x] Remove `unify:false` from custom `-C` scope in pipelines

On the last modification: on `develop`, pipelines are relying on the environment
being able to override `-C` scopes, which is a bug. After this fix, we need to be
explicit about the unification strategy in each stack, and remove the blanket
`unify:false` from the highest priority scope

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-02-25 00:58:16 -08:00
Harmen Stoppels
4e7a5e9362
spack verify libraries: verify dependencies of installed packages can be resolved (#49124)
Currently, we have `config:shared_linking:missing_library_policy` to error
or warn when shared libraries cannot be resolved upon install.

The new `spack verify libraries` command allows users to run this post
install hook at any point in time to check whether their current
installations can resolve shared libs in rpaths.
2025-02-24 11:28:06 +01:00
Pranav Sivaraman
a0f8aaf4e7
setup-env.fish: fix version checking for completions (#48806) 2025-02-23 20:28:51 +00:00
Ryan Krattiger
1fa1864b37
Reproducer should deduce artifact root from concrete environment (#45281)
* Reproducer should decude artifact root from concrete environment

* Add documentation on the layout of the artifacts directory

* Use dag hash in the container name

* Add reproducer options to improve local testing

* --use-local-head allows running reproducer with
  the current Spack HEAD commit rather than computing
  a commit for the reproducer

* Add test to verify commits and recreating reproduction environment

* Add test for non-merge commit case

* ci reproduce-build: Drop overwrite option
in favor of throwing an error if the working dir is non-empty
2025-02-21 10:46:43 -06:00
Wouter Deconinck
9d0766be48
hep: static_analysis: true (#49069) 2025-02-18 06:27:54 +01:00
Alec Scott
f1678f4c7b
bfs: add v4.0.5 (#49049)
* bfs: add v4.0.5, liburing: v2.4, v2.9

* Re-enable bfs on developer tools pipelines
2025-02-17 19:05:35 -06:00
Harmen Stoppels
a7b542dd37
spack debug create-db-tarball: remove after test failures (#49025) 2025-02-13 13:10:28 +01:00
Adam J. Stewart
46f5b192ef
PyTorch: build flash attention by default, except in CI (#48521)
* PyTorch: build flash attention by default, except in CI

* Variant is boolean, only available when +cuda/+rocm

* desc -> _desc
2025-02-11 13:20:10 -08:00
Wouter Deconinck
57a1807443
hep: rivet: require hepmc=3 (#48976) 2025-02-11 01:33:45 -07:00
Massimiliano Culpo
54210270c8
concretizer: reduce search space with static analysis (#48729)
Currently, when we setup the ASP problem for `clingo`, we don't take into account the configuration. This results in setting up ASP problems that are larger than necessary, with possibly redundant information, and higher concretization times. 

This PR tries to improve things by adding an opt-in feature that computes the _possible dependencies_ of a solve taking also into account the current configuration, and avoids adding possible dependencies that we are certain can't be in the final solution.

The feature can be activated with:
```yaml
concretizer:
  static_analysis: true
```

Examples of simple rules to discard dependencies are:
- Dependencies that are not buildable, and for which no binary is present (e.g. `cray-mpich` etc. on non Cray systems)
- Dependencies that are not for the current platform (e.g. `msmpi` on non Windows platforms)
- Conditional dependencies that cannot be activated, because of some user requirement (e.g. `cuda` etc. if the user requires `~cuda` in configuration)
- Virtual providers that cannot be used, because of a requirement on a virtual

The speed-up these rules seem to give depends on the use case at hand, but if the configuration is updated properly, they are noticeable. 

Since in cases where there is no rule to exclude packages upfront, reuse is active, and this option is activated, it's possible to see some minor slow down, the feature has been added as opt-in, so it's turned off by default.
2025-02-11 08:44:20 +01:00
Massimiliano Culpo
a8e2da5bb8
Fix regression due to dyninst update (#48935) 2025-02-07 10:46:42 +01:00
Wouter Deconinck
74ff9ad821
hep stack: build also with cuda and rocm where possible (#48528) 2025-02-06 17:09:15 -07:00
Zack Galbreath
36f32ceda3
Remove ISC stacks environment files (#48851)
Follow-up to #48811
2025-02-04 10:31:40 +01:00
Wouter Deconinck
f2f13964fb
sherpa: support cxxstd=20 when=@3: (#48829)
* sherpa: support cxxstd=20 when=@3:

* hep: sherpa cxxstd=20
2025-02-03 22:24:35 -06:00
Harmen Stoppels
f1660722e7
gcc: deprecate old patch releases (#48761) 2025-02-03 15:27:14 +01:00
Zack Galbreath
04b44d841c
gitlab: remove isc stacks (#48811) 2025-02-03 15:26:59 +01:00
Massimiliano Culpo
3d82e5c573
Remove pipelines and images based on ppc64le (#48767) 2025-01-29 16:36:25 +01:00
Massimiliano Culpo
196c912b8a
Deprecate frontend/backend os/target (#47756) 2025-01-29 13:22:51 +01:00
Wouter Deconinck
a754341f6c
hep stack: additional event generator packages (#48565)
* hep stack: additional event generator packages

* hep: adidtional packages

* hep: collier doesn't have +pic +shared

* py-awkward-cpp: fix scikit-build-core range of applicability

* hep: disable agile

* hep: disable garfieldpp and genie

* py-wxpython: depends_on pkgconfig even if using external wxwidgets

* hep: disable professor
2025-01-28 05:38:58 -06:00
Joe
c764400338
Allowing environment variables to be set in a spack.yaml (#47587)
This adds a new configuration section called `env_vars:` that can be set in an environment.

It looks very similar to the existing `environment:` section that can be added to `modules.yaml`,
but it is global for an entire spack environment. It's called `env_vars:` to deconflate it with spack
environments (the term was too overloaded).

The syntax looks like this:

```yaml
spack:
  specs:
    - cmake%gcc
  env_vars:
    set:
      ENVAR_SET_IN_ENV_LOAD: "True"
```

Any of our standard environment modifications can be added to the `env_vars` section, e.g.
`prepend_path:`, `unset:`, `append_path:`, etc.  Operations in `env_vars:` are performed
on `spack env activate` and undone on `spack env deactivate`.
2025-01-27 12:20:22 -08:00
eugeneswalker
68af5cc4c0
e4s ci stacks: add libceed (#48668) 2025-01-21 14:13:55 -08:00
Wouter Deconinck
25013bacf2
hep stack: add pandora PFA suite (#48497) 2025-01-13 13:41:01 +01:00
Wouter Deconinck
53353ae64e
hep stack: add scikit-hep packages (#48412) 2025-01-13 12:40:29 +01:00
Wouter Deconinck
98c44fc351
hep stack: root +postgres (#48498) 2025-01-13 12:11:19 +01:00
Wouter Deconinck
6a225d5405
dpmjet: add v19.3.6, v19.3.7; add to hep stack (#48530) 2025-01-13 12:05:45 +01:00
Massimiliano Culpo
4be7b98fd2
Perl build system: add a dependency on gmake (#48437) 2025-01-08 09:10:22 +01:00
eugeneswalker
25ce6cce47
e4s cray rhel ci stack: re-enable and update for new cpe (#47697)
* e4s cray rhel ci stack: re-enable and update for new cpe, should fix cray libsci issue

* only run e4s-cray-rhel stack

* Mkae Autotools build_system point at correct build_directory

* remove selective enable of cray-rhel stacks

* restore SPACK_CI_DISABLE_STACKS

* use dot prefix to hide cray-sles jobs instead of comment-out

---------

Co-authored-by: Ryan Krattiger <ryan.krattiger@kitware.com>
2025-01-07 08:56:10 -08:00
Wouter Deconinck
aee2f5cf41
hep stack: add celeritas (#48404) 2025-01-07 09:47:17 -05:00
Harmen Stoppels
6622f7a89c
Revert "CI: Move the build stage to the project root instead of tmp (#47996)" (#48397)
This reverts commit ef615bcc7e.
2025-01-04 11:59:22 +01:00
Wouter Deconinck
1b9d001f6a
feat: add HEP cloud_pipeline stack (#40932)
* dd4hep: depends_on root +root7 in some cases

* dd4hep: avoid self-referential whens -> conflicts

* feat: add HEP cloud_pipeline stack

* [hep] add hep jobs to .gitlab-ci.yml

* [hep] rm hep-generate image override

* [hep] fix root variants; add some more packages

* [hep] disable hep-build for now

* [hep] hepmc3 +interfaces

* [hep] hep-generate on gcc-11.4 runner image

* [hep] sherpa -blackhat

* [hep] align package requirements to e4s for more cache hits

* [hep] lcio -examples due to conflicts

* [hep] marks geant4-data as external

* [hep] enable build

* [hep] elfutils now always has bzip2 xz dependency

* [hep] avoid gaudi ^gdb@8.1 with explicit version gdb@14.1

* [hep] geant4 -vtk for now

* [hep] root ~oracle

* [hep] external geant4-data@11.2.0

* [hep] sherap ~python

* [hep] gaudi ^gdb +python to avoid failing gdb@8.1

* [hep] pythia8 ~madgraph5amc

* [hep] remove garfieldpp which fails to download

* [hep] sherpa ~recola because recola needs pic variant

* [hep] sherpa ~rivet since conflicts("cxxstd=11", when="~rivet")

* [hep] unify: when_possible

* [hep] thepeg ~rivet

* [hep] root ~shadow

* [hep] lcio ~jar

* [hep] root ~postgres

* [hep] herwig3 ~evtgen

* [hep] herwig3 has no evtgen variant

* [hep] no image override in hep-generate

* [hep] re-add ubuntu-22.04 image for newer gcc than 7

* [hep] remove herwig3

* [hep] remove package configs

* [hep] avoid non-existent variants in latest versions

* [hep] allow for sherpa@3:

* [hep] acts cxxstd=20

* [hep] gaudi ^gdb +python

* [hep] gaudi ^gdb +debuginfod

* [hep] add some packages to large and huge kubernetes groups

* [hep] root +rpath

* [hep] add qt-declarative to large 8core 8GB CI group

* [hep] add sherpa to 8 core, 3 GB CI medium group

* [hep] add root to 12 core, 19 GB huge CI group

* [hep] gaudi: touch pytest.ini

* [hep] ~ instead of -

Co-authored-by: Seth R. Johnson <johnsonsr@ornl.gov>

---------

Co-authored-by: Seth R. Johnson <johnsonsr@ornl.gov>
2025-01-03 12:22:53 -07:00
eugeneswalker
460bc82632
e4s ci: cleanup; see if failures have been fixed (#48137)
* e4s ci: cleanup; see if failures have been fixed

* comment out dealii+cuda cuda_arch=90 due to cuda@12 conflict

* paraview unpin @5.11

* disable paraview cuda90

* ecp-dav ~paraview cuda90

* disable lbann gfx90a

* disable upcxx +cuda

* comment out nek5000 and lammps +cuda

* comment out failed specs

* comment out slepc+rocm

* comment out failures

* comment out failures

* comment out failing paraview buids;

* comment out petsc+rocm

* sort specs
2025-01-02 13:27:40 -08:00