Commit graph

33686 commits

Author SHA1 Message Date
Cody Balos
8720cec283
add nvechip to sundials components when mfem+rocm (#40512) 2023-10-19 12:08:24 -07:00
Harmen Stoppels
72b36ac144
Improve setup build / run / test environment (#35737)
This adds a `SetupContext` class which is responsible for setting
package.py module globals, and computing the changes to environment
variables for the build, test or run context.

The class uses `effective_deptypes` which takes a list of specs (e.g. single
item of a spec to build, or a list of environment roots) and a context
(build, run, test), and outputs a flat list of specs that affect the
environment together with a flag in what way they do so. This list is
topologically ordered from root to leaf, so that one can be assured that
dependents override variables set by dependencies, not the other way
around.

This is used to replace the logic in `modifications_from_dependencies`,
which has several issues: missing calls to `setup_run_environment`, and
the order in which operations are applied.

Further, it should improve performance a bit in certain cases, since
`effective_deptypes` run in O(v + e) time, whereas `spack env activate`
currently can take up to O(v^2 + e) time due to loops over roots. Each
edge in the DAG is visited once by calling `effective_deptypes` with
`env.concrete_roots()`.

By marking and propagating flags through the DAG, this commit also fixes
a bug where Spack wouldn't call `setup_run_environment` for runtime
dependencies of link dependencies. And this PR ensures that Spack
correctly sets up the runtime environment of direct build dependencies.

Regarding test dependencies: in a build context they are are build-time
test deps, whereas in a test context they are install-time test deps.
Since there are no means to distinguish the build/install type test deps,
they're both.

Further changes:

- all `package.py` module globals are guaranteed to be set before any of the
  `setup_(dependent)_(run|build)_env` functions is called
- traversal order during setup: first the group of externals, then the group
  of non-externals, with specs in each group traversed topological (dependencies
  are setup before dependents)
- modules: only ever call `setup_dependent_run_environment` of *direct* link/run
   type deps
- the marker in `set_module_variables_for_package` is dropped, since we should
  call the method once per spec. This allows us to set only a cheap subset of
  globals on the module: for example it's not necessary to compute the expensive
  `cmake_args` and w/e if the spec under consideration is not the root node to be
  built.
- `spack load`'s `--only` is deprecated (it has no effect now), and `spack load x`
  now means: do everything that's required for `x` to work at runtime, which
  requires runtime deps to be setup -- just like `spack env activate`.
- `spack load` no longer loads build deps (of build deps) ...
- `spack env activate` on partially installed or broken environments: this is all
  or nothing now. If some spec errors during setup of its runtime env, you'll only
  get the unconditional variables + a warning that says the runtime changes for
  specs couldn't be applied.
- Remove traversal in upward direction from `setup_dependent_*` in packages.
  Upward traversal may iterate to specs that aren't children of the roots
  (e.g. zlib / python have hundreds of dependents, only a small fraction is
  reachable from the roots. Packages should only modify the direct dependent
  they receive as an argument)
2023-10-19 20:44:05 +02:00
Harmen Stoppels
79896ee85c
spack checksum: restore ability to select top n (#40531)
The ability to select the top N versions got removed in the checksum overhaul,
cause initially numbers were used for commands.

Now that we settled on characters for commands, let's make numbers pick the top
N again.
2023-10-19 11:33:01 -07:00
Vanessasaurus
408ee04014
Automated deployment to update package flux-core 2023-10-19 (#40605)
Co-authored-by: github-actions <github-actions@users.noreply.github.com>
2023-10-19 10:16:42 -07:00
Harmen Stoppels
3f594e86a1
libvorbis: drop -force_cpusubtype_ALL flag (#40616)
This flag was only relevant when targeting powerpc from apple-clang,
which we don't do. The flag is removed from apple-clang@15. Let's drop
it unconditionally.
2023-10-19 10:15:18 -07:00
Scott Wittenburg
46c1a8e4c6
gitlab ci: Rework how mirrors are configured (#39939)
Improve how mirrors are used in gitlab ci, where we have until now thought
of them as only a string.

By configuring ci mirrors ahead of time using the proposed mirror templates,
and by taking advantage of the expressiveness that spack now has for mirrors,
this PR will allow us to easily switch the protocol/url we use for fetching
binary dependencies.

This change also deprecates some gitlab functionality and marks it for
removal in Spack 0.23:

    - arguments to "spack ci generate":
        * --buildcache-destination
        * --copy-to
    - gitlab configuration options:
        * enable-artifacts-buildcache
        * temporary-storage-url-prefix
2023-10-19 11:04:59 -05:00
Satish Balay
b2d3e01fe6
petsc: add variant +sycl (#40562)
* petsc: add variant +sycl

* petsc: add in gmake as dependency - so that consistent make gets used between petsc and slepc builds [that can have different env for each of the builds]
2023-10-19 07:31:02 -07:00
Harmen Stoppels
681639985a
ci: remove incorrect compilers.yaml (#40610) 2023-10-19 16:11:42 +02:00
Massimiliano Culpo
a1ca1a944a
ASP-based solver: single Spec instance per dag hash (#39590)
Reused specs used to be referenced directly into the built spec.

This might cause issues like in issue 39570 where two objects in
memory represent the same node, because two reused specs were
loaded from different sources but referred to the same spec
by DAG hash.

The issue is solved by copying concrete specs to a dictionary keyed
by dag hash.
2023-10-19 16:00:45 +02:00
Tamara Dahlgren
4f49f7b9df
Stand-alone test feature deprecation postponed to v0.22 (#40600) 2023-10-19 06:03:54 -06:00
Aiden Grossman
fb584853dd
byte-unixbench: respect compiler choice (#39242)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2023-10-19 02:20:34 -06:00
Aiden Grossman
cc47b06756
connect-proxy: respect compiler choice (#39243) 2023-10-19 09:58:58 +02:00
Aiden Grossman
b68a620fc2
bioawk: respect compiler choice (#39241) 2023-10-19 09:55:57 +02:00
Aiden Grossman
e417ca54a0
busybox: respect compiler choice (#39239) 2023-10-19 09:55:06 +02:00
Michael Kuhn
5bbf8454d0
julia: Fix build for @1.9 (#39045)
julia@1.9 tries to download ittapi, which requires cmake. Disable it
explicitly.
2023-10-19 09:09:45 +02:00
Annop Wongwathanarat
67b8dd0913
acfl: add version 23.10 (#40510) 2023-10-18 17:07:40 -07:00
Harmen Stoppels
a42eb0d2bd
unparse: also support generic type aliases (#40328) 2023-10-18 23:16:05 +02:00
Harmen Stoppels
294e659ae8
AutotoolsPackage / MakefilePackage: add gmake build dependency (#40380) 2023-10-18 19:56:54 +02:00
Harmen Stoppels
55198c49e5
llvm: fix ncurses+termlib linking in lldb (#40594) 2023-10-18 19:04:49 +02:00
Harmen Stoppels
dc071a3995
Fix dev-build keep_stage behavior (#40576)
`spack dev-build` would incorrectly set `keep_stage=True` for the
entire DAG, including for non-dev specs, even though the dev specs
have a DIYStage which never deletes sources.
2023-10-18 11:44:26 +00:00
Lydéric Debusschère
db5d0ac6ac
[fix] py-werkzeug: add constraint in python dependence (#40590)
py-werkzeug@:0.12 does not work with python@3.10:

Test with py-werkzeug 0.12.2 and python 3.10:
```
$ python3.10 -c 'import werkzeug'
py-werkzeug-0.12.2/lib/python3.11/site-packages/werkzeug/datastructures.py", line 16, in <module>
from collections import Container, Iterable, MutableSet
ImportError: cannot import name 'Container' from 'collections'
```

Test with py-werkzeug 0.12.2 and python 3.9:
```
python3.9 -c "from collections import Container"
<string>:1: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
```
2023-10-18 13:04:21 +02:00
Aiden Grossman
2802013dc6
Add license directive (#39346)
This patch adds in a license directive to get the ball rolling on adding in license 
information about packages to spack. I'm primarily interested in just adding
license into spack, but this would also help with other efforts that people are
interested in such as adding license information to the ASP solve for 
concretization to make sure licenses are compatible.

Usage:

Specifying the specific license that a package is released under in a project's
`package.py` is good practice. To specify a license, find the SPDX identifier for
a project and then add it using the license directive:

```python
   license("<SPDX Identifier HERE>")
```

For example, for Apache 2.0, you might write:

```python
   license("Apache-2.0")
```

Note that specifying a license without a when clause makes it apply to all
versions and variants of the package, which might not actually be the case.
For example, a project might have switched licenses at some point or have
certain build configurations that include files that are licensed differently.
To account for this, you can specify when licenses should be applied. For
example, to specify that a specific license identifier should only apply
to versionup to and including 1.5, you could write the following directive:

```python
   license("MIT", when="@:1.5")
```
2023-10-18 03:58:19 -07:00
Greg Becker
37bafce384
abi.py: fix typo, add type-hints (#38216)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2023-10-18 11:22:55 +02:00
jfavre
da0813b049
paraview: add variant for NVIDIA IndeX (#40577)
* add variant for NVIDIA IndeX
* remove whitespaces
2023-10-17 13:03:41 -06:00
Dennis Klein
e2bb2595b3
xmlto: add more dependencies (#40578)
`xmllint` is called by `xmlto` during generation of `libzmq`'s docs, so
adding `libxml2`.

The docbook deps and the patches are taken from
https://src.fedoraproject.org/rpms/xmlto/blob/rawhide/f/xmlto.spec

There are still many more dependencies missing, but this is out of scope
of this patch (which is only concerned about the use case of `libzmq`).
2023-10-17 11:58:46 -07:00
Mikael Simberg
b7cbcfdcab
Add tracy 0.10 (#40573) 2023-10-17 11:35:55 -07:00
Peter Scheibel
9cde25b39e
Allow / in GitVersion (#39398)
This commit allows version specifiers to refer to git branches that contain
forward slashes. For example, the following is valid syntax now:

    pkg@git.releases/1.0
   
It also adds a new method `Spec.format_path(fmt)` which is like `Spec.format`,
but also maps unsafe characters to `_` after interpolation. The difference is
as follows:

    >>> Spec("pkg@git.releases/1.0").format("{name}/{version}")
    'pkg/git.releases/1.0'

    >>> Spec("pkg@git.releases/1.0").format_path("{name}/{version}")
    'pkg/git.releases_1.0'

The `format_path` method is used in all projections. Notice that this method
also maps `=` to `_`

    >>> Spec("pkg@git.main=1.0").format_path("{name}/{version}")
    'pkg/git.main_1.0'
   
which should avoid syntax issues when `Spec.prefix` is literally copied into a
Makefile as sometimes happens in AutotoolsPackage or MakefilePackage
2023-10-17 20:33:59 +02:00
Rocco Meli
49ea0a8e2e
Add mpi_f08 variant to CP2K (#40574)
* add mpi_f08 variant
* add conflict
* add conflict with released versions of cp2k and +mpi_f08
2023-10-17 11:33:13 -07:00
Adam J. Stewart
d317ddfebe
py-rtree: add v1.1.0 (#40575) 2023-10-17 11:25:18 -07:00
Cameron Rutherford
b1eef4c82d
hiop: 1.0.1 release (#40580) 2023-10-17 11:14:17 -07:00
Harmen Stoppels
a4ad365de0
patchelf: fix compilation with GCC 7 (#40581) 2023-10-17 11:12:09 -07:00
wspear
8c257d55b4
Support apple-clang in pdt (#40582) 2023-10-17 11:23:15 -06:00
Harmen Stoppels
bd165ebc4d
Support spack env activate --with-view <name> <env> (#40549)
Currently `spack env activate --with-view` exists, but is a no-op.

So, it is not too much of a breaking change to make this redundant flag
accept a value `spack env activate --with-view <name>` which activates
a particular view by name.

The view name is stored in `SPACK_ENV_VIEW`.

This also fixes an issue where deactivating a view that was activated
with `--without-view` possibly removes entries from PATH, since now we
keep track of whether the default view was "enabled" or not.
2023-10-17 15:40:48 +02:00
Massimiliano Culpo
348e5cb522
packages: use "requires" to allow only selected compilers (#40567)
A few packages have encoded an idiom that pre-dates the introduction
of the 'requires' directive, and they cycle over all compilers
to conflict with the ones that are not supported.

Here instead we reverse the logic, and require the ones that
are supported.
2023-10-17 08:38:06 +02:00
Patrick Bridges
7cc17f208c
Creation of Beatnik package and associated updates to silo and cabana spack package (#40382)
* Added initial package for building Beatnik with spack

* Fixed github ID for Jason as a maintainer.

* Major revision of beatnik spack package to properly support GPU spack builds with CUDA (and ROCm, though that it untested)

* Marked that beatnik 1.0 will require cabana 0.6.0. We will wait for the cabana 0.6.0 release before we release beatnik

* Update to beatnik package spec to compile with hipcc when +rocm

* Updated spack package for cabana for version 0.6.0 and appropriate heffte dependency

* Updated beatnik package to require cabana 0.6.0

* More updates to cabana and beatnik to build with cabana 0.6.0

* Finish removing BLT dependence from beatnik

* More updates to beatnik package for compiling on cray systems

* Updated beatnik package for new cabana package

* Changes to silo package for new silo version

* Fixed version specs for heffte to be able to concretize and build

* Fixed spack style issues for beatnik and silo packages

* More spack formatting fixes to beatnik and silo

* Patrick adopting silo package as maintainer for now

* Should address final style changes to beatnik package spec

* Yet more style fixes.

* Perhaps this is the final style fixes? :)

* Minor fix to cabana package on required versions
2023-10-16 21:13:31 -06:00
Eric Berquist
2913cd936a
Add latest versions of rlwrap (#40563)
* Add latest versions of rlwrap
* rlwrap: fix URL for v0.46.1
2023-10-16 20:28:51 -06:00
Stephen Sachs
361a185ddb
intel-oneapi-compilers: ifx is located in bin not bin/intel64 (#40561)
This is a fix on top of https://github.com/spack/spack/pull/40557 .
Tagging @rscohn2 for review.
2023-10-16 20:23:46 -06:00
Seth R. Johnson
9d5615620a
py-furo: new version (#40559) 2023-10-16 17:10:31 -04:00
Adam J. Stewart
ae185087e7
py-grayskull: add new package (#40293)
* py-grayskull: add new package

* [@spackbot] updating style on behalf of adamjstewart

---------

Co-authored-by: adamjstewart <adamjstewart@users.noreply.github.com>
2023-10-16 15:37:50 -05:00
Massimiliano Culpo
4a96d29e69
Use string representation of deptypes for concrete specs (#40566) 2023-10-16 22:36:22 +02:00
Adam J. Stewart
1e44f33163
py-fiona: add v1.9.5 (#40497) 2023-10-16 15:34:13 -05:00
Adam J. Stewart
348493abcd
py-shapely: add v2.0.2 (#40523) 2023-10-16 15:33:56 -05:00
Adam J. Stewart
2bc4bfa877
py-grpcio: cython 3 still not supported (#40537) 2023-10-16 15:33:32 -05:00
Adam J. Stewart
3e3b287761
py-lightning: add v2.1.0 (#40496) 2023-10-16 14:14:46 -05:00
renjithravindrankannath
74bbb1ef1b
Updating patch to enable flag mcode-object-version=none (#40367)
* Updating patch to add flag mcode-object-version=none when
   device libs is buils as part of llvm-amdgpu
* Limiting patch to +rocm-device-libs variant and adding
   appropriate comment for the patch
* Updating llvmpatch as per the mailine code
   Updating hsa-rocr patch as per the latest code
   Updating the if elif condition for the hip test src path
* Updating flags for 5.5 relases and above
* Updating build flags and patches
2023-10-16 10:25:10 -07:00
Dom Heinzeller
22405fbb68
Fix version incompatibilities of py-pandas and py-openpyxl (#40472)
* Fix version incompatibilities of py-pandas and py-openpyxl

* Add variant excel for py-pandas

* Add package py-pyxlsb

* Add versios for py-xlsxwriter

* Define excel dependencies for py-pandas 1.4, 1.5, 2.0, 2.1

* Fix variant excel in py-pandas

* Add package py-odfpy, which is also a dependency for py-pandas@2.0:

* Rearrange excel dependencies for py-pandas

* Change url to pypi

* Add missing newline to fix style in py-odfpy
2023-10-16 10:28:38 -06:00
Diego Alvarez S
14d935bd6c
Add nextflow 23.10.0 (#40547) 2023-10-16 09:06:36 -07:00
Garth N. Wells
363b9d3c7b
fenics-basix: update for v0.7 (#40440)
* Uodate for Basix 0.7

* Version fix for nanobind dependency

* Simplification

* Version update and simplify dependencies

* Add comment on location of pyproject.toml

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-10-16 08:53:02 -06:00
Stephen Sachs
8347ae3766
intel-oneapi-compilers: ifx uses --gcc-name & --gxx-name (#40557)
`ifx` uses the older syntax instead of `--gcc-toolchain`. Tested up to version
2023.2.0.
2023-10-16 10:24:21 -04:00
Garth N. Wells
1106f6b9f2
py-fenics-ufl: update version and add test (#40534)
* Update py-ufl vesion

* Syntax fix

* Syntax fix

* Add test

* Updates following comments
2023-10-16 06:52:59 -05:00