Compare commits

...

323 Commits

Author SHA1 Message Date
Todd Gamblin
9ee32b060b WIP 2025-03-26 01:16:32 -07:00
Todd Gamblin
37c63aa22d spack license fix command
Add a `spack license fix` command that automatically fixes license headers.

This will:
- [x] convert old headers (i.e., ones from before #48352) to new ones like #48352
- [x] add headers to python files and shell scripts
- [x] handle shebangs, emacs `-*- language -*-` markers, etc.
- [x] address some common problems, e.g. if the header isn't in the first 7 lines

This should make it easier for maintainers to work with contributors to update
their license headers (tell them to run `spack license fix`).

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2025-03-26 00:59:04 -07:00
Massimiliano Culpo
5b3942a489 Turn compilers into nodes (#45189)
## Summary

Compilers stop being a *node attribute*, and become a *build-only* dependency. 

Packages may declare a dependency on the `c`, `cxx`, or `fortran` languages, which
are now treated as virtuals, and compilers would be *providers* for one or more of
those languages. Compilers can also inject runtime dependency, on the node being
compiled. An example graph for something as simple as `zlib-ng` is the following:

<p align="center">
<img src="https://github.com/user-attachments/assets/ee6471cb-09fd-4127-9f16-b9fe6d1338ac" alt="zlib-ng DAG" width="80%" height="auto">
</p>

Here `gcc` is used for both the `c`, and `cxx` languages. Edges are annotated with
the virtuals they satisfy (`c`, `cxx`, `libc`). `gcc` injects `gcc-runtime` on the nodes
being compiled. `glibc` is also injected for packages that require `c`. The
`compiler-wrapper` is explicitly represented as a node in the DAG, and is included in
the hash.

This change in the model has implications on the semantics of the `%` sigil, as
discussed in #44379, and requires a version bump for our `Specfile`, `Database`,
and `Lockfile` formats.

## Breaking changes

Breaking changes below may impact users of this branch.

### 1. Custom, non-numeric version of compilers are not supported

Currently, users can assign to compilers any custom version they want, and Spack
will try to recover the "real version" whenever the custom version fails some operation.
To deduce the "real version" Spack must run the compiler, which can add needless
overhead to common operations.

Since any information that a version like `gcc@foo` might give to the user, can also
be suffixed while retaining the correct numeric version, e.g. `gcc@10.5.0-foo`, Spack
will **not try** anymore to deduce real versions for compilers.

Said otherwise, users should have no expectation that `gcc@foo` behaves as
`gcc@X.Y.Z` internally.

### 2. The `%` sigil in the spec syntax means "direct build dependency"

The `%` sigil in the spec syntax means *"direct build dependency"*, and is not a node
attribute anymore. This means that:

```python
node.satisfies("%gcc")
``` 
is true only if `gcc` is a direct build dependency of the node. *Nodes without a compiler
dependency are allowed.*

### `parent["child"]`, and `node in spec`, will now only inspect the link/run sub-DAG
and direct build dependencies

The subscript notation for `Spec`:

```python
parent["child"]
```

will look for a `child` node only in the link/run transitive graph of `parent`, and in its
direct build dependencies. This means that to reach a transitive build dependency,
we must first pass through the node it is associated with. 

Assuming `parent` does not depend on `cmake`, but depends on a `CMakePackage`,
e.g. `hdf5`, then we have the following situation:

```python
# This one raises an Exception, since "parent" does not depend on cmake
parent["cmake"]
# This one is ok
cmake = parent["hdf5"]["cmake"]
```

### 3. Externals differing by just the compiler attribute

Externals are nodes where dependencies are trimmed, and that _is not planned to
change_ in this branch. Currently, on `develop` it is ok to write:

```yaml
packages:
  hdf5:
    externals:
    - spec: hdf5@1.12 %gcc
      prefix: /prefix/gcc
    - spec: hdf5@1.12 %clang
      prefix: /prefix/clang
```
and Spack will account for the compiler node attribute when computing the optimal
spec. In this branch, using externals with a compiler specified is allowed only if any
compiler in the dag matches the constraints specified on the external. _The external
will be still represented as a single node without dependencies_.

### 4. Spec matrices enforcing a compiler

Currently we can have matrices of the form:

```yaml
matrix:
- [x, y, z]
- [%gcc, %clang]
```
to get the cross-product of specs and compilers. We can disregard the nature of the
packages in the first row, since the compiler is a node attribute required on each node.

In this branch, instead, we require a spec to depend on `c`, `cxx`, or `fortran` for the
`%` to have any meaning. If any of the specs in the first row doesn't depend on these
languages, there will be a concretization error. 

## Deprecations

* The entire `compilers` section in the configuration (i.e., `compilers.yaml`) has been
  deprecated, and current entries will be removed in v1.2.0. For the time being, if Spack
  finds any `compilers` configuration, it will try to convert it automatically to a set of
  external packages.
* The `packages:compiler` soft-preference has been deprecated. It will be removed
  in v1.1.0.

## Other notable changes

* The tokens `{compiler}`, `{compiler.version}`, and `{compiler.name}` in `Spec.format`
  expand to `"none"` if a Spec does not depend on C, C++, or Fortran.
* The default install tree layout is now
  `"{architecture.platform}-{architecture.target}/{name}-{version}-{hash}"`

## Known limitations

The major known limitations of this branch that we intend to fix before v1.0 is that compilers
cannot be bootstrapped directly. 

In this branch we can build a new compiler using an existing external compiler, for instance:
	
```
$ spack install gcc@14 %gcc@10.5.0
```

where `gcc@10.5.0` is external, and `gcc@14` is to be built.

What we can't do at the moment is use a yet to be built compiler, and expect it will be
bootstrapped, e.g. :

```
spack install hdf5 %gcc@14
```

We plan to tackle this issue in a following PR.

---------

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
Signed-off-by: Harmen Stoppels <me@harmenstoppels.nl>
Co-authored-by: Harmen Stoppels <me@harmenstoppels.nl>
Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2025-03-25 22:32:49 -06:00
Todd Gamblin
a9c879d53e gdk-pixbuf: Use the official GNOME mirror. (#49690)
The `umea.se` mirror seems to have gone down (or at least is forbidden for now).

Revert the checksum changes in #47825; points at the official GNOME mirror
instead of the prior two places we were getting `gdk-pixbuf`.

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2025-03-25 18:57:53 -06:00
Todd Gamblin
f42f59c84b concretizer: don't use clingo.Symbol for setup (#49650)
Since we moved from creating clingo symbols directly to constructing a pure string
representation of the program, we don't need to make `AspFunctions` into symbols before
turning them into strings. We can just write strings like clingo would.

This cuts about 25% off the setup time by avoiding an unnecessary round trip.

- [x] create strings directly from `AspFunctions`
- [x] remove unused `symbol()` method on `AspFunction`
- [x] setup no longer tries to call `symbol()`

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
Signed-off-by: Greg Becker <becker33@llnl.gov>

---------

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
Co-authored-by: Greg Becker <becker33@llnl.gov>
2025-03-25 17:55:27 -07:00
Jon Rood
313b7d4cdb nalu-wind: add version 2.2.2. (#49685) 2025-03-25 15:45:23 -07:00
Melven Roehrig-Zoellner
bd41863797 scorep: ensure gcc-plugin is built, patch gcc@14 (#49257)
* scorep: ensure gcc-plugin is built, patch gcc@14
* scorep: patch only to non-deprecated versions
2025-03-25 14:45:53 -07:00
Robert Maaskant
b0dba4ff5a yarn: add v4.6.0, v4.7.0 (#49177)
* yarn: v4.6.0
* py-ipympl: pin yarn to v1
* rstudio: pin yarn to v1
* yarn: add v4.7.0
2025-03-25 14:37:44 -07:00
Alec Scott
4ff43d7fa9 ci: future-proof for enabling GitHub merge queues later (#49665) 2025-03-25 10:07:37 -07:00
Jon Rood
c1df1c7ee5 trilinos: fix kokkos constraints for version 16 (#49643)
* trilinos: add equals sign to kokkos dependencies.

* Fix some license headers to pass style check.

* Generalize a bit.

* Generalize a bit more.

* datatransferkit: constraing to maximum of trilinos@16.0.
2025-03-25 10:43:13 -06:00
arezaii
9ac6ecd5ba Chapel 2.4 (#49662)
* limit some patches by chapel version

* fix short output version if building main

* update patches, remove unneeded 'self' refs

* fix spack style

* update patches with changes from PR

* change py-protobuf to just protobuf dep

* add PR numbers for patches

* fix spack style

* update 2.4 sha256
2025-03-25 09:01:58 -07:00
Todd Gamblin
20ddb85020 setup-env.csh: Harden for people who like aliases (#49670)
A user had `grep` aliased to `grep -n`, which was causing `csh` setup to
fail due to number prefixes in `SPACK_ROOT`.

- [x] Prefix invocations of `grep` and `sed` (which are not builtin) with `\`
      to avoid any aliases.
- [x] Avoid using `dirname` altogether -- use csh's `:h` modifier (which does
      the same thing) instead.

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2025-03-25 09:01:28 -07:00
Nicholas Sly
2ced87297d Add dbus patch for container builds. (#49402) 2025-03-24 19:00:39 -06:00
Piotr Sacharuk
aa00c3fe1f trilinos: Apply workaround for oneAPI compiler for problems with build (#49636)
* Fix problem at least with datatransferkit

* Include patch 11676 from trilinos

* Add patches for trilinos 13.4.1

* style check failed

* Update links for patches

* additional style check failed
2025-03-24 17:05:43 -07:00
psakievich
0158fc46aa Add recursive argument to spack develop (#46885)
* Add recursive argument to spack develop

This effort allows for a recursive develop call
which will traverse from the develop spec given back to the root(s)
and mark all packages along the path as develop.

If people are doing development across the graph then paying
fetch and full rebuild costs every time spack develop is called
is unnecessary and expensive.

Also remove the constraint for concrete specs and simply take the
max(version) if a version is not given. This should default to the
highest infinity version which is also the logical best guess for
doing development.
2025-03-24 16:50:16 -07:00
Richard Berger
8ac826cca8 hip: add missing HIPCC_LINK_FLAGS_APPEND (#49436)
* hip: add missing HIPCC_LINK_FLAGS_APPEND

---------

Co-authored-by: rbberger <rbberger@users.noreply.github.com>
2025-03-24 13:58:47 -07:00
Teague Sterling
1b829a4a28 kentutils: add v478 (#49521) 2025-03-24 13:33:41 -07:00
Robert Maaskant
e2ed1c2308 py-pymoo: add v0.6.1.3 (#49603)
* py-pymoo: add v0.6.1.3
* py-pymoo: use a when context
* py-pymoo: group build only dependencies
2025-03-24 13:29:05 -07:00
Robert Maaskant
94b828add1 prometheus: improve dependency specs (#49175)
* prometheus: improve dependency specs
* fixup! prometheus: improve dependency specs
* prometheus: fix typo in nodejs dep
* prometheus: fix checksums
2025-03-24 13:27:10 -07:00
Eric Berquist
fd7dcf3a3f sst-core: fix linkage against ncurses, zlib, and HDF5 (#49152)
* sst-core: fix for > 14.0.0 requiring ncurses

* sst-core: backport fix for curses detection

* sst-core: ensure HDF5 is ignored if not specified

* sst-core: HDF5 integration is via C++

* sst-core: switch to with_or_without for configure

* sst-core: switch to enable_or_disable for configure

* sst-core: control memory pools and debug output with variants
2025-03-24 12:45:12 -07:00
Alec Scott
e3bb0d77bc hugo: add v0.145.0 (#49576) 2025-03-24 13:23:21 -06:00
Jon Rood
25761b13e5 kokkos-kernels: rewrite package to fix errors (#49598)
* kokkos-kernels: fix eti dependency statements.

* kokkos-kernels: rewrite package.

* Fix errors.

* Style.

* Style.

* Cleanup.
2025-03-24 12:25:20 -06:00
Stephen Nicholas Swatman
ae48faa83a detray: add v0.90.0-v0.93.0 (#49658)
This commit adds detray versions 0.90.0, 0.91.0, 0.92.0, and 0.93.0.
2025-03-24 10:13:03 -07:00
Afzal Patel
e15a3b0717 hip: fix hip-tests error (#49563) 2025-03-24 10:04:19 -07:00
Andrey Perestoronin
2c8afc5443 Add new 2025.1.0 release for intel-oneapi products (#49642)
* Add new versions of intel-oneapi products

* restore advisor 2025.0.0 release

* fix styling
2025-03-24 11:02:55 -06:00
Sreenivasa Murthy Kolam
99479b7e77 rocprofiler-sdk: new package (#49406)
* rocprofiler-sdk new package
* add license, rocm tag
2025-03-24 09:57:39 -07:00
psakievich
5d0b5ed73c EnvironmentModifications: fix reverse prepend/append (#49645)
pop a single item from front / back resp. instead of remove all instances
2025-03-24 17:29:27 +01:00
Ryan Krattiger
151af13be2 Unit tests: error message when running parallel without xdist (#49632) 2025-03-24 09:25:45 -07:00
Alec Scott
93ea3f51e7 zig: add v0.14.0 (#49629)
* zig: add v0.14.0

* Fix commit hash

* Fix tag for v0.14.0
2025-03-24 08:07:34 -07:00
Alec Scott
a3abc1c492 Fix ci failures after merge of mock tests created before license transition (#49638) 2025-03-21 21:17:56 -06:00
Simon Pintarelli
401484ddf4 remove version prior 7.3 from SIRIUS (#49584) 2025-03-21 20:46:39 +01:00
Robert Maaskant
fc4e76e6fe py-setuptools-scm: fix deps (#49609) 2025-03-21 11:18:11 -07:00
Alec Scott
0853f42723 smee-client: add v3.1.1 (#49578) 2025-03-21 11:56:37 -06:00
Alec Scott
19ca69d0d8 typos: add v1.30.2 (#49577)
* typos: add v1.30.2

* Add rust dependency constraint
2025-03-21 11:56:00 -06:00
Alec Scott
036794725f bfs: add v4.0.6 (#49575) 2025-03-21 11:55:16 -06:00
Alec Scott
e5a2c9aee3 emacs: add v30.1 (#49574) 2025-03-21 11:54:31 -06:00
Alec Scott
5364b88777 fzf: add v0.60.3 (#49573) 2025-03-21 11:43:26 -06:00
Alec Scott
7d1b6324e1 npm: add v11.2.0 (#49572) 2025-03-21 11:42:45 -06:00
Alexandre DENIS
3d0263755e mpibenchmark: add v0.6 (#49612)
* mpibenchmark: add version 0.6
* mpibenchmark: fix syntax
* mpibenchmark: improve package description
2025-03-21 09:54:56 -07:00
Jon Rood
54ad5dca45 exawind: add versions and commits to tags (#49615)
* exawind: add versions and commits to tags.
* Add new version of TIOGA.
* openfast: add commits to tags.
* amr-wind: add dependencies.
* amr-wind: add more settings.

---------

Co-authored-by: jrood-nrel <jrood-nrel@users.noreply.github.com>
2025-03-21 09:49:37 -07:00
Lehman Garrison
ee206952c9 py-uv: add v0.6.8 (#49616) 2025-03-21 09:38:17 -07:00
Ryan Krattiger
4ccef372e8 E4S: Allow building newer ParaView for Linux CI (#47823)
5.11 was locked at a time when master was building by default. Allowing
building newer paraview in CI
2025-03-21 09:07:37 -07:00
Jon Rood
ac6e534806 openfast: patch versions to fix openmp bug. (#49631) 2025-03-21 09:06:56 -07:00
Greg Becker
5983f72439 fix extendee_spec for transitive dependencies on potential extendees (#48025)
* fix extendee_spec for transitive dependencies on potential extendees

* regression test

* resolve conditional extensions on direct deps

* remove outdated comment

Co-authored-by: Harmen Stoppels <me@harmenstoppels.nl>

---------

Co-authored-by: Harmen Stoppels <me@harmenstoppels.nl>
2025-03-21 08:27:51 -07:00
Stephen Sachs
6e10fac7ae openfoam: restrict the CGAL version compatible with C++14 (#47689)
* openfoam: restrict the CGAL version compatible with C++14

CGAL throws an
[error](50219fc33b/Installation/include/CGAL/config.h (L147))
if C++ lower than 17 is used, while OpenFOAM [forces
C++14](https://develop.openfoam.com/Development/openfoam/-/blob/develop/wmake/rules/General/Gcc/c++?ref_type=heads#L9).
This hard C++17 dependency was
[introduced](e54408370b)
to CGAL version 6.

* Add upper bound since openfoam now uses c++17

44f7a7268a
2025-03-21 08:23:33 -07:00
Derek Ryan Strong
ee6ea5155c Add libjpeg-turbo v3.0.4 (#48030) 2025-03-21 08:22:01 -07:00
Cyrus Harrison
48258e8ddc conduit: add v0.9.3 (#48736)
* add 0.9.3 release, fix license listed
* fix sha
2025-03-21 08:20:50 -07:00
Robert Maaskant
429b0375ed yarn: v1.22.22 (#49171) 2025-03-21 08:12:13 -07:00
Robert Maaskant
c6925ab83f new package: py-loky (#49602) 2025-03-21 08:06:36 -07:00
Wouter Deconinck
00d78dfa0c pythia8: add v8.313 (#49045)
* pythia8: add v8.313

* pythia8: conflicts ~yoda +rivet only when @8.313:
2025-03-21 07:59:55 -07:00
Wouter Deconinck
e072a91572 libx11: add v1.8.11 (#48863) 2025-03-21 07:58:12 -07:00
Wouter Deconinck
b7eb0308d4 node-js: run tests with target test-only (#49516) 2025-03-21 07:52:26 -07:00
Wouter Deconinck
c98ee6d8ac eigen: build test executables when self.run_tests (#49540) 2025-03-21 07:50:54 -07:00
Wouter Deconinck
b343ebb64e qt-base: pass SBOM PATH from cmake_args (#49596)
* qt-base: pass SBOM PATH from cmake_args

* qt-base: self.define from list

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

---------

Co-authored-by: Seth R. Johnson <johnsonsr@ornl.gov>
2025-03-21 07:50:09 -07:00
Adam J. Stewart
e178d2c75d py-torchmetrics: add v1.7.0 (#49633) 2025-03-21 07:44:47 -07:00
Matt Thompson
9b64560ae6 mapl: add v2.53.3, v2.54.2 (#49610) 2025-03-21 07:18:22 -07:00
David Ozog
ca226f3506 sos: (and tests-sos:) update to v1.5.3, add main branch (#49613)
* sos/tests-sos: update to v1.5.3 & add main branch

* [@spackbot] updating style on behalf of davidozog

* sos: cleanup try/except around cloning tests

---------

Co-authored-by: davidozog <davidozog@users.noreply.github.com>
2025-03-21 09:28:16 -04:00
Caetano Melone
8569e04fea py-ruff: add v0.11.1 (#49617)
* py-ruff: add v0.11.1

Add latest version and update minimum supported rust version for 0.9.8
and up.

[before](https://github.com/astral-sh/ruff/blob/0.9.7/Cargo.toml#L7) and
[after](https://github.com/astral-sh/ruff/blob/0.9.8/Cargo.toml#L7)

* minimum rust version

Co-authored-by: Alec Scott <hi@alecbcs.com>

---------

Co-authored-by: Alec Scott <hi@alecbcs.com>
2025-03-21 09:14:13 +01:00
Robert Maaskant
32213d5e6b fix: spack audit issues (#49557) 2025-03-20 22:41:15 -07:00
Paul R. C. Kent
4891f3dbc9 rmgdft: add develop version (#49558) 2025-03-20 22:39:26 -07:00
Anderson Chauphan
2b5959c3dd trilinos: add v16.1.0 (#49628)
Signed-off-by: Anderson Chauphan <achauph@sandia.gov>
2025-03-20 22:37:43 -07:00
Suzanne Prentice
353db6752a ruby: add v3.2.5 (#49537) 2025-03-20 22:34:45 -07:00
Adam J. Stewart
bf24b8e82c py-lightning: add v2.5.1 (#49600) 2025-03-21 01:31:17 -04:00
psakievich
f2d830cd4c Get env_var mods from config (#49626) 2025-03-20 21:48:50 -05:00
brian-kelley
070bfa1ed7 KokkosKernels: apply PR 2296 as patch (#49627)
Applies this fix to all affected versions (4.0.00:4.4.00).
Fixes issue #49622.

Signed-off-by: Brian Kelley <bmkelle@sandia.gov>
2025-03-20 20:13:00 -06:00
Alec Scott
c79b6207e8 ci: add automatic checksum verification check (#45063)
Add a CI check to automatically verify the checksums of newly added
package versions:
    - [x] a new command, `spack ci verify-versions`
    - [x] a GitHub actions check to run the command
    - [x] tests for the new command

This also eliminates the suggestion for maintainers to manually verify added
checksums in the case of accidental version <--> checksum mismatches.

----

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2025-03-20 22:58:14 +01:00
Wouter Deconinck
38d77570b4 qt-tools: conflicts +assistant when 6.8.2 (#49605) 2025-03-20 16:27:44 -04:00
Piotr Sacharuk
d8885b28fa paraview: Apply workarounds for oneAPI compiler for paraview problem with build (#48892)
* Apply workarounds for oneAPI compiler for paraview problem with build

* add source of provided patches
2025-03-20 12:44:56 -05:00
eugeneswalker
abd3487570 dyninst: %gcc only required for versions <13 (#49599) 2025-03-20 09:27:11 -07:00
Richard Berger
0d760a5fd8 libfuse: fix aarch64 compile for 2.x (#47846) 2025-03-20 13:42:51 +01:00
Felix Thaler
dde91ae181 Added btop 1.4.0 (#49586) 2025-03-19 19:04:07 -06:00
Krishna Chilleri
590dbf67f3 py-cwl-utils: add v0.37 and py-schema-salad: add v8.8.20250205075315 (#49566)
* add new version

* add v8.8.20250205075315 to py-schema-salad

* Modify range to open ended

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

* Add open ended dependency version range

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

* fix flake8 error

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2025-03-19 17:46:00 -05:00
Christoph Junghans
d199738f31 lfortran: add v0.49.0 (#49565)
* lfortran: add v0.49.0
* add v0.19.0 url as version directive argument
   Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2025-03-19 14:39:08 -06:00
snehring
f55f829437 topaz: add v0.3.7 (#49178)
* topaz: add v0.3.7
   Signed-off-by: Shane Nehring <snehring@iastate.edu>
* topaz: add older version url
   Signed-off-by: Shane Nehring <snehring@iastate.edu>

---------

Signed-off-by: Shane Nehring <snehring@iastate.edu>
2025-03-19 12:22:49 -07:00
snehring
295f3ff915 sentieon-genomics: updating checksums for patch (#48635)
Signed-off-by: Shane Nehring <snehring@iastate.edu>
2025-03-19 11:56:38 -07:00
Harmen Stoppels
a0ad02c247 solver: improve error message when single-valued variant cannot be satisfied (#49583) 2025-03-19 19:44:45 +01:00
Krishna Chilleri
a21d314ba7 py-cachecontrol: add v0.14.0 (#49564)
* add new version

* Update var/spack/repos/builtin/packages/py-cachecontrol/package.py

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

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2025-03-19 12:30:55 -05:00
Teague Sterling
a4ad8c8174 plink2: add v2.0.0-a.6.9 (#49520)
* Adding additional versions to plink2 and switching to tarballs to allow for better version detection in the future
   Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
* plink2: add v2.0.0-a.6.9
   Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
* Prepend "v" to version in url_for_version()
   Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>

---------

Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2025-03-19 10:59:26 -06:00
Lehman Garrison
aa3ee3fa2a py-asdf: add v4.1.0 and related (#49454)
* py-asdf-transform-schemas: add v0.5.0
* py-asdf-coordinates-schemas: add new package at v0.3.0
* py-asdf-astropy: add new package at v0.7.1
* py-asdf: add v4.1.0
2025-03-19 08:09:05 -07:00
germanne
a8584d5eb4 asp.py: abs_control_files shouldn't ask for write rights (#49591) 2025-03-19 15:19:40 +01:00
Massimiliano Culpo
26f7b2c066 builtin: replace self.spec[self.name] with self (take 2) (#49579)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-19 12:28:57 +01:00
Massimiliano Culpo
3a715c3e07 python: remove self.spec["python"] from recipe (#49581)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-19 12:23:53 +01:00
Harmen Stoppels
963519d2b2 builtin: self.spec[self.name].command -> self.command (#49582)
* builtin: self.spec[self.name].command -> self.command

* python-venv: ensure return type is Executable instead of Executable | None
2025-03-19 11:37:01 +01:00
Krishna Chilleri
34efcb686c add new version (#49562) 2025-03-19 11:06:22 +01:00
Harmen Stoppels
5016084213 Move default implementation of pkg.command to PackageBase (#49580) 2025-03-19 09:28:29 +00:00
Massimiliano Culpo
5a04e84097 solver: allow prefer and conflict on virtuals in packages config (#45017) 2025-03-19 09:53:05 +01:00
Massimiliano Culpo
ec34e88d79 builtin: replace self.spec[self.name] by self (#49567)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-19 08:56:55 +01:00
Massimiliano Culpo
31fa12ebd3 perl: remove self references (#49560)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-19 08:54:41 +01:00
Harmen Stoppels
ecf414ed07 docs: add strong preferences to faq (#49556) 2025-03-19 08:53:14 +01:00
Rocco Meli
119bec391e nvpl-scalapack: new package (#49234)
* nvpl-scalapack

* rm variant

* nvpl-scalapack

* Apply suggestions from code review

Co-authored-by: Alberto Invernizzi <9337627+albestro@users.noreply.github.com>

* mpi

---------

Co-authored-by: Alberto Invernizzi <9337627+albestro@users.noreply.github.com>
2025-03-19 08:47:26 +01:00
Juan Miguel Carceller
d5c0ace993 simsipm: add a new version and a variant for setting the C++ standard (#49554)
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
Co-authored-by: Valentin Volkl <valentin.volkl@cern.ch>
2025-03-19 01:03:29 -06:00
Teague Sterling
d6bbd8f758 vep-cache: update for vep@113.3 (#49517)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2025-03-19 01:03:10 -06:00
Mateusz Jakub Fila
f74d51bf6e fastjet: add v3.4.3 (#49526) 2025-03-19 00:48:24 -06:00
Davis Herring
821ebee53c flecsi: remove (Par)METIS dependency in 2.3.2 (#49480)
* Remove (Par)METIS dependency for new version
* Fix version constraints
2025-03-19 00:48:09 -06:00
Adrien Bernede
9dada76d34 Update hip support in radiuss packages leveraging blt@0.7.0 (#49488)
Co-authored-by: Chris White <white238@llnl.gov>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-19 07:36:52 +01:00
Robert Maaskant
e9cc1b36bc kubernetes: add v1.30.0 -> v1.32.3 (#49211)
* kubernetes: add new versions

* kubernetes: add v1.30.11, v1.31.7, v1.32.3

* kubernetes: remove new deprecated versions and refactor build deps
2025-03-18 18:54:12 -06:00
David--Cléris Timothée
fd2c040981 hipsycl: rework llvm compatibility matrix (#49507)
* [hipsycl] add llvm 20 conflict
* add llvm matrix support & add 24.10 release

---------

Co-authored-by: tdavidcl <tdavidcl@users.noreply.github.com>
2025-03-18 15:54:03 -07:00
Robert Maaskant
33cd7d6033 kubectl: add v1.30.0 -> v1.32.3 (#49082)
* kubectl: add all versions currently supported upstream

* kubectl: build same way as kubernetes

* kubectl: revert back to GoPackage

* kubectl: fix version command

* kubectl: add v1.30.11, v1.31.7, v1.32.3

* kubectl: remove new deprecated versions

* kubectl: refactor build deps
2025-03-18 10:16:57 -07:00
Alex Richert
9c255381b1 parallelio: set WITH_PNETCDF from +/~pnetcdf (#49548) 2025-03-18 05:03:55 -06:00
SXS Bot
fd6c419682 spectre: add v2025.03.17 (#49533)
Co-authored-by: sxs-bot <sxs-bot@users.noreply.github.com>
2025-03-18 05:03:37 -06:00
Robert Maaskant
9d1d808f94 py-tqdm: add v4.66.4 -> v4.67.1 (#49525) 2025-03-18 00:06:13 -06:00
Axel Huebl
7a0ef93332 WarpX: Remove Deprecated Versions (#46765)
* WarpX: Remove Deprecated Versions

* Conflict: WarpX SYCL RZ FFT Issue

Conflict out on WarpX issue until fixed
https://github.com/BLAST-WarpX/warpx/issues/5774

* Fix #49546
2025-03-17 21:40:38 -06:00
Teague Sterling
bf48b7662e wasi-sdk-prebuilt: add v25.0,v24.0,v23.0 (#49523)
* wasi-sdk-prebuilt: add v25.0,24.0,23.0

---------

Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2025-03-17 20:13:34 -06:00
Teague Sterling
d14333cc79 libgtop: add v2.41.1-2.41.3 (#49524)
* libgtop: new package
   Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
* Adding pkgconfig dep
   Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
* Adding note about https://github.com/spack/spack/pull/44323
   Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
* libgtop: add v2.41.3
   Signed-off-by: Teague Sterling <teaguesterling@gmail.com>

---------

Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2025-03-17 19:41:42 -06:00
Teague Sterling
084361124e vep: add v113.3 (#49518) 2025-03-17 19:33:42 -06:00
Lehman Garrison
a1f4cc8b73 py-corrfunc: add new package at v2.5.3 (#49502) 2025-03-17 16:43:50 -07:00
Teague Sterling
b20800e765 awscli-v2: add v2.24.24 (#49519)
* awscli-v2: add v2.24.24

Signed-off-by: Teague Sterling <teaguesterling@gmail.com>

---------

Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2025-03-17 16:24:21 -07:00
Fabio Durastante
01b1e24074 psblas: new package (#49423)
* Package for installing the PSBLAS library
* Put some version as deprecated
* Removed FIXME comments
* Added missing :
* Fixed style to comply with flex8
* Other round of style fixes to comply with flex8
* Used black to reformat the file
* Fixed typo
   Co-authored-by: Luca Heltai <luca.heltai@unipi.it>
* Added explicit .git extension
   Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
* Fixed typo on METIS string
   Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
* Added url before removing urls from the the version directives.
   Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
* Corrected typo in url.
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
* Reordered variant and depend_on, removed deprecated and old software versions

---------

Co-authored-by: Luca Heltai <luca.heltai@unipi.it>
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2025-03-17 10:47:59 -07:00
Harmen Stoppels
8029279dad gcc: drop redundant --with-ld and --with-as configure flags (#49538)
it's redundant due to our spec file which adds -B, and it breaks -fuse-ld=
2025-03-17 18:35:23 +01:00
Greg Sjaardema
5f4e12d8f2 seacas: add 2025-03-13 (bug fix, new functionality, portability) (#49474)
* seacas: bug fix, new functionality, portability
* Get new checksum due to moving tag forward...
2025-03-17 15:44:17 +00:00
Satish Balay
a8728e700b petsc4py, slepc4py: update homepage, add maintainers (#49383) 2025-03-17 16:19:34 +01:00
Wouter Deconinck
f8adf2b70f libunwind: variant component value setjump -> setjmp (#49508) 2025-03-17 16:12:59 +01:00
Andy Porter
d0ef2d9e00 py-fparser: add v0.2.0 (#47807)
* Update to release 0.2.0

* #47087 updates for review
2025-03-17 11:19:55 +01:00
Melven Roehrig-Zoellner
d4bd3e298a cgns: patch for include path for 4.5 (#49161)
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2025-03-17 11:19:13 +01:00
sbstndb/sbstndbs
40268634b6 xsimd: add v9.0.1 -> 13.1.0 (#49156) 2025-03-17 11:18:24 +01:00
sbstndb/sbstndbs
b0e8451d83 xtl: add v0.7.7 (#49157) 2025-03-17 11:16:40 +01:00
Massimiliano Culpo
868a52387b Revert "py-flowcept: add py-flowcept package (#47745)" (#49528)
This reverts commit 3fe89115c2.
2025-03-17 11:10:19 +01:00
Matthieu Dorier
3fe89115c2 py-flowcept: add py-flowcept package (#47745)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-17 11:05:51 +01:00
Wouter Deconinck
412024cf21 git: add v2.48.1 and friends (#49061)
* git: add v2.47.1, v2.48.1

* git: deprecate older versions

* fixed incorrect sha256 for git-manpage for git-manpages-2.47.2.tar.gz listed at https://mirrors.edge.kernel.org/pub/software/scm/git/sha256sums.asc (#49095)

---------

Co-authored-by: Jennifer Green <jkgreen@sandia.gov>
Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
2025-03-17 11:02:40 +01:00
Hariharan Devarajan
91b20ed7d0 pydftracer, brahma: add new releases (#49245) 2025-03-17 11:00:43 +01:00
Robert Maaskant
0caacc6e21 py-wheel: add v0.41.3 -> v0.45.1 (#49238) 2025-03-17 10:59:23 +01:00
Robert Maaskant
651126e64c openssl: add v3.4.1 and backports (#49250)
Release notes:
- https://github.com/openssl/openssl/blob/openssl-3.4/CHANGES.md#changes-between-340-and-341-11-feb-2025
- https://github.com/openssl/openssl/blob/openssl-3.3/CHANGES.md#changes-between-332-and-333-11-feb-2025
- https://github.com/openssl/openssl/blob/openssl-3.2/CHANGES.md#changes-between-323-and-324-11-feb-2025
- https://github.com/openssl/openssl/blob/openssl-3.1/CHANGES.md#changes-between-317-and-318-11-feb-2025
- https://github.com/openssl/openssl/blob/openssl-3.0/CHANGES.md#changes-between-3015-and-3016-11-feb-2025
2025-03-17 10:57:54 +01:00
Wouter Deconinck
e15a530f32 py-onnxruntime: use CudaPackage (#47684) 2025-03-17 10:35:20 +01:00
Martin Lang
0f84623914 elpa: add 2024.05.001, 2025.01.001 (#49335) 2025-03-17 10:33:23 +01:00
Kin Fai Tse
90afa5c5ef openfoam: add v2406, v2412, fix minor link deps (#49254) 2025-03-17 10:32:15 +01:00
Alberto Sartori
024620bd7b justbuild: add v1.5.0 (#49343) 2025-03-17 09:59:49 +01:00
Wouter Deconinck
9bec8e2f4b py-setuptools-scm-git-archive: add v1.4.1 (#49347) 2025-03-17 09:50:20 +01:00
Dave Keeshan
18dd465532 verible: Add v0.0.3946 (#49362) 2025-03-17 09:47:00 +01:00
Satish Balay
a2431ec00c mpich: add v4.3.0 (#49375) 2025-03-17 09:39:18 +01:00
MatthewLieber
78abe968a0 mvapich: add v4.0 and update default pmi version (#49399)
Co-authored-by: Matt Lieber <lieber.31@osu.edu>
2025-03-17 01:38:19 -07:00
Wouter Deconinck
38e9043b9e yoda: add v2.1.0; rivet: add v4.1.0 (#49382) 2025-03-17 09:37:42 +01:00
Fernando Ayats
a0599e5e27 py-chex: add 0.1.89, py-optax: add 0.2.4(#49388) 2025-03-17 09:34:42 +01:00
George Young
1cd6f4e28f py-macs3: add @3.0.3 (#49365)
Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk>
2025-03-17 09:30:08 +01:00
Eric Berquist
d2298e8e99 SST: update package maintainers (#49392) 2025-03-17 09:28:39 +01:00
Robert Maaskant
e3806aeac5 py-setuptools: add v75.8.1 -> v76.0.0 (#49251)
* py-setuptools: add v75.8.1, v75.8.2

Release notes:
- https://setuptools.pypa.io/en/stable/history.html#v75-8-1
- https://setuptools.pypa.io/en/stable/history.html#v75-8-2

* py-setuptools: add v75.9.1, v76.0.0
2025-03-17 09:26:41 +01:00
Seth R. Johnson
38309ced33 CLI11: new versions, PIC option (#49397) 2025-03-17 09:25:10 +01:00
Robert Maaskant
2f21201bf8 util-linux-uuid: add v2.40.3, v2.40.4 (#49441) 2025-03-17 09:16:19 +01:00
Matt Thompson
95a0f1924d openmpi: fix internal-libevent variant (#49463) 2025-03-17 09:06:43 +01:00
Olivier Cessenat
52969dfa78 gsl: add external find (#48665) 2025-03-17 09:05:08 +01:00
Massimiliano Culpo
ee588e4bbe chameleon: update to use oneapi packages (#49498)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-17 08:50:05 +01:00
Massimiliano Culpo
461f1d186b timemory: update to use oneapi packages (#49305)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-17 08:48:57 +01:00
Massimiliano Culpo
03b864f986 ghost: remove outdated comments (#49501)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-17 08:47:50 +01:00
Harmen Stoppels
bff4fa2761 spec.py: include test deps in dag hash, remove process_hash (take two) (#49505)
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2025-03-17 08:47:09 +01:00
Massimiliano Culpo
ad3fd4e7e9 fleur: update to use oneapi packages (#49500)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-17 08:46:50 +01:00
Massimiliano Culpo
a574a995f8 converge: remove package (#49499)
The package was added in 2017, and never updated
substantially. It requires users to login into
a platform to download code.

Thus, instead of updating to new versions, and add
support for OneAPI, remove the package.

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-17 08:46:32 +01:00
Massimiliano Culpo
0002861daf camx: update to use oneapi packages (#49497)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-17 08:44:45 +01:00
Massimiliano Culpo
a65216f0a0 dftfe: update to use oneapi packages (#49430)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-17 08:44:30 +01:00
Sebastian Pipping
7604869198 expat: add v2.7.0 with security fixes + deprecate vulnerable 2.6.4 (#49481) 2025-03-17 08:31:56 +01:00
afzpatel
d409126c27 hip: apply LLVM_ROOT and Clang_ROOT args only when installing hip+rocm (#49368) 2025-03-17 07:37:31 +01:00
Lehman Garrison
2b0d985714 py-numexpr: add v2.10.2 (#49490) 2025-03-17 07:07:48 +01:00
Wouter Deconinck
eedec51566 dcap: add test dependency on cunit (#49510) 2025-03-17 06:56:01 +01:00
Seth R. Johnson
016954fcff vecgeom: new dev tag (#49511)
* vecgeom: add surface-dev 2

* Update hash and mark as deprecated
2025-03-17 06:54:43 +01:00
Adam J. Stewart
0f17672ddb py-numpy: add v2.2.4 (#49512) 2025-03-17 06:47:18 +01:00
Harmen Stoppels
f82de718cd Revert "spec.py: include test deps in dag hash, remove process_hash (#48936)" (#49503)
This reverts commit 2806ed2751.
2025-03-15 22:56:03 +01:00
Todd Gamblin
4f6836c878 bugfix: Scopes shouldn't dynamically maintain include lists (#49494)
Fixes #49403.

When one scope included another, we were appending to a list stored on the scope to
track what was included, and we would clear the list when the scope was removed.

This assumes that the scopes are always strictly pushed then popped, but the order can
be violated when serializing config scopes across processes (and then activating
environments in subprocesses), or if, e.g., instead of removing each scope we simply
cleared the list of config scopes. Removal can be skipped, which can cause the list of
includes on a cached scope (like the one we use for environments) to grow every time it
is pushed, and this triggers an assertion error.

There isn't actually a need to construct and destroy the include list. We can just
compute it once and cache it -- it's the same every time.

- [x] Cache included scope list on scope objects
- [x] Do not dynamically append/clear the included scope list

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2025-03-15 13:21:36 -07:00
Harmen Stoppels
2806ed2751 spec.py: include test deps in dag hash, remove process_hash (#48936) 2025-03-15 13:12:51 -07:00
Richard Berger
92b0cb5e22 llvm: add v20.1.0 (#49456) 2025-03-15 07:05:20 -06:00
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
Asa
e35c5ec104 module generation: make package tags accessible in template (#48213) 2025-03-14 15:08:14 -07:00
Harmen Stoppels
60be77f761 spack style --spec-strings: fix non-str constant issue (#49492) 2025-03-14 21:54:02 +01:00
John W. Parent
69b7c32b5d MSVC: Restore amalgamated compiler functionality (#46678)
Right now the Spack %msvc compiler is inherently a hybrid compiler
that uses Intel's oneAPI fortran compiler.

This was addressed in Spacks MSVC compiler class, but detection has
since stopped using the compiler class, so this PR moves the logic
into the `msvc` compiler package (does not delete the original code
because that is handled in #45189).

This includes a change to the general detection logic to deprioritize
paths that include a symlink anywhere in the path, in order to prefer
"2025.0/bin" over "latest/bin" for the oneAPI compiler.
2025-03-14 13:36:41 -07:00
Rocco Meli
e2c6914dfe cp2k: add dependencies (#49489)
* update

* make comment a message

* [@spackbot] updating style on behalf of RMeli

---------

Co-authored-by: RMeli <RMeli@users.noreply.github.com>
2025-03-14 13:18:33 -06: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
Diego Alvarez S.
324d733bf9 Add nextflow 24.10.5 (#49390) 2025-03-14 10:55:38 -05:00
sbstndb/sbstndbs
07bf35d54b samurai: new package (#49144)
* samurai: new package

	-	Add samurai : an HPC library of mesh and physics

* Update var/spack/repos/builtin/packages/samurai/package.py

Co-authored-by: Alec Scott <hi@alecbcs.com>

* Update var/spack/repos/builtin/packages/samurai/package.py

Co-authored-by: Alec Scott <hi@alecbcs.com>

* Update var/spack/repos/builtin/packages/samurai/package.py

Co-authored-by: Alec Scott <hi@alecbcs.com>

* Update var/spack/repos/builtin/packages/samurai/package.py

Co-authored-by: Alec Scott <hi@alecbcs.com>

* Update var/spack/repos/builtin/packages/samurai/package.py

Co-authored-by: Alec Scott <hi@alecbcs.com>

* Remove Whitespace

	-	Remove whitespace for spack style check

* Update var/spack/repos/builtin/packages/samurai/package.py

Co-authored-by: Alec Scott <hi@alecbcs.com>

* Add tags

	-	Add tags for the last versions of samurai
	-	All tags are tested and worked properly
	-	Add maintainers ("gouarin" - the samurai project lead and "sbstndb" - me, working on samurai)
	-	Add licence

---------

Co-authored-by: Alec Scott <hi@alecbcs.com>
2025-03-14 09:56:01 -04:00
Vanessasaurus
72196ee4a1 Automated deployment to update package flux-sched 2025-03-13 (#49451)
Co-authored-by: github-actions <github-actions@users.noreply.github.com>
2025-03-14 09:54:59 -04:00
Rocco Meli
738e41d8d2 mc main (#49476) 2025-03-14 09:52:05 -04:00
Daryl W. Grunau
f3321bdbcf draco: unify variant nomenclature with other spackages (#49479)
Co-authored-by: Daryl W. Grunau <dwg@lanl.gov>
2025-03-14 09:51:15 -04:00
snehring
9c6f0392d5 Revert "Add package libglvnd (#49214)" (#49478)
This reverts commit 682e4bf4d4.
2025-03-14 09:50:29 -04:00
Robert Maaskant
297848c207 libxcrypt: add v4.4.36, v4.4.38 (#49405)
* libxcrypt: add v4.4.36, v4.4.38

* libxcrypt: explain why 4.4.37 is absent

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

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2025-03-14 07:56:30 -05:00
Adam J. Stewart
e9c2a53d83 py-torchmetrics: add v1.6.3 (#49483) 2025-03-14 07:54:23 -05:00
Sébastien Valat
77b6923906 malt: Add version 1.2.5 (#49484) 2025-03-14 07:50:29 -05:00
psakievich
8235aa1804 Trilinos launch blocking + maintainers (#49468)
* Trilinos launch blocking + maintainers

Cuda launch blocking is not needed and slowing modern apps down. 

More maintainers to spot issues like this.

---------

Co-authored-by: psakievich <psakievich@users.noreply.github.com>
2025-03-14 02:08:30 -06:00
eugeneswalker
d09c5a4bd4 e4s cray rhel: petsc: require +batch (#49472) 2025-03-14 05:39:02 +00:00
Alex Richert
916755e22a crtm: disable testing if not self.run_tests (#49469)
* crtm: disable testing if not self.run_tests
* Update package.py
2025-03-13 23:23:51 -06:00
Olivier Cessenat
3676381357 dmtcp: add 3.2.0 (#49465) 2025-03-13 22:59:21 -06:00
Martin Lang
de9f92c588 Patch bug in elpa's cpp (#49462)
Elpa's custom preprocessor createst temporary files for which it
assembles long filenames and then uses the last 250 characters. This
results in compilation errors when the first character happens to be a
dash.
2025-03-13 21:36:06 -06:00
Martin Lang
6ba7aa325b Slurm: extend spack external find support (#47740)
* Slurm: extend spack external find support

On Debian srun/salloc --version returns 'slurm-wlm VERSION'. Check for both strings and return the first match.

* non-capturing group for slurm determine_version

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

* slurm: add detection test

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2025-03-13 21:35:49 -06:00
Mikael Simberg
c0cbbcfa0a mold: Add 2.37.1 (#49458) 2025-03-13 21:21:00 -06:00
Robert Maaskant
f2dc4ed6d3 npm: update v9 add v10 add v11 (#49181) 2025-03-13 14:24:14 -07:00
ddement
38bf1772a0 Added dependency on netcdf-c and removed need for basker variant on Trilinos (#49442) 2025-03-13 14:13:00 -07:00
Vanessasaurus
3460602fb9 flux-sched: add v0.43.0 (#49299)
* Automated deployment to update package flux-sched 2025-03-05

* add back patch from today

---------

Co-authored-by: github-actions <github-actions@users.noreply.github.com>
2025-03-13 16:44:16 -04:00
Teague Sterling
a6ce7735e6 duckdb: add v1.2.1 remove 0.9.0-0.10.3 (deprecated) (#49356)
* duckdb: add v1.2.1 remove 0.9.0-0.10.3 (deprecated)

Signed-off-by: Teague Sterling <teaguesterling@gmail.com>

* Add 0.10.3 and 0.10.2 back in

---------

Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2025-03-13 16:43:37 -04:00
snehring
4b11266e03 molden: add v7.3 (#49205)
Signed-off-by: Shane Nehring <snehring@iastate.edu>
2025-03-13 13:38:22 -07:00
Doug Jacobsen
436ff3c818 wrf: Remove fortran variant from hdf5 (#49286)
This commit removes the +fortran variant when building HDF5 for WRF.
This seems unnecessary, and prevents building WRF with some versions of
Intel MPI, as HDF5 doesn't appear to build with Fortran support and
Intel MPI.
2025-03-13 13:47:37 -04:00
Adam J. Stewart
fa35d8f8ec fish: add v4.0.1 (#49459) 2025-03-13 13:47:30 -04:00
Dave Keeshan
6f8a3674af jimtcl: add v0.83 (#49360) 2025-03-13 13:39:48 -04:00
Dave Keeshan
39b7276a33 verilator: add v5.034 (#49363) 2025-03-13 13:39:14 -04:00
Christophe Prud'homme
d67afc7191 parmmg: add new versions up to 1.5 and new variants (#47387)
* add new versions up to 1.5 and new variants

variant vtk: make vtk optional
variant shared: build shared libs

added patch to fix parmmg cmake so that it can be used by other software with find_package

* use +private for mmg@5.8: and parmmg@1.5:

* fix style and constraint mmg version

* add a condition on patch, use private_headers from mmg PR feelpp/spack#14
2025-03-13 12:50:34 -04:00
Dom Heinzeller
8823c57b72 Add met@11.1.1, met@12.0.0, met@12.0.1, metplus@6.0.0 (#49120)
* add MET v12.0.0 and METplus v6.0.0

* Set correct dependencies for metplus@6 in var/spack/repos/builtin/packages/metplus/package.py

* Add missing dependency on proj for met@12

* Add met@12.0.1

* Change @6.0.0 to @6: for requirements in var/spack/repos/builtin/packages/metplus/package.py

* Address reviewer comments for met and metplus

---------

Co-authored-by: Rick Grubin <Richard.Grubin@noaa.gov>
2025-03-13 08:01:26 -06:00
Harmen Stoppels
c8466c4cd4 hip: sha256 change after github repo was renamed (#49460) 2025-03-13 13:16:36 +01: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
11f52ce2f6 Warn when %compiler precedes +variant (#49410) 2025-03-13 10:45:09 +01:00
Axel Huebl
63895b39f0 WarpX: GitHub Org Moved (#49427)
The WarpX repo moved. ECP succeeded. Long live ECP.
2025-03-13 09:23:37 +01:00
Massimiliano Culpo
64220779d4 abyss: update to use oneapi packages, addv2.3.10 (#49429)
Add missing btllib dependency, needed from v2.3.6

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-13 08:56:39 +01:00
Massimiliano Culpo
774346038e plumed: update to use oneapi packages (#49432)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-13 08:32:09 +01:00
Massimiliano Culpo
03dbc3035c octave: add v9.4.0, remove mentions of old intel packages (#49431)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-13 08:31:12 +01:00
Davis Herring
ad78ed741c flecsi: add v2.3.2 (#49448)
Deprecate 2.3.0 and 2.3.1 which have the significant bug corrected
2025-03-13 00:05:41 -06:00
Matt Thompson
599d32d1c2 py-questionary: add 2.1.0 (#49414)
* py-questionary: add 2.1.0
* Reorder
* Add myself as maintainer
2025-03-12 19:31:42 -07:00
Massimiliano Culpo
e5c7fe87aa spla: update to use oneapi packages (#49435)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-12 19:26:47 -07:00
Massimiliano Culpo
cc6ab75063 speexdsp: update to use oneapi packages (#49434)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-12 19:26:32 -07:00
Massimiliano Culpo
fe00c13afa plasma: update to use oneapi packages (#49433)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-12 19:26:11 -07:00
Wouter Deconinck
d610ff6cb1 libseccomp: add v2.5.5, v2.5.6, v2.6.0 (#49243) 2025-03-12 19:14:26 -07:00
Wouter Deconinck
54f947fc2a armadillo: add v14.4.0 (#49242) 2025-03-12 19:12:44 -07:00
afzpatel
a5aa784d69 add 6.3.2 (#49266) 2025-03-12 19:10:10 -07:00
Robert Maaskant
3bd58f3b49 py-setuptools-scm: add v8.1.0, v8.2.0 (#49271)
* py-setuptools-scm: add v8.1.0, v8.2.0 and refactor deps
* fixup! py-setuptools-scm: add v8.1.0, v8.2.0 and refactor deps
* fixup! fixup! py-setuptools-scm: add v8.1.0, v8.2.0 and refactor deps
2025-03-12 19:04:51 -07:00
Wouter Deconinck
cac0beaecf (py-)onnx: add v1.17.0 (#49287)
* onnx/py-onnx: update to 1.17.0
* (py-)onnx: depends_on cmake@3.14: when=@1.17:

---------

Co-authored-by: Joseph C Wang <joequant@gmail.com>
2025-03-12 19:02:09 -07:00
kenche-linaro
406ccc2fe3 linaro-forge: add v24.1.2 (#49223) 2025-03-12 18:59:50 -07:00
snehring
40cd8e6ad8 virtualgl: add v3.1.2 (#49215)
Signed-off-by: Shane Nehring <snehring@iastate.edu>
2025-03-12 18:58:14 -07:00
snehring
682e4bf4d4 Add package libglvnd (#49214)
* Add package libglvnd
  Signed-off-by: Shane Nehring <snehring@iastate.edu>
* libglvnd: add virtual defaults
  Signed-off-by: Shane Nehring <snehring@iastate.edu>

---------

Signed-off-by: Shane Nehring <snehring@iastate.edu>
2025-03-12 18:53:43 -07:00
John W. Parent
56b2979966 adios2 package: turn off new options by default on windows (#47070)
... for now. Will turn them back on for Windows when necessary
adjustments are made to the package to support them.
2025-03-12 16:48:11 -07:00
Tamara Dahlgren
d518aaa4c9 path and remote_file_cache: support windows paths (#49437)
Windows paths with drives were being interpreted as network protocols
in canonicalize_path (which was expanded to handle more general URLs
in #48784).

This fixes that and adds some tests for it.
2025-03-12 22:28:37 +00:00
Thomas Dickerson
8486a80651 Fix: tensorflow empty config vars (#49424)
* Create allow-empty-config-environment-variables.patch

* Apply patch from last commit

* [@spackbot] updating style on behalf of elfprince13

---------

Co-authored-by: elfprince13 <elfprince13@users.noreply.github.com>
2025-03-12 14:25:32 -06:00
Thomas Dickerson
28341ef0a9 Fix assumption of linux platform in py-tensorflow (#49425)
post_configure_fixes assumed py-tensorflow depends on patchelf, but that dependency is platform dependent.
2025-03-12 14:05:17 -06:00
Harmen Stoppels
f89a2ada4c Move %compiler last in static spec strings (#49438) 2025-03-12 19:41:43 +01:00
Harmen Stoppels
cf804c4ea8 cppcheck: add latest, deprecate older versions (#49445) 2025-03-12 18:16:13 +01:00
Harmen Stoppels
a45d09abcd Spec to string: show %compiler at the end (#49439)
In Spack v1.0 we plan to parse caret ^ and percent % the same. Their meaning is direct and transitive dependency respectively. It means that variants, versions, arch, platform, os, target and dag hash should go before the %, so that they apply to dependent not the %dependency.
2025-03-12 18:15:34 +01:00
Harmen Stoppels
cd3068dc0b warpx: update checksum after repo name changed (#49443) 2025-03-12 15:28:07 +01:00
Althea Denlinger
de9aa3bcc6 nco: Add many versions and OpenMP support (#49014)
* Include OpenMP support
* Add many new versions of NCO
* Add maintainers

---------

Co-authored-by: Xylar Asay-Davis <xylarstorm@gmail.com>
2025-03-12 08:23:06 -06:00
Harmen Stoppels
db7ab9826d spec_parser: check next_token if not expecting next token (#49408) 2025-03-12 08:39:23 +01:00
Harmen Stoppels
9f69d9b286 get_mark_from_yaml_data: move to spack.util.spack_yaml (#49409) 2025-03-12 08:36:14 +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
Robert Maaskant
4cb4634c74 oniguruma: add v6.9.10 (#49412)
* oniguruma: add v6.9.10

* oniguruma: update url to trigger ci
2025-03-11 20:02:15 -05:00
Robert Maaskant
594554935d nghttp2: add v1.65.0 (#49411) 2025-03-11 19:58:59 -05:00
Mikael Simberg
8b56470650 mold: Add 2.37.0 (#49416) 2025-03-11 19:55:09 -05:00
Michael Kuhn
ba4fd64caa postgresql: add missing perl build dependency (#49417)
Without it, the build fails with errors like this:
```
Can't locate File/Compare.pm in @INC (you may need to install the File::Compare module) (@INC contains: ...) at ../../../src/backend/catalog/Catalog.pm line 19.
```
2025-03-11 15:51:22 -05:00
Loïc Pottier
07ec8a9ba3 Added standalone package to install flux python api (#49197)
Signed-off-by: Loic Pottier <pottier1@llnl.gov>
2025-03-11 10:24:05 -07:00
Vicente Bolea
64ba324b4a adios2: fix smoke test (#49199) 2025-03-11 10:15:22 -07:00
Andy Porter
2aab567782 py-psyclone: add v3.1.0 (#49190)
* Update py-psyclone package.py to refer to 3.1.0 release
* Fix hash for 3.1.0 tarball
2025-03-11 10:13:50 -07:00
John W. Parent
d4e29c32f0 CMake: verions 3.30.8, 3.31.6 (#49192) 2025-03-11 10:09:16 -07:00
Adam J. Stewart
30e5639995 fish: add v4.0.0 (#49283) 2025-03-11 17:16:42 +01:00
Adam J. Stewart
fa4c09d04e GEOS: add v3.9.6 -> v3.13.1 (#49279) 2025-03-11 17:13:51 +01:00
Adam J. Stewart
f0a458862f py-keras: add v3.9.0 (#49300) 2025-03-11 17:10:28 +01:00
Adam J. Stewart
2938680878 py-rtree: add v1.4.0 (#49336) 2025-03-11 17:09:52 +01:00
Adam J. Stewart
a8132e5c94 libspatialindex: add v2.1.0 (#49337) 2025-03-11 17:09:01 +01:00
Massimiliano Culpo
9875a0e807 cairo: fix a few "wrong" defaults (#49415)
Having variants all conditional leaves a lot more degree of freedom to clingo,
and slows down the search.

If variants have inconsistent defaults, we might end up with multiple, equally 
sub-optimal solutions. Sometimes this creates a "plateau" in the search space.

Remove conditional boolean variants that can't be activated, since this just increases
the complexity of the model.

If 4 variants have to be all active / inactive together, it's better to use a single requires, 
than to explode it into multiple statements dealing with a single variant at a time.

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-11 17:05:23 +01:00
Michael Kuhn
cb4d3a9fc2 vim: add 9.1.1194 (#49418) 2025-03-11 09:34:03 -06:00
psakievich
7d79648cb5 build_environment.py: fix external module loading (#49401)
* load external modules in topo order from leaf to root
* only load external modules of transitive link/run deps
2025-03-11 14:05:26 +01:00
Robert Maaskant
e84e5fa9bf node-js: add versions up to 22.14.0 (#49131) 2025-03-11 06:38:41 -06:00
John W. Parent
f25cbb0fe4 icu4c package: fix windows build quoting issue (#49196)
ICU4C's NMAKE seems to over-quote to the degree
that it  passes paths like ""<path>"" which
confuses the Python command line in subprocesses
the build starts
2025-03-10 18:19:28 -07:00
John W. Parent
f3257cea90 Windows Ci: Ensure consistent EOL (#49377) 2025-03-10 18:06:02 -07:00
Stephen Nicholas Swatman
d037e658a4 geomodel: add v6.10.0 (#49386)
This commit adds version 6.10.0 of the geomodel package.
2025-03-10 10:10:57 -05:00
Wouter Deconinck
a14acd97bd fjcontrib: add v1.101 (#49182) 2025-03-10 08:09:46 -07:00
Robert Maaskant
199cce879f ca-certificates-mozilla: add v2025-02-25 (#49184)
* ca-certificates-mozilla: v2025-02-25

* ca-certificates-mozilla: undo refactor
2025-03-10 09:27:57 -04:00
Robert Maaskant
7d66063bd9 go: v1.22.12, v1.23.7, v1.24.1 (#49389) 2025-03-10 09:24:52 -04:00
Massimiliano Culpo
47c6fb750a spfft: update to use oneapi packages (#49311)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-10 08:32:49 +01:00
Massimiliano Culpo
8c3ac352b7 suite-sparse: update to use oneapi packages (#49310)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-10 08:32:01 +01:00
Massimiliano Culpo
d6ac16ca16 dyhidrogen: update to use oneapi packages (#49303)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-10 08:29:47 +01:00
Peter Scheibel
75e37c6db5 use default modify scope if no scope contains key (#48777)
If you use `spack config change` to modify a `require:` section that did
not exist before, Spack was inserting the merged configuration into the
highest modification scope (which for example would clutter the
environment's `spack.yaml` with a bunch of configuration details 
from the defaults).
2025-03-09 21:31:56 -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
Satish Balay
07d4915e82 petsc, py-petsc4py: add v3.22.4 (#49374) 2025-03-08 12:23:31 -06: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
Rémi Lacroix
5783f950cf google-cloud-cli: Install missing "platform" directory (#49367)
Ignore the bundled Python since it's provided by Spack.

This fixes the "gsutil" command.
2025-03-07 23:16:57 -06:00
Edoardo Zoni
1c76c88f2c WarpX & pyAMReX 25.03 (#49328)
* pyAMReX 25.03

* Adding EZoni to pyAMReX Spack package maintainers

* WarpX 25.03

* Fix SHA-256 checksums

---------

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2025-03-07 21:03:28 -08: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
wspear
be521c441e Conflict bugged +comm variant (#49371)
This will be fixed in the next tau release. Conflicted up to current. @kwryankrattiger
2025-03-07 16:29:46 -06:00
Wouter Deconinck
61ffb87757 actsvg: add v0.4.51 (#49352) 2025-03-07 16:53:02 +01:00
Chris Marsh
950b4c5847 py-rpy2: add missing libiconv (#49355)
* add missing libiconv

* use the virtual provider
2025-03-07 08:16:39 -06:00
Piotr Sacharuk
ac078f262d raja: Apply workarounds for oneAPI compiler for problem with build (#49290) 2025-03-07 06:44:11 -05:00
Harmen Stoppels
fd62f0f3a8 repo create: set api: vX.Y (#49344) 2025-03-07 08:34:55 +01:00
Chris White
ca977ea9e1 Fix missing hipBlas symbol (#49298)
Co-authored-by: Eric B. Chin <chin23@llnl.gov>
Co-authored-by: Greg Becker <becker33@llnl.gov>
2025-03-06 13:43:18 -08:00
Robert Maaskant
0d2c624bcb glib: add v2.82.5 (#49281) 2025-03-06 17:49:14 +01:00
Alec Scott
765b6b7150 py-aiojobs: new-package (#49329)
* py-aiojobs: new-package

* Update var/spack/repos/builtin/packages/py-aiojobs/package.py

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

* Fix minimum required python dependency based on feedback

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2025-03-06 07:11:06 -06:00
Seth R. Johnson
a91f96292c vecgeom: add development version of surface branch (#49313)
* vecgeom: add development version of surface branch

* Use tag on main branch

* Get full repo for versioning on master branch
2025-03-06 05:32:33 -05:00
Wouter Deconinck
18487a45ed xz: add v5.4.7, v5.6.2, v5.6.3 (#49330) 2025-03-06 09:47:25 +01:00
Wouter Deconinck
29485e2125 meson: add v1.5.2, v1.6.1, v1.7.0 (#49244) 2025-03-05 22:36:06 -06:00
dependabot[bot]
7674ea0b7d build(deps): bump types-six in /.github/workflows/requirements/style (#49295)
Bumps [types-six](https://github.com/python/typeshed) from 1.17.0.20241205 to 1.17.0.20250304.
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-six
  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>
2025-03-05 22:34:49 -06:00
Wouter Deconinck
693376ea97 qt-*: add v6.8.2 (#49320) 2025-03-05 20:03:34 -07:00
Massimiliano Culpo
88bf2a8bcf globalarrays: add unconditional dep on C++ (#49317)
See https://gitlab.spack.io/spack/spack/-/jobs/15482194

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-05 20:03:09 -07:00
Wouter Deconinck
03e9ca0a76 QtPackage: set QT_ADDITIONAL_SBOM_DOCUMENT_PATHS (#49319)
* QtPackage: set QT_ADDITIONAL_SBOM_DOCUMENT_PATHS

* QtPackage: self.spec.satisfies("@6.9:")

* QtPackage: if self.spec.satisfies("@6.9:")
2025-03-05 19:53:35 -07:00
Massimiliano Culpo
18399d0bd1 qt-svg: add dependency on C (#49316)
https://gitlab.spack.io/spack/spack/-/jobs/15482214

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-05 19:53:10 -07:00
Dan Bonachea
3aabff77d7 GASNet 2025.2 update (#49327)
* gasnet: deprecate old versions
  GASNet versions more than 2 years old are not supported.
  Update description text.
* gasnet: add 2025.2.0-snapshot version
2025-03-05 19:48:31 -07:00
Chris Marsh
aa86342814 Ensure if TCL is already sourced on the system the lib paths don't interfere with spack's install step (#49325) 2025-03-05 19:48:04 -07:00
Weiqun Zhang
170a276f18 amrex: add v25.03 (#49252)
Starting from amrex-25.03, FFT is enabled by default in spack build.
2025-03-05 15:53:25 -08:00
Massimiliano Culpo
313524dc6d qrupdate: update to use oneapi packages (#49304)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-05 13:44:37 -05:00
Massimiliano Culpo
5aae6e25a5 arpack-ng: update to use oneapi packages (#49302)
Also, remove deprecated versions

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-05 13:44:13 -05:00
Massimiliano Culpo
b58a52b6ce abinit: update to use oneapi packages (#49301)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-05 13:44:01 -05:00
Chris White
32760e2885 sundials: expand patch when rule (#49296) 2025-03-05 16:13:19 +01:00
Harmen Stoppels
125feb125c Define Package API version (#49274)
Defines `spack.package_api_version` and `spack.min_package_api_version` 
as tuples (major, minor). 

This defines resp. the current Package API version implemented by this version 
of Spack and the minimal Package API version it is backwards compatible with.

Repositories can optionally define:
```yaml
repo:
    namespace: my_repo
    api: v1.2
```
which indicates they are compatible with versions of Spack that implement 
Package API `>= 1.2` and `< 2.0`. When the `api` key is omitted, the default 
`v1.0` is assumed.
2025-03-05 15:42:48 +01:00
Wouter Deconinck
8677063142 QtPackage: modify QT_ADDITIONAL_PACKAGES_PREFIX_PATH handling (#49297)
* QtPackage: mv QT_ADDITIONAL_PACKAGES_PREFIX_PATH handling

* geomodel: support Qt6

* qt-base: rm import re
2025-03-05 09:09:32 -05:00
Massimiliano Culpo
f015b18230 hydrogen: update to use oneapi packages (#49293)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-05 09:06:32 +01:00
Massimiliano Culpo
aa9e610fa6 elemental: remove deprecated package (#49291)
This package has not been maintained since 2016.

We maintain an active fork in the hydrogen
package, so remove this one.

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-05 08:36:05 +01:00
Wouter Deconinck
7d62045c30 py-networkx: add up to v3.4.2 (#49289)
* py-networkx: add new versions up to 3.4.2
* py-networkx: add more requirements
* py-networkx: fix typo
* py-networkx: fix python and py-setuptools dependencies

---------

Co-authored-by: Joseph C Wang <joequant@gmail.com>
2025-03-04 17:02:54 -08:00
Chris Marsh
5b03173b99 r-packages: add missing gettext dependencies (#48910)
* add gettext dependency

* typo

* style
2025-03-04 17:07:01 -06:00
mvlopri
36fcdb8cfa Update the incorrect sha for the SEACAS package.py (#49292)
The sha256sum for the 2025-02-27 version of SEACAS is incorrect
due to the movement of the tagged version.
2025-03-04 16:03:28 -07:00
Chris Marsh
7d5b17fbf2 py-rpy2: Add 3.5.17 (#48911)
* Update rpy2 to newest version and clean up package

* Add me as maintainer

* Update depends section as per review. Add ipython variant. Fix some ranges and add support for python 3.9. Deprecated outdated versions

* refine depends_on and remove redundant version info

* style
2025-03-04 15:58:12 -07:00
Piotr Sacharuk
d6e3292955 flux-sched: Apply workarounds for oneAPI compiler for problem with build (#49282) 2025-03-04 15:28:33 -07:00
Chris Marsh
60f54df964 Explicitly depend on gettext for libintl (#48908) 2025-03-04 16:25:31 -06:00
Wouter Deconinck
487df807cc veccore: add typo fix for clang (#49288)
* veccore: add typo for clang

* veccore: apply ScalarWrapper.h patch for all compilers

---------

Co-authored-by: Joseph C Wang <joequant@gmail.com>
2025-03-04 14:35:47 -07:00
Zack Galbreath
cacdf84964 ci: add support for high priority local mirror (#49264) 2025-03-04 14:47:37 -06:00
fbrechin
e2293c758f Adding ability for repo paths from a manifest file to be expanded when creating an environment. (#49084)
* Adding ability for repo paths from a manifest file to be expanded when creating an environment.

A unit test was added to check that an environment variable will be expanded.
Also, a bug was fixed in the expansion of develop paths where if an environment variable
was in the path that then produced an absolute path the path would not be extended.

* Fixing new unit test for env repo var substitution

* Adding ability for repo paths from a manifest file to be expanded when creating an environment.

A unit test was added to check that an environment variable will be expanded.
Also, a bug was fixed in the expansion of develop paths where if an environment variable
was in the path that then produced an absolute path the path would not be extended.

* Messed up resolving last rebase
2025-03-04 09:52:28 -08:00
Harmen Stoppels
f5a275adf5 gitignore: remove *_archive (#49278) 2025-03-04 18:37:18 +01:00
Paul
615ced32cd protobuf: add v3.29.3 (#49246) 2025-03-04 11:29:53 -06:00
Massimiliano Culpo
bc04d963e5 Remove debug print statements in unit-tests (#49280)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-03-04 18:29:45 +01:00
Taillefumier Mathieu
11051ce5c7 CP2K: Add GRPP support (#49232) 2025-03-04 06:54:27 -07:00
Adam J. Stewart
631bddc52e py-pyarrow: add v19.0.1 (#49149)
* py-pyarrow: add v19.0.1

* Environment variables no longer needed either

* Remove py-pyarrow variants
2025-03-04 13:20:52 +01:00
Adam J. Stewart
b5f40aa7fb OpenCV: fix +cuda build (#49146) 2025-03-04 13:19:57 +01:00
Adam J. Stewart
57e0798af2 py-pip: mark Python 3.12+ support (#49148) 2025-03-04 13:18:38 +01:00
Chris White
0161b662f7 conduit: do not pass link flags to ar (#49263) 2025-03-03 19:53:11 -07:00
afzpatel
aa55b19680 fix +asan in ROCm packages (#48745)
* fix asan for hsa-rocr-dev
* add libclang_rt.asan-x86_64.so to LD_LIBRARY_PATH
* fix +asan for hipsparselt
* fix rocm-openmp-extras asan and add rccl +asan support
* add missing comgr build env variables
* add missing rocm-smi-lib build env variables
* minor dependency change
* fix style
2025-03-03 17:57:34 -08:00
dependabot[bot]
8cfffd88fa build(deps): bump pytest from 8.3.4 to 8.3.5 in /lib/spack/docs (#49268)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.4 to 8.3.5.
- [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.3.4...8.3.5)

---
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>
2025-03-03 19:18:42 -06:00
dependabot[bot]
2f8dcb8097 build(deps): bump python-levenshtein in /lib/spack/docs (#49269)
Bumps [python-levenshtein](https://github.com/rapidfuzz/python-Levenshtein) from 0.26.1 to 0.27.1.
- [Release notes](https://github.com/rapidfuzz/python-Levenshtein/releases)
- [Changelog](https://github.com/rapidfuzz/python-Levenshtein/blob/main/HISTORY.md)
- [Commits](https://github.com/rapidfuzz/python-Levenshtein/compare/v0.26.1...v0.27.1)

---
updated-dependencies:
- dependency-name: python-levenshtein
  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>
2025-03-03 19:17:48 -06:00
dependabot[bot]
5b70fa8cc8 build(deps): bump sphinx from 8.2.1 to 8.2.3 in /lib/spack/docs (#49270)
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 8.2.1 to 8.2.3.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst)
- [Commits](https://github.com/sphinx-doc/sphinx/compare/v8.2.1...v8.2.3)

---
updated-dependencies:
- dependency-name: sphinx
  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>
2025-03-03 19:17:08 -06:00
Adam J. Stewart
b4025e89ed py-torchmetrics: add v1.6.2 (#49262) 2025-03-03 19:15:49 -06:00
Eric Berquist
8db74e1b2f tmux: add 3.5a, 3.5, and 3.3 (#49259)
* tmux: add 3.5a, 3.5, and 3.3

* tmux: patch is in releases from 3.5 onward

* tmux: versions 3.5 and newer can use jemalloc
2025-03-03 19:12:45 -06:00
Wouter Deconinck
1fcfbadba7 qwt: add v6.2.0, v6.3.0, support Qt6 (#45604)
* qwt: support building against Qt6

* qwt: fix style

* qwt: depends_on qt-base+opengl+widgets when +opengl

* visit: patch for missing cmath include

---------

Co-authored-by: Bernhard Kaindl <contact@bernhard.kaindl.dev>
2025-03-03 16:25:48 -08:00
Chris White
13ec35873f Axom: Changes from Axom repository (#49183)
* pull in new changes from axom project

* add new versions

* convert more conditionals to spec.satisfies

-------------
Co-authored-by: white238 <white238@users.noreply.github.com>
2025-03-03 15:47:45 -08:00
Philip Fackler
f96b6eac2b xolotl: new package (#48876)
* Adding xolotl package

* [@spackbot] updating style on behalf of PhilipFackler

* Removing redundant text

* Add blank line

* Update var/spack/repos/builtin/packages/xolotl/package.py

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

* Update var/spack/repos/builtin/packages/xolotl/package.py

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

* Switch to CudaPackage and remove source dir from runtime env

* [@spackbot] updating style on behalf of PhilipFackler

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2025-03-03 15:18:28 -06:00
Rocco Meli
933a1a5cd9 update (#49261) 2025-03-03 10:38:10 -07:00
Stephen Nicholas Swatman
b2b9914efc acts dependencies: new versions as of 2025/03/03 (#49253)
This commit adds ACTS version 39.2.0 and detray version 0.89.0.
2025-03-03 09:32:59 -07:00
Rocco Meli
9ce9596981 multicharge: add v0.3.1 (#49255)
* multicharge: add v0.3.1

* fix url
2025-03-03 15:32:29 +01:00
Wouter Deconinck
fc30fe1f6b librsvg: add v2.56.4, v2.57.3, v2.58.2 (#45734)
* librsvg: add v2.56.4, v2.57.3, v2.58.2

---------

Co-authored-by: Harmen Stoppels <me@harmenstoppels.nl>
2025-03-02 14:08:43 -08:00
Paul
25a4b98359 jacamar-ci: add v0.25.0 (#49248) 2025-03-02 14:50:43 -06:00
Adam J. Stewart
05c34b7312 py-pymc3: not compatible with numpy 2 (#49225) 2025-03-01 13:43:05 -06:00
Tahmid Khan
b22842af56 globalarrays: Add variant cxx which adds the --enable-cxx flag (#49241) 2025-03-01 13:16:04 -06:00
Vanessasaurus
0bef028692 Automated deployment to update package flux-sched 2025-02-28 (#49229)
Co-authored-by: github-actions <github-actions@users.noreply.github.com>
2025-03-01 08:48:41 -07:00
Vanessasaurus
935facd069 Automated deployment to update package flux-security 2025-02-28 (#49230)
Co-authored-by: github-actions <github-actions@users.noreply.github.com>
2025-03-01 08:47:19 -07:00
Adam J. Stewart
87e5255bbc py-matplotlib: add v3.10.1 (#49233) 2025-03-01 16:22:49 +01:00
dependabot[bot]
b42f0d793d build(deps): bump isort in /.github/workflows/requirements/style (#49212)
Bumps [isort](https://github.com/PyCQA/isort) from 6.0.0 to 6.0.1.
- [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/6.0.0...6.0.1)

---
updated-dependencies:
- dependency-name: isort
  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>
2025-03-01 08:18:06 -07:00
dependabot[bot]
ccca0d3354 build(deps): bump isort from 6.0.0 to 6.0.1 in /lib/spack/docs (#49213)
Bumps [isort](https://github.com/PyCQA/isort) from 6.0.0 to 6.0.1.
- [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/6.0.0...6.0.1)

---
updated-dependencies:
- dependency-name: isort
  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>
2025-03-01 08:17:39 -07:00
HELICS-bot
9699bbc7b9 helics: Add version 3.6.1 (#49231)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-01 08:16:21 -07:00
Raffaele Solcà
c7e251de9f Add dla-future v0.8.0 (#49235) 2025-03-01 08:14:52 -07:00
Robert Maaskant
d788b15529 libmd: add version 1.1.0 (#49239)
Release notes can be read at https://archive.hadrons.org/software/libmd/libmd-1.1.0.announce
2025-03-01 08:11:12 -07:00
805 changed files with 14752 additions and 12933 deletions

View File

@@ -9,6 +9,7 @@ on:
branches:
- develop
- releases/**
merge_group:
concurrency:
group: ci-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
@@ -25,13 +26,17 @@ jobs:
packages: ${{ steps.filter.outputs.packages }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
if: ${{ github.event_name == 'push' }}
if: ${{ github.event_name == 'push' || github.event_name == 'merge_group' }}
with:
fetch-depth: 0
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
id: filter
with:
# For merge group events, compare against the target branch (main)
base: ${{ github.event_name == 'merge_group' && github.event.merge_group.base_ref || '' }}
# For merge group events, use the merge group head ref
ref: ${{ github.event_name == 'merge_group' && github.event.merge_group.head_sha || github.ref }}
# See https://github.com/dorny/paths-filter/issues/56 for the syntax used below
# Don't run if we only modified packages in the
# built-in repository or documentation
@@ -76,10 +81,11 @@ jobs:
prechecks:
needs: [ changes ]
uses: ./.github/workflows/valid-style.yml
uses: ./.github/workflows/prechecks.yml
secrets: inherit
with:
with_coverage: ${{ needs.changes.outputs.core }}
with_packages: ${{ needs.changes.outputs.packages }}
import-check:
needs: [ changes ]
@@ -93,7 +99,7 @@ jobs:
- name: Success
run: |
if [ "${{ needs.prechecks.result }}" == "failure" ] || [ "${{ needs.prechecks.result }}" == "canceled" ]; then
echo "Unit tests failed."
echo "Unit tests failed."
exit 1
else
exit 0
@@ -101,6 +107,7 @@ jobs:
coverage:
needs: [ unit-tests, prechecks ]
if: ${{ needs.changes.outputs.core }}
uses: ./.github/workflows/coverage.yml
secrets: inherit
@@ -113,10 +120,10 @@ jobs:
- name: Status summary
run: |
if [ "${{ needs.unit-tests.result }}" == "failure" ] || [ "${{ needs.unit-tests.result }}" == "canceled" ]; then
echo "Unit tests failed."
echo "Unit tests failed."
exit 1
elif [ "${{ needs.bootstrap.result }}" == "failure" ] || [ "${{ needs.bootstrap.result }}" == "canceled" ]; then
echo "Bootstrap tests failed."
echo "Bootstrap tests failed."
exit 1
else
exit 0

View File

@@ -1,4 +1,4 @@
name: style
name: prechecks
on:
workflow_call:
@@ -6,6 +6,9 @@ on:
with_coverage:
required: true
type: string
with_packages:
required: true
type: string
concurrency:
group: style-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
@@ -30,6 +33,7 @@ jobs:
run: vermin --backport importlib --backport argparse --violations --backport typing -t=3.6- -vvv lib/spack/spack/ lib/spack/llnl/ bin/
- name: vermin (Repositories)
run: vermin --backport importlib --backport argparse --violations --backport typing -t=3.6- -vvv var/spack/repos
# Run style checks on the files that have been changed
style:
runs-on: ubuntu-latest
@@ -53,12 +57,25 @@ jobs:
- name: Run style tests
run: |
share/spack/qa/run-style-tests
audit:
uses: ./.github/workflows/audit.yaml
secrets: inherit
with:
with_coverage: ${{ inputs.with_coverage }}
python_version: '3.13'
verify-checksums:
if: ${{ inputs.with_packages == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with:
fetch-depth: 2
- name: Verify Added Checksums
run: |
bin/spack ci verify-versions HEAD^1 HEAD
# Check that spack can bootstrap the development environment on Python 3.6 - RHEL8
bootstrap-dev-rhel8:
runs-on: ubuntu-latest

View File

@@ -1,7 +1,7 @@
black==25.1.0
clingo==5.7.1
flake8==7.1.2
isort==6.0.0
isort==6.0.1
mypy==1.15.0
types-six==1.17.0.20241205
types-six==1.17.0.20250304
vermin==1.6.0

1
.gitignore vendored
View File

@@ -201,7 +201,6 @@ tramp
# Org-mode
.org-id-locations
*_archive
# flymake-mode
*_flymake.*

View File

@@ -19,7 +19,7 @@ config:
install_tree:
root: $spack/opt/spack
projections:
all: "{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}"
all: "{architecture.platform}-{architecture.target}/{name}-{version}-{hash}"
# install_tree can include an optional padded length (int or boolean)
# default is False (do not pad)
# if padded_length is True, Spack will pad as close to the system max path

View File

@@ -15,12 +15,11 @@
# -------------------------------------------------------------------------
packages:
all:
compiler:
- apple-clang
- clang
- gcc
providers:
c: [apple-clang, llvm, gcc]
cxx: [apple-clang, llvm, gcc]
elf: [libelf]
fortran: [gcc]
fuse: [macfuse]
gl: [apple-gl]
glu: [apple-glu]
@@ -50,3 +49,12 @@ packages:
# although the version number used here isn't critical
- spec: apple-libuuid@1353.100.2
prefix: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
c:
prefer:
- apple-clang
cxx:
prefer:
- apple-clang
fortran:
prefer:
- gcc

View File

@@ -15,19 +15,18 @@
# -------------------------------------------------------------------------
packages:
all:
compiler: [gcc, clang, oneapi, xl, nag, fj, aocc]
providers:
awk: [gawk]
armci: [armcimpi]
blas: [openblas, amdblis]
c: [gcc]
cxx: [gcc]
c: [gcc, llvm, intel-oneapi-compilers]
cxx: [gcc, llvm, intel-oneapi-compilers]
D: [ldc]
daal: [intel-oneapi-daal]
elf: [elfutils]
fftw-api: [fftw, amdfftw]
flame: [libflame, amdlibflame]
fortran: [gcc]
fortran: [gcc, llvm, intel-oneapi-compilers]
fortran-rt: [gcc-runtime, intel-oneapi-runtime]
fuse: [libfuse]
gl: [glx, osmesa]

View File

@@ -15,8 +15,8 @@
# -------------------------------------------------------------------------
packages:
all:
compiler:
- msvc
providers:
c : [msvc]
cxx: [msvc]
mpi: [msmpi]
gl: [wgl]

View File

@@ -14,6 +14,7 @@ case you want to skip directly to specific docs:
* :ref:`compilers.yaml <compiler-config>`
* :ref:`concretizer.yaml <concretizer-options>`
* :ref:`config.yaml <config-yaml>`
* :ref:`include.yaml <include-yaml>`
* :ref:`mirrors.yaml <mirrors>`
* :ref:`modules.yaml <modules>`
* :ref:`packages.yaml <packages-config>`

View File

@@ -457,6 +457,13 @@ developed package in the environment are concretized to match the
version (and other constraints) passed as the spec argument to the
``spack develop`` command.
When working deep in the graph it is often desirable to have multiple specs marked
as ``develop`` so you don't have to restage and/or do full rebuilds each time you
call ``spack install``. The ``--recursive`` flag can be used in these scenarios
to ensure that all the dependents of the initial spec you provide are also marked
as develop specs. The ``--recursive`` flag requires a pre-concretized environment
so the graph can be traversed from the supplied spec all the way to the root specs.
For packages with ``git`` attributes, git branches, tags, and commits can
also be used as valid concrete versions (see :ref:`version-specifier`).
This means that for a package ``foo``, ``spack develop foo@git.main`` will clone
@@ -670,24 +677,45 @@ This configuration sets the default compiler for all packages to
Included configurations
^^^^^^^^^^^^^^^^^^^^^^^
Spack environments allow an ``include`` heading in their yaml
schema. This heading pulls in external configuration files and applies
them to the environment.
Spack environments allow an ``include`` heading in their yaml schema.
This heading pulls in external configuration files and applies them to
the environment.
.. code-block:: yaml
spack:
include:
- relative/path/to/config.yaml
- environment/relative/path/to/config.yaml
- https://github.com/path/to/raw/config/compilers.yaml
- /absolute/path/to/packages.yaml
- path: /path/to/$os/$target/environment
optional: true
- path: /path/to/os-specific/config-dir
when: os == "ventura"
Included configuration files are required *unless* they are explicitly optional
or the entry's condition evaluates to ``false``. Optional includes are specified
with the ``optional`` clause and conditional with the ``when`` clause. (See
:ref:`include-yaml` for more information on optional and conditional entries.)
Files are listed using paths to individual files or directories containing them.
Path entries may be absolute or relative to the environment or specified as
URLs. URLs to individual files need link to the **raw** form of the file's
contents (e.g., `GitHub
<https://docs.github.com/en/repositories/working-with-files/using-files/viewing-and-understanding-files#viewing-or-copying-the-raw-file-content>`_
or `GitLab
<https://docs.gitlab.com/ee/api/repository_files.html#get-raw-file-from-repository>`_).
Only the ``file``, ``ftp``, ``http`` and ``https`` protocols (or schemes) are
supported. Spack-specific, environment and user path variables can be used.
(See :ref:`config-file-variables` for more information.)
.. warning::
Recursive includes are not currently processed in a breadth-first manner
so the value of a configuration option that is altered by multiple included
files may not be what you expect. This will be addressed in a future
update.
Environments can include files or URLs. File paths can be relative or
absolute. URLs include the path to the text for individual files or
can be the path to a directory containing configuration files.
Spack supports ``file``, ``http``, ``https`` and ``ftp`` protocols (or
schemes). Spack-specific, environment and user path variables may be
used in these paths. See :ref:`config-file-variables` for more information.
^^^^^^^^^^^^^^^^^^^^^^^^
Configuration precedence

View File

@@ -30,7 +30,7 @@ than always choosing the latest versions or default variants.
.. note::
As a rule of thumb: requirements + constraints > reuse > preferences > defaults.
As a rule of thumb: requirements + constraints > strong preferences > reuse > preferences > defaults.
The following set of criteria (from lowest to highest precedence) explain
common cases where concretization output may seem surprising at first.
@@ -56,7 +56,19 @@ common cases where concretization output may seem surprising at first.
concretizer:
reuse: dependencies # other options are 'true' and 'false'
3. :ref:`Package requirements <package-requirements>` configured in ``packages.yaml``,
3. :ref:`Strong preferences <package-strong-preferences>` configured in ``packages.yaml``
are higher priority than reuse, and can be used to strongly prefer a specific version
or variant, without erroring out if it's not possible. Strong preferences are specified
as follows:
.. code-block:: yaml
packages:
foo:
prefer:
- "@1.1: ~mpi"
4. :ref:`Package requirements <package-requirements>` configured in ``packages.yaml``,
and constraints from the command line as well as ``package.py`` files override all
of the above. Requirements are specified as follows:
@@ -66,6 +78,8 @@ common cases where concretization output may seem surprising at first.
foo:
require:
- "@1.2: +mpi"
conflicts:
- "@1.4"
Requirements and constraints restrict the set of possible solutions, while reuse
behavior and preferences influence what an optimal solution looks like.

View File

@@ -0,0 +1,51 @@
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)
.. _include-yaml:
===============================
Include Settings (include.yaml)
===============================
Spack allows you to include configuration files through ``include.yaml``.
Using the ``include:`` heading results in pulling in external configuration
information to be used by any Spack command.
Included configuration files are required *unless* they are explicitly optional
or the entry's condition evaluates to ``false``. Optional includes are specified
with the ``optional`` clause and conditional with the ``when`` clause. For
example,
.. code-block:: yaml
include:
- /path/to/a/required/config.yaml
- path: /path/to/$os/$target/config
optional: true
- path: /path/to/os-specific/config-dir
when: os == "ventura"
shows all three. The first entry, ``/path/to/a/required/config.yaml``,
indicates that included ``config.yaml`` file is required (so must exist).
Use of ``optional: true`` for ``/path/to/$os/$target/config`` means
the path is only included if it exists. The condition ``os == "ventura"``
in the ``when`` clause for ``/path/to/os-specific/config-dir`` means the
path is only included when the operating system (``os``) is ``ventura``.
The same conditions and variables in `Spec List References
<https://spack.readthedocs.io/en/latest/environments.html#spec-list-references>`_
can be used for conditional activation in the ``when`` clauses.
Included files can be specified by path or by their parent directory.
Paths may be absolute, relative (to the configuration file including the path),
or specified as URLs. Only the ``file``, ``ftp``, ``http`` and ``https`` protocols (or
schemes) are supported. Spack-specific, environment and user path variables
can be used. (See :ref:`config-file-variables` for more information.)
.. warning::
Recursive includes are not currently processed in a breadth-first manner
so the value of a configuration option that is altered by multiple included
files may not be what you expect. This will be addressed in a future
update.

View File

@@ -71,6 +71,7 @@ or refer to the full manual below.
configuration
config_yaml
include_yaml
packages_yaml
build_settings
environments

View File

@@ -486,6 +486,8 @@ present. For instance with a configuration like:
you will use ``mvapich2~cuda %gcc`` as an ``mpi`` provider.
.. _package-strong-preferences:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Conflicts and strong preferences
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@@ -330,7 +330,7 @@ that ``--tests`` is passed to ``spack ci rebuild`` as part of the
- spack --version
- cd ${SPACK_CONCRETE_ENV_DIR}
- spack env activate --without-view .
- spack config add "config:install_tree:projections:${SPACK_JOB_SPEC_PKG_NAME}:'morepadding/{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}'"
- spack config add "config:install_tree:projections:${SPACK_JOB_SPEC_PKG_NAME}:'morepadding/{architecture.platform}-{architecture.target}/{name}-{version}-{hash}'"
- mkdir -p ${SPACK_ARTIFACTS_ROOT}/user_data
- if [[ -r /mnt/key/intermediate_ci_signing_key.gpg ]]; then spack gpg trust /mnt/key/intermediate_ci_signing_key.gpg; fi
- if [[ -r /mnt/key/spack_public_key.gpg ]]; then spack gpg trust /mnt/key/spack_public_key.gpg; fi

View File

@@ -1,13 +1,13 @@
sphinx==8.2.1
sphinx==8.2.3
sphinxcontrib-programoutput==0.18
sphinx_design==0.6.1
sphinx-rtd-theme==3.0.2
python-levenshtein==0.26.1
python-levenshtein==0.27.1
docutils==0.21.2
pygments==2.19.1
urllib3==2.3.0
pytest==8.3.4
isort==6.0.0
pytest==8.3.5
isort==6.0.1
black==25.1.0
flake8==7.1.2
mypy==1.11.1

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cpp

View File

@@ -1 +0,0 @@
../fc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

1
lib/spack/env/c++ vendored
View File

@@ -1 +0,0 @@
cc

1
lib/spack/env/c89 vendored
View File

@@ -1 +0,0 @@
cc

1
lib/spack/env/c99 vendored
View File

@@ -1 +0,0 @@
cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../../cc

View File

@@ -1 +0,0 @@
../../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

1
lib/spack/env/cpp vendored
View File

@@ -1 +0,0 @@
cc

1
lib/spack/env/f77 vendored
View File

@@ -1 +0,0 @@
cc

1
lib/spack/env/f90 vendored
View File

@@ -1 +0,0 @@
cc

1
lib/spack/env/f95 vendored
View File

@@ -1 +0,0 @@
cc

1
lib/spack/env/fc vendored
View File

@@ -1 +0,0 @@
cc

View File

@@ -1 +0,0 @@
../../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

1
lib/spack/env/ftn vendored
View File

@@ -1 +0,0 @@
cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

1
lib/spack/env/ld vendored
View File

@@ -1 +0,0 @@
cc

View File

@@ -1 +0,0 @@
cc

View File

@@ -1 +0,0 @@
cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cpp

View File

@@ -1 +0,0 @@
../fc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -1 +0,0 @@
../cc

View File

@@ -11,6 +11,7 @@
import re
import sys
import traceback
import types
import typing
import warnings
from datetime import datetime, timedelta
@@ -72,7 +73,7 @@ def index_by(objects, *funcs):
if isinstance(f, str):
f = lambda x: getattr(x, funcs[0])
elif isinstance(f, tuple):
f = lambda x: tuple(getattr(x, p) for p in funcs[0])
f = lambda x: tuple(getattr(x, p, None) for p in funcs[0])
result = {}
for o in objects:
@@ -707,14 +708,24 @@ def __init__(self, wrapped_object):
class Singleton:
"""Simple wrapper for lazily initialized singleton objects."""
"""Wrapper for lazily initialized singleton objects."""
def __init__(self, factory):
def __init__(self, factory: Callable[[], object]):
"""Create a new singleton to be inited with the factory function.
Most factories will simply create the object to be initialized and
return it.
In some cases, e.g. when bootstrapping some global state, the singleton
may need to be initialized incrementally. If the factory returns a generator
instead of a regular object, the singleton will assign each result yielded by
the generator to the singleton instance. This allows methods called by
the factory in later stages to refer back to the singleton.
Args:
factory (function): function taking no arguments that
creates the singleton instance.
factory (function): function taking no arguments that creates the
singleton instance.
"""
self.factory = factory
self._instance = None
@@ -722,7 +733,16 @@ def __init__(self, factory):
@property
def instance(self):
if self._instance is None:
self._instance = self.factory()
instance = self.factory()
if isinstance(instance, types.GeneratorType):
# if it's a generator, assign every value
for value in instance:
self._instance = value
else:
# if not, just assign the result like a normal singleton
self._instance = instance
return self._instance
def __getattr__(self, name):
@@ -996,11 +1016,8 @@ def _receive_forwarded(self, context: str, exc: Exception, tb: List[str]):
def grouped_message(self, with_tracebacks: bool = True) -> str:
"""Print out an error message coalescing all the forwarded errors."""
each_exception_message = [
"{0} raised {1}: {2}{3}".format(
context,
exc.__class__.__name__,
exc,
"\n{0}".format("".join(tb)) if with_tracebacks else "",
"\n\t{0} raised {1}: {2}\n{3}".format(
context, exc.__class__.__name__, exc, f"\n{''.join(tb)}" if with_tracebacks else ""
)
for context, exc, tb in self.exceptions
]

View File

@@ -13,6 +13,18 @@
__version__ = "1.0.0.dev0"
spack_version = __version__
#: The current Package API version implemented by this version of Spack. The Package API defines
#: the Python interface for packages as well as the layout of package repositories. The minor
#: version is incremented when the package API is extended in a backwards-compatible way. The major
#: version is incremented upon breaking changes. This version is changed independently from the
#: Spack version.
package_api_version = (1, 0)
#: The minimum Package API version that this version of Spack is compatible with. This should
#: always be a tuple of the form ``(major, 0)``, since compatibility with vX.Y implies
#: compatibility with vX.0.
min_package_api_version = (1, 0)
def __try_int(v):
try:
@@ -79,4 +91,6 @@ def get_short_version() -> str:
"get_version",
"get_spack_commit",
"get_short_version",
"package_api_version",
"min_package_api_version",
]

View File

@@ -0,0 +1,20 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""Alias names to convert legacy compilers to builtin packages and vice-versa"""
BUILTIN_TO_LEGACY_COMPILER = {
"llvm": "clang",
"intel-oneapi-compilers": "oneapi",
"llvm-amdgpu": "rocmcc",
"intel-oneapi-compiler-classic": "intel",
"acfl": "arm",
}
LEGACY_COMPILER_TO_BUILTIN = {
"clang": "llvm",
"oneapi": "intel-oneapi-compilers",
"rocmcc": "llvm-amdgpu",
"intel": "intel-oneapi-compiler-classic",
"arm": "acfl",
}

View File

@@ -110,6 +110,13 @@ def __init__(self, root):
self._write_transaction_impl = llnl.util.lang.nullcontext
self._read_transaction_impl = llnl.util.lang.nullcontext
def _handle_old_db_versions_read(self, check, db, *, reindex: bool):
if not self.is_readable():
raise spack_db.DatabaseNotReadableError(
f"cannot read buildcache v{self.db_version} at {self.root}"
)
return self._handle_current_version_read(check, db)
class FetchCacheError(Exception):
"""Error thrown when fetching the cache failed, usually a composite error list."""
@@ -242,7 +249,7 @@ def _associate_built_specs_with_mirror(self, cache_key, mirror_url):
self._index_file_cache.init_entry(cache_key)
cache_path = self._index_file_cache.cache_path(cache_key)
with self._index_file_cache.read_transaction(cache_key):
db._read_from_file(cache_path)
db._read_from_file(pathlib.Path(cache_path))
except spack_db.InvalidDatabaseVersionError as e:
tty.warn(
f"you need a newer Spack version to read the buildcache index for the "

View File

@@ -234,14 +234,6 @@ def _root_spec(spec_str: str) -> str:
# Add a compiler and platform requirement to the root spec.
platform = str(spack.platforms.host())
if platform == "darwin":
spec_str += " %apple-clang"
elif platform == "windows":
spec_str += " %msvc"
elif platform == "linux":
spec_str += " %gcc"
elif platform == "freebsd":
spec_str += " %clang"
spec_str += f" platform={platform}"
target = archspec.cpu.host().family
spec_str += f" target={target}"

View File

@@ -15,11 +15,13 @@
import archspec.cpu
import spack.compiler
import spack.compilers
import spack.compilers.config
import spack.compilers.libraries
import spack.config
import spack.platforms
import spack.spec
import spack.traverse
import spack.version
from .config import spec_for_current_python
@@ -38,7 +40,7 @@ def __init__(self, configuration):
self.external_cmake, self.external_bison = self._externals_from_yaml(configuration)
def _valid_compiler_or_raise(self) -> "spack.compiler.Compiler":
def _valid_compiler_or_raise(self):
if str(self.host_platform) == "linux":
compiler_name = "gcc"
elif str(self.host_platform) == "darwin":
@@ -46,17 +48,30 @@ def _valid_compiler_or_raise(self) -> "spack.compiler.Compiler":
elif str(self.host_platform) == "windows":
compiler_name = "msvc"
elif str(self.host_platform) == "freebsd":
compiler_name = "clang"
compiler_name = "llvm"
else:
raise RuntimeError(f"Cannot bootstrap clingo from sources on {self.host_platform}")
candidates = spack.compilers.compilers_for_spec(
compiler_name, arch_spec=self.host_architecture
)
candidates = [
x
for x in spack.compilers.config.CompilerFactory.from_packages_yaml(spack.config.CONFIG)
if x.name == compiler_name
]
if not candidates:
raise RuntimeError(
f"Cannot find any version of {compiler_name} to bootstrap clingo from sources"
)
candidates.sort(key=lambda x: x.spec.version, reverse=True)
candidates.sort(key=lambda x: x.version, reverse=True)
best = candidates[0]
# Get compilers for bootstrapping from the 'builtin' repository
best.namespace = "builtin"
# If the compiler does not support C++ 14, fail with a legible error message
try:
_ = best.package.standard_flag(language="cxx", standard="14")
except RuntimeError as e:
raise RuntimeError(
"cannot find a compiler supporting C++ 14 [needed to bootstrap clingo]"
) from e
return candidates[0]
def _externals_from_yaml(
@@ -75,9 +90,6 @@ def _externals_from_yaml(
if not s.satisfies(requirements[pkg_name]):
continue
if not s.intersects(f"%{self.host_compiler.spec}"):
continue
if not s.intersects(f"arch={self.host_architecture}"):
continue
@@ -110,11 +122,14 @@ def concretize(self) -> "spack.spec.Spec":
# Tweak it to conform to the host architecture
for node in s.traverse():
node.architecture.os = str(self.host_os)
node.compiler = self.host_compiler.spec
node.architecture = self.host_architecture
if node.name == "gcc-runtime":
node.versions = self.host_compiler.spec.versions
node.versions = self.host_compiler.versions
# Can't use re2c@3.1 with Python 3.6
if self.host_python.satisfies("@3.6"):
s["re2c"].versions.versions = [spack.version.from_string("=2.2")]
for edge in spack.traverse.traverse_edges([s], cover="edges"):
if edge.spec.name == "python":
@@ -126,6 +141,9 @@ def concretize(self) -> "spack.spec.Spec":
if edge.spec.name == "cmake" and self.external_cmake:
edge.spec = self.external_cmake
if edge.spec.name == self.host_compiler.name:
edge.spec = self.host_compiler
if "libc" in edge.virtuals:
edge.spec = self.host_libc
@@ -141,12 +159,12 @@ def python_external_spec(self) -> "spack.spec.Spec":
return self._external_spec(result)
def libc_external_spec(self) -> "spack.spec.Spec":
result = self.host_compiler.default_libc
detector = spack.compilers.libraries.CompilerPropertyDetector(self.host_compiler)
result = detector.default_libc()
return self._external_spec(result)
def _external_spec(self, initial_spec) -> "spack.spec.Spec":
initial_spec.namespace = "builtin"
initial_spec.compiler = self.host_compiler.spec
initial_spec.architecture = self.host_architecture
for flag_type in spack.spec.FlagMap.valid_compiler_flags():
initial_spec.compiler_flags[flag_type] = []

View File

@@ -10,7 +10,7 @@
from llnl.util import tty
import spack.compilers
import spack.compilers.config
import spack.config
import spack.environment
import spack.modules
@@ -142,8 +142,8 @@ def _bootstrap_config_scopes() -> Sequence["spack.config.ConfigScope"]:
def _add_compilers_if_missing() -> None:
arch = spack.spec.ArchSpec.default_arch()
if not spack.compilers.compilers_for_arch(arch):
spack.compilers.find_compilers()
if not spack.compilers.config.compilers_for_arch(arch):
spack.compilers.config.find_compilers()
@contextlib.contextmanager

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -36,7 +36,6 @@
import multiprocessing
import os
import re
import stat
import sys
import traceback
import types
@@ -71,7 +70,7 @@
import spack.build_systems.meson
import spack.build_systems.python
import spack.builder
import spack.compilers
import spack.compilers.libraries
import spack.config
import spack.deptypes as dt
import spack.error
@@ -85,7 +84,6 @@
import spack.store
import spack.subprocess_context
import spack.util.executable
import spack.util.libc
from spack import traverse
from spack.context import Context
from spack.error import InstallError, NoHeadersError, NoLibrariesError
@@ -93,6 +91,8 @@
from spack.util.environment import (
SYSTEM_DIR_CASE_ENTRY,
EnvironmentModifications,
ModificationList,
PrependPath,
env_flag,
filter_system_paths,
get_path,
@@ -113,7 +113,7 @@
# set_wrapper_variables and used to pass parameters to
# Spack's compiler wrappers.
#
SPACK_ENV_PATH = "SPACK_ENV_PATH"
SPACK_COMPILER_WRAPPER_PATH = "SPACK_COMPILER_WRAPPER_PATH"
SPACK_MANAGED_DIRS = "SPACK_MANAGED_DIRS"
SPACK_INCLUDE_DIRS = "SPACK_INCLUDE_DIRS"
SPACK_LINK_DIRS = "SPACK_LINK_DIRS"
@@ -390,62 +390,10 @@ def _add_werror_handling(keep_werror, env):
env.set("SPACK_COMPILER_FLAGS_REPLACE", " ".join(["|".join(item) for item in replace_flags]))
def set_compiler_environment_variables(pkg, env):
def set_wrapper_environment_variables_for_flags(pkg, env):
assert pkg.spec.concrete
compiler = pkg.compiler
spec = pkg.spec
# Make sure the executables for this compiler exist
compiler.verify_executables()
# Set compiler variables used by CMake and autotools
assert all(key in compiler.link_paths for key in ("cc", "cxx", "f77", "fc"))
# Populate an object with the list of environment modifications
# and return it
# TODO : add additional kwargs for better diagnostics, like requestor,
# ttyout, ttyerr, etc.
link_dir = spack.paths.build_env_path
# Set SPACK compiler variables so that our wrapper knows what to
# call. If there is no compiler configured then use a default
# wrapper which will emit an error if it is used.
if compiler.cc:
env.set("SPACK_CC", compiler.cc)
env.set("CC", os.path.join(link_dir, compiler.link_paths["cc"]))
else:
env.set("CC", os.path.join(link_dir, "cc"))
if compiler.cxx:
env.set("SPACK_CXX", compiler.cxx)
env.set("CXX", os.path.join(link_dir, compiler.link_paths["cxx"]))
else:
env.set("CC", os.path.join(link_dir, "c++"))
if compiler.f77:
env.set("SPACK_F77", compiler.f77)
env.set("F77", os.path.join(link_dir, compiler.link_paths["f77"]))
else:
env.set("F77", os.path.join(link_dir, "f77"))
if compiler.fc:
env.set("SPACK_FC", compiler.fc)
env.set("FC", os.path.join(link_dir, compiler.link_paths["fc"]))
else:
env.set("FC", os.path.join(link_dir, "fc"))
# Set SPACK compiler rpath flags so that our wrapper knows what to use
env.set("SPACK_CC_RPATH_ARG", compiler.cc_rpath_arg)
env.set("SPACK_CXX_RPATH_ARG", compiler.cxx_rpath_arg)
env.set("SPACK_F77_RPATH_ARG", compiler.f77_rpath_arg)
env.set("SPACK_FC_RPATH_ARG", compiler.fc_rpath_arg)
env.set("SPACK_LINKER_ARG", compiler.linker_arg)
# Check whether we want to force RPATH or RUNPATH
if spack.config.get("config:shared_linking:type") == "rpath":
env.set("SPACK_DTAGS_TO_STRIP", compiler.enable_new_dtags)
env.set("SPACK_DTAGS_TO_ADD", compiler.disable_new_dtags)
else:
env.set("SPACK_DTAGS_TO_STRIP", compiler.disable_new_dtags)
env.set("SPACK_DTAGS_TO_ADD", compiler.enable_new_dtags)
if pkg.keep_werror is not None:
keep_werror = pkg.keep_werror
else:
@@ -453,10 +401,6 @@ def set_compiler_environment_variables(pkg, env):
_add_werror_handling(keep_werror, env)
# Set the target parameters that the compiler will add
isa_arg = optimization_flags(compiler, spec.target)
env.set("SPACK_TARGET_ARGS", isa_arg)
# Trap spack-tracked compiler flags as appropriate.
# env_flags are easy to accidentally override.
inject_flags = {}
@@ -489,75 +433,23 @@ def set_compiler_environment_variables(pkg, env):
# implicit variables
env.set(flag.upper(), " ".join(f for f in env_flags[flag]))
pkg.flags_to_build_system_args(build_system_flags)
env.set("SPACK_COMPILER_SPEC", str(spec.compiler))
env.set("SPACK_SYSTEM_DIRS", SYSTEM_DIR_CASE_ENTRY)
compiler.setup_custom_environment(pkg, env)
return env
def optimization_flags(compiler, target):
if spack.compilers.is_mixed_toolchain(compiler):
msg = (
"microarchitecture specific optimizations are not "
"supported yet on mixed compiler toolchains [check"
f" {compiler.name}@{compiler.version} for further details]"
)
tty.debug(msg)
return ""
# Try to check if the current compiler comes with a version number or
# has an unexpected suffix. If so, treat it as a compiler with a
# custom spec.
compiler_version = compiler.version
version_number, suffix = archspec.cpu.version_components(compiler.version)
if not version_number or suffix:
try:
compiler_version = compiler.real_version
except spack.util.executable.ProcessError as e:
# log this and just return compiler.version instead
tty.debug(str(e))
version_number, _ = archspec.cpu.version_components(compiler.version.dotted_numeric_string)
try:
result = target.optimization_flags(compiler.name, compiler_version.dotted_numeric_string)
result = target.optimization_flags(compiler.name, version_number)
except (ValueError, archspec.cpu.UnsupportedMicroarchitecture):
result = ""
return result
class FilterDefaultDynamicLinkerSearchPaths:
"""Remove rpaths to directories that are default search paths of the dynamic linker."""
def __init__(self, dynamic_linker: Optional[str]) -> None:
# Identify directories by (inode, device) tuple, which handles symlinks too.
self.default_path_identifiers: Set[Tuple[int, int]] = set()
if not dynamic_linker:
return
for path in spack.util.libc.default_search_paths_from_dynamic_linker(dynamic_linker):
try:
s = os.stat(path)
if stat.S_ISDIR(s.st_mode):
self.default_path_identifiers.add((s.st_ino, s.st_dev))
except OSError:
continue
def is_dynamic_loader_default_path(self, p: str) -> bool:
try:
s = os.stat(p)
return (s.st_ino, s.st_dev) in self.default_path_identifiers
except OSError:
return False
def __call__(self, dirs: List[str]) -> List[str]:
if not self.default_path_identifiers:
return dirs
return [p for p in dirs if not self.is_dynamic_loader_default_path(p)]
def set_wrapper_variables(pkg, env):
"""Set environment variables used by the Spack compiler wrapper (which have the prefix
`SPACK_`) and also add the compiler wrappers to PATH.
@@ -566,39 +458,8 @@ def set_wrapper_variables(pkg, env):
this function computes these options in a manner that is intended to match the DAG traversal
order in `SetupContext`. TODO: this is not the case yet, we're using post order, SetupContext
is using topo order."""
# Set environment variables if specified for
# the given compiler
compiler = pkg.compiler
env.extend(spack.schema.environment.parse(compiler.environment))
if compiler.extra_rpaths:
extra_rpaths = ":".join(compiler.extra_rpaths)
env.set("SPACK_COMPILER_EXTRA_RPATHS", extra_rpaths)
# Add spack build environment path with compiler wrappers first in
# the path. We add the compiler wrapper path, which includes default
# wrappers (cc, c++, f77, f90), AND a subdirectory containing
# compiler-specific symlinks. The latter ensures that builds that
# are sensitive to the *name* of the compiler see the right name when
# we're building with the wrappers.
#
# Conflicts on case-insensitive systems (like "CC" and "cc") are
# handled by putting one in the <build_env_path>/case-insensitive
# directory. Add that to the path too.
env_paths = []
compiler_specific = os.path.join(
spack.paths.build_env_path, os.path.dirname(pkg.compiler.link_paths["cc"])
)
for item in [spack.paths.build_env_path, compiler_specific]:
env_paths.append(item)
ci = os.path.join(item, "case-insensitive")
if os.path.isdir(ci):
env_paths.append(ci)
tty.debug("Adding compiler bin/ paths: " + " ".join(env_paths))
for item in env_paths:
env.prepend_path("PATH", item)
env.set_path(SPACK_ENV_PATH, env_paths)
# Set compiler flags injected from the spec
set_wrapper_environment_variables_for_flags(pkg, env)
# Working directory for the spack command itself, for debug logs.
if spack.config.get("config:debug"):
@@ -664,22 +525,15 @@ def set_wrapper_variables(pkg, env):
lib_path = os.path.join(pkg.prefix, libdir)
rpath_dirs.insert(0, lib_path)
filter_default_dynamic_linker_search_paths = FilterDefaultDynamicLinkerSearchPaths(
pkg.compiler.default_dynamic_linker
)
# TODO: filter_system_paths is again wrong (and probably unnecessary due to the is_system_path
# branch above). link_dirs should be filtered with entries from _parse_link_paths.
link_dirs = list(dedupe(filter_system_paths(link_dirs)))
include_dirs = list(dedupe(filter_system_paths(include_dirs)))
rpath_dirs = list(dedupe(filter_system_paths(rpath_dirs)))
rpath_dirs = filter_default_dynamic_linker_search_paths(rpath_dirs)
# TODO: implicit_rpaths is prefiltered by is_system_path, that should be removed in favor of
# just this filter.
implicit_rpaths = filter_default_dynamic_linker_search_paths(pkg.compiler.implicit_rpaths())
if implicit_rpaths:
env.set("SPACK_COMPILER_IMPLICIT_RPATHS", ":".join(implicit_rpaths))
default_dynamic_linker_filter = spack.compilers.libraries.dynamic_linker_filter_for(pkg.spec)
if default_dynamic_linker_filter:
rpath_dirs = default_dynamic_linker_filter(rpath_dirs)
# Spack managed directories include the stage, store and upstream stores. We extend this with
# their real paths to make it more robust (e.g. /tmp vs /private/tmp on macOS).
@@ -731,26 +585,6 @@ def set_package_py_globals(pkg, context: Context = Context.BUILD):
# Don't use which for this; we want to find it in the current dir.
module.configure = Executable("./configure")
# Put spack compiler paths in module scope. (Some packages use it
# in setup_run_environment etc, so don't put it context == build)
link_dir = spack.paths.build_env_path
pkg_compiler = None
try:
pkg_compiler = pkg.compiler
except spack.compilers.NoCompilerForSpecError as e:
tty.debug(f"cannot set 'spack_cc': {str(e)}")
if pkg_compiler is not None:
module.spack_cc = os.path.join(link_dir, pkg_compiler.link_paths["cc"])
module.spack_cxx = os.path.join(link_dir, pkg_compiler.link_paths["cxx"])
module.spack_f77 = os.path.join(link_dir, pkg_compiler.link_paths["f77"])
module.spack_fc = os.path.join(link_dir, pkg_compiler.link_paths["fc"])
else:
module.spack_cc = None
module.spack_cxx = None
module.spack_f77 = None
module.spack_fc = None
# Useful directories within the prefix are encapsulated in
# a Prefix object.
module.prefix = pkg.prefix
@@ -881,21 +715,6 @@ def get_rpath_deps(pkg: spack.package_base.PackageBase) -> List[spack.spec.Spec]
return _get_rpath_deps_from_spec(pkg.spec, pkg.transitive_rpaths)
def load_external_modules(pkg):
"""Traverse a package's spec DAG and load any external modules.
Traverse a package's dependencies and load any external modules
associated with them.
Args:
pkg (spack.package_base.PackageBase): package to load deps for
"""
for dep in list(pkg.spec.traverse()):
external_modules = dep.external_modules or []
for external_module in external_modules:
load_module(external_module)
def setup_package(pkg, dirty, context: Context = Context.BUILD):
"""Execute all environment setup routines."""
if context not in (Context.BUILD, Context.TEST):
@@ -916,7 +735,6 @@ def setup_package(pkg, dirty, context: Context = Context.BUILD):
context == Context.TEST and pkg.test_requires_compiler
)
if need_compiler:
set_compiler_environment_variables(pkg, env_mods)
set_wrapper_variables(pkg, env_mods)
# Platform specific setup goes before package specific setup. This is for setting
@@ -928,6 +746,26 @@ def setup_package(pkg, dirty, context: Context = Context.BUILD):
env_mods.extend(setup_context.get_env_modifications())
tty.debug("setup_package: collected all modifications from dependencies")
tty.debug("setup_package: adding compiler wrappers paths")
env_by_name = env_mods.group_by_name()
for x in env_by_name["SPACK_COMPILER_WRAPPER_PATH"]:
assert isinstance(
x, PrependPath
), "unexpected setting used for SPACK_COMPILER_WRAPPER_PATH"
env_mods.prepend_path("PATH", x.value)
# Check whether we want to force RPATH or RUNPATH
enable_var_name, disable_var_name = "SPACK_ENABLE_NEW_DTAGS", "SPACK_DISABLE_NEW_DTAGS"
if enable_var_name in env_by_name and disable_var_name in env_by_name:
enable_new_dtags = _extract_dtags_arg(env_by_name, var_name=enable_var_name)
disable_new_dtags = _extract_dtags_arg(env_by_name, var_name=disable_var_name)
if spack.config.CONFIG.get("config:shared_linking:type") == "rpath":
env_mods.set("SPACK_DTAGS_TO_STRIP", enable_new_dtags)
env_mods.set("SPACK_DTAGS_TO_ADD", disable_new_dtags)
else:
env_mods.set("SPACK_DTAGS_TO_STRIP", disable_new_dtags)
env_mods.set("SPACK_DTAGS_TO_ADD", enable_new_dtags)
if context == Context.TEST:
env_mods.prepend_path("PATH", ".")
elif context == Context.BUILD and not dirty and not env_mods.is_unset("CPATH"):
@@ -941,12 +779,7 @@ def setup_package(pkg, dirty, context: Context = Context.BUILD):
# Load modules on an already clean environment, just before applying Spack's
# own environment modifications. This ensures Spack controls CC/CXX/... variables.
if need_compiler:
tty.debug("setup_package: loading compiler modules")
for mod in pkg.compiler.modules:
load_module(mod)
load_external_modules(pkg)
load_external_modules(setup_context)
# Make sure nothing's strange about the Spack environment.
validate(env_mods, tty.warn)
@@ -957,6 +790,14 @@ def setup_package(pkg, dirty, context: Context = Context.BUILD):
return env_base
def _extract_dtags_arg(env_by_name: Dict[str, ModificationList], *, var_name: str) -> str:
try:
enable_new_dtags = env_by_name[var_name][0].value # type: ignore[union-attr]
except (KeyError, IndexError, AttributeError):
enable_new_dtags = ""
return enable_new_dtags
class EnvironmentVisitor:
def __init__(self, *roots: spack.spec.Spec, context: Context):
# For the roots (well, marked specs) we follow different edges
@@ -1235,6 +1076,21 @@ def _make_runnable(self, dep: spack.spec.Spec, env: EnvironmentModifications):
env.prepend_path("PATH", bin_dir)
def load_external_modules(context: SetupContext) -> None:
"""Traverse a package's spec DAG and load any external modules.
Traverse a package's dependencies and load any external modules
associated with them.
Args:
context: A populated SetupContext object
"""
for spec, _ in context.external:
external_modules = spec.external_modules or []
for external_module in external_modules:
load_module(external_module)
def _setup_pkg_and_run(
serialized_pkg: "spack.subprocess_context.PackageInstallContext",
function: Callable,

View File

@@ -11,6 +11,7 @@
import spack.build_environment
import spack.builder
import spack.compilers.libraries
import spack.error
import spack.package_base
import spack.phase_callbacks
@@ -398,33 +399,44 @@ def _do_patch_libtool(self) -> None:
markers[tag] = "LIBTOOL TAG CONFIG: {0}".format(tag.upper())
# Replace empty linker flag prefixes:
if self.pkg.compiler.name == "nag":
if self.spec.satisfies("%nag"):
# Nag is mixed with gcc and g++, which are recognized correctly.
# Therefore, we change only Fortran values:
nag_pkg = self.spec["fortran"].package
for tag in ["fc", "f77"]:
marker = markers[tag]
x.filter(
regex='^wl=""$',
repl='wl="{0}"'.format(self.pkg.compiler.linker_arg),
start_at="# ### BEGIN {0}".format(marker),
stop_at="# ### END {0}".format(marker),
repl=f'wl="{nag_pkg.linker_arg}"',
start_at=f"# ### BEGIN {marker}",
stop_at=f"# ### END {marker}",
)
else:
x.filter(regex='^wl=""$', repl='wl="{0}"'.format(self.pkg.compiler.linker_arg))
compiler_spec = spack.compilers.libraries.compiler_spec(self.spec)
if compiler_spec:
x.filter(regex='^wl=""$', repl='wl="{0}"'.format(compiler_spec.package.linker_arg))
# Replace empty PIC flag values:
for cc, marker in markers.items():
for compiler, marker in markers.items():
if compiler == "cc":
language = "c"
elif compiler == "cxx":
language = "cxx"
else:
language = "fortran"
if language not in self.spec:
continue
x.filter(
regex='^pic_flag=""$',
repl='pic_flag="{0}"'.format(
getattr(self.pkg.compiler, "{0}_pic_flag".format(cc))
),
start_at="# ### BEGIN {0}".format(marker),
stop_at="# ### END {0}".format(marker),
repl=f'pic_flag="{self.spec[language].package.pic_flag}"',
start_at=f"# ### BEGIN {marker}",
stop_at=f"# ### END {marker}",
)
# Other compiler-specific patches:
if self.pkg.compiler.name == "fj":
if self.spec.satisfies("%fj"):
x.filter(regex="-nostdlib", repl="", string=True)
rehead = r"/\S*/"
for o in [
@@ -437,7 +449,7 @@ def _do_patch_libtool(self) -> None:
r"crtendS\.o",
]:
x.filter(regex=(rehead + o), repl="")
elif self.pkg.compiler.name == "nag":
elif self.spec.satisfies("%nag"):
for tag in ["fc", "f77"]:
marker = markers[tag]
start_at = "# ### BEGIN {0}".format(marker)

View File

@@ -70,12 +70,8 @@ class CachedCMakeBuilder(CMakeBuilder):
@property
def cache_name(self):
return "{0}-{1}-{2}@{3}.cmake".format(
self.pkg.name,
self.pkg.spec.architecture,
self.pkg.spec.compiler.name,
self.pkg.spec.compiler.version,
)
compiler_str = f"{self.spec['c'].name}-{self.spec['c'].version}"
return f"{self.pkg.name}-{self.spec.architecture.platform}-{compiler_str}.cmake"
@property
def cache_path(self):
@@ -118,7 +114,9 @@ def initconfig_compiler_entries(self):
# Fortran compiler is optional
if "FC" in os.environ:
spack_fc_entry = cmake_cache_path("CMAKE_Fortran_COMPILER", os.environ["FC"])
system_fc_entry = cmake_cache_path("CMAKE_Fortran_COMPILER", self.pkg.compiler.fc)
system_fc_entry = cmake_cache_path(
"CMAKE_Fortran_COMPILER", self.spec["fortran"].package.fortran
)
else:
spack_fc_entry = "# No Fortran compiler defined in spec"
system_fc_entry = "# No Fortran compiler defined in spec"
@@ -134,8 +132,8 @@ def initconfig_compiler_entries(self):
" " + cmake_cache_path("CMAKE_CXX_COMPILER", os.environ["CXX"]),
" " + spack_fc_entry,
"else()\n",
" " + cmake_cache_path("CMAKE_C_COMPILER", self.pkg.compiler.cc),
" " + cmake_cache_path("CMAKE_CXX_COMPILER", self.pkg.compiler.cxx),
" " + cmake_cache_path("CMAKE_C_COMPILER", self.spec["c"].package.cc),
" " + cmake_cache_path("CMAKE_CXX_COMPILER", self.spec["cxx"].package.cxx),
" " + system_fc_entry,
"endif()\n",
]
@@ -278,17 +276,24 @@ def initconfig_hardware_entries(self):
entries.append("# ROCm")
entries.append("#------------------{0}\n".format("-" * 30))
# Explicitly setting HIP_ROOT_DIR may be a patch that is no longer necessary
entries.append(cmake_cache_path("HIP_ROOT_DIR", "{0}".format(spec["hip"].prefix)))
llvm_bin = spec["llvm-amdgpu"].prefix.bin
llvm_prefix = spec["llvm-amdgpu"].prefix
# Some ROCm systems seem to point to /<path>/rocm-<ver>/ and
# others point to /<path>/rocm-<ver>/llvm
if os.path.basename(os.path.normpath(llvm_prefix)) != "llvm":
llvm_bin = os.path.join(llvm_prefix, "llvm/bin/")
entries.append(
cmake_cache_filepath("CMAKE_HIP_COMPILER", os.path.join(llvm_bin, "clang++"))
)
if spec.satisfies("^blt@0.7:"):
rocm_root = os.path.dirname(spec["llvm-amdgpu"].prefix)
entries.append(cmake_cache_path("ROCM_PATH", rocm_root))
else:
# Explicitly setting HIP_ROOT_DIR may be a patch that is no longer necessary
entries.append(cmake_cache_path("HIP_ROOT_DIR", "{0}".format(spec["hip"].prefix)))
llvm_bin = spec["llvm-amdgpu"].prefix.bin
llvm_prefix = spec["llvm-amdgpu"].prefix
# Some ROCm systems seem to point to /<path>/rocm-<ver>/ and
# others point to /<path>/rocm-<ver>/llvm
if os.path.basename(os.path.normpath(llvm_prefix)) != "llvm":
llvm_bin = os.path.join(llvm_prefix, "llvm/bin/")
entries.append(
cmake_cache_filepath(
"CMAKE_HIP_COMPILER", os.path.join(llvm_bin, "amdclang++")
)
)
archs = self.spec.variants["amdgpu_target"].value
if archs[0] != "none":
arch_str = ";".join(archs)

View File

@@ -6,12 +6,13 @@
import pathlib
import re
import sys
from typing import Dict, List, Sequence, Tuple, Union
from typing import Dict, List, Optional, Sequence, Tuple, Union
import llnl.util.tty as tty
from llnl.util.lang import classproperty
from llnl.util.lang import classproperty, memoized
import spack.compiler
import spack
import spack.compilers.error
import spack.package_base
import spack.util.executable
@@ -43,6 +44,9 @@ class CompilerPackage(spack.package_base.PackageBase):
#: Static definition of languages supported by this class
compiler_languages: Sequence[str] = ["c", "cxx", "fortran"]
#: Relative path to compiler wrappers
compiler_wrapper_link_paths: Dict[str, str] = {}
def __init__(self, spec: "spack.spec.Spec"):
super().__init__(spec)
msg = f"Supported languages for {spec} are not a subset of possible supported languages"
@@ -77,14 +81,14 @@ def executables(cls) -> Sequence[str]:
]
@classmethod
def determine_version(cls, exe: Path):
def determine_version(cls, exe: Path) -> str:
version_argument = cls.compiler_version_argument
if isinstance(version_argument, str):
version_argument = (version_argument,)
for va in version_argument:
try:
output = spack.compiler.get_compiler_version_output(exe, va)
output = compiler_output(exe, version_argument=va)
match = re.search(cls.compiler_version_regex, output)
if match:
return ".".join(match.groups())
@@ -95,10 +99,11 @@ def determine_version(cls, exe: Path):
f"[{__file__}] Cannot detect a valid version for the executable "
f"{str(exe)}, for package '{cls.name}': {e}"
)
return ""
@classmethod
def compiler_bindir(cls, prefix: Path) -> Path:
"""Overridable method for the location of the compiler bindir within the preifx"""
"""Overridable method for the location of the compiler bindir within the prefix"""
return os.path.join(prefix, "bin")
@classmethod
@@ -142,3 +147,109 @@ def determine_compiler_paths(cls, exes: Sequence[Path]) -> Dict[str, Path]:
def determine_variants(cls, exes: Sequence[Path], version_str: str) -> Tuple:
# path determination is separated so it can be reused in subclasses
return "", {"compilers": cls.determine_compiler_paths(exes=exes)}
#: Returns the argument needed to set the RPATH, or None if it does not exist
rpath_arg: Optional[str] = "-Wl,-rpath,"
#: Flag that needs to be used to pass an argument to the linker
linker_arg: str = "-Wl,"
#: Flag used to produce Position Independent Code
pic_flag: str = "-fPIC"
#: Flag used to get verbose output
verbose_flags: str = "-v"
#: Flag to activate OpenMP support
openmp_flag: str = "-fopenmp"
implicit_rpath_libs: List[str] = []
def standard_flag(self, *, language: str, standard: str) -> str:
"""Returns the flag used to enforce a given standard for a language"""
if language not in self.supported_languages:
raise spack.compilers.error.UnsupportedCompilerFlag(
f"{self.spec} does not provide the '{language}' language"
)
try:
return self._standard_flag(language=language, standard=standard)
except (KeyError, RuntimeError) as e:
raise spack.compilers.error.UnsupportedCompilerFlag(
f"{self.spec} does not provide the '{language}' standard {standard}"
) from e
def _standard_flag(self, *, language: str, standard: str) -> str:
raise NotImplementedError("Must be implemented by derived classes")
def archspec_name(self) -> str:
"""Name that archspec uses to refer to this compiler"""
return self.spec.name
@property
def cc(self) -> Optional[str]:
assert self.spec.concrete, "cannot retrieve C compiler, spec is not concrete"
if self.spec.external:
return self.spec.extra_attributes["compilers"].get("c", None)
return self._cc_path()
def _cc_path(self) -> Optional[str]:
"""Returns the path to the C compiler, if the package was installed by Spack"""
return None
@property
def cxx(self) -> Optional[str]:
assert self.spec.concrete, "cannot retrieve C++ compiler, spec is not concrete"
if self.spec.external:
return self.spec.extra_attributes["compilers"].get("cxx", None)
return self._cxx_path()
def _cxx_path(self) -> Optional[str]:
"""Returns the path to the C++ compiler, if the package was installed by Spack"""
return None
@property
def fortran(self):
assert self.spec.concrete, "cannot retrieve Fortran compiler, spec is not concrete"
if self.spec.external:
return self.spec.extra_attributes["compilers"].get("fortran", None)
return self._fortran_path()
def _fortran_path(self) -> Optional[str]:
"""Returns the path to the Fortran compiler, if the package was installed by Spack"""
return None
@memoized
def _compiler_output(
compiler_path: Path, *, version_argument: str, ignore_errors: Tuple[int, ...] = ()
) -> str:
"""Returns the output from the compiler invoked with the given version argument.
Args:
compiler_path: path of the compiler to be invoked
version_argument: the argument used to extract version information
"""
compiler = spack.util.executable.Executable(compiler_path)
if not version_argument:
return compiler(
output=str, error=str, ignore_errors=ignore_errors, timeout=120, fail_on_error=True
)
return compiler(
version_argument,
output=str,
error=str,
ignore_errors=ignore_errors,
timeout=120,
fail_on_error=True,
)
def compiler_output(
compiler_path: Path, *, version_argument: str, ignore_errors: Tuple[int, ...] = ()
) -> str:
"""Wrapper for _get_compiler_version_output()."""
# This ensures that we memoize compiler output by *absolute path*,
# not just executable name. If we don't do this, and the path changes
# (e.g., during testing), we can get incorrect results.
if not os.path.isabs(compiler_path):
compiler_path = spack.util.executable.which_string(str(compiler_path), required=True)
return _compiler_output(
compiler_path, version_argument=version_argument, ignore_errors=ignore_errors
)

View File

@@ -76,7 +76,7 @@ def toolchain_version(self):
Override this method to select a specific version of the toolchain or change
selection heuristics.
Default is whatever version of msvc has been selected by concretization"""
return "v" + self.pkg.compiler.platform_toolset_ver
return "v" + self.spec["msvc"].package.platform_toolset_ver
@property
def std_msbuild_args(self):

View File

@@ -278,10 +278,6 @@ def update_external_dependencies(self, extendee_spec=None):
if not python.architecture.target:
python.architecture.target = archspec.cpu.host().family.name
# Ensure compiler information is present
if not python.compiler:
python.compiler = self.spec.compiler
python.external_path = self.spec.external_path
python._mark_concrete()
self.spec.add_dependency_edge(python, depflag=dt.BUILD | dt.LINK | dt.RUN, virtuals=())

View File

@@ -6,6 +6,7 @@
import codecs
import json
import os
import pathlib
import re
import shutil
import stat
@@ -13,7 +14,7 @@
import tempfile
import zipfile
from collections import namedtuple
from typing import Callable, Dict, List, Set
from typing import Callable, Dict, List, Set, Union
from urllib.request import Request
import llnl.path
@@ -23,8 +24,6 @@
import spack
import spack.binary_distribution as bindist
import spack.builder
import spack.concretize
import spack.config as cfg
import spack.environment as ev
import spack.error
@@ -33,6 +32,7 @@
import spack.paths
import spack.repo
import spack.spec
import spack.store
import spack.util.git
import spack.util.gpg as gpg_util
import spack.util.spack_yaml as syaml
@@ -41,6 +41,7 @@
from spack import traverse
from spack.error import SpackError
from spack.reporters.cdash import SPACK_CDASH_TIMEOUT
from spack.version import GitVersion, StandardVersion
from .common import (
IS_WINDOWS,
@@ -79,6 +80,45 @@ def get_change_revisions():
return None, None
def get_added_versions(
checksums_version_dict: Dict[str, Union[StandardVersion, GitVersion]],
path: str,
from_ref: str = "HEAD~1",
to_ref: str = "HEAD",
) -> List[Union[StandardVersion, GitVersion]]:
"""Get a list of the versions added between `from_ref` and `to_ref`.
Args:
checksums_version_dict (Dict): all package versions keyed by known checksums.
path (str): path to the package.py
from_ref (str): oldest git ref, defaults to `HEAD~1`
to_ref (str): newer git ref, defaults to `HEAD`
Returns: list of versions added between refs
"""
git_exe = spack.util.git.git(required=True)
# Gather git diff
diff_lines = git_exe("diff", from_ref, to_ref, "--", path, output=str).split("\n")
# Store added and removed versions
# Removed versions are tracked here to determine when versions are moved in a file
# and show up as both added and removed in a git diff.
added_checksums = set()
removed_checksums = set()
# Scrape diff for modified versions and prune added versions if they show up
# as also removed (which means they've actually just moved in the file and
# we shouldn't need to rechecksum them)
for checksum in checksums_version_dict.keys():
for line in diff_lines:
if checksum in line:
if line.startswith("+"):
added_checksums.add(checksum)
if line.startswith("-"):
removed_checksums.add(checksum)
return [checksums_version_dict[c] for c in added_checksums - removed_checksums]
def get_stack_changed(env_path, rev1="HEAD^", rev2="HEAD"):
"""Given an environment manifest path and two revisions to compare, return
whether or not the stack was changed. Returns True if the environment
@@ -224,7 +264,7 @@ def rebuild_filter(s: spack.spec.Spec) -> RebuildDecision:
def _format_pruning_message(spec: spack.spec.Spec, prune: bool, reasons: List[str]) -> str:
reason_msg = ", ".join(reasons)
spec_fmt = "{name}{@version}{%compiler}{/hash:7}"
spec_fmt = "{name}{@version}{/hash:7}{%compiler}"
if not prune:
status = colorize("@*g{[x]} ")
@@ -380,10 +420,9 @@ def generate_pipeline(env: ev.Environment, args) -> None:
args: (spack.main.SpackArgumentParser): Parsed arguments from the command
line.
"""
with spack.concretize.disable_compiler_existence_check():
with env.write_transaction():
env.concretize()
env.write()
with env.write_transaction():
env.concretize()
env.write()
options = collect_pipeline_options(env, args)
@@ -581,22 +620,25 @@ def copy_stage_logs_to_artifacts(job_spec: spack.spec.Spec, job_log_dir: str) ->
tty.debug(f"job spec: {job_spec}")
try:
pkg_cls = spack.repo.PATH.get_pkg_class(job_spec.name)
job_pkg = pkg_cls(job_spec)
tty.debug(f"job package: {job_pkg}")
except AssertionError:
msg = f"Cannot copy stage logs: job spec ({job_spec}) must be concrete"
tty.error(msg)
package_metadata_root = pathlib.Path(spack.store.STORE.layout.metadata_path(job_spec))
except spack.error.SpackError as e:
tty.error(f"Cannot copy logs: {str(e)}")
return
stage_dir = job_pkg.stage.path
tty.debug(f"stage dir: {stage_dir}")
for file in [
job_pkg.log_path,
job_pkg.env_mods_path,
*spack.builder.create(job_pkg).archive_files,
]:
copy_files_to_artifacts(file, job_log_dir)
# Get the package's archived files
archive_files = []
archive_root = package_metadata_root / "archived-files"
if archive_root.is_dir():
archive_files = [f for f in archive_root.rglob("*") if f.is_file()]
else:
msg = "Cannot copy package archived files: archived-files must be a directory"
tty.warn(msg)
build_log_zipped = package_metadata_root / "spack-build-out.txt.gz"
build_env_mods = package_metadata_root / "spack-build-env.txt"
for f in [build_log_zipped, build_env_mods, *archive_files]:
copy_files_to_artifacts(str(f), job_log_dir)
def copy_test_logs_to_artifacts(test_stage, job_test_dir):

View File

@@ -209,10 +209,8 @@ def build_name(self, spec: Optional[spack.spec.Spec] = None) -> Optional[str]:
Returns: (str) given spec's CDash build name."""
if spec:
build_name = (
f"{spec.name}@{spec.version}%{spec.compiler} "
f"hash={spec.dag_hash()} arch={spec.architecture} ({self.build_group})"
)
spec_str = spec.format("{name}{@version}{%compiler} hash={hash} arch={architecture}")
build_name = f"{spec_str} ({self.build_group})"
tty.debug(f"Generated CDash build name ({build_name}) from the {spec.name}")
return build_name

View File

@@ -330,7 +330,7 @@ def ensure_single_spec_or_die(spec, matching_specs):
if len(matching_specs) <= 1:
return
format_string = "{name}{@version}{%compiler.name}{@compiler.version}{ arch=architecture}"
format_string = "{name}{@version}{ arch=architecture} {%compiler.name}{@compiler.version}"
args = ["%s matches multiple packages." % spec, "Matching packages:"]
args += [
colorize(" @K{%s} " % s.dag_hash(7)) + s.cformat(format_string) for s in matching_specs
@@ -375,8 +375,13 @@ def iter_groups(specs, indent, all_headers):
index = index_by(specs, ("architecture", "compiler"))
ispace = indent * " "
def _key(item):
if item is None:
return ""
return str(item)
# Traverse the index and print out each package
for i, (architecture, compiler) in enumerate(sorted(index)):
for i, (architecture, compiler) in enumerate(sorted(index, key=_key)):
if i > 0:
print()
@@ -448,7 +453,6 @@ def get_arg(name, default=None):
hashes = get_arg("long", False)
namespaces = get_arg("namespaces", False)
flags = get_arg("show_flags", False)
full_compiler = get_arg("show_full_compiler", False)
variants = get_arg("variants", False)
groups = get_arg("groups", True)
all_headers = get_arg("all_headers", False)
@@ -470,13 +474,10 @@ def get_arg(name, default=None):
if format_string is None:
nfmt = "{fullname}" if namespaces else "{name}"
ffmt = ""
if full_compiler or flags:
ffmt += "{%compiler.name}"
if full_compiler:
ffmt += "{@compiler.version}"
if flags:
ffmt += " {compiler_flags}"
vfmt = "{variants}" if variants else ""
format_string = nfmt + "{@version}" + ffmt + vfmt
format_string = nfmt + "{@version}" + vfmt + ffmt
def fmt(s, depth=0):
"""Formatter function for all output specs"""

View File

@@ -4,12 +4,15 @@
import json
import os
import re
import shutil
import sys
from typing import Dict
from urllib.parse import urlparse, urlunparse
import llnl.util.filesystem as fs
import llnl.util.tty as tty
import llnl.util.tty.color as clr
from llnl.util import tty
import spack.binary_distribution as bindist
import spack.ci as spack_ci
@@ -18,12 +21,22 @@
import spack.cmd.common.arguments
import spack.config as cfg
import spack.environment as ev
import spack.error
import spack.fetch_strategy
import spack.hash_types as ht
import spack.mirrors.mirror
import spack.package_base
import spack.paths
import spack.repo
import spack.spec
import spack.stage
import spack.util.executable
import spack.util.git
import spack.util.gpg as gpg_util
import spack.util.timer as timer
import spack.util.url as url_util
import spack.util.web as web_util
import spack.version
description = "manage continuous integration pipelines"
section = "build"
@@ -32,6 +45,7 @@
SPACK_COMMAND = "spack"
INSTALL_FAIL_CODE = 1
FAILED_CREATE_BUILDCACHE_CODE = 100
BUILTIN = re.compile(r"var\/spack\/repos\/builtin\/packages\/([^\/]+)\/package\.py")
def deindent(desc):
@@ -191,6 +205,16 @@ def setup_parser(subparser):
reproduce.set_defaults(func=ci_reproduce)
# Verify checksums inside of ci workflows
verify_versions = subparsers.add_parser(
"verify-versions",
description=deindent(ci_verify_versions.__doc__),
help=spack.cmd.first_line(ci_verify_versions.__doc__),
)
verify_versions.add_argument("from_ref", help="git ref from which start looking at changes")
verify_versions.add_argument("to_ref", help="git ref to end looking at changes")
verify_versions.set_defaults(func=ci_verify_versions)
def ci_generate(args):
"""generate jobs file from a CI-aware spack file
@@ -427,7 +451,7 @@ def ci_rebuild(args):
# Arguments when installing the root from sources
deps_install_args = install_args + ["--only=dependencies"]
root_install_args = install_args + ["--keep-stage", "--only=package"]
root_install_args = install_args + ["--only=package"]
if cdash_handler:
# Add additional arguments to `spack install` for CDash reporting.
@@ -464,8 +488,7 @@ def ci_rebuild(args):
job_spec.to_dict(hash=ht.dag_hash),
)
# We generated the "spack install ..." command to "--keep-stage", copy
# any logs from the staging directory to artifacts now
# Copy logs and archived files from the install metadata (.spack) directory to artifacts now
spack_ci.copy_stage_logs_to_artifacts(job_spec, job_log_dir)
# If the installation succeeded and we're running stand-alone tests for
@@ -660,6 +683,159 @@ def _gitlab_artifacts_url(url: str) -> str:
return urlunparse(parsed._replace(path="/".join(parts), fragment="", query=""))
def validate_standard_versions(
pkg: spack.package_base.PackageBase, versions: spack.version.VersionList
) -> bool:
"""Get and test the checksum of a package version based on a tarball.
Args:
pkg spack.package_base.PackageBase: Spack package for which to validate a version checksum
versions spack.version.VersionList: list of package versions to validate
Returns: bool: result of the validation. True is valid and false is failed.
"""
url_dict: Dict[spack.version.StandardVersion, str] = {}
for version in versions:
url = pkg.find_valid_url_for_version(version)
url_dict[version] = url
version_hashes = spack.stage.get_checksums_for_versions(
url_dict, pkg.name, fetch_options=pkg.fetch_options
)
valid_checksums = True
for version, sha in version_hashes.items():
if sha != pkg.versions[version]["sha256"]:
tty.error(
f"Invalid checksum found {pkg.name}@{version}\n"
f" [package.py] {pkg.versions[version]['sha256']}\n"
f" [Downloaded] {sha}"
)
valid_checksums = False
continue
tty.info(f"Validated {pkg.name}@{version} --> {sha}")
return valid_checksums
def validate_git_versions(
pkg: spack.package_base.PackageBase, versions: spack.version.VersionList
) -> bool:
"""Get and test the commit and tag of a package version based on a git repository.
Args:
pkg spack.package_base.PackageBase: Spack package for which to validate a version
versions spack.version.VersionList: list of package versions to validate
Returns: bool: result of the validation. True is valid and false is failed.
"""
valid_commit = True
for version in versions:
fetcher = spack.fetch_strategy.for_package_version(pkg, version)
with spack.stage.Stage(fetcher) as stage:
known_commit = pkg.versions[version]["commit"]
try:
stage.fetch()
except spack.error.FetchError:
tty.error(
f"Invalid commit for {pkg.name}@{version}\n"
f" {known_commit} could not be checked out in the git repository."
)
valid_commit = False
continue
# Test if the specified tag matches the commit in the package.py
# We retrieve the commit associated with a tag and compare it to the
# commit that is located in the package.py file.
if "tag" in pkg.versions[version]:
tag = pkg.versions[version]["tag"]
try:
with fs.working_dir(stage.source_path):
found_commit = fetcher.git(
"rev-list", "-n", "1", tag, output=str, error=str
).strip()
except spack.util.executable.ProcessError:
tty.error(
f"Invalid tag for {pkg.name}@{version}\n"
f" {tag} could not be found in the git repository."
)
valid_commit = False
continue
if found_commit != known_commit:
tty.error(
f"Mismatched tag <-> commit found for {pkg.name}@{version}\n"
f" [package.py] {known_commit}\n"
f" [Downloaded] {found_commit}"
)
valid_commit = False
continue
# If we have downloaded the repository, found the commit, and compared
# the tag (if specified) we can conclude that the version is pointing
# at what we would expect.
tty.info(f"Validated {pkg.name}@{version} --> {known_commit}")
return valid_commit
def ci_verify_versions(args):
"""validate version checksum & commits between git refs
This command takes a from_ref and to_ref arguments and
then parses the git diff between the two to determine which packages
have been modified verifies the new checksums inside of them.
"""
with fs.working_dir(spack.paths.prefix):
# We use HEAD^1 explicitly on the merge commit created by
# GitHub Actions. However HEAD~1 is a safer default for the helper function.
files = spack.util.git.get_modified_files(from_ref=args.from_ref, to_ref=args.to_ref)
# Get a list of package names from the modified files.
pkgs = [(m.group(1), p) for p in files for m in [BUILTIN.search(p)] if m]
failed_version = False
for pkg_name, path in pkgs:
spec = spack.spec.Spec(pkg_name)
pkg = spack.repo.PATH.get_pkg_class(spec.name)(spec)
# Skip checking manual download packages and trust the maintainers
if pkg.manual_download:
tty.warn(f"Skipping manual download package: {pkg_name}")
continue
# Store versions checksums / commits for future loop
checksums_version_dict = {}
commits_version_dict = {}
for version in pkg.versions:
# If the package version defines a sha256 we'll use that as the high entropy
# string to detect which versions have been added between from_ref and to_ref
if "sha256" in pkg.versions[version]:
checksums_version_dict[pkg.versions[version]["sha256"]] = version
# If a package version instead defines a commit we'll use that as a
# high entropy string to detect new versions.
elif "commit" in pkg.versions[version]:
commits_version_dict[pkg.versions[version]["commit"]] = version
# TODO: enforce every version have a commit or a sha256 defined if not
# an infinite version (there are a lot of package's where this doesn't work yet.)
with fs.working_dir(spack.paths.prefix):
added_checksums = spack_ci.get_added_versions(
checksums_version_dict, path, from_ref=args.from_ref, to_ref=args.to_ref
)
added_commits = spack_ci.get_added_versions(
commits_version_dict, path, from_ref=args.from_ref, to_ref=args.to_ref
)
if added_checksums:
failed_version = not validate_standard_versions(pkg, added_checksums) or failed_version
if added_commits:
failed_version = not validate_git_versions(pkg, added_commits) or failed_version
if failed_version:
sys.exit(1)
def ci(parser, args):
if args.func:
return args.func(args)

Some files were not shown because too many files have changed in this diff Show More