Compare commits

...

1079 Commits

Author SHA1 Message Date
Cameron Smith
44309e3b0b simmodsuite: depends on rpc
Sun RPC support was optional starting with glibc version 2.26 and was removed in version 2.32. On newer operating systems (e.g., RHEL8) libtirpc is required to satisfy the xdr symbols.
2022-07-20 09:38:41 -04:00
Harmen Stoppels
e7be8dbbcf spack stage: add missing --fresh and --reuse (#31626) 2022-07-20 13:50:56 +02:00
Harmen Stoppels
e3aca44601 installer.py: require "explicit: True" in the install arguments to mark a package "explicit" (#31646) 2022-07-20 12:09:45 +02:00
Harmen Stoppels
43673fee80 py-pip: 22.x (#31621) 2022-07-18 19:13:42 -06:00
Servesh Muralidharan
918637b943 Update py-xdot to use python_purelib #31616 (#31628)
Issue discussed in https://github.com/spack/spack/issues/31616
2022-07-18 12:56:19 -07:00
Cory Bloor
5c59e9746a rocblas: tighten tensile dependencies (#31414)
* rocblas: make tensile dependencies conditional

* Remove rocm-smi from the rocblas dependency list

rocm-smi was added to the rocblas dependency list because Tensile was a
dependency of rocBLAS and rocm-smi was a dependency of Tensile. However,
that reasoning was not correct.

Tensile is composed of three components:

  1. A command-line tool for generating kernels, benchmarking them, and
     saving the parameters used for generating the best kernels
     (a.k.a. "Solutions") in YAML files.
  2. A build system component that reads YAML solution files, generates
     kernel source files, and invokes the compiler to compile then into
     code object files (*.co, *.hsco). An index of the kernels and their
     associated parameters is also generated and stored in either YAML
     or MessagePack format (TensileLibrary.yaml or TensileLibrary.dat).
  3. A runtime library that will load the TensileLibrary and code object
     files when asked to execute a GEMM and choose the ideal kernel for
     your specific input parameters.

rocBLAS developers use (1) during rocBLAS development. This is when
Tensile depends on rocm-smi. The GPU clock speed and temperature must be
controlled to ensure consistency when doing the solution benchmarking.
That control is provided by rocm-smi. When building rocBLAS, Tensile is
used for (2). However, there is no need for control of the GPU at that
point and rocm-smi is not a dependency. At runtime, the rocBLAS library
uses Tensile for (3), but there is again no dependency on rocm-smi.

tl;dr: rocm-smi is a dependency of the tensile benchmarking tool,
which is not a build dependency or runtime dependency of rocblas.
2022-07-18 12:21:40 -07:00
eugeneswalker
b065d69136 e4s ci: add ginkgo +rocm (#31603) 2022-07-18 14:19:31 +02:00
Luke Diorio-Toth
710ec58df0 kraken2: add v2.1.2 (#31613) 2022-07-18 02:45:48 -06:00
Massimiliano Culpo
70be612f43 containerize: fix missing environment activation (#31596) 2022-07-18 10:31:16 +02:00
haralmha
c589f97cf0 lhapdf: add gettext libs explicitly (#31555)
Co-authored-by: Valentin Volkl <valentin.volkl@cern.ch>
2022-07-18 10:25:08 +02:00
Adam J. Stewart
ad4f551c22 py-pyarrow: aarch64 patch no longer applies/required (#31609) 2022-07-18 09:44:58 +02:00
Adam J. Stewart
37134aa331 py-kornia: add v0.6.6 (#31611) 2022-07-18 09:43:41 +02:00
Glenn Johnson
bb1632c99d Fixes for kallisto package (#31617)
This PR contains several fixes for the kallisto package.

- create hdf5 variant as hdf5 is optional beginning with 0.46.2
- provide patch for 0.43 to link against libz
- provide patch for older versions to build again gcc-11 and up
- patch and code to use autoconf-2.70 and up
2022-07-18 09:37:21 +02:00
Jonathon Anderson
117c7cc3db Only hack botocore when needed (#31610)
Newer versions of botocore (>=1.23.47) support the full IOBase
interface, so the hacks added to supplement the missing attributes are
no longer needed. Conditionally disable the hacks if they appear to be
unnecessary based on the class hierarchy found at runtime.
2022-07-18 08:40:13 +02:00
Luke Diorio-Toth
7b95e2f050 py-phydms, py-pypdf2, and py-pyvolve: new packages (#31540)
* py-panaroo: new package

* moving panaroo to branch

* py-phydms: new package

* added dependencies and new packages

* fixed py-pypdf2 dependencies
2022-07-16 17:24:29 -07:00
Luke Diorio-Toth
03c1962252 mizani, plotnine, and pystan: added more versions and variable dependencies (#31541)
* py-panaroo: new package

* moving panaroo to branch

* updated mizani, plotnine, and pystan versions and requirements

* made suggested fixes

* adding more requested fixes

* added new versions of statsmodels and httpstan
2022-07-16 17:23:29 -07:00
FJ-NaokiMatsumura
268ec998c0 py-horovod: add versions 0.22+, fix aarch64 build (#29310)
* py-torch: add version 0.23.0 and fix to built on aarch64

* Add newer versions, fix build issues

* Fix tests

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-07-16 01:41:42 -06:00
Adam J. Stewart
caee7341dd Qhull: fix RPATH on macOS (#31586) 2022-07-15 16:14:19 -07:00
Adam J. Stewart
ac15ebec76 py-geocube: add v0.3.2 (#31588) 2022-07-15 16:03:11 -07:00
Lucas Frérot
914ce8508a tamaas: new version 2.5.0 (#31501)
* tamaas: new version 2.5.0

* tamaas: do not build/install documentation

* tamaas: hash correction for v2.5.0.post1

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-07-15 10:49:11 -07:00
haralmha
17b6bb9d06 gperftools: Add version 2.10 and add unwind to LDFLAGS (#31574)
* gperftools: Add version 2.10 and add unwind to LDFLAGS

* Make unwind flag conditional on libunwind variant
2022-07-15 10:34:47 -07:00
Harmen Stoppels
6f8d7390f1 Use lexists instead of exists during fetch (#31509) 2022-07-15 18:43:14 +02:00
牟展佑
123c405e11 openssl: add patch for @1.1.1q. fixed issues #31545 (#31575) 2022-07-14 20:29:45 -06:00
Elizabeth Sherrock
6f46345b60 blight, fparser, typing_extensions (#31566)
* Added fparser 0.0.16

* Created package

* Change from GitHub download to pypi

* py-typing-extensions: 4.3.0

* Added py-pdoc3

* Finished adding py-blight

* Fixed typos

* Fixed dependency specs

* Fixed some things after PR review

* Added @woodruffw as blight maintainer

* Removed maintainer comment block from pdoc3
2022-07-14 17:13:47 -06:00
Erik Schnetter
49ae847c6c snappy: Update to version 1.1.9 (#31578) 2022-07-14 16:53:46 -06:00
eugeneswalker
3cb6fd140c update e4s to reflect june status (#31032) 2022-07-14 22:05:57 +00:00
Joseph Snyder
64b41b012c Bug/fix credentials s3 buildcache update (#31391)
* Add connection information to buildcache update command

Ensure that the s3 connection made when attempting to update the content
of a buildcache attempts to use the extra connection information
from the mirror creation.

* Add unique help for endpoint URL argument

Fix copy/paste error for endpoint URL help which was the same as
the access token

* Re-work URL checking for S3 mirrors

Due to the fact that nested bucket URLs would never match the string used
for checking that the mirror is the same, switch the check used.

Sort all mirror URLs by length to have the most specific cases first
and see if the desired URL "starts with" the mirror URL.

* Long line style fixes

Add execptions for long lines and fix other style errors

* Use format() function to rebuild URL

Use the format command to rebuild the url instead of crafing a
formatted string out of known values

* Add early exit for URL checking

When a valid mirror is found, break from the loop
2022-07-14 20:49:46 +00:00
Todd Gamblin
3d0347ddd3 Deprecate blacklist/whitelist in favor of include/exclude (#31569)
For a long time the module configuration has had a few settings that use
`blacklist`/`whitelist` terminology. We've been asked by some of our users to replace
this with more inclusive language. In addition to being non-inclusive, `blacklist` and
`whitelist` are inconsistent with the rest of Spack, which uses `include` and `exclude`
for the same concepts.

- [x] Deprecate `blacklist`, `whitelist`, `blacklist_implicits` and `environment_blacklist`
      in favor of `exclude`, `include`, `exclude_implicits` and `exclude_env_vars` in module
      configuration, to be removed in Spack v0.20.
- [x] Print deprecation warnings if any of the deprecated names are in module config.
- [x] Update tests to test old and new names.
- [x] Update docs.
- [x] Update `spack config update` to fix this automatically, and include a note in the error
      that you can use this command.
2022-07-14 20:42:33 +00:00
Jen Herting
875b032151 [py-tensorflow-hub] full_index=1 caused checksum change (#31585) 2022-07-14 11:47:30 -07:00
snehring
c7e49ea5a0 interproscan: new version 5.56-89.0 (#31565)
* interproscan: new version 5.56-89.0

* interproscan: add maintainer
2022-07-14 09:53:12 -07:00
Adam J. Stewart
a1f07b68a8 py-statsmodels: add v0.13.2 (#31571) 2022-07-14 09:30:43 -07:00
Axel Huebl
c4efeab976 ADIOS2: 2.8.2 (#31564)
Add the latest ADIOS2 release.
2022-07-14 03:17:38 -06:00
Peter Scheibel
7741bfb7d1 Decompression: use tar exe vs. built-in Python tarfile support (#31563)
Python's built-in tarfile support doesn't address some general
cases of malformed tarfiles that are already handled by the system
'tar' utility; until these can be addressed, use that exclusively.
2022-07-13 14:12:21 -07:00
Stephen Sachs
d25315c2f6 Add package py-devito and it's dependencies (#31495)
* [py-devito] Add package

Also add dependencies:
- py-nbval
- py-cgen
- py-codepy
- py-contexttimer
- py-pyrevolve

* [py-devito] Fix some typos

* [py-devito] Fix: include examples directory

Upstream issue: https://github.com/devitocodes/devito/issues/1954

* [py-devito] clean up

* [py-devito] clean up dependency packages

* [py-devito] flake8: line too long

* Address @adamjstewart comments

* Make flake8 happy

Co-authored-by: Stephen Sachs <stesachs@amazon.com>
2022-07-13 13:12:28 -07:00
Jonathon Anderson
8e00aa7c79 m4: Add build dependency on diffutils (#31232) 2022-07-13 22:02:17 +02:00
Adam J. Stewart
752697add2 GDAL: CMake support and dependency variants (#31197)
Add support for CMake builds while preserving autotools support
for older versions of GDAL

* Add GDAL 3.5.0
* Remove GDAL 1
* Add support for new CMake build system
* Change defaults to build all recommended dependencies
* Simplify Autotools flag handling
* Determine version range for drivers
2022-07-13 11:58:39 -07:00
Ben Darwin
f7ed9092e5 ants: add version 2.4.0 (#31562) 2022-07-13 17:35:04 +00:00
Emil Briggs
5da8bae2a9 Add versions 4.3.0 and 4.3.1. Update boost reqs with component/versions. (#31559) 2022-07-13 10:08:29 -07:00
Erik Schnetter
a78e8bc54e mpitrampoline: New version 4.1.2 (#31560) 2022-07-13 10:06:04 -07:00
Chris White
cdf541ac4a Cppcheck: fix install and convert to cmake build system (#31488)
* fix cppcheck install and convert to cmake build system

* add white238 as a maintainer
2022-07-13 07:32:48 -07:00
Rémi Lacroix
0e783b2c47 ghostscript-fonts: fix URL (#31360) 2022-07-13 10:11:22 +02:00
H. Joe Lee
9c5ef2aafe Hermes: add v0.7.0-beta, remove older versions (#31544) 2022-07-13 09:25:45 +02:00
Vicente Bolea
1f7ee4957b vtk-m: add v1.8.0 (#31220) 2022-07-13 09:21:56 +02:00
Elizabeth Sherrock
6fbb01fe31 py-ford: add v6.1.13 (#31483) 2022-07-13 09:19:23 +02:00
Adam J. Stewart
a36c05068f Open3D: fix build with external fmt (#31547) 2022-07-13 09:17:07 +02:00
Adam J. Stewart
16e079aa52 py-pytorch-lightning: add v1.6.5 (#31548) 2022-07-13 09:07:52 +02:00
Marco De La Pierre
79f67ba92b Tower Agent / Tower CLI: new packages (#31539) 2022-07-13 09:05:03 +02:00
Massimiliano Culpo
7f2b5e8e57 spack.repo.get() can only be called on concrete specs (#31411)
The goal of this PR is to make clearer where we need a package object in Spack as opposed to a package class.

We currently instantiate a lot of package objects when we could make do with a class.  We should use the class
when we only need metadata, and we should only instantiate and us an instance of `PackageBase` at build time.

Modifications:
- [x] Remove the `spack.repo.get` convenience function (which was used in many places, and not really needed)
- [x] Use `spack.repo.path.get_pkg_class` wherever possible
- [x] Try to route most of the need for `spack.repo.path.get` through `Spec.package`
- [x] Introduce a non-data descriptor, that can be used as a decorator, to have "class level properties"
- [x] Refactor unit tests that had to be modified to reduce code duplication
- [x] `Spec.package` and `Repo.get` now require a concrete spec as input
- [x] Remove `RepoPath.all_packages` and `Repo.all_packages`
2022-07-12 19:45:24 -04:00
Seth R. Johnson
6ceb274de0 trilinos: add new release 13.4.0 and use sha256 instead of commit hashes (#31277) 2022-07-12 14:57:39 -06:00
Richard Berger
8e25fd4f16 spiner: update dependencies (#31486) 2022-07-12 11:16:34 -07:00
Adam J. Stewart
3fc8c3d18b py-nbmake: add v1.3.0; py-nbclient: add v0.6.6, 0.5.13; py-traitlets: add v5.3.0 (#31513)
* py-nbmake: add v1.3.0

* Add newer versions
2022-07-12 11:03:40 -07:00
Carlos Bederián
bfe058aa57 amdblis: add 3.2 (#31518) 2022-07-12 10:40:54 -07:00
Carlos Bederián
45b77a2215 amdlibflame: add 3.2 (#31519) 2022-07-12 10:37:26 -07:00
Carlos Bederián
7dd22e93c6 amdfftw: add 3.2 (#31520) 2022-07-12 10:24:59 -07:00
nicolas le goff
cdb7c7a1db fixed the cgal recipe and added the latest release. (#31523)
* fixed the cgal recipe and added the latest release.

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

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

* updated cgal recipe to new URL for tarballs

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-07-12 09:04:51 -07:00
Harmen Stoppels
ea91e8f4ca file_cache.py: idempotent remove without races (#31477)
There's a race condition in `remove()` as the lockfile is removed after
releasing the lock, which is a problem when another process acquires a
write lock during deletion.

Also simplify life a bit in multiprocessing when a file is possibly
removed multiple times, which currently is an error on the second
deletion, so the proposed fix is to make remove(...) idempotent and not
error when deleting non-existing cache entries.

Don't tests for existence of lockfile, cause windows/linux behavior is different
2022-07-12 15:03:48 +00:00
Harmen Stoppels
74e2625dcf compression.py: buffered copy (#31533) 2022-07-12 16:49:59 +02:00
RichardABunt
a4f0522468 arm-forge: add 22.0.2 and 22.0.3. (#31432) 2022-07-12 16:21:07 +02:00
Marco De La Pierre
ff67e10f60 lammps package: added fftw_precision variant (#31459) 2022-07-12 16:14:58 +02:00
Axel Huebl
c8931e390a WarpX: 22.07 (#31508)
Update `warpx` & `py-warpx` to the latest release, `22.07`.
2022-07-12 16:13:51 +02:00
Harmen Stoppels
b2c519470b environment.py: only acquire write lock when necessary (#31493) 2022-07-12 16:12:43 +02:00
marcosmazz
9087224e04 OpenMX: add v3.9 (#31466)
Co-authored-by: Marcos Mazzini - <mmazzini@serafin.ccad.unc.edu.ar>
2022-07-12 15:44:02 +02:00
Stephen Sachs
110a35a520 py-gevent: deprecated compiler flags (#31469)
Co-authored-by: Stephen Sachs <stesachs@amazon.com>
2022-07-12 15:23:26 +02:00
miheer vaidya
ea9151b2a5 abseil: add v20220623 (#31507) 2022-07-12 15:21:31 +02:00
Nicholas Brunhart-Lupo
9708afc3b3 amr-wind: add "ascent" variant (#31376) 2022-07-12 14:38:24 +02:00
Harmen Stoppels
d904a789d5 env depfile: add missing touch (#31494)
Oversight in #31433, the non-phony `env` target was missing a file being
created for it, which can cause make to infinitely loop when including
multiple generated makefiles.
2022-07-12 14:16:31 +02:00
Erik Schnetter
7917f87c63 cuda: New version 11.5.2 (#31463) 2022-07-12 13:52:12 +02:00
dependabot[bot]
e33a57ab65 build(deps): bump actions/setup-python from 4.0.0 to 4.1.0 (#31526)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](d09bd5e600...c4e89fac7e)

---
updated-dependencies:
- dependency-name: actions/setup-python
  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>
2022-07-12 13:50:30 +02:00
Mark W. Krentel
7f830295ae hpcviewer: add v2022.06 (#31532) 2022-07-12 13:41:13 +02:00
Massimiliano Culpo
89b8d33d05 Remove os.getcwd from function signature (#31480)
fixes #29730

This is also wrong since it binds the directory at the time
of module import, rather than the one at the time of function
call.
2022-07-12 10:08:37 +02:00
Jonathon Anderson
25f198aa91 Sanitize ownership when extracting tarfiles (#31524) 2022-07-12 09:28:24 +02:00
Adam J. Stewart
5bd1074afb py-hatchling: add new packages, document new build backend (#31512)
* py-hatchling: add new package, document new build backend

* Minor doc changes

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-07-11 16:23:28 -07:00
Michael Kuhn
18b51e19df glib: add 2.72.3 (#31516) 2022-07-11 17:09:43 -06:00
renjithravindrankannath
21822f233c Fix for sanity check failure in spack upstream code: atmi, hip-rocclr (#31454)
* Fix for sanity check failure in spack upstream code

* Style check failure correction

* Correction as per the review comments
2022-07-11 15:01:47 -07:00
Keita Iwabuchi
5f7f8ce1eb Metall package: add v0.21 (#31482)
* Metall package: add dependency to GCC for build test

* Package Metall: add v.017

* Package Metall: update the package file

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

Co-authored-by: Bernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com>

* Metall package: add v0.18 and v0.19

* Metall Package: add v0.20

* Metall package: add v0.21

Co-authored-by: Bernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com>
2022-07-11 14:54:57 -07:00
Richard Berger
ac09607a5a ports-of-call: new version 1.2.0, simplify (#31485) 2022-07-11 14:53:36 -07:00
miheer vaidya
e0bbf26f1f [cppcodec] new package (#31506) 2022-07-11 14:11:24 -07:00
Adam J. Stewart
1d827a9ff6 py-mypy: add v0.961 (#31503) 2022-07-11 12:34:09 -07:00
Adam J. Stewart
ba0cff1831 py-gpytorch: add v1.7.0 (#31504) 2022-07-11 12:30:58 -07:00
Adam J. Stewart
12699787e7 py-numpy: add v1.23.1 (#31510)
* py-numpy: add v1.23.1

* Remove packaging dep
2022-07-11 10:47:20 -07:00
Adam J. Stewart
c020894f36 py-torchgeo: add v0.3.0 (#31514) 2022-07-11 10:10:30 -07:00
Carlos Bederián
05a32b5cf5 ucx: add 1.13.0 (#31517) 2022-07-11 10:06:33 -07:00
Michael Kuhn
359d094528 julia: fix patch (#31515) 2022-07-11 16:13:47 +02:00
Harmen Stoppels
92dfe7f25b man-db: Don't use DESTDIR (#31492) 2022-07-10 21:41:55 +02:00
Erik Schnetter
2159ce036e openssl: New version 1.1.1q (#31487) 2022-07-08 13:25:43 -06:00
Adam J. Stewart
7e6dbfb185 py-setuptools: add v63.0.0 (#31444) 2022-07-08 10:41:15 -07:00
Harmen Stoppels
4043b13d59 vim: deprecate 9.0.0000, add 9.0.0045 (#31490) 2022-07-08 10:16:50 +00:00
Luke Diorio-Toth
ec7513c8b5 py-panaroo, py-edlib, and py-intbitset: new packages (#31452) 2022-07-07 18:13:39 -06:00
Erin Newcomer
44b48cfe46 Package/py phylophlan (#31422)
* py-phylophlan: new package

* py-phyloseq: new package

* py-phylophlan: style fix

* py-phylophlan: fixed dependencies

* py-phylophlan: style fix
2022-07-07 14:06:55 -07:00
Tamara Dahlgren
a12ce9fd59 OpenBabel: Make building with GUI an option (#31456) 2022-07-07 09:43:17 -07:00
Cory Bloor
bb92ea59a2 Fix spack edit message when no editor installed (#31412)
When no default editor is installed and no environment variable is set,
which_string would return None and this would be passed to os.execv
resulting in a TypeError. The message presented to the user would be:

    Error: execv: path should be string, bytes or os.PathLike,
    not NoneType

This change checks that which_string has returned successfully before
attempting to execute the result, resulting in a new error message:

    Error: No text editor found! Please set the VISUAL and/or EDITOR
    environment variable(s) to your preferred text editor.

It's not strictly necessary, but I've also changed try_exec to catch
all errors rather than just OSErrors. This would have provided slightly
more context for the original error message.
2022-07-07 17:08:15 +02:00
Stephen Sachs
626b239c96 [py-distributed] Add version 2022.2.1 (#31465) 2022-07-07 08:06:18 -07:00
Adam J. Stewart
211030cd19 py-pytorch-lightning: remove upper bounds on deps (#31443) 2022-07-07 17:05:33 +02:00
Stephen Sachs
3787f0c64c mpas-model: Overwrite compiler args in Makefile (#31431)
Use 8 byte reals only when `precision=double` is set

The pre-defined compilation targets do not follow the usual behavior of
Makefiles. Compiler flags are set as strings (not Makefile variables) and as
such are not able to be overridden by environment variables. This patch changes
the behavior to the expected behavior of a Makefile such that `fflags` etc have
the desired effect.

Co-authored-by: Stephen Sachs <stesachs@amazon.com>
2022-07-07 17:04:51 +02:00
Ryan Marcellino
be65e4471e speexdsp: add pkgconfig dependency (#31455) 2022-07-07 16:53:11 +02:00
Adam J. Stewart
8745009492 py-tensorboard: install from wheel (#31445) 2022-07-07 16:48:06 +02:00
Adam J. Stewart
7c5116a73a py-rasterio: add v1.3.0 (#31457) 2022-07-07 16:46:52 +02:00
Stephen Sachs
e6bdbde54e libzmq: fix issue with newer GCC and master branch (#31468)
Co-authored-by: Stephen Sachs <stesachs@amazon.com>
2022-07-07 08:45:37 -06:00
Adam J. Stewart
386f08c1b4 py-torch: re-add headers/libs properties (#31446) 2022-07-07 16:31:09 +02:00
Adam J. Stewart
9c437e2a10 py-torchgeo: tiff support required (#31447) 2022-07-07 16:30:18 +02:00
Marie Houillon
d393260a11 Fix conditional dependencies for openCARP (#31478) 2022-07-07 08:21:41 -06:00
Tamara Dahlgren
1b919d306f Documentation: Add SourceforgePackage to the build systems docs (#31473) 2022-07-07 14:30:22 +02:00
Stephen Sachs
ad95b0d01d [py-ipyparallel] setuptools.config.StaticModule moved (#31467)
* [py-ipyparallel] setuptools.config.StaticModule moved

... in py-setuptools@61

* [py-ipyparallel] setuptools fix only added to release 8.2.1

https://github.com/ipython/ipyparallel/pull/680

* [py-ipyparallel] Fix typo

Co-authored-by: Stephen Sachs <stesachs@amazon.com>
2022-07-07 03:17:36 -06:00
Vanessasaurus
6b1e86aecc removing feature bloat: monitor and analyzers (#31130)
Signed-off-by: vsoch <vsoch@users.noreply.github.com>

Co-authored-by: vsoch <vsoch@users.noreply.github.com>
2022-07-07 00:49:40 -06:00
Stephen Hudson
3338d536f6 libEnsemble: add v0.9.2 (#31471) 2022-07-06 19:14:12 -07:00
Erik Schnetter
6cbcc94fc9 kokkos: New version 3.6.01 (#31462) 2022-07-06 14:33:48 -06:00
Erik Schnetter
c7ac0b9aa6 spiner: New version 1.5.1 (#31461) 2022-07-06 14:21:53 -06:00
Adam J. Stewart
5efe0822b8 pip bootstrap packages: add myself as maintainer (#31448) 2022-07-06 14:05:42 -06:00
Kenny Weiss
5d97c816ca Minor typo fix in mfem's package (#31470)
Pointed out by @agcapps
2022-07-06 12:52:23 -07:00
Tamara Dahlgren
e68ed3268b Testing Bugfix: refactor clean --python-cache to support all (#31449)
There were two choices: 1) remove '-p' from '-a' or 2) allow monkeypatching
the cleaning of the python cache since clean's test_function_calls isn't
supposed to be actually cleaning anything.

This commit supports the latter and adds a test case for `-p`.
2022-07-06 11:44:41 -07:00
Weiqun Zhang
9a711e6ffa amrex: add v22.07 (#31464) 2022-07-06 11:13:44 -06:00
iarspider
fcea26ca23 Add checksum for py-lazy-object-proxy 1.7.0 and 1.7.1 (#31435)
* Add checksum for py-lazy-object-proxy 1.7.0 and 1.7.1

* Update package.py
2022-07-06 10:06:37 -07:00
iarspider
687cac3a79 Add checksum for py-pylint 2.14.4; py-astroid 2.11.5, 2.11.6 (#31436)
* Add checksums for astroid 2.11.5 and 2.11.6

* Add checksum for py-pylint 2.14.4

* Update package.py

* Add checksum for py-tomlkit 0.11.0
2022-07-06 09:58:35 -07:00
otsukay
d9f49d7415 add recipe for improved-rdock (#31158)
* add recipe for improved-rdock

* style: fix format

* style: fix format again

* Fix location of the directory

* Fix copyright

* Fix according to the reviewer's comments.

* Revert "Fix according to the reviewer's comments."

This reverts commit 4877877daf.

* Fix according to the reviewer's comments.

* style: fix format

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

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>

Co-authored-by: Yuichi Otsuka <otsukay@riken.jp>
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-07-06 09:25:45 -07:00
Erik Schnetter
ccb5432177 readline: New version 8.1.2 (#31025) 2022-07-06 16:32:12 +02:00
Mikael Simberg
dfb0c6c51d Add pika 0.6.0 (#31458) 2022-07-06 11:55:58 +02:00
Adam J. Stewart
8d1c723576 Bazel: new versions, patches, conflicts, and java version contraints (#31402) 2022-07-05 23:28:50 -05:00
Adam J. Stewart
8037c91403 py-libclang: add v13.0.0 (#31441) 2022-07-05 17:50:07 -07:00
Adam J. Stewart
30e5828f06 llvm-openmp: add v14.0.6 (#31440) 2022-07-05 17:11:00 -07:00
Mark W. Krentel
12fb842bea hpctoolkit: add variants for gtpin and opencl (#31439)
Reorder a few options to better group them by function.
2022-07-05 12:22:00 -07:00
Matthew LeGendre
37c9974755 Add adiak version 0.2.2 (#31438) 2022-07-05 13:05:51 -06:00
Luke Diorio-Toth
86a127788d Package/ont-guppy (#31417)
* guppy: new package

* adding different hashs/urls

* working now

* guppy: new package

* ont-guppy: new package

* ont-guppy: new package

* ont-guppy: fixed style
2022-07-05 10:46:58 -07:00
Annop Wongwathanarat
613362c42d armpl: Add new versions and rename package to armpl-gcc (#31437)
Co-authored-by: Annop Wongwathanarat <annop.wongwathanarat@arm.com>
2022-07-05 10:22:12 -07:00
Richard Berger
b7fb5dbb28 flecsi: exclude caliper versions that cause aborts with Legion (#31410) 2022-07-05 09:29:47 -06:00
Harmen Stoppels
dac31ef3c4 Remove fetch from depfile (#31433) 2022-07-05 14:48:32 +02:00
Alberto Invernizzi
bb3a663392 ROCmPackage: unify amdgpu_targets (#30582)
* unify amdgpu_targets for rocsolver and rocblas

* add more archs

* adapt all roc packages to unified amdgpu_targets
2022-07-05 14:33:30 +02:00
Valentin Volkl
d05ab36ff9 bdsim: add new package (#31384)
Co-authored-by: gganis <gerardo.ganis@cern.ch>
2022-07-05 12:30:15 +02:00
Jean-Paul Pelteret
f6d701ca26 deal.II: add v9.4.0 (#31279) 2022-07-05 11:40:28 +02:00
Paul R. C. Kent
ffcd9282b5 libcint: add v5.1.3 (#31340) 2022-07-05 11:34:59 +02:00
haralmha
28c5c3285a root: set gnuinstall to True (#31209) 2022-07-05 11:27:49 +02:00
Adam J. Stewart
6dc708670c py-torchgeo: latest version of torchvision won't work (#31372) 2022-07-05 11:21:31 +02:00
Marco De La Pierre
d71bbf036f lammps: add versions and packages Feb-Jun 2022 (#31369) 2022-07-05 11:14:28 +02:00
Mikael Simberg
8cf7241b64 Build llvm-amdgpu's libcxx with cmake --build (#31403)
CMAKE_GENERATOR may be set to something other than "Unix Makefiles" in
which case the build would fail because there is no Makefile for make to
build.
2022-07-05 10:52:52 +02:00
Adam J. Stewart
f932a832ac node-js: fix build on macOS 12 (#31408) 2022-07-05 10:42:14 +02:00
Cory Bloor
a183b343b9 rocalution: add spack build test (#31415)
- rocprim is a header-only library; its amdgpu_target variant is only
  meaningful for its client executables, not the library itself
- comgr and llvm-amdgpu are merely indirect dependencies (via hip)
2022-07-05 10:02:46 +02:00
Paul R. C. Kent
08fa0c9d46 pyscf: add v2.0.1 (#31342) 2022-07-05 09:14:06 +02:00
Sergey Kosukhin
0b3a409746 nag: fix installation of man pages (#31428) 2022-07-05 09:10:45 +02:00
Marco Feder
18ab94de4b cgal: add v5.1.5 (#31429) 2022-07-05 09:10:03 +02:00
Moritz Kern
f217ca2059 py-elephant: add versions up to v0.11.1 (#30613)
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-07-05 08:59:34 +02:00
Barry Rountree
ac5fd8fa35 util-linux-uuid: Fix icc build issue (#31312) 2022-07-04 16:11:35 +02:00
Glenn Johnson
2eddf8a78d highfive: Add version 2.4.1 (#31288) 2022-07-03 14:06:41 -05:00
Adam J. Stewart
5b4927a3de py-pillow: add v9.2.0 (#31409) 2022-07-01 18:53:33 -06:00
Wouter Deconinck
d068b59856 acts: new version 19.3.0 (#31272)
* acts: new version 19.3.0

* acts: new variants +profilecpu, +profilemem
2022-07-01 13:06:55 -07:00
Adam J. Stewart
f2789fa5c5 py-cartopy: add v0.20.3 (#31354)
* py-cartopy: add v0.20.3

* Add py-setuptools-scm 7.0.3
2022-07-01 13:05:14 -07:00
Paul R. C. Kent
f5b0e264fc Add xcfun 2.1.0 (#31336)
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-07-01 13:00:53 -07:00
Paul R. C. Kent
1f696951e7 Add 5.2.3 (#31337) 2022-07-01 12:59:50 -07:00
Erik Schnetter
2508aa1ab4 ninja: New version 1.11.0 (#31400) 2022-07-01 13:57:46 -06:00
Jonathan R. Madsen
eed265f593 Initial implementation of Omnitrace package (#31381)
* Initial implementation of Omnitrace package

* Fix flake8 errors

* Fix run environment when +python

* String normalization and fix for build env when +tau

* Tweak to style
2022-07-01 12:53:33 -07:00
Simon Pintarelli
bc215c7504 qmcpack pass cuda_arch correctly to cmake (#31407)
Fix compilation of @3.14.0+cuda  (didn't check older versions).
2022-07-01 12:39:50 -07:00
Scott Wittenburg
87b8321fa9 gitlab: Fix pipeline generation for non-develop protected pipelines (#31378)
Release branches and tags run protected pipelines, and we noticed
that those pipelines were generating all jobs in the stack, even
when the mirror contained all the built specs and an up to date
index.  The problem was caused because the override mirror was
not present in spacks mirror configuration at the time when the
binary_distribution.update() method was called.  This fixes that
by always adding the mirror override, if present, to the list of
configured mirrors.
2022-07-01 11:56:36 -07:00
WuK
8b4de69f6a py-altair: new package (#31386)
* py-altair: new package

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

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

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

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

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

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

* py-altair: update

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

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-07-01 10:46:35 -07:00
Harmen Stoppels
3e85d3fd03 bat, hyperfine, ripgrep: Bump versions (#31364) 2022-07-01 08:49:57 +02:00
Brian Van Essen
06f4f43915 New package: NVIDIA cuTensor (#31397) 2022-06-30 22:37:47 -07:00
Richard Berger
4a6b447465 New package: bueno (#31374) 2022-06-30 22:32:30 -07:00
Max Zeyen
43654078fc boost: do not add the context-impl option for version below 1.65.0 (#30719)
* boost: do not access the context-impl variant for versions below 1.65.0

* boost: check if spec.variants contains context-impl

* boost: improve error message when the context-impl variant causes a conflict

Executing spack solve boost@1.63.0 +context context-impl=fcontext
triggers the following error message:
==> Error: No version for 'boost' satisfies '@1.63.0' and '@1.79.0'

With this change, the error message becomes the following:
==> Error: Cannot set variant 'context-impl' for package 'boost' because the variant condition cannot be satisfied for the given spec
2022-06-30 19:27:38 -07:00
Erik Schnetter
8cd542529a libcxxwrap-julia: New version 0.9.1 (#31392) 2022-06-30 17:01:42 -07:00
Scott Wittenburg
861edcf996 gitlab: Fix mirror url to match stack name (#31399)
We adopted the convention of putting binaries for each stack into
a dedicated mirror named after the directory in which the stack
(spack.yaml file) resides.  This fixes the mirror url of the
radiuss-aws-aarch64 stack to follow that convention.
2022-06-30 15:38:58 -07:00
Luke Diorio-Toth
60c533b80b py-cmseq: new package (#31375)
* py-cmseq: new package

* py-cmseq: fixed copyright year

* py-cmseq: changed download to pi, added deps
2022-06-30 10:58:12 -07:00
Mikael Simberg
60d94f2782 Add tracy 0.8.2 (#31385) 2022-06-30 10:55:00 -07:00
Stephen Sachs
8e591f058e [mpas-model] Add optional make_target and precision variants (#31388)
`make_target` can be used to instruct Spack to build one of the pre-defined make
targets in the MPAS makefile. Spack will guess the targret based on the value of
`spack_fc`, but the user can overwrite the target as variant. E.g.
```
spack install mpas-model make_target=pgi-nersc
```

`precision` is used to set the `PRECISION` flag in the Makefile to {single,
double}. Default is double.

Co-authored-by: Stephen Sachs <stesachs@amazon.com>
2022-06-30 10:52:33 -07:00
Stephen Sachs
4397ec6a48 [mpas-model] Add new versions (#31390)
Co-authored-by: Stephen Sachs <stesachs@amazon.com>
2022-06-30 10:50:32 -07:00
Jack Morrison
cbce77b3d9 SOS: Update to include version 1.5.1 (#31394) 2022-06-30 10:26:34 -07:00
Marco De La Pierre
03843db00f plumed: added fine grained control over optional modules (#29743) 2022-06-30 16:23:27 +02:00
Stephen Sachs
e046dc3ca4 lammps: compiler flags for Intel compiler on AMD zen+ procs (#31183)
Co-authored-by: Stephen Sachs <stesachs@amazon.com>
2022-06-30 07:25:41 -06:00
Stephen Sachs
eec78f7702 lammps: fix sha256 of patch_20201029 (#31177)
Co-authored-by: Stephen Sachs <stesachs@amazon.com>
2022-06-30 15:21:12 +02:00
Adam J. Stewart
abd6241978 py-torchmetrics: add v0.9.2 (#31382) 2022-06-30 09:05:20 +02:00
Adam J. Stewart
eb6564bc33 py-laspy: add v2.2.0 (#31383) 2022-06-30 09:05:04 +02:00
Peter Scheibel
abeee9e1fd Cray manifest: compiler duplicates (#31173)
* remove unhelpful comment
* Filter compiler duplicates while reading manifest
* more-specific version matching edited to use module-specific version (to avoid an issue where a user might add a compiler with the same version to the initial test configuration
2022-06-29 17:05:29 -07:00
WuK
ec89ab1c27 cutlass: new package (#31379)
* cutlass: new package

* cutlass: fix ci

* cutlass: remove `join_path`

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>

* cutlass: adding a message for cuda_arch

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>

* cutlass: simplify cmake_args

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>

* cutlass: fix cmake_args

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-06-29 16:39:39 -07:00
Glenn Horton-Smith
e6678e5f12 New packages: EPICS (Experimental Physics and Industrial Control System) (#28270) 2022-06-29 13:36:48 -07:00
Glenn Johnson
b200c57739 Set R_LIBS_USER='' in dependent build environment (#31287)
* Set R_LIBS_USER='' in dependent build environment

Despite R packages being installed with the --vanilla flag, which
ignores Rprofile and Renviron files, R will still set R_LIBS_USER if the
default directory exists. This could lead to pulling in packages from
that directory during the build which could cause the build to fail. To
avoid that, explicitly set R_LIB_USER='' to ensure that packages from
the HOME/R directory are not in the library path.

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

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-06-29 14:14:21 -06:00
Harmen Stoppels
814418db35 file: 5.41 5.42 (#31367) 2022-06-29 20:59:49 +02:00
Davide
53001cc28c Allow building octave w/ Intel compiler (#31346) 2022-06-29 11:55:39 -07:00
Adam J. Stewart
93c16f1ee3 PythonPackage: add default libs/headers attributes (#28527)
* PythonPackage: add default libs/headers attributes

* Style fix

* libs and headers should be properties

* Check both platlib and include

* Fix variable reference
2022-06-29 11:55:24 -07:00
Satish Balay
7bacde16e4 petsc, py-petsc4py: add 3.17.3 (#31356) 2022-06-29 11:51:45 -07:00
Harmen Stoppels
44d9931cdd git: 2.37.0 (#31370) 2022-06-29 20:06:01 +02:00
Nadir Román Guerrero
54b7df0bfa Adds py-websockets 10.3 (#31363) 2022-06-29 17:58:46 +00:00
Harmen Stoppels
ee680567a5 ccache: 4.6.x (#31371) 2022-06-29 10:43:42 -07:00
Sam Gillingham
6a1bbc1658 kealib: add version 1.4.15 (#31355) 2022-06-29 08:24:23 -07:00
Harmen Stoppels
6f3e61b179 vim: add v9.0.0000 (#31365) 2022-06-29 16:36:14 +02:00
Luke Diorio-Toth
a9c246ed67 amrfinder: new package (#31273) 2022-06-29 15:40:03 +02:00
Massimiliano Culpo
557abe04ec Update containerize templates to account for view indirection (#31321)
fixes #30965
2022-06-29 15:39:18 +02:00
Marco De La Pierre
58b144c0da Modify dockerfile template, so that any command can be executed (#29741) 2022-06-29 12:02:24 +00:00
Harmen Stoppels
768d3504dd tree: 2.0.2 (#31362) 2022-06-29 13:06:38 +02:00
Richard Berger
a98806bd9b new package: py-lark to replace py-lark-parser, add new versions (#31324)
* new package: py-lark to replace py-lark-parser

* update packages that need py-lark-parser and use py-lark instead
2022-06-28 22:45:30 -07:00
Wileam Y. Phan
ebf0f6281d Add version 2.0.2 (#31339) 2022-06-28 19:21:45 -07:00
Chris White
0de44a20f6 py-ats: Add new version (#31350)
* add new py-ats version

* fix copyright date
2022-06-29 01:22:09 +00:00
Chris White
62cac911e0 set CMAKE_CUDA_ARCHITECTURES for newer cmakes in camp (#31333) 2022-06-28 18:45:45 -06:00
Pranith
8bdc506579 emacs: Add option to install version 28.1 (#31348) 2022-06-28 17:30:16 -07:00
Adam J. Stewart
52eaedfca2 Add py-torch v1.12, py-torchvision v0.13 (#31335)
* Add py-torch v1.12, py-torchvision v0.13

* Style fix
2022-06-28 13:57:09 -07:00
Adam J. Stewart
5f5d6a84dc libxml2: add command property (#31296) 2022-06-28 13:29:48 -06:00
David Beckingsale
170c605d6a AWS RADIUSS builds (#31114)
* Add AWS RADIUSS builds

* Correct variable naming

* Add two more MFEM specs

* Updates to MFEM spec suggested by @v-dobrev

* Simplify MFEM specs
2022-06-28 12:15:53 -07:00
Marco De La Pierre
38dfec42b7 Update/lammps package: new variants for refactoring of code modules (#29788)
* lammps package: kokkos variant, add support for cray-fftw

* lammps package: added bugfix version 20210929.3

* lammps package: added packages molfile, plugin, user-brownian

* lammps package: package refactor at versions 20210702 and 20210728

* lammps package: fix for ml-iap variant

* lammps package: fix for conflicts of dielectric variant

* lammps package: edits for flake8 layout compliance
2022-06-28 11:22:35 -07:00
haralmha
24048e3be7 herwig3: Add version 7.2.3 and update dependency versions (thepeg and lhapdf) (#31329) 2022-06-28 10:43:16 -07:00
Michael Kuhn
f1d8b711ed gcc: add 10.4.0 (#31332) 2022-06-28 10:42:11 -07:00
genric
ee21873616 py-luigi: add v3.1.0; py-tenacity: add v8.0.1 (#31320) 2022-06-28 07:37:24 -07:00
Moritz Kern
ba6f4b3f8b Neo update (#31316) 2022-06-28 07:36:49 -07:00
Erik Schnetter
e5ceb68850 openssl: New version 1.1.1p (#31266) 2022-06-28 08:17:54 -06:00
Adam J. Stewart
505bcc5aba curl: add command property (#31293) 2022-06-28 08:01:42 -06:00
Harmen Stoppels
33fee003b8 julia: 1.8.0-rc1 (#31064) 2022-06-28 13:24:06 +02:00
Adam J. Stewart
1dfdaa1025 c-blosc: add libs property (#31290) 2022-06-28 03:49:44 -06:00
Jonathon Anderson
a8d0ef43fa krb5: Add build dependency on diffutils (#31258) 2022-06-28 11:40:05 +02:00
Valentin Volkl
f948ec07cc feynhiggs: add hep tag (#31325)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-06-28 11:05:29 +02:00
Mikael Simberg
2943d53115 mimalloc: rework package recipe, add variants (#31262) 2022-06-28 10:51:20 +02:00
Valentin Volkl
99bfd7059e ampt: add new package (#31307)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-06-28 08:46:33 +00:00
Brecht Machiels
129880d2ed Midnight Commander: add v4.8.28 (#31313)
Also, fix a build issue.
2022-06-28 02:33:48 -06:00
Wouter Deconinck
8f7f96ae2b oneAPI supports cxx17_flag and cxx20_flag (#31274) 2022-06-28 10:33:19 +02:00
Adam J. Stewart
15f736e104 rapidjson: fix Apple M1 build (#31291) 2022-06-28 02:29:46 -06:00
Adam J. Stewart
8f3aa27e25 oracle-instant-client: add macOS conflict (#31301) 2022-06-28 02:21:37 -06:00
Adam J. Stewart
cd54a3e908 py-black: add v22.6.0 (#31328) 2022-06-28 02:01:43 -06:00
Brian Van Essen
8965d8f661 lbann, aluminum, hydrogen,dihydrogen: explicit flags to pass the AMD GPU architecture into CMake (#31326) 2022-06-28 09:45:00 +02:00
Adam J. Stewart
899dfdb416 grass: add v8.2.0 (#31303) 2022-06-28 09:33:57 +02:00
Adam J. Stewart
24a03e5a50 libkml: add libs property (#31299) 2022-06-28 09:33:23 +02:00
Adam J. Stewart
662d5066f1 sfcgal: add command property (#31298) 2022-06-28 09:33:01 +02:00
Adam J. Stewart
616d7454fc geos: add command property (#31294) 2022-06-28 09:32:41 +02:00
Adam J. Stewart
2683040c09 mysql: add v8.0.29, command, libs (#31300) 2022-06-28 00:09:52 -06:00
Adam J. Stewart
63b33403db kealib: add command property (#31295)
* kealib: add command property

* Correct exe name on Windows
2022-06-28 00:06:09 -06:00
Adam J. Stewart
6a5bec8d43 Java extensions: jdk -> openjdk (#31289) 2022-06-28 00:05:55 -06:00
Adam J. Stewart
7dba08bd83 thrift: add v0.16.0 (#31302) 2022-06-28 00:05:00 -06:00
Adam J. Stewart
c533bbdfb0 unixodbc: add libs property (#31304) 2022-06-28 00:04:41 -06:00
Adam J. Stewart
4f203eb50f postgresql: add command property (#31297) 2022-06-28 00:04:26 -06:00
Luke Diorio-Toth
f6d4000e58 py-unicycler: added new versions and fixed dependencies (#31327) 2022-06-27 22:45:14 -07:00
Jen Herting
c5fc16ddd7 New package: py-aiocontextvars (#30815)
* [py-aiocontextvars] New package

* [py-aiocontextvars] Added types

* [py-aiocontextvars]

- removed test dependencies
- flake8

* [py-aiocontextvars] fixed dependency types

* [py-aiocontextvars] spack -> spack.package

* [py-aiocontextvars] depends on setuptools

Co-authored-by: James A Zilberman <jazrc@rit.edu>
2022-06-27 19:09:18 -07:00
Greg Becker
df44045fdb Feature: use git branches/tags as versions (#31200)
Building on #24639, this allows versions to be prefixed by `git.`. If a version begins `git.`, it is treated as a git ref, and handled as git commits are starting in the referenced PR.

An exception is made for versions that are `git.develop`, `git.main`, `git.master`, `git.head`, or `git.trunk`. Those are assumed to be greater than all other versions, as those prefixed strings are in other contexts.
2022-06-28 01:54:41 +00:00
iarspider
7dd2ca0207 Sherpa: add libs (shared, static, both) variant (#31318)
* Sherpa: add libs (shared, static, both) variant

* PEP-8
2022-06-27 18:09:45 -06:00
Max Zeyen
7aedf9da37 gpi-space: add new version (#31319)
* gpi-space: add new version

* gpi-space: update copyright year
2022-06-27 18:05:46 -06:00
Paul R. C. Kent
5b627a9353 llvm: add 14.0.6 (#31310) 2022-06-27 17:37:58 -06:00
Sergey Kosukhin
7fc68240fe oneapi-* packages: improve use with modules (#30981)
This commit adds some changes which improve use of Spack-installed
oneAPI packages with Spack-generated modules, but not within Spack
(e.g. if you install some of these packages with Spack, then load
their associated modules to build other packages outside of Spack).

The majority of the PR diff is refactoring. The functional changes
are:

* intel-oneapi-mkl:
  * setup_run_environment: update Intel compiler flags to RPATH the
    mkl libs
* intel-oneapi-compilers: update the compiler configuration to RPATH
  libraries installed by this package (note that Spack already handled
  this when installing dependent packages with Spack, but this is
  specifically to use the intel-oneapi-compilers package outside
  of Spack). Specifically:
  * inject_rpaths: this modifies the binaries installed as part of
    the intel-oneapi-compilers package to RPATH libraries provided
    by this package
  * extend_config_flags: this instructs the compiler executables
    provided by this package to RPATH those same libraries

Refactoring includes:

* intel-oneapi-compilers: in addition to the functional changes,
  a large portion of this diff is reorganizing the creation of
  resources/archives downloaded for the install
* The base oneAPI package renamed component_path, so several packages
  changed as a result:
  * intel-oneapi-dpl
  * intel-oneapi-dnn
  * extrae
* intel-oneapi-mpi:
  * Perform file filtering in one pass rather than two
2022-06-27 16:34:15 -07:00
Valentin Volkl
614a014948 feynhiggs: add new package (#31306)
* feynhiggs: add new package

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

* Update var/spack/repos/builtin/packages/feynhiggs/package.py
2022-06-27 21:08:02 +00:00
Peter Scheibel
f7ef064bdc spack external find: handle manifest with bad permissions (#31201)
Allow `spack external find` (with no extra args) to proceed if the manifest file exists but
without sufficient permissions; in that case, print a warning. Also add a test for that behavior.

TODOs:

- [x] continue past any exception raised during manifest parsing as part of `spack external find`, 
      except for CTRL-C (and other errors that indicate immediate program termination)
- [x] Semi-unrelated but came up when discussing this with the user who reported this issue to
      me: the manifest parser now accepts older schemas 

See: https://github.com/spack/spack/issues/31191
2022-06-27 19:26:12 +00:00
Mark Olesen
0080f6b7a5 openfoam: v2206 release. v2106/2012/2006/1912 patched to 202220610 (#31317)
Co-authored-by: Mark Olesen <Mark.Olesen@esi-group.com>
2022-06-27 13:17:36 -06:00
Pariksheet Nanda
0471c1ad5d ioapi: adapt to upstream's build system changes (#28247) (#31149)
Co-authored-by: Pariksheet Nanda <pnanda@necrosis.micro.med.umich.edu>
2022-06-27 11:28:46 -07:00
sayefsakin
1ba4ea5f20 cuda 11 support for hiop (#31282)
Co-authored-by: Sayef Azad Sakin <ssakin@moonshot.cels.anl.gov>
2022-06-27 11:24:07 -07:00
Jen Herting
8be7257990 [sratoolkit] added version 3.0.0 (#31322) 2022-06-27 17:40:20 +00:00
Adam J. Stewart
6628272765 openexr: add v3.1.5, CMake support (#31292) 2022-06-27 11:09:35 -06:00
Adam J. Stewart
78882c5569 brunsli: add new package (#31240) 2022-06-27 18:44:03 +02:00
Adam J. Stewart
7bce92ad46 HDF: fix build with Apple Clang (#31235) 2022-06-27 18:37:13 +02:00
Adam J. Stewart
a6b0de3beb py-torch: add M1 GPU support (#31283) 2022-06-27 18:21:49 +02:00
Massimiliano Culpo
11d71ca85e Rename os_facts.lp to os_compatibility.lp (#31206)
Follow-up from #31170
2022-06-27 09:15:25 -07:00
Harmen Stoppels
5698846619 Fix pigz%nvhpc build (#31227)
nvc doesn't know this flag: `-Wno-unknown-pragmas`, it doesn't hurt to
remove the specific warning flags, from:

```
-O3 -Wall -Wextra -Wno-unknown-pragmas -Wcast-qual
```

to:

```
-O3 -Wall
```
2022-06-27 14:41:40 +02:00
Luke Diorio-Toth
f09f834a8f py-gtdbtk and fastani: new packages (#31268) 2022-06-24 07:49:07 -07:00
Cody Balos
147f39d7aa Fix typo in documentation note about concretizer:unify (#31246) 2022-06-24 11:31:43 +02:00
Adam J. Stewart
9fad3ed5f1 giflib: fix macOS build (#31234) 2022-06-24 11:28:44 +02:00
Adam J. Stewart
1375b1975b librttopo: add missing Autotools deps (#31252) 2022-06-24 11:28:12 +02:00
Adam J. Stewart
c533612ab6 sfcgal: fix boost build issues (#31254) 2022-06-24 10:22:56 +02:00
Adam J. Stewart
e5cc3c51d1 py-numpy: add v1.23.0 (#31250) 2022-06-24 10:20:04 +02:00
Massimiliano Culpo
70650cacbd ASP-based solver: rescale target weights so that 0 is always the best score (#31226)
fixes #30997

Instead of giving a penalty of 30 to all nodes when preferences
are not package specific, give a penalty of 100 to all targets
of a node where we have package specific preferences, if the target
is not explicitly preferred.
2022-06-23 23:33:36 -07:00
Brian Van Essen
d8a5638d9f Fixed the range on Catch2 to avoid v3.x (#31242) 2022-06-23 16:10:27 -07:00
Luke Diorio-Toth
158f6ddb14 py-instrain: adding new package (#31244)
* py-instrain: adding new package

* py-instrain: fixed style

* removed unnecessary setuptools and numba version restrictions

* fixed pandas version
2022-06-23 22:58:45 +00:00
haralmha
86d1a6f2fc hadoop-xrootd: Add clang conflict (#31215)
* hadoop-xrootd: Add clang conflict

* Flake8

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-06-23 16:45:39 -06:00
Mikael Simberg
ca10ff1649 Allow using mimalloc 2 in pika and HPX (#31260) 2022-06-23 15:33:03 -07:00
Adam J. Stewart
19175b9bab keyutils: add macOS conflict (#31236) 2022-06-23 16:13:37 -06:00
Richard Berger
7d64a8e81f add charliecloud 0.27 and fix master install (#31247)
* charliecloud: custom autoreconf and require py-pip and py-wheel for master

* charliecloud: add 0.27

* charliecloud: add minimum py-pip version
2022-06-23 15:03:03 -07:00
Adam J. Stewart
a0b68a0baa rpcsvc-proto: add v1.4.3 (#31253) 2022-06-23 14:59:55 -07:00
Harmen Stoppels
b7e0692dfa libfuse: 3.11.0 (#31259) 2022-06-23 14:55:47 -07:00
Maciej Wójcik
8cc62ef916 Add some GROMACS versions (#31264)
* gromacs: add recent version

* gromacs-swaxs: add recent versions

* gromacs-chain-coordinate: add recent version
2022-06-23 14:53:32 -07:00
Stephen Sachs
2363aba710 [lammps] Rename master -> develop branch (#31263)
https://github.com/lammps/lammps/pull/3311

Co-authored-by: Stephen Sachs <stesachs@amazon.com>
2022-06-23 14:40:55 -07:00
Weston Ortiz
5a0c56229c goma: update package with new version and options (#31267) 2022-06-23 14:10:14 -07:00
AMD Toolchain Support
96bb72e412 Updated sha256 value for amdlibflame (#31269) 2022-06-23 14:07:09 -07:00
Adam J. Stewart
7c977733f1 py-pandas: add v1.4.3 (#31270) 2022-06-23 14:05:49 -07:00
Brian Van Essen
d48a760837 Add the rocm tag to packages from the Radeon Open Compute Platform. (#31187)
* Add the rocm tag to packages from the Radeon Open Compute Platform.

* Added more packages from the ROCm software distribution based on
reviewer feedback.

* Updated tags based on reviewer feedback
2022-06-23 09:10:01 -07:00
Brian Van Essen
c64298a183 Enable MVAPICH2 to use the mpichversion executable to detect externals (#31245)
This is an an alternative to mpiname.
2022-06-23 07:41:25 +02:00
Ben Boeckel
31d89e80bc protobuf: add 21.1 (#31249)
Older versions have compile errors under newer compilers (e.g., gcc-12).
2022-06-22 19:33:54 -06:00
Luke Diorio-Toth
2844f1fc45 added racon conflict with new versions of gcc (#31243) 2022-06-22 18:00:27 -07:00
Vicente Bolea
8b85f8ec58 vtk-m: change smoke test (#29113) 2022-06-22 18:58:03 -06:00
eugeneswalker
7ef52acfce relocation: x-pie-executable needs relocation (#31248) 2022-06-22 23:55:28 +00:00
Nicholas Sly
c3fecfb103 Add --disable-wrapper-runpath to openmpi when ~wrapper-rpath to avoid build time error. (#31221)
Co-authored-by: Nicholas Cameron Sly <sly1@rzalastor2.llnl.gov>
2022-06-22 16:57:55 -06:00
Adam J. Stewart
ef278c601c spack create: fix for no URL (#31239) 2022-06-22 18:45:03 +00:00
JeromeDuboisPro
5e9a8d27f7 add first version of py-pyrr package (#31211)
* add first version of py-pyrr package

* added license

* update license HEADER

* Remove preferred as there is only one version available

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

* Better specify dependency type

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

* remove useless variable license

Co-authored-by: Jérôme Dubois <jerome.dubois@cea.fr>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-06-22 10:36:49 -07:00
Manuela Kuhn
ffc90f944c py-bids-validator: add 1.9.4 (#31230) 2022-06-22 10:35:57 -07:00
Harmen Stoppels
699c0cf9a0 squashfs-mount: new package (#31225) 2022-06-22 14:31:20 +02:00
Massimiliano Culpo
55cac3b098 Remove update functions used to ease the transition in v0.16 (#31216) 2022-06-22 11:15:57 +02:00
Tamara Dahlgren
35d07a6f18 Add missing '?full_index=1' to meson 9850.patch URL (#31222)
* Add missing '?full_index=1' to meson 9850.patch URL

* Correct checksum

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

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-06-22 08:56:49 +02:00
Adam J. Stewart
1f42a5e598 py-geopandas: add v0.11.0 (#31218) 2022-06-21 18:14:04 -07:00
Adam J. Stewart
967463432b py-shapely: env vars always needed (#31217) 2022-06-21 18:11:36 -07:00
Howard Pritchard
bc03b5caaf meson: fix to recognize intel oneapi compiler (#30605)
Signed-off-by: Howard Pritchard <howardp@lanl.gov>
2022-06-21 10:47:46 -07:00
Massimiliano Culpo
649760dc1a Canonicalize positional argument to spack bootstrap mirror (#31180)
fixes #31139
2022-06-21 19:25:01 +02:00
Adam J. Stewart
77118427b1 grep: add +pcre variant (#31204) 2022-06-21 10:06:42 -07:00
haralmha
1a024963a2 frontier-client: Add openssl and zlib directories to search path (#31212) 2022-06-21 09:38:24 -07:00
Massimiliano Culpo
aebb601b70 Stricter compatibility rules for OS and compiler when reusing specs (#31170)
* Stricter compatibility rules for OS and compiler when reusing specs
* Add unit test
2022-06-20 17:32:13 -07:00
Robert Cohn
d95f53e1ac New (external-only) package: oneapi-igc (#31045) 2022-06-20 13:38:41 -07:00
Christian Goll
0fe57962b3 OpenSUSE Tumbleweed: use GLIBC version as distro version (#19895)
Tumbleweed is a rolling release that would have used a date 
as a version instead.
2022-06-20 22:20:31 +02:00
Massimiliano Culpo
8ec451aa7d setuptools: add v62.4.0 (#31112) 2022-06-20 08:59:58 -07:00
Stephen Sachs
14349cb882 lammps: add lammps_sizes variant (#31182)
This is translated to CMakes LAMMS_SIZES variable. Used to select integer sizes.

Co-authored-by: Stephen Sachs <stesachs@amazon.com>
2022-06-20 09:39:03 +00:00
Pariksheet Nanda
bc438ed4e9 ome-files-cpp: add v0.6.0 (#31156) 2022-06-20 10:16:21 +02:00
Sam Broderick
760a12c440 Fix request for bzip2, since bzip was pulled due to patent issues (#31198) 2022-06-20 08:13:20 +00:00
Adam J. Stewart
9325c8e53f py-tensorboard-data-server: fix build on Apple M1 (#30908) 2022-06-20 10:12:32 +02:00
HELICS-bot
fd5b7d6cce helics: add v3.2.1 (#31190)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-20 09:54:57 +02:00
Cory Bloor
b19a0744f1 rocm: add master and develop to BLAS and SOLVER (#30273) 2022-06-20 09:52:47 +02:00
Sebastian Ehlert
75d0c0dff7 fpm: add v0.6.0 (#31193) 2022-06-20 09:49:21 +02:00
Adam J. Stewart
aedc41c3a0 texlive: fix and deprecate live version (#31195) 2022-06-20 09:44:36 +02:00
Valentin Churavy
1f39d6d916 Julia: add v1.7.3 (#31196) 2022-06-20 09:41:50 +02:00
Ye Luo
1bc3b0a926 quantum-espresso: Add 7.1 (#31192) 2022-06-18 23:32:28 +02:00
Ryan Marcellino
62596fb796 py-f90wrap: new version (#31174) 2022-06-17 17:09:34 -06:00
Brian Van Essen
15c35a3cff Bugfix external find --all for libraries (#31186)
* Fixed a bug in the 'external find --all' command where the call failed
to find packages by both executable and library. The bug was that the
call `path.all_packages()` incorrectly turned the variable
`packages_to_check` into a generator rather than keeping it a list.
Thus the second call to `detection.by_library` had no work to do.

* Fixed the help message for the find external and compiler commands as
well as others that used the `scopes_metavar` field to define where
the results should be stored in configuration space.  Specifically,
the fact that configuration could be added to the environment was not
mentioned in the help message.
2022-06-17 21:52:06 +00:00
Brian Van Essen
249c90f909 Added the ecp and radiuss tags to the LBANN software stack packages. (#31188) 2022-06-17 21:25:50 +00:00
Kyle Gerheiser
043b2cbb7c Fix external compiler detection for MPICH and OpenMPI (#30875)
os.path.dirname was being used to compare compilers. If two compilers
are in the same directory then it will pick up the first one it encounters.

Compare the full compiler path instead.
2022-06-17 14:01:49 -06:00
Bernhard Kaindl
aedf215b90 openssh: don't suid-install ssh-keysign (not used by default) (#31083) 2022-06-17 12:09:52 -06:00
Mikhail Titov
eed4a63be7 rct: update packages (RE, RG, RP, RS, RU) with new versions (#31172) 2022-06-17 10:44:22 -07:00
Massimiliano Culpo
13b609b4b6 docs: quote string to show valid YAML (#31178)
fixes #31167
2022-06-17 18:25:52 +02:00
Chuck Atkins
85dc20cb55 Spec: Add a new virtual-customizable home attribute (#30917)
* Spec: Add a new virtual-customizable home attribute

* java: Use the new builtin home attribute

* python: Use the new builtin home attribute
2022-06-17 10:29:08 -04:00
Massimiliano Culpo
667c39987c py-setuptools: install setuptools from wheels directly (#31131)
When installing setuptools from sources in Spack, we might
get into weird failures due to the way we use pip.

In particular, for Spack it's necessary to install in a
non-isolated pip environment to allow using PYTHONPATH as a
selection method for all the build requirements of a
Python package.

This can fail when installing setuptools since there might
be a setuptools version already installed for the Python
interpreter being used, with different entry points than
the one we want to install.

Installing from wheels both pip and setuptools should
harden our installation procedure in the context of:
- Bootstrapping Python dependencies of Spack
- Using external Python packages
2022-06-17 10:42:28 +02:00
Cyrus Harrison
f35d8c4102 vtk-h: use cmake base pkg, overhaul recipe (#28898)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-06-17 09:59:57 +02:00
Sreenivasa Murthy Kolam
6ac3186132 Support 'spack external find' for rocm packages (#30792) 2022-06-17 09:34:49 +02:00
Robert Cohn
466572dc14 Update Intel package descriptions (#31150) 2022-06-17 09:23:40 +02:00
Harmen Stoppels
1c0bf12e5b openssl package: default to mozilla certs (#31164)
On Cray systems that use Cray Data Virtualization Service (DVS),
symlinks across filesystems are not allowed, either due to a bug, or
because they're simply not POSIX compliant [1].

Spack's OpenSSL package defaults to `certs=system` which comes down to
symlinking `/etc/ssl` in the Spack install prefix, triggering this
problem, resulting in mysterious installation failures.

Instead of relying on system certs, we can just use
`ca-certificates-mozilla`, and if users really need system certs, then
they're probably better off marking OpenSSL entirely as external.

[1] https://github.com/glennklockwood/cray-dvs
2022-06-16 23:25:32 -06:00
Adam J. Stewart
bf990bc8ec py-sphinx: add v5, maintainer (#31171) 2022-06-16 20:41:31 -06:00
Massimiliano Culpo
267358a799 ASP-based solver: fix rules on version weights selection (#31153)
* ASP: sort and deduplicate version weights from installed specs

* Pick version weights according to provenance

* Add unit test
2022-06-16 14:17:40 -07:00
Peter Scheibel
392b548312 Manifest parsing: avoid irrelevant files (#31144)
* Manifest directory may not contain manifest files: exclude non-manifest files
* Manifest files use different name for rocmcc: add translation for it
2022-06-16 15:16:48 -05:00
Elizabeth Sherrock
8c3b82c140 New packages: py-ford and dependencies (#31107)
* Created package and added description

* Add py-markdown-include

* Created package

* Finished creating package

* Added py-md-environ

* Added build dependencies

* Added other deps

* Add python-markdown-math (#4)

* Created package and started to add info

* Removed unneeded global/install options

* Figured out version spec for markdown-math

* Removed type=build from unnecessary dependencies

* Removed unneeded install/global options, added version spec to dependency

* Added wscullin as interim maintainer for packages

* Fixed style issues

* Took care of trailing whitespace

* Removed comment line before imports

* Changed file charset to match other packages

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

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

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

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

* Removed test dependency after review feedback

* Added new 6.1.12 version to py-ford

Co-authored-by: Seth R. Johnson <johnsonsr@ornl.gov>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-06-16 12:14:40 -07:00
Qian Jianhua
2e4b533420 rpcsvc-proto: add 'cpp' path for rpcgen (#31157) 2022-06-16 18:24:28 +00:00
Mark Abraham
3b393fe0eb Add LevelZero variant to hwloc package (#31161)
* Add LevelZero variant to hwloc package

This permits the hwloc package to build with with support for the
Intel Level Zero low-level layer, analogous to CUDA, ROCm, and OpenCL.

* Fix typo
2022-06-16 12:21:36 -06:00
Massimiliano Culpo
895ceeda38 concretize.lp: impose a lower bound on the number of version facts if a solution exists (#31142)
* concretize.lp: impose a lower bound on the number of version facts if a valid version exists

fixes #30864

* Add a unit test
2022-06-16 09:25:56 -07:00
Satish Balay
6f1e3a4ad3 xsdk-examples: use 'parallel=False' with tests - as they may fail with a large '-j'[when used with +cuda] (#31138) 2022-06-16 07:50:45 -07:00
iarspider
ce41b7457b Xerces-C: Add option to disable transcoder (#31162)
* Xerces-C: Add option to disable transcoder

* Update package.py

* Apply suggestion from review

* Flake-8
2022-06-16 10:40:03 -04:00
G-Ragghianti
4f9f56630b slate, blaspp, lapackpp: new versions (#31147)
* Adding new release for slate, blaspp, and lapackpp

* Setting release tar file hashes

* New slate release
2022-06-16 08:09:42 -04:00
Rob Falgout
e216ba1520 hypre: new version 2.25.0 (#31146) 2022-06-16 08:07:30 -04:00
Massimiliano Culpo
4fd5ee1d9d CI: test binary bootstrapping of clingo on all macOS versions (#31160) 2022-06-16 07:26:20 -04:00
Mosè Giordano
89f32d51f3 grid: add new package (#31133) 2022-06-16 09:00:09 +02:00
Manuela Kuhn
3b3be70226 r-httpuv: fix zlib dependency (#31121) 2022-06-15 20:22:58 -05:00
Chuck Atkins
95888602f2 mesa: Match rtti settings with the libllvm dependency (#31145)
* llvm-amdgpu: Update the libllvm version provided

* mesa: Match configure rtti settings to the libllvm dependency
2022-06-15 17:29:33 -06:00
Wileam Y. Phan
0205fefe0c googletest: use URLs with .tar.gz extension (#31129) 2022-06-15 18:21:44 +00:00
Tom Scogland
b261b2a5ff Allow bootstrapping to work when partial or incompatible modules exist in the module path (#31035) 2022-06-15 19:09:07 +02:00
Ryan Mast
8c58c14c3d helics: add v2.8.1 (#31134) 2022-06-15 09:27:50 +02:00
SXS Bot
f7b4d488c3 spectre: add v2022.06.14 (#31135)
Co-authored-by: sxs-bot <sxs-bot@users.noreply.github.com>
2022-06-15 09:27:10 +02:00
Sreenivasa Murthy Kolam
38a8d4d2fe ROCm support to build py-torch (#31115)
* rocm support to build py-torch

* rocm support to build py-torch
2022-06-14 15:56:11 -07:00
Robert Underwood
1ceee714db sz: smoke, unit, version updates, and more oh my (#30873)
Co-authored-by: Robert Underwood <runderwood@anl.gov>
2022-06-14 16:53:47 -06:00
Brian Van Essen
5b3e4ba3f8 Fixed bad hashes for recent versions and added v8.4.0 (#31038) 2022-06-14 22:05:44 +02:00
snehring
37426e41cb wget: fixing compilation issue with gcc11+ on rhel7 (#30858) 2022-06-14 16:03:02 +00:00
Sergey Kosukhin
a05e729e1b mpich: remove libtool patches (#30769) 2022-06-14 16:29:22 +02:00
Mikael Simberg
f8a6799e67 apex: fix compilation with binutils (#30638) 2022-06-14 16:04:53 +02:00
Maciej Wójcik
633ebd149c dbcsr: add versions up to v2.2.0 (#30891)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-06-14 15:08:13 +02:00
G-Ragghianti
bf6220821b Make the IntelPackage fail successfully (#30773)
Co-authored-by: Robert Cohn <rscohn2@gmail.com>
2022-06-14 15:06:06 +02:00
Sebastian Ehlert
3db96aa892 simple-dftd3: add package and dependencies (#31046)
- add simple-dftd3 (version 0.6.0, 0.5.1)
- add mctc-lib (version 0.3.0)
- add toml-f (version 0.2.3)
- update dftd4 (version 3.4.0, use mctc-lib as actual dependency)
- update json-fortran (version 8.*, make static library PIC)
2022-06-14 15:05:01 +02:00
Jim Galarowicz
c7628d768a survey: add v1.0.5 (#31053) 2022-06-14 14:56:51 +02:00
haralmha
e1ad926189 vectorclass-version2: move files to include folder (#31105) 2022-06-14 14:54:16 +02:00
dlkuehn
8705735c74 gemma: add new package. (#31078)
Co-authored-by: David Kuehn <las_dkuehn@iastate.edu>
2022-06-14 12:53:14 +00:00
Hadrien G
d82fa045d5 acts: add v19.2 (#31108) 2022-06-14 12:45:03 +00:00
Richard Berger
c72d51cb3a legion: add HIP support (#31080) 2022-06-14 13:49:33 +02:00
Qian Jianhua
d76f184430 hybrid-lambda: fix build tests (#30214) 2022-06-14 13:46:23 +02:00
Seth R. Johnson
19ea24d2bd hdf5: add conflict for broken @1.8.22+fortran+mpi (#31111) 2022-06-14 13:42:48 +02:00
Bernhard Kaindl
83efea32f4 openssh: enable authentication via Kerberos through GSSAPI (#31086)
Add variant +gssapi to enable authentication via Kerberos through GSSAPI

When openssh is installed at sites using Kerberos, openssh needs to auth
via Kerberos through GSSAPI in order to work in such environments.
2022-06-14 13:41:32 +02:00
Mark Olesen
bc577f2dee openfoam: update v2112 to latest patch (#31113)
Co-authored-by: Mark Olesen <Mark.Olesen@esi-group.com>
2022-06-13 21:21:42 -06:00
Jean Luca Bez
04529fbe80 Update HDF5 VOL async (#31011)
* Update h5bench maintainers and versions

* Include version 1.1 for h5bench

* Correct release hash and set default version

* Update .tar.gz version

* Update HDF5 VOL async version and environment variable syntax
2022-06-13 21:58:16 -05:00
Wouter Deconinck
cdfbe2c25d root: new version 6.26.04 (#31116)
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-06-13 17:45:37 -07:00
Manuela Kuhn
8305742d75 exempi: add 2.6.1 and fix boost dependency (#31120) 2022-06-13 15:20:31 -07:00
Greg Sjaardema
e0137b1566 SEACAS: Clean up, add new versions (#31119) 2022-06-13 16:22:43 -04:00
iarspider
be95699a55 Add checksum for pacparser 1.4.0 (#31110) 2022-06-13 14:17:33 -06:00
Massimiliano Culpo
7d96a0aa5a Pin setuptools version in Github Action Workflows (#31118)
fixes #31109
2022-06-13 21:09:16 +02:00
Qian Jianhua
874b713edf netpbm: run custom test command (#31072)
* netpbm: run custom test command

* fix styles

* change method name
2022-06-13 11:26:54 -07:00
iarspider
3c0a98c5ab sloccount: add build-time dependency on flex (#31106) 2022-06-13 09:39:44 -07:00
Elsa Gonsiorowski, PhD
998bf90b35 SCR release v3.0, including components (#29924) 2022-06-13 18:17:17 +02:00
liuyangzhuan
2ca32fbc8c Remove filter operation for superlu-dist to avoid permission issues on read-only systems (#30970)
* added package gptune with all its dependencies: adding py-autotune, pygmo, py-pyaml, py-autotune, py-gpy, py-lhsmdu, py-hpbandster, pagmo2, py-opentuner; modifying superlu-dist, py-scikit-optimize

* adding gptune package

* minor fix for macos spack test

* update patch for py-scikit-optimize; update test files for gptune

* fixing gptune package style error

* fixing unit tests

* a few changes reviewed in the PR

* improved gptune package.py with a few newly added/improved dependencies

* fixed a few style errors

* minor fix on package name py-pyro4

* fixing more style errors

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

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

* resolved a few issues in the PR

* fixing file permissions

* a few minor changes

* style correction

* minor correction to jq package file

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

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

* fixing a few issues in the PR

* adding py-selectors34 required by py-pyro4

* improved the superlu-dist package

* improved the superlu-dist package

* moree changes to gptune and py-selectors34 based on the PR

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

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

* improved gptune package: 1. addressing comments of tldahlgren in PR 26936; 2. adding variant openmpi

* fixing style issue of gptune

* changing file mode

* improved gptune package: add variant mpispawn which depends on openmpi; add variant superlu and hypre for installing the drivers; modified hypre package file to add a gptune variant

* fixing style error

* corrected pddrive_spawn path in gptune test; enforcing gcc>7

* fixing style error

* setting environment variables when loading gptune

* removing debug print in hypre/package.py

* adding superlu-dist v7.2.0; fixing an issue with CMAKE_INSTALL_LIBDIR

* changing site_packages_dir to python_platlib

* not using python3.9 for py-gpy, which causes due to dropped support of tp_print

* more replacement of site_packages_dir

* fixing a few dependencies in gptune; added a gptune version

* adding url for gptune

* minor correction of gptune

* updating versions in butterflypack

* added a version for openturns

* added a url for openturns

* minor fix for openturns

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

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>

* added version2.1.1 for butterflypack

* fixing a tag in butterflypack

* minor fix for superlu-dist

* removed file filter for superlu-dist

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

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>

* superlu-dist: add version detection for the testing; removing unused lines

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-06-13 08:48:55 -07:00
Jordan Galby
e50d08ce48 Fix spack style arbitrary git rev as base (#31019)
Allow `spack style -b @` or `spack style -b origin/develop` to work as
expected.

Regression since spack 0.17 #25085
2022-06-13 15:22:35 +00:00
Sergey Kosukhin
696d81513d nvhpc: conflict with all compilers except for gcc (#31073) 2022-06-13 16:47:28 +02:00
Mark Grondona
b38afa7528 Add flux-core v0.39.0 and v0.40.0 and flux-sched v0.23.0 (#31061) 2022-06-13 16:15:25 +02:00
Mikael Simberg
0f2786c9d3 Fix tracy-client package (#31076) 2022-06-13 16:11:00 +02:00
Carson Woods
f72c2ab583 Fix download URL for pcre package (#31077) 2022-06-13 16:05:25 +02:00
Adam J. Stewart
f6e6403fd1 Fix packages that will break with PIL 10 (#31071) 2022-06-13 16:04:13 +02:00
Simon Pintarelli
5550271ead atompaw: add v4.2.0.1 (#31087)
apply ifort patch including v4.2.0.0, but not for 4.2.0.1 anymore
2022-06-13 15:15:59 +02:00
Jack Morrison
a1b19345b1 opa-psm2: add v11.2.228 (#31089) 2022-06-13 14:58:25 +02:00
Erik Schnetter
e2aeb06c91 adios2: add v2.8.1 (#31090) 2022-06-13 14:55:09 +02:00
Brice Videau
14ae0e0d94 py-py-spy: fix dependency on libunwind (#31013)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-06-13 14:16:26 +02:00
Seth R. Johnson
516587a1da py-breathe: new version 4.33.1 and fix dependencies (#31098)
* py-breathe: new version 4.33.1 and fix dependencies

* remove unused dependencies
2022-06-12 18:06:39 -05:00
Paul R. C. Kent
dc36fd87bb Addllvmv1405 (#31099) 2022-06-12 11:24:31 -07:00
marcosmazz
06b5141d01 Limit Jasper version for WPS (#31088)
* Limit Jasper version for WPS

Jasper@3: changed API and does not support interfaces used by WPS.
This prevented ungrib.exe build and failed silently.
2022-06-12 19:02:07 +02:00
Seth R. Johnson
27610838dd py-sphinxcontrib-bibtex: new version 2.4.2 (#31097) 2022-06-12 09:24:46 -07:00
Danny McClanahan
0c7fd9bd8c fix doubly shell quoting args to spack spec (#29282)
* add test to verify fix works
* fix spec cflags/variants parsing test (breaking change)
* fix `spack spec` arg quoting issue
* add error report for deprecated cflags coalescing
* use .group(n) vs subscript regex group extraction for 3.5 compat
* add random test for untested functionality to pass codecov
* fix new test failure since rebase
2022-06-11 12:35:46 -07:00
Todd Gamblin
bf2b30a5f5 bugfix: preserve dict order for Spec.dag_hash() in Python 2 (#31092)
Fix a bug introduced in #21720. `spack_json.dump()` calls `_strify()` on dictionaries to
convert `unicode` to `str`, but it constructs `dict` objects instead of
`collections.OrderedDict` objects, so in Python 2 (or earlier versions of 3) it can
scramble dictionary order.

This can cause hashes to differ between Python 2 and Python 3, or between Python 3.7
and earlier Python 3's.

- [x] use `OrderedDict` in `_strify`
- [x] add a regression test
2022-06-10 20:32:35 -07:00
Asher Mancinelli
f42680b785 ripgrep: remove need for llvm (#31062) 2022-06-10 11:45:53 -07:00
Sergey Kosukhin
a2afd5b82f clingo: fix string formatting in error messages (#31084) 2022-06-10 16:24:27 +00:00
Cyrus Harrison
11f1b371f7 babelflow: fix conditional constraint in "when" decorator (#31057) 2022-06-10 18:07:22 +02:00
Valentin Churavy
cfc46504ac enzyme: new version 0.0.32 (#31081)
Add LLDEnzyme to libs list
2022-06-10 11:48:35 +02:00
dependabot[bot]
163251aa65 build(deps): bump actions/setup-python from 3.1.2 to 4 (#31059)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3.1.2 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](98f2ad02fd...d09bd5e600)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-10 11:03:36 +02:00
eugeneswalker
6ab9f3a290 exago@1.4.1: : needs py-pytest (#31060) 2022-06-09 16:55:04 -07:00
Gregory Lee
45043bcdf5 py-xdot requires explicit dependency on harfbuzz (#30968) 2022-06-09 13:53:32 -06:00
Adam J. Stewart
7642fa3d99 py-kornia: add v0.6.5 (#31067) 2022-06-09 12:13:51 -07:00
Adam J. Stewart
1689f7fcbe py-pillow: add v9.1.1 (#31068) 2022-06-09 12:12:02 -07:00
Adam J. Stewart
4f67afeb5f py-pytorch-lightning: add v1.6.4 (#31069) 2022-06-09 12:09:05 -07:00
Adam J. Stewart
9d8ecffed0 py-timm: add v0.5.4 (#31070) 2022-06-09 12:06:58 -07:00
Cyrus Harrison
1ada7ea809 add fix for implicit includes with newer vers of gcc (#31056) 2022-06-09 09:40:08 -07:00
Martin Lang
4a8db00691 nfft, pnfft: fix detection of fftw variants (precision) (#30935)
* nfft, pnfft: fix detection of fftw variants (precision)

* nfft, pnfft: use fftw's selected_precisions; avoid repetitive calls to spec

Co-authored-by: Martin Lang <martin.lang@mpsd.mpg.de>
2022-06-09 08:47:12 -07:00
Tim Fuller
01f8236bf5 Allow more fine-grained control over what submodules are updated (#27293)
The "submodules" argument of the "version" directive can now accept
a callable that returns a list of submodules, in addition to the usual
Boolean values
2022-06-09 07:45:49 +02:00
Adam J. Stewart
57822d3014 clingo: fix ~python build (#30824) 2022-06-09 07:33:56 +02:00
Massimiliano Culpo
3fdb3f832a Cancel running workflows automatically on PR update (#31044)
* Cancel running workflows automatically on PR update
* Add the last update later to check cancellation is working
* Use github.run_number instead of github.sha
2022-06-08 15:46:46 -07:00
Asher Mancinelli
bedad508a9 lua-mpack: build with -fPIC always (#31054) 2022-06-08 21:37:55 +00:00
Adam J. Stewart
31f6dedecd py-memray: add new package (#31033)
* py-memray: add new package

* Link to Python

* Add missing non-Python deps
2022-06-08 13:52:38 -07:00
Adam J. Stewart
dc0c4959db cuDNN: add v8.4.0.27-11.6 (#31034) 2022-06-08 13:48:12 -07:00
Mark W. Krentel
8550b6cf49 hpctoolkit: adjust dependencies for develop (#31050)
The develop branch now uses libiberty, but not binutils or libdwarf.
2022-06-08 13:42:32 -07:00
Jen Herting
0e5c4c9cbf Draft: Pending #29806 [py-sentry-sdk] added version 1.5.5 (#29143)
* [py-sentry-sdk] audited dependencies and relisted extras as variants

* [py-sentry-sdk] added version 1.5.5

* [py-sentry-sdk] flake8

* [py-sentry-sdk]

- added "descriptions" to variants
- removed conflicts
  - replaced with when statements in varients
2022-06-08 20:41:44 +00:00
Jen Herting
9bac72e818 New package: py-colossialai (#30807)
* colossalai is dependency for deepoffense

* [py-colossalai] added homepage

* [py-colossalai] added dependencies and removed older versions

* [py-colossalai] updated pypi url to match listed version

* [py-colossalai] spack -> spack.package

Co-authored-by: Sid Pendelberry <sid@rit.edu>
2022-06-08 20:34:34 +00:00
Brice Videau
a65a217c54 py-ytopt: add v0.0.4 (#31029) 2022-06-08 19:43:20 +00:00
Ryan Marcellino
26e6aae8d4 new package: py-pytest-asyncio (#31040) 2022-06-08 11:31:31 -07:00
Manuela Kuhn
d6fabd1533 py-glmsingle: add new package (#31043) 2022-06-08 10:03:18 -07:00
Massimiliano Culpo
d245c46487 bootstrap: account for disabled sources (#31042)
* bootstrap: account for disabled sources

Fix a bug introduced in #30192, which effectively skips
any prescription on disabled bootstrapping sources.

* Add unit test to avoid regression
2022-06-08 07:17:37 -06:00
Adam J. Stewart
3eba28e383 OpenCV: add v4.6.0 (#31022) 2022-06-08 14:31:55 +02:00
Adam J. Stewart
0d91cb58dc py-pympler: add v1.0.1 (#31031) 2022-06-08 14:27:56 +02:00
Adam J. Stewart
5f55abeecb Python: add v3.10.5 (#31039) 2022-06-08 14:22:51 +02:00
psakievich
c3c2416672 Nalu-Wind: allow for lowest order infinity version (#31036)
This will allow us to pin trilinos in our repo
2022-06-08 14:22:10 +02:00
Adam J. Stewart
9e2bc41e45 libtiff: add v4.4.0 (#31008) 2022-06-07 15:49:56 -06:00
Axel Huebl
8f80c5e6f7 openPMD-api: 0.14.5 (#31023)
Add the latest release.
2022-06-07 14:32:43 -07:00
Erik Schnetter
a5e1367882 meson: add version 0.62.2 (#31005) 2022-06-07 15:13:40 -06:00
Peter Scheibel
c724e26ba9 Staging: determine extensions from nonstandard URLs (#31027)
Fixes #31021

With #25185, we no longer default to using tar when we can't
determine the extension type, opting to fail instead.

This broke fetching for the pcre package, where we couldn't determine
the extension. To determine the extension, we were attempting to
extract it from the destination filename; however, this file name
may omit details of the origin URL that are required to determine the
extension, so instead we examine the URL directly.

This also updates the decompressor_for method not to set ext=None
by default: it must now always be set by the caller.
2022-06-07 14:12:08 -07:00
Glenn Johnson
1b9a1992fb Update Spack Bioconductor packages to Bioconductor 3.15 (#30984) 2022-06-07 20:10:01 +02:00
Graeme A Stewart
815764bdef Update prmon recipe, v3.0.2 (#30979)
* Update prmon recipe, v3.0.2

Update recipe to v3.0.2, using external dependency
option for the build (as these are satisfied so easily with Spack)

* Remove "broken" 3.0.1 version

This one could not build properly with Spack, due to
missing submodule sources
2022-06-07 17:17:25 +00:00
Bitllion
adf073b53c Add New Package:PSCMC (#30944)
* add some new version of abacus and fix bug on mkl

* Add Package:PSCMC

* update maintainer

* rebase

* update maintainers

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

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-06-07 10:11:14 -07:00
Axel Huebl
449e885d4c WarpX: 22.06 (#31012)
* WarpX: 22.06

Update `warpx` & `py-warpx` to the latest release, `22.06`.

* Patch: Fix 1D CUDA Builds
2022-06-07 09:49:35 -06:00
Brice Videau
560472ce3a Fix py-deap py-setuptools dependency (#31014) 2022-06-07 08:57:44 -06:00
Brice Videau
0c66446437 Add py-ytopt-autotune version v1.0.0 (#31015) 2022-06-07 08:49:44 -06:00
Massimiliano Culpo
6b4b1dacd9 docs: update the list of Docker images with Spack preinstalled (#31003)
Also, update the image in the docs and use ghcr.io
2022-06-07 16:43:04 +02:00
Gregory Lee
3e90134e14 json-glib depends on gobject-introspection (#30963) 2022-06-07 08:29:38 -06:00
Asher Mancinelli
4ad0594c7b fd: add new package (#31010) 2022-06-07 08:21:59 -06:00
kwryankrattiger
f13b760f10 Visit: Allow building without rendering (#31006)
This is important for HPC systems.
2022-06-07 08:21:36 -06:00
Carlos Bederián
0f6fb1a706 gmsh: +petsc requires ~int64 variant (#30969) 2022-06-07 16:21:07 +02:00
Jordan Galby
e74d85a524 Fix empty install prefix post-install sanity check (#30983) 2022-06-07 16:17:33 +02:00
Glenn Johnson
ffd63c5de1 R ecosystem: cran updates (#31004) 2022-06-07 16:12:51 +02:00
Axel Huebl
ed263615d7 AMReX: update the CMake requirements for v22.06+ (#31018) 2022-06-07 16:01:13 +02:00
Morten Kristensen
b4e775a11a py-vermin: add latest version 1.4.0 (#31009) 2022-06-07 06:09:39 -06:00
Mosè Giordano
6a2844fdee libint: add Python as build dependency (#30870)
Installation process of libint runs a Python script:
<69cc7b9bc6/export/cmake/CMakeLists.txt.export (L410)>.
If Python isn't explicitly listed as build dependency, system Python will be
picked up, which can cause troubles.
2022-06-07 06:01:53 -06:00
Manuela Kuhn
44d670a8ce git-annex: fix source urls (#30789) 2022-06-07 05:45:40 -06:00
Massimiliano Culpo
4a0ac87d07 archspec: bump to v0.1.4 (#30856)
Fixes compiler flags for oneapi and dpcpp
2022-06-07 08:51:34 +00:00
Michael Kuhn
2c6898c717 glib: add v2.72.2 (#31001) 2022-06-07 02:45:51 -06:00
Brice Videau
0a8083c604 Fix py-ray dependencies and build system (#31016)
* Fix py-ray dependencies and build system

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

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

* Added documentation for unusual dependencies.

* Fixed npm preinstall script per @adamjstewart suggestion.

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-06-07 01:36:24 +00:00
John W. Parent
5b45df5269 Update decompression support on Windows (#25185)
Most package installations include compressed source files. This
adds support for common archive types on Windows:

* Add support for using system 7zip functionality to decompress .Z
  files when available (and on Windows, use 7zip for .xz archives)
* Default to using built-in Python support for tar/bz2 decompression
  (note that Python tar documentation mentions preservation of file
  permissions)
* Add tests for decompression support
* Extract logic for handling exploding archives (i.e. compressed
  archives that expand to more than one base file) into an
  exploding_archive_catch context manager in the filesystem module
2022-06-06 18:14:43 -07:00
Chuck Atkins
9d7cc43673 Package: Don't warn for missing source on bundle packages without code (#30913) 2022-06-06 15:33:03 -07:00
miheer vaidya
932065beca Update package rtags (#30890)
* Update backage bear

Newer versions of rtags aren't available via older url

* Fix sha256 as download link has changed

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-06-06 15:30:35 -07:00
Massimiliano Culpo
360192cbfe atompow: remove again misplaced duplicate package (#30992)
Regression re-introduced in #30404
2022-06-06 14:59:22 -07:00
Jen Herting
7bc349c041 New package: py-numpy-quaternion (#29452)
* first build of numpy-quaternion and spherical-functions

* [py-numpy-quaternion] removed python restriction

* [py-numpy-quaternion] added scipy and numba variants

* [py-numpy-quaternion] fixing unicode

Co-authored-by: Sid Pendelberry <sid@rit.edu>
2022-06-06 14:42:33 -07:00
Jen Herting
603ec40ab1 [py-httpx] added version 0.22.0 (#29806)
* [py-httpx] python dependencies are type=('build', 'run')

* [py-httpx] py-wheel is now implied by PythonPackage

* [py-httpx] fixed older version dependencies

* [py-httpx] added version 0.22.0
2022-06-06 14:34:11 -07:00
renjithravindrankannath
ed6695b9c9 Correcting library path of hsakmt-roct for Centos7 and cleaning up the patch file. (#30885)
* Correcting library path of hsakmt-roct and cleaning up the patch file.

* Delete 007-library-path.patch
2022-06-06 13:50:41 -07:00
Adam J. Stewart
fb173f80b2 py-torchmetrics: add v0.9.0 (#31000) 2022-06-06 16:28:11 +02:00
Ye Luo
15d4262b9b quantum-espresso: no need of patch and hdf5 is optional for pw2qmcpack (#30884) 2022-06-06 15:47:10 +02:00
Daniel Arndt
7116fb1b70 Kokkos SYCL AOT flags (#30723)
* Kokkos SYCL AOT flags

* Improve selecting the Intel GPU arch
2022-06-06 15:41:13 +02:00
Adam J. Stewart
9b713fa6a6 py-black: new version/variants/maintainer (#30999) 2022-06-06 07:09:39 -06:00
Adam J. Stewart
8d4a5cb247 GCC: add Apple M1 support (#30825)
Co-authored-by: Seth R. Johnson <johnsonsr@ornl.gov>
2022-06-06 14:46:43 +02:00
Filippo Spiga
bf2d44c87e nvhpc: add v22.5 (#30845) 2022-06-06 14:44:39 +02:00
Brian Van Essen
926e311f3c dihydrogen: propagate cuda_arch to nvshmem (#30886) 2022-06-06 14:38:58 +02:00
Simon Pintarelli
8ef937032c quantum-espresso: support libxc also for autotools build (#30895) 2022-06-06 14:26:07 +02:00
Erik
73ce789390 amrvis: add configuration file and default color palette (#30942) 2022-06-06 14:01:57 +02:00
Jianshen Liu
e4f3cfcc3a cppcheck: add v2.8 (#30993) 2022-06-06 13:42:42 +02:00
Erik Schnetter
7ac05485c6 cmake: New version 3.23.2 (#30994) 2022-06-05 14:01:18 +02:00
John W. Parent
13b0e73a4e Sanitize filepath from URL (#30625)
Spack's staging logic constructs a file path based on a URL. The URL
may contain characters which are not allowed in valid file paths on
the system (e.g. Windows prohibits ':' and '?' among others). This
commit adds a function to remove such offending characters (but
otherwise preserves the URL string when constructing a file path).
2022-06-04 15:06:43 -07:00
Tom Scogland
03c54aebdd luajit: use GC64 on darwin (#30971) 2022-06-04 14:44:45 +02:00
G-Ragghianti
f4a4b3fa87 Intel oneAPI DPCPP compatibility toolkit: add new package (#30986) 2022-06-04 14:31:41 +02:00
Adam J. Stewart
6b3607287a py-botorch: add new package (#30989) 2022-06-04 14:29:33 +02:00
Carlos Bederián
b4b2585d67 protobuf: patch build error when @3.20 %gcc@12.1.0 (#30973) 2022-06-03 21:32:13 +02:00
Satish Balay
29855ae31e petsc, py-petsc4py: add 3.17.2 (#30982) 2022-06-03 09:39:52 -07:00
Michael Kuhn
44b9efa132 rocksdb: add 7.2.2 (#30977) 2022-06-03 08:56:28 -07:00
Michael Kuhn
f21e26b904 doxygen: add 1.9.4 (#30975) 2022-06-03 08:54:34 -07:00
Jacob Merson
73865c38f9 Include new versions of model-traits package (#30972) 2022-06-03 08:51:43 -07:00
Martin Diehl
38ccefbe84 mpicxx does not work with icpx (#30098) 2022-06-03 08:40:02 -07:00
Adam J. Stewart
1bd33d88bd py-protobuf: pin dependents to @:3 (#30880) 2022-06-03 00:32:02 -04:00
Seth R. Johnson
67ad23cc11 geant4: enable building against spack-built geant outside of spack (#30936) 2022-06-02 21:09:41 -06:00
Adam J. Stewart
8640b50258 Rust: Apple M1 support (#30823) 2022-06-02 20:57:40 -04:00
Adam J. Stewart
043cc688ef py-torch: fix Apple M1 support (#30833) 2022-06-02 20:51:18 -04:00
Adam J. Stewart
e52527029a OpenJDK: fix Apple M1 support (#30826) 2022-06-02 20:48:55 -04:00
Alex Hedges
a7d2f76ac5 git: add v2.36.1 (#30966) 2022-06-02 13:21:37 -07:00
Derek Ryan Strong
fbb134b1af Add lftp 4.9.2 (#30967) 2022-06-02 19:34:46 +00:00
Bitllion
548e9ae88c Abacus (#30933)
* add pacakge: abacus

* rename

* fix some style bugs

* update package:abacus

* fix some style bugs

* format code

* Delete a line of useless comments

* updatee abacus

* Update package.py

add new version info and fix a bug on mkl

* update version info and fix a bug on mkl

* Update package.py

* fix style bugs

* trailing whitespace
2022-06-02 12:09:53 -07:00
Adam J. Stewart
5728ba0122 Use stable URLs for patch-diff GitHub patches (#30953) 2022-06-02 12:52:05 -04:00
Adam J. Stewart
2bda10edb5 Fix typo in GitHub Actions step name (#30924) 2022-06-02 16:33:39 +00:00
miheer vaidya
bd15ca4f16 Update bear to v3.0.0 (#30835) 2022-06-02 09:31:10 -07:00
Jakub Krajniak
f9dfd5fcb8 Add flag to enable WRF-Chem module (#30950)
* Add flag to enable WRF-Chem module

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

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>

* Set chem variant only for v4+

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-06-02 09:11:45 -07:00
Glenn Johnson
f3c4e1adbb texlive: add 20220321 distribution (#30955) 2022-06-02 09:05:24 -07:00
Seth R. Johnson
b2d3ed9096 pmix: add explicit hwloc dependency (#30897)
pmix@:2 uses hwloc if it's available (e.g. in homebrew) which can break
the installation.
2022-06-02 14:47:53 +02:00
Mikael Simberg
dac5fec255 Add pika 0.5.0 (#30960) 2022-06-02 13:56:05 +02:00
Axel Huebl
9784b8f926 Prepare: openPMD-api 0.15.0-dev (#29484)
Anticipate openPMD-api changes in the next major release that are
already in `dev` (aka Spack `develop`):
- C++17 requirement
- drop: `mpark-variant` public dependency
- add: `toml11` private dependency

Also add @franzpoeschel as co-maintainer for the Spack package.
2022-06-01 19:13:33 -06:00
Axel Huebl
adef8f6ca7 WarpX: Patch no-MPI & Lib Install (#30866)
Fixes WarpX issues:
- https://github.com/ECP-WarpX/WarpX/pull/3134
- https://github.com/ECP-WarpX/WarpX/pull/3141

and uses GitHub patch URLs directly instead of storing
patch copies.
2022-06-01 18:49:25 -06:00
Larry Knox
c36f15e29e hdf5: new version version 1.10.9 (#30903) 2022-06-01 16:37:37 -06:00
Carlos Bederián
03531ed904 openmpi: add 4.1.4 (#30947) 2022-06-01 16:21:38 -06:00
Carlos Bederián
54332b2d83 python: add 3.9.13 (#30948) 2022-06-01 15:37:31 -06:00
Xavier Delaruelle
165f42b7ce environment-modules: add version 5.1.1 (#30946) 2022-06-01 12:17:48 -06:00
Sreenivasa Murthy Kolam
1190d03b0f Bump up the version for ROCm-5.1.3 release (#30819)
* Bump up the version for ROCm-5.1.3 release

* remove extra comma from hashes for device-libs of rocm-openmp-extras
2022-06-01 10:57:10 -07:00
kwryankrattiger
5faa927fe6 Ascent: Patch find conduit python (#30949)
Some systems have trouble when using the python on the login node so
this should provide an option to build that doesn't require running
python.
2022-06-01 10:36:33 -07:00
Adam J. Stewart
c60d220f81 py-jupyterlab: add v3.4.2 (#30867) 2022-06-01 10:18:47 -07:00
Hartmut Kaiser
61d3d60414 Update HPX recipe for HPX V1.8.0 (#30896) 2022-06-01 11:06:03 -06:00
rashawnLK
174258c09a Updated intel-gtpin package.py for most recent version, GTPin 3.0. (#30877)
* Updated intel-gtpin package.py for  most recent version, GTPin 3.0.

* Fixed style issues in package.py -- removed trailing whitespace on two
lines.
2022-06-01 11:05:41 -06:00
Erik
73c6a8f73d Version updates for SUNDIALS and CUDA (#30874) 2022-06-01 11:01:32 -06:00
Olivier Cessenat
86dc904080 ngspice: adding version 37 (#30925) 2022-06-01 10:50:02 -06:00
Weiqun Zhang
9e1c87409d amrex: add v22.06 (#30951) 2022-06-01 10:49:46 -06:00
Sergey Kosukhin
2b30dc2e30 nag: add new version (#30927)
* nag: add new version

* nag: update maintainers
2022-06-01 10:49:32 -06:00
Ben Darwin
b1ce756d69 minc-toolkit: add version 1.9.18.2 (#30926) 2022-06-01 10:45:34 -06:00
Ida Mjelde
1194ac6985 Adding a libunwind variant to libzmq (#30932)
* Adding a libunwind variant to libzmq

* Remove whitespace line 46
2022-06-01 10:29:56 -06:00
Asher Mancinelli
954f961208 tmux: support building from master and utf8 opts (#30928)
* tmux: support building from master and utf8 opts

* Fix style errors
2022-06-01 10:29:35 -06:00
Zack Galbreath
47ac710796 CPU & memory requests for jobs that generate GitLab CI pipelines (#30940)
gitlab ci: make sure pipeline generation isn't resource starved
2022-06-01 09:43:23 -06:00
Derek Ryan Strong
d7fb5a6db4 rclone: add 1.58 (#30887)
* Add rclone 1.58

* Update rclone git repo path
2022-05-31 19:35:12 -07:00
Maciej Wójcik
e0624b9278 gromacs: Add recent releases (#30892)
* gromacs: Add recent releases

* gromacs: Update branch name

* gromacs: Update links
2022-05-31 19:27:23 -07:00
Olivier Cessenat
e86614f7b8 gmsh: adding version 4.10.3 (#30923) 2022-05-31 18:53:03 -07:00
Garth N. Wells
d166b948ce fenics-dolfinx: dependency updates (#30919)
* Add pugixml dependency

* Dependency updates

* Fix Spack Numpy verion

* Test more generous NumPy constraint

* Fix NumPy requirment
2022-05-31 18:49:49 -07:00
lorddavidiii
9cc3a2942d cfitsio: add 4.1.0 (#30920) 2022-05-31 18:46:07 -07:00
Marie Houillon
5d685f9ff6 New version for openCARP packages (#30931)
Co-authored-by: openCARP consortium <info@opencarp.org>
2022-05-31 18:21:55 -07:00
Paul Kuberry
9ddf45964d xyce: add sha for version 7.5.0 (#30941) 2022-05-31 17:59:13 -07:00
iarspider
b88cc77f16 xpmem package: add patches for building on FC 35 with kernel 5.16.18-200 (#29945) 2022-05-31 15:55:51 -07:00
Robert Cohn
f3af38ba9b Fix module support for oneapi compilers (#28901)
Updates to improve Spack-generated modules for Intel oneAPI compilers:

* intel-oneapi-compilers set CC etc.
* Add a new package intel-oneapi-compilers-classic which can be used to
  generate a module which sets CC etc. to older compilers (e.g. icc)
* lmod module logic now updated to treat the intel-oneapi-compilers*
  packages as compilers
2022-05-31 15:02:25 -07:00
Wouter Deconinck
adc9f887ea acts-dd4hep: new package; acts: new version (#30850)
* acts-dd4hep: new package, separated from new acts@19.1.0

* acts-dd4hep: improved versioning

* acts-dd4hep: don't use curl | sha256sum

* acts: new variant `odd` for Open Data Detector

* acts-dd4hep: style changes
2022-05-31 11:30:36 -07:00
Wouter Deconinck
9461f482d9 assimp: new version 5.2.4 (#30929) 2022-05-31 12:25:24 -06:00
Paul Kuberry
e014b889c6 xyce: remove python packages as +pymi dependencies and hdf5 from trilinos dependency (#30938) 2022-05-31 14:04:57 -04:00
snehring
181ac574bb sentieon-genomics: adding version 202112.04 (#30876) 2022-05-31 10:05:27 -06:00
Adam J. Stewart
055c9d125d CUDA: make cuda_arch sticky (#30910) 2022-05-30 12:53:15 -07:00
Evan Bollig
a94438b1f5 Added AWS-AHUG alinux2 pipeline (#24601)
Add spack stacks targeted at Spack + AWS + ARM HPC User Group hackathon.  Includes
a list of miniapps and full-apps that are ready to run on both x86_64 and aarch64.

Co-authored-by: Scott Wittenburg <scott.wittenburg@kitware.com>
2022-05-30 10:26:39 -06:00
Joseph Wang
f583e471b8 pass CC variable to make (#30912)
Set CC to cc
2022-05-30 08:44:31 +02:00
Brian Van Essen
f67f3b1796 Add new versions of protobuf and py-protobuf (#30503)
* Add new versions

* Updated the hashes to match the published pypi.org hashes.  Added version constraints for Python.
2022-05-30 01:23:26 -05:00
Jean Luca Bez
77c86c759c HDF5 VOL-ASYNC update versions (#30900) 2022-05-29 17:49:52 -04:00
Adam J. Stewart
8084259bd3 protobuf: fix spack versions (#30879) 2022-05-28 14:53:24 -06:00
Evan Bollig
98860c6a5f Alinux isc buildcache (#30462)
Add two new stacks targeted at x86_64 and arm, representing an initial list of packages 
used by current and planned AWS Workshops, and built in conjunction with the ISC22
announcement of the spack public binary cache.

Co-authored-by: Scott Wittenburg <scott.wittenburg@kitware.com>
2022-05-28 11:32:53 -06:00
Todd Gamblin
e6929b9ff9 0.18.0.dev0 -> 0.19.0.dev0 (#30907) 2022-05-28 17:23:01 +00:00
Tom Scogland
18c2f1a57a refactor: packages import spack.package explicitly (#30404)
Explicitly import package utilities in all packages, and corresponding fallout.

This includes:

* rename `spack.package` to `spack.package_base`
* rename `spack.pkgkit` to `spack.package`
* update all packages in builtin, builtin_mock and tutorials to include `from spack.package import *`
* update spack style
  * ensure packages include the import
  * automatically add the new import and remove any/all imports of `spack` and `spack.pkgkit`
    from packages when using `--fix`
  * add support for type-checking packages with mypy when SPACK_MYPY_CHECK_PACKAGES
    is set in the environment
* fix all type checking errors in packages in spack upstream
* update spack create to include the new imports
* update spack repo to inject the new import, injection persists to allow for a deprecation period

Original message below:
 
As requested @adamjstewart, update all packages to use pkgkit.  I ended up using isort to do this,
so repro is easy:

```console
$ isort -a 'from spack.pkgkit import *' --rm 'spack' ./var/spack/repos/builtin/packages/*/package.py
$ spack style --fix
```

There were several line spacing fixups caused either by space manipulation in isort or by packages
that haven't been touched since we added requirements, but there are no functional changes in here.

* [x] add config to isort to make sure this is maintained going forward
2022-05-28 12:55:44 -04:00
Todd Gamblin
3054cd0eff update changelog for v0.18.0 (#30905) 2022-05-28 17:33:20 +02:00
JDBetteridge
9016b79270 Additional BLAS/LAPACK library configuration for Numpy (#30817)
* Add amdblis and amdlibflame as BLAS/LAPACK options

* Add Cray-libsci as BLAS/LAPACK option

* Use Netlib config for Cray-libsci
2022-05-28 03:33:31 -06:00
Erik Schnetter
9f5c6fb398 hpx: New version 1.8.0 (#30848) 2022-05-28 09:40:20 +02:00
Greg Becker
19087c9d35 target optimization: re-norm optimization scale so that 0 is best. (#29926)
referred targets are currently the only minimization criteria for Spack for which we allow
negative values. That means Spack may be incentivized to add nodes to the DAG if they
match the preferred target.

This PR re-norms the minimization criteria so that preferred targets are weighted from 0,
and default target weights are offset by the number of preferred targets per-package to
calculate node_target_weight.

Also fixes a bug in the test for preferred targets that was making the test easier to pass
than it should be.
2022-05-27 22:49:41 -07:00
Greg Becker
4116b04368 update tutorial command for v0.18.0 and new gpg key (#30904) 2022-05-28 02:36:20 +00:00
JDBetteridge
1485931695 Ensure same BLAS/LAPACK config from Numpy used in Scipy (#30818)
* Call Numpy package's set_blas_lapack() and setup_build_environment() in Scipy package

* Remove broken link from comment

* Use .package attribute of spec to avoid import
2022-05-27 10:46:21 -07:00
Derek Ryan Strong
78cac4d840 Add R 4.2.0 (#30859) 2022-05-27 08:24:28 -05:00
Michael Kuhn
2f628c3a97 gcc: add 9.5.0 (#30893) 2022-05-27 12:18:57 +02:00
Adam J. Stewart
a3a8710cbe Python: fix clingo bootstrapping on Apple M1 (#30834)
This PR fixes several issues I noticed while trying to get Spack working on Apple M1.

- [x] `build_environment.py` attempts to add `spec['foo'].libs` and `spec['foo'].headers` to our compiler wrappers for all dependencies using a try-except that ignores `NoLibrariesError` and `NoHeadersError` respectively. However, The `libs` and `headers` attributes of the Python package were erroneously using `RuntimeError` instead.
- [x] `spack external find python` (used during bootstrapping) currently has no way to determine whether or not an installation is `+shared`, so previously we would only search for static Python libs. However, most distributions including XCode/Conda/Intel ship shared Python libs. I updated `libs` to search for both shared and static (order based on variant) as a fallback.
- [x] The `headers` attribute was recursively searching in `prefix.include` for `pyconfig.h`, but this could lead to non-deterministic behavior if multiple versions of Python are installed and `pyconfig.h` files exist in multiple `<prefix>/include/pythonX.Y` locations. It's safer to search in `sysconfig.get_path('include')` instead.
- [x] The Python installation that comes with XCode is broken, and `sysconfig.get_paths` is hard-coded to return specific directories. This meant that our logic for `platlib`/`purelib`/`include` where we replace `platbase`/`base`/`installed_base` with `prefix` wasn't working and the `mkdirp` in `setup_dependent_package` was trying to create a directory in root, giving permissions issues. Even if you commented out those `mkdirp` calls, Spack would add the wrong directories to `PYTHONPATH`. Added a fallback hard-coded to `lib/pythonX.Y/site-packages` if sysconfig is broken (this is what distutils always did).
2022-05-27 03:18:20 -07:00
Paul R. C. Kent
0bf3a9c2af llvm: 14.0.3 and 14.0.4 (#30888) 2022-05-27 09:51:54 +02:00
Severin Strobl
cff955f7bd otf2/scorep: add versions 3.0/7.1 (#28631) 2022-05-27 00:43:58 +02:00
Scott Wittenburg
3d43ebec72 Revert "strip -Werror: all specific or none (#30284)" (#30878)
This reverts commit 330832c22c.
2022-05-26 14:17:01 -07:00
Robert Pavel
6fd07479e3 Updated mfem constraints in laghos spackage (#30851)
Updated mfme constraints in laghos spackage to better match comments and
support legacy builds of `laghos@1.0:2.0`
2022-05-26 10:20:42 -07:00
Simon Pintarelli
03bc36f8b0 q-e-sirius: remove ~apps constraint (#30857) 2022-05-26 10:18:37 -07:00
Brian Van Essen
93e1b283b7 Added hash for new versions (#30860) 2022-05-26 10:15:59 -07:00
Derek Ryan Strong
df2c0fbfbd Add new versions of GNU parallel (#30862) 2022-05-26 10:09:43 -07:00
Derek Ryan Strong
54a69587c3 Add newer nano versions (#30865) 2022-05-26 10:04:50 -07:00
Hans Johansen
294312f02b Adding new package bricks for x86, cuda (#30863)
* Adding new package bricks for x86, cuda

* Fixed complaints from "spack style" that CI found

* add license comment at top

Co-authored-by: drhansj <drhansj@berkeley.edu>
Co-authored-by: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com>
2022-05-26 07:40:11 -07:00
Massimiliano Culpo
0636fdbfef Remove the warning that Spack prints at each spec (#30872)
Add instead a warning box in the documentation
2022-05-26 14:35:20 +00:00
Scott Wittenburg
85e13260cf ci: Support secure binary signing on protected pipelines (#30753)
This PR supports the creation of securely signed binaries built from spack
develop as well as release branches and tags. Specifically:

- remove internal pr mirror url generation logic in favor of buildcache destination
on command line
    - with a single mirror url specified in the spack.yaml, this makes it clearer where 
    binaries from various pipelines are pushed
- designate some tags as reserved: ['public', 'protected', 'notary']
    - these tags are stripped from all jobs by default and provisioned internally
    based on pipeline type
- update gitlab ci yaml to include pipelines on more protected branches than just
develop (so include releases and tags)
    - binaries from all protected pipelines are pushed into mirrors including the
    branch name so releases, tags, and develop binaries are kept separate
- update rebuild jobs running on protected pipelines to run on special runners
provisioned with an intermediate signing key
    - protected rebuild jobs no longer use "SPACK_SIGNING_KEY" env var to
    obtain signing key (in fact, final signing key is nowhere available to rebuild jobs)
    - these intermediate signatures are verified at the end of each pipeline by a new
    signing job to ensure binaries were produced by a protected pipeline
- optionallly schedule a signing/notary job at the end of the pipeline to sign all
packges in the mirror
    - add signing-job-attributes to gitlab-ci section of spack environment to allow
    configuration
    - signing job runs on special runner (separate from protected rebuild runners)
    provisioned with public intermediate key and secret signing key
2022-05-26 08:31:22 -06:00
Adam J. Stewart
b5a519fa51 py-tensorboard: add v2.9.0 (#30832) 2022-05-26 07:43:40 -04:00
Adam J. Stewart
2e2d0b3211 libtiff: remove extra dependencies/patch (#30854) 2022-05-25 23:37:45 -06:00
Todd Gamblin
d51f949768 bugfix: do not compute package_hash for old concrete specs (#30861)
Old concrete specs were slipping through in `_assign_hash`, and `package_hash` was
attempting to recompute a package hash when we could not know the package a time
of concretization.

Part of this was that the logic for `_assign_hash` was hard to understand -- it was
called twice from `_finalize_concretization` and had special cases for both args it
was called with. It's much easier to understand the logic here if we just inline it.

- [x] Get rid of `_assign_hash` and just integrate it with `_finalize_concretization`
- [x] Don't call `_package_hash` at all for already-concrete specs.
- [x] Add regression test.
2022-05-26 03:12:24 +00:00
Adam J. Stewart
1b955e66c1 py-numpy: add v1.22.4 (#30827) 2022-05-25 18:30:02 -06:00
Adam J. Stewart
5f8a3527e7 py-pythran: add v0.11.0 (#30829) 2022-05-25 18:29:42 -06:00
Seth R. Johnson
ec02369dba openmpi: fixes for slurm and #29449 (#30299) 2022-05-25 18:09:38 -06:00
Diego Alvarez
8ceac2ba9b Add nextflow 22.04.3 (#30855) 2022-05-25 15:46:00 -06:00
snehring
85eeed650e eagle: updating to version 1.1.3 (#30852) 2022-05-25 20:20:54 +00:00
Seth R. Johnson
14d4203722 sed: fix recursive symlink (#30849)
Use `spack build` as build dir to avoid recursive link error.

```
config.status: linking /var/folders/fy/x2xtwh1n7fn0_0q2kk29xkv9vvmbqb/T/s3j/spack-stage/spack-stage-sed-4.8-wraqsot6ofzvr3vrgusx4mj4mya5xfux/spack-src/GNUmakefile to GNUmakefile
config.status: executing depfiles commands
config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
==> sed: Executing phase: 'build'
==> [2022-05-25-14:15:51.310333] 'make' '-j8' 'V=1'
make: GNUmakefile: Too many levels of symbolic links
make: stat: GNUmakefile: Too many levels of symbolic links
make: *** No rule to make target `GNUmakefile'.  Stop.
```
2022-05-25 12:48:05 -07:00
Adam J. Stewart
1bc742c13e py-scikit-learn: add v1.1.1 (#30830) 2022-05-25 13:13:48 -06:00
fpruvost
2712ea6299 Pastix: new package (#30533) 2022-05-25 10:15:53 -07:00
Matthieu Dorier
a9c064cd7e [mochi-margo] added version 0.9.10 (#30844) 2022-05-25 10:33:45 -06:00
Ben Morgan
17fc244cba geant4: new version v11.0.2 (#30847) 2022-05-25 11:34:40 -04:00
Harmen Stoppels
334c786b52 ccache: add missing pkgconfig dep (#30846) 2022-05-25 17:28:46 +02:00
Adam J. Stewart
492541b9cb py-scipy: add v1.8.1 (#30831) 2022-05-25 08:22:10 -07:00
Erik Schnetter
369f825523 reprimand: update homepage (#30840) 2022-05-25 14:53:46 +00:00
Harmen Stoppels
aba9149b71 p7zip: fix %clang (#30843) 2022-05-25 06:24:38 -07:00
Harmen Stoppels
b29f27aec7 dsfmt: set CC=cc (#30842) 2022-05-25 15:17:58 +02:00
eugeneswalker
0176d9830d tau: add v2.31.1 (#30820) 2022-05-25 07:13:31 -06:00
Harmen Stoppels
0c9370ce72 julia: support clang, set llvm NDEBUG correctly (#30800) 2022-05-25 14:42:14 +02:00
Harmen Stoppels
3620204db6 mbedtls: add conflicts over inline asm trouble with clang@12: (#30801) 2022-05-25 14:41:49 +02:00
Jen Herting
13984a4e8d [lcms] Added version 2.13.1 and URL version (#30811)
Co-authored-by: James A Zilberman <jazrc@rit.edu>
2022-05-25 03:53:39 -06:00
Adam J. Stewart
d5c68fdc0d py-pillow-simd: mark conflicts with aarch64 (#30828) 2022-05-25 10:11:58 +02:00
Chuck Atkins
93649f6b68 silo: Fix HDF5 1.13 API breakage (#30786) 2022-05-24 22:49:37 -06:00
Derek Ryan Strong
d367f1e787 Add aria2 1.36.0 (#30822) 2022-05-24 19:37:37 -06:00
Derek Ryan Strong
1c44999192 Add rsync 3.2.4 (#30821) 2022-05-25 01:17:55 +00:00
Matthieu Dorier
ad506ac2a8 [leveldb] add patch to fix check for -Wthread-safety (#30810) 2022-05-24 16:58:35 -07:00
Jen Herting
806521b4a0 [libwebp] Added version 1.2.2 (#30814)
Co-authored-by: James A Zilberman <jazrc@rit.edu>
2022-05-24 21:41:28 +00:00
Scott Wittenburg
70824e4a5e buildcache: Update layout and signing (#30750)
This PR introduces a new build cache layout and package format, with improvements for
both efficiency and security.

## Old Format
Currently a binary package consists of a `spec.json` file at the root and a `.spack` file,
which is a `tar` archive containing a copy of the `spec.json` format, possibly a detached
signature (`.asc`) file, and a tar-gzip compressed archive containing the install tree.

```
build_cache/
  # metadata (for indexing)
  <arch>-<compiler>-<name>-<ver>-24zvipcqgg2wyjpvdq2ajy5jnm564hen.spec.json
  <arch>/
    <compiler>/
      <name>-<ver>/
        # tar archive
        <arch>-<compiler>-<name>-<ver>-24zvipcqgg2wyjpvdq2ajy5jnm564hen.spack
          # tar archive contents:
          # metadata (contains sha256 of internal .tar.gz)
          <arch>-<compiler>-<name>-<ver>-24zvipcqgg2wyjpvdq2ajy5jnm564hen.spec.json
          # signature
          <arch>-<compiler>-<name>-<ver>-24zvipcqgg2wyjpvdq2ajy5jnm564hen.spec.json.asc
          # tar.gz-compressed prefix
          <arch>-<compiler>-<name>-<ver>-24zvipcqgg2wyjpvdq2ajy5jnm564hen.tar.gz
```

After this change, the nesting has been removed so that the `.spack` file is the
compressed archive of the install tree.  Now signed binary packages, will take the
form of a clearsigned `spec.json` file (a `spec.json.sig`) at the root, while unsigned
binary packages will contain a `spec.json` at the root.

## New Format

```
build_cache/
  # metadata (for indexing, contains sha256 of .spack file)
  <arch>-<compiler>-<name>-<ver>-24zvipcqgg2wyjpvdq2ajy5jnm564hen.spec.json
  # clearsigned spec.json metadata
  <arch>-<compiler>-<name>-<ver>-24zvipcqgg2wyjpvdq2ajy5jnm564hen.spec.json.sig
  <arch>/
    <compiler>/
      <name>-<ver>/
        # tar.gz-compressed prefix (may support more compression formats later)
        <arch>-<compiler>-<name>-<ver>-24zvipcqgg2wyjpvdq2ajy5jnm564hen.spack
```

## Benefits
The major benefit of this change is that the signatures on binary packages can be
verified without:

1. Having to download the tarball, or
2. having to extract an unknown tarball.

(1) is an improvement in efficiency; (2) is a security fix: we now ensure that we trust the
binary before we try to run it through `tar`, which avoids potential attacks.

## Backward compatibility
Also after this change, spack should still be able to handle the previous buildcache
structure and binary mirrors with mixed layouts.
2022-05-24 17:39:20 -04:00
Jen Herting
0fe5e72744 [libdeflate] Added version 1.10 (#30813)
Co-authored-by: James A Zilberman <jazrc@rit.edu>
2022-05-24 21:35:43 +00:00
Massimiliano Culpo
ba907defca Add a command to generate a local mirror for bootstrapping (#28556)
This PR builds on #28392 by adding a convenience command to create a local mirror that can be used to bootstrap Spack. This is to overcome the inconvenience in setting up this mirror manually, which has been reported when trying to setup Spack on air-gapped systems.

Using this PR the user can create a bootstrapping mirror, on a machine with internet access, by:

% spack bootstrap mirror --binary-packages /opt/bootstrap
==> Adding "clingo-bootstrap@spack+python %apple-clang target=x86_64" and dependencies to the mirror at /opt/bootstrap/local-mirror
==> Adding "gnupg@2.3: %apple-clang target=x86_64" and dependencies to the mirror at /opt/bootstrap/local-mirror
==> Adding "patchelf@0.13.1:0.13.99 %apple-clang target=x86_64" and dependencies to the mirror at /opt/bootstrap/local-mirror
==> Adding binary packages from "https://github.com/alalazo/spack-bootstrap-mirrors/releases/download/v0.1-rc.2/bootstrap-buildcache.tar.gz" to the mirror at /opt/bootstrap/local-mirror

To register the mirror on the platform where it's supposed to be used run the following command(s):
  % spack bootstrap add --trust local-sources /opt/bootstrap/metadata/sources
  % spack bootstrap add --trust local-binaries /opt/bootstrap/metadata/binaries
The mirror has to be moved over to the air-gapped system, and registered using the commands shown at prompt. The command has options to:

1. Add pre-built binaries downloaded from Github (default is not to add them)
2. Add development dependencies for Spack (currently the Python packages needed to use spack style)

* bootstrap: refactor bootstrap.yaml to move sources metadata out

* bootstrap: allow adding/removing custom bootstrapping sources

This operation can be performed from the command line since
new subcommands have been added to `spack bootstrap`

* Add --trust argument to spack bootstrap add

* Add a command to generate a local mirror for bootstrapping

* Add a unit test for mirror creation
2022-05-24 21:33:52 +00:00
Jen Herting
87b078d1f3 [libaec] Added version 1.0.6 (#30812)
Co-authored-by: James A Zilberman <jazrc@rit.edu>
2022-05-24 21:27:53 +00:00
Daniel Arndt
54ea1f4bf6 Allow Kokkos with OpenMPTarget backend (#30724)
* Allow Kokkos with OpenMPTarget backend

* Restrict SYCL and OpenMPTarget to C++17 or higher

* Improve C++ standard check for SYCL and OpenMPTarget

* Fix indentation
2022-05-24 14:23:47 -07:00
Sergey Kosukhin
067800bc31 mpich: re-enable building of the older versions (#30766)
* mpich: enable building @3.4:3.4.3 ~cuda

* mpich: add dependency on mxm
2022-05-24 12:57:21 -07:00
snehring
0d2eae8da0 tbl2asn: adding currently available version (#30774) 2022-05-24 12:54:42 -07:00
Massimiliano Culpo
f2a81af70e Best effort co-concretization (iterative algorithm) (#28941)
Currently, environments can either be concretized fully together or fully separately. This works well for users who create environments for interoperable software and can use `concretizer:unify:true`. It does not allow environments with conflicting software to be concretized for maximal interoperability.

The primary use-case for this is facilities providing system software. Facilities provide multiple MPI implementations, but all software built against a given MPI ought to be interoperable.

This PR adds a concretization option `concretizer:unify:when_possible`. When this option is used, Spack will concretize specs in the environment separately, but will optimize for minimal differences in overlapping packages.

* Add a level of indirection to root specs

This commit introduce the "literal" atom, which comes with
a few different "arities". The unary "literal" contains an
integer that id the ID of a spec literal. Other "literals"
contain information on the requests made by literal ID. For
instance zlib@1.2.11 generates the following facts:

literal(0,"root","zlib").
literal(0,"node","zlib").
literal(0,"node_version_satisfies","zlib","1.2.11").

This should help with solving large environments "together
where possible" since later literals can be now solved
together in batches.

* Add a mechanism to relax the number of literals being solved

* Modify spack solve to display the new criteria

Since the new criteria is above all the build criteria,
we need to modify the way we display the output.

Originally done by Greg in #27964 and cherry-picked
to this branch by the co-author of the commit.

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>

* Inject reusable specs into the solve

Instead of coupling the PyclingoDriver() object with
spack.config, inject the concrete specs that can be
reused.

A method level function takes care of reading from
the store and the buildcache.

* spack solve: show output of multi-rounds

* add tests for best-effort coconcretization

* Enforce having at least a literal being solved

Co-authored-by: Greg Becker <becker33@llnl.gov>
2022-05-24 12:13:28 -07:00
Jen Herting
494e567fe5 New package: py-x21 (#30225)
* Py-x21 now works, needs dependencies

Conflicts:
	var/spack/repos/rit-rc/packages/py-x21/package.py

* Added dependencies to py-x21

* Making flake style check happy

* [py-x21] flake8

* [py-x21]

- added homepage
- added placeholder description
- added comment about checksums

* [py-x21] added darwin support and fixed issue with python 3.7 wheel name

* [py-x21] adding checksum hash

* [py-x21] removed duplicate py-pynacl

* [py-x21]

- updated description
- updated version listing to have a different version for each version
  of python. Also, versions dependent on sys.platform
- updated url_for_version to not require post concretized information so
  that spack checksum works

* [py-x21] isort

Co-authored-by: vehrc <vehrc@rit.edu>
2022-05-24 18:12:48 +00:00
Seth R. Johnson
6a57aede57 environments: fail gracefully on missing keys (#26378) 2022-05-24 08:52:40 -07:00
edwardsp
ba701a7cf8 Update regex to correctly identify quoted args (#23494)
Previously the regex was only checking for presence of quotes as a beginning
or end character and not a matching set.  This erroneously identified the
following *single* argument as being quoted:

    source bashenvfile &> /dev/null && python3 -c "import os, json; print(json.dumps(dict(os.environ)))"
2022-05-24 08:26:07 -07:00
Matthias Wolf
557845cccc apptainer: new package (#30745) 2022-05-24 16:01:46 +02:00
iarspider
c5297523af vdt: add preload variant (#30030) 2022-05-24 12:19:09 +02:00
Evan Bollig
6883868896 libfabric has needed rdma-core for efa since 1.10.0 (#30798) 2022-05-24 04:17:47 -06:00
Satish Balay
1c5587f72d petsc: update rocrand location wrt rocm@5.1.0 (#30790)
rocm-5.1.0 removed librocrand.so from ROCM_DIR/rocrand/lib location (but  includes are still at this location)

/opt/rocm-5.0.2/lib/librocrand.so
/opt/rocm-5.0.2/rocrand/lib/librocrand.so
/opt/rocm-5.1.0/lib/librocrand.so

drwxr-xr-x 2 root root 617 Mar  8 08:20 /opt/rocm-5.0.2/rocrand/include
drwxr-xr-x 2 root root 617 Mar 31 09:48 /opt/rocm-5.1.0/rocrand/include
2022-05-24 11:54:29 +02:00
Mr-Timn
6e7eb49888 su2: add v7.3.1 (#30794) 2022-05-24 10:50:16 +02:00
Paul Wolfenbarger
3df4a32c4f trilinos: add adelus, aprepro and teuchos variants (#28935) 2022-05-24 09:49:33 +01:00
Adam J. Stewart
95b03e7bc9 gplates: add v2.3.0 (#30676) 2022-05-24 08:02:39 +02:00
Greg Becker
817ee81eaa compiler flags: imposed hashes impose the lack of additional compiler flags (#30797) 2022-05-24 01:22:29 -04:00
Tom Scogland
330832c22c strip -Werror: all specific or none (#30284)
Add a config option to strip `-Werror*` or `-Werror=*` from compile lines everywhere.

```yaml
config:
    keep_werror: false
```

By default, we strip all `-Werror` arguments out of compile lines, to avoid unwanted
failures when upgrading compilers.  You can re-enable `-Werror` in your builds if
you really want to, with either:

```yaml
config:
    keep_werror: all
```

or to keep *just* specific `-Werror=XXX` args:

```yaml
config:
    keep_werror: specific
```

This should make swapping in newer versions of compilers much smoother when
maintainers have decided to enable `-Werror` by default.
2022-05-24 00:57:09 -04:00
Todd Gamblin
306bed48d7 specs: emit better parsing errors for specs. (#24860)
Parse error information is kept for specs, but it doesn't seem like we propagate it
to the user when we encounter an error.  This fixes that.

e.g., for this error in a package:

```python
    depends_on("python@:3.8", when="0.900:")
```

Before, with no context and no clue that it's even from a particular spec:

```
==> Error: Unexpected token: ':'
```

With this PR:

```
==> Error: Unexpected token: ':'
  Encountered when parsing spec:
    0.900:
         ^
```
2022-05-24 03:33:43 +00:00
Scott Wittenburg
63402c512b Revert "Added cloud_pipline for E4S on Amazon Linux (#29522)" (#30796)
This reverts commit 07e9c0695a.
2022-05-23 21:12:48 -06:00
Brian Van Essen
736fddc079 Bugfix hwloc find cuda (#30788)
* Added autotools configure flags to ensure that hwloc finds the correct
version of CUDA that it was concretized against, rather than the first
one that package config finds.

* Added support for finding the correct version of ROCm libraries.  Fixed Flake8.

* Fixed guard on finding ROCm library
2022-05-23 20:17:46 -06:00
Jen Herting
036048c26f [py-h2] added version 3.2.0 and 4.1.0 (#29804)
* [py-h2] py-wheel is implied by PythonPackage

* [py-h2] python dependencies should be type=('build', 'run')

* [py-h2] fixed dependencies for py-h2@4.0.0

* [py-h2] added version 3.2.0

* [py-h2] added version 4.1.0

* [py-h2] Older version requires py-enum34 for older versions of python
2022-05-23 17:56:45 -07:00
Greg Becker
8616ba04db Documentation and new method for CachedCMakePackage build system (#22706)
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2022-05-23 22:48:12 +00:00
Evan Bollig
07e9c0695a Added cloud_pipline for E4S on Amazon Linux (#29522)
Add two new cloud pipelines for E4S on Amazon Linux, include arm and x86 (v3 + v4) stacks.

Notes:
- Updated mpark-variant to remove conflict that no longer exists in Amazon Linux
- Which command on Amazon Linux prefixes on all results when padded_length is too high. In this case, padded_length<=503 works as expected. Chose conservative length of 384.
2022-05-23 15:33:38 -06:00
snehring
f24886acb5 usearch: adding in new version, updating checksums (#30776) 2022-05-23 13:50:50 -07:00
snehring
5031578c39 genemark-et: updating to 4.69 (#30793) 2022-05-23 13:36:26 -07:00
Massimiliano Culpo
7c4cc1c71c archspec: add oneapi and dpcpp flag support (#30783) 2022-05-23 13:28:54 -07:00
Harmen Stoppels
f7258e246f Deprecate spack:concretization over concretizer:unify (#30038)
* Introduce concretizer:unify option to replace spack:concretization

* Deprecate concretization

* Make spack:concretization overrule concretize:unify for now

* Add environment update logic to move from spack:concretization to spack:concretizer:reuse

* Migrate spack:concretization to spack:concretize:unify in all locations

* For new environments make concretizer:unify explicit, so that defaults can be changed in 0.19
2022-05-23 13:20:34 -07:00
Maciej Wójcik
ff980a1452 plumed: add versions up to v2.8.0 (#30787) 2022-05-23 20:07:47 +00:00
Chuck Atkins
51130abf86 ci: Map visit to huge instance for the data-vis-sdk pipeline (#30779) 2022-05-23 14:16:24 -04:00
marcus-elia
383356452b abseil-cpp: add v20211102 (#30785) 2022-05-23 18:52:39 +02:00
Cody Balos
5fc1547886 xsdk-examples: add v0.3.0 (#30770)
Co-authored-by: Satish Balay <balay@mcs.anl.gov>
Co-authored-by: Veselin Dobrev <dobrev@llnl.gov>
2022-05-23 18:45:11 +02:00
Manuela Kuhn
68cd6c72c7 py-rnc2rng: fix 2.6.5 and add 2.6.6 (#30784) 2022-05-23 08:02:13 -07:00
Jean Luca Bez
3d2ff57e7b hdf5-vol-async: update new version, tests, and runtime envs (#30713)
* Update h5bench maintainers and versions

* Include version 1.1 for h5bench

* Correct release hash and set default version

* Update .tar.gz version

* Include new version and update runtime

* Update year

* Update package.py

* Update package.py
2022-05-23 09:28:26 -04:00
Massimiliano Culpo
3bc656808c llvm: make "omp_as_runtime" variant conditional (#30782)
fixes #30700

To avoid clingo adding penalties for not using the
default value for a variant, it's better to model
the variant as conditional where possible.
2022-05-23 14:21:11 +02:00
Ben Bergen
7ded692a76 gdb: add v11.2 (#30780)
- This resolves bug https://sourceware.org/PR28302
2022-05-23 12:18:26 +02:00
MichaelLaufer
aa3c7a138a py-pyfr: Add v1.14.0, add LIBXSMM variant (#30612)
* Update PyFR, Gimmik versions. Add PyFR LIBXSMM variant

* Fixes

* Changes to variants

* Update py-gimmik version requirement in py-pyfr

* Revert "Update py-gimmik version requirement in py-pyfr"

This reverts commit 3b3fde3042.

* Update libxsmm conflicts
2022-05-22 12:01:21 -06:00
Paul Kuberry
42441cddcc Add Teuchos patch that fixes implicit casting of complex numbers (#30777) 2022-05-22 09:26:33 -04:00
Abhik Sarkar
b78025345b Feature/composed boost pkg deps p3 (#28961)
* This commit removes the Boost.with_default_variants to variants that packages are precisely dependant upon. This is the third batch of 16 packages with modified boost dependencies.

* style fix

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

Co-authored-by: Tim Haines <thaines.astro@gmail.com>

* fix style

* Apply suggestions from code review

Co-authored-by: Tim Haines <thaines.astro@gmail.com>

* Fix Trilinos boost deps

* Fix style

Co-authored-by: Tim Haines <thaines.astro@gmail.com>
Co-authored-by: Tom Scogland <tom.scogland@gmail.com>
2022-05-21 15:57:59 -07:00
Harmen Stoppels
2113b625d1 gcc: add build_type and profiled variants (#30660)
Add a `build_type` variant, which allows building optimized compilers,
as well as target libraries (libstdc++ and friends).

The default is `build_type=RelWithDebInfo`, which corresponds to GCC's
default of -O2 -g.

When building with `+bootstrap %gcc`, also add Spack's arch specific
flags using the common denominator between host and new GCC.

It is done by creating a config/spack.mk file in def patch, that looks
as follows:
```
BOOT_CFLAGS := $(filter-out -O% -g%, $(BOOT_CFLAGS)) -O2 -g -march=znver2 -mtune=znver2
CFLAGS_FOR_TARGET := $(filter-out -O% -g%, $(CFLAGS_FOR_TARGET)) -O2 -g -march=znver2 -mtune=znver2
CXXFLAGS_FOR_TARGET := $(filter-out -O% -g%, $(CXXFLAGS_FOR_TARGET)) -O2 -g -march=znver2 -mtune=znver2
```
2022-05-21 23:44:51 +02:00
Jen Herting
c6c3d243e1 New package: py-motor (#30763)
* New package: py-motor

* Fixed dependency errors

* Fixed flake style errors

* Fixed linked issue

Co-authored-by: Viv Eric Hafener <vehrc@sporcbuild.rc.rit.edu>
2022-05-21 11:36:37 -05:00
Manuela Kuhn
870b997cb6 py-ww: add new package (#30767)
* py-ww: add new package

* Add missing py-pytest-runner dependency
2022-05-21 11:28:53 -05:00
snehring
c9492f1cd4 paml: add v4.10.3 (#30772) 2022-05-21 09:47:38 +02:00
dependabot[bot]
24f370491e build(deps): bump actions/upload-artifact from 3 to 3.1.0 (#30778)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 3.1.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...3cea5372237819ed00197afe530f5a7ea3e805c8)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  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>
2022-05-21 08:57:19 +02:00
Glenn Johnson
d688a699fa Fix toolchain detection for oneapi/dpcpp compilers (#30775)
The oneapi and dpcpp compilers are essentially the same except for which
binary is used foc CXX. Spack will detect them as "mixed toolchain" and
not inject compiler optimization flags. This will be needed once
archspec has entries for the oneapi and dpcpp compilers. This PR detects
when dpcpp and oneapi are in the toolchains list and explicitly sets
`is_mixed_toolchain` to `False`.
2022-05-21 08:38:01 +02:00
Chuck Atkins
4fbb822072 visit: Overhaul to build in the DAV SDK (#30594)
* mesa-glu and mesa-demos: Fix conflicts with glu and osmesa

* visit: Update visit dependencies

* ecp-data-vis-sdk: Enable +visit

* ci[data-vis-sdk]: Enable +visit
2022-05-20 19:17:30 -04:00
Sreenivasa Murthy Kolam
f86c481280 update checksum and url for mlirmiopen recipe (#30771) 2022-05-20 21:29:58 +00:00
Jen Herting
91a99882b3 [py-openslide-python] added verion 1.1.2 (#30722)
* [py-openslide-python] added verion 1.1.2 and set max py-setuptools version for 1.1.1

* [py-openslide-python]

- setuptools required for all possible newer versions
- python is type build run

* [py-openslide-python] use pil provider
2022-05-20 19:25:20 +00:00
Manuela Kuhn
74bef2105a py-formatizer: add new package (#30755) 2022-05-20 10:37:55 -07:00
Manuela Kuhn
630ebb9d8b py-pybids: add 0.8.0 and 0.15.1 (#30756) 2022-05-20 10:37:01 -07:00
iarspider
183465321e DWZ: use virtual "elf" package (#30761) 2022-05-20 10:29:11 -07:00
Nate deVelder
580f9ec86e Add newer openfast versions and preliminary OpenMP compile support (#30752)
* Add version 3.0 and 3.1 and prelim OpenMP support

* Fix flag handler missing spec variable

* Use self.compiler.openmp_flag instead of -fopenmp

* Fix whitespace
2022-05-20 10:27:47 -07:00
Jordan Galby
0b0920bc90 qt: Qt 5.15.0 requires OpenSSL 1.1.1 (#30754)
Fixes qt configure errors with external openssl on older systems (rhel7)

See
efc02f9cc3/dist/changes-5.15.0 (L346)

This means for now on, `qt ^openssl@1.0` gets you `qt@5.15.4 ~ssl`:
clingo chooses latest qt version **but disables ssl support**.
2022-05-20 18:24:30 +02:00
Greg Becker
ee04a1ab0b errors: model error messages as an optimization problem (#30669)
Error messages for the clingo concretizer have proven challenging. The current messages are incredibly vague and often don't help users at all. Unsat cores in clingo are not guaranteed to be minimal, and lead to cores that are either not useful or need to be post-processed for hours to reach a minimal core.

Following up on an idea from a slack conversation with kwryankrattiger on slack, this PR takes a new approach. We eliminate most integrity constraints and minima/maxima on choice rules in clingo, and instead force invalid states to imply an error predicate. The error predicate can include context on the cause of the error (Package, Version, etc). These error predicates are then heavily optimized against, to ensure that we do not include error facts in the solution when a solution with no error facts could be generated. When post-processing the clingo solution to construct specs, any error facts cause the program to raise an exception. This leads to much more legible error messages. Each error predicate includes a priority and an error message. The error message is formatted by the remaining arguments to produce the error message. The priority is used to ensure that when clingo has a choice of which rules to violate, it chooses the one which will be most informative to the user.

Performance:

"fresh" concretizations appear to suffer a ~20% performance penalty under this branch, while "reuse" concretizations see a speedup of around 33%. 

Possible optimizations if users still see unhelpful messages:

There are currently 3 levels of priority of the error messages. Additional priorities are possible, and can allow us finer granularity to ensure more informative error messages are provided in lieu of less informative ones.

Future work:

Improve tests to ensure that every possible rule implying an error message is exercised
2022-05-20 08:27:07 -07:00
Peter Scheibel
55f4950ed4 Petsc: fix enable-x for virtuals (#30749)
* If direct dependencies provide virtuals, add those virtual names as well
* Also refer to package by virtual name for jpeg
2022-05-20 03:15:44 +00:00
Manuela Kuhn
23960ed623 py-fracridge: add new package (#30739) 2022-05-19 17:28:39 -07:00
iarspider
fb2730d87f Update py-onnx-runtime to 1.10; update CMS patch (#30725)
* Update py-onnx-runtime to 1.10; update CMS patch

* Update package.py
2022-05-19 17:24:18 -07:00
Wileam Y. Phan
30f2394782 Run scheduled CI workflows only in the main repo (#30729)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-05-19 21:35:52 +02:00
Jordan Galby
262c3f07bf Non-existent upstream is not fatal (#30746)
A non-existent upstream should not be fatal: it could only mean it is
not deployed yet. In the meantime, it should not block the user to
rebuild anything it needs.

A warning is still emitted, to let the user decide if this is ok or not.
2022-05-19 18:27:43 +00:00
Harmen Stoppels
b018eb041f python: more +optimizations (#30742) 2022-05-19 12:25:36 -06:00
Matthew Archer
3f4398dd67 fenicsx: update to v0.4 (#30661)
* Fix for xtensor-xsimd

* Add sha256 for all new releases

* renamed ufcx package

* Update sha for ffcx

* fixed hashes and modified fenics-dolfinx to depend on ufcx

* cleaned and fixed dependency types

* use spec.satisfies in cmake_args

* bumped to ufcx@0.4.1

* address PR comments

* fix hashes

* update parmetis in cmake_args to reflect default setting

* update versions

* renamed ufcx package

* fixed hashes and modified fenics-dolfinx to depend on ufcx

* cleaned and fixed dependency types

* use spec.satisfies in cmake_args

* bumped to ufcx@0.4.1

* address PR comments

* fix hashes

* update parmetis in cmake_args to reflect default setting

* update versions

* Add dependency fix

* bump basix to 0.4.2 and address PR comments

* Versioning fixes

* Use xtensor-0.24: and loosen pybind11

* Add conflicts for partitioners

* Updates on partitioners

* use define_from_variant

* Tidy up some dependencies

* Work on multi-variants for graph partitioners

* Fix KaHIP issue.

KaHIP changed the name of its library from 'interface' to 'kahip'. Pin earlier versions of DOLFINx to earlier verisons of KaHIP for proper detection.

Co-authored-by: Chris Richardson <chris@bpi.cam.ac.uk>
Co-authored-by: Garth N. Wells <gnw20@cam.ac.uk>
2022-05-19 18:22:09 +00:00
kwryankrattiger
a225a5b276 Ascent: Add variant to disable blt_find_mpi (#30735)
This is needed to find MPI correctly on cray systems and similar.
2022-05-19 10:06:31 -07:00
iarspider
c9cfc548da Update millepede recipe (#30737) 2022-05-19 10:03:31 -07:00
Rémi Lacroix
3b30886a3a libtheora: fix the hash of a patch. (#30740)
Cosmetic changes only, probably because gitlab.xiph.org got updated.
2022-05-19 09:59:12 -07:00
Jordan Galby
c2fd98ccd2 Fix spack install chgrp on symlinks (#30743)
Fixes missing chgrp on symlinks in package installations, and errors on
symlinks referencing non-existent or non-writable locations.

Note: `os.chown(.., follow_symlinks=False)` is python3 only, but
`os.lchown` exists in both versions.
2022-05-19 08:50:24 -07:00
Valentin Volkl
a0fe6ab2ed cuda: use stage dir instead of /tmp during install (#29584) 2022-05-19 17:18:18 +02:00
Harmen Stoppels
c3be777ea8 tar: add compress deps (#30641)
* remove spack dependency from package

* tar: fix compression programs, use pigz by default instead of gzip on -z
2022-05-19 11:15:13 -04:00
Jordan Galby
8fe39be3df Don't try to mkdir upstream directory when nonexistent (#30744)
When an upstream is specified but the directory does not exist, don't
create the directory for it, it might not be yours.
2022-05-19 14:45:18 +00:00
Tiziano Müller
f5250da611 cp2k: fix unbound var use without cuda (#30736)
fixes #30631
2022-05-19 11:38:00 +02:00
David Beckingsale
c2af154cd2 RAJA and associated packages: add v2022.03.0 (#30047)
* Add raja@2022.03.0
* Add camp@2022.03.0
* Add chai@2022.03.0
* Add umpire@2022.03.1
* Latest chai, raja, umpire versions don't need submodules
* Latest chai, raja, umpire versions update CMake option names
* New umpire +device_alloc option (for latest version)
* All versions of dray are now required to build with raja@:0.14

Co-authored-by: Marty McFadden <mcfadden8@users.noreply.github.com>
2022-05-18 22:48:22 -07:00
robgics
1f6b880fff Add license dir to config (#30135)
* Change license dir from hard-coded to a configurable item

* Change config item to be a string not an array

Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2022-05-18 18:26:42 -07:00
Teodor Nikolov
2c211d95ee Catch2: update to 3.0.1 (#30732)
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-05-19 00:47:20 +00:00
Asher Mancinelli
c46f673c16 ExaSGD bugfixes (#30731)
* Small bug fixes for ExaSGD packages

* Add Slaven as maint for both exago and hiop
2022-05-18 15:25:24 -07:00
Todd Gamblin
8ff2b4b747 bugfix: handle new dag_hash() on old concrete specs gracefully. (#30678)
Trying to compute `dag_hash()` or `package_hash()` on a concrete spec that doesn't have
a `_package_hash` attribute would attempt to recompute the package hash.

This most commonly manifests as a failed lookup of a namespace if you attempt to uninstall
or compute the hashes of packages in exsternal repositories that aren't registered, e.g.:

```console
> spack spec --json c/htno
==> Error: Unknown namespace: myrepo
```

While it wouldn't change the already-assigned `dag_hash` value, this behavior is
incorrect, since the package file for a previously concrete spec:
  1. might have changed since concretization,
  2. might not exist anymore, or
  3. might just not be findable by Spack.

This PR ensures that the package hash can't be computed on older concrete specs. Instead
of calling `package_hash()` from within `to_node_dict()`, we now check for the `_package_hash`
attribute and only add the package_hash to the spec record if it's there.

This PR also handles the tricky semantics of computing `package_hash()` at concretization
time. We have to compute it *before* marking the spec concrete so that `to_node_dict` can
use it. But this means that the logic for `package_hash()` can't rely on `spec.concrete`,
as it is called *during* concretization. Instead of checking for concreteness, `package_hash()`
now checks `_patches_assigned()` to determine whether it should add them to the package
hash.

- [x] Add an assert to `package_hash()` so it can't be called on specs for which it
      would be wrong.
- [x] Add an `_assign_hash()` method to handle tricky semantics of `package_hash`
      and `dag_hash`.
- [x] Rework concretization to call `_assign_hash()` before and after marking specs
      concrete.
- [x] Rework content hash part of package hash to check for `_patches_assigned()`
      instead of `spec.concrete`.
- [x] regression test
2022-05-18 22:21:22 +00:00
Michael Kuhn
9e05dde28c harfbuzz: add gobject-introspection dependency (#30715)
Fixes #30706
2022-05-18 15:13:36 -06:00
Jen Herting
b1ef5a75f0 [py-tensorflow-hub] applied patch for newer version of zlib (#30664)
* [py-tensorflow-hub] applied patch for newer version of zlib

* [py-tensorflow-hub] patch also applies to 0.11.0

* [py-tensorflow-hub] Audit fix

1. patch URL in package py-tensorflow-hub must end with ?full_index=1
2022-05-18 13:21:21 -07:00
Timothy Brown
f9aa7c611c [WGRIB2] Pinning Jasper to v2. (#30726)
If we use v3 of Jasper, WGRIB2 fails to build due to not
finding `jpc_encode` and `jpc_decode`.
2022-05-18 09:34:22 -07:00
Timothy Brown
9a2e01e22d [G2] Pinning Jasper to version 2. (#30728) 2022-05-18 09:33:05 -07:00
Alberto Invernizzi
2090351d7f Add hip dependency for roc-obj-ls + add perl-uri-encode (#30721)
* add perl-uri-encode package

* add dependencies in hip for roc-obj-ls
2022-05-18 16:24:35 +02:00
Massimiliano Culpo
c775c322ec vendored externals: update archspec (#30683)
- Better support for 164fx
- Better support for Apple M1(pro)
2022-05-18 11:31:20 +02:00
Harmen Stoppels
1185eb9199 Compiler wrapper: fix globbing and debug out.log bell chars (#30699)
* Disable globbing

* Split on bell char when dumping cmd to out.log
2022-05-18 09:06:54 +02:00
Ryan Marcellino
51fa8e7b5e py-pytecplot: new package (#30708)
* py-pytecplot: new package

* fix copyright year

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>

* use one variant for all extras

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-05-18 01:47:17 +00:00
Mikael Simberg
f505c50770 Add tracy (#30588)
Co-authored-by: Mikael Simberg <mikael.simberg@iki.if>
2022-05-17 18:10:45 -07:00
Mark W. Krentel
2fdc817f03 hpctoolkit: add version 2022.05.15 (#30710) 2022-05-17 18:05:12 -07:00
Michael Kuhn
e1d0b35d5b gobject-introspection: add 1.72.0 (#30714)
Newer versions of gobject-introspection require Meson to build. Convert
the package into a hybrid one that still supports older versions using
Autotools.
2022-05-17 17:59:54 -07:00
Sreenivasa Murthy Kolam
ace5a7c4bf deprecate rocm releases-ROCm-4.2.0,ROCm-4.3.0,ROCm-4.3.1 (#30709) 2022-05-17 14:11:32 -07:00
kwryankrattiger
a91ae8cafe ecp-data-vis-sdk: Drop fortran from ascent spec. (#30707) 2022-05-17 16:53:52 -04:00
Chuck Atkins
b9e3ee6dd0 glew: Fix glu and glx dependencies (#30705) 2022-05-17 10:19:19 -07:00
iarspider
10ea0a2a3e Update rivet to 3.1.6, yoda to 1.9.5; fix recipes (#30702)
* Update rivet to 3.1.6, yoda to 1.9.5; fix recipes

* Use filter_compiler_wrappers instead of custom post-install step
2022-05-17 10:17:24 -07:00
Harmen Stoppels
d6f8ffc6bc add julia 1.6.6 (#30703) 2022-05-17 09:52:46 -07:00
haralmha
02be2f27d1 flatbuffers: Add version 2.0.6 (#30704) 2022-05-17 09:51:02 -07:00
Adam J. Stewart
dfd0702aec GDAL: deprecate 2.X (#30668) 2022-05-17 08:45:55 -07:00
Massimiliano Culpo
f454a683b5 Mark test_repo_last_mtime xfail on Python < 3.5 (#30696) 2022-05-17 12:45:52 +02:00
Chuck Atkins
d7d0c892d8 silo: Make HDF5 version deps more robust (#30693) 2022-05-17 04:26:35 -04:00
snehring
d566330a33 pindel: fixing compilation issues for gcc5+ (#28387) 2022-05-17 09:45:08 +02:00
Alex Hedges
446cbf4b5a sed: add v4.8.0, set gnu_mirror_path per version (#30666) 2022-05-17 09:43:01 +02:00
Tim Haines
5153c9e98c boost: constrain context-impl variant (#30654) 2022-05-17 09:42:19 +02:00
h-murai
d74f2d0be5 petsc: fix an error about handling a provider of Scalapack. (#30682) 2022-05-17 09:33:49 +02:00
Jianshen Liu
021b65d76f cppcheck: add v2.7 (#30698) 2022-05-17 07:29:46 +00:00
Adam J. Stewart
45312d49be Bazel: remove maintainer (#30697) 2022-05-17 09:29:22 +02:00
Chuck Atkins
3fcd85efe9 autoconf-archive: Patch for nvhpc support and propagate search dirs (#30692) 2022-05-17 03:29:42 +00:00
Alberto Madonna
6f3a082c3e runc: symlink sbin to bin to find it in $PATH (#30691) 2022-05-17 02:48:04 +02:00
stepanvanecek
23e2820547 sys-sage: new spack package (#30570)
* sys-sage - adding new package

* sys-sage: updated release verison

* sys-sage: remove FIXMEs from the package

* add libllvm dependency

* sys-sage: remove unnecessary libllvm dependency

Co-authored-by: Stepan Vanecek <stepan.vanecek@tum.de>
2022-05-16 17:01:34 -07:00
Sreenivasa Murthy Kolam
22b999fcd4 Add miopentensile-new recipe for ROCm-5.0.0 . ROCm-5.1.0 release (#29313)
* miopentensile-new recipe for rocm-5.0.0 release

* fix style checks

* update the version for 5.1.0 release, avoid git download
2022-05-16 16:19:35 -07:00
Michael Kuhn
1df7de62ca py-cffconvert: new package (#30694) 2022-05-16 23:16:32 +00:00
andymwood
97ec8f1d19 Avoid calling a method on a NoneType object (#30637) 2022-05-16 21:59:08 +00:00
iarspider
63b6e484fc sigcpp: protect from missing prefix.share folder (#30686) 2022-05-16 13:34:57 -07:00
Nick Forrington
2b12d19314 arm-forge: Versions up to 22.0.1 + minor updates (#30689)
* arm-forge: Download via HTTPS

Update download URL to use HTTPS (rather than HTTP)

* arm-forge: Allow +probe to depend on python3

Allow python dependency required for arm-forge+probe to be python3 as
well as 2.7.x

* arm-forge: Add versions up to 22.0.1
2022-05-16 14:30:19 -06:00
Francesco Giordano
c37fcccd7c aws-parallelcluster: add v2.11.7 (#30685) 2022-05-16 14:29:53 -06:00
Michael Kuhn
6034b5afc2 fix pkgconfig dependencies (#30688)
pkgconfig is the correct dependency, pkg-config is a provider of it.
2022-05-16 14:01:41 -06:00
Michael Kuhn
17bc937083 libfuse: add utils variant (#30675)
By default, libfuse install helper programs like `fusermount3`, which
are mostly useless if not installed with setuid (that is, `+useroot`).

However, their presence makes it complicated to use globally installed
versions, which can be combined with a Spack-installed FUSE library.

In particular, on systems that have a setuid fusermount3 binary, but no
libfuse-dev installed, it is nice to be able to build libfuse with Spack, and
have it call the system setuid executable.
2022-05-16 13:01:44 -06:00
renjithravindrankannath
ad8db0680d Correcting include and library paths using patch file for RVS (#30294)
* Correcting include and library paths using patch file for RVS to build
following library files in spack.
libperf.so.0.0
libpebb.so.0.0
libiet.so.0.0
libgst.so.0.0
libpqt.so.0.0
libmem.so.0.0
libbabel.so.0.0

* Correcting include and library paths using patch file for RVS to build
following library files in spack.
libperf.so.0.0
libpebb.so.0.0
libiet.so.0.0
libgst.so.0.0
libpqt.so.0.0
libmem.so.0.0
libbabel.so.0.0

* Replacing ROCM_PATH with RPATH in the deviceid.sh before installing in Spack build.

* Reducing multiple enviroment variable for HIP and HSA path
2022-05-16 09:44:59 -07:00
estewart08
4f033b155b [AMD][rocm-openmp-extras] - Update versions 5.0.0 through 5.1.0. (#30501)
- Removed gl dependency.
- Specify clang as cmake compiler as gcc was being
  improperly picked up. As a result, ffi include
  path was needed in C/CXX flags.

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-05-16 09:22:48 -07:00
Sreenivasa Murthy Kolam
ad829ccee1 Apply cyclades removal patch for the llvm-amdgpu package (#29376)
* apply cyclades removal patch for the llvm-amdgpu spack package

* update the changes with develop branch
2022-05-16 09:15:26 -07:00
Tom Vander Aa
4b60a17174 Extrae: add support for Intel OneAPI (#30684) 2022-05-16 09:02:00 -06:00
Ethan Stam
edb91f4077 ParaView: -no-ipo for intel builds (#18193) 2022-05-16 08:01:34 -06:00
Todd Gamblin
0fdc3bf420 bugfix: use deterministic edge order for spack graph (#30681)
Previously we sorted by hash values for `spack graph`, but changing hashes can make the
test brittle and the node order seem nondeterministic to users.

- [x] Sort nodes in `spack graph` by the default edge order, which takes into account
      parent and child names as well as dependency types.
- [x] Update ASCII test output for new order.
2022-05-16 11:36:41 +02:00
Francine Lapid
8b34cabb16 subversion: added apxs support (#30381) 2022-05-16 10:42:15 +02:00
haralmha
77fb651e01 frontier-client: adapt pacparser_setmyip function to new pacparser release (#29936) 2022-05-16 10:41:21 +02:00
Harmen Stoppels
35ed7973e2 eccodes, fix jasper again (#30635)
* eccodes: jasper@:2

* Revert "jasper: avoid --gc-sections / hidden symbols"

This reverts commit d1bc0f39c516a7dc1e941aa4a804b7468a200b75.

* bump ecbuild, drop cmake constraint for newer versions

* add ecbuild dep to eccodes@develop
2022-05-16 10:40:35 +02:00
snehring
e73b19024f bpp-suite and deps: urls to GitHub (#30665)
* bpp-core: moving url to github. Fixing compilation issue.

* bpp-phyl: moving url to github.

* bpp-seq: moving url to github

* bpp-popgen: new package

* bpp-suite: moving url to github, new version.

* bpp-popgen: removing unused cmake_args.
2022-05-16 10:23:39 +02:00
Alex Hedges
7803bc9e5f screen: add v4.9.0, add required build deps (#30667) 2022-05-16 10:11:02 +02:00
dlkuehn
55c400297c treesub: change jdk dependency to java, add build to java dep. type (#30672)
Co-authored-by: David Kuehn <las_dkuehn@iastate.edu>
2022-05-16 10:06:09 +02:00
Umar Arshad
8686e18494 clblast: add new package (#30677) 2022-05-16 10:03:15 +02:00
Diego Alvarez
d28967bbf3 nextflow: add v22.04.1 (#30679) 2022-05-16 09:01:15 +02:00
Diego Alvarez
5f928f71c0 openjdk: add 11.0.15+10, 17.0.3+7 (#30680) 2022-05-16 08:58:51 +02:00
Ken Raffenetti
dc7bdf5f24 mpich: add support for Mellanox HCOLL (#30662)
Co-authored-by: Federico Ficarelli <federico.ficarelli@pm.me>
2022-05-15 14:14:47 +02:00
Danny McClanahan
a681fd7b42 Introduce GroupedExceptionHandler and use it to simplify bootstrap error handling (#30192) 2022-05-15 10:59:11 +00:00
Alberto Invernizzi
f40f1b5c7c Fix for spack stage command not extracting packages in custom paths (#30448) 2022-05-15 12:13:42 +02:00
Michael Kuhn
edd3cf0b17 qt: add 5.15.4 (#30656) 2022-05-14 23:34:06 -06:00
Michael Kuhn
ff03e2ef4c uninstall: fix dependency check (#30674)
The dependency check currently checks whether there are only build
dependencies left for a particular package. However, the database also
contains uninstalled packages, which can cause the check to fail.

For instance, with `bison` and `flex` having already been uninstalled,
`m4` will have the following dependents:
```
bison ('build', 'run')--> m4
flex ('build',)--> m4
libnl ('build',)--> m4
```
`bison` and `flex` should be ignored in this case because they are not
installed anymore.

Fixes #30673
2022-05-14 18:01:29 -07:00
Zack Galbreath
bee311edf3 Update GitLab environment variable name (#30671)
Use the IAM credentials that correspond to our new binary mirror
(s3://spack-binaries vs. s3://spack-binaries-develop)
2022-05-14 16:33:32 -06:00
Jen Herting
73b69cfeec [py-pyworld] Limiting numpy version. See: https://zenn.dev/ymd_h/articles/934a90e1468a05 (#30670) 2022-05-14 09:22:31 -05:00
Cameron Smith
4a1041dbc3 CEED v5.0 release (#29710)
* ceed50: add ceed 5.0.0 and pumi 2.2.7

* libceed-0.10

* ceed50: add omegah

* omega-h: mpi and cuda builds work

* omega-h: fix style

* New package: libfms

* New version: gslib@1.0.7

CEED: add some TODO items for the 5.0 release

* ceed: variant name consistent with package name

* LAGHOS: allow newer versions of MFEM to be used with v3.1

* LIBCEED: add missing 'install' target in 'install_targets'

* CEED: address some TODO items + some tweaks

* MFEM: add new variant for FMS (libfms)

* CEED: v5.0.0 depends on 'libfms' and 'mfem+fms'

* RATEL: add missing 'install' target in 'install_targets'

* CEED: add dependency for v5.0.0 on Ratel v0.1.2

* CEED: add Nek-related dependencies for ceed@5.0.0

* CEED: v5.0.0 depends on MAGMA v2.6.2

* libCEED: set the `CUDA_ARCH` makefile parameter

* libCEED: set the `HIP_ARCH` makefile parameter

Co-authored-by: Jed Brown <jed@jedbrown.org>
Co-authored-by: Veselin Dobrev <dobrev@llnl.gov>
Co-authored-by: Veselin Dobrev <v-dobrev@users.noreply.github.com>
2022-05-13 18:29:02 -07:00
Jen Herting
ccab7bf4fd New package: py-pyworld (#28641)
* espnet first build with depends

* added cython>=0.24.0' and type='build'

* [py-pyworld] updated copyright

Co-authored-by: Sid Pendelberry <sid@rit.edu>
2022-05-13 17:19:58 -05:00
John W. Parent
e24e71be6a Preserve Permissions on .zip extraction (#30407)
#24556 merged in support for Python's .zip file support via ZipFile.
However as per #30200 ZipFile does not preserve file permissions of
the extracted contents. This PR returns to using the `unzip`
executable on non-Windows systems (as was the case before #24556)
and now uses `tar` on Windows to extract .zip files.
2022-05-13 13:38:05 -07:00
kwryankrattiger
72d83a6f94 Ascent: Patch 0.8.0 for finding ADIOS2. (#30609) 2022-05-13 13:26:53 -07:00
Todd Gamblin
5cb40cbcd2 directory_layout: remove outdated checks for old DAG hash
We previously had checks in `directory_layout` to check for build-dependency
conflicts when we weren't storing build dependencies.  We don't need
those anymore; we can just rely on the DAG hash now that it includes everything
we know about each spec.

- [x] Remove vestigial code for checking installed spec against concrete spec
      in `ensure_installed()`
- [x] Remove `SpecHashCollisionError` -- if specs have the same hash now, they're
      the same as far as `DirectoryLayout` should be concerned.
- [x] Convert spec comparison to `dag_hash()` comparison when adding extensions.
2022-05-13 10:45:12 -07:00
Todd Gamblin
c93e465134 full hash: fix uninstall and gc with full hash DB
The database now stores full hashes, so we need to adjust the criteria we use to
determine if something can be uninstalled. Specifically, it's ok to uninstall thing that
have remaining build-only dependents.
2022-05-13 10:45:12 -07:00
Todd Gamblin
521c206030 concretizer: enable hash reuse with full hash
With the original DAG hash, we did not store build dependencies in the database, but
with the full DAG hash, we do. Previously, we'd never tell the concretizer about build
dependencies of things used by hash, because we never had them. Now, we have to avoid
telling the concretizer about them, or they'll unnecessarily constrain build
dependencies for new concretizations.

- [x] Make database track all dependencies included in the `dag_hash`
- [x] Modify spec_clauses so that build dependency information is optional
      and off by default.
- [x] `spack diff` asks `spec_clauses` for build dependencies for completeness
- [x] Modify `concretize.lp` so that reuse optimization doesn't affect fresh
      installations.
- [x] Modify concretizer setup so that it does *not* prioritize installed versions
      over package versions. We don't need this with reuse, so they're low priority.
- [x] Fix `test_installed_deps` for full hash and new concretizer (does not work
      for old concretizer with full hash -- leave this for later if we need it)
- [x] Move `test_installed_deps` mock packages to `builtin.mock` for easier debugging
      with `spack -m`.
- [x] Fix `test_reuse_installed_packages_when_package_def_changes` for full hash
2022-05-13 10:45:12 -07:00
Todd Gamblin
15eb98368d bugfix: tests trying to ignore package changes should use build_hash
- [x] update test to use `build_hash` instead of `dag_hash`, as we're testing for
      graph structure, and specifically NOT testing for package changes.
- [x] make hash descriptors callable on specs to simplify syntax for invoking them
- [x] make `Spec.spec_hash()` public
2022-05-13 10:45:12 -07:00
Todd Gamblin
7c1d566959 Remove all uses of runtime_hash; document lockfile formats and fix tests
This removes all but one usage of runtime hash. The runtime hash was being used to write
historical lockfiles for tests, but we don't need it for that; we can just save those
lockfiles.

- [x] add legacy lockfiles for v1, v2, v3
- [x] fix bugs with v1 lockfile tests (the dummy lockfile we were writing was not actually
      a v1 lockfile because it used the new spec file format).
- [x] remove all but one runtime_hash usage -- that one needs a small rework of the
      concretizer to really fix, as it's about separate concretization of build
      dependencies.
- [x] Document the history of the lockfile format in `environment/__init__.py`
2022-05-13 10:45:12 -07:00
Todd Gamblin
7ab46e26b5 content_hash(): make it work on abstract specs
Some test cases had to be modified in a kludgy way so that abstract specs made
concrete would have versions on them. We shouldn't *need* to do this, as the
only reason we care is because the content hash has to be able to get an archive
for a version.

This modifies the content hash so that it can be called on abstract specs,
including only relevant content.

This does NOT add a partial content hash to the DAG hash, as we do not really
want that -- we don't need in-memory spec hashes to need to load package files.
It just makes `Package.content_hash()` less prickly and tests easier to
understand.
2022-05-13 10:45:12 -07:00
Todd Gamblin
6db215dd89 spec: fix serialization, avoid double call to node_dict_with_hashes 2022-05-13 10:45:12 -07:00
Todd Gamblin
72b38851eb hashes: revert spack monitor hash changes to preserve original protocol
`spack monitor` expects a field called `spec_full_hash`, so we shouldn't change that.
Instead, we can pass a `dag_hash` (which is now the full hash) but not change the field
name.
2022-05-13 10:45:12 -07:00
Todd Gamblin
9d9e970367 fix full hash calls in spack graph 2022-05-13 10:45:12 -07:00
Todd Gamblin
283a4e6068 remove no longer needed full hash check 2022-05-13 10:45:12 -07:00
Todd Gamblin
d20cc7b124 spec: remove hashes_final as it's no longer needed.
`hashes_final` was used to indicate when a spec was concrete but possibly lacked
`full_hash` or `build_hash` fields. This was only necessary because older Spacks
didn't generate them, and we want to avoid recomputing them, as we likely do not
have the same package files as existed at concretization time.

Now, we don't need to do that -- there is only the DAG hash and specs are either
concrete and have a `dag_hash`, or not concrete and have no `dag_hash`. There's
no middle ground.
2022-05-13 10:45:12 -07:00
Scott Wittenburg
0dd373846f gitlab ci: switch over to new bucket for all stacks 2022-05-13 10:45:12 -07:00
Scott Wittenburg
c202953528 gitlab ci: Docstring methods or make them private 2022-05-13 10:45:12 -07:00
Scott Wittenburg
be0e3f4458 binary_distribution: Refactor index generation into smaller methods 2022-05-13 10:45:12 -07:00
Scott Wittenburg
fd3bb5177b env: Use order of roots to resolve DAG hash conflicts in legacy lockfiles 2022-05-13 10:45:12 -07:00
Scott Wittenburg
9de61c0197 env: enforce predictable ordering when reading lockfile
Without some enforcement of spec ordering, python 2 produced
different results in the affected test than did python 3.  This
change makes the arbitrary but reproducible decision to sort
the specs by their lockfile key alphabetically.
2022-05-13 10:45:12 -07:00
Scott Wittenburg
84cfb3b7fe spec: fix infinite recursion when computing package hash
Issue described in the following PR comment:

https://github.com/spack/spack/pull/28504#issuecomment-1051835568

Solution described in subsequent comment:

https://github.com/spack/spack/pull/28504#issuecomment-1053986132
2022-05-13 10:45:12 -07:00
Scott Wittenburg
cb0d12b9d5 Fix how environments are read from lockfile 2022-05-13 10:45:12 -07:00
Scott Wittenburg
f6e7c0b740 hashes: remove full_hash and build_hash from spack 2022-05-13 10:45:12 -07:00
Scott Wittenburg
512645ff2e environment: key by dag_hash instead of build_hash 2022-05-13 10:45:12 -07:00
Scott Wittenburg
32a2c22b2b tests: fix failing test_hash_change
The full hash appears twice in the spec dict now, replacing just
the value replaces it under "hash" and "full_hash".  Only replace
the one that appears after "full_hash".

I'm actually not sure what purpose this test served, so maybe it
could be removed, as it may be testing some distinction between
full and dag hash which no longer exists.
2022-05-13 10:45:12 -07:00
Todd Gamblin
e02020c80a Include all deps and package content in the dag_hash()
For a long time, Spack has used a coarser hash to identify packages
than it likely should. Packages are identified by `dag_hash()`, which
includes only link and run dependencies. Build dependencies are
stripped before hashing, and we have notincluded hashes of build
artifacts or the `package.py` files used to build.  This means the
DAG hash actually doesn't represent all the things Spack can build,
and it reduces reproducibility.

We did this because, in the early days, users were (rightly) annoyed
when a new version of CMake, autotools, or some other build dependency
would necessitate a rebuild of their entire stack. Coarsening the hash
avoided this issue and enabled a modicum of stability when only reusing
packages by hash match.

Now that we have `--reuse`, we don't need to be so careful. Users can
avoid unnecessary rebuilds much more easily, and we can add more
provenance to the spec without worrying that frequent hash changes
will cause too many rebuilds.

This commit starts the refactor with the following major change:

- [x] Make `Spec.dag_hash()` include build, run, and link
      dependencides and the package hash (it is now equivalent to
      `full_hash()`).

It also adds a couple of bugfixes for problems discovered during
the switch:

- [x] Don't add a `package_hash()` in `to_node_dict()` unless
      the spec is concrete (fixes breaks on abstract specs)

- [x] Don't add source ids to the package hash for packages without
      a known fetch strategy (may mock packages are like this)

- [x] Change how `Spec.patches` is memoized. Using
      `llnl.util.lang.memoized` on `Spec` objects causes specs to
      be stored in a `dict`, which means they need a hash.  But,
      `dag_hash()` now includes patch `sha256`'s via the package
      hash, which can lead to infinite recursion
2022-05-13 10:45:12 -07:00
Massimiliano Culpo
d900ac2003 Reuse concretization by default (#30396)
* Enable reuse by default in Spack
* Update documentation to match new default
* Configure pipelines not to reuse software
2022-05-13 09:11:10 -07:00
Teodor Nikolov
faa277778e sarus: fix dependency on boost (#30659)
The program_options variant is disabled by default in Boost and
has to be enabled explicitly.
2022-05-13 08:41:41 -06:00
Harmen Stoppels
b60d3dcd29 libtree: add v3.0.4, v3.1.1 (#30658) 2022-05-13 11:35:06 +00:00
Todd Gamblin
e0bed2d6a7 tutorial stack: allow deprecated versions (#30648)
For tutorial builds, we should continue to allow deprecated builds to be installed. We
can update them as needed when we update the tutorial, but we don't need to correct them
immediately on deprecation in CI.

- [x] add `deprecated:true` to tutorial `spack.yaml` config.
2022-05-13 04:09:39 -06:00
Massimiliano Culpo
745c191d73 Gitlab pipelines: add a small legend in the logs to interpret "[x]" (#30643) 2022-05-12 21:46:35 +02:00
Chuck Atkins
42e9430fbc silo: Cleanup the HDF5 dependency specs (#30593) 2022-05-12 15:43:11 -04:00
Chuck Atkins
f11572166f vtk: fix hdf5 version specification (#30592) 2022-05-12 21:16:57 +02:00
Adam J. Stewart
aa6665d5ee py-scikit-learn: add v1.1.0 (#30649) 2022-05-12 12:50:26 -06:00
Simon Pintarelli
3e8f31a068 atompaw: add version 4.2.0.0 (#30650) 2022-05-12 18:09:30 +00:00
Massimiliano Culpo
3625ea4726 Revert "atompaw: add new package (#30619)" (#30647)
This reverts commit 12b0278f08.
2022-05-12 19:47:47 +02:00
snehring
245b95223d soapdenovo-trans: add v1.0.5 (#30629) 2022-05-12 19:14:49 +02:00
Max Zeyen
e00c8a7d98 code-server: add new versions (#30646) 2022-05-12 10:08:02 -07:00
Adam J. Stewart
97792f04e9 py-netcdf4: add v1.5.8 (#30598) 2022-05-12 09:02:27 -05:00
Frédéric Simonis
ca069f6906 precice: add v2.4.0 (#30633) 2022-05-12 15:57:53 +02:00
Qian Jianhua
35a91bdd72 fakexrandr: remove 'ldconfig' from Makefile (#30632) 2022-05-12 14:55:45 +02:00
Mikael Simberg
c866a50446 Add patch for compiling llvm ~omp_as_runtime (#30583) 2022-05-12 05:49:39 -06:00
Harmen Stoppels
3033abb5bd Add cuda 11.7 compat bounds for gcc/clang (#30639) 2022-05-12 10:41:30 +00:00
Harmen Stoppels
d37f439557 pigz: add v2.7 (#30640) 2022-05-12 10:39:08 +00:00
dlkuehn
18710936f1 platypus: limit install to Python2 (#30624)
Co-authored-by: David Kuehn <las_dkuehn@iastate.edu>
2022-05-12 09:30:45 +02:00
Simon Pintarelli
12b0278f08 atompaw: add new package (#30619) 2022-05-12 09:24:38 +02:00
Eureka Hwang
34fd6e36ce cuda: add v11.7 (#30630) 2022-05-12 09:20:42 +02:00
marcosmazz
363536fd92 quantum-espresso: add gipaw variant (#30628)
Co-authored-by: Marcos Mazzini - <mmazzini@serafin.ccad.unc.edu.ar>
2022-05-11 18:31:19 -07:00
Abhik Sarkar
d57d343b6d This commit removes the Boost.with_default_variants to variants (#28960)
that packages are precisely dependant upon. This is the second batch
of 20 packages with modified boost dependencies.
2022-05-11 17:16:19 -07:00
Tamara Dahlgren
1b254d19c4 Allow read-only access to file cache (when needed) (#29693)
* Allow read-only access to file cache (when needed)
* Tweaked and added unit tests
* Skip test_cache_init_entry_fails for windows
2022-05-11 16:25:06 -07:00
shanedsnyder
82b916be36 add darshan-3.4.0-pre1 release (#30569)
include new dependencies on autotools/m4/etc.
2022-05-11 16:21:56 -06:00
snehring
66d3648200 bamutil: updating to 1.0.15 (#30623)
* bamutil: updating to 1.0.15

* bamutil: switching to github archive
2022-05-11 22:12:32 +00:00
AMD Toolchain Support
d2fc7b9f7d lammps: updating googletest version to 1.11 to avoid GTEST_DISALLOW_ASSIGN_Error (#30563)
* updating googletest version to 1.11 to avoid GTEST_DISALLOW_ASSIGN_ error

* limiting the version scope

* modified the version limit

Co-authored-by: mohan babu <mohbabul@amd.com>
2022-05-11 13:17:47 -06:00
Wouter Deconinck
1067749371 assimp: add v5.2.3 (#29629) 2022-05-11 20:03:07 +02:00
snehring
8bd893367d sentieon-genomics: add version 202112.02, remove manual download (#30145) 2022-05-11 19:38:24 +02:00
Mikael Simberg
2ed542b744 Add conflict for ROCm and asio in HPX package (#30620) 2022-05-11 10:33:16 -07:00
Stephen Hudson
5cb7a5db45 libEnsemble: add v0.9.1 (#30621) 2022-05-11 16:41:45 +00:00
Cory Bloor
f84991b5a8 rocfft: add spack build test support (#29957)
* rocfft: add spack build test support

* Style cleanup for variant specs
2022-05-11 09:37:22 -07:00
Hadrien G
928ecd1f4e [acts] Add version 19 (#30615)
No build system visible changes, so AFAIK this should Just Work
2022-05-11 09:13:27 -07:00
Thomas Dickerson
72e594fb10 Fix default buildcache location (#30230)
Resolve path/URL parsing issues introduced by #27021
2022-05-11 17:50:04 +02:00
Vasileios Karakasis
f9d701f9cf ReFrame: add v3.11.0 (#30578) 2022-05-11 08:41:40 -06:00
Harmen Stoppels
63f7053fe8 eccodes: add v2.25.0 (#30618) 2022-05-11 12:04:43 +00:00
Harmen Stoppels
1c51d6313b jasper: avoid --gc-sections / hidden symbols (#30617)
Jasper v3.x changed a default to hide hidden symbols, but apparently
eccodes relies on those symbols and fails to link otherwise.
2022-05-11 11:52:54 +00:00
Harmen Stoppels
c164e6fe03 jasper: update cmake dependency (#30616) 2022-05-11 13:33:46 +02:00
Gregory Lee
2d823dcf90 gobject-introspection: add libffi dependency (#30601) 2022-05-11 13:29:54 +02:00
Tom Scogland
a12c638224 Neovim luajit (#28855)
Upstream neovim builds with luajit-openresty or luajit in almost all
cases.  To support the current usage, a user can specify that they want
lua, but this will allow the use of the normal (faster, better tested
and better maintained) setup.
2022-05-11 05:01:35 -06:00
Richard Berger
0739691688 flecsi: add GPU dependencies and refactor (#30543) 2022-05-11 12:51:21 +02:00
Seth R. Johnson
62ffc8c1dd vecgeom: new version 1.2.0 (#30586) 2022-05-11 10:49:14 +00:00
Wouter Deconinck
61969566f8 pango: updated versions with MesonPackage (#30591) 2022-05-11 12:48:07 +02:00
Ida Mjelde
49948bb3e7 root: changes due to var name webui->webgui from version 6.17.02 (#29964) 2022-05-11 10:44:17 +00:00
Harmen Stoppels
c9c347f0f0 jasper: add 3.0.x (#30614) 2022-05-11 12:26:23 +02:00
Dan Bonachea
ee9b61be7a upcxx,gasnet: Add a note to the +cuda variant description (#30602)
Resolves issue #30589
2022-05-10 22:45:32 -06:00
snehring
be45292a9c last: updating to 1282 (#30606) 2022-05-11 00:26:54 +00:00
HELICS-bot
61f8c97bb7 helics: Add version 3.2.0 (#30604)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-10 23:02:08 +00:00
Adam J. Stewart
b0403624cf py-scikit-learn: add v1.1.0rc1 (#30600) 2022-05-10 21:50:56 +00:00
Adam J. Stewart
4baed234be py-xarray: add v2022.3.0 (#30599) 2022-05-10 21:45:55 +00:00
Adam J. Stewart
9de1edee80 py-geopandas: add v0.10.X (#30597) 2022-05-10 21:32:12 +00:00
Harmen Stoppels
9ce726eed5 openmpi: only set variants when condition is met (#30585) 2022-05-10 13:05:44 -06:00
Harmen Stoppels
c45ee381bd hyperfine: add v1.13.0 (#30584) 2022-05-10 18:05:13 +00:00
Sergey Kosukhin
56d76766b7 cray-mpich: add variant 'wrappers' (#30249) 2022-05-10 12:22:04 -05:00
Andrea Valenzuela
6c309bbb32 Add checksum for py-pylint@2.13.5 (#30356)
* Add checksum for py-pylint@2.13.5

* Update dependencies

* Add checksum for py-astroid@2.11.4

* Correct py-toml addition and add py-tomli dependency

* Remove py-pytoml dependency for versions @2.13:

* Modify py-astroid version range

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

* Discontinue py-astroid dependency @2.8.0:2.8 for new versions

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

* Discontinue py-mccabe dependency @0.6.0:0.6 for new versions

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

* Remove mccabe and setuptools-scm dependencies

* Update astroid dependencies

* Extend py-typed-ast version range to future releases

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

* py-dill only required for version 2.13.5 and above

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

* Add maccabe dependency and correct setuptools run dependency

* Setuptools fix

* Add setuptools as run dependency

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-05-10 11:21:48 -06:00
Chris White
cfed42ecfc guard against SPACK_FC possibly not being defined (#30581) 2022-05-10 12:19:03 -05:00
haralmha
01b79abcdf py-pyarrow: Add versions 8.0.0 and 7.0.0 (#30524)
* py-pyarrow: Add version 7.0.0

* Add version constraints on dependencies

* Add version 8.0.0

* arrow: Add version 8.0.0

* py-pyarrow: Allow version 8.0.0 of arrow
2022-05-10 12:16:55 -05:00
G-Ragghianti
4d84c774d1 Added dependency on hipify-clang and fixed hipify-clang package (#30576) 2022-05-10 09:38:16 -07:00
Sreenivasa Murthy Kolam
00e9780136 Update ROCm recipes for rocm-5.1.0 release (#30027)
* Bump up rocm release version to rocm-5.1.0
* update rocm-opencl for rocm-5.1.0 release
* update the migraphx,miopen(hip,opencl),mivisionx,rocm-tensile
* update the mlirmiopen checksum version
2022-05-10 08:42:22 -07:00
Scott Wittenburg
a65e00392c gitlab ci: do not override .generate tags for e4s (#30571) 2022-05-10 08:05:19 -07:00
Wouter Deconinck
250fa6dada libxkbcommon: new version 1.4.0, support for newer meson build system (#30420) 2022-05-10 09:59:26 -05:00
Danny McClanahan
dd7822fdf7 depend on gettext in subversion when +nls is enabled (#30573) 2022-05-10 09:58:35 -05:00
Todd Gamblin
555202833f bootstrap: clean up CI workflows a bit (#30574)
- [x] Add `mkdir -p` and `chmod` to ensure `/home/spack-test` exists and
      has correct permissions.
- [x] Remove version comments from dependabot-managed action commits
- [x] Don't duplicate comment describing required fixes for distros with
      patched git
2022-05-10 16:27:37 +02:00
Valentin Volkl
b76fc61deb agile: add new package (#30244)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-05-10 12:40:04 +00:00
Ida Mjelde
186abe525e gitconddb: add v0.2.0 and v0.1 patch releases (#29965)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2022-05-10 11:13:06 +00:00
Dom Heinzeller
31d8607b3c hdf: build on Ubuntu 20.04 aarch64 (#30522) 2022-05-10 10:47:04 +02:00
Brice Videau
622841063c userspace-rcu: add versions up to v0.13.1 (#30534) 2022-05-10 08:57:08 +02:00
mcuma
23b7071bb0 wi4mpi: fix a missed conversion to string (#30541) 2022-05-10 07:42:21 +02:00
Erik Schnetter
359229f5f8 memkind: conflicts with jemalloc (#30070) 2022-05-10 07:41:01 +02:00
JDBetteridge
2db545ffdc libflame: fix for linking with BLIS library (#30527) 2022-05-10 07:39:02 +02:00
Ryan Mulhall
3986ac3828 fms: add versions and expose more CMake build options (#28966)
Co-authored-by: rem1776 <Ryan.Mulhall@lscamd50-d.gfdl.noaa.gov>
2022-05-10 07:28:23 +02:00
Robert Cohn
c47c5d75e4 oneapi: add v2022.2 (#30531) 2022-05-10 07:25:06 +02:00
Todd Gamblin
a0d4630448 bugfix: spack pkg list should be more picky about what's a package (#30577)
`spack pkg list` tests were broken by #29593 for cases when your `builtin.mock` repo
still has stale backup files (or, really, stale directories) sitting around. This
happens if you switch branches a lot. In this case, things like this were causing
erroneous packages in the mock listing:

```
var/spack/repos/builtin.mock/packages/
    foo/
        package.py~
```

- [x] make `list_packages` consider only directories with one-deep `package.py` files.
2022-05-10 04:57:58 +00:00
Tom Scogland
7f1659786b Add a Lua build-system (#28854)
Reworking lua to allow easier substitution of the base lua implementation.

Also adding in a maintained version of luajit and re-factoring the entire stack 
to use a custom build-system to centralize functionality like environment 
variable management and luarocks installation.

The `lua-lang` virtual is now versioned so that a package that requires 
Lua 5.1 semantics can get any lua, but one that requires 5.2 will only 
get upstream lua.

The luaposix package requires lua-bit32, but only when built with a 
lua conforming to version 5.1.  This adds the package, and the 
dependencies, but exposed a problem with luarocks dependency 
detection.  Since we're  installing each package in its own "tree" and 
there's no environment  variable to list extra trees, spack now 
generates a luarocks config  file that lists all the trees of all the 
dependencies, and references  it by setting `LUAROCKS_CONFIG` 
in the build environment of every LuaPackage.  This allows luarocks 
to find the spack installed  dependencies correctly rather than 
trying (and failing) to download them.

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: Tom Scogland <tscogland@llnl.gov>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-05-10 06:54:38 +02:00
Sam Grayson
b5da0d02bf Fix py-numpy #30373 by backporting Numpy PR (#30486)
* Fix py-numpy #30373

* Update `when` for patch.
2022-05-09 22:13:39 -06:00
eugeneswalker
8575afac4e e4s on mac ci: set SPACK_DISABLE_LOCAL_CONFIG=1 (#30568)
* e4s on mac ci: set SPACK_DISABLE_LOCAL_CONFIG=1
* export SPACK_USER_CACHE_PATH so that ~/.spack/... isn't used
2022-05-09 21:13:34 -06:00
Todd Gamblin
7997dfcf80 tests: fix references to hard-coded master branch in git tests (#30572)
Some of our `git` tests still fail when `init.defaultBranch` is set to something other
than `master`.

- [x] get rid of all hard-coded `master` refs
- [x] Use `'default'` to key tests that use the default branch
2022-05-09 16:42:25 -07:00
Erik Schnetter
19c8e02e32 sqlite: New version 3.38.5 (#30556) 2022-05-09 16:25:39 -06:00
sabrivatansever
320e6e06e6 Cutlang: Create package.py (#30535) 2022-05-09 20:39:53 +00:00
Adam J. Stewart
d7b66dd286 Python: add v3.8.13 and v3.7.13 (#30553)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2022-05-09 13:49:41 -06:00
Rebecca Haluska
70a8b91ec2 sina: add 1.11 version (#27161)
* sina: add 1.11 version

* Moved 1.11 above 1.10
2022-05-09 19:27:59 +00:00
Douglas Thain
1883fedae7 cctools: add 7.4.2 (#28766)
* Update to cctools-7.4.2
* Add simple patch to remove broken test cases.
* import unlink
* add maintainers
2022-05-09 10:50:00 -07:00
Sergei Shudler
c4412306da Added a new patched version for parallelmergetree (#29499)
* Added a new patched version for parallelmergetree

* Retain older versions instead of replacing them
2022-05-09 10:47:34 -07:00
Dom Heinzeller
c49508648a Get timeout for web requests with urllib from spack config, same as for curl (#30468) 2022-05-09 10:35:17 -07:00
John W. Parent
9bcf496f21 Windows permissions: uninstalling and cleaning stages (#29714)
When running on Windows, Spack may generate files in the stage/install
prefixes that do not have write permissions, which prevents the
removal of those directories (e.g. when cleaning stages or uninstalling).
There should be a refactoring to avoid this in the first place, but that
is assumed to be longer term, so the temporary fix is to make such files
writable if they are not. This PR:

* Automatically handles these permissions errors when uninstalling
  packages from the Spack root (makes then writable)
* Updates similar already-existing logic when removing Spack-managed
  stage directories (the error-handling was assuming all errors were
  permissions errors and was therefore handling other errors
  inappropriately)

Note: these permissions issues only appear on Windows so this logic is
only applied there (permissions are not modified for this purpose on
Linux etc.).

This also adds special handling for a case where calling `isdir`
on an `os.DirEntry` object would fail for improperly-created symlinks
(e.g. on Windows, using `os.symlink` without `target_is_directory=True`).
Note this specific issue only came up when enabling link_tree tests
(specifically `source_merge_visitor_cant_be_cyclical`).
2022-05-09 10:28:14 -07:00
Will Saunders
060e88387e hipsycl: add v0.9.2 (#30566) 2022-05-09 17:54:14 +02:00
Oliver Perks
a24bae1986 Updated ACfL package to 22.0.1, removing 21 package, as no licence required is now false. (#30562) 2022-05-09 15:12:08 +02:00
Erik Schnetter
d08520cb15 mpitrampoline: Correct build environment (#30549) 2022-05-09 13:40:10 +02:00
Erik Schnetter
5397dcee51 simulationio: add v9.0.2 (#30550) 2022-05-09 13:39:18 +02:00
Adam J. Stewart
d62e4b1d66 py-radiant-mlhub: add new versions (#30555) 2022-05-09 12:44:49 +02:00
Adam J. Stewart
9ed1c76486 py-cartopy: add new versions (#30554) 2022-05-09 12:44:33 +02:00
Adam J. Stewart
10efbc071f py-geocube: add v0.3.1 (#30558) 2022-05-09 12:44:01 +02:00
Massimiliano Culpo
d517dcdc71 tcl: add v8.6.12 (#30560) 2022-05-09 11:12:16 +02:00
Massimiliano Culpo
104d60887f CI: fix bootstrapping on Fedora (#30559)
Fedora updated git, so we need to apply, again, the
workaround for CVE-2022-24765
2022-05-09 09:11:03 +00:00
Erik Schnetter
1bde91735b mpitrampoline: New version 4.0.2 (#30548) 2022-05-09 10:01:41 +02:00
Erik Schnetter
335083d2dc openssl: Update to 1.1.1o (#30551) 2022-05-08 22:57:37 -06:00
Peter Scheibel
0858c281e4 Cray manifest file: accept "nvidia" as "nvhpc" (#30428)
* create function for translating compiler names on specs/compiler entries in manifest

* add tests for translating compiler names on spec/compiler entries

* use higher-level function in test and add comment to prefer testing via higher-level function

* opensuse clingo check should not fail on account of this pr, but I cannot get it to pass by restarting via CI UI
2022-05-08 17:51:27 -07:00
Erik Schnetter
adc8a2ca00 curl: New version 7.83.0 (#30552) 2022-05-09 00:36:03 +02:00
Derek Ryan Strong
dc6d45c8b4 Add latest Lmod 8.6, 8.7 (#30542)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2022-05-07 20:04:10 -06:00
Harmen Stoppels
fcaf9c8cdf gcc: version 12.1.0 (#30537) 2022-05-07 19:28:54 -06:00
Phil Carns
1f74dc63dc Add mochi-margo 0.9.9 (#30539)
- necessary for compatibility with upcoming Mercury 2.2.0 release
2022-05-07 19:28:36 -06:00
Francesco Di Natale
ceaad43e54 Addition of 1.1.9dev version for py-maestrowf (#30523)
* Addition of 1.1.9dev version.

* Small style fix -- extra blank line.

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

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

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

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

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

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

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

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

* Additional dependencies and version constraints.

* Revert to py-poetry.

* Remove run from cryptography (build only).

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-05-07 19:28:23 -06:00
Erik
4c8eb92314 Put make() inside a self.run_test call (#30536) 2022-05-07 18:45:57 -06:00
Ryan Marcellino
89775e32c0 vim: add +gtk variant to pair with +gui (#30520)
* vim: add +gtk3 variant to pair with +gui

* address review comments
2022-05-07 17:49:33 -06:00
Robert Pavel
5ab526185a Force GCC to always provide a C++14 flag (#29781)
* Force GCC to always provide a C++14 flag

Updated gnu logic so that the c++14 flag for g++ is always propagated.
This fixes issues with build systems that error out if passed an empty
string for a flag.

Engaging in the best kind of software engineering by updating the unit
test to pass with the value it is now passed. This should better match
the expected flag for g++ compiling with the C++14 standard
2022-05-07 13:09:20 -04:00
WYF
654a07d642 nmap: fix build issue (#30429) 2022-05-07 03:02:26 +02:00
JDBetteridge
dfdbd1151d Eigen: turn on BUILD_TESTING for build to complete (#30528)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-05-06 16:28:33 -06:00
Sebastian Schmitt
22f3ef0a21 Add sphinx-tabs package (#27698)
* Add py-docutils@0.16

* Add sphinx-tabs package

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

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

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

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

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

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-05-06 10:33:38 -05:00
Jim Galarowicz
165bcf5cc3 openspeedshop: fix missing import statement (#30506) 2022-05-06 10:27:09 -05:00
Greg Becker
27462bc982 Fix improper type for InvalidDependencyError argument (#30504) 2022-05-06 16:23:12 +02:00
eugeneswalker
c2afb4b916 arborx: inherit from CudaPackage, ROCmPackage (#30490) 2022-05-06 16:18:06 +02:00
Thomas Dickerson
6c6685b5fa boost: add support for alternate boost-context backends (#30496)
The fcontext backend is the default high-performance backend.
The ucontext backend is needed when using Boost context in conjunction with ASAN.
The WinFibers backend...also exists.

https://www.boost.org/doc/libs/1_79_0/libs/context/doc/html/context/cc/implementations__fcontext_t__ucontext_t_and_winfiber.html
2022-05-06 16:14:45 +02:00
Ken Raffenetti
17c32811fb level-zero: add new package (#30253)
Co-authored-by: Robert Cohn <rscohn2@gmail.com>
Co-authored-by: Robert Cohn <robert.s.cohn@intel.com>
Co-authored-by: John Mellor-Crummey <johnmc@rice.edu>
2022-05-06 16:12:23 +02:00
WYF
ad1391db75 gdb: fix run issue with v9.2 (#30491) 2022-05-06 07:53:40 -06:00
Chuck Atkins
d8e010a9f5 ci: Enable the ParaView GUI in the DAVSDK pipeline (#30473)
* ci: Enable the ParaView GUI in the DAVSDK pipeline

* qt: Patch for long paths in ci
2022-05-06 09:36:56 -04:00
Seth R. Johnson
5a55e78073 py-qrcode: new package (#30529) 2022-05-06 07:05:53 -06:00
Todd Gamblin
c1007efe5a slurm: add new versions to address CVEs 2022-29500, 2022-29501 and 2022-29502 (#30525)
Due to CVE 2022-29500, CVE 2022-29501, and CVE 2022-29502, SLURM versions prior to
21.08.8 and 20.11.9 are deprecated.

See:
* https://www.schedmd.com/news.php?id=260#OPT_260
* https://cve.report/CVE-2022-29500
* https://cve.report/CVE-2022-29501
* https://cve.report/CVE-2022-29502

- [x] Deprecate versions prior to 21.08.8 and 20.11.9
- [x] Add 21-08-8-1, 21-08-8-2, and 20-11-9-1
2022-05-06 07:05:41 -06:00
Harmen Stoppels
2f14695882 docs: jobserver & generated makefiles (#30526) 2022-05-06 14:04:48 +02:00
Brian Van Essen
afc2d4284a Added a version for a tag that sets a stable version of master to pull (#30511) 2022-05-06 01:45:38 -06:00
dependabot[bot]
999eee64b8 build(deps): bump docker/build-push-action from 2.10.0 to 3 (#30515)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.10.0 to 3.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](ac9327eae2...e551b19e49)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-06 08:38:07 +02:00
dependabot[bot]
5d0f2bb461 build(deps): bump docker/setup-qemu-action from 1.2.0 to 2 (#30518)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1.2.0 to 2.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](27d0a4f181...8b122486ce)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-06 08:37:34 +02:00
dependabot[bot]
ec295a13fd build(deps): bump docker/setup-buildx-action from 1.7.0 to 2 (#30517)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1.7.0 to 2.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](f211e3e9de...dc7b9719a9)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-06 08:37:11 +02:00
dependabot[bot]
1b1770ea9e build(deps): bump docker/login-action from 1.14.1 to 2 (#30516)
Bumps [docker/login-action](https://github.com/docker/login-action) from 1.14.1 to 2.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](dd4fa0671b...49ed152c8e)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-06 08:36:50 +02:00
Tom Scogland
d3a0ac1c0a Preserve jobserver file descriptors into build environment (#30302)
This ensures that multiple spack instances called from `make` will respect the maximum number of jobs in the POSIX jobserver across packages.

Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2022-05-06 04:09:58 +00:00
Jim Galarowicz
3137e7c61b Add two critical fixes and update for version 1.0.4 (#30507) 2022-05-05 18:37:52 -06:00
Mark Grondona
202214d855 flux-sched: add patch for signedness compare issue on gcc@9.40 (#30514)
Problem: GCC 9.4.0 catches a bad integer comparison in
resource/hlapi/bindings/c++/reapi_cli_impl.hpp in flux-sched@0.22.0
and current master.

Add a patch to work around the problem until an upstream fix is
available.
2022-05-06 00:11:04 +00:00
Ken Raffenetti
b6e1cbd86d mpich: Add ROCm variant (#30502)
* mpich: Add ROCm variant

* fixup
2022-05-05 15:49:41 -06:00
Gregory Lee
e6d1c2d9f3 updated stat build dep requirements (#30505) 2022-05-05 20:24:43 +00:00
Niclas Jansson
1a368419da neko: Add version 0.3.2 (#30497)
* neko: Add version 0.3.2

* Switch to sha256

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>

* Fix url pattern

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-05-05 20:12:48 +00:00
Tom Scogland
6898b7c2f6 harden unit tests, enable basic parallelism (#29593)
* use the init.defaultBranch name, not master

* make tcl and modules/common independent

Both used to use not just the same directory, but the same *file* for
their outputs.  In parallel this can cause problems, but it can also
accidentally allow expected failures to pass if the file is left around
by mistake.

* use a non-global misc_cache in tests

* make pkg tests resilient to gitignore

* make source cache and module directories non-global
2022-05-05 11:48:16 -07:00
Harmen Stoppels
2836648904 Makefile generator for parallel spack install of environments (#30254)
`make` solves a lot of headaches that would otherwise have to be implemented in Spack:

1. Parallelism over packages through multiple `spack install` processes
2. Orderly output of parallel package installs thanks to `make --sync-output=recurse` or `make -Orecurse` (works well in GNU Make 4.3; macOS is unfortunately on a 16 years old 3.x version, but it's one `spack install gmake` away...)
3. Shared jobserver across packages, which means a single `-j` to rule them all, instead of manually finding a balance between `#spack install processes` & `#jobs per package` (See #30302).

This pr adds the `spack env depfile` command that generates a Makefile with dag hashes as
targets, and dag hashes of dependencies as prerequisites, and a command
along the lines of `spack install --only=packages /hash` to just install
a single package.

It exposes two convenient phony targets: `all`, `fetch-all`. The former installs the environment, the latter just fetches all sources. So one can either use `make all -j16` directly or run `make fetch-all -j16` on a login node and `make all -j16` on a compute node. 

Example:

```yaml
spack:
  specs: [perl]
  view: false
```

running

```
$ spack -e . env depfile --make-target-prefix env | tee Makefile
```
generates

```Makefile
SPACK ?= spack

.PHONY: env/all env/fetch-all env/clean

env/all: env/env

env/fetch-all: env/fetch

env/env: env/.install/cdqldivylyxocqymwnfzmzc5sx2zwvww
	@touch $@

env/fetch: env/.fetch/cdqldivylyxocqymwnfzmzc5sx2zwvww env/.fetch/gv5kin2xnn33uxyfte6k4a3bynhmtxze env/.fetch/cuymc7e5gupwyu7vza5d4vrbuslk277p env/.fetch/7vangk4jvsdgw6u6oe6ob63pyjl5cbgk env/.fetch/hyb7ehxxyqqp2hiw56bzm5ampkw6cxws env/.fetch/yfz2agazed7ohevqvnrmm7jfkmsgwjao env/.fetch/73t7ndb5w72hrat5hsax4caox2sgumzu env/.fetch/trvdyncxzfozxofpm3cwgq4vecpxixzs env/.fetch/sbzszb7v557ohyd6c2ekirx2t3ctxfxp env/.fetch/c4go4gxlcznh5p5nklpjm644epuh3pzc
	@touch $@

env/dirs:
	@mkdir -p env/.fetch env/.install

env/.fetch/%: | env/dirs
	$(info Fetching $(SPEC))
	$(SPACK) -e '/tmp/tmp.7PHPSIRACv' fetch $(SPACK_FETCH_FLAGS) /$(notdir $@) && touch $@

env/.install/%: env/.fetch/%
	$(info Installing $(SPEC))
	+$(SPACK) -e '/tmp/tmp.7PHPSIRACv' install $(SPACK_INSTALL_FLAGS) --only-concrete --only=package --no-add /$(notdir $@) && touch $@

# Set the human-readable spec for each target
env/%/cdqldivylyxocqymwnfzmzc5sx2zwvww: SPEC = perl@5.34.1%gcc@10.3.0+cpanm+shared+threads arch=linux-ubuntu20.04-zen2
env/%/gv5kin2xnn33uxyfte6k4a3bynhmtxze: SPEC = berkeley-db@18.1.40%gcc@10.3.0+cxx~docs+stl patches=b231fcc arch=linux-ubuntu20.04-zen2
env/%/cuymc7e5gupwyu7vza5d4vrbuslk277p: SPEC = bzip2@1.0.8%gcc@10.3.0~debug~pic+shared arch=linux-ubuntu20.04-zen2
env/%/7vangk4jvsdgw6u6oe6ob63pyjl5cbgk: SPEC = diffutils@3.8%gcc@10.3.0 arch=linux-ubuntu20.04-zen2
env/%/hyb7ehxxyqqp2hiw56bzm5ampkw6cxws: SPEC = libiconv@1.16%gcc@10.3.0 libs=shared,static arch=linux-ubuntu20.04-zen2
env/%/yfz2agazed7ohevqvnrmm7jfkmsgwjao: SPEC = gdbm@1.19%gcc@10.3.0 arch=linux-ubuntu20.04-zen2
env/%/73t7ndb5w72hrat5hsax4caox2sgumzu: SPEC = readline@8.1%gcc@10.3.0 arch=linux-ubuntu20.04-zen2
env/%/trvdyncxzfozxofpm3cwgq4vecpxixzs: SPEC = ncurses@6.2%gcc@10.3.0~symlinks+termlib abi=none arch=linux-ubuntu20.04-zen2
env/%/sbzszb7v557ohyd6c2ekirx2t3ctxfxp: SPEC = pkgconf@1.8.0%gcc@10.3.0 arch=linux-ubuntu20.04-zen2
env/%/c4go4gxlcznh5p5nklpjm644epuh3pzc: SPEC = zlib@1.2.12%gcc@10.3.0+optimize+pic+shared patches=0d38234 arch=linux-ubuntu20.04-zen2

# Install dependencies
env/.install/cdqldivylyxocqymwnfzmzc5sx2zwvww: env/.install/gv5kin2xnn33uxyfte6k4a3bynhmtxze env/.install/cuymc7e5gupwyu7vza5d4vrbuslk277p env/.install/yfz2agazed7ohevqvnrmm7jfkmsgwjao env/.install/c4go4gxlcznh5p5nklpjm644epuh3pzc
env/.install/cuymc7e5gupwyu7vza5d4vrbuslk277p: env/.install/7vangk4jvsdgw6u6oe6ob63pyjl5cbgk
env/.install/7vangk4jvsdgw6u6oe6ob63pyjl5cbgk: env/.install/hyb7ehxxyqqp2hiw56bzm5ampkw6cxws
env/.install/yfz2agazed7ohevqvnrmm7jfkmsgwjao: env/.install/73t7ndb5w72hrat5hsax4caox2sgumzu
env/.install/73t7ndb5w72hrat5hsax4caox2sgumzu: env/.install/trvdyncxzfozxofpm3cwgq4vecpxixzs
env/.install/trvdyncxzfozxofpm3cwgq4vecpxixzs: env/.install/sbzszb7v557ohyd6c2ekirx2t3ctxfxp

env/clean:
	rm -f -- env/env env/fetch env/.fetch/cdqldivylyxocqymwnfzmzc5sx2zwvww env/.fetch/gv5kin2xnn33uxyfte6k4a3bynhmtxze env/.fetch/cuymc7e5gupwyu7vza5d4vrbuslk277p env/.fetch/7vangk4jvsdgw6u6oe6ob63pyjl5cbgk env/.fetch/hyb7ehxxyqqp2hiw56bzm5ampkw6cxws env/.fetch/yfz2agazed7ohevqvnrmm7jfkmsgwjao env/.fetch/73t7ndb5w72hrat5hsax4caox2sgumzu env/.fetch/trvdyncxzfozxofpm3cwgq4vecpxixzs env/.fetch/sbzszb7v557ohyd6c2ekirx2t3ctxfxp env/.fetch/c4go4gxlcznh5p5nklpjm644epuh3pzc env/.install/cdqldivylyxocqymwnfzmzc5sx2zwvww env/.install/gv5kin2xnn33uxyfte6k4a3bynhmtxze env/.install/cuymc7e5gupwyu7vza5d4vrbuslk277p env/.install/7vangk4jvsdgw6u6oe6ob63pyjl5cbgk env/.install/hyb7ehxxyqqp2hiw56bzm5ampkw6cxws env/.install/yfz2agazed7ohevqvnrmm7jfkmsgwjao env/.install/73t7ndb5w72hrat5hsax4caox2sgumzu env/.install/trvdyncxzfozxofpm3cwgq4vecpxixzs env/.install/sbzszb7v557ohyd6c2ekirx2t3ctxfxp env/.install/c4go4gxlcznh5p5nklpjm644epuh3pzc
```

Then with `make -O` you get very nice orderly output when packages are built in parallel:
```console
$ make -Orecurse -j16
spack -e . install --only-concrete --only=package /c4go4gxlcznh5p5nklpjm644epuh3pzc && touch c4go4gxlcznh5p5nklpjm644epuh3pzc
==> Installing zlib-1.2.12-c4go4gxlcznh5p5nklpjm644epuh3pzc
...
  Fetch: 0.00s.  Build: 0.88s.  Total: 0.88s.
[+] /tmp/tmp.b1eTyAOe85/store/linux-ubuntu20.04-zen2/gcc-10.3.0/zlib-1.2.12-c4go4gxlcznh5p5nklpjm644epuh3pzc
spack -e . install --only-concrete --only=package /sbzszb7v557ohyd6c2ekirx2t3ctxfxp && touch sbzszb7v557ohyd6c2ekirx2t3ctxfxp
==> Installing pkgconf-1.8.0-sbzszb7v557ohyd6c2ekirx2t3ctxfxp
...
  Fetch: 0.00s.  Build: 3.96s.  Total: 3.96s.
[+] /tmp/tmp.b1eTyAOe85/store/linux-ubuntu20.04-zen2/gcc-10.3.0/pkgconf-1.8.0-sbzszb7v557ohyd6c2ekirx2t3ctxfxp
```

For Perl, at least for me, using `make -j16` versus `spack -e . install -j16` speeds up the builds from 3m32.623s to 2m22.775s, as some configure scripts run in parallel.

Another nice feature is you can do Makefile "metaprogramming" and depend on packages built by Spack. This example fetches all sources (in parallel) first, print a message, and only then build packages (in parallel).

```Makefile
SPACK ?= spack

.PHONY: env

all: env

spack.lock: spack.yaml
	$(SPACK) -e . concretize -f

env.mk: spack.lock
	$(SPACK) -e . env depfile -o $@ --make-target-prefix spack

fetch: spack/fetch
	@echo Fetched all packages && touch $@

env: fetch spack/env
	@echo This executes after the environment has been installed

clean:
	rm -rf spack/ env.mk spack.lock

ifeq (,$(filter clean,$(MAKECMDGOALS)))
include env.mk
endif
```
2022-05-05 10:45:21 -07:00
Brian Van Essen
0dd9e5c86f Enable PyTorch 1.10.x to build on Power systems (#30494)
* Use patches from IBM's Open CE project to enable PyTorch to build on
Power systems.

Cherry-pick a patch to allow earlier versions of PyTorch to build with
CUDA 11.4.

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

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-05-05 16:38:45 +00:00
Tamara Dahlgren
011a491b16 package audit: ensure stand-alone test method not include in build-phase testing (#30352) 2022-05-05 18:04:16 +02:00
Massimiliano Culpo
c9714533f3 clingo: add v5.5.2 (#30495)
* clingo add v5.5.2

* Unify dependencies for @spack and @master
2022-05-05 08:58:23 -07:00
David
faeffdfaf2 Update totalview package.py with new version and maintainer (#30341)
* Update totalview package.py with new version and maintainer

* Update totalview/package.py version order

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-05-05 08:37:56 -07:00
Dom Heinzeller
a15a69a769 Bug fix for mesa-glu: if gl is provided by mesa, need to specify argument to ./configure (#30082) 2022-05-05 08:35:54 -07:00
Hans Fangohr
9a33121859 octopus: update to 11.4 and add tests (#30321)
* octopus: adding versions up to 11.4

* octopus: add smoke tests

* octopus: add necessary flags for gcc@10

* octopus: update to compilation and dependencies

* octopus: adding new variants

* octopus: remove 'poke' (as this poke is not in spack [yet])

* octopus: allow compilation from git repo develop branch

* octopus: adapt to spack style requirements

* octopus: add maintainer

* octopus: make tests after install optional

Thank you @tldahlgren

* octopus: follow recommended practice for test input data

Move the two configuration files we use for smoke tests into `test`
subdirectory. Thanks @tldahlgren.

* Adding maintainer

with their agreement by email

* octopus: reduce duplication of flags

- part of code review

* octopus: https is preferred over http

* octopus: remove .99 from versioning information

Thanks to https://github.com/spack/spack/pull/26402, we can drop the
"2:3.99" notation when we mean all versions 2.x and 3.x

Examples: b9e72557e8 (diff-b8373d30b3a141c495c2281273ee6184fc513413142afaf2adac1f406cd6b0d7)

(from review)

* octopus: args.extend([x]) -> args.append(x)

(hint from review)
2022-05-05 08:33:16 -07:00
Ken Raffenetti
e88396e5ed yaksa: Add support for cuda_arch variants (#30471) 2022-05-05 08:12:21 -07:00
Harmen Stoppels
dcd2f8a4ed ucx: overhaul package recipe (#30215)
- hyphens to underscore in variant names (e.g. `~ib_hw_tm` instead of `~ib-hw-tm`)
- disable docs, disable go, drop the unused `doc` variant
- `+static +shared` => `libs=static,shared`
- `vfs` support (add libfuse@3: dep)
- fix `backtrace_detail` for UCX 1.12+ (`--enable-backtrace-detail` => `--with-bfd`)
- group variants and sort
2022-05-05 15:07:34 +02:00
Valentin Volkl
381ec8abac baurmc: add new package (#30245)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-05-05 13:30:45 +02:00
Jennifer Green
fd6d226524 git: adding subtree support, post-install step, reordered deps (#30400) 2022-05-05 11:08:51 +02:00
Adam J. Stewart
cef9245ee1 LAPACK: add API compatibility versions (#29828) 2022-05-05 10:38:20 +02:00
dlkuehn
24fecdc738 rnaz: add version 2.1.1 and git repository to newest version. (#30349)
Co-authored-by: David Kuehn <las_dkuehn@iastate.edu>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-05-05 10:32:41 +02:00
snehring
4a228055e2 trimmomatic: adding more flexible java dep (#30488) 2022-05-05 10:21:20 +02:00
Wouter Deconinck
17ede26cea flatbufffers: patches are in v2.0.0 (#30492) 2022-05-05 10:14:10 +02:00
SXS Bot
8bcccbeac7 spectre: add v2022.05.05 (#30493)
Co-authored-by: sxs-bot <sxs-bot@users.noreply.github.com>
2022-05-05 09:49:25 +02:00
Greg Becker
e6346eb033 spack external find: add search path customization (#30479) 2022-05-05 08:59:44 +02:00
Seth R. Johnson
a5d06325e7 qt: fix ~opengl and use_spack_dep (#30487) 2022-05-04 22:41:37 -04:00
Dan Bonachea
9bb23a7f46 UPC++: minor packaging improvements (#30482)
* upcxx: Add `spack external find` support

* upcxx: Minor tweaks to Shasta support
2022-05-04 15:27:21 -07:00
Andrea Valenzuela
5a434cb840 Add scitokens-cpp recipe and also as a variant for xrootd (#30362)
* Add scitokens-cpp recipe

* Add scitokens-cpp variant in xrootd

* Fix typo

* Fix flake8 style errors

* Update license date

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-05-04 13:03:50 -07:00
iarspider
0be5dea13f Fix professor recipe (#30002)
* [WIP] Cleanup professor dependencies

* Add dependency on ROOT
* Remove direct dependency on wxwidgets
    * `prof-I` tool requires matplotlib with wxwidgets backend, made that optional

* Update package.py

* Update package.py (#38)

* Update package.py

* Update package.py
2022-05-04 11:19:43 -07:00
David
b6f2a70f7b Update gtk-doc depends for tce findings (#30337)
gtk-doc can call pkg-config when used at runtime, so pkgconfig needs
to be a runtime requirement.

itstool needs to be a build-time requirement.
2022-05-04 11:17:34 -07:00
Olivier Cessenat
0d3d1ea7d0 gxsview: vtk9 no longer builds libvtkjpeg... (#30340) 2022-05-04 11:12:49 -07:00
Andrea Valenzuela
39c4a66e5b Add checksum for py-prompt-toolkit@3.0.29 (#30330)
Co-authored-by: aandvalenzuela <andrea.valenzuela.ramirez@cern.ch>
2022-05-04 11:53:53 -06:00
Carlos Bederián
0bd0ba53a3 curl: tls=mbedtls requires fPIC (#30447) 2022-05-04 10:53:33 -07:00
snehring
e24373f262 gatk: updating and expanding java dependency (#30476) 2022-05-04 17:51:44 +00:00
Adam J. Stewart
b7f33fb393 Python package: add backup BINDIR setting (#30408) 2022-05-04 10:50:18 -07:00
Chuck Atkins
250d5d2c00 qt: Assimp dependency specificationa is more nuanced (#30460)
libassimp has been a dependency for all of 5.x but expressing that has
varied significantly throughout the 5.x lifecycle:

  v5.0:  qt3d uses internal-only libassimp
  v5.5:  external-only libassimp
  v5.6:  either internal or external libassimp via autodetection
  v5.9:  user-selectable internal-vs-external via -assimp
  v5.14: additional qtquick3d module uses -assimp
  v5.15: qtquick3d switches to the -quick3d-assimp option
    * current bug where the incorrect target is setup
2022-05-04 13:30:15 -04:00
Sergey Kosukhin
8b0f6187e0 bugfix: fix filter_compiler_wrappers for Cray compiler (#29786) 2022-05-04 10:13:12 -07:00
Adam J. Stewart
8bf988abb9 GDAL: add v3.4.3 (#30474) 2022-05-04 16:34:17 +00:00
Bitllion
aab7dcaad9 add package: abacus (#30416)
* add pacakge: abacus

* rename

* fix some style bugs

* update package:abacus

* fix some style bugs

* format code

* Delete a line of useless comments

* updatee abacus
2022-05-04 09:29:08 -07:00
Mikael Simberg
5b68fa1ecb Add mimalloc package with use in HPX and pika (#30457)
* Add mimalloc package

* Add mimalloc as allocator option to pika

* Add mimalloc as allocator option to hpx

* Set git property globally instead of per-version in pika, hpx, and mimalloc packages

Co-authored-by: Mikael Simberg <mikael.simberg@iki.if>
2022-05-04 09:19:15 -07:00
acastanedam
4d03a2768e gpi-2_fix_deps: setup 'gawk' and 'sed' dependencies (#29740)
Strictly, `sed` is a `build` and `run` dependency in all gpi-2
versions, whereas `gawk` is a `run` (`build` and `run`) dependency for
gpi-2 versions greater or equal (less) than 1.4.0
2022-05-04 09:14:21 -07:00
Scott Wittenburg
6b6147d5a0 gitlab: Remove temporary storage url from all stacks (#29949)
Gitlab pipelines run for spack already have other S3 storage locations
configured for storage of binaries, so this PR removes the redundant
per-pipeline mirror.  As a result, the "cleanup" jobs will no longer be
generated at the end of each pipeline, removing one possible point of
pipeline failure.
2022-05-04 09:18:47 -06:00
Andrea Valenzuela
6702e87ee4 Add checksum for version 1.1.13 and update dependencies (#30470) 2022-05-04 10:08:43 -05:00
fpruvost
7ad5ca2cc3 chameleon: add maintainers information (#30472) 2022-05-04 08:57:44 -06:00
Auriane R
2418cfb79b pika: Add 0.4.0 release (#30469) 2022-05-04 16:29:30 +02:00
Ross Miller
9486c76d70 Use gccgo to bootstrap go on aarch64 (#30350)
The go-bootstrap package doesn't work on aarch64 platforms, so the only way
to build Go is to use gccgo.

Also, some versions of gccgo have a bug that prevents them from compiling
go (see golang/go#47771), so this patch limits gcc to versions newer than
10.4.0 or 11.3.0.

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-05-04 16:16:53 +02:00
fpruvost
dc99fe98b9 chameleon: add new package (#30368) 2022-05-04 08:09:54 -06:00
Andrea Valenzuela
cb97b25646 Add checksum for py-plac@1.3.5 (#30327)
Co-authored-by: aandvalenzuela <andrea.valenzuela.ramirez@cern.ch>
2022-05-04 08:06:11 -06:00
Andrea Valenzuela
a84593a510 Add checksum for py-networkx@2.7.1 and fix python dependency (#30326)
Co-authored-by: aandvalenzuela <andrea.valenzuela.ramirez@cern.ch>
2022-05-04 08:05:51 -06:00
Paul Ferrell
2f6556ea82 mesa: intel needs c99 standard specified under intel. (#30334) 2022-05-04 14:21:25 +02:00
snehring
b4213b2c60 maq: adding perl dep, addressing gcc errors (#30312) 2022-05-04 14:07:02 +02:00
lpoirel
e378d96d15 namd: place an upper bound on the charmpp dependency version (#30397)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-05-04 13:58:25 +02:00
Axel Huebl
715686f0ec WarpX: add v22.05 (#30467)
Update `warpx` & `py-warpx` to the latest release, `22.05`.
2022-05-04 00:57:42 -06:00
snehring
d0fdaf6d03 igv: changing to 'all platforms' version. Adding igvtools variant. (#30379) 2022-05-04 08:29:06 +02:00
Adam J. Stewart
b8ebaa0813 py-shapely: add v1.8.2 (#30466) 2022-05-04 07:43:52 +02:00
Massimiliano Culpo
5c7d6c6e10 Remove deprecated "--run-tests" option of "spack install" (#30461) 2022-05-04 07:43:29 +02:00
eugeneswalker
96f9a1d88b boost: fix v1.78 build with oneapi (#30463) 2022-05-03 23:29:37 -06:00
Carlos Bederián
f5eb9fb501 autodock-vina: add versions up to v1.2.3, fixes (#30443)
* C++ package, use spack_cxx
* download from github, add 1.2.x versions
* remove patches already present in 1.1.2-boost-new release
* specify boost dependencies
2022-05-04 06:24:15 +02:00
Paul Ferrell
dd8f533e97 paraview: add LANL/TCE used variants for Paraview (#30336)
- Added +eyedomelighting
- Added +pagosa
- Added +fortran
- Added pandas dependency and min version
2022-05-04 06:18:35 +02:00
Glenn Johnson
bab41de538 ncl: constrain hdf5 dependency to version 1.10 (#29607) 2022-05-03 23:11:34 -05:00
Harsh Bhatia
17c1808ef7 new package: py-pytaridx (#30444)
* new package: pytaridx

* fixed copyright year

* Update git link

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

* added type in python depends

* added pypi link

* Update package.py

* Update package.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-05-03 23:10:49 -05:00
snehring
157ee3458f ea-utils: new version, cleanup, and newer gcc compat (#30204) 2022-05-04 06:06:59 +02:00
dependabot[bot]
3ce8bff22e build(deps): bump docker/setup-buildx-action from 1.6.0 to 1.7.0 (#30387)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](94ab11c41e...f211e3e9de)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  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>
2022-05-04 06:04:38 +02:00
Ethan Stam
281165693a ParaView: let paraview build its own verdict tpl (#30332) 2022-05-04 06:03:52 +02:00
eugeneswalker
f8653dfb9b mesa@22: gallium-xlib -> xlib (#30465) 2022-05-04 05:53:09 +02:00
Frank Willmore
a6589daa87 Vacuumms 1.1.1 (#30458)
* adding updated package for vacuumms

* deprecating old version

* add link to DOI

* style: trailing whitespace

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

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-05-03 19:13:43 -06:00
Richard Berger
43a503c195 flcl: add new versions (#30363)
* flcl: add new versions

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

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>

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

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2022-05-03 19:01:32 -06:00
Keita Iwabuchi
1eff83990b Metall Package: add v0.20 (#30446)
* Metall package: add dependency to GCC for build test

* Package Metall: add v.017

* Package Metall: update the package file

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

Co-authored-by: Bernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com>

* Metall package: add v0.18 and v0.19

* Metall Package: add v0.20

Co-authored-by: Bernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com>
2022-05-03 16:46:04 -07:00
Lucas Frérot
17e71a675a tamaas: new package (#30449)
* tamaas: added new package

* tamaas: passing dependency prefixes to build

* tamaas: Python 3.7 dependency

* tamaas: compiler conflicts and correct ~python

* tamaas: no newline in docstring

* tamaas: correct python build dep. when ~python
2022-05-03 16:17:17 -07:00
Adam J. Stewart
872aa32a00 py-matplotlib: add v3.5.2 (#30459) 2022-05-03 17:06:04 -06:00
Ken Raffenetti
4c19410669 mpich: add datatype engine variant (#30257)
Starting with MPICH 3.4, we offer different datatype engine options
(dataloop or yaksa). The default is 'auto', which will choose based on
the device configuration. Starting with MPICH 4.0, building against an
external yaksa library is supported.

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-05-03 22:12:19 +02:00
Massimiliano Culpo
a5e92893d3 Simplify fixture used to test spack info (#30456) 2022-05-03 09:39:00 -07:00
Chuck Atkins
bdef031d4e opengl: Fix opengl concretization issues from missing versions (#30331) 2022-05-03 10:51:41 -05:00
asesidaa
a10f5656ab Add detection for hpcx-mpi in esmf (#30280) 2022-05-03 17:45:04 +02:00
Olivier Cessenat
653ed78645 keepassxc: add v2.7.1 (#30450) 2022-05-03 16:54:04 +02:00
haralmha
bc7fc8f456 flatbuffers: add v2.0.0 (#30455) 2022-05-03 16:53:24 +02:00
Ken Raffenetti
55bbbe8657 yaksa: add ROCm variant (#30222) 2022-05-03 16:52:31 +02:00
Mosè Giordano
a6dcce4cf2 swiftsim: do not build with -Werror (#30454) 2022-05-03 07:50:23 -07:00
Seth R. Johnson
e301de98cb Revert "qt: Fix the assimp dependency specification (#30435)" (#30451)
This reverts commit 4219b89faa.
2022-05-03 10:16:56 -04:00
Chris Richardson
6ecee4e6d5 Fix install of xsimd with xtensor (#30196) 2022-05-03 15:03:28 +02:00
Olivier Cessenat
2d89bc350c htop: add v3.2.0 (#30452) 2022-05-03 06:38:14 -05:00
Sinan
14e5497758 postgresql: add libs property (#30392)
Co-authored-by: sbulut <sbulut@3vgeomatics.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-05-03 09:24:59 +02:00
Brian Van Essen
4576fbe648 OpenCV and OpenBLAS: add external find support (#30240)
Added support for finding the OpenCV package via the find external
command. Included support for identifying variants based on available
shared libraries.

Added support to finding the OpenBLAS package via the find external
command.

Enabled packages to show that they can be discovered via the find
external command in the info message.

Updated the OpenCV and OpenBLAS packages to use the extensible search
mechanism for library extensions on multiple OS platforms.

Corrected how find externals works on Darwin for OpenCV and OpenBLAS
to accommodate that the version numbers are placed before the file
extension instead of after it, as on Linux.

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-05-03 09:04:50 +02:00
Sinan
84611b5f29 package/gdal fix config issue with +pg for newer gdal (#30421)
* package/gdal fix config issue with +pg for newer gdal

* fix version logic

* improve style

Co-authored-by: sbulut <sbulut@3vgeomatics.com>
2022-05-02 22:06:42 -05:00
Harsh Bhatia
cbf0c3a8c4 update version of py-mock, py-msgpack, py-gridformats, py-pyrsistent (#30445)
* add v3.0.3 for py-mock

* added v0.6.0 and 0.6.1 for py-msgpack

* added v0.4.0 for py-gridformats

* added v0.16.0 for py-pyrsistent
2022-05-02 20:17:54 -06:00
Chuck Atkins
d6c1619b67 mesa: Add v22.0.2 (#30439)
This adds v22.0.2 which also drops swr support.
2022-05-02 20:13:47 -06:00
Michele Martone
d23d611f35 librsb: added v1.3.0.1 (#30425)
* librsb: added v1.2.0.10 (#26043)

* librsb: add v1.2.0.11/v1.3.0.0 (#28636)

* librsb: add v1.3.0.1 (#30424)

* unconflict clang

* address apparent style issues

given
 https://github.com/spack/spack/runs/6248126997?check_suite_focus=true
and its excerpt

  var/spack/repos/builtin/packages/librsb/package.py:27: [E265] block comment should start with '# '
  var/spack/repos/builtin/packages/librsb/package.py:52: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:53: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:53: [E501] line too long (89 > 88 characters)
  var/spack/repos/builtin/packages/librsb/package.py:54: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:55: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:56: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:57: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:59: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:60: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:62: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:63: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:64: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:66: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:68: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:70: [E211] whitespace before '('
  var/spack/repos/builtin/packages/librsb/package.py:71: [E211] whitespace before '('

let these changes flow in.

* +asan+native: mark as conflict; thanks @tldahlgren

* +asan conflict grouped with other conflicts

As suggested as good Spack style by @tldahlgren .
2022-05-02 16:41:43 -06:00
Weiqun Zhang
8ed8922af5 amrex: add v22.05 (#30441) 2022-05-02 15:17:48 -06:00
laestrada
01c17562f5 gchp: added version 13.4.0 (#30442) 2022-05-02 13:55:50 -07:00
dlkuehn
c97d931ea7 masurca: add version 4.0.9 (#30440)
Co-authored-by: David Kuehn <las_dkuehn@iastate.edu>
2022-05-02 14:50:10 -06:00
Massimiliano Culpo
21bf0cf43c Fix issue in CI with Git 2.35 (#30436) 2022-05-02 20:49:53 +00:00
Ken Raffenetti
e2c72e583f spack ci: Fix typo in error message (#30438) 2022-05-02 20:33:54 +00:00
Chuck Atkins
4219b89faa qt: Fix the assimp dependency specification (#30435) 2022-05-02 16:22:13 -04:00
Carlos Bederián
253b208537 mesa: add 21.3.8 (#30412) 2022-05-02 12:40:30 -04:00
Kyle Gerheiser
4509e96704 git-lfs: add build-tools tag (#30431)
Let Spack find external git-lfs by default. There seemed to be agreement to add git-lfs to the build tools in https://github.com/spack/spack/pull/29031.
2022-05-02 09:02:42 -06:00
Stephen Hudson
f0bb7c74a9 libEnsemble: add v0.9.0 (#30409) 2022-05-02 08:26:36 -06:00
Erik Schnetter
c93fd4c600 netlib-lapack: add v3.10.1 (#30198) 2022-05-02 16:11:37 +02:00
Hadrien G
76d9df2cf1 acts: add v18.0.0 (#30219)
- Keep long lists in alphabetical order for easier reading
- Add a placeholder for Exa.TrkX plugin since we're missing a dep on the
  Spack side
- Add support for the ONNX plugin since Spack now has an ONNX runtime
  package
- Use spack's pybind11 package now that we're given the option to do so
2022-05-02 16:02:04 +02:00
Valentin Volkl
d2f67ff7b9 lcio: fix possible issue with root's cxxstd (#30241) 2022-05-02 15:55:15 +02:00
Jean-Paul Pelteret
b5b62b0c82 ADOL-C: Add a patch to force Colpack detection to fail (#30413) 2022-05-02 15:52:38 +02:00
eugeneswalker
e691d6df64 binutils@2.38 %gcc: add -fPIC -fcommon -Wl,-z,notext (#30345) 2022-05-02 15:38:07 +02:00
Luc Berger
25206c86c4 kokkos-kernels: add v3.6.00 (#30316) 2022-05-02 15:31:44 +02:00
Xavier Delaruelle
144d7cd932 environment-modules: add v5.1.0 (#30419) 2022-05-02 08:57:19 +02:00
Sebastian Ehlert
e7eceaf4e6 dftd4: add v3.4.0 (#30423) 2022-05-02 08:56:43 +02:00
Wouter Deconinck
f943cc0149 root: add v6.26.02 (#30426) 2022-05-02 08:55:57 +02:00
Wouter Deconinck
879949b78e gaudi: add v36.5 (#30427) 2022-05-02 08:54:50 +02:00
Michael Kuhn
38e5b96431 sysstat: add 12.4.5 and fix build failures (#30121)
This adds the newest stable version (and removes old development
versions), a few missing dependencies and workarounds for build
failures. Without the environment variables, sysstat will try creating
directories in `/var/log`, and without `--disable-file-attr`, sysstat
will try to change file ownership.
2022-05-02 08:24:11 +02:00
Todd Gamblin
9a028e3b15 bugfix: don't calculate spack tutorial version from version info
A recent switch to the way we do `develop` versioning broke this.  We
should hard-code the latest tutorial version.
2022-05-01 23:13:50 -07:00
Harmen Stoppels
f2c1b40e58 libxml2: new url, add 2.9.13 (#30401) 2022-04-29 23:22:24 -06:00
snehring
06b5217c01 hapcut2: adding new version 1.3.1 (#30383) 2022-04-29 16:06:47 -06:00
Paul R. C. Kent
52bf7f4157 Add 3.14.0 (#30384) 2022-04-29 14:23:12 -07:00
snehring
31eb759892 beagle: adding 5.4, making java dep more flexible. (#30354) 2022-04-29 14:11:20 -07:00
Cody Balos
b5f2c20f74 sundials: add 6.2.0 and logging-level variant (#30353) 2022-04-29 14:07:55 -07:00
Dan Bonachea
cf48588c45 Upcxx 2022.3.0 update (#30393)
* upcxx,gasnet: Add 2022.3.0 version hashes
* gasnet: Add ofi and ucx experimental conduits
* gasnet: Add CUDA and ROCm/HIP variants
* upcxx: Add Cray EX/Shasta detection and auto-config
* upcxx: Add ROCm/HIP support
* Use implicit dependencies from CudaPackage, ROCmPackage
2022-04-29 20:56:21 +00:00
Erik Schnetter
e59cde9b7f gsl: New version 2.7.1 (#30364) 2022-04-29 13:32:27 -07:00
snehring
7e54bddc0c gdal: changing behavior of configure for +xml2 with 3.0+ (#30405)
* gdal: changing behavior of configure for +xml2 with 3.0+

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

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-04-29 20:11:46 +00:00
snehring
7f1411d131 diamond: updating to 2.0.15 (#30386) 2022-04-29 13:58:30 -06:00
dmentock
f0afceeb9c added libpng version 1.5.30 to libpng package (#30395) 2022-04-29 12:43:30 -07:00
Satish Balay
7ee15553e4 petsc, py-petsc4py: add 3.17.1 (#30399) 2022-04-29 12:40:44 -07:00
haralmha
d062d2e92b hto4l: Set GSL_HOME (#30402) 2022-04-29 12:32:40 -07:00
Erik Schnetter
7c631d1c55 autoconf-archive: New version 2022.02.11 (#30403) 2022-04-29 12:31:23 -07:00
Asher Mancinelli
6df71118fb Pass blas flags to hsl lflags when ^coinhsl+blas (#30309) 2022-04-29 12:46:43 -06:00
Erik Schnetter
ed7812b8be sqlite: New version 3.38.3 (#30370) 2022-04-29 12:02:55 -06:00
agoodLANL
ff03ac3e06 itstool: version 2.0.7 and py2 dependency (#30375)
* Added version 2.0.7 and a conflict

* added maintainer
2022-04-29 10:43:18 -06:00
Erik Schnetter
b6ae2436be libjpeg-turbo: New version 2.1.3 (#30366) 2022-04-29 10:42:55 -06:00
Andrea Valenzuela
ec266a86b6 Add checksum for py-prettytable@3.2.0 (#30329)
* Add checksum for py-more-itertools@8.12.0 and fix python dependency

* Add checksum for py-prettytable@3.2.0

* Package version 8.11.0 is the only version that requires python 3.6+

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

* Add reference to python@3.6 support when 8.11

* Revert "Add reference to python@3.6 support when 8.11"

This reverts commit 0ba0002193.

* Add python 3.7: requirement

* Revert range for python 3.6

* Revert py-more-itertools modifications

Co-authored-by: aandvalenzuela <andrea.valenzuela.ramirez@cern.ch>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-04-29 10:33:04 -05:00
Jennifer Green
ecbac17217 htop: new variants (#30398)
* htop variants for debug, hwloc, unicode support

* removed redundant ncurses dep
2022-04-29 08:42:42 -06:00
Erik Schnetter
43a84f58e9 libjpeg: New version 9e (#30365) 2022-04-29 06:46:34 -06:00
Harmen Stoppels
9ed37742e9 squashfs: new version, deprecated older versions (#30361) 2022-04-29 11:17:44 +02:00
Harmen Stoppels
dbe2c44a25 netcdf-fortran: add compat bound for netcdf-c (#30358) 2022-04-29 11:16:51 +02:00
luker
f40780310b CrayPE_binutils package fix for CCE (#30338) 2022-04-29 09:36:52 +02:00
Massimiliano Culpo
c06f69d0bf spack.yaml: add concretizer.yaml to the schema (#30376) 2022-04-29 01:06:36 -06:00
Sinan
8a6b73bb2c package/kealib: add libs property (#30391)
Co-authored-by: sbulut <sbulut@3vgeomatics.com>
2022-04-29 02:38:19 +00:00
lpoirel
9e6298569e Delocalize type output for bash completion (#30360) 2022-04-28 23:24:10 +00:00
Sergey Kosukhin
ad0430f463 netcdf-fortran: do not build with MPI wrappers (#30371) 2022-04-29 01:19:42 +02:00
Erik Schnetter
7d26d56e59 meson: New version 0.62.1 (#30367) 2022-04-28 14:26:36 -06:00
Erik Schnetter
06988c38fd reprimand: New version 1.4 (#30369) 2022-04-28 12:58:11 -07:00
kwryankrattiger
f6d2b07368 SDK: Require paraview@5.10: in the ECP SDK (#30372)
* SDK: Require paraview@5.10: in the ECP SDK

* SDK: Updated dev src conflicts to be more explicit
2022-04-28 13:38:42 -06:00
Peter Scheibel
bb43308c44 Add command for reading JSON-based DB description (now with more tests) (#29652)
This is an amended version of https://github.com/spack/spack/pull/24894 (reverted in https://github.com/spack/spack/pull/29603). https://github.com/spack/spack/pull/24894
broke all instances of `spack external find` (namely when it is invoked without arguments/options)
because it was mandating the presence of a file which most systems would not have.
This allows `spack external find` to proceed if that file is not present and adds tests for this.

- [x] Add a test which confirms that `spack external find` successfully reads a manifest file
      if present in the default manifest path

--- Original commit message ---

Adds `spack external read-cray-manifest`, which reads a json file that describes a
set of package DAGs. The parsed results are stored directly in the database. A user
can see these installed specs with `spack find` (like any installed spec). The easiest
way to use them right now as dependencies is to run
`spack spec ... ^/hash-of-external-package`.

Changes include:

* `spack external read-cray-manifest --file <path/to/file>` will add all specs described
  in the file to Spack's installation DB and will also install described compilers to the
  compilers configuration (the expected format of the file is described in this PR as well including examples of the file)
* Database records now may include an "origin" (the command added in this PR
  registers the origin as "external-db"). In the future, it is assumed users may want
  to be able to treat installs registered with this command differently (e.g. they may
  want to uninstall all specs added with this command)
* Hash properties are now always preserved when copying specs if the source spec
  is concrete
  * I don't think the hashes of installed-and-concrete specs should change and this
    was the easiest way to handle that
  * also specs that are concrete preserve their `.normal` property when copied
    (external specs may mention compilers that are not registered, and without this
    change they would fail in `normalize` when calling `validate_or_raise`)
  * it might be this should only be the case if the spec was installed

- [x] Improve testing
- [x] Specifically mark DB records added with this command (so that users can do
      something like "uninstall all packages added with `spack read-external-db`)
  * This is now possible with `spack uninstall --all --origin=external-db` (this will
    remove all specs added from manifest files)
- [x] Strip variants that are listed in json entries but don't actually exist for the package
2022-04-28 10:56:26 -07:00
Massimiliano Culpo
6a9df34abd ASP-based solver: discard unknown packages from reuse (#30357)
* ASP-based solver: discard unknown packages from reuse

This is an add-on to #28259 that cover for the case of
a single package.py being removed from a repository,
rather than an entire custom repository being removed.

* Add unit test
2022-04-28 10:40:28 -07:00
Frédéric Simonis
1006dd54de Add BUILD_TESTING to standard CMake arguments (#30374)
CTest determines whether to enable tests using the BUILD_TESTING variable.
This should be used by projects to conditionally enable the compilation of tests.
Spack knowns which packages have to run tests and can thus automatically define this variable.
2022-04-28 17:03:13 +00:00
Andrea Valenzuela
cf905ec14a Add checksum for py-poetry-core@1.0.8 (#30359)
Co-authored-by: aandvalenzuela <andrea.valenzuela.ramirez@cern.ch>
2022-04-28 11:24:08 -05:00
Andrea Valenzuela
19bb4bdeb8 Add checksum for py-more-itertools@8.12.0 and fix python dependency (#30325)
* Add checksum for py-more-itertools@8.12.0 and fix python dependency

* Package version 8.11.0 is the only version that requires python 3.6+

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

* Add reference to python 3.6 dependency

Co-authored-by: aandvalenzuela <andrea.valenzuela.ramirez@cern.ch>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-04-28 10:23:10 -06:00
Andrew Davison
47f9e71302 py-quantities: add versions from 0.12.2-13.0 (#28586)
* py-quantities: add versions from 0.12.2-13.0

* Attempt to fix the version specification

* add maintainer, implement suggestions from reviewer
2022-04-28 11:14:50 -05:00
Chris White
2e9da47a2d Ascent/Conduit: re-add fortran compiler that was mistakenly removed (#30351) 2022-04-28 07:09:40 -07:00
Greg Becker
3e863848f8 build_env/test_env: add concretizer args (#30289) 2022-04-28 11:37:15 +02:00
Harmen Stoppels
e7a0b952ab install --overwrite: use rename instead of tmpdir (#29746)
I tried to use --overwrite on nvhpc, but nvhpc's install size is 16GB. Seems
better to do os.rename in the same directory than moving the directory to
`/tmp`.

- [x] install --overwrite: use rename instead of tmpdir
- [x] use tempfile
2022-04-28 01:42:42 -06:00
Patrick Broderick
8b85b33ba5 Add spiral fftx (#28583)
* add fftx package; rename spiral to spiral-software and add spiral-package-*
* Update year in copyright notice
* Add package description to FFTX/package.py
* Changes to package files for SPIRAL & FFTX for PR
* Update package definitions
* remove unnecessary lines
2022-04-27 22:26:44 -07:00
Larry Knox
90dafdd9f0 Add HDF5 version 1.12.2. (#30348) 2022-04-27 22:50:28 -06:00
Paul R. C. Kent
d989478154 llvm: Add 14.0.1 14.0.2 (#30347) 2022-04-27 20:22:40 -06:00
Wileam Y. Phan
ebd930ace9 Add Python chmod +x equivalent in fpm package (#30342) 2022-04-28 00:16:19 +00:00
Erik Schnetter
53e0e7aabe z3: New version 4.8.16 (#30328) 2022-04-27 17:10:15 -07:00
dlkuehn
27cbc4ebc8 tcsh: add version 6.24.00 (#30346)
Co-authored-by: David Kuehn <las_dkuehn@iastate.edu>
2022-04-27 23:43:06 +00:00
Asher Mancinelli
2515cafb9c hiop: Enable barebones testing (#30313)
* Enable barebones testing

Run 6 test cases representative of the entire HiOp test suite.

* Apply style changes

* Dont use unpacking for py2 compat
2022-04-27 23:08:33 +00:00
Annop Wongwathanarat
5593611b5e armpl: add new package (#30305)
Co-authored-by: Annop Wongwathanarat <annop.wongwathanarat@arm.com>
2022-04-27 15:25:47 -07:00
dlkuehn
f544b051c4 orthofinder: add version 2.5.4 (#30344)
Co-authored-by: David Kuehn <las_dkuehn@iastate.edu>
2022-04-27 22:23:34 +00:00
Luc Berger
c534e70950 Kokkos: update package for release 3.6.00 (#30315) 2022-04-27 13:52:15 -07:00
Paul Ferrell
9ffb3b4ac0 mvapich2 MPI_ROOT needed in modules (#30335)
We've found that when using mvapich2 via modules, we need to set the MPI_ROOT
environment variable.
2022-04-27 13:41:06 -07:00
kwryankrattiger
893c5271ac Update ascent and deps for 0.8.x (#29954)
* Update package versions for Ascent/SDK

* Umpire build static for cuda from dray

* Propagate cuda_arch for ascent and dray packages.

* Ascent: Update dependency versions for ascent@0.8:

* VTK-h: Patch +shared+cuda for VTK-h 0.8.x

* Ascent: Patch to allow @0.8: +shared+cuda

* Turn off building ascent tests.

* Update ascent patch

* WIP: Ascent: Update patch to configure MPI build with CUDA

* Ascent: Tests require vtk-m+testlib

* WIP: Ascent: Constrain 0.7 for vtk-h

* Ascent: Directly depend on VTK-m
2022-04-27 13:39:18 -06:00
eugeneswalker
f7a9456553 e4s ci: uncomment umpire (#29776) 2022-04-27 18:22:46 +00:00
kwryankrattiger
8250235207 Mesa: Constrain compatible LLVM version (#30102)
Base on release date, not actual compatibility, because LLVM
version compatibility is not documented clearly in Mesa for
upper version limits.
2022-04-27 12:03:02 -06:00
Lucas Frérot
eb51591b02 SCons: added versions 4.0.0-4.3.0 (#30296)
* SCons: added versions 4.0.0-4.3.0

* scons: correct package name casing in url_for_version
2022-04-27 11:08:30 -05:00
Brian Van Essen
06e7249850 Allow PyTorch to forward gcc-toolchain cxxcflag to CUDA toolchains (#30318) 2022-04-27 10:48:06 -05:00
Martin Diehl
c4ad003af2 damask-*: add v3.0.0alpha6 (#30124) 2022-04-27 16:01:36 +02:00
dependabot[bot]
1243717012 build(deps): bump actions/checkout from 2 to 3.0.2 (#30235)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.0.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...2541b1294d2704b0964813337f33b291d3f8596b)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-27 13:47:50 +02:00
snehring
da3d315cba blat: add v37 (#30166) 2022-04-27 12:26:57 +02:00
Michael Kuhn
48ff4c7679 rust: add 1.60.0 and fix libgit2 incompatibility (#30123) 2022-04-27 12:22:52 +02:00
liuyangzhuan
9fc6494a28 Added GPTune v3.0.0 and its dependency py-pymoo (#30119) 2022-04-27 12:21:44 +02:00
Valentin Volkl
9d4cedac51 tauola: fix ~lhapdf (#30190) 2022-04-27 12:16:08 +02:00
Derek Ryan Strong
f66139dfe4 Add fix for binutils 2.38 +gas makeinfo issue (#30209)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-04-27 12:11:48 +02:00
nfurmento
79e0a3dad0 Starpu and Fxt: new packages (#29285) 2022-04-27 12:10:09 +02:00
dependabot[bot]
3dbbf3a101 build(deps): bump codecov/codecov-action from 3.0.0 to 3.1.0 (#30234)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](e3c560433a...81cd2dc814)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  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>
2022-04-27 11:26:19 +02:00
Harmen Stoppels
f273e7d329 openmpi: add toggle for rsh plm (#30251)
By default `openmpi` needs `rsh` from `openssh`, which is a somewhat
redundant dependency for clusters using slurm. This PR adds a toggle to
allow users to disable the ssh/rsh plm altogether.
2022-04-27 11:15:48 +02:00
snehring
351072cd9f gcta: rework package recipe (#30286) 2022-04-27 08:56:31 +00:00
Adam J. Stewart
0b23f1be05 py-pil: deprecate package (#30308) 2022-04-27 02:34:29 -06:00
Glenn Johnson
b8015a71e9 relion: add altcpu variant and fix fftw (#30097)
This package was not setting FFTW when +mklfft was used with +cuda.
Since both were set to 'True', the default build was not linked to
any FFTW, leading to a run time error. It seems MKL support was
conflated with alternative CPU acceleration support. This PR does the
following:

- adds the altcpu variant to specify non-GPU/CPU acceleration
- sets a conflict between +altcpu and +cuda
- sets an FFTW implementation
- sets fltk+xft when +gui to get a decent looking GUI interface
- sets tbb dependency only when +altcpu
- adds dependency on ctffind
- adds variant and dependency on motioncor2
- sets defaults for
    - qsub template location
    - ctffind location
    - motioncor2 location

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-04-27 10:30:39 +02:00
snehring
739f040fa8 bucky: fix compile errors with newer gccs (#30314) 2022-04-27 02:11:02 -06:00
Massimiliano Culpo
d5fc859f46 ASP-based solver: handle installed specs from unknown namespaces (#30092)
fixes #28259

This commit discard specs from unknown namespaces from the
ones that can be "reused" during concretization. Previously
Spack would just error out when encountering them.
2022-04-27 02:10:46 -06:00
Erik Schnetter
753f4a4bc3 reprimand: update requests on boost (#30109) 2022-04-27 09:46:22 +02:00
Lhxone
8c280d98ca suntans: add new package (#30149) 2022-04-27 09:35:40 +02:00
eugeneswalker
d5e1fa5771 py-cryptography@35: tell cargo to use cli git, not cargo internal git… (#30307) 2022-04-26 20:58:28 -06:00
Michael Kuhn
f30b79b2c5 libgit2: add 1.4.3 and 1.3.1 (#30122) 2022-04-26 20:54:30 -06:00
Erik Schnetter
54146d44f9 fossil: New package (#30311)
* fossil: new package

* fossil: Format code
2022-04-27 00:47:24 +00:00
Tamara Dahlgren
0c31ab87c9 Feature: Allow re-use of run_test() in install_time_test_callbacks (#26594)
Allow re-use of run_test() in install_time_test_callbacks

Co-authored-by: Greg Becker <becker33@llnl.gov>
2022-04-26 17:40:05 -07:00
Lhxone
e49cccb0d9 New package: CaNS (#30218) 2022-04-27 00:33:36 +00:00
haralmha
7a1841c464 hadoop: Update url and add version 3.3.2 (#29812)
* hadoop: Update url and add version 3.3.2

* Update url
2022-04-26 17:26:28 -07:00
haralmha
40ebeb2dc8 arrow: Add version 7.0.0 (#29962) 2022-04-26 16:57:56 -07:00
Lhxone
e5444b9a77 New package: Swan (#30217) 2022-04-26 16:32:19 -07:00
haralmha
89cc16a9cd gnuplot: Add version 5.4.3 and add workaround for not found DSO (#30163) 2022-04-26 16:03:36 -07:00
Ken Raffenetti
a24070d532 docs: Fix ROCmPackage example syntax (#30168) 2022-04-26 16:00:40 -07:00
Kyle Gerheiser
f473fd8084 Add g2tmpl versions 1.10.2 and 1.10.1 (#30202) 2022-04-26 15:56:06 -07:00
John Hodrien
5055f5e3e2 Power9 build fix for ctffind4 (#30300)
Only tested against the latest version, which is why it only applies the patch
when using 4.1.14.

Fix comes from:

https://grigoriefflab.umassmed.edu/forum/software/ctffind_ctftilt/installing_ctffind_4114_ibm_power9
2022-04-26 17:13:37 -05:00
Joel Falcou
0b26103c07 EVE now use main instead of develop as main branch (#30220) 2022-04-26 15:34:45 -06:00
Greg Becker
f99614be02 old concretizer: update deprecation warning (#30227) 2022-04-26 14:17:17 -07:00
Mark W. Krentel
c02e83092e intel-xed: add version 2022.04.17 (#30239)
1. Add version 2022.04.17 (new numbering scheme) and update mbuild resource.
2. Branch 'master' is now 'main'.
3. Old rev 10.2019.03 needs a patch for python vs python3.
2022-04-26 14:15:10 -07:00
Kyle Gerheiser
85e99fa154 Add NCIO v1.1.0 (#30306)
See release notes https://github.com/NOAA-EMC/NCEPLIBS-ncio/releases/tag/v1.1.0
2022-04-26 21:03:26 +00:00
John W. Parent
83b91246b1 Windows: fix termination of process output redirection (#29923)
The parent thread in the process stdout redirection logic on Windows
was closing a file that was being read in child thread, which lead to
error-based termination of the reader thread. This updates the
interaction to avoid the error.
2022-04-26 12:56:13 -07:00
Andrea Valenzuela
0f4b228eff Add checksum for py-ipywidgets@7.7.0 (#30155)
* Add checksum for py-ipywidgets@7.7.0

* Correct py-widgetsnbextension and py-ipython dependencies

* Update widgetsnbextension dependency to 3.6

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

* Allow requirement to next versions

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

* Revert ipyhton dependencies

* Add widgetsnbextension@3.6.0 checksum

Co-authored-by: aandvalenzuela <andrea.valenzuela.ramirez@cern.ch>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-04-26 14:48:53 -05:00
Lucas Frérot
2abbad1ca5 thrust: added version 1.12.1-1.16.0 (#30292) 2022-04-26 11:27:25 -07:00
Lucas Frérot
43d8fe212f py-uvw: updated versions (#30297) 2022-04-26 10:06:41 -07:00
Valentin Volkl
84befcdfe2 opendatadetector: add new package (#30298)
* opendatadetector: add new package

* style

* opendatadetector: add hep tag
2022-04-26 09:25:41 -07:00
Tamara Dahlgren
def8fce250 ginkgo: fix stand-alone test directory / install_test (#28412) 2022-04-26 09:20:10 -07:00
lorddavidiii
3a0aba0835 spack spec: add '--format' argument (#27908) 2022-04-26 09:08:56 -07:00
snehring
254cd624fe exabayes: specify c++11 (#30282) 2022-04-26 17:22:27 +02:00
Erik Schnetter
802a48fb43 boost: update list of modules (#30104)
Co-authored-by: Tim Haines <thaines.astro@gmail.com>
2022-04-26 17:12:47 +02:00
Mark W. Krentel
c81affa551 setup_package: don't unload modules on Cray when run with --dirty (#30261)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-04-26 16:53:10 +02:00
Simon Pintarelli
3e51304b68 spfft: pass cuda_arch to cmake (#30295) 2022-04-26 14:59:48 +02:00
snehring
62abbeaf6f express: specify patch version range (#30283) 2022-04-26 11:27:32 +02:00
H. Joe Lee
80e24f3f69 googletest: change "master" to "main" (#30285)
There's no master branch on GitHub for googletest.
2022-04-26 11:27:08 +02:00
dlkuehn
24f5069584 snpeff: change jdk dependency to java (#30048)
Co-authored-by: David Kuehn <las_dkuehn@iastate.edu>
2022-04-26 11:25:03 +02:00
Kevin Huck
5da78991d4 apex: add v2.5.1 (#30287) 2022-04-26 11:19:07 +02:00
Asher Mancinelli
cfb5d5f988 hiop: add v0.6.1, add new variant "cusolver" (#30288) 2022-04-26 11:12:14 +02:00
Michael Kuhn
a10d262f5f glib: add 2.72.1 and 2.70.5 (#30274) 2022-04-26 11:10:34 +02:00
Harmen Stoppels
16e926d374 gawk: drop gettext by default (#30290)
Reduces the number of packages to bootstrap gcc (which actually has
--disable-nls).
2022-04-26 11:02:03 +02:00
Massimiliano Culpo
b9d6a5103d ASP-based solver: allow configuring target selection (#29835)
* ASP-based solver: allow configuring target selection

This commit adds a new "concretizer:targets" configuration
section, and two options under it.

 - "concretizer:targets:granularity" allows switching from
considering only generic targets to consider all possible
microarchitectures.

 - "concretizer:targets:host_compatible" instead controls
whether we can concretize for microarchitectures that
are incompatible with the current host.

* Add documentation

* Add unit-tests
2022-04-25 17:19:51 -07:00
iarspider
834f8e04ca Environments: add flag to skip printing concretized specs (#30272)
With an active environment, you can now run "spack concretize --quiet"
and it will suppress printing the concretized specs.
2022-04-25 15:54:54 -07:00
Rohit Goswami
3ade5516a2 MAINT: Add a debug variant to PyTorch (#30267)
* MAINT: Add a debug flag

* MAINT: Apply suggestions from code review

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-04-25 15:33:37 -05:00
eugeneswalker
b41de6d86b exago +cuda, +rocm: pass amdgpu_target, cuda_arch to dependencies, as appropriate (#30259)
* exago +rocm: pass amdgpu_target to raja, hiop dependencies

* +cuda builds: pass cuda_arch to dependencies

* hiop: pass cuda_arch to dependencies
2022-04-25 19:48:35 +00:00
Erik Schnetter
c72fba7e4c gcc: Make gcc 11.3 build on Darwin (#30278)
Don't apply a Darwin-specific patch that doesn't work on 11.3 any more.

Closes https://github.com/spack/spack/issues/30264.
2022-04-25 20:15:51 +02:00
Erik Schnetter
96113a5dc6 gcc: Make gcc 11.3 build on Darwin (#30278)
Don't apply a Darwin-specific patch that doesn't work on 11.3 any more.

Closes https://github.com/spack/spack/issues/30264.
2022-04-25 20:15:31 +02:00
Seth R. Johnson
db0335fa54 OpenMPI: improve PMix handling (#29449)
* openmpi: always require pmix for 4:

`~pmix` is not applicable to version 4+, since it always builds a vendored
copy of pmix (currently 3.2.3).

* pmix: relax version requirements

When the version range was specified, newer versions didn't exist.
Also use normalized spack versions rather than artificial .9.9 /.0.0.

* openmpi: restrict pmix versions

pmix option isn't available for OpenMPI@1, and according to
https://github.com/open-mpi/ompi/issues/7988 , OpenMPI 4.0.1 will not
build with pmix@3.1.5.

* pmix: add newer versions

* OpenMPI: re-express conflicts/configure logic as conditional variants

This relies partly on `self.enable_or_disable` and its ilk to emit an
empty list when the variant isn't applicable.
2022-04-25 11:54:20 -06:00
Massimiliano Culpo
268c671dc8 ASP-based solver: always consider version of installed packages (#29933)
* ASP-based solver: always consider version of installed packages

fixes #29201

Explicitly add facts for versions of installed software when
using the --reuse option, so that we could consider versions
that are not declared in package.py
2022-04-25 10:09:49 -07:00
Harmen Stoppels
3dd4999fd7 spec.py: make parser select from environment (#30276)
The parser is already committing a crime of querying the database for
specs when it encounters a `/hash`. It's helpful, but unfortunately not
helpful when trying to install a specific spec in an environment by
hash. Therefore, consider the environment first, then the database.

This allows the following:

```console
$ spack -e . concretize
==> Starting concretization
==> Environment concretized in 0.27 seconds.
==> Concretized diffutils
 -   7vangk4  diffutils@3.8%gcc@10.3.0 arch=linux-ubuntu20.04-zen2
 -   hyb7ehx      ^libiconv@1.16%gcc@10.3.0 libs=shared,static arch=linux-ubuntu20.04-zen2

$ spack -e . install /hyb7ehx
==> Installing libiconv-1.16-hyb7ehxxyqqp2hiw56bzm5ampkw6cxws
...
==> libiconv: Successfully installed libiconv-1.16-hyb7ehxxyqqp2hiw56bzm5ampkw6cxws
  Fetch: 0.01s.  Build: 17.54s.  Total: 17.55s.
[+] /tmp/tmp.VpvYApofVm/store/linux-ubuntu20.04-zen2/gcc-10.3.0/libiconv-1.16-hyb7ehxxyqqp2hiw56bzm5ampkw6cxws
```
2022-04-25 08:41:48 -07:00
Hervé Yviquel
c1ed51e767 mpich: add variant to enable per VCI critical sections (#27840) 2022-04-25 17:31:13 +02:00
Theofilos Manitaras
2a8a0aa156 Add libfabric version 1.14.1 (#30275) 2022-04-25 08:51:12 -06:00
eugeneswalker
5073613c6e slepc +rocm: pass amdgpu_target to dep (#30252) 2022-04-25 08:50:49 -06:00
Vicente Bolea
4a76ca1f5e vtk-m: add v1.8.0-rc1 (#30233) 2022-04-25 16:49:38 +02:00
Mark W. Krentel
878e6b6712 hpctoolkit: add version 2022.04.15, update recipe (#30258)
1. update for rocm 4.5 and drop support for earlier rocm.
2. no longer use mbedtls or gotcha, they are only for old revs.
3. update version requirements for dyninst and libmonitor
4. begin to deprecate old versions
2022-04-25 16:40:00 +02:00
Erik Schnetter
aeba9daea6 mpiwrapper: add new package (#30107)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2022-04-25 15:01:39 +02:00
Matthew Archer
25d115ba1a ufcx: add new package (#29861) 2022-04-25 14:50:45 +02:00
Adam J. Stewart
f37e07a882 GDAL: don't add system paths to env vars (#30229) 2022-04-25 14:48:46 +02:00
Seth R. Johnson
4c0cc5a295 testu01: new package (#30266) 2022-04-25 14:46:52 +02:00
Qian Jianhua
57968e7ad4 fakexrandr: mkdir for install (#29845) 2022-04-25 14:42:15 +02:00
Qian Jianhua
02a7fc69ed pgplot: fix syntax error in recipe (#30270) 2022-04-25 14:32:04 +02:00
Todd Gamblin
d729b4e72b bugfix: installed and installed_upstream should not assert (#30271)
Fix bug introduced in #30191. `Spec.installed` and `Spec.installed_upstream` should just return
`False` for abstract specs, as they can be called in that context.

- [x] `Spec.installed` returns `False` now instead of asserting that the `Spec`
      is concrete.
- [x] `Spec.installed_upstream` returns `False` now instead of asserting that the `Spec`
      is concrete.
- [x] `Spec.installed_upstream` no longer caches its result, as install status seems
      like a bad thing to cache -- it can easily be invalidated. Calling code should
      use transactions if there are peformance issues, as with other places in Spack.
- [x] add tests for `Spec.installed` and `Spec.installed_upstream`
2022-04-25 07:46:21 +00:00
Mark W. Krentel
35a4c2325e hpcviewer: add version 2022.03 (#30255) 2022-04-25 09:40:43 +02:00
Diego Alvarez
6253445b13 Added nextflow 22.04.0 (#30265) 2022-04-23 14:17:41 -07:00
H. Joe Lee
dea5fe87f7 Hermes: new package (#29863) 2022-04-23 06:38:14 -06:00
QuellynSnead
6162ea95b0 trilinos: limit secas patch range for cce (#30205)
The cray_secas.patch no longer appears to be necessary
with cce 13.x. Limit its application to cce 12.14.1 - 12.99.99.
2022-04-23 07:01:13 -04:00
Erik Schnetter
44b409d696 memkind: Don't use -Werror when building (#30071) 2022-04-23 09:16:47 +02:00
Massimiliano Culpo
a9fbc0175d Move "installed" and "installed_upstream" from PackageBase to Spec (#30191)
This PR moves the `installed` and `installed_upstream` properties from `PackageBase` to `Spec` and is a step towards being able to reuse specs for which we don't have a `package.py` available. It _should_ be sufficient to complete the concretization step and see the spec in the concretized DAG.

To fully reuse a spec without a package.py though we need a way to serialize enough data to reconstruct the results of calls to:
- `Spec.libs`, `Spec.headers` and `Spec.ommand`
- `Package.setup_dependent_*_environment` and `Package.setup_run_environment`

- [x] Add stub methods to packages with warnings
- [x] Add a missing "root=False" in cmd/fetch.py
- [x] Assert that a spec is concrete before checking installation status
2022-04-22 16:46:45 -07:00
7188 changed files with 46941 additions and 21984 deletions

View File

@@ -12,6 +12,7 @@ on:
# built-in repository or documentation
- 'var/spack/repos/builtin/**'
- '!var/spack/repos/builtin/packages/clingo-bootstrap/**'
- '!var/spack/repos/builtin/packages/clingo/**'
- '!var/spack/repos/builtin/packages/python/**'
- '!var/spack/repos/builtin/packages/re2c/**'
- 'lib/spack/docs/**'
@@ -19,11 +20,16 @@ on:
# nightly at 2:16 AM
- cron: '16 2 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_number }}
cancel-in-progress: true
jobs:
fedora-clingo-sources:
runs-on: ubuntu-latest
container: "fedora:latest"
if: github.repository == 'spack/spack'
steps:
- name: Install dependencies
run: |
@@ -31,14 +37,20 @@ jobs:
bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
make patch unzip which xz python3 python3-devel tree \
cmake bison bison-devel libstdc++-static
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- name: Setup repo and non-root user
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- name: Setup non-root user
run: |
# See [1] below
git config --global --add safe.directory /__w/spack/spack
useradd spack-test && mkdir -p ~spack-test
chown -R spack-test . ~spack-test
- name: Setup repo
shell: runuser -u spack-test -- bash {0}
run: |
git --version
git fetch --unshallow
. .github/workflows/setup_git.sh
useradd spack-test
chown -R spack-test .
- name: Bootstrap clingo
shell: runuser -u spack-test -- bash {0}
run: |
@@ -51,6 +63,7 @@ jobs:
ubuntu-clingo-sources:
runs-on: ubuntu-latest
container: "ubuntu:latest"
if: github.repository == 'spack/spack'
steps:
- name: Install dependencies
env:
@@ -61,22 +74,20 @@ jobs:
bzip2 curl file g++ gcc gfortran git gnupg2 gzip \
make patch unzip xz-utils python3 python3-dev tree \
cmake bison
- name: Work around CVE-2022-24765
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- name: Setup non-root user
run: |
# Apparently Ubuntu patched git v2.25.1 with a security patch that introduces
# a breaking behavior. See:
# - https://github.blog/2022-04-12-git-security-vulnerability-announced/
# - https://github.com/actions/checkout/issues/760
# - http://changelogs.ubuntu.com/changelogs/pool/main/g/git/git_2.25.1-1ubuntu3.3/changelog
# See [1] below
git config --global --add safe.directory /__w/spack/spack
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- name: Setup repo and non-root user
useradd spack-test && mkdir -p ~spack-test
chown -R spack-test . ~spack-test
- name: Setup repo
shell: runuser -u spack-test -- bash {0}
run: |
git --version
git fetch --unshallow
. .github/workflows/setup_git.sh
useradd -m spack-test
chown -R spack-test .
- name: Bootstrap clingo
shell: runuser -u spack-test -- bash {0}
run: |
@@ -89,6 +100,7 @@ jobs:
ubuntu-clingo-binaries-and-patchelf:
runs-on: ubuntu-latest
container: "ubuntu:latest"
if: github.repository == 'spack/spack'
steps:
- name: Install dependencies
env:
@@ -98,22 +110,20 @@ jobs:
apt-get install -y \
bzip2 curl file g++ gcc gfortran git gnupg2 gzip \
make patch unzip xz-utils python3 python3-dev tree
- name: Work around CVE-2022-24765
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- name: Setup non-root user
run: |
# Apparently Ubuntu patched git v2.25.1 with a security patch that introduces
# a breaking behavior. See:
# - https://github.blog/2022-04-12-git-security-vulnerability-announced/
# - https://github.com/actions/checkout/issues/760
# - http://changelogs.ubuntu.com/changelogs/pool/main/g/git/git_2.25.1-1ubuntu3.3/changelog
# See [1] below
git config --global --add safe.directory /__w/spack/spack
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- name: Setup repo and non-root user
useradd spack-test && mkdir -p ~spack-test
chown -R spack-test . ~spack-test
- name: Setup repo
shell: runuser -u spack-test -- bash {0}
run: |
git --version
git fetch --unshallow
. .github/workflows/setup_git.sh
useradd -m spack-test
chown -R spack-test .
- name: Bootstrap clingo
shell: runuser -u spack-test -- bash {0}
run: |
@@ -121,10 +131,10 @@ jobs:
spack -d solve zlib
tree ~/.spack/bootstrap/store/
opensuse-clingo-sources:
runs-on: ubuntu-latest
container: "opensuse/leap:latest"
if: github.repository == 'spack/spack'
steps:
- name: Install dependencies
run: |
@@ -134,9 +144,12 @@ jobs:
bzip2 curl file gcc-c++ gcc gcc-fortran tar git gpg2 gzip \
make patch unzip which xz python3 python3-devel tree \
cmake bison
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- name: Setup repo and non-root user
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- name: Setup repo
run: |
# See [1] below
git config --global --add safe.directory /__w/spack/spack
git --version
git fetch --unshallow
. .github/workflows/setup_git.sh
@@ -150,11 +163,13 @@ jobs:
macos-clingo-sources:
runs-on: macos-latest
if: github.repository == 'spack/spack'
steps:
- name: Install dependencies
run: |
brew install cmake bison@2.7 tree
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- name: Bootstrap clingo
run: |
source share/spack/setup-env.sh
@@ -165,16 +180,19 @@ jobs:
tree ~/.spack/bootstrap/store/
macos-clingo-binaries:
runs-on: macos-latest
runs-on: ${{ matrix.macos-version }}
strategy:
matrix:
python-version: ['3.5', '3.6', '3.7', '3.8', '3.9', '3.10']
macos-version: ['macos-10.15', 'macos-11', 'macos-12']
if: github.repository == 'spack/spack'
steps:
- name: Install dependencies
run: |
brew install tree
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08
with:
python-version: ${{ matrix.python-version }}
- name: Bootstrap clingo
@@ -189,12 +207,14 @@ jobs:
strategy:
matrix:
python-version: ['2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10']
if: github.repository == 'spack/spack'
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08
with:
python-version: ${{ matrix.python-version }}
- name: Setup repo and non-root user
- name: Setup repo
run: |
git --version
git fetch --unshallow
@@ -209,6 +229,7 @@ jobs:
ubuntu-gnupg-binaries:
runs-on: ubuntu-latest
container: "ubuntu:latest"
if: github.repository == 'spack/spack'
steps:
- name: Install dependencies
env:
@@ -218,22 +239,20 @@ jobs:
apt-get install -y \
bzip2 curl file g++ gcc patchelf gfortran git gzip \
make patch unzip xz-utils python3 python3-dev tree
- name: Work around CVE-2022-24765
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- name: Setup non-root user
run: |
# Apparently Ubuntu patched git v2.25.1 with a security patch that introduces
# a breaking behavior. See:
# - https://github.blog/2022-04-12-git-security-vulnerability-announced/
# - https://github.com/actions/checkout/issues/760
# - http://changelogs.ubuntu.com/changelogs/pool/main/g/git/git_2.25.1-1ubuntu3.3/changelog
# See [1] below
git config --global --add safe.directory /__w/spack/spack
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
- name: Setup repo and non-root user
useradd spack-test && mkdir -p ~spack-test
chown -R spack-test . ~spack-test
- name: Setup repo
shell: runuser -u spack-test -- bash {0}
run: |
git --version
git fetch --unshallow
. .github/workflows/setup_git.sh
useradd -m spack-test
chown -R spack-test .
- name: Bootstrap GnuPG
shell: runuser -u spack-test -- bash {0}
run: |
@@ -245,6 +264,7 @@ jobs:
ubuntu-gnupg-sources:
runs-on: ubuntu-latest
container: "ubuntu:latest"
if: github.repository == 'spack/spack'
steps:
- name: Install dependencies
env:
@@ -255,22 +275,20 @@ jobs:
bzip2 curl file g++ gcc patchelf gfortran git gzip \
make patch unzip xz-utils python3 python3-dev tree \
gawk
- name: Work around CVE-2022-24765
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- name: Setup non-root user
run: |
# Apparently Ubuntu patched git v2.25.1 with a security patch that introduces
# a breaking behavior. See:
# - https://github.blog/2022-04-12-git-security-vulnerability-announced/
# - https://github.com/actions/checkout/issues/760
# - http://changelogs.ubuntu.com/changelogs/pool/main/g/git/git_2.25.1-1ubuntu3.3/changelog
# See [1] below
git config --global --add safe.directory /__w/spack/spack
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
- name: Setup repo and non-root user
useradd spack-test && mkdir -p ~spack-test
chown -R spack-test . ~spack-test
- name: Setup repo
shell: runuser -u spack-test -- bash {0}
run: |
git --version
git fetch --unshallow
. .github/workflows/setup_git.sh
useradd -m spack-test
chown -R spack-test .
- name: Bootstrap GnuPG
shell: runuser -u spack-test -- bash {0}
run: |
@@ -282,13 +300,15 @@ jobs:
macos-gnupg-binaries:
runs-on: macos-latest
if: github.repository == 'spack/spack'
steps:
- name: Install dependencies
run: |
brew install tree
# Remove GnuPG since we want to bootstrap it
sudo rm -rf /usr/local/bin/gpg
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- name: Bootstrap GnuPG
run: |
source share/spack/setup-env.sh
@@ -298,13 +318,15 @@ jobs:
macos-gnupg-sources:
runs-on: macos-latest
if: github.repository == 'spack/spack'
steps:
- name: Install dependencies
run: |
brew install gawk tree
# Remove GnuPG since we want to bootstrap it
sudo rm -rf /usr/local/bin/gpg
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- name: Bootstrap GnuPG
run: |
source share/spack/setup-env.sh
@@ -312,3 +334,11 @@ jobs:
spack bootstrap untrust github-actions-v0.2
spack -d gpg list
tree ~/.spack/bootstrap/store/
# [1] Distros that have patched git to resolve CVE-2022-24765 (e.g. Ubuntu patching v2.25.1)
# introduce breaking behaviorso we have to set `safe.directory` in gitconfig ourselves.
# See:
# - https://github.blog/2022-04-12-git-security-vulnerability-announced/
# - https://github.com/actions/checkout/issues/760
# - http://changelogs.ubuntu.com/changelogs/pool/main/g/git/git_2.25.1-1ubuntu3.3/changelog

View File

@@ -19,6 +19,10 @@ on:
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_number }}
cancel-in-progress: true
jobs:
deploy-images:
runs-on: ubuntu-latest
@@ -43,9 +47,10 @@ jobs:
[ubuntu-focal, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:20.04'],
[ubuntu-jammy, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:22.04']]
name: Build ${{ matrix.dockerfile[0] }}
if: github.repository == 'spack/spack'
steps:
- name: Checkout
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
- name: Set Container Tag Normal (Nightly)
run: |
@@ -75,33 +80,33 @@ jobs:
fi
- name: Upload Dockerfile
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8
with:
name: dockerfiles
path: dockerfiles
- name: Set up QEMU
uses: docker/setup-qemu-action@27d0a4f181a40b142cce983c5393082c365d1480 # @v1
uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # @v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@94ab11c41e45d028884a99163086648e898eed25 # @v1
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # @v1
- name: Log in to GitHub Container Registry
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7 # @v1
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # @v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to DockerHub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7 # @v1
if: github.event_name != 'pull_request'
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # @v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build & Deploy ${{ matrix.dockerfile[0] }}
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a # @v2
uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8 # @v2
with:
context: dockerfiles/${{ matrix.dockerfile[0] }}
platforms: ${{ matrix.dockerfile[1] }}

View File

@@ -16,16 +16,21 @@ on:
- '.github/workflows/macos_python.yml'
# TODO: run if we touch any of the recipes involved in this
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_number }}
cancel-in-progress: true
# GitHub Action Limits
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
jobs:
install_gcc:
name: gcc with clang
if: github.repository == 'spack/spack'
runs-on: macos-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08 # @v2
with:
python-version: 3.9
- name: spack install
@@ -36,11 +41,12 @@ jobs:
install_jupyter_clang:
name: jupyter
if: github.repository == 'spack/spack'
runs-on: macos-latest
timeout-minutes: 700
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08 # @v2
with:
python-version: 3.9
- name: spack install
@@ -50,10 +56,11 @@ jobs:
install_scipy_clang:
name: scipy, mpl, pd
if: github.repository == 'spack/spack'
runs-on: macos-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08 # @v2
with:
python-version: 3.9
- name: spack install

View File

@@ -4,6 +4,7 @@ Set-Location spack
git config --global user.email "spack@example.com"
git config --global user.name "Test User"
git config --global core.longpaths true
if ($(git branch --show-current) -ne "develop")
{

View File

@@ -9,14 +9,19 @@ on:
branches:
- develop
- releases/**
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_number }}
cancel-in-progress: true
jobs:
# Validate that the code can be run on all the Python versions
# supported by Spack
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08 # @v2
with:
python-version: '3.10'
- name: Install Python Packages
@@ -31,10 +36,10 @@ jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08 # @v2
with:
python-version: '3.10'
- name: Install Python packages
@@ -57,7 +62,7 @@ jobs:
packages: ${{ steps.filter.outputs.packages }}
with_coverage: ${{ steps.coverage.outputs.with_coverage }}
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
if: ${{ github.event_name == 'push' }}
with:
fetch-depth: 0
@@ -106,10 +111,10 @@ jobs:
- python-version: 3.9
concretizer: original
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08 # @v2
with:
python-version: ${{ matrix.python-version }}
- name: Install System packages
@@ -162,7 +167,7 @@ jobs:
SPACK_TEST_SOLVER: ${{ matrix.concretizer }}
run: |
share/spack/qa/run-unit-tests
- uses: codecov/codecov-action@e3c560433a6cc60aec8812599b7844a7b4fa0d71 # @v2.1.0
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # @v2.1.0
if: ${{ needs.changes.outputs.with_coverage == 'true' }}
with:
flags: unittests,linux,${{ matrix.concretizer }}
@@ -171,10 +176,10 @@ jobs:
needs: [ validate, style, changes ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08 # @v2
with:
python-version: '3.10'
- name: Install System packages
@@ -200,7 +205,7 @@ jobs:
COVERAGE: true
run: |
share/spack/qa/run-shell-tests
- uses: codecov/codecov-action@e3c560433a6cc60aec8812599b7844a7b4fa0d71 # @v2.1.0
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # @v2.1.0
if: ${{ needs.changes.outputs.with_coverage == 'true' }}
with:
flags: shelltests,linux
@@ -218,7 +223,7 @@ jobs:
dnf install -y \
bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
make patch tcl unzip which xz
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
- name: Setup repo and non-root user
run: |
git --version
@@ -237,10 +242,10 @@ jobs:
needs: [ validate, style, changes ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08 # @v2
with:
python-version: '3.10'
- name: Install System packages
@@ -274,7 +279,7 @@ jobs:
SPACK_TEST_SOLVER: clingo
run: |
share/spack/qa/run-unit-tests
- uses: codecov/codecov-action@e3c560433a6cc60aec8812599b7844a7b4fa0d71 # @v2.1.0
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # @v2.1.0
if: ${{ needs.changes.outputs.with_coverage == 'true' }}
with:
flags: unittests,linux,clingo
@@ -286,10 +291,10 @@ jobs:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08 # @v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Python packages
@@ -320,7 +325,7 @@ jobs:
echo "ONLY PACKAGE RECIPES CHANGED [skipping coverage]"
$(which spack) unit-test -x -m "not maybeslow" -k "package_sanity"
fi
- uses: codecov/codecov-action@e3c560433a6cc60aec8812599b7844a7b4fa0d71 # @v2.1.0
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # @v2.1.0
if: ${{ needs.changes.outputs.with_coverage == 'true' }}
with:
files: ./coverage.xml
@@ -331,8 +336,8 @@ jobs:
needs: [ validate, style, changes ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # @v2
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6 # @v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08 # @v2
with:
python-version: '3.10'
- name: Install Python packages
@@ -345,12 +350,12 @@ jobs:
coverage run $(which spack) audit packages
coverage combine
coverage xml
- name: Package audits (wwithout coverage)
- name: Package audits (without coverage)
if: ${{ needs.changes.outputs.with_coverage == 'false' }}
run: |
. share/spack/setup-env.sh
$(which spack) audit packages
- uses: codecov/codecov-action@e3c560433a6cc60aec8812599b7844a7b4fa0d71 # @v2.1.0
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # @v2.1.0
if: ${{ needs.changes.outputs.with_coverage == 'true' }}
with:
flags: unittests,linux,audits

View File

@@ -9,6 +9,11 @@ on:
branches:
- develop
- releases/**
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_number }}
cancel-in-progress: true
defaults:
run:
shell:
@@ -17,8 +22,8 @@ jobs:
validate:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08
with:
python-version: 3.9
- name: Install Python Packages
@@ -33,10 +38,10 @@ jobs:
style:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08
with:
python-version: 3.9
- name: Install Python packages
@@ -55,10 +60,10 @@ jobs:
needs: [ validate, style ]
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08
with:
python-version: 3.9
- name: Install Python packages
@@ -75,10 +80,10 @@ jobs:
needs: [ validate, style ]
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08
with:
python-version: 3.9
- name: Install Python packages
@@ -95,10 +100,10 @@ jobs:
needs: [ validate, style ]
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08
with:
python-version: 3.9
- name: Install Python packages
@@ -120,10 +125,10 @@ jobs:
git config --global core.symlinks false
shell:
powershell
- uses: actions/checkout@v2
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
fetch-depth: 0
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08
with:
python-version: 3.9
- name: Install Python packages
@@ -139,11 +144,11 @@ jobs:
echo "installer_root=$((pwd).Path)" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
env:
ProgressPreference: SilentlyContinue
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8
with:
name: Windows Spack Installer Bundle
path: ${{ env.installer_root }}\pkg\Spack.exe
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8
with:
name: Windows Spack Installer
path: ${{ env.installer_root}}\pkg\Spack.msi
@@ -154,7 +159,7 @@ jobs:
run:
shell: pwsh
steps:
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08
with:
python-version: 3.9
- name: Install Python packages

View File

@@ -1,3 +1,205 @@
# v0.18.0 (2022-05-28)
`v0.18.0` is a major feature release.
## Major features in this release
1. **Concretizer now reuses by default**
`spack install --reuse` was introduced in `v0.17.0`, and `--reuse`
is now the default concretization mode. Spack will try hard to
resolve dependencies using installed packages or binaries (#30396).
To avoid reuse and to use the latest package configurations, (the
old default), you can use `spack install --fresh`, or add
configuration like this to your environment or `concretizer.yaml`:
```yaml
concretizer:
reuse: false
```
2. **Finer-grained hashes**
Spack hashes now include `link`, `run`, *and* `build` dependencies,
as well as a canonical hash of package recipes. Previously, hashes
only included `link` and `run` dependencies (though `build`
dependencies were stored by environments). We coarsened the hash to
reduce churn in user installations, but the new default concretizer
behavior mitigates this concern and gets us reuse *and* provenance.
You will be able to see the build dependencies of new installations
with `spack find`. Old installations will not change and their
hashes will not be affected. (#28156, #28504, #30717, #30861)
3. **Improved error messages**
Error handling with the new concretizer is now done with
optimization criteria rather than with unsatisfiable cores, and
Spack reports many more details about conflicting constraints.
(#30669)
4. **Unify environments when possible**
Environments have thus far supported `concretization: together` or
`concretization: separately`. These have been replaced by a new
preference in `concretizer.yaml`:
```yaml
concretizer:
unify: [true|false|when_possible]
```
`concretizer:unify:when_possible` will *try* to resolve a fully
unified environment, but if it cannot, it will create multiple
configurations of some packages where it has to. For large
environments that previously had to be concretized separately, this
can result in a huge speedup (40-50x). (#28941)
5. **Automatically find externals on Cray machines**
Spack can now automatically discover installed packages in the Cray
Programming Environment by running `spack external find` (or `spack
external read-cray-manifest` to *only* query the PE). Packages from
the PE (e.g., `cray-mpich` are added to the database with full
dependency information, and compilers from the PE are added to
`compilers.yaml`. Available with the June 2022 release of the Cray
Programming Environment. (#24894, #30428)
6. **New binary format and hardened signing**
Spack now has an updated binary format, with improvements for
security. The new format has a detached signature file, and Spack
verifies the signature before untarring or decompressing the binary
package. The previous format embedded the signature in a `tar`
file, which required the client to run `tar` *before* verifying
(#30750). Spack can still install from build caches using the old
format, but we encourage users to switch to the new format going
forward.
Production GitLab pipelines have been hardened to securely sign
binaries. There is now a separate signing stage so that signing
keys are never exposed to build system code, and signing keys are
ephemeral and only live as long as the signing pipeline stage.
(#30753)
7. **Bootstrap mirror generation**
The `spack bootstrap mirror` command can automatically create a
mirror for bootstrapping the concretizer and other needed
dependencies in an air-gapped environment. (#28556)
8. **Nascent Windows support**
Spack now has initial support for Windows. Spack core has been
refactored to run in the Windows environment, and a small number of
packages can now build for Windows. More details are
[in the documentation](https://spack.rtfd.io/en/latest/getting_started.html#spack-on-windows)
(#27021, #28385, many more)
9. **Makefile generation**
`spack env depfile` can be used to generate a `Makefile` from an
environment, which can be used to build packages the environment
in parallel on a single node. e.g.:
```console
spack -e myenv env depfile > Makefile
make
```
Spack propagates `gmake` jobserver information to builds so that
their jobs can share cores. (#30039, #30254, #30302, #30526)
10. **New variant features**
In addition to being conditional themselves, variants can now have
[conditional *values*](https://spack.readthedocs.io/en/latest/packaging_guide.html#conditional-possible-values)
that are only possible for certain configurations of a package. (#29530)
Variants can be
[declared "sticky"](https://spack.readthedocs.io/en/latest/packaging_guide.html#sticky-variants),
which prevents them from being enabled or disabled by the
concretizer. Sticky variants must be set explicitly by users
on the command line or in `packages.yaml`. (#28630)
* Allow conditional possible values in variants
* Add a "sticky" property to variants
## Other new features of note
* Environment views can optionally link only `run` dependencies
with `link:run` (#29336)
* `spack external find --all` finds library-only packages in
addition to build dependencies (#28005)
* Customizable `config:license_dir` option (#30135)
* `spack external find --path PATH` takes a custom search path (#30479)
* `spack spec` has a new `--format` argument like `spack find` (#27908)
* `spack concretize --quiet` skips printing concretized specs (#30272)
* `spack info` now has cleaner output and displays test info (#22097)
* Package-level submodule option for git commit versions (#30085, #30037)
* Using `/hash` syntax to refer to concrete specs in an environment
now works even if `/hash` is not installed. (#30276)
## Major internal refactors
* full hash (see above)
* new develop versioning scheme `0.19.0-dev0`
* Allow for multiple dependencies/dependents from the same package (#28673)
* Splice differing virtual packages (#27919)
## Performance Improvements
* Concretization of large environments with `unify: when_possible` is
much faster than concretizing separately (#28941, see above)
* Single-pass view generation algorithm is 2.6x faster (#29443)
## Archspec improvements
* `oneapi` and `dpcpp` flag support (#30783)
* better support for `M1` and `a64fx` (#30683)
## Removals and Deprecations
* Spack no longer supports Python `2.6` (#27256)
* Removed deprecated `--run-tests` option of `spack install`;
use `spack test` (#30461)
* Removed deprecated `spack flake8`; use `spack style` (#27290)
* Deprecate `spack:concretization` config option; use
`concretizer:unify` (#30038)
* Deprecate top-level module configuration; use module sets (#28659)
* `spack activate` and `spack deactivate` are deprecated in favor of
environments; will be removed in `0.19.0` (#29430; see also `link:run`
in #29336 above)
## Notable Bugfixes
* Fix bug that broke locks with many parallel builds (#27846)
* Many bugfixes and consistency improvements for the new concretizer
and `--reuse` (#30357, #30092, #29835, #29933, #28605, #29694, #28848)
## Packages
* `CMakePackage` uses `CMAKE_INSTALL_RPATH_USE_LINK_PATH` (#29703)
* Refactored `lua` support: `lua-lang` virtual supports both
`lua` and `luajit` via new `LuaPackage` build system(#28854)
* PythonPackage: now installs packages with `pip` (#27798)
* Python: improve site_packages_dir handling (#28346)
* Extends: support spec, not just package name (#27754)
* `find_libraries`: search for both .so and .dylib on macOS (#28924)
* Use stable URLs and `?full_index=1` for all github patches (#29239)
## Spack community stats
* 6,416 total packages, 458 new since `v0.17.0`
* 219 new Python packages
* 60 new R packages
* 377 people contributed to this release
* 337 committers to packages
* 85 committers to core
# v0.17.2 (2022-04-13)
### Spack bugfixes
@@ -11,7 +213,7 @@
* Fixed a few bugs affecting the spack ci command (#29518, #29419)
* Fix handling of Intel compiler environment (#29439)
* Fix a few edge cases when reindexing the DB (#28764)
* Remove "Known issues" from documentation (#29664)
* Remove "Known issues" from documentation (#29664)
* Other miscellaneous bugfixes (0b72e070583fc5bcd016f5adc8a84c99f2b7805f, #28403, #29261)
# v0.17.1 (2021-12-23)

View File

@@ -6,34 +6,15 @@ bootstrap:
# by Spack is installed in a "store" subfolder of this root directory
root: $user_cache_path/bootstrap
# Methods that can be used to bootstrap software. Each method may or
# may not be able to bootstrap all of the software that Spack needs,
# may not be able to bootstrap all the software that Spack needs,
# depending on its type.
sources:
- name: 'github-actions-v0.2'
type: buildcache
description: |
Buildcache generated from a public workflow using Github Actions.
The sha256 checksum of binaries is checked before installation.
info:
url: https://mirror.spack.io/bootstrap/github-actions/v0.2
homepage: https://github.com/spack/spack-bootstrap-mirrors
releases: https://github.com/spack/spack-bootstrap-mirrors/releases
metadata: $spack/share/spack/bootstrap/github-actions-v0.2
- name: 'github-actions-v0.1'
type: buildcache
description: |
Buildcache generated from a public workflow using Github Actions.
The sha256 checksum of binaries is checked before installation.
info:
url: https://mirror.spack.io/bootstrap/github-actions/v0.1
homepage: https://github.com/spack/spack-bootstrap-mirrors
releases: https://github.com/spack/spack-bootstrap-mirrors/releases
# This method is just Spack bootstrapping the software it needs from sources.
# It has been added here so that users can selectively disable bootstrapping
# from sources by "untrusting" it.
- name: spack-install
type: install
description: |
Specs built from sources by Spack. May take a long time.
metadata: $spack/share/spack/bootstrap/github-actions-v0.1
- name: 'spack-install'
metadata: $spack/share/spack/bootstrap/spack-install
trusted:
# By default we trust bootstrapping from sources and from binaries
# produced on Github via the workflow

View File

@@ -14,4 +14,23 @@ concretizer:
# concretizing specs. If `true`, we'll try to use as many installs/binaries
# as possible, rather than building. If `false`, we'll always give you a fresh
# concretization.
reuse: false
reuse: true
# Options that tune which targets are considered for concretization. The
# concretization process is very sensitive to the number targets, and the time
# needed to reach a solution increases noticeably with the number of targets
# considered.
targets:
# Determine whether we want to target specific or generic microarchitectures.
# An example of the first kind might be for instance "skylake" or "bulldozer",
# while generic microarchitectures are for instance "aarch64" or "x86_64_v4".
granularity: microarchitectures
# If "false" allow targets that are incompatible with the current host (for
# instance concretize with target "icelake" while running on "haswell").
# If "true" only allow targets that are compatible with the host.
host_compatible: true
# When "true" concretize root specs of environments together, so that each unique
# package in an environment corresponds to one concrete spec. This ensures
# environments can always be activated. When "false" perform concretization separately
# on each root spec, allowing different versions and variants of the same package in
# an environment.
unify: false

View File

@@ -33,6 +33,9 @@ config:
template_dirs:
- $spack/share/spack/templates
# Directory where licenses should be located
license_dir: $spack/etc/spack/licenses
# Temporary locations Spack can try to use for builds.
#
# Recommended options are given below.

View File

@@ -35,7 +35,8 @@ packages:
jpeg: [libjpeg-turbo, libjpeg]
lapack: [openblas, amdlibflame]
libllvm: [llvm, llvm-amdgpu]
lua-lang: [lua, lua-luajit]
lua-lang: [lua, lua-luajit-openresty, lua-luajit]
luajit: [lua-luajit-openresty, lua-luajit]
mariadb-client: [mariadb-c-client, mariadb]
mkl: [intel-mkl]
mpe: [mpe2]

View File

@@ -192,32 +192,32 @@ you can use them to customize an installation in :ref:`sec-specs`.
Reusing installed dependencies
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. warning::
By default, when you run ``spack install``, Spack tries hard to reuse existing installations
as dependencies, either from a local store or from remote buildcaches if configured.
This minimizes unwanted rebuilds of common dependencies, in particular if
you update Spack frequently.
The ``--reuse`` option described here will become the default installation
method in the next Spack version, and you will be able to get the current
behavior by using ``spack install --fresh``.
By default, when you run ``spack install``, Spack tries to build a new
version of the package you asked for, along with updated versions of
its dependencies. This gets you the latest versions and configurations,
but it can result in unwanted rebuilds if you update Spack frequently.
If you want Spack to try hard to reuse existing installations as dependencies,
you can add the ``--reuse`` option:
In case you want the latest versions and configurations to be installed instead,
you can add the ``--fresh`` option:
.. code-block:: console
$ spack install --reuse mpich
$ spack install --fresh mpich
This will not do anything if ``mpich`` is already installed. If ``mpich``
is not installed, but dependencies like ``hwloc`` and ``libfabric`` are,
the ``mpich`` will be build with the installed versions, if possible.
You can use the :ref:`spack spec -I <cmd-spack-spec>` command to see what
Reusing installations in this mode is "accidental", and happening only if
there's a match between existing installations and what Spack would have installed
anyhow.
You can use the ``spack spec -I mpich`` command to see what
will be reused and what will be built before you install.
You can configure Spack to use the ``--reuse`` behavior by default in
``concretizer.yaml``.
You can configure Spack to use the ``--fresh`` behavior by default in
``concretizer.yaml``:
.. code-block:: yaml
concretizer:
reuse: false
.. _cmd-spack-uninstall:

View File

@@ -50,6 +50,13 @@ build cache files for the "ninja" spec:
Note that the targeted spec must already be installed. Once you have a build cache,
you can add it as a mirror, discussed next.
.. warning::
Spack improved the format used for binary caches in v0.18. The entire v0.18 series
will be able to verify and install binary caches both in the new and in the old format.
Support for using the old format is expected to end in v0.19, so we advise users to
recreate relevant buildcaches using Spack v0.18 or higher.
---------------------------------------
Finding or installing build cache files
---------------------------------------

View File

@@ -0,0 +1,160 @@
.. Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)
.. _bootstrapping:
=============
Bootstrapping
=============
In the :ref:`Getting started <getting_started>` Section we already mentioned that
Spack can bootstrap some of its dependencies, including ``clingo``. In fact, there
is an entire command dedicated to the management of every aspect of bootstrapping:
.. command-output:: spack bootstrap --help
The first thing to know to understand bootstrapping in Spack is that each of
Spack's dependencies is bootstrapped lazily; i.e. the first time it is needed and
can't be found. You can readily check if any prerequisite for using Spack
is missing by running:
.. code-block:: console
% spack bootstrap status
Spack v0.17.1 - python@3.8
[FAIL] Core Functionalities
[B] MISSING "clingo": required to concretize specs
[FAIL] Binary packages
[B] MISSING "gpg2": required to sign/verify buildcaches
Spack will take care of bootstrapping any missing dependency marked as [B]. Dependencies marked as [-] are instead required to be found on the system.
In the case of the output shown above Spack detected that both ``clingo`` and ``gnupg``
are missing and it's giving detailed information on why they are needed and whether
they can be bootstrapped. Running a command that concretize a spec, like:
.. code-block:: console
% spack solve zlib
==> Bootstrapping clingo from pre-built binaries
==> Fetching https://mirror.spack.io/bootstrap/github-actions/v0.1/build_cache/darwin-catalina-x86_64/apple-clang-12.0.0/clingo-bootstrap-spack/darwin-catalina-x86_64-apple-clang-12.0.0-clingo-bootstrap-spack-p5on7i4hejl775ezndzfdkhvwra3hatn.spack
==> Installing "clingo-bootstrap@spack%apple-clang@12.0.0~docs~ipo+python build_type=Release arch=darwin-catalina-x86_64" from a buildcache
[ ... ]
triggers the bootstrapping of clingo from pre-built binaries as expected.
-----------------------
The Bootstrapping store
-----------------------
The software installed for bootstrapping purposes is deployed in a separate store.
Its location can be checked with the following command:
.. code-block:: console
% spack bootstrap root
It can also be changed with the same command by just specifying the newly desired path:
.. code-block:: console
% spack bootstrap root /opt/spack/bootstrap
You can check what is installed in the bootstrapping store at any time using:
.. code-block:: console
% spack find -b
==> Showing internal bootstrap store at "/Users/spack/.spack/bootstrap/store"
==> 11 installed packages
-- darwin-catalina-x86_64 / apple-clang@12.0.0 ------------------
clingo-bootstrap@spack libassuan@2.5.5 libgpg-error@1.42 libksba@1.5.1 pinentry@1.1.1 zlib@1.2.11
gnupg@2.3.1 libgcrypt@1.9.3 libiconv@1.16 npth@1.6 python@3.8
In case it is needed you can remove all the software in the current bootstrapping store with:
.. code-block:: console
% spack clean -b
==> Removing bootstrapped software and configuration in "/Users/spack/.spack/bootstrap"
% spack find -b
==> Showing internal bootstrap store at "/Users/spack/.spack/bootstrap/store"
==> 0 installed packages
--------------------------------------------
Enabling and disabling bootstrapping methods
--------------------------------------------
Bootstrapping is always performed by trying the methods listed by:
.. command-output:: spack bootstrap list
in the order they appear, from top to bottom. By default Spack is
configured to try first bootstrapping from pre-built binaries and to
fall-back to bootstrapping from sources if that failed.
If need be, you can disable bootstrapping altogether by running:
.. code-block:: console
% spack bootstrap disable
in which case it's your responsibility to ensure Spack runs in an
environment where all its prerequisites are installed. You can
also configure Spack to skip certain bootstrapping methods by *untrusting*
them. For instance:
.. code-block:: console
% spack bootstrap untrust github-actions
==> "github-actions" is now untrusted and will not be used for bootstrapping
tells Spack to skip trying to bootstrap from binaries. To add the "github-actions" method back you can:
.. code-block:: console
% spack bootstrap trust github-actions
There is also an option to reset the bootstrapping configuration to Spack's defaults:
.. code-block:: console
% spack bootstrap reset
==> Bootstrapping configuration is being reset to Spack's defaults. Current configuration will be lost.
Do you want to continue? [Y/n]
%
----------------------------------------
Creating a mirror for air-gapped systems
----------------------------------------
Spack's default configuration for bootstrapping relies on the user having
access to the internet, either to fetch pre-compiled binaries or source tarballs.
Sometimes though Spack is deployed on air-gapped systems where such access is denied.
To help with similar situations Spack has a command that recreates, in a local folder
of choice, a mirror containing the source tarballs and/or binary packages needed for
bootstrapping.
.. code-block:: console
% spack bootstrap mirror --binary-packages /opt/bootstrap
==> Adding "clingo-bootstrap@spack+python %apple-clang target=x86_64" and dependencies to the mirror at /opt/bootstrap/local-mirror
==> Adding "gnupg@2.3: %apple-clang target=x86_64" and dependencies to the mirror at /opt/bootstrap/local-mirror
==> Adding "patchelf@0.13.1:0.13.99 %apple-clang target=x86_64" and dependencies to the mirror at /opt/bootstrap/local-mirror
==> Adding binary packages from "https://github.com/alalazo/spack-bootstrap-mirrors/releases/download/v0.1-rc.2/bootstrap-buildcache.tar.gz" to the mirror at /opt/bootstrap/local-mirror
To register the mirror on the platform where it's supposed to be used run the following command(s):
% spack bootstrap add --trust local-sources /opt/bootstrap/metadata/sources
% spack bootstrap add --trust local-binaries /opt/bootstrap/metadata/binaries
This command needs to be run on a machine with internet access and the resulting folder
has to be moved over to the air-gapped system. Once the local sources are added using the
commands suggested at the prompt, they can be used to bootstrap Spack.

View File

@@ -219,33 +219,65 @@ Concretizer options
but you can also use ``concretizer.yaml`` to customize aspects of the
algorithm it uses to select the dependencies you install:
.. _code-block: yaml
.. literalinclude:: _spack_root/etc/spack/defaults/concretizer.yaml
:language: yaml
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Reuse already installed packages
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The ``reuse`` attribute controls whether Spack will prefer to use installed packages (``true``), or
whether it will do a "fresh" installation and prefer the latest settings from
``package.py`` files and ``packages.yaml`` (``false``).
You can use:
.. code-block:: console
% spack install --reuse <spec>
to enable reuse for a single installation, and you can use:
.. code-block:: console
spack install --fresh <spec>
to do a fresh install if ``reuse`` is enabled by default.
``reuse: true`` is the default.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Selection of the target microarchitectures
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The options under the ``targets`` attribute control which targets are considered during a solve.
Currently the options in this section are only configurable from the ``concretization.yaml`` file
and there are no corresponding command line arguments to enable them for a single solve.
The ``granularity`` option can take two possible values: ``microarchitectures`` and ``generic``.
If set to:
.. code-block:: yaml
concretizer:
# Whether to consider installed packages or packages from buildcaches when
# concretizing specs. If `true`, we'll try to use as many installs/binaries
# as possible, rather than building. If `false`, we'll always give you a fresh
# concretization.
reuse: false
targets:
granularity: microarchitectures
^^^^^^^^^^^^^^^^
``reuse``
^^^^^^^^^^^^^^^^
Spack will consider all the microarchitectures known to ``archspec`` to label nodes for
compatibility. If instead the option is set to:
This controls whether Spack will prefer to use installed packages (``true``), or
whether it will do a "fresh" installation and prefer the latest settings from
``package.py`` files and ``packages.yaml`` (``false``). .
.. code-block:: yaml
You can use ``spack install --reuse`` to enable reuse for a single installation,
and you can use ``spack install --fresh`` to do a fresh install if ``reuse`` is
enabled by default.
concretizer:
targets:
granularity: generic
.. note::
``reuse: false`` is the current default, but ``reuse: true`` will be the default
in the next Spack release. You will still be able to use ``spack install --fresh``
to get the old behavior.
Spack will consider only generic microarchitectures. For instance, when running on an
Haswell node, Spack will consider ``haswell`` as the best target in the former case and
``x86_64_v3`` as the best target in the latter case.
The ``host_compatible`` option is a Boolean option that determines whether or not the
microarchitectures considered during the solve are constrained to be compatible with the
host Spack is currently running on. For instance, if this option is set to ``true``, a
user cannot concretize for ``target=icelake`` while running on an Haswell node.
.. _package-preferences:

View File

@@ -39,6 +39,7 @@ on these ideas for each distinct build system that Spack supports:
build_systems/autotoolspackage
build_systems/cmakepackage
build_systems/cachedcmakepackage
build_systems/mesonpackage
build_systems/qmakepackage
build_systems/sippackage
@@ -47,6 +48,7 @@ on these ideas for each distinct build system that Spack supports:
:maxdepth: 1
:caption: Language-specific
build_systems/luapackage
build_systems/octavepackage
build_systems/perlpackage
build_systems/pythonpackage
@@ -60,11 +62,12 @@ on these ideas for each distinct build system that Spack supports:
build_systems/bundlepackage
build_systems/cudapackage
build_systems/custompackage
build_systems/inteloneapipackage
build_systems/intelpackage
build_systems/rocmpackage
build_systems/custompackage
build_systems/multiplepackage
build_systems/rocmpackage
build_systems/sourceforgepackage
For reference, the :py:mod:`Build System API docs <spack.build_systems>`
provide a list of build systems and methods/attributes that can be

View File

@@ -0,0 +1,123 @@
.. Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)
.. _cachedcmakepackage:
------------------
CachedCMakePackage
------------------
The CachedCMakePackage base class is used for CMake-based workflows
that create a CMake cache file prior to running ``cmake``. This is
useful for packages with arguments longer than the system limit, and
for reproducibility.
The documentation for this class assumes that the user is familiar with
the ``CMakePackage`` class from which it inherits. See the documentation
for :ref:`CMakePackage <cmakepackage>`.
^^^^^^
Phases
^^^^^^
The ``CachedCMakePackage`` base class comes with the following phases:
#. ``initconfig`` - generate the CMake cache file
#. ``cmake`` - generate the Makefile
#. ``build`` - build the package
#. ``install`` - install the package
By default, these phases run:
.. code-block:: console
$ mkdir spack-build
$ cd spack-build
$ cat << EOF > name-arch-compiler@version.cmake
# Write information on compilers and dependencies
# includes information on mpi and cuda if applicable
$ cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/installation/prefix -C name-arch-compiler@version.cmake
$ make
$ make test # optional
$ make install
The ``CachedCMakePackage`` class inherits from the ``CMakePackage``
class, and accepts all of the same options and adds all of the same
flags to the ``cmake`` command. Similar to the ``CMakePAckage`` class,
you may need to add a few arguments yourself, and the
``CachedCMakePackage`` provides the same interface to add those
flags.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Adding entries to the CMake cache
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In addition to adding flags to the ``cmake`` command, you may need to
add entries to the CMake cache in the ``initconfig`` phase. This can
be done by overriding one of four methods:
#. ``CachedCMakePackage.initconfig_compiler_entries``
#. ``CachedCMakePackage.initconfig_mpi_entries``
#. ``CachedCMakePackage.initconfig_hardware_entries``
#. ``CachedCMakePackage.initconfig_package_entries``
Each of these methods returns a list of CMake cache strings. The
distinction between these methods is merely to provide a
well-structured and legible cmake cache file -- otherwise, entries
from each of these methods are handled identically.
Spack also provides convenience methods for generating CMake cache
entries. These methods are available at module scope in every Spack
package. Because CMake parses boolean options, strings, and paths
differently, there are three such methods:
#. ``cmake_cache_option``
#. ``cmake_cache_string``
#. ``cmake_cache_path``
These methods each accept three parameters -- the name of the CMake
variable associated with the entry, the value of the entry, and an
optional comment -- and return strings in the appropriate format to be
returned from any of the ``initconfig*`` methods. Additionally, these
methods may return comments beginning with the ``#`` character.
A typical usage of these methods may look something like this:
.. code-block:: python
def initconfig_mpi_entries(self)
# Get existing MPI configurations
entries = super(self, Foo).initconfig_mpi_entries()
# The existing MPI configurations key on whether ``mpi`` is in the spec
# This spec has an MPI variant, and we need to enable MPI when it is on.
# This hypothetical package controls MPI with the ``FOO_MPI`` option to
# cmake.
if '+mpi' in self.spec:
entries.append(cmake_cache_option('FOO_MPI', True, "enable mpi"))
else:
entries.append(cmake_cache_option('FOO_MPI', False, "disable mpi"))
def initconfig_package_entries(self):
# Package specific options
entries = []
entries.append('#Entries for build options')
bar_on = '+bar' in self.spec
entries.append(cmake_cache_option('FOO_BAR', bar_on, 'toggle bar'))
entries.append('#Entries for dependencies')
if self.spec['blas'].name == 'baz': # baz is our blas provider
entries.append(cmake_cache_string('FOO_BLAS', 'baz', 'Use baz'))
entries.append(cmake_cache_path('BAZ_PREFIX', self.spec['baz'].prefix))
^^^^^^^^^^^^^^^^^^^^^^
External documentation
^^^^^^^^^^^^^^^^^^^^^^
For more information on CMake cache files, see:
https://cmake.org/cmake/help/latest/manual/cmake.1.html

View File

@@ -84,8 +84,8 @@ build ``hdf5`` with Intel oneAPI MPI do::
spack install hdf5 +mpi ^intel-oneapi-mpi
Using an Externally Installed oneAPI
====================================
Using Externally Installed oneAPI Tools
=======================================
Spack can also use oneAPI tools that are manually installed with
`Intel Installers`_. The procedures for configuring Spack to use
@@ -110,7 +110,7 @@ Another option is to manually add the configuration to
Libraries
---------
If you want Spack to use MKL that you have installed without Spack in
If you want Spack to use oneMKL that you have installed without Spack in
the default location, then add the following to
``~/.spack/packages.yaml``, adjusting the version as appropriate::
@@ -139,7 +139,7 @@ You can also use Spack-installed libraries. For example::
spack load intel-oneapi-mkl
Will update your environment CPATH, LIBRARY_PATH, and other
environment variables for building an application with MKL.
environment variables for building an application with oneMKL.
More information
================

View File

@@ -15,6 +15,9 @@ IntelPackage
Intel packages in Spack
^^^^^^^^^^^^^^^^^^^^^^^^
This is an earlier version of Intel software development tools and has
now been replaced by Intel oneAPI Toolkits.
Spack can install and use several software development products offered by Intel.
Some of these are available under no-cost terms, others require a paid license.
All share the same basic steps for configuration, installation, and, where

View File

@@ -0,0 +1,105 @@
.. Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)
.. _luapackage:
------------
LuaPackage
------------
LuaPackage is a helper for the common case of Lua packages that provide
a rockspec file. This is not meant to take a rock archive, but to build
a source archive or repository that provides a rockspec, which should cover
most lua packages. In the case a Lua package builds by Make rather than
luarocks, prefer MakefilePackage.
^^^^^^
Phases
^^^^^^
The ``LuaPackage`` base class comes with the following phases:
#. ``unpack`` - if using a rock, unpacks the rock and moves into the source directory
#. ``preprocess`` - adjust sources or rockspec to fix build
#. ``install`` - install the project
By default, these phases run:
.. code-block:: console
# If the archive is a source rock
$ luarocks unpack <archive>.src.rock
$ # preprocess is a noop by default
$ luarocks make <name>.rockspec
Any of these phases can be overridden in your package as necessary.
^^^^^^^^^^^^^^^
Important files
^^^^^^^^^^^^^^^
Packages that use the Lua/LuaRocks build system can be identified by the
presence of a ``*.rockspec`` file in their sourcetree, or can be fetched as
a source rock archive (``.src.rock``). This file declares things like build
instructions and dependencies, the ``.src.rock`` also contains all code.
It is common for the rockspec file to list the lua version required in
a dependency. The LuaPackage class adds appropriate dependencies on a Lua
implementation, but it is a good idea to specify the version required with
a ``depends_on`` statement. The block normally will be a table definition like
this:
.. code-block:: lua
dependencies = {
"lua >= 5.1",
}
The LuaPackage class supports source repositories and archives containing
a rockspec and directly downloading source rock files. It *does not* support
downloading dependencies listed inside a rockspec, and thus does not support
directly downloading a rockspec as an archive.
^^^^^^^^^^^^^^^^^^^^^^^^^
Build system dependencies
^^^^^^^^^^^^^^^^^^^^^^^^^
All base dependencies are added by the build system, but LuaRocks is run to
avoid downloading extra Lua dependencies during build. If the package needs
Lua libraries outside the standard set, they should be added as dependencies.
To specify a Lua version constraint but allow all lua implementations, prefer
to use ``depends_on("lua-lang@5.1:5.1.99")`` to express any 5.1 compatible
version. If the package requires LuaJit rather than Lua,
a ``depends_on("luajit")`` should be used to ensure a LuaJit distribution is
used instead of the Lua interpreter. Alternately, if only interpreted Lua will
work ``depends_on("lua")`` will express that.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Passing arguments to luarocks make
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you need to pass any arguments to the ``luarocks make`` call, you can
override the ``luarocks_args`` method like so:
.. code-block:: python
def luarocks_args(self):
return ['flag1', 'flag2']
One common use of this is to override warnings or flags for newer compilers, as in:
.. code-block:: python
def luarocks_args(self):
return ["CFLAGS='-Wno-error=implicit-function-declaration'"]
^^^^^^^^^^^^^^^^^^^^^^
External documentation
^^^^^^^^^^^^^^^^^^^^^^
For more information on the LuaRocks build system, see:
https://luarocks.org/

View File

@@ -48,8 +48,9 @@ important to understand.
**build backend**
Libraries used to define how to build a wheel. Examples
include `setuptools <https://setuptools.pypa.io/>`__,
`flit <https://flit.readthedocs.io/>`_, and
`poetry <https://python-poetry.org/>`_.
`flit <https://flit.readthedocs.io/>`_,
`poetry <https://python-poetry.org/>`_, and
`hatchling <https://hatch.pypa.io/latest/>`_.
^^^^^^^^^^^
Downloading
@@ -326,6 +327,33 @@ for specifying the version requirements. Note that ``~=`` works
differently in poetry than in setuptools and flit for versions that
start with a zero.
"""""""""
hatchling
"""""""""
If the ``pyproject.toml`` lists ``hatchling.build`` as the
``build-backend``, it uses the hatchling build system. Look for
dependencies under the following keys:
* ``requires-python``
This specifies the version of Python that is required
* ``project.dependencies``
These packages are required for building and installation. You can
add them with ``type=('build', 'run')``.
* ``project.optional-dependencies``
This section includes keys with lists of optional dependencies
needed to enable those features. You should add a variant that
optionally adds these dependencies. This variant should be ``False``
by default.
See https://hatch.pypa.io/latest/config/dependency/ for more
information.
""""""
wheels
""""""
@@ -666,3 +694,4 @@ For more information on build backend tools, see:
* setuptools: https://setuptools.pypa.io/
* flit: https://flit.readthedocs.io/
* poetry: https://python-poetry.org/
* hatchling: https://hatch.pypa.io/latest/

View File

@@ -95,7 +95,7 @@ class of your package. For example, you can add it to your
# Set up the hip macros needed by the build
args.extend([
'-DENABLE_HIP=ON',
'-DHIP_ROOT_DIR={0}'.format(spec['hip'].prefix])
'-DHIP_ROOT_DIR={0}'.format(spec['hip'].prefix)])
rocm_archs = spec.variants['amdgpu_target'].value
if 'none' not in rocm_archs:
args.append('-DHIP_HIPCC_FLAGS=--amdgpu-target={0}'

View File

@@ -0,0 +1,55 @@
.. Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)
.. _sourceforgepackage:
------------------
SourceforgePackage
------------------
``SourceforgePackage`` is a
`mixin-class <https://en.wikipedia.org/wiki/Mixin>`_. It automatically
sets the URL based on a list of Sourceforge mirrors listed in
`sourceforge_mirror_path`, which defaults to a half dozen known mirrors.
Refer to the package source
(`<https://github.com/spack/spack/blob/develop/lib/spack/spack/build_systems/sourceforge.py>`__) for the current list of mirrors used by Spack.
^^^^^^^
Methods
^^^^^^^
This package provides a method for populating mirror URLs.
**urls**
This method returns a list of possible URLs for package source.
It is decorated with `property` so its results are treated as
a package attribute.
Refer to
`<https://spack.readthedocs.io/en/latest/packaging_guide.html#mirrors-of-the-main-url>`__
for information on how Spack uses the `urls` attribute during
fetching.
^^^^^
Usage
^^^^^
This helper package can be added to your package by adding it as a base
class of your package and defining the relative location of an archive
file for one version of your software.
.. code-block:: python
:emphasize-lines: 1,3
class MyPackage(AutotoolsPackage, SourceforgePackage):
...
sourceforge_mirror_path = "my-package/mypackage.1.0.0.tar.gz"
...
Over 40 packages are using ``SourceforcePackage`` this mix-in as of
July 2022 so there are multiple packages to choose from if you want
to see a real example.

View File

@@ -23,7 +23,10 @@
import sys
from glob import glob
from docutils.statemachine import StringList
from sphinx.domains.python import PythonDomain
from sphinx.ext.apidoc import main as sphinx_apidoc
from sphinx.parsers import RSTParser
# -- Spack customizations -----------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
@@ -82,9 +85,6 @@
#
# Disable duplicate cross-reference warnings.
#
from sphinx.domains.python import PythonDomain
class PatchedPythonDomain(PythonDomain):
def resolve_xref(self, env, fromdocname, builder, typ, target, node, contnode):
if 'refspecific' in node:
@@ -92,8 +92,20 @@ def resolve_xref(self, env, fromdocname, builder, typ, target, node, contnode):
return super(PatchedPythonDomain, self).resolve_xref(
env, fromdocname, builder, typ, target, node, contnode)
#
# Disable tabs to space expansion in code blocks
# since Makefiles require tabs.
#
class NoTabExpansionRSTParser(RSTParser):
def parse(self, inputstring, document):
if isinstance(inputstring, str):
lines = inputstring.splitlines()
inputstring = StringList(lines, document.current_source)
super().parse(inputstring, document)
def setup(sphinx):
sphinx.add_domain(PatchedPythonDomain, override=True)
sphinx.add_source_parser(NoTabExpansionRSTParser, override=True)
# -- General configuration -----------------------------------------------------

View File

@@ -59,7 +59,8 @@ other techniques to minimize the size of the final image:
&& echo " specs:" \
&& echo " - gromacs+mpi" \
&& echo " - mpich" \
&& echo " concretization: together" \
&& echo " concretizer: together" \
&& echo " unify: true" \
&& echo " config:" \
&& echo " install_tree: /opt/software" \
&& echo " view: /opt/view") > /opt/spack-environment/spack.yaml
@@ -108,9 +109,10 @@ Spack Images on Docker Hub
--------------------------
Docker images with Spack preinstalled and ready to be used are
built on `Docker Hub <https://hub.docker.com/u/spack>`_
at every push to ``develop`` or to a release branch. The OS that
are currently supported are summarized in the table below:
built when a release is tagged, or nightly on ``develop``. The images
are then pushed both to `Docker Hub <https://hub.docker.com/u/spack>`_
and to `GitHub Container Registry <https://github.com/orgs/spack/packages?repo_name=spack>`_.
The OS that are currently supported are summarized in the table below:
.. _containers-supported-os:
@@ -120,22 +122,31 @@ are currently supported are summarized in the table below:
* - Operating System
- Base Image
- Spack Image
* - Ubuntu 16.04
- ``ubuntu:16.04``
- ``spack/ubuntu-xenial``
* - Ubuntu 18.04
- ``ubuntu:18.04``
- ``spack/ubuntu-bionic``
* - Ubuntu 20.04
- ``ubuntu:20.04``
- ``spack/ubuntu-focal``
* - Ubuntu 22.04
- ``ubuntu:22.04``
- ``spack/ubuntu-jammy``
* - CentOS 7
- ``centos:7``
- ``spack/centos7``
* - CentOS Stream
- ``quay.io/centos/centos:stream``
- ``spack/centos-stream``
* - openSUSE Leap
- ``opensuse/leap``
- ``spack/leap15``
* - Amazon Linux 2
- ``amazonlinux:2``
- ``spack/amazon-linux``
All the images are tagged with the corresponding release of Spack:
.. image:: dockerhub_spack.png
.. image:: images/ghcr_spack.png
with the exception of the ``latest`` tag that points to the HEAD
of the ``develop`` branch. These images are available for anyone
@@ -245,7 +256,8 @@ software is respectively built and installed:
&& echo " specs:" \
&& echo " - gromacs+mpi" \
&& echo " - mpich" \
&& echo " concretization: together" \
&& echo " concretizer:" \
&& echo " unify: true" \
&& echo " config:" \
&& echo " install_tree: /opt/software" \
&& echo " view: /opt/view") > /opt/spack-environment/spack.yaml
@@ -366,7 +378,8 @@ produces, for instance, the following ``Dockerfile``:
&& echo " externals:" \
&& echo " - spec: cuda%gcc" \
&& echo " prefix: /usr/local/cuda" \
&& echo " concretization: together" \
&& echo " concretizer:" \
&& echo " unify: true" \
&& echo " config:" \
&& echo " install_tree: /opt/software" \
&& echo " view: /opt/view") > /opt/spack-environment/spack.yaml

View File

@@ -107,7 +107,6 @@ with a high level view of Spack's directory structure:
llnl/ <- some general-use libraries
spack/ <- spack module; contains Python code
analyzers/ <- modules to run analysis on installed packages
build_systems/ <- modules for different build systems
cmd/ <- each file in here is a spack subcommand
compilers/ <- compiler description files
@@ -151,7 +150,7 @@ Package-related modules
^^^^^^^^^^^^^^^^^^^^^^^
:mod:`spack.package`
Contains the :class:`~spack.package.Package` class, which
Contains the :class:`~spack.package_base.Package` class, which
is the superclass for all packages in Spack. Methods on ``Package``
implement all phases of the :ref:`package lifecycle
<package-lifecycle>` and manage the build process.
@@ -242,22 +241,6 @@ Unit tests
Implements Spack's test suite. Add a module and put its name in
the test suite in ``__init__.py`` to add more unit tests.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Research and Monitoring Modules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:mod:`spack.monitor`
Contains :class:`~spack.monitor.SpackMonitorClient`. This is accessed from
the ``spack install`` and ``spack analyze`` commands to send build and
package metadata up to a `Spack Monitor
<https://github.com/spack/spack-monitor>`_ server.
:mod:`spack.analyzers`
A module folder with a :class:`~spack.analyzers.analyzer_base.AnalyzerBase`
that provides base functions to run, save, and (optionally) upload analysis
results to a `Spack Monitor <https://github.com/spack/spack-monitor>`_ server.
^^^^^^^^^^^^^
Other Modules
@@ -301,240 +284,6 @@ Most spack commands look something like this:
The information in Package files is used at all stages in this
process.
Conceptually, packages are overloaded. They contain:
-------------
Stage objects
-------------
.. _writing-analyzers:
-----------------
Writing analyzers
-----------------
To write an analyzer, you should add a new python file to the
analyzers module directory at ``lib/spack/spack/analyzers`` .
Your analyzer should be a subclass of the :class:`AnalyzerBase <spack.analyzers.analyzer_base.AnalyzerBase>`. For example, if you want
to add an analyzer class ``Myanalyzer`` you would write to
``spack/analyzers/myanalyzer.py`` and import and
use the base as follows:
.. code-block:: python
from .analyzer_base import AnalyzerBase
class Myanalyzer(AnalyzerBase):
Note that the class name is your module file name, all lowercase
except for the first capital letter. You can look at other analyzers in
that analyzer directory for examples. The guide here will tell you about the basic functions needed.
^^^^^^^^^^^^^^^^^^^^^^^^^
Analyzer Output Directory
^^^^^^^^^^^^^^^^^^^^^^^^^
By default, when you run ``spack analyze run`` an analyzer output directory will
be created in your spack user directory in your ``$HOME``. The reason we output here
is because the install directory might not always be writable.
.. code-block:: console
~/.spack/
analyzers
Result files will be written here, organized in subfolders in the same structure
as the package, with each analyzer owning it's own subfolder. for example:
.. code-block:: console
$ tree ~/.spack/analyzers/
/home/spackuser/.spack/analyzers/
└── linux-ubuntu20.04-skylake
└── gcc-9.3.0
└── zlib-1.2.11-sl7m27mzkbejtkrajigj3a3m37ygv4u2
├── environment_variables
│   └── spack-analyzer-environment-variables.json
├── install_files
│   └── spack-analyzer-install-files.json
└── libabigail
└── lib
└── spack-analyzer-libabigail-libz.so.1.2.11.xml
Notice that for the libabigail analyzer, since results are generated per object,
we honor the object's folder in case there are equivalently named files in
different folders. The result files are typically written as json so they can be easily read and uploaded in a future interaction with a monitor.
^^^^^^^^^^^^^^^^^
Analyzer Metadata
^^^^^^^^^^^^^^^^^
Your analyzer is required to have the class attributes ``name``, ``outfile``,
and ``description``. These are printed to the user with they use the subcommand
``spack analyze list-analyzers``. Here is an example.
As we mentioned above, note that this analyzer would live in a module named
``libabigail.py`` in the analyzers folder so that the class can be discovered.
.. code-block:: python
class Libabigail(AnalyzerBase):
name = "libabigail"
outfile = "spack-analyzer-libabigail.json"
description = "Application Binary Interface (ABI) features for objects"
This means that the name and output file should be unique for your analyzer.
Note that "all" cannot be the name of an analyzer, as this key is used to indicate
that the user wants to run all analyzers.
.. _analyzer_run_function:
^^^^^^^^^^^^^^^^^^^^^^^^
An analyzer run Function
^^^^^^^^^^^^^^^^^^^^^^^^
The core of an analyzer is its ``run()`` function, which should accept no
arguments. You can assume your analyzer has the package spec of interest at ``self.spec``
and it's up to the run function to generate whatever analysis data you need,
and then return the object with a key as the analyzer name. The result data
should be a list of objects, each with a name, ``analyzer_name``, ``install_file``,
and one of ``value`` or ``binary_value``. The install file should be for a relative
path, and not the absolute path. For example, let's say we extract a metric called
``metric`` for ``bin/wget`` using our analyzer ``thebest-analyzer``.
We might have data that looks like this:
.. code-block:: python
result = {"name": "metric", "analyzer_name": "thebest-analyzer", "value": "1", "install_file": "bin/wget"}
We'd then return it as follows - note that they key is the analyzer name at ``self.name``.
.. code-block:: python
return {self.name: result}
This will save the complete result to the analyzer metadata folder, as described
previously. If you want support for adding a different kind of metadata (e.g.,
not associated with an install file) then the monitor server would need to be updated
to support this first.
^^^^^^^^^^^^^^^^^^^^^^^^^
An analyzer init Function
^^^^^^^^^^^^^^^^^^^^^^^^^
If you don't need any extra dependencies or checks, you can skip defining an analyzer
init function, as the base class will handle it. Typically, it will accept
a spec, and an optional output directory (if the user does not want the default
metadata folder for analyzer results). The analyzer init function should call
it's parent init, and then do any extra checks or validation that are required to
work. For example:
.. code-block:: python
def __init__(self, spec, dirname=None):
super(Myanalyzer, self).__init__(spec, dirname)
# install extra dependencies, do extra preparation and checks here
At the end of the init, you will have available to you:
- **self.spec**: the spec object
- **self.dirname**: an optional directory name the user as provided at init to save
- **self.output_dir**: the analyzer metadata directory, where we save by default
- **self.meta_dir**: the path to the package metadata directory (.spack) if you need it
And can proceed to write your analyzer.
^^^^^^^^^^^^^^^^^^^^^^^
Saving Analyzer Results
^^^^^^^^^^^^^^^^^^^^^^^
The analyzer will have ``save_result`` called, with the result object generated
to save it to the filesystem, and if the user has added the ``--monitor`` flag
to upload it to a monitor server. If your result follows an accepted result
format and you don't need to parse it further, you don't need to add this
function to your class. However, if your result data is large or otherwise
needs additional parsing, you can define it. If you define the function, it
is useful to know about the ``output_dir`` property, which you can join
with your output file relative path of choice:
.. code-block:: python
outfile = os.path.join(self.output_dir, "my-output-file.txt")
The directory will be provided by the ``output_dir`` property but it won't exist,
so you should create it:
.. code::block:: python
# Create the output directory
if not os.path.exists(self._output_dir):
os.makedirs(self._output_dir)
If you are generating results that match to specific files in the package
install directory, you should try to maintain those paths in the case that
there are equivalently named files in different directories that would
overwrite one another. As an example of an analyzer with a custom save,
the Libabigail analyzer saves ``*.xml`` files to the analyzer metadata
folder in ``run()``, as they are either binaries, or as xml (text) would
usually be too big to pass in one request. For this reason, the files
are saved during ``run()`` and the filenames added to the result object,
and then when the result object is passed back into ``save_result()``,
we skip saving to the filesystem, and instead read the file and send
each one (separately) to the monitor:
.. code-block:: python
def save_result(self, result, monitor=None, overwrite=False):
"""ABI results are saved to individual files, so each one needs to be
read and uploaded. Result here should be the lookup generated in run(),
the key is the analyzer name, and each value is the result file.
We currently upload the entire xml as text because libabigail can't
easily read gzipped xml, but this will be updated when it can.
"""
if not monitor:
return
name = self.spec.package.name
for obj, filename in result.get(self.name, {}).items():
# Don't include the prefix
rel_path = obj.replace(self.spec.prefix + os.path.sep, "")
# We've already saved the results to file during run
content = spack.monitor.read_file(filename)
# A result needs an analyzer, value or binary_value, and name
data = {"value": content, "install_file": rel_path, "name": "abidw-xml"}
tty.info("Sending result for %s %s to monitor." % (name, rel_path))
monitor.send_analyze_metadata(self.spec.package, {"libabigail": [data]})
Notice that this function, if you define it, requires a result object (generated by
``run()``, a monitor (if you want to send), and a boolean ``overwrite`` to be used
to check if a result exists first, and not write to it if the result exists and
overwrite is False. Also notice that since we already saved these files to the analyzer metadata folder, we return early if a monitor isn't defined, because this function serves to send results to the monitor. If you haven't saved anything to the analyzer metadata folder
yet, you might want to do that here. You should also use ``tty.info`` to give
the user a message of "Writing result to $DIRNAME."
.. _writing-commands:
@@ -699,23 +448,6 @@ with a hook, and this is the purpose of this particular hook. Akin to
``on_phase_success`` we require the same variables - the package that failed,
the name of the phase, and the log file where we might find errors.
"""""""""""""""""""""""""""""""""
``on_analyzer_save(pkg, result)``
"""""""""""""""""""""""""""""""""
After an analyzer has saved some result for a package, this hook is called,
and it provides the package that we just ran the analysis for, along with
the loaded result. Typically, a result is structured to have the name
of the analyzer as key, and the result object that is defined in detail in
:ref:`analyzer_run_function`.
.. code-block:: python
def on_analyzer_save(pkg, result):
"""given a package and a result...
"""
print('Do something extra with a package analysis result here')
^^^^^^^^^^^^^^^^^^^^^^
Adding a New Hook Type

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

View File

@@ -273,19 +273,9 @@ or
Concretizing
^^^^^^^^^^^^
Once some user specs have been added to an environment, they can be
concretized. *By default specs are concretized separately*, one after
the other. This mode of operation permits to deploy a full
software stack where multiple configurations of the same package
need to be installed alongside each other. Central installations done
at HPC centers by system administrators or user support groups
are a common case that fits in this behavior.
Environments *can also be configured to concretize all
the root specs in a self-consistent way* to ensure that
each package in the environment comes with a single configuration. This
mode of operation is usually what is required by software developers that
want to deploy their development environment.
Once some user specs have been added to an environment, they can be concretized.
There are at the moment three different modes of operation to concretize an environment,
which are explained in details in :ref:`environments_concretization_config`.
Regardless of which mode of operation has been chosen, the following
command will ensure all the root specs are concretized according to the
constraints that are prescribed in the configuration:
@@ -349,6 +339,24 @@ If the Environment has been concretized, Spack will install the
concretized specs. Otherwise, ``spack install`` will first concretize
the Environment and then install the concretized specs.
.. note::
Every ``spack install`` process builds one package at a time with multiple build
jobs, controlled by the ``-j`` flag and the ``config:build_jobs`` option
(see :ref:`build-jobs`). To speed up environment builds further, independent
packages can be installed in parallel by launching more Spack instances. For
example, the following will build at most four packages in parallel using
three background jobs:
.. code-block:: console
[myenv]$ spack install & spack install & spack install & spack install
Another option is to generate a ``Makefile`` and run ``make -j<N>`` to control
the number of parallel install processes. See :ref:`env-generate-depfile`
for details.
As it installs, ``spack install`` creates symbolic links in the
``logs/`` directory in the Environment, allowing for easy inspection
of build logs related to that environment. The ``spack install``
@@ -475,32 +483,76 @@ Appending to this list in the yaml is identical to using the ``spack
add`` command from the command line. However, there is more power
available from the yaml file.
.. _environments_concretization_config:
^^^^^^^^^^^^^^^^^^^
Spec concretization
^^^^^^^^^^^^^^^^^^^
Specs can be concretized separately or together, as already
explained in :ref:`environments_concretization`. The behavior active
under any environment is determined by the ``concretization`` property:
An environment can be concretized in three different modes and the behavior active under any environment
is determined by the ``concretizer:unify`` property. By default specs are concretized *separately*, one after the other:
.. code-block:: yaml
spack:
specs:
- ncview
- netcdf
- nco
- py-sphinx
concretization: together
- hdf5~mpi
- hdf5+mpi
- zlib@1.2.8
concretizer:
unify: false
which can currently take either one of the two allowed values ``together`` or ``separately``
(the default).
This mode of operation permits to deploy a full software stack where multiple configurations of the same package
need to be installed alongside each other using the best possible selection of transitive dependencies. The downside
is that redundancy of installations is disregarded completely, and thus environments might be more bloated than
strictly needed. In the example above, for instance, if a version of ``zlib`` newer than ``1.2.8`` is known to Spack,
then it will be used for both ``hdf5`` installations.
If redundancy of the environment is a concern, Spack provides a way to install it *together where possible*,
i.e. trying to maximize reuse of dependencies across different specs:
.. code-block:: yaml
spack:
specs:
- hdf5~mpi
- hdf5+mpi
- zlib@1.2.8
concretizer:
unify: when_possible
Also in this case Spack allows having multiple configurations of the same package, but privileges the reuse of
specs over other factors. Going back to our example, this means that both ``hdf5`` installations will use
``zlib@1.2.8`` as a dependency even if newer versions of that library are available.
Central installations done at HPC centers by system administrators or user support groups are a common case
that fits either of these two modes.
Environments can also be configured to concretize all the root specs *together*, in a self-consistent way, to
ensure that each package in the environment comes with a single configuration:
.. code-block:: yaml
spack:
specs:
- hdf5+mpi
- zlib@1.2.8
concretizer:
unify: true
This mode of operation is usually what is required by software developers that want to deploy their development
environment and have a single view of it in the filesystem.
.. note::
The ``concretizer:unify`` config option was introduced in Spack 0.18 to
replace the ``concretization`` property. For reference,
``concretization: together`` is replaced by ``concretizer:unify:true``,
and ``concretization: separately`` is replaced by ``concretizer:unify:false``.
.. admonition:: Re-concretization of user specs
When concretizing specs together the entire set of specs will be
When concretizing specs *together* or *together where possible* the entire set of specs will be
re-concretized after any addition of new user specs, to ensure that
the environment remains consistent. When instead the specs are concretized
the environment remains consistent / minimal. When instead the specs are concretized
separately only the new specs will be re-concretized after any addition.
^^^^^^^^^^^^^
@@ -747,7 +799,7 @@ directories.
select: [^mpi]
exclude: ['%pgi@18.5']
projections:
all: {name}/{version}-{compiler.name}
all: '{name}/{version}-{compiler.name}'
link: all
link_type: symlink
@@ -910,3 +962,89 @@ environment.
The ``spack env deactivate`` command will remove the default view of
the environment from the user's path.
.. _env-generate-depfile:
------------------------------------------
Generating Depfiles from Environments
------------------------------------------
Spack can generate ``Makefile``\s to make it easier to build multiple
packages in an environment in parallel. Generated ``Makefile``\s expose
targets that can be included in existing ``Makefile``\s, to allow
other targets to depend on the environment installation.
A typical workflow is as follows:
.. code:: console
spack env create -d .
spack -e . add perl
spack -e . concretize
spack -e . env depfile > Makefile
make -j64
This generates a ``Makefile`` from a concretized environment in the
current working directory, and ``make -j64`` installs the environment,
exploiting parallelism across packages as much as possible. Spack
respects the Make jobserver and forwards it to the build environment
of packages, meaning that a single ``-j`` flag is enough to control the
load, even when packages are built in parallel.
By default the following phony convenience targets are available:
- ``make all``: installs the environment (default target);
- ``make fetch-all``: only fetch sources of all packages;
- ``make clean``: cleans files used by make, but does not uninstall packages.
.. tip::
GNU Make version 4.3 and above have great support for output synchronization
through the ``-O`` and ``--output-sync`` flags, which ensure that output is
printed orderly per package install. To get synchronized output with colors,
use ``make -j<N> SPACK_COLOR=always --output-sync=recurse``.
The following advanced example shows how generated targets can be used in a
``Makefile``:
.. code:: Makefile
SPACK ?= spack
.PHONY: all clean env
all: env
spack.lock: spack.yaml
$(SPACK) -e . concretize -f
env.mk: spack.lock
$(SPACK) -e . env depfile -o $@ --make-target-prefix spack
env: spack/env
$(info Environment installed!)
clean:
rm -rf spack.lock env.mk spack/
ifeq (,$(filter clean,$(MAKECMDGOALS)))
include env.mk
endif
When ``make`` is invoked, it first "remakes" the missing include ``env.mk``
from its rule, which triggers concretization. When done, the generated target
``spack/env`` is available. In the above example, the ``env`` target uses this generated
target as a prerequisite, meaning that it can make use of the installed packages in
its commands.
As it is typically undesirable to remake ``env.mk`` as part of ``make clean``,
the include is conditional.
.. note::
When including generated ``Makefile``\s, it is important to use
the ``--make-target-prefix`` flag and use the non-phony target
``<target-prefix>/env`` as prerequisite, instead of the phony target
``<target-prefix>/all``.

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@@ -63,6 +63,7 @@ or refer to the full manual below.
configuration
config_yaml
bootstrapping
build_settings
environments
containers

View File

@@ -308,7 +308,7 @@ the variable ``FOOBAR`` will be unset.
spec constraints are instead evaluated top to bottom.
""""""""""""""""""""""""""""""""""""""""""""
Blacklist or whitelist specific module files
Exclude or include specific module files
""""""""""""""""""""""""""""""""""""""""""""
You can use anonymous specs also to prevent module files from being written or
@@ -322,8 +322,8 @@ your system. If you write a configuration file like:
modules:
default:
tcl:
whitelist: ['gcc', 'llvm'] # Whitelist will have precedence over blacklist
blacklist: ['%gcc@4.4.7'] # Assuming gcc@4.4.7 is the system compiler
include: ['gcc', 'llvm'] # include will have precedence over exclude
exclude: ['%gcc@4.4.7'] # Assuming gcc@4.4.7 is the system compiler
you will prevent the generation of module files for any package that
is compiled with ``gcc@4.4.7``, with the only exception of any ``gcc``
@@ -490,7 +490,7 @@ satisfies a default, Spack will generate the module file in the
appropriate path, and will generate a default symlink to the module
file as well.
.. warning::
.. warning::
If Spack is configured to generate multiple default packages in the
same directory, the last modulefile to be generated will be the
default module.
@@ -589,7 +589,7 @@ Filter out environment modifications
Modifications to certain environment variables in module files are there by
default, for instance because they are generated by prefix inspections.
If you want to prevent modifications to some environment variables, you can
do so by using the environment blacklist:
do so by using the ``exclude_env_vars``:
.. code-block:: yaml
@@ -599,7 +599,7 @@ do so by using the environment blacklist:
all:
filter:
# Exclude changes to any of these variables
environment_blacklist: ['CPATH', 'LIBRARY_PATH']
exclude_env_vars: ['CPATH', 'LIBRARY_PATH']
The configuration above will generate module files that will not contain
modifications to either ``CPATH`` or ``LIBRARY_PATH``.

View File

@@ -1070,13 +1070,32 @@ Commits
Submodules
You can supply ``submodules=True`` to cause Spack to fetch submodules
recursively along with the repository at fetch time. For more information
about git submodules see the manpage of git: ``man git-submodule``.
recursively along with the repository at fetch time.
.. code-block:: python
version('1.0.1', tag='v1.0.1', submodules=True)
If a package has needs more fine-grained control over submodules, define
``submodules`` to be a callable function that takes the package instance as
its only argument. The function should return a list of submodules to be fetched.
.. code-block:: python
def submodules(package):
submodules = []
if "+variant-1" in package.spec:
submodules.append("submodule_for_variant_1")
if "+variant-2" in package.spec:
submodules.append("submodule_for_variant_2")
return submodules
class MyPackage(Package):
version("0.1.0", submodules=submodules)
For more information about git submodules see the manpage of git: ``man
git-submodule``.
.. _github-fetch:
@@ -2393,9 +2412,9 @@ Influence how dependents are built or run
Spack provides a mechanism for dependencies to influence the
environment of their dependents by overriding the
:meth:`setup_dependent_run_environment <spack.package.PackageBase.setup_dependent_run_environment>`
:meth:`setup_dependent_run_environment <spack.package_base.PackageBase.setup_dependent_run_environment>`
or the
:meth:`setup_dependent_build_environment <spack.package.PackageBase.setup_dependent_build_environment>`
:meth:`setup_dependent_build_environment <spack.package_base.PackageBase.setup_dependent_build_environment>`
methods.
The Qt package, for instance, uses this call:
@@ -2417,7 +2436,7 @@ will have the ``PYTHONPATH``, ``PYTHONHOME`` and ``PATH`` environment
variables set appropriately before starting the installation. To make things
even simpler the ``python setup.py`` command is also inserted into the module
scope of dependents by overriding a third method called
:meth:`setup_dependent_package <spack.package.PackageBase.setup_dependent_package>`
:meth:`setup_dependent_package <spack.package_base.PackageBase.setup_dependent_package>`
:
.. literalinclude:: _spack_root/var/spack/repos/builtin/packages/python/package.py
@@ -2775,6 +2794,256 @@ Suppose a user invokes ``spack install`` like this:
Spack will fail with a constraint violation, because the version of
MPICH requested is too low for the ``mpi`` requirement in ``foo``.
.. _custom-attributes:
------------------
Custom attributes
------------------
Often a package will need to provide attributes for dependents to query
various details about what it provides. While any number of custom defined
attributes can be implemented by a package, the four specific attributes
described below are always available on every package with default
implementations and the ability to customize with alternate implementations
in the case of virtual packages provided:
=========== =========================================== =====================
Attribute Purpose Default
=========== =========================================== =====================
``home`` The installation path for the package ``spec.prefix``
``command`` An executable command for the package | ``spec.name`` found
in
| ``.home.bin``
``headers`` A list of headers provided by the package | All headers
searched
| recursively in
``.home.include``
``libs`` A list of libraries provided by the package | ``lib{spec.name}``
searched
| recursively in
``.home`` starting
| with ``lib``,
``lib64``, then the
| rest of ``.home``
=========== =========================================== =====================
Each of these can be customized by implementing the relevant attribute
as a ``@property`` in the package's class:
.. code-block:: python
:linenos:
class Foo(Package):
...
@property
def libs(self):
# The library provided by Foo is libMyFoo.so
return find_libraries('libMyFoo', root=self.home, recursive=True)
A package may also provide a custom implementation of each attribute
for the virtual packages it provides by implementing the
``virtualpackagename_attributename`` property in the package's class.
The implementation used is the first one found from:
#. Specialized virtual: ``Package.virtualpackagename_attributename``
#. Generic package: ``Package.attributename``
#. Default
The use of customized attributes is demonstrated in the next example.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Example: Customized attributes for virtual packages
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Consider a package ``foo`` that can optionally provide two virtual
packages ``bar`` and ``baz``. When both are enabled the installation tree
appears as follows:
.. code-block:: console
include/foo.h
include/bar/bar.h
lib64/libFoo.so
lib64/libFooBar.so
baz/include/baz/baz.h
baz/lib/libFooBaz.so
The install tree shows that ``foo`` is providing the header ``include/foo.h``
and library ``lib64/libFoo.so`` in it's install prefix. The virtual
package ``bar`` is providing ``include/bar/bar.h`` and library
``lib64/libFooBar.so``, also in ``foo``'s install prefix. The ``baz``
package, however, is provided in the ``baz`` subdirectory of ``foo``'s
prefix with the ``include/baz/baz.h`` header and ``lib/libFooBaz.so``
library. Such a package could implement the optional attributes as
follows:
.. code-block:: python
:linenos:
class Foo(Package):
...
variant('bar', default=False, description='Enable the Foo implementation of bar')
variant('baz', default=False, description='Enable the Foo implementation of baz')
...
provides('bar', when='+bar')
provides('baz', when='+baz')
....
# Just the foo headers
@property
def headers(self):
return find_headers('foo', root=self.home.include, recursive=False)
# Just the foo libraries
@property
def libs(self):
return find_libraries('libFoo', root=self.home, recursive=True)
# The header provided by the bar virutal package
@property
def bar_headers(self):
return find_headers('bar/bar.h', root=self.home.include, recursive=False)
# The libary provided by the bar virtual package
@property
def bar_libs(self):
return find_libraries('libFooBar', root=sef.home, recursive=True)
# The baz virtual package home
@property
def baz_home(self):
return self.prefix.baz
# The header provided by the baz virtual package
@property
def baz_headers(self):
return find_headers('baz/baz', root=self.baz_home.include, recursive=False)
# The library provided by the baz virtual package
@property
def baz_libs(self):
return find_libraries('libFooBaz', root=self.baz_home, recursive=True)
Now consider another package, ``foo-app``, depending on all three:
.. code-block:: python
:linenos:
class FooApp(CMakePackage):
...
depends_on('foo')
depends_on('bar')
depends_on('baz')
The resulting spec objects for it's dependencies shows the result of
the above attribute implementations:
.. code-block:: python
# The core headers and libraries of the foo package
>>> spec['foo']
foo@1.0%gcc@11.3.1+bar+baz arch=linux-fedora35-haswell
>>> spec['foo'].prefix
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6'
# home defaults to the package install prefix without an explicit implementation
>>> spec['foo'].home
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6'
# foo headers from the foo prefix
>>> spec['foo'].headers
HeaderList([
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/include/foo.h',
])
# foo include directories from the foo prefix
>>> spec['foo'].headers.directories
['/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/include']
# foo libraries from the foo prefix
>>> spec['foo'].libs
LibraryList([
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/lib64/libFoo.so',
])
# foo library directories from the foo prefix
>>> spec['foo'].libs.directories
['/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/lib64']
.. code-block:: python
# The virtual bar package in the same prefix as foo
# bar resolves to the foo package
>>> spec['bar']
foo@1.0%gcc@11.3.1+bar+baz arch=linux-fedora35-haswell
>>> spec['bar'].prefix
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6'
# home defaults to the foo prefix without either a Foo.bar_home
# or Foo.home implementation
>>> spec['bar'].home
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6'
# bar header in the foo prefix
>>> spec['bar'].headers
HeaderList([
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/include/bar/bar.h'
])
# bar include dirs from the foo prefix
>>> spec['bar'].headers.directories
['/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/include']
# bar library from the foo prefix
>>> spec['bar'].libs
LibraryList([
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/lib64/libFooBar.so'
])
# bar library directories from the foo prefix
>>> spec['bar'].libs.directories
['/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/lib64']
.. code-block:: python
# The virtual baz package in a subdirectory of foo's prefix
# baz resolves to the foo package
>>> spec['baz']
foo@1.0%gcc@11.3.1+bar+baz arch=linux-fedora35-haswell
>>> spec['baz'].prefix
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6'
# baz_home implementation provides the subdirectory inside the foo prefix
>>> spec['baz'].home
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/baz'
# baz headers in the baz subdirectory of the foo prefix
>>> spec['baz'].headers
HeaderList([
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/baz/include/baz/baz.h'
])
# baz include directories in the baz subdirectory of the foo prefix
>>> spec['baz'].headers.directories
[
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/baz/include'
]
# baz libraries in the baz subdirectory of the foo prefix
>>> spec['baz'].libs
LibraryList([
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/baz/lib/libFooBaz.so'
])
# baz library directories in the baz subdirectory of the foo porefix
>>> spec['baz'].libs.directories
[
'/opt/spack/linux-fedora35-haswell/gcc-11.3.1/foo-1.0-ca3rczp5omy7dfzoqw4p7oc2yh3u7lt6/baz/lib'
]
.. _abstract-and-concrete:
-------------------------
@@ -3022,7 +3291,7 @@ The classes that are currently provided by Spack are:
+----------------------------------------------------------+----------------------------------+
| **Base Class** | **Purpose** |
+==========================================================+==================================+
| :class:`~spack.package.Package` | General base class not |
| :class:`~spack.package_base.Package` | General base class not |
| | specialized for any build system |
+----------------------------------------------------------+----------------------------------+
| :class:`~spack.build_systems.makefile.MakefilePackage` | Specialized class for packages |
@@ -3153,7 +3422,7 @@ for the install phase is:
For those not used to Python instance methods, this is the
package itself. In this case it's an instance of ``Foo``, which
extends ``Package``. For API docs on Package objects, see
:py:class:`Package <spack.package.Package>`.
:py:class:`Package <spack.package_base.Package>`.
``spec``
This is the concrete spec object created by Spack from an
@@ -5476,6 +5745,24 @@ Version Lists
Spack packages should list supported versions with the newest first.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Using ``home`` vs ``prefix``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
``home`` and ``prefix`` are both attributes that can be queried on a
package's dependencies, often when passing configure arguments pointing to the
location of a dependency. The difference is that while ``prefix`` is the
location on disk where a concrete package resides, ``home`` is the `logical`
location that a package resides, which may be different than ``prefix`` in
the case of virtual packages or other special circumstances. For most use
cases inside a package, it's dependency locations can be accessed via either
``self.spec['foo'].home`` or ``self.spec['foo'].prefix``. Specific packages
that should be consumed by dependents via ``.home`` instead of ``.prefix``
should be noted in their respective documentation.
See :ref:`custom-attributes` for more details and an example implementing
a custom ``home`` attribute.
---------------------------
Packaging workflow commands
---------------------------

View File

@@ -115,7 +115,8 @@ And here's the spack environment built by the pipeline represented as a
spack:
view: false
concretization: separately
concretizer:
unify: false
definitions:
- pkgs:

View File

@@ -61,7 +61,7 @@ You can see the packages we added earlier in the ``specs:`` section. If you
ever want to add more packages, you can either use ``spack add`` or manually
edit this file.
We also need to change the ``concretization:`` option. By default, Spack
We also need to change the ``concretizer:unify`` option. By default, Spack
concretizes each spec *separately*, allowing multiple versions of the same
package to coexist. Since we want a single consistent environment, we want to
concretize all of the specs *together*.
@@ -78,7 +78,8 @@ Here is what your ``spack.yaml`` looks like with this new setting:
# add package specs to the `specs` list
specs: [bash@5, python, py-numpy, py-scipy, py-matplotlib]
view: true
concretization: together
concretizer:
unify: true
^^^^^^^^^^^^^^^^
Symlink location

View File

@@ -25,4 +25,5 @@ spack:
- subversion
# Plotting
- graphviz
concretization: together
concretizer:
unify: true

View File

@@ -7,7 +7,7 @@ bash, , , Compiler wrappers
tar, , , Extract/create archives
gzip, , , Compress/Decompress archives
unzip, , , Compress/Decompress archives
bzip, , , Compress/Decompress archives
bzip2, , , Compress/Decompress archives
xz, , , Compress/Decompress archives
zstd, , Optional, Compress/Decompress archives
file, , , Create/Use Buildcaches
@@ -15,4 +15,4 @@ gnupg2, , , Sign/Verify Buildcaches
git, , , Manage Software Repositories
svn, , Optional, Manage Software Repositories
hg, , Optional, Manage Software Repositories
Python header files, , Optional (e.g. ``python3-dev`` on Debian), Bootstrapping from sources
Python header files, , Optional (e.g. ``python3-dev`` on Debian), Bootstrapping from sources
1 Name Supported Versions Notes Requirement Reason
7 tar Extract/create archives
8 gzip Compress/Decompress archives
9 unzip Compress/Decompress archives
10 bzip bzip2 Compress/Decompress archives
11 xz Compress/Decompress archives
12 zstd Optional Compress/Decompress archives
13 file Create/Use Buildcaches
15 git Manage Software Repositories
16 svn Optional Manage Software Repositories
17 hg Optional Manage Software Repositories
18 Python header files Optional (e.g. ``python3-dev`` on Debian) Bootstrapping from sources

6
lib/spack/env/cc vendored
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/sh -f
# shellcheck disable=SC2034 # evals in this script fool shellcheck
#
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
@@ -768,7 +768,9 @@ if [ "$SPACK_DEBUG" = TRUE ]; then
input_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_DEBUG_LOG_ID.in.log"
output_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_DEBUG_LOG_ID.out.log"
echo "[$mode] $command $input_command" >> "$input_log"
echo "[$mode] ${full_command_list}" >> "$output_log"
IFS="$lsep"
echo "[$mode] "$full_command_list >> "$output_log"
unset IFS
fi
# Execute the full command, preserving spaces with IFS set

View File

@@ -18,7 +18,7 @@
* Homepage: https://pypi.python.org/pypi/archspec
* Usage: Labeling, comparison and detection of microarchitectures
* Version: 0.1.2 (commit 85757b6666422fca86aa882a769bf78b0f992f54)
* Version: 0.1.4 (commit b8eea9df2b4204ff27d204452cd46f5199a0b423)
argparse
--------

View File

@@ -61,7 +61,7 @@ def proc_cpuinfo():
``/proc/cpuinfo``
"""
info = {}
with open("/proc/cpuinfo") as file:
with open("/proc/cpuinfo") as file: # pylint: disable=unspecified-encoding
for line in file:
key, separator, value = line.partition(":")
@@ -80,26 +80,46 @@ def proc_cpuinfo():
def _check_output(args, env):
output = subprocess.Popen(args, stdout=subprocess.PIPE, env=env).communicate()[0]
output = subprocess.Popen( # pylint: disable=consider-using-with
args, stdout=subprocess.PIPE, env=env
).communicate()[0]
return six.text_type(output.decode("utf-8"))
def _machine():
""" "Return the machine architecture we are on"""
operating_system = platform.system()
# If we are not on Darwin, trust what Python tells us
if operating_system != "Darwin":
return platform.machine()
# On Darwin it might happen that we are on M1, but using an interpreter
# built for x86_64. In that case "platform.machine() == 'x86_64'", so we
# need to fix that.
#
# See: https://bugs.python.org/issue42704
output = _check_output(
["sysctl", "-n", "machdep.cpu.brand_string"], env=_ensure_bin_usrbin_in_path()
).strip()
if "Apple" in output:
# Note that a native Python interpreter on Apple M1 would return
# "arm64" instead of "aarch64". Here we normalize to the latter.
return "aarch64"
return "x86_64"
@info_dict(operating_system="Darwin")
def sysctl_info_dict():
"""Returns a raw info dictionary parsing the output of sysctl."""
# Make sure that /sbin and /usr/sbin are in PATH as sysctl is
# usually found there
child_environment = dict(os.environ.items())
search_paths = child_environment.get("PATH", "").split(os.pathsep)
for additional_path in ("/sbin", "/usr/sbin"):
if additional_path not in search_paths:
search_paths.append(additional_path)
child_environment["PATH"] = os.pathsep.join(search_paths)
child_environment = _ensure_bin_usrbin_in_path()
def sysctl(*args):
return _check_output(["sysctl"] + list(args), env=child_environment).strip()
if platform.machine() == "x86_64":
if _machine() == "x86_64":
flags = (
sysctl("-n", "machdep.cpu.features").lower()
+ " "
@@ -125,6 +145,18 @@ def sysctl(*args):
return info
def _ensure_bin_usrbin_in_path():
# Make sure that /sbin and /usr/sbin are in PATH as sysctl is
# usually found there
child_environment = dict(os.environ.items())
search_paths = child_environment.get("PATH", "").split(os.pathsep)
for additional_path in ("/sbin", "/usr/sbin"):
if additional_path not in search_paths:
search_paths.append(additional_path)
child_environment["PATH"] = os.pathsep.join(search_paths)
return child_environment
def adjust_raw_flags(info):
"""Adjust the flags detected on the system to homogenize
slightly different representations.
@@ -184,12 +216,7 @@ def compatible_microarchitectures(info):
Args:
info (dict): dictionary containing information on the host cpu
"""
architecture_family = platform.machine()
# On Apple M1 platform.machine() returns "arm64" instead of "aarch64"
# so we should normalize the name here
if architecture_family == "arm64":
architecture_family = "aarch64"
architecture_family = _machine()
# If a tester is not registered, be conservative and assume no known
# target is compatible with the host
tester = COMPATIBILITY_CHECKS.get(architecture_family, lambda x, y: False)
@@ -244,12 +271,7 @@ def compatibility_check(architecture_family):
architecture_family = (architecture_family,)
def decorator(func):
# pylint: disable=fixme
# TODO: on removal of Python 2.6 support this can be re-written as
# TODO: an update + a dict comprehension
for arch_family in architecture_family:
COMPATIBILITY_CHECKS[arch_family] = func
COMPATIBILITY_CHECKS.update({family: func for family in architecture_family})
return func
return decorator
@@ -288,7 +310,7 @@ def compatibility_check_for_x86_64(info, target):
arch_root = TARGETS[basename]
return (
(target == arch_root or arch_root in target.ancestors)
and (target.vendor == vendor or target.vendor == "generic")
and target.vendor in (vendor, "generic")
and target.features.issubset(features)
)
@@ -303,8 +325,9 @@ def compatibility_check_for_aarch64(info, target):
arch_root = TARGETS[basename]
return (
(target == arch_root or arch_root in target.ancestors)
and (target.vendor == vendor or target.vendor == "generic")
and target.features.issubset(features)
and target.vendor in (vendor, "generic")
# On macOS it seems impossible to get all the CPU features with syctl info
and (target.features.issubset(features) or platform.system() == "Darwin")
)

View File

@@ -11,7 +11,7 @@
try:
from collections.abc import MutableMapping # novm
except ImportError:
from collections import MutableMapping
from collections import MutableMapping # pylint: disable=deprecated-class
class LazyDictionary(MutableMapping):
@@ -56,7 +56,7 @@ def _load_json_file(json_file):
def _factory():
filename = os.path.join(json_dir, json_file)
with open(filename, "r") as file:
with open(filename, "r") as file: # pylint: disable=unspecified-encoding
return json.load(file)
return _factory

View File

@@ -85,7 +85,21 @@
"intel": [
{
"versions": ":",
"name": "pentium4",
"name": "x86-64",
"flags": "-march={name} -mtune=generic"
}
],
"oneapi": [
{
"versions": ":",
"name": "x86-64",
"flags": "-march={name} -mtune=generic"
}
],
"dpcpp": [
{
"versions": ":",
"name": "x86-64",
"flags": "-march={name} -mtune=generic"
}
]
@@ -129,6 +143,20 @@
"name": "x86-64",
"flags": "-march={name} -mtune=generic -mcx16 -msahf -mpopcnt -msse3 -msse4.1 -msse4.2 -mssse3"
}
],
"oneapi": [
{
"versions": "2021.2.0:",
"name": "x86-64-v2",
"flags": "-march={name} -mtune=generic"
}
],
"dpcpp": [
{
"versions": "2021.2.0:",
"name": "x86-64-v2",
"flags": "-march={name} -mtune=generic"
}
]
}
},
@@ -186,6 +214,20 @@
"name": "x86-64",
"flags": "-march={name} -mtune=generic -mcx16 -msahf -mpopcnt -msse3 -msse4.1 -msse4.2 -mssse3 -mavx -mavx2 -mbmi -mbmi2 -mf16c -mfma -mlzcnt -mmovbe -mxsave"
}
],
"oneapi": [
{
"versions": "2021.2.0:",
"name": "x86-64-v3",
"flags": "-march={name} -mtune=generic"
}
],
"dpcpp": [
{
"versions": "2021.2.0:",
"name": "x86-64-v3",
"flags": "-march={name} -mtune=generic"
}
]
}
},
@@ -248,6 +290,20 @@
"name": "x86-64",
"flags": "-march={name} -mtune=generic -mcx16 -msahf -mpopcnt -msse3 -msse4.1 -msse4.2 -mssse3 -mavx -mavx2 -mbmi -mbmi2 -mf16c -mfma -mlzcnt -mmovbe -mxsave -mavx512f -mavx512bw -mavx512cd -mavx512dq -mavx512vl"
}
],
"oneapi": [
{
"versions": "2021.2.0:",
"name": "x86-64-v4",
"flags": "-march={name} -mtune=generic"
}
],
"dpcpp": [
{
"versions": "2021.2.0:",
"name": "x86-64-v4",
"flags": "-march={name} -mtune=generic"
}
]
}
},
@@ -288,8 +344,19 @@
"intel": [
{
"versions": "16.0:",
"name": "pentium4",
"flags": "-march={name} -mtune=generic"
"flags": "-march={name} -mtune={name}"
}
],
"oneapi": [
{
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
],
"dpcpp": [
{
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
]
}
@@ -333,6 +400,18 @@
"versions": "16.0:",
"flags": "-march={name} -mtune={name}"
}
],
"oneapi": [
{
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
],
"dpcpp": [
{
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
]
}
},
@@ -384,6 +463,20 @@
"name": "corei7",
"flags": "-march={name} -mtune={name}"
}
],
"oneapi": [
{
"versions": ":",
"name": "corei7",
"flags": "-march={name} -mtune={name}"
}
],
"dpcpp": [
{
"versions": ":",
"name": "corei7",
"flags": "-march={name} -mtune={name}"
}
]
}
},
@@ -432,6 +525,20 @@
"name": "corei7",
"flags": "-march={name} -mtune={name}"
}
],
"oneapi": [
{
"versions": ":",
"name": "corei7",
"flags": "-march={name} -mtune={name}"
}
],
"dpcpp": [
{
"versions": ":",
"name": "corei7",
"flags": "-march={name} -mtune={name}"
}
]
}
},
@@ -490,6 +597,18 @@
"versions": "18.0:",
"flags": "-march={name} -mtune={name}"
}
],
"oneapi": [
{
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
],
"dpcpp": [
{
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
]
}
},
@@ -550,6 +669,18 @@
"versions": "18.0:",
"flags": "-march={name} -mtune={name}"
}
],
"oneapi": [
{
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
],
"dpcpp": [
{
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
]
}
},
@@ -615,6 +746,18 @@
"versions": "18.0:",
"flags": "-march={name} -mtune={name}"
}
],
"oneapi": [
{
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
],
"dpcpp": [
{
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
]
}
},
@@ -672,6 +815,18 @@
"versions": "18.0:",
"flags": "-march={name} -mtune={name}"
}
],
"oneapi": [
{
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
],
"dpcpp": [
{
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
]
}
},
@@ -732,6 +887,18 @@
"versions": "18.0:",
"flags": "-march={name} -mtune={name}"
}
],
"oneapi": [
{
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
],
"dpcpp": [
{
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
]
}
},
@@ -798,6 +965,20 @@
"name": "knl",
"flags": "-march={name} -mtune={name}"
}
],
"oneapi": [
{
"versions": ":",
"name": "knl",
"flags": "-march={name} -mtune={name}"
}
],
"dpcpp": [
{
"versions": ":",
"name": "knl",
"flags": "-march={name} -mtune={name}"
}
]
}
},
@@ -868,6 +1049,20 @@
"name": "skylake-avx512",
"flags": "-march={name} -mtune={name}"
}
],
"oneapi": [
{
"versions": ":",
"name": "skylake-avx512",
"flags": "-march={name} -mtune={name}"
}
],
"dpcpp": [
{
"versions": ":",
"name": "skylake-avx512",
"flags": "-march={name} -mtune={name}"
}
]
}
},
@@ -937,6 +1132,18 @@
"versions": "18.0:",
"flags": "-march={name} -mtune={name}"
}
],
"oneapi": [
{
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
],
"dpcpp": [
{
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
]
}
},
@@ -1004,6 +1211,18 @@
"versions": "19.0.1:",
"flags": "-march={name} -mtune={name}"
}
],
"oneapi": [
{
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
],
"dpcpp": [
{
"versions": ":",
"flags": "-march={name} -mtune={name}"
}
]
}
},
@@ -1098,6 +1317,20 @@
"name": "icelake-client",
"flags": "-march={name} -mtune={name}"
}
],
"oneapi": [
{
"versions": ":",
"name": "icelake-client",
"flags": "-march={name} -mtune={name}"
}
],
"dpcpp": [
{
"versions": ":",
"name": "icelake-client",
"flags": "-march={name} -mtune={name}"
}
]
}
},
@@ -1142,6 +1375,20 @@
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"flags": "-msse2"
}
],
"oneapi": [
{
"versions": ":",
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"flags": "-msse2"
}
],
"dpcpp": [
{
"versions": ":",
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"flags": "-msse2"
}
]
}
},
@@ -1192,6 +1439,20 @@
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"flags": "-msse3"
}
],
"oneapi": [
{
"versions": ":",
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"flags": "-msse3"
}
],
"dpcpp": [
{
"versions": ":",
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"flags": "-msse3"
}
]
}
},
@@ -1246,6 +1507,20 @@
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"flags": "-msse3"
}
],
"oneapi": [
{
"versions": ":",
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"flags": "-msse3"
}
],
"dpcpp": [
{
"versions": ":",
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"flags": "-msse3"
}
]
}
},
@@ -1301,6 +1576,20 @@
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"flags": "-msse4.2"
}
],
"oneapi": [
{
"versions": ":",
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"flags": "-msse4.2"
}
],
"dpcpp": [
{
"versions": ":",
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"flags": "-msse4.2"
}
]
}
},
@@ -1360,6 +1649,22 @@
"name": "core-avx2",
"flags": "-march={name} -mtune={name}"
}
],
"oneapi": [
{
"versions": ":",
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"name": "core-avx2",
"flags": "-march={name} -mtune={name}"
}
],
"dpcpp": [
{
"versions": ":",
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"name": "core-avx2",
"flags": "-march={name} -mtune={name}"
}
]
}
},
@@ -1422,6 +1727,22 @@
"name": "core-avx2",
"flags": "-march={name} -mtune={name}"
}
],
"oneapi": [
{
"versions": ":",
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"name": "core-avx2",
"flags": "-march={name} -mtune={name}"
}
],
"dpcpp": [
{
"versions": ":",
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"name": "core-avx2",
"flags": "-march={name} -mtune={name}"
}
]
}
},
@@ -1485,6 +1806,22 @@
"name": "core-avx2",
"flags": "-march={name} -mtune={name}"
}
],
"oneapi": [
{
"versions": ":",
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"name": "core-avx2",
"flags": "-march={name} -mtune={name}"
}
],
"dpcpp": [
{
"versions": ":",
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"name": "core-avx2",
"flags": "-march={name} -mtune={name}"
}
]
}
},
@@ -1543,6 +1880,30 @@
"name": "znver3",
"flags": "-march={name} -mtune={name}"
}
],
"intel": [
{
"versions": "16.0:",
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"name": "core-avx2",
"flags": "-march={name} -mtune={name}"
}
],
"oneapi": [
{
"versions": ":",
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"name": "core-avx2",
"flags": "-march={name} -mtune={name}"
}
],
"dpcpp": [
{
"versions": ":",
"warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors",
"name": "core-avx2",
"flags": "-march={name} -mtune={name}"
}
]
}
},
@@ -1788,7 +2149,6 @@
"fp",
"asimd",
"evtstrm",
"aes",
"pmull",
"sha1",
"sha2",
@@ -1821,18 +2181,26 @@
"flags": "-march=armv8.2-a+crc+crypto+fp16"
},
{
"versions": "8:",
"flags": "-march=armv8.2-a+crc+aes+sha2+fp16+sve -msve-vector-bits=512"
"versions": "8:10.2",
"flags": "-march=armv8.2-a+crc+sha2+fp16+sve -msve-vector-bits=512"
},
{
"versions": "10.3:",
"flags": "-mcpu=a64fx -msve-vector-bits=512"
}
],
"clang": [
{
"versions": "3.9:4.9",
"flags": "-march=armv8.2-a+crc+crypto+fp16"
"flags": "-march=armv8.2-a+crc+sha2+fp16"
},
{
"versions": "5:",
"flags": "-march=armv8.2-a+crc+crypto+fp16+sve"
"versions": "5:10",
"flags": "-march=armv8.2-a+crc+sha2+fp16+sve"
},
{
"versions": "11:",
"flags": "-mcpu=a64fx"
}
],
"arm": [
@@ -1954,7 +2322,40 @@
"m1": {
"from": ["aarch64"],
"vendor": "Apple",
"features": [],
"features": [
"fp",
"asimd",
"evtstrm",
"aes",
"pmull",
"sha1",
"sha2",
"crc32",
"atomics",
"fphp",
"asimdhp",
"cpuid",
"asimdrdm",
"jscvt",
"fcma",
"lrcpc",
"dcpop",
"sha3",
"asimddp",
"sha512",
"asimdfhm",
"dit",
"uscat",
"ilrcpc",
"flagm",
"ssbs",
"sb",
"paca",
"pacg",
"dcpodp",
"flagm2",
"frint"
],
"compilers": {
"gcc": [
{
@@ -1964,14 +2365,22 @@
],
"clang" : [
{
"versions": "9.0:",
"versions": "9.0:12.0",
"flags" : "-march=armv8.4-a"
},
{
"versions": "13.0:",
"flags" : "-mcpu=apple-m1"
}
],
"apple-clang": [
{
"versions": "11.0:",
"versions": "11.0:12.5",
"flags" : "-march=armv8.4-a"
},
{
"versions": "13.0:",
"flags" : "-mcpu=apple-m1"
}
]
}

View File

@@ -64,6 +64,7 @@
'is_exe',
'join_path',
'last_modification_time_recursive',
'library_extensions',
'mkdirp',
'partition_path',
'prefixes',
@@ -109,12 +110,15 @@ def path_contains_subdirectory(path, root):
return norm_path.startswith(norm_root)
#: This generates the library filenames that may appear on any OS.
library_extensions = ['a', 'la', 'so', 'tbd', 'dylib']
def possible_library_filenames(library_names):
"""Given a collection of library names like 'libfoo', generate the set of
library filenames that may be found on the system (e.g. libfoo.so). This
generates the library filenames that may appear on any OS.
library filenames that may be found on the system (e.g. libfoo.so).
"""
lib_extensions = ['a', 'la', 'so', 'tbd', 'dylib']
lib_extensions = library_extensions
return set(
'.'.join((lib, extension)) for lib, extension in
itertools.product(library_names, lib_extensions))
@@ -304,6 +308,68 @@ def change_sed_delimiter(old_delim, new_delim, *filenames):
filter_file(double_quoted, '"%s"' % repl, f)
@contextmanager
def exploding_archive_catch(stage):
# Check for an exploding tarball, i.e. one that doesn't expand to
# a single directory. If the tarball *didn't* explode, move its
# contents to the staging source directory & remove the container
# directory. If the tarball did explode, just rename the tarball
# directory to the staging source directory.
#
# NOTE: The tar program on Mac OS X will encode HFS metadata in
# hidden files, which can end up *alongside* a single top-level
# directory. We initially ignore presence of hidden files to
# accomodate these "semi-exploding" tarballs but ensure the files
# are copied to the source directory.
# Expand all tarballs in their own directory to contain
# exploding tarballs.
tarball_container = os.path.join(stage.path,
"spack-expanded-archive")
mkdirp(tarball_container)
orig_dir = os.getcwd()
os.chdir(tarball_container)
try:
yield
# catch an exploding archive on sucessful extraction
os.chdir(orig_dir)
exploding_archive_handler(tarball_container, stage)
except Exception as e:
# return current directory context to previous on failure
os.chdir(orig_dir)
raise e
@system_path_filter
def exploding_archive_handler(tarball_container, stage):
"""
Args:
tarball_container: where the archive was expanded to
stage: Stage object referencing filesystem location
where archive is being expanded
"""
files = os.listdir(tarball_container)
non_hidden = [f for f in files if not f.startswith('.')]
if len(non_hidden) == 1:
src = os.path.join(tarball_container, non_hidden[0])
if os.path.isdir(src):
stage.srcdir = non_hidden[0]
shutil.move(src, stage.source_path)
if len(files) > 1:
files.remove(non_hidden[0])
for f in files:
src = os.path.join(tarball_container, f)
dest = os.path.join(stage.path, f)
shutil.move(src, dest)
os.rmdir(tarball_container)
else:
# This is a non-directory entry (e.g., a patch file) so simply
# rename the tarball container to be the source path.
shutil.move(tarball_container, stage.source_path)
else:
shutil.move(tarball_container, stage.source_path)
@system_path_filter(arg_slice=slice(1))
def get_owner_uid(path, err_msg=None):
if not os.path.exists(path):
@@ -363,7 +429,7 @@ def group_ids(uid=None):
@system_path_filter(arg_slice=slice(1))
def chgrp(path, group):
def chgrp(path, group, follow_symlinks=True):
"""Implement the bash chgrp function on a single path"""
if is_windows:
raise OSError("Function 'chgrp' is not supported on Windows")
@@ -372,7 +438,10 @@ def chgrp(path, group):
gid = grp.getgrnam(group).gr_gid
else:
gid = group
os.chown(path, -1, gid)
if follow_symlinks:
os.chown(path, -1, gid)
else:
os.lchown(path, -1, gid)
@system_path_filter(arg_slice=slice(1))
@@ -764,39 +833,36 @@ def __init__(self, inner_exception, outer_exception):
@contextmanager
@system_path_filter
def replace_directory_transaction(directory_name, tmp_root=None):
"""Moves a directory to a temporary space. If the operations executed
within the context manager don't raise an exception, the directory is
deleted. If there is an exception, the move is undone.
def replace_directory_transaction(directory_name):
"""Temporarily renames a directory in the same parent dir. If the operations
executed within the context manager don't raise an exception, the renamed directory
is deleted. If there is an exception, the move is undone.
Args:
directory_name (path): absolute path of the directory name
tmp_root (path): absolute path of the parent directory where to create
the temporary
Returns:
temporary directory where ``directory_name`` has been moved
"""
# Check the input is indeed a directory with absolute path.
# Raise before anything is done to avoid moving the wrong directory
assert os.path.isdir(directory_name), \
'Invalid directory: ' + directory_name
assert os.path.isabs(directory_name), \
'"directory_name" must contain an absolute path: ' + directory_name
directory_name = os.path.abspath(directory_name)
assert os.path.isdir(directory_name), 'Not a directory: ' + directory_name
directory_basename = os.path.basename(directory_name)
# Note: directory_name is normalized here, meaning the trailing slash is dropped,
# so dirname is the directory's parent not the directory itself.
tmpdir = tempfile.mkdtemp(
dir=os.path.dirname(directory_name),
prefix='.backup')
if tmp_root is not None:
assert os.path.isabs(tmp_root)
tmp_dir = tempfile.mkdtemp(dir=tmp_root)
tty.debug('Temporary directory created [{0}]'.format(tmp_dir))
shutil.move(src=directory_name, dst=tmp_dir)
tty.debug('Directory moved [src={0}, dest={1}]'.format(directory_name, tmp_dir))
# We have to jump through hoops to support Windows, since
# os.rename(directory_name, tmpdir) errors there.
backup_dir = os.path.join(tmpdir, 'backup')
os.rename(directory_name, backup_dir)
tty.debug('Directory moved [src={0}, dest={1}]'.format(directory_name, backup_dir))
try:
yield tmp_dir
yield backup_dir
except (Exception, KeyboardInterrupt, SystemExit) as inner_exception:
# Try to recover the original directory, if this fails, raise a
# composite exception.
@@ -804,10 +870,7 @@ def replace_directory_transaction(directory_name, tmp_root=None):
# Delete what was there, before copying back the original content
if os.path.exists(directory_name):
shutil.rmtree(directory_name)
shutil.move(
src=os.path.join(tmp_dir, directory_basename),
dst=os.path.dirname(directory_name)
)
os.rename(backup_dir, directory_name)
except Exception as outer_exception:
raise CouldNotRestoreDirectoryBackup(inner_exception, outer_exception)
@@ -815,8 +878,8 @@ def replace_directory_transaction(directory_name, tmp_root=None):
raise
else:
# Otherwise delete the temporary directory
shutil.rmtree(tmp_dir, ignore_errors=True)
tty.debug('Temporary directory deleted [{0}]'.format(tmp_dir))
shutil.rmtree(tmpdir, ignore_errors=True)
tty.debug('Temporary directory deleted [{0}]'.format(tmpdir))
@system_path_filter
@@ -1097,7 +1160,32 @@ def visit_directory_tree(root, visitor, rel_path='', depth=0):
for f in dir_entries:
if sys.version_info >= (3, 5, 0):
rel_child = os.path.join(rel_path, f.name)
islink, isdir = f.is_symlink(), f.is_dir()
islink = f.is_symlink()
# On Windows, symlinks to directories are distinct from
# symlinks to files, and it is possible to create a
# broken symlink to a directory (e.g. using os.symlink
# without `target_is_directory=True`), invoking `isdir`
# on a symlink on Windows that is broken in this manner
# will result in an error. In this case we can work around
# the issue by reading the target and resolving the
# directory ourselves
try:
isdir = f.is_dir()
except OSError as e:
if is_windows and hasattr(e, 'winerror')\
and e.winerror == 5 and islink:
# if path is a symlink, determine destination and
# evaluate file vs directory
link_target = resolve_link_target_relative_to_the_link(f)
# link_target might be relative but
# resolve_link_target_relative_to_the_link
# will ensure that if so, that it is relative
# to the CWD and therefore
# makes sense
isdir = os.path.isdir(link_target)
else:
raise e
else:
rel_child = os.path.join(rel_path, f)
lexists, islink, isdir = lexists_islink_isdir(os.path.join(dir, f))
@@ -1105,7 +1193,7 @@ def visit_directory_tree(root, visitor, rel_path='', depth=0):
continue
if not isdir:
# Handle files
# handle files
visitor.visit_file(root, rel_child, depth)
elif not islink and visitor.before_visit_dir(root, rel_child, depth):
# Handle ordinary directories
@@ -1180,6 +1268,35 @@ def remove_if_dead_link(path):
os.unlink(path)
def readonly_file_handler(ignore_errors=False):
# TODO: generate stages etc. with write permissions wherever
# so this callback is no-longer required
"""
Generate callback for shutil.rmtree to handle permissions errors on
Windows. Some files may unexpectedly lack write permissions even
though they were generated by Spack on behalf of the user (e.g. the
stage), so this callback will detect such cases and modify the
permissions if that is the issue. For other errors, the fallback
is either to raise (if ignore_errors is False) or ignore (if
ignore_errors is True). This is only intended for Windows systems
and will raise a separate error if it is ever invoked (by accident)
on a non-Windows system.
"""
def error_remove_readonly(func, path, exc):
if not is_windows:
raise RuntimeError("This method should only be invoked on Windows")
excvalue = exc[1]
if is_windows and func in (os.rmdir, os.remove, os.unlink) and\
excvalue.errno == errno.EACCES:
# change the file to be readable,writable,executable: 0777
os.chmod(path, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)
# retry
func(path)
elif not ignore_errors:
raise
return error_remove_readonly
@system_path_filter
def remove_linked_tree(path):
"""Removes a directory and its contents.
@@ -1187,23 +1304,18 @@ def remove_linked_tree(path):
If the directory is a symlink, follows the link and removes the real
directory before removing the link.
This method will force-delete files on Windows
Parameters:
path (str): Directory to be removed
"""
# On windows, cleaning a Git stage can be an issue
# as git leaves readonly files that Python handles
# poorly on Windows. Remove readonly status and try again
def onerror(func, path, exe_info):
os.chmod(path, stat.S_IWUSR)
try:
func(path)
except Exception as e:
tty.warn(e)
pass
kwargs = {'ignore_errors': True}
# Windows readonly files cannot be removed by Python
# directly.
if is_windows:
kwargs = {'onerror': onerror}
kwargs['ignore_errors'] = False
kwargs['onerror'] = readonly_file_handler(ignore_errors=True)
if os.path.exists(path):
if os.path.islink(path):

View File

@@ -11,7 +11,9 @@
import os
import re
import sys
import traceback
from datetime import datetime, timedelta
from typing import List, Tuple
import six
from six import string_types
@@ -1009,3 +1011,76 @@ def __repr__(self):
def __str__(self):
return str(self.data)
class GroupedExceptionHandler(object):
"""A generic mechanism to coalesce multiple exceptions and preserve tracebacks."""
def __init__(self):
self.exceptions = [] # type: List[Tuple[str, Exception, List[str]]]
def __bool__(self):
"""Whether any exceptions were handled."""
return bool(self.exceptions)
def forward(self, context):
# type: (str) -> GroupedExceptionForwarder
"""Return a contextmanager which extracts tracebacks and prefixes a message."""
return GroupedExceptionForwarder(context, self)
def _receive_forwarded(self, context, exc, tb):
# type: (str, Exception, List[str]) -> None
self.exceptions.append((context, exc, tb))
def grouped_message(self, with_tracebacks=True):
# type: (bool) -> 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 '',
)
for context, exc, tb in self.exceptions
]
return 'due to the following failures:\n{0}'.format(
'\n'.join(each_exception_message)
)
class GroupedExceptionForwarder(object):
"""A contextmanager to capture exceptions and forward them to a
GroupedExceptionHandler."""
def __init__(self, context, handler):
# type: (str, GroupedExceptionHandler) -> None
self._context = context
self._handler = handler
def __enter__(self):
return None
def __exit__(self, exc_type, exc_value, tb):
if exc_value is not None:
self._handler._receive_forwarded(
self._context,
exc_value,
traceback.format_tb(tb),
)
# Suppress any exception from being re-raised:
# https://docs.python.org/3/reference/datamodel.html#object.__exit__.
return True
class classproperty(object):
"""Non-data descriptor to evaluate a class-level property. The function that performs
the evaluation is injected at creation time and take an instance (could be None) and
an owner (i.e. the class that originated the instance)
"""
def __init__(self, callback):
self.callback = callback
def __get__(self, instance, owner):
return self.callback(owner)

View File

@@ -809,19 +809,23 @@ def __enter__(self):
def background_reader(reader, echo_writer, _kill):
# for each line printed to logfile, read it
# if echo: write line to user
while True:
is_killed = _kill.wait(.1)
self.stderr.flush()
self.stdout.flush()
line = reader.readline()
while line:
if self.echo:
self.echo_writer.write('{0}'.format(line.decode()))
self.echo_writer.flush()
line = reader.readline()
try:
while True:
is_killed = _kill.wait(.1)
# Flush buffered build output to file
# stdout/err fds refer to log file
self.stderr.flush()
self.stdout.flush()
if is_killed:
break
line = reader.readline()
if self.echo and line:
echo_writer.write('{0}'.format(line.decode()))
echo_writer.flush()
if is_killed:
break
finally:
reader.close()
self._active = True
with replace_environment(self.env):
@@ -837,7 +841,6 @@ def __exit__(self, exc_type, exc_val, exc_tb):
self._ioflag = False
else:
self.writer.close()
self.reader.close()
self.echo_writer.flush()
self.stdout.flush()
self.stderr.flush()
@@ -853,10 +856,7 @@ def force_echo(self):
if not self._active:
raise RuntimeError(
"Can't call force_echo() outside log_output region!")
try:
yield self
finally:
pass
yield
def _writer_daemon(stdin_multiprocess_fd, read_multiprocess_fd, write_fd, echo,

View File

@@ -4,7 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
#: (major, minor, micro, dev release) tuple
spack_version_info = (0, 18, 0, 'dev0')
spack_version_info = (0, 19, 0, 'dev0')
#: PEP440 canonical <major>.<minor>.<micro>.<devN> string
spack_version = '.'.join(str(s) for s in spack_version_info)

View File

@@ -1,42 +0,0 @@
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""This package contains code for creating analyzers to extract Application
Binary Interface (ABI) information, along with simple analyses that just load
existing metadata.
"""
from __future__ import absolute_import
import llnl.util.tty as tty
import spack.paths
import spack.util.classes
mod_path = spack.paths.analyzers_path
analyzers = spack.util.classes.list_classes("spack.analyzers", mod_path)
# The base analyzer does not have a name, and cannot do dict comprehension
analyzer_types = {}
for a in analyzers:
if not hasattr(a, "name"):
continue
analyzer_types[a.name] = a
def list_all():
"""A helper function to list all analyzers and their descriptions
"""
for name, analyzer in analyzer_types.items():
print("%-25s: %-35s" % (name, analyzer.description))
def get_analyzer(name):
"""Courtesy function to retrieve an analyzer, and exit on error if it
does not exist.
"""
if name in analyzer_types:
return analyzer_types[name]
tty.die("Analyzer %s does not exist" % name)

View File

@@ -1,116 +0,0 @@
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""An analyzer base provides basic functions to run the analysis, save results,
and (optionally) interact with a Spack Monitor
"""
import os
import llnl.util.tty as tty
import spack.config
import spack.hooks
import spack.monitor
import spack.util.path
def get_analyzer_dir(spec, analyzer_dir=None):
"""
Given a spec, return the directory to save analyzer results.
We create the directory if it does not exist. We also check that the
spec has an associated package. An analyzer cannot be run if the spec isn't
associated with a package. If the user provides a custom analyzer_dir,
we use it over checking the config and the default at ~/.spack/analyzers
"""
# An analyzer cannot be run if the spec isn't associated with a package
if not hasattr(spec, "package") or not spec.package:
tty.die("A spec can only be analyzed with an associated package.")
# The top level directory is in the user home, or a custom location
if not analyzer_dir:
analyzer_dir = spack.util.path.canonicalize_path(
spack.config.get('config:analyzers_dir', '~/.spack/analyzers'))
# We follow the same convention as the spec install (this could be better)
package_prefix = os.sep.join(spec.package.prefix.split('/')[-3:])
meta_dir = os.path.join(analyzer_dir, package_prefix)
return meta_dir
class AnalyzerBase(object):
def __init__(self, spec, dirname=None):
"""
Verify that the analyzer has correct metadata.
An Analyzer is intended to run on one spec install, so the spec
with its associated package is required on init. The child analyzer
class should define an init function that super's the init here, and
also check that the analyzer has all dependencies that it
needs. If an analyzer subclass does not have dependencies, it does not
need to define an init. An Analyzer should not be allowed to proceed
if one or more dependencies are missing. The dirname, if defined,
is an optional directory name to save to (instead of the default meta
spack directory).
"""
self.spec = spec
self.dirname = dirname
self.meta_dir = os.path.dirname(spec.package.install_log_path)
for required in ["name", "outfile", "description"]:
if not hasattr(self, required):
tty.die("Please add a %s attribute on the analyzer." % required)
def run(self):
"""
Given a spec with an installed package, run the analyzer on it.
"""
raise NotImplementedError
@property
def output_dir(self):
"""
The full path to the output directory.
This includes the nested analyzer directory structure. This function
does not create anything.
"""
if not hasattr(self, "_output_dir"):
output_dir = get_analyzer_dir(self.spec, self.dirname)
self._output_dir = os.path.join(output_dir, self.name)
return self._output_dir
def save_result(self, result, overwrite=False):
"""
Save a result to the associated spack monitor, if defined.
This function is on the level of the analyzer because it might be
the case that the result is large (appropriate for a single request)
or that the data is organized differently (e.g., more than one
request per result). If an analyzer subclass needs to over-write
this function with a custom save, that is appropriate to do (see abi).
"""
# We maintain the structure in json with the analyzer as key so
# that in the future, we could upload to a monitor server
if result[self.name]:
outfile = os.path.join(self.output_dir, self.outfile)
# Only try to create the results directory if we have a result
if not os.path.exists(self._output_dir):
os.makedirs(self._output_dir)
# Don't overwrite an existing result if overwrite is False
if os.path.exists(outfile) and not overwrite:
tty.info("%s exists and overwrite is False, skipping." % outfile)
else:
tty.info("Writing result to %s" % outfile)
spack.monitor.write_json(result[self.name], outfile)
# This hook runs after a save result
spack.hooks.on_analyzer_save(self.spec.package, result)

View File

@@ -1,33 +0,0 @@
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""A configargs analyzer is a class of analyzer that typically just uploads
already existing metadata about config args from a package spec install
directory."""
import os
import spack.monitor
from .analyzer_base import AnalyzerBase
class ConfigArgs(AnalyzerBase):
name = "config_args"
outfile = "spack-analyzer-config-args.json"
description = "config args loaded from spack-configure-args.txt"
def run(self):
"""
Load the configure-args.txt and save in json.
The run function will find the spack-config-args.txt file in the
package install directory, and read it into a json structure that has
the name of the analyzer as the key.
"""
config_file = os.path.join(self.meta_dir, "spack-configure-args.txt")
return {self.name: spack.monitor.read_file(config_file)}

View File

@@ -1,54 +0,0 @@
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""An environment analyzer will read and parse the environment variables
file in the installed package directory, generating a json file that has
an index of key, value pairs for environment variables."""
import os
import llnl.util.tty as tty
from spack.util.environment import EnvironmentModifications
from .analyzer_base import AnalyzerBase
class EnvironmentVariables(AnalyzerBase):
name = "environment_variables"
outfile = "spack-analyzer-environment-variables.json"
description = "environment variables parsed from spack-build-env.txt"
def run(self):
"""
Load, parse, and save spack-build-env.txt to analyzers.
Read in the spack-build-env.txt file from the package install
directory and parse the environment variables into key value pairs.
The result should have the key for the analyzer, the name.
"""
env_file = os.path.join(self.meta_dir, "spack-build-env.txt")
return {self.name: self._read_environment_file(env_file)}
def _read_environment_file(self, filename):
"""
Read and parse the environment file.
Given an environment file, we want to read it, split by semicolons
and new lines, and then parse down to the subset of SPACK_* variables.
We assume that all spack prefix variables are not secrets, and unlike
the install_manifest.json, we don't (at least to start) parse the values
to remove path prefixes specific to user systems.
"""
if not os.path.exists(filename):
tty.warn("No environment file available")
return
mods = EnvironmentModifications.from_sourcing_file(filename)
env = {}
mods.apply_modifications(env)
return env

View File

@@ -1,31 +0,0 @@
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""The install files json file (install_manifest.json) already exists in
the package install folder, so this analyzer simply moves it to the user
analyzer folder for further processing."""
import os
import spack.monitor
from .analyzer_base import AnalyzerBase
class InstallFiles(AnalyzerBase):
name = "install_files"
outfile = "spack-analyzer-install-files.json"
description = "install file listing read from install_manifest.json"
def run(self):
"""
Load in the install_manifest.json and save to analyzers.
We write it out to the analyzers folder, with key as the analyzer name.
"""
manifest_file = os.path.join(self.meta_dir, "install_manifest.json")
return {self.name: spack.monitor.read_json(manifest_file)}

View File

@@ -1,114 +0,0 @@
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import llnl.util.tty as tty
import spack
import spack.binary_distribution
import spack.bootstrap
import spack.error
import spack.hooks
import spack.monitor
import spack.package
import spack.repo
import spack.util.executable
from .analyzer_base import AnalyzerBase
class Libabigail(AnalyzerBase):
name = "libabigail"
outfile = "spack-analyzer-libabigail.json"
description = "Application Binary Interface (ABI) features for objects"
def __init__(self, spec, dirname=None):
"""
init for an analyzer ensures we have all needed dependencies.
For the libabigail analyzer, this means Libabigail.
Since the output for libabigail is one file per object, we communicate
with the monitor multiple times.
"""
super(Libabigail, self).__init__(spec, dirname)
# This doesn't seem to work to import on the module level
tty.debug("Preparing to use Libabigail, will install if missing.")
with spack.bootstrap.ensure_bootstrap_configuration():
# libabigail won't install lib/bin/share without docs
spec = spack.spec.Spec("libabigail+docs")
spack.bootstrap.ensure_executables_in_path_or_raise(
["abidw"], abstract_spec=spec
)
self.abidw = spack.util.executable.which('abidw')
def run(self):
"""
Run libabigail, and save results to filename.
This run function differs in that we write as we generate and then
return a dict with the analyzer name as the key, and the value of a
dict of results, where the key is the object name, and the value is
the output file written to.
"""
manifest = spack.binary_distribution.get_buildfile_manifest(self.spec)
# This result will store a path to each file
result = {}
# Generate an output file for each binary or object
for obj in manifest.get("binary_to_relocate_fullpath", []):
# We want to preserve the path in the install directory in case
# a library has an equivalenly named lib or executable, for example
outdir = os.path.dirname(obj.replace(self.spec.package.prefix,
'').strip(os.path.sep))
outfile = "spack-analyzer-libabigail-%s.xml" % os.path.basename(obj)
outfile = os.path.join(self.output_dir, outdir, outfile)
outdir = os.path.dirname(outfile)
# Create the output directory
if not os.path.exists(outdir):
os.makedirs(outdir)
# Sometimes libabigail segfaults and dumps
try:
self.abidw(obj, "--out-file", outfile)
result[obj] = outfile
tty.info("Writing result to %s" % outfile)
except spack.error.SpackError:
tty.warn("Issue running abidw for %s" % obj)
return {self.name: result}
def save_result(self, result, overwrite=False):
"""
Read saved ABI results and upload to monitor server.
ABI results are saved to individual files, so each one needs to be
read and uploaded. Result here should be the lookup generated in run(),
the key is the analyzer name, and each value is the result file.
We currently upload the entire xml as text because libabigail can't
easily read gzipped xml, but this will be updated when it can.
"""
if not spack.monitor.cli:
return
name = self.spec.package.name
for obj, filename in result.get(self.name, {}).items():
# Don't include the prefix
rel_path = obj.replace(self.spec.prefix + os.path.sep, "")
# We've already saved the results to file during run
content = spack.monitor.read_file(filename)
# A result needs an analyzer, value or binary_value, and name
data = {"value": content, "install_file": rel_path, "name": "abidw-xml"}
tty.info("Sending result for %s %s to monitor." % (name, rel_path))
spack.hooks.on_analyzer_save(self.spec.package, {"libabigail": [data]})

View File

@@ -276,17 +276,36 @@ def _search_duplicate_specs_in_externals(error_cls):
)
@package_directives
def _check_build_test_callbacks(pkgs, error_cls):
"""Ensure stand-alone test method is not included in build-time callbacks"""
errors = []
for pkg_name in pkgs:
pkg_cls = spack.repo.path.get_pkg_class(pkg_name)
test_callbacks = pkg_cls.build_time_test_callbacks
if test_callbacks and 'test' in test_callbacks:
msg = ('{0} package contains "test" method in '
'build_time_test_callbacks')
instr = ('Remove "test" from: [{0}]'
.format(', '.join(test_callbacks)))
errors.append(error_cls(msg.format(pkg_name), [instr]))
return errors
@package_directives
def _check_patch_urls(pkgs, error_cls):
"""Ensure that patches fetched from GitHub have stable sha256 hashes."""
github_patch_url_re = (
r"^https?://github\.com/.+/.+/(?:commit|pull)/[a-fA-F0-9]*.(?:patch|diff)"
r"^https?://(?:patch-diff\.)?github(?:usercontent)?\.com/"
".+/.+/(?:commit|pull)/[a-fA-F0-9]*.(?:patch|diff)"
)
errors = []
for pkg_name in pkgs:
pkg = spack.repo.get(pkg_name)
for condition, patches in pkg.patches.items():
pkg_cls = spack.repo.path.get_pkg_class(pkg_name)
for condition, patches in pkg_cls.patches.items():
for patch in patches:
if not isinstance(patch, spack.patch.UrlPatch):
continue
@@ -298,7 +317,7 @@ def _check_patch_urls(pkgs, error_cls):
if not patch.url.endswith(full_index_arg):
errors.append(error_cls(
"patch URL in package {0} must end with {1}".format(
pkg.name, full_index_arg,
pkg_cls.name, full_index_arg,
),
[patch.url],
))
@@ -312,21 +331,21 @@ def _linting_package_file(pkgs, error_cls):
"""
errors = []
for pkg_name in pkgs:
pkg = spack.repo.get(pkg_name)
pkg_cls = spack.repo.path.get_pkg_class(pkg_name)
# Does the homepage have http, and if so, does https work?
if pkg.homepage.startswith('http://'):
https = re.sub("http", "https", pkg.homepage, 1)
if pkg_cls.homepage.startswith('http://'):
https = re.sub("http", "https", pkg_cls.homepage, 1)
try:
response = urlopen(https)
except Exception as e:
msg = 'Error with attempting https for "{0}": '
errors.append(error_cls(msg.format(pkg.name), [str(e)]))
errors.append(error_cls(msg.format(pkg_cls.name), [str(e)]))
continue
if response.getcode() == 200:
msg = 'Package "{0}" uses http but has a valid https endpoint.'
errors.append(msg.format(pkg.name))
errors.append(msg.format(pkg_cls.name))
return llnl.util.lang.dedupe(errors)
@@ -336,10 +355,10 @@ def _unknown_variants_in_directives(pkgs, error_cls):
"""Report unknown or wrong variants in directives for this package"""
errors = []
for pkg_name in pkgs:
pkg = spack.repo.get(pkg_name)
pkg_cls = spack.repo.path.get_pkg_class(pkg_name)
# Check "conflicts" directive
for conflict, triggers in pkg.conflicts.items():
for conflict, triggers in pkg_cls.conflicts.items():
for trigger, _ in triggers:
vrn = spack.spec.Spec(conflict)
try:
@@ -352,34 +371,34 @@ def _unknown_variants_in_directives(pkgs, error_cls):
# When os and target constraints can be created independently of
# the platform, TODO change this back to add an error.
errors.extend(_analyze_variants_in_directive(
pkg, spack.spec.Spec(trigger),
pkg_cls, spack.spec.Spec(trigger),
directive='conflicts', error_cls=error_cls
))
errors.extend(_analyze_variants_in_directive(
pkg, vrn, directive='conflicts', error_cls=error_cls
pkg_cls, vrn, directive='conflicts', error_cls=error_cls
))
# Check "depends_on" directive
for _, triggers in pkg.dependencies.items():
for _, triggers in pkg_cls.dependencies.items():
triggers = list(triggers)
for trigger in list(triggers):
vrn = spack.spec.Spec(trigger)
errors.extend(_analyze_variants_in_directive(
pkg, vrn, directive='depends_on', error_cls=error_cls
pkg_cls, vrn, directive='depends_on', error_cls=error_cls
))
# Check "patch" directive
for _, triggers in pkg.provided.items():
for _, triggers in pkg_cls.provided.items():
triggers = [spack.spec.Spec(x) for x in triggers]
for vrn in triggers:
errors.extend(_analyze_variants_in_directive(
pkg, vrn, directive='patch', error_cls=error_cls
pkg_cls, vrn, directive='patch', error_cls=error_cls
))
# Check "resource" directive
for vrn in pkg.resources:
for vrn in pkg_cls.resources:
errors.extend(_analyze_variants_in_directive(
pkg, vrn, directive='resource', error_cls=error_cls
pkg_cls, vrn, directive='resource', error_cls=error_cls
))
return llnl.util.lang.dedupe(errors)
@@ -390,15 +409,15 @@ def _unknown_variants_in_dependencies(pkgs, error_cls):
"""Report unknown dependencies and wrong variants for dependencies"""
errors = []
for pkg_name in pkgs:
pkg = spack.repo.get(pkg_name)
pkg_cls = spack.repo.path.get_pkg_class(pkg_name)
filename = spack.repo.path.filename_for_package_name(pkg_name)
for dependency_name, dependency_data in pkg.dependencies.items():
for dependency_name, dependency_data in pkg_cls.dependencies.items():
# No need to analyze virtual packages
if spack.repo.path.is_virtual(dependency_name):
continue
try:
dependency_pkg = spack.repo.get(dependency_name)
dependency_pkg_cls = spack.repo.path.get_pkg_class(dependency_name)
except spack.repo.UnknownPackageError:
# This dependency is completely missing, so report
# and continue the analysis
@@ -414,8 +433,8 @@ def _unknown_variants_in_dependencies(pkgs, error_cls):
dependency_variants = dependency_edge.spec.variants
for name, value in dependency_variants.items():
try:
v, _ = dependency_pkg.variants[name]
v.validate_or_raise(value, pkg=dependency_pkg)
v, _ = dependency_pkg_cls.variants[name]
v.validate_or_raise(value, pkg_cls=dependency_pkg_cls)
except Exception as e:
summary = (pkg_name + ": wrong variant used for a "
"dependency in a 'depends_on' directive")
@@ -437,10 +456,10 @@ def _version_constraints_are_satisfiable_by_some_version_in_repo(pkgs, error_cls
"""Report if version constraints used in directives are not satisfiable"""
errors = []
for pkg_name in pkgs:
pkg = spack.repo.get(pkg_name)
pkg_cls = spack.repo.path.get_pkg_class(pkg_name)
filename = spack.repo.path.filename_for_package_name(pkg_name)
dependencies_to_check = []
for dependency_name, dependency_data in pkg.dependencies.items():
for dependency_name, dependency_data in pkg_cls.dependencies.items():
# Skip virtual dependencies for the time being, check on
# their versions can be added later
if spack.repo.path.is_virtual(dependency_name):
@@ -451,19 +470,19 @@ def _version_constraints_are_satisfiable_by_some_version_in_repo(pkgs, error_cls
)
for s in dependencies_to_check:
dependency_pkg = None
dependency_pkg_cls = None
try:
dependency_pkg = spack.repo.get(s.name)
dependency_pkg_cls = spack.repo.path.get_pkg_class(s.name)
assert any(
v.satisfies(s.versions) for v in list(dependency_pkg.versions)
v.satisfies(s.versions) for v in list(dependency_pkg_cls.versions)
)
except Exception:
summary = ("{0}: dependency on {1} cannot be satisfied "
"by known versions of {1.name}").format(pkg_name, s)
details = ['happening in ' + filename]
if dependency_pkg is not None:
if dependency_pkg_cls is not None:
details.append('known versions of {0.name} are {1}'.format(
s, ', '.join([str(x) for x in dependency_pkg.versions])
s, ', '.join([str(x) for x in dependency_pkg_cls.versions])
))
errors.append(error_cls(summary=summary, details=details))
@@ -481,7 +500,7 @@ def _analyze_variants_in_directive(pkg, constraint, directive, error_cls):
for name, v in constraint.variants.items():
try:
variant, _ = pkg.variants[name]
variant.validate_or_raise(v, pkg=pkg)
variant.validate_or_raise(v, pkg_cls=pkg)
except variant_exceptions as e:
summary = pkg.name + ': wrong variant in "{0}" directive'
summary = summary.format(directive)

File diff suppressed because it is too large Load Diff

View File

@@ -5,6 +5,7 @@
from __future__ import print_function
import contextlib
import copy
import fnmatch
import functools
import json
@@ -21,6 +22,7 @@
import llnl.util.filesystem as fs
import llnl.util.tty as tty
from llnl.util.lang import GroupedExceptionHandler
import spack.binary_distribution
import spack.config
@@ -36,6 +38,11 @@
import spack.util.environment
import spack.util.executable
import spack.util.path
import spack.util.spack_yaml
import spack.util.url
#: Name of the file containing metadata about the bootstrapping source
METADATA_YAML_FILENAME = 'metadata.yaml'
#: Map a bootstrapper type to the corresponding class
_bootstrap_methods = {}
@@ -73,32 +80,41 @@ def _try_import_from_store(module, query_spec, query_info=None):
for candidate_spec in installed_specs:
pkg = candidate_spec['python'].package
module_paths = {
module_paths = [
os.path.join(candidate_spec.prefix, pkg.purelib),
os.path.join(candidate_spec.prefix, pkg.platlib),
}
sys.path.extend(module_paths)
] # type: list[str]
path_before = list(sys.path)
# NOTE: try module_paths first and last, last allows an existing version in path
# to be picked up and used, possibly depending on something in the store, first
# allows the bootstrap version to work when an incompatible version is in
# sys.path
orders = [
module_paths + sys.path,
sys.path + module_paths,
]
for path in orders:
sys.path = path
try:
_fix_ext_suffix(candidate_spec)
if _python_import(module):
msg = ('[BOOTSTRAP MODULE {0}] The installed spec "{1}/{2}" '
'provides the "{0}" Python module').format(
module, query_spec, candidate_spec.dag_hash()
)
tty.debug(msg)
if query_info is not None:
query_info['spec'] = candidate_spec
return True
except Exception as e:
msg = ('unexpected error while trying to import module '
'"{0}" from spec "{1}" [error="{2}"]')
tty.warn(msg.format(module, candidate_spec, str(e)))
else:
msg = "Spec {0} did not provide module {1}"
tty.warn(msg.format(candidate_spec, module))
try:
_fix_ext_suffix(candidate_spec)
if _python_import(module):
msg = ('[BOOTSTRAP MODULE {0}] The installed spec "{1}/{2}" '
'provides the "{0}" Python module').format(
module, query_spec, candidate_spec.dag_hash()
)
tty.debug(msg)
if query_info is not None:
query_info['spec'] = candidate_spec
return True
except Exception as e:
msg = ('unexpected error while trying to import module '
'"{0}" from spec "{1}" [error="{2}"]')
tty.warn(msg.format(module, candidate_spec, str(e)))
else:
msg = "Spec {0} did not provide module {1}"
tty.warn(msg.format(candidate_spec, module))
sys.path = sys.path[:-3]
sys.path = path_before
return False
@@ -203,12 +219,43 @@ def _executables_in_store(executables, query_spec, query_info=None):
return False
@_bootstrapper(type='buildcache')
class _BuildcacheBootstrapper(object):
"""Install the software needed during bootstrapping from a buildcache."""
class _BootstrapperBase(object):
"""Base class to derive types that can bootstrap software for Spack"""
config_scope_name = ''
def __init__(self, conf):
self.name = conf['name']
self.url = conf['info']['url']
@property
def mirror_url(self):
# Absolute paths
if os.path.isabs(self.url):
return spack.util.url.format(self.url)
# Check for :// and assume it's an url if we find it
if '://' in self.url:
return self.url
# Otherwise, it's a relative path
return spack.util.url.format(os.path.join(self.metadata_dir, self.url))
@property
def mirror_scope(self):
return spack.config.InternalConfigScope(
self.config_scope_name, {'mirrors:': {self.name: self.mirror_url}}
)
@_bootstrapper(type='buildcache')
class _BuildcacheBootstrapper(_BootstrapperBase):
"""Install the software needed during bootstrapping from a buildcache."""
config_scope_name = 'bootstrap_buildcache'
def __init__(self, conf):
super(_BuildcacheBootstrapper, self).__init__(conf)
self.metadata_dir = spack.util.path.canonicalize_path(conf['metadata'])
self.last_search = None
@staticmethod
@@ -231,9 +278,8 @@ def _spec_and_platform(abstract_spec_str):
def _read_metadata(self, package_name):
"""Return metadata about the given package."""
json_filename = '{0}.json'.format(package_name)
json_path = os.path.join(
spack.paths.share_path, 'bootstrap', self.name, json_filename
)
json_dir = self.metadata_dir
json_path = os.path.join(json_dir, json_filename)
with open(json_path) as f:
data = json.load(f)
return data
@@ -307,12 +353,6 @@ def _install_and_test(
return True
return False
@property
def mirror_scope(self):
return spack.config.InternalConfigScope(
'bootstrap_buildcache', {'mirrors:': {self.name: self.url}}
)
def try_import(self, module, abstract_spec_str):
test_fn, info = functools.partial(_try_import_from_store, module), {}
if test_fn(query_spec=abstract_spec_str, query_info=info):
@@ -342,9 +382,13 @@ def try_search_path(self, executables, abstract_spec_str):
@_bootstrapper(type='install')
class _SourceBootstrapper(object):
class _SourceBootstrapper(_BootstrapperBase):
"""Install the software needed during bootstrapping from sources."""
config_scope_name = 'bootstrap_source'
def __init__(self, conf):
super(_SourceBootstrapper, self).__init__(conf)
self.metadata_dir = spack.util.path.canonicalize_path(conf['metadata'])
self.conf = conf
self.last_search = None
@@ -377,7 +421,8 @@ def try_import(self, module, abstract_spec_str):
tty.debug(msg.format(module, abstract_spec_str))
# Install the spec that should make the module importable
concrete_spec.package.do_install(fail_fast=True)
with spack.config.override(self.mirror_scope):
concrete_spec.package.do_install(fail_fast=True)
if _try_import_from_store(module, query_spec=concrete_spec, query_info=info):
self.last_search = info
@@ -390,6 +435,8 @@ def try_search_path(self, executables, abstract_spec_str):
self.last_search = info
return True
tty.info("Bootstrapping {0} from sources".format(abstract_spec_str))
# If we compile code from sources detecting a few build tools
# might reduce compilation time by a fair amount
_add_externals_if_missing()
@@ -402,7 +449,8 @@ def try_search_path(self, executables, abstract_spec_str):
msg = "[BOOTSTRAP] Try installing '{0}' from sources"
tty.debug(msg.format(abstract_spec_str))
concrete_spec.package.do_install()
with spack.config.override(self.mirror_scope):
concrete_spec.package.do_install()
if _executables_in_store(executables, concrete_spec, query_info=info):
self.last_search = info
return True
@@ -417,11 +465,11 @@ def _make_bootstrapper(conf):
return _bootstrap_methods[btype](conf)
def _source_is_trusted(conf):
def source_is_enabled_or_raise(conf):
"""Raise ValueError if the source is not enabled for bootstrapping"""
trusted, name = spack.config.get('bootstrap:trusted'), conf['name']
if name not in trusted:
return False
return trusted[name]
if not trusted.get(name, False):
raise ValueError('source is not trusted')
def spec_for_current_python():
@@ -486,36 +534,26 @@ def ensure_module_importable_or_raise(module, abstract_spec=None):
return
abstract_spec = abstract_spec or module
source_configs = spack.config.get('bootstrap:sources', [])
errors = {}
h = GroupedExceptionHandler()
for current_config in source_configs:
if not _source_is_trusted(current_config):
msg = ('[BOOTSTRAP MODULE {0}] Skipping source "{1}" since it is '
'not trusted').format(module, current_config['name'])
tty.debug(msg)
continue
for current_config in bootstrapping_sources():
with h.forward(current_config['name']):
source_is_enabled_or_raise(current_config)
b = _make_bootstrapper(current_config)
try:
b = _make_bootstrapper(current_config)
if b.try_import(module, abstract_spec):
return
except Exception as e:
msg = '[BOOTSTRAP MODULE {0}] Unexpected error "{1}"'
tty.debug(msg.format(module, str(e)))
errors[current_config['name']] = e
# We couldn't import in any way, so raise an import error
msg = 'cannot bootstrap the "{0}" Python module'.format(module)
assert h, 'expected at least one exception to have been raised at this point: while bootstrapping {0}'.format(module) # noqa: E501
msg = 'cannot bootstrap the "{0}" Python module '.format(module)
if abstract_spec:
msg += ' from spec "{0}"'.format(abstract_spec)
msg += ' due to the following failures:\n'
for method in errors:
err = errors[method]
msg += " '{0}' raised {1}: {2}\n".format(
method, err.__class__.__name__, str(err))
msg += ' Please run `spack -d spec zlib` for more verbose error messages'
msg += 'from spec "{0}" '.format(abstract_spec)
if tty.is_debug():
msg += h.grouped_message(with_tracebacks=True)
else:
msg += h.grouped_message(with_tracebacks=False)
msg += '\nRun `spack --debug ...` for more detailed errors'
raise ImportError(msg)
@@ -538,16 +576,14 @@ def ensure_executables_in_path_or_raise(executables, abstract_spec):
return cmd
executables_str = ', '.join(executables)
source_configs = spack.config.get('bootstrap:sources', [])
for current_config in source_configs:
if not _source_is_trusted(current_config):
msg = ('[BOOTSTRAP EXECUTABLES {0}] Skipping source "{1}" since it is '
'not trusted').format(executables_str, current_config['name'])
tty.debug(msg)
continue
b = _make_bootstrapper(current_config)
try:
h = GroupedExceptionHandler()
for current_config in bootstrapping_sources():
with h.forward(current_config['name']):
source_is_enabled_or_raise(current_config)
b = _make_bootstrapper(current_config)
if b.try_search_path(executables, abstract_spec):
# Additional environment variables needed
concrete_spec, cmd = b.last_search['spec'], b.last_search['command']
@@ -562,14 +598,16 @@ def ensure_executables_in_path_or_raise(executables, abstract_spec):
)
cmd.add_default_envmod(env_mods)
return cmd
except Exception as e:
msg = '[BOOTSTRAP EXECUTABLES {0}] Unexpected error "{1}"'
tty.debug(msg.format(executables_str, str(e)))
# We couldn't import in any way, so raise an import error
msg = 'cannot bootstrap any of the {0} executables'.format(executables_str)
assert h, 'expected at least one exception to have been raised at this point: while bootstrapping {0}'.format(executables_str) # noqa: E501
msg = 'cannot bootstrap any of the {0} executables '.format(executables_str)
if abstract_spec:
msg += ' from spec "{0}"'.format(abstract_spec)
msg += 'from spec "{0}" '.format(abstract_spec)
if tty.is_debug():
msg += h.grouped_message(with_tracebacks=True)
else:
msg += h.grouped_message(with_tracebacks=False)
msg += '\nRun `spack --debug ...` for more detailed errors'
raise RuntimeError(msg)
@@ -614,10 +652,10 @@ def _add_compilers_if_missing():
def _add_externals_if_missing():
search_list = [
# clingo
spack.repo.path.get('cmake'),
spack.repo.path.get('bison'),
spack.repo.path.get_pkg_class('cmake'),
spack.repo.path.get_pkg_class('bison'),
# GnuPG
spack.repo.path.get('gawk')
spack.repo.path.get_pkg_class('gawk')
]
detected_packages = spack.detection.by_executable(search_list)
spack.detection.update_configuration(detected_packages, scope='bootstrap')
@@ -826,6 +864,19 @@ def ensure_flake8_in_path_or_raise():
return ensure_executables_in_path_or_raise([executable], abstract_spec=root_spec)
def all_root_specs(development=False):
"""Return a list of all the root specs that may be used to bootstrap Spack.
Args:
development (bool): if True include dev dependencies
"""
specs = [clingo_root_spec(), gnupg_root_spec(), patchelf_root_spec()]
if development:
specs += [isort_root_spec(), mypy_root_spec(),
black_root_spec(), flake8_root_spec()]
return specs
def _missing(name, purpose, system_only=True):
"""Message to be printed if an executable is not found"""
msg = '[{2}] MISSING "{0}": {1}'
@@ -963,3 +1014,23 @@ def status_message(section):
msg += '\n'
msg = msg.format(pass_token if not missing_software else fail_token)
return msg, missing_software
def bootstrapping_sources(scope=None):
"""Return the list of configured sources of software for bootstrapping Spack
Args:
scope (str or None): if a valid configuration scope is given, return the
list only from that scope
"""
source_configs = spack.config.get('bootstrap:sources', default=None, scope=scope)
source_configs = source_configs or []
list_of_sources = []
for entry in source_configs:
current = copy.copy(entry)
metadata_dir = spack.util.path.canonicalize_path(entry['metadata'])
metadata_yaml = os.path.join(metadata_dir, METADATA_YAML_FILENAME)
with open(metadata_yaml) as f:
current.update(spack.util.spack_yaml.load(f))
list_of_sources.append(current)
return list_of_sources

View File

@@ -55,7 +55,7 @@
import spack.config
import spack.install_test
import spack.main
import spack.package
import spack.package_base
import spack.paths
import spack.platforms
import spack.repo
@@ -111,6 +111,20 @@
dso_suffix = 'dylib' if sys.platform == 'darwin' else 'so'
def should_set_parallel_jobs(jobserver_support=False):
"""Returns true in general, except when:
- The env variable SPACK_NO_PARALLEL_MAKE=1 is set
- jobserver_support is enabled, and a jobserver was found.
"""
if (
jobserver_support and
'MAKEFLAGS' in os.environ and
'--jobserver' in os.environ['MAKEFLAGS']
):
return False
return not env_flag(SPACK_NO_PARALLEL_MAKE)
class MakeExecutable(Executable):
"""Special callable executable object for make so the user can specify
parallelism options on a per-invocation basis. Specifying
@@ -120,9 +134,6 @@ class MakeExecutable(Executable):
call will name an environment variable which will be set to the
parallelism level (without affecting the normal invocation with
-j).
Note that if the SPACK_NO_PARALLEL_MAKE env var is set it overrides
everything.
"""
def __init__(self, name, jobs):
@@ -133,9 +144,8 @@ def __call__(self, *args, **kwargs):
"""parallel, and jobs_env from kwargs are swallowed and used here;
remaining arguments are passed through to the superclass.
"""
disable = env_flag(SPACK_NO_PARALLEL_MAKE)
parallel = (not disable) and kwargs.pop('parallel', self.jobs > 1)
parallel = should_set_parallel_jobs(jobserver_support=True) and \
kwargs.pop('parallel', self.jobs > 1)
if parallel:
args = ('-j{0}'.format(self.jobs),) + args
@@ -181,7 +191,7 @@ def clean_environment():
env.unset('PYTHONPATH')
# Affects GNU make, can e.g. indirectly inhibit enabling parallel build
env.unset('MAKEFLAGS')
# env.unset('MAKEFLAGS')
# Avoid that libraries of build dependencies get hijacked.
env.unset('LD_PRELOAD')
@@ -712,7 +722,7 @@ def get_std_cmake_args(pkg):
package were a CMakePackage instance.
Args:
pkg (spack.package.PackageBase): package under consideration
pkg (spack.package_base.PackageBase): package under consideration
Returns:
list: arguments for cmake
@@ -728,7 +738,7 @@ def get_std_meson_args(pkg):
package were a MesonPackage instance.
Args:
pkg (spack.package.PackageBase): package under consideration
pkg (spack.package_base.PackageBase): package under consideration
Returns:
list: arguments for meson
@@ -738,12 +748,12 @@ def get_std_meson_args(pkg):
def parent_class_modules(cls):
"""
Get list of superclass modules that descend from spack.package.PackageBase
Get list of superclass modules that descend from spack.package_base.PackageBase
Includes cls.__module__
"""
if (not issubclass(cls, spack.package.PackageBase) or
issubclass(spack.package.PackageBase, cls)):
if (not issubclass(cls, spack.package_base.PackageBase) or
issubclass(spack.package_base.PackageBase, cls)):
return []
result = []
module = sys.modules.get(cls.__module__)
@@ -761,7 +771,7 @@ def load_external_modules(pkg):
associated with them.
Args:
pkg (spack.package.PackageBase): package to load deps for
pkg (spack.package_base.PackageBase): package to load deps for
"""
for dep in list(pkg.spec.traverse()):
external_modules = dep.external_modules or []
@@ -829,7 +839,7 @@ def setup_package(pkg, dirty, context='build'):
# PrgEnv modules on cray platform. Module unload does no damage when
# unnecessary
on_cray, _ = _on_cray()
if on_cray:
if on_cray and not dirty:
for mod in ['cray-mpich', 'cray-libsci']:
module('unload', mod)
@@ -1028,7 +1038,7 @@ def get_cmake_prefix_path(pkg):
def _setup_pkg_and_run(serialized_pkg, function, kwargs, child_pipe,
input_multiprocess_fd):
input_multiprocess_fd, jsfd1, jsfd2):
context = kwargs.get('context', 'build')
@@ -1099,7 +1109,7 @@ def start_build_process(pkg, function, kwargs):
Args:
pkg (spack.package.PackageBase): package whose environment we should set up the
pkg (spack.package_base.PackageBase): package whose environment we should set up the
child process for.
function (typing.Callable): argless function to run in the child
process.
@@ -1135,6 +1145,8 @@ def child_fun():
"""
parent_pipe, child_pipe = multiprocessing.Pipe()
input_multiprocess_fd = None
jobserver_fd1 = None
jobserver_fd2 = None
serialized_pkg = spack.subprocess_context.PackageInstallContext(pkg)
@@ -1144,11 +1156,17 @@ def child_fun():
'fileno'):
input_fd = os.dup(sys.stdin.fileno())
input_multiprocess_fd = MultiProcessFd(input_fd)
mflags = os.environ.get('MAKEFLAGS', False)
if mflags:
m = re.search(r'--jobserver-[^=]*=(\d),(\d)', mflags)
if m:
jobserver_fd1 = MultiProcessFd(int(m.group(1)))
jobserver_fd2 = MultiProcessFd(int(m.group(2)))
p = multiprocessing.Process(
target=_setup_pkg_and_run,
args=(serialized_pkg, function, kwargs, child_pipe,
input_multiprocess_fd))
input_multiprocess_fd, jobserver_fd1, jobserver_fd2))
p.start()
@@ -1216,7 +1234,7 @@ def make_stack(tb, stack=None):
if 'self' in frame.f_locals:
# Find the first proper subclass of PackageBase.
obj = frame.f_locals['self']
if isinstance(obj, spack.package.PackageBase):
if isinstance(obj, spack.package_base.PackageBase):
break
# We found obj, the Package implementation we care about.

View File

@@ -9,7 +9,7 @@
from spack.build_systems.autotools import AutotoolsPackage
from spack.directives import extends
from spack.package import ExtensionError
from spack.package_base import ExtensionError
from spack.util.executable import which

View File

@@ -16,7 +16,7 @@
from spack.build_environment import InstallError
from spack.directives import conflicts, depends_on
from spack.operating_systems.mac_os import macos_version
from spack.package import PackageBase, run_after, run_before
from spack.package_base import PackageBase, run_after, run_before
from spack.util.executable import Executable
from spack.version import Version

View File

@@ -8,7 +8,7 @@
from llnl.util.filesystem import install, mkdirp
from spack.build_systems.cmake import CMakePackage
from spack.package import run_after
from spack.package_base import run_after
def cmake_cache_path(name, value, comment=""):
@@ -210,6 +210,10 @@ def std_initconfig_entries(self):
"#------------------{0}\n".format("-" * 60),
]
def initconfig_package_entries(self):
"""This method is to be overwritten by the package"""
return []
def initconfig(self, spec, prefix):
cache_entries = (self.std_initconfig_entries() +
self.initconfig_compiler_entries() +

View File

@@ -18,7 +18,7 @@
import spack.build_environment
from spack.directives import conflicts, depends_on, variant
from spack.package import InstallError, PackageBase, run_after
from spack.package_base import InstallError, PackageBase, run_after
from spack.util.path import convert_to_posix_path
# Regex to extract the primary generator from the CMake generator
@@ -176,6 +176,7 @@ def _std_args(pkg):
'-G', generator,
define('CMAKE_INSTALL_PREFIX', convert_to_posix_path(pkg.prefix)),
define('CMAKE_BUILD_TYPE', build_type),
define('BUILD_TESTING', pkg.run_tests),
]
# CMAKE_INTERPROCEDURAL_OPTIMIZATION only exists for CMake >= 3.9
@@ -361,6 +362,7 @@ def cmake_args(self):
* CMAKE_INSTALL_PREFIX
* CMAKE_BUILD_TYPE
* BUILD_TESTING
which will be set automatically.

View File

@@ -6,7 +6,7 @@
import spack.variant
from spack.directives import conflicts, depends_on, variant
from spack.multimethod import when
from spack.package import PackageBase
from spack.package_base import PackageBase
class CudaPackage(PackageBase):
@@ -37,6 +37,7 @@ class CudaPackage(PackageBase):
variant('cuda_arch',
description='CUDA architecture',
values=spack.variant.any_combination_of(*cuda_arch_values),
sticky=True,
when='+cuda')
# https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#nvcc-examples
@@ -107,10 +108,10 @@ def cuda_flags(arch_list):
# each release of a new cuda minor version.
conflicts('%gcc@10:', when='+cuda ^cuda@:11.0')
conflicts('%gcc@11:', when='+cuda ^cuda@:11.4.0')
conflicts('%gcc@12:', when='+cuda ^cuda@:11.6')
conflicts('%gcc@12:', when='+cuda ^cuda@:11.7')
conflicts('%clang@12:', when='+cuda ^cuda@:11.4.0')
conflicts('%clang@13:', when='+cuda ^cuda@:11.5')
conflicts('%clang@14:', when='+cuda ^cuda@:11.6')
conflicts('%clang@14:', when='+cuda ^cuda@:11.7')
# https://gist.github.com/ax3l/9489132#gistcomment-3860114
conflicts('%gcc@10', when='+cuda ^cuda@:11.4.0')

View File

@@ -3,14 +3,16 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import spack.package
from typing import Optional
import spack.package_base
import spack.util.url
class GNUMirrorPackage(spack.package.PackageBase):
class GNUMirrorPackage(spack.package_base.PackageBase):
"""Mixin that takes care of setting url and mirrors for GNU packages."""
#: Path of the package in a GNU mirror
gnu_mirror_path = None
gnu_mirror_path = None # type: Optional[str]
#: List of GNU mirrors used by Spack
base_mirrors = [

View File

@@ -26,7 +26,7 @@
import spack.error
from spack.build_environment import dso_suffix
from spack.package import InstallError, PackageBase, run_after
from spack.package_base import InstallError, PackageBase, run_after
from spack.util.environment import EnvironmentModifications
from spack.util.executable import Executable
from spack.util.prefix import Prefix
@@ -1115,7 +1115,7 @@ def _setup_dependent_env_callback(
raise InstallError('compilers_of_client arg required for MPI')
def setup_dependent_package(self, module, dep_spec):
# https://spack.readthedocs.io/en/latest/spack.html#spack.package.PackageBase.setup_dependent_package
# https://spack.readthedocs.io/en/latest/spack.html#spack.package_base.PackageBase.setup_dependent_package
# Reminder: "module" refers to Python module.
# Called before the install() method of dependents.
@@ -1259,6 +1259,14 @@ def install(self, spec, prefix):
for f in glob.glob('%s/intel*log' % tmpdir):
install(f, dst)
@run_after('install')
def validate_install(self):
# Sometimes the installer exits with an error but doesn't pass a
# non-zero exit code to spack. Check for the existence of a 'bin'
# directory to catch this error condition.
if not os.path.exists(self.prefix.bin):
raise InstallError('The installer has failed to install anything.')
@run_after('install')
def configure_rpath(self):
if '+rpath' not in self.spec:

View File

@@ -0,0 +1,102 @@
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from llnl.util.filesystem import find
from spack.directives import depends_on, extends
from spack.multimethod import when
from spack.package_base import PackageBase
from spack.util.executable import Executable
class LuaPackage(PackageBase):
"""Specialized class for lua packages"""
phases = ['unpack', 'generate_luarocks_config', 'preprocess', 'install']
#: This attribute is used in UI queries that need to know the build
#: system base class
build_system_class = 'LuaPackage'
list_depth = 1 # LuaRocks requires at least one level of spidering to find versions
depends_on('lua-lang')
extends('lua', when='^lua')
with when('^lua-luajit'):
extends('lua-luajit')
depends_on('luajit')
depends_on('lua-luajit+lualinks')
with when('^lua-luajit-openresty'):
extends('lua-luajit-openresty')
depends_on('luajit')
depends_on('lua-luajit-openresty+lualinks')
def unpack(self, spec, prefix):
if os.path.splitext(self.stage.archive_file)[1] == '.rock':
directory = self.luarocks('unpack', self.stage.archive_file, output=str)
dirlines = directory.split('\n')
# TODO: figure out how to scope this better
os.chdir(dirlines[2])
def _generate_tree_line(self, name, prefix):
return """{{ name = "{name}", root = "{prefix}" }};""".format(
name=name,
prefix=prefix,
)
def _luarocks_config_path(self):
return os.path.join(self.stage.source_path, 'spack_luarocks.lua')
def generate_luarocks_config(self, spec, prefix):
spec = self.spec
table_entries = []
for d in spec.traverse(
deptypes=("build", "run"), deptype_query="run"
):
if d.package.extends(self.extendee_spec):
table_entries.append(self._generate_tree_line(d.name, d.prefix))
path = self._luarocks_config_path()
with open(path, 'w') as config:
config.write(
"""
deps_mode="all"
rocks_trees={{
{}
}}
""".format(
"\n".join(table_entries)
)
)
return path
def setup_build_environment(self, env):
env.set('LUAROCKS_CONFIG', self._luarocks_config_path())
def preprocess(self, spec, prefix):
"""Override this to preprocess source before building with luarocks"""
pass
@property
def lua(self):
return Executable(self.spec['lua-lang'].prefix.bin.lua)
@property
def luarocks(self):
lr = Executable(self.spec['lua-lang'].prefix.bin.luarocks)
return lr
def luarocks_args(self):
return []
def install(self, spec, prefix):
rock = '.'
specs = find('.', '*.rockspec', recursive=False)
if specs:
rock = specs[0]
rocks_args = self.luarocks_args()
rocks_args.append(rock)
self.luarocks('--tree=' + prefix, 'make', *rocks_args)

View File

@@ -11,7 +11,7 @@
from llnl.util.filesystem import working_dir
from spack.directives import conflicts
from spack.package import PackageBase, run_after
from spack.package_base import PackageBase, run_after
class MakefilePackage(PackageBase):

View File

@@ -7,7 +7,7 @@
from llnl.util.filesystem import install_tree, working_dir
from spack.directives import depends_on
from spack.package import PackageBase, run_after
from spack.package_base import PackageBase, run_after
from spack.util.executable import which

View File

@@ -11,7 +11,7 @@
from llnl.util.filesystem import working_dir
from spack.directives import depends_on, variant
from spack.package import PackageBase, run_after
from spack.package_base import PackageBase, run_after
class MesonPackage(PackageBase):

View File

@@ -6,7 +6,7 @@
import inspect
from spack.directives import extends
from spack.package import PackageBase, run_after
from spack.package_base import PackageBase, run_after
class OctavePackage(PackageBase):

View File

@@ -14,7 +14,7 @@
from llnl.util.filesystem import find_headers, find_libraries, join_path
from spack.package import Package
from spack.package_base import Package
from spack.util.environment import EnvironmentModifications
from spack.util.executable import Executable
@@ -30,24 +30,31 @@ class IntelOneApiPackage(Package):
# organization (e.g. University/Company).
redistribute_source = False
@staticmethod
def update_description(cls):
"""Updates oneapi package descriptions with common text."""
text = """ LICENSE INFORMATION: By downloading and using this software, you agree to the terms
and conditions of the software license agreements at https://intel.ly/393CijO."""
cls.__doc__ = cls.__doc__ + text
return cls
@property
def component_dir(self):
"""Subdirectory for this component in the install prefix."""
raise NotImplementedError
@property
def component_path(self):
def component_prefix(self):
"""Path to component <prefix>/<component>/<version>."""
return join_path(self.prefix, self.component_dir, str(self.spec.version))
return self.prefix.join(join_path(self.component_dir, self.spec.version))
def install(self, spec, prefix, installer_path=None):
def install(self, spec, prefix):
self.install_component(basename(self.url_for_version(spec.version)))
def install_component(self, installer_path):
"""Shared install method for all oneapi packages."""
# intel-oneapi-compilers overrides the installer_path when
# installing fortran, which comes from a spack resource
if installer_path is None:
installer_path = basename(self.url_for_version(spec.version))
if platform.system() == 'Linux':
# Intel installer assumes and enforces that all components
# are installed into a single prefix. Spack wants to
@@ -68,7 +75,7 @@ def install(self, spec, prefix, installer_path=None):
bash = Executable('bash')
# Installer writes files in ~/intel set HOME so it goes to prefix
bash.add_default_env('HOME', prefix)
bash.add_default_env('HOME', self.prefix)
# Installer checks $XDG_RUNTIME_DIR/.bootstrapper_lock_file as well
bash.add_default_env('XDG_RUNTIME_DIR',
join_path(self.stage.path, 'runtime'))
@@ -76,13 +83,13 @@ def install(self, spec, prefix, installer_path=None):
bash(installer_path,
'-s', '-a', '-s', '--action', 'install',
'--eula', 'accept',
'--install-dir', prefix)
'--install-dir', self.prefix)
if getpass.getuser() == 'root':
shutil.rmtree('/var/intel/installercache', ignore_errors=True)
# Some installers have a bug and do not return an error code when failing
if not isdir(join_path(prefix, self.component_dir)):
if not isdir(join_path(self.prefix, self.component_dir)):
raise RuntimeError('install failed')
def setup_run_environment(self, env):
@@ -95,7 +102,7 @@ def setup_run_environment(self, env):
$ source {prefix}/{component}/{version}/env/vars.sh
"""
env.extend(EnvironmentModifications.from_sourcing_file(
join_path(self.component_path, 'env', 'vars.sh')))
join_path(self.component_prefix, 'env', 'vars.sh')))
class IntelOneApiLibraryPackage(IntelOneApiPackage):
@@ -109,12 +116,12 @@ class IntelOneApiLibraryPackage(IntelOneApiPackage):
@property
def headers(self):
include_path = join_path(self.component_path, 'include')
include_path = join_path(self.component_prefix, 'include')
return find_headers('*', include_path, recursive=True)
@property
def libs(self):
lib_path = join_path(self.component_path, 'lib', 'intel64')
lib_path = join_path(self.component_prefix, 'lib', 'intel64')
lib_path = lib_path if isdir(lib_path) else dirname(lib_path)
return find_libraries('*', root=lib_path, shared=True, recursive=True)

View File

@@ -10,7 +10,7 @@
from llnl.util.filesystem import filter_file
from spack.directives import extends
from spack.package import PackageBase, run_after
from spack.package_base import PackageBase, run_after
from spack.util.executable import Executable

View File

@@ -6,26 +6,30 @@
import os
import re
import shutil
from typing import Optional
import llnl.util.tty as tty
from llnl.util.filesystem import (
filter_file,
find,
find_all_headers,
find_libraries,
is_nonsymlink_exe_with_shebang,
path_contains_subdirectory,
same_path,
working_dir,
)
from llnl.util.lang import match_predicate
from llnl.util.lang import classproperty, match_predicate
from spack.directives import depends_on, extends
from spack.package import PackageBase, run_after
from spack.error import NoHeadersError, NoLibrariesError
from spack.package_base import PackageBase, run_after
class PythonPackage(PackageBase):
"""Specialized class for packages that are built using pip."""
#: Package name, version, and extension on PyPI
pypi = None
pypi = None # type: Optional[str]
maintainers = ['adamjstewart']
@@ -46,7 +50,7 @@ class PythonPackage(PackageBase):
# package manually
depends_on('py-wheel', type='build')
py_namespace = None
py_namespace = None # type: Optional[str]
@staticmethod
def _std_args(cls):
@@ -73,24 +77,21 @@ def _std_args(cls):
'--no-index',
]
@property
def homepage(self):
if self.pypi:
name = self.pypi.split('/')[0]
@classproperty
def homepage(cls):
if cls.pypi:
name = cls.pypi.split('/')[0]
return 'https://pypi.org/project/' + name + '/'
@property
def url(self):
if self.pypi:
return (
'https://files.pythonhosted.org/packages/source/'
+ self.pypi[0] + '/' + self.pypi
)
@classproperty
def url(cls):
if cls.pypi:
return 'https://files.pythonhosted.org/packages/source/' + cls.pypi[0] + '/' + cls.pypi
@property
def list_url(self):
if self.pypi:
name = self.pypi.split('/')[0]
@classproperty
def list_url(cls):
if cls.pypi:
name = cls.pypi.split('/')[0]
return 'https://pypi.org/simple/' + name + '/'
@property
@@ -177,6 +178,37 @@ def install(self, spec, prefix):
with working_dir(self.build_directory):
pip(*args)
@property
def headers(self):
"""Discover header files in platlib."""
# Headers may be in either location
include = inspect.getmodule(self).include
platlib = inspect.getmodule(self).platlib
headers = find_all_headers(include) + find_all_headers(platlib)
if headers:
return headers
msg = 'Unable to locate {} headers in {} or {}'
raise NoHeadersError(msg.format(self.spec.name, include, platlib))
@property
def libs(self):
"""Discover libraries in platlib."""
# Remove py- prefix in package name
library = 'lib' + self.spec.name[3:].replace('-', '?')
root = inspect.getmodule(self).platlib
for shared in [True, False]:
libs = find_libraries(library, root, shared=shared, recursive=True)
if libs:
return libs
msg = 'Unable to recursively locate {} libraries in {}'
raise NoLibrariesError(msg.format(self.spec.name, root))
# Testing
def test(self):

View File

@@ -9,7 +9,7 @@
from llnl.util.filesystem import working_dir
from spack.directives import depends_on
from spack.package import PackageBase, run_after
from spack.package_base import PackageBase, run_after
class QMakePackage(PackageBase):

View File

@@ -2,12 +2,13 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import inspect
from typing import Optional
import llnl.util.lang as lang
from spack.directives import extends
from spack.package import PackageBase, run_after
from spack.package_base import PackageBase, run_after
class RPackage(PackageBase):
@@ -28,10 +29,10 @@ class RPackage(PackageBase):
# package attributes that can be expanded to set the homepage, url,
# list_url, and git values
# For CRAN packages
cran = None
cran = None # type: Optional[str]
# For Bioconductor packages
bioc = None
bioc = None # type: Optional[str]
maintainers = ['glennpj']
@@ -41,27 +42,27 @@ class RPackage(PackageBase):
extends('r')
@property
def homepage(self):
if self.cran:
return 'https://cloud.r-project.org/package=' + self.cran
elif self.bioc:
return 'https://bioconductor.org/packages/' + self.bioc
@lang.classproperty
def homepage(cls):
if cls.cran:
return 'https://cloud.r-project.org/package=' + cls.cran
elif cls.bioc:
return 'https://bioconductor.org/packages/' + cls.bioc
@property
def url(self):
if self.cran:
@lang.classproperty
def url(cls):
if cls.cran:
return (
'https://cloud.r-project.org/src/contrib/'
+ self.cran + '_' + str(list(self.versions)[0]) + '.tar.gz'
+ cls.cran + '_' + str(list(cls.versions)[0]) + '.tar.gz'
)
@property
def list_url(self):
if self.cran:
@lang.classproperty
def list_url(cls):
if cls.cran:
return (
'https://cloud.r-project.org/src/contrib/Archive/'
+ self.cran + '/'
+ cls.cran + '/'
)
@property

View File

@@ -3,13 +3,15 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from typing import Optional
import llnl.util.lang as lang
import llnl.util.tty as tty
from llnl.util.filesystem import working_dir
from spack.build_environment import SPACK_NO_PARALLEL_MAKE, determine_number_of_jobs
from spack.directives import extends
from spack.package import PackageBase
from spack.package_base import PackageBase
from spack.util.environment import env_flag
from spack.util.executable import Executable, ProcessError
@@ -36,14 +38,14 @@ class RacketPackage(PackageBase):
extends('racket')
pkgs = False
subdirectory = None
name = None
subdirectory = None # type: Optional[str]
name = None # type: Optional[str]
parallel = True
@property
def homepage(self):
if self.pkgs:
return 'https://pkgs.racket-lang.org/package/{0}'.format(self.name)
@lang.classproperty
def homepage(cls):
if cls.pkgs:
return 'https://pkgs.racket-lang.org/package/{0}'.format(cls.name)
@property
def build_directory(self):

View File

@@ -77,7 +77,7 @@
import spack.variant
from spack.directives import conflicts, depends_on, variant
from spack.package import PackageBase
from spack.package_base import PackageBase
class ROCmPackage(PackageBase):
@@ -90,9 +90,10 @@ class ROCmPackage(PackageBase):
# https://llvm.org/docs/AMDGPUUsage.html
# Possible architectures
amdgpu_targets = (
'gfx701', 'gfx801', 'gfx802', 'gfx803',
'gfx900', 'gfx906', 'gfx908', 'gfx90a', 'gfx1010',
'gfx1011', 'gfx1012'
'gfx701', 'gfx801', 'gfx802', 'gfx803', 'gfx900', 'gfx900:xnack-',
'gfx906', 'gfx908', 'gfx90a',
'gfx906:xnack-', 'gfx908:xnack-', 'gfx90a:xnack-', 'gfx90a:xnack+',
'gfx1010', 'gfx1011', 'gfx1012', 'gfx1030', 'gfx1031',
)
variant('rocm', default=False, description='Enable ROCm support')

View File

@@ -7,7 +7,7 @@
import inspect
from spack.directives import extends
from spack.package import PackageBase, run_after
from spack.package_base import PackageBase, run_after
class RubyPackage(PackageBase):

View File

@@ -7,7 +7,7 @@
import inspect
from spack.directives import depends_on
from spack.package import PackageBase, run_after
from spack.package_base import PackageBase, run_after
class SConsPackage(PackageBase):

View File

@@ -11,7 +11,7 @@
from llnl.util.filesystem import find, join_path, working_dir
from spack.directives import depends_on, extends
from spack.package import PackageBase, run_after
from spack.package_base import PackageBase, run_after
class SIPPackage(PackageBase):

View File

@@ -3,15 +3,17 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import spack.package
from typing import Optional
import spack.package_base
import spack.util.url
class SourceforgePackage(spack.package.PackageBase):
class SourceforgePackage(spack.package_base.PackageBase):
"""Mixin that takes care of setting url and mirrors for Sourceforge
packages."""
#: Path of the package in a Sourceforge mirror
sourceforge_mirror_path = None
sourceforge_mirror_path = None # type: Optional[str]
#: List of Sourceforge mirrors used by Spack
base_mirrors = [

View File

@@ -2,16 +2,17 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from typing import Optional
import spack.package
import spack.package_base
import spack.util.url
class SourcewarePackage(spack.package.PackageBase):
class SourcewarePackage(spack.package_base.PackageBase):
"""Mixin that takes care of setting url and mirrors for Sourceware.org
packages."""
#: Path of the package in a Sourceware mirror
sourceware_mirror_path = None
sourceware_mirror_path = None # type: Optional[str]
#: List of Sourceware mirrors used by Spack
base_mirrors = [

View File

@@ -9,7 +9,7 @@
from llnl.util.filesystem import working_dir
from spack.directives import depends_on
from spack.package import PackageBase, run_after
from spack.package_base import PackageBase, run_after
class WafPackage(PackageBase):

View File

@@ -3,15 +3,17 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import spack.package
from typing import Optional
import spack.package_base
import spack.util.url
class XorgPackage(spack.package.PackageBase):
class XorgPackage(spack.package_base.PackageBase):
"""Mixin that takes care of setting url and mirrors for x.org
packages."""
#: Path of the package in a x.org mirror
xorg_mirror_path = None
xorg_mirror_path = None # type: Optional[str]
#: List of x.org mirrors used by Spack
# Note: x.org mirrors are a bit tricky, since many are out-of-sync or off.

View File

@@ -33,7 +33,6 @@
import spack.util.executable as exe
import spack.util.gpg as gpg_util
import spack.util.spack_yaml as syaml
import spack.util.url as url_util
import spack.util.web as web_util
from spack.error import SpackError
from spack.spec import Spec
@@ -42,10 +41,8 @@
'always',
]
SPACK_PR_MIRRORS_ROOT_URL = 's3://spack-binaries-prs'
SPACK_SHARED_PR_MIRROR_URL = url_util.join(SPACK_PR_MIRRORS_ROOT_URL,
'shared_pr_mirror')
TEMP_STORAGE_MIRROR_NAME = 'ci_temporary_mirror'
SPACK_RESERVED_TAGS = ["public", "protected", "notary"]
spack_gpg = spack.main.SpackCommand('gpg')
spack_compiler = spack.main.SpackCommand('compiler')
@@ -90,8 +87,8 @@ def _create_buildgroup(opener, headers, url, project, group_name, group_type):
return build_group_id
def populate_buildgroup(job_names, group_name, project, site,
credentials, cdash_url):
def _populate_buildgroup(job_names, group_name, project, site,
credentials, cdash_url):
url = "{0}/api/v1/buildgroup.php".format(cdash_url)
headers = {
@@ -132,16 +129,30 @@ def populate_buildgroup(job_names, group_name, project, site,
response_code = response.getcode()
if response_code != 200:
msg = 'Error response code ({0}) in populate_buildgroup'.format(
msg = 'Error response code ({0}) in _populate_buildgroup'.format(
response_code)
tty.warn(msg)
def is_main_phase(phase_name):
def _is_main_phase(phase_name):
return True if phase_name == 'specs' else False
def get_job_name(phase, strip_compiler, spec, osarch, build_group):
""" Given the necessary parts, format the gitlab job name
Arguments:
phase (str): Either 'specs' for the main phase, or the name of a
bootstrapping phase
strip_compiler (bool): Should compiler be stripped from job name
spec (spack.spec.Spec): Spec job will build
osarch: Architecture TODO: (this is a spack.spec.ArchSpec,
but sphinx doesn't recognize the type and fails).
build_group (str): Name of build group this job belongs to (a CDash
notion)
Returns: The job name
"""
item_idx = 0
format_str = ''
format_args = []
@@ -163,7 +174,7 @@ def get_job_name(phase, strip_compiler, spec, osarch, build_group):
format_args.append(spec.version)
item_idx += 1
if is_main_phase(phase) is True or strip_compiler is False:
if _is_main_phase(phase) is True or strip_compiler is False:
format_str += ' {{{0}}}'.format(item_idx)
format_args.append(spec.compiler)
item_idx += 1
@@ -180,12 +191,17 @@ def get_job_name(phase, strip_compiler, spec, osarch, build_group):
return format_str.format(*format_args)
def get_cdash_build_name(spec, build_group):
def _get_cdash_build_name(spec, build_group):
return '{0}@{1}%{2} arch={3} ({4})'.format(
spec.name, spec.version, spec.compiler, spec.architecture, build_group)
def get_spec_string(spec):
def _remove_reserved_tags(tags):
"""Convenience function to strip reserved tags from jobs"""
return [tag for tag in tags if tag not in SPACK_RESERVED_TAGS]
def _get_spec_string(spec):
format_elements = [
'{name}{@version}',
'{%compiler}',
@@ -197,15 +213,15 @@ def get_spec_string(spec):
return spec.format(''.join(format_elements))
def format_root_spec(spec, main_phase, strip_compiler):
def _format_root_spec(spec, main_phase, strip_compiler):
if main_phase is False and strip_compiler is True:
return '{0}@{1} arch={2}'.format(
spec.name, spec.version, spec.architecture)
else:
return spec.build_hash()
return spec.dag_hash()
def spec_deps_key(s):
def _spec_deps_key(s):
return '{0}/{1}'.format(s.name, s.dag_hash(7))
@@ -217,8 +233,10 @@ def _add_dependency(spec_label, dep_label, deps):
deps[spec_label].add(dep_label)
def get_spec_dependencies(specs, deps, spec_labels, check_index_only=False):
spec_deps_obj = compute_spec_deps(specs, check_index_only=check_index_only)
def _get_spec_dependencies(specs, deps, spec_labels, check_index_only=False,
mirrors_to_check=None):
spec_deps_obj = _compute_spec_deps(specs, check_index_only=check_index_only,
mirrors_to_check=mirrors_to_check)
if spec_deps_obj:
dependencies = spec_deps_obj['dependencies']
@@ -235,7 +253,7 @@ def get_spec_dependencies(specs, deps, spec_labels, check_index_only=False):
_add_dependency(entry['spec'], entry['depends'], deps)
def stage_spec_jobs(specs, check_index_only=False):
def stage_spec_jobs(specs, check_index_only=False, mirrors_to_check=None):
"""Take a set of release specs and generate a list of "stages", where the
jobs in any stage are dependent only on jobs in previous stages. This
allows us to maximize build parallelism within the gitlab-ci framework.
@@ -247,6 +265,8 @@ def stage_spec_jobs(specs, check_index_only=False):
are up to date on those mirrors. This flag limits that search to
the binary cache indices on those mirrors to speed the process up,
even though there is no garantee the index is up to date.
mirrors_to_checK: Optional mapping giving mirrors to check instead of
any configured mirrors.
Returns: A tuple of information objects describing the specs, dependencies
and stages:
@@ -266,11 +286,11 @@ def stage_spec_jobs(specs, check_index_only=False):
"""
# The convenience method below, "remove_satisfied_deps()", does not modify
# The convenience method below, "_remove_satisfied_deps()", does not modify
# the "deps" parameter. Instead, it returns a new dictionary where only
# dependencies which have not yet been satisfied are included in the
# return value.
def remove_satisfied_deps(deps, satisfied_list):
def _remove_satisfied_deps(deps, satisfied_list):
new_deps = {}
for key, value in iteritems(deps):
@@ -283,8 +303,8 @@ def remove_satisfied_deps(deps, satisfied_list):
deps = {}
spec_labels = {}
get_spec_dependencies(
specs, deps, spec_labels, check_index_only=check_index_only)
_get_spec_dependencies(specs, deps, spec_labels, check_index_only=check_index_only,
mirrors_to_check=mirrors_to_check)
# Save the original deps, as we need to return them at the end of the
# function. In the while loop below, the "dependencies" variable is
@@ -302,7 +322,7 @@ def remove_satisfied_deps(deps, satisfied_list):
# Note that "dependencies" is a dictionary mapping each dependent
# package to the set of not-yet-handled dependencies. The final step
# below removes all the dependencies that are handled by this stage.
dependencies = remove_satisfied_deps(dependencies, next_stage)
dependencies = _remove_satisfied_deps(dependencies, next_stage)
if unstaged:
stages.append(unstaged.copy())
@@ -310,13 +330,12 @@ def remove_satisfied_deps(deps, satisfied_list):
return spec_labels, deps, stages
def print_staging_summary(spec_labels, dependencies, stages):
def _print_staging_summary(spec_labels, dependencies, stages):
if not stages:
return
tty.msg(' Staging summary:')
stage_index = 0
for stage in stages:
tty.msg(' Staging summary ([x] means a job needs rebuilding):')
for stage_index, stage in enumerate(stages):
tty.msg(' stage {0} ({1} jobs):'.format(stage_index, len(stage)))
for job in sorted(stage):
@@ -324,12 +343,10 @@ def print_staging_summary(spec_labels, dependencies, stages):
tty.msg(' [{1}] {0} -> {2}'.format(
job,
'x' if spec_labels[job]['needs_rebuild'] else ' ',
get_spec_string(s)))
stage_index += 1
_get_spec_string(s)))
def compute_spec_deps(spec_list, check_index_only=False):
def _compute_spec_deps(spec_list, check_index_only=False, mirrors_to_check=None):
"""
Computes all the dependencies for the spec(s) and generates a JSON
object which provides both a list of unique spec names as well as a
@@ -402,17 +419,17 @@ def append_dep(s, d):
continue
up_to_date_mirrors = bindist.get_mirrors_for_spec(
spec=s, full_hash_match=True, index_only=check_index_only)
spec=s, mirrors_to_check=mirrors_to_check, index_only=check_index_only)
skey = spec_deps_key(s)
skey = _spec_deps_key(s)
spec_labels[skey] = {
'spec': get_spec_string(s),
'spec': _get_spec_string(s),
'root': root_spec,
'needs_rebuild': not up_to_date_mirrors,
}
for d in s.dependencies(deptype=all):
dkey = spec_deps_key(d)
dkey = _spec_deps_key(d)
if d.external:
tty.msg('Will not stage external dep: {0}'.format(d))
continue
@@ -435,11 +452,11 @@ def append_dep(s, d):
return deps_json_obj
def spec_matches(spec, match_string):
def _spec_matches(spec, match_string):
return spec.satisfies(match_string)
def copy_attributes(attrs_list, src_dict, dest_dict):
def _copy_attributes(attrs_list, src_dict, dest_dict):
for runner_attr in attrs_list:
if runner_attr in src_dict:
if runner_attr in dest_dict and runner_attr == 'tags':
@@ -460,7 +477,7 @@ def copy_attributes(attrs_list, src_dict, dest_dict):
dest_dict[runner_attr] = copy.deepcopy(src_dict[runner_attr])
def find_matching_config(spec, gitlab_ci):
def _find_matching_config(spec, gitlab_ci):
runner_attributes = {}
overridable_attrs = [
'image',
@@ -471,16 +488,16 @@ def find_matching_config(spec, gitlab_ci):
'after_script',
]
copy_attributes(overridable_attrs, gitlab_ci, runner_attributes)
_copy_attributes(overridable_attrs, gitlab_ci, runner_attributes)
ci_mappings = gitlab_ci['mappings']
for ci_mapping in ci_mappings:
for match_string in ci_mapping['match']:
if spec_matches(spec, match_string):
if _spec_matches(spec, match_string):
if 'runner-attributes' in ci_mapping:
copy_attributes(overridable_attrs,
ci_mapping['runner-attributes'],
runner_attributes)
_copy_attributes(overridable_attrs,
ci_mapping['runner-attributes'],
runner_attributes)
return runner_attributes
else:
return None
@@ -488,16 +505,16 @@ def find_matching_config(spec, gitlab_ci):
return runner_attributes
def pkg_name_from_spec_label(spec_label):
def _pkg_name_from_spec_label(spec_label):
return spec_label[:spec_label.index('/')]
def format_job_needs(phase_name, strip_compilers, dep_jobs,
osname, build_group, prune_dag, stage_spec_dict,
enable_artifacts_buildcache):
def _format_job_needs(phase_name, strip_compilers, dep_jobs,
osname, build_group, prune_dag, stage_spec_dict,
enable_artifacts_buildcache):
needs_list = []
for dep_job in dep_jobs:
dep_spec_key = spec_deps_key(dep_job)
dep_spec_key = _spec_deps_key(dep_job)
dep_spec_info = stage_spec_dict[dep_spec_key]
if not prune_dag or dep_spec_info['needs_rebuild']:
@@ -591,7 +608,38 @@ def get_spec_filter_list(env, affected_pkgs, dependencies=True, dependents=True)
def generate_gitlab_ci_yaml(env, print_summary, output_file,
prune_dag=False, check_index_only=False,
run_optimizer=False, use_dependencies=False,
artifacts_root=None):
artifacts_root=None, remote_mirror_override=None):
""" Generate a gitlab yaml file to run a dynamic child pipeline from
the spec matrix in the active environment.
Arguments:
env (spack.environment.Environment): Activated environment object
which must contain a gitlab-ci section describing how to map
specs to runners
print_summary (bool): Should we print a summary of all the jobs in
the stages in which they were placed.
output_file (str): File path where generated file should be written
prune_dag (bool): If True, do not generate jobs for specs already
exist built on the mirror.
check_index_only (bool): If True, attempt to fetch the mirror index
and only use that to determine whether built specs on the mirror
this mode results in faster yaml generation time). Otherwise, also
check each spec directly by url (useful if there is no index or it
might be out of date).
run_optimizer (bool): If True, post-process the generated yaml to try
try to reduce the size (attempts to collect repeated configuration
and replace with definitions).)
use_dependencies (bool): If true, use "dependencies" rather than "needs"
("needs" allows DAG scheduling). Useful if gitlab instance cannot
be configured to handle more than a few "needs" per job.
artifacts_root (str): Path where artifacts like logs, environment
files (spack.yaml, spack.lock), etc should be written. GitLab
requires this to be within the project directory.
remote_mirror_override (str): Typically only needed when one spack.yaml
is used to populate several mirrors with binaries, based on some
criteria. Spack protected pipelines populate different mirrors based
on branch name, facilitated by this option.
"""
with spack.concretize.disable_compiler_existence_check():
with env.write_transaction():
env.concretize()
@@ -640,17 +688,19 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
for s in affected_specs:
tty.debug(' {0}'.format(s.name))
generate_job_name = os.environ.get('CI_JOB_NAME', None)
parent_pipeline_id = os.environ.get('CI_PIPELINE_ID', None)
# Downstream jobs will "need" (depend on, for both scheduling and
# artifacts, which include spack.lock file) this pipeline generation
# job by both name and pipeline id. If those environment variables
# do not exist, then maybe this is just running in a shell, in which
# case, there is no expectation gitlab will ever run the generated
# pipeline and those environment variables do not matter.
generate_job_name = os.environ.get('CI_JOB_NAME', 'job-does-not-exist')
parent_pipeline_id = os.environ.get('CI_PIPELINE_ID', 'pipeline-does-not-exist')
# Values: "spack_pull_request", "spack_protected_branch", or not set
spack_pipeline_type = os.environ.get('SPACK_PIPELINE_TYPE', None)
is_pr_pipeline = spack_pipeline_type == 'spack_pull_request'
spack_pr_branch = os.environ.get('SPACK_PR_BRANCH', None)
pr_mirror_url = None
if spack_pr_branch:
pr_mirror_url = url_util.join(SPACK_PR_MIRRORS_ROOT_URL,
spack_pr_branch)
spack_buildcache_copy = os.environ.get('SPACK_COPY_BUILDCACHE', None)
if 'mirrors' not in yaml_root or len(yaml_root['mirrors'].values()) < 1:
tty.die('spack ci generate requires an env containing a mirror')
@@ -705,14 +755,29 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
'strip-compilers': False,
})
# Add per-PR mirror (and shared PR mirror) if enabled, as some specs might
# be up to date in one of those and thus not need to be rebuilt.
if pr_mirror_url:
# If a remote mirror override (alternate buildcache destination) was
# specified, add it here in case it has already built hashes we might
# generate.
mirrors_to_check = None
if remote_mirror_override:
if spack_pipeline_type == 'spack_protected_branch':
# Overriding the main mirror in this case might result
# in skipping jobs on a release pipeline because specs are
# up to date in develop. Eventually we want to notice and take
# advantage of this by scheduling a job to copy the spec from
# develop to the release, but until we have that, this makes
# sure we schedule a rebuild job if the spec isn't already in
# override mirror.
mirrors_to_check = {
'override': remote_mirror_override
}
# If we have a remote override and we want generate pipeline using
# --check-index-only, then the override mirror needs to be added to
# the configured mirrors when bindist.update() is run, or else we
# won't fetch its index and include in our local cache.
spack.mirror.add(
'ci_pr_mirror', pr_mirror_url, cfg.default_modify_scope())
spack.mirror.add('ci_shared_pr_mirror',
SPACK_SHARED_PR_MIRROR_URL,
cfg.default_modify_scope())
'ci_pr_mirror', remote_mirror_override, cfg.default_modify_scope())
pipeline_artifacts_dir = artifacts_root
if not pipeline_artifacts_dir:
@@ -758,7 +823,7 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
user_artifacts_dir, ci_project_dir)
# Speed up staging by first fetching binary indices from all mirrors
# (including the per-PR mirror we may have just added above).
# (including the override mirror we may have just added above).
try:
bindist.binary_index.update()
except bindist.FetchCacheError as e:
@@ -787,10 +852,11 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
phase_spec.concretize()
staged_phases[phase_name] = stage_spec_jobs(
concrete_phase_specs,
check_index_only=check_index_only)
check_index_only=check_index_only,
mirrors_to_check=mirrors_to_check)
finally:
# Clean up PR mirror if enabled
if pr_mirror_url:
# Clean up remote mirror override if enabled
if remote_mirror_override:
spack.mirror.remove('ci_pr_mirror', cfg.default_modify_scope())
all_job_names = []
@@ -804,7 +870,7 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
max_needs_job = ''
# If this is configured, spack will fail "spack ci generate" if it
# generates any full hash which exists under the broken specs url.
# generates any hash which exists under the broken specs url.
broken_spec_urls = None
if broken_specs_url:
if broken_specs_url.startswith('http'):
@@ -819,7 +885,7 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
phase_name = phase['name']
strip_compilers = phase['strip-compilers']
main_phase = is_main_phase(phase_name)
main_phase = _is_main_phase(phase_name)
spec_labels, dependencies, stages = staged_phases[phase_name]
for stage_jobs in stages:
@@ -830,11 +896,9 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
for spec_label in stage_jobs:
spec_record = spec_labels[spec_label]
root_spec = spec_record['rootSpec']
pkg_name = pkg_name_from_spec_label(spec_label)
pkg_name = _pkg_name_from_spec_label(spec_label)
release_spec = root_spec[pkg_name]
release_spec_full_hash = release_spec.full_hash()
release_spec_dag_hash = release_spec.dag_hash()
release_spec_build_hash = release_spec.build_hash()
if prune_untouched_packages:
if release_spec not in affected_specs:
@@ -843,7 +907,7 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
spec_record['needs_rebuild'] = False
continue
runner_attribs = find_matching_config(
runner_attribs = _find_matching_config(
release_spec, gitlab_ci)
if not runner_attribs:
@@ -853,6 +917,14 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
tags = [tag for tag in runner_attribs['tags']]
if spack_pipeline_type is not None:
# For spack pipelines "public" and "protected" are reserved tags
tags = _remove_reserved_tags(tags)
if spack_pipeline_type == 'spack_protected_branch':
tags.extend(['aws', 'protected'])
elif spack_pipeline_type == 'spack_pull_request':
tags.extend(['public'])
variables = {}
if 'variables' in runner_attribs:
variables.update(runner_attribs['variables'])
@@ -897,15 +969,13 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
compiler_action = 'NONE'
if len(phases) > 1:
compiler_action = 'FIND_ANY'
if is_main_phase(phase_name):
if _is_main_phase(phase_name):
compiler_action = 'INSTALL_MISSING'
job_vars = {
'SPACK_ROOT_SPEC': format_root_spec(
'SPACK_ROOT_SPEC': _format_root_spec(
root_spec, main_phase, strip_compilers),
'SPACK_JOB_SPEC_DAG_HASH': release_spec_dag_hash,
'SPACK_JOB_SPEC_BUILD_HASH': release_spec_build_hash,
'SPACK_JOB_SPEC_FULL_HASH': release_spec_full_hash,
'SPACK_JOB_SPEC_PKG_NAME': release_spec.name,
'SPACK_COMPILER_ACTION': compiler_action
}
@@ -924,15 +994,15 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
# purposes, so we only get the direct dependencies.
dep_jobs = []
for dep_label in dependencies[spec_label]:
dep_pkg = pkg_name_from_spec_label(dep_label)
dep_pkg = _pkg_name_from_spec_label(dep_label)
dep_root = spec_labels[dep_label]['rootSpec']
dep_jobs.append(dep_root[dep_pkg])
job_dependencies.extend(
format_job_needs(phase_name, strip_compilers,
dep_jobs, osname, build_group,
prune_dag, spec_labels,
enable_artifacts_buildcache))
_format_job_needs(phase_name, strip_compilers,
dep_jobs, osname, build_group,
prune_dag, spec_labels,
enable_artifacts_buildcache))
rebuild_spec = spec_record['needs_rebuild']
@@ -943,7 +1013,7 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
# compiler we are supposed to use is listed in any of the
# bootstrap spec lists, then we will add more dependencies to
# the job (that compiler and maybe it's dependencies as well).
if is_main_phase(phase_name):
if _is_main_phase(phase_name):
spec_arch_family = (release_spec.architecture
.target
.microarchitecture
@@ -971,7 +1041,7 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
# be rebuilt if the compiler targeted to build it
# needs to be rebuilt.
bs_specs, _, _ = staged_phases[bs['phase-name']]
c_spec_key = spec_deps_key(c_spec)
c_spec_key = _spec_deps_key(c_spec)
rbld_comp = bs_specs[c_spec_key]['needs_rebuild']
rebuild_spec = rebuild_spec or rbld_comp
# Also update record so dependents do not fail to
@@ -985,14 +1055,14 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
]
job_dependencies.extend(
format_job_needs(bs['phase-name'],
bs['strip-compilers'],
dep_jobs,
str(bs_arch),
build_group,
prune_dag,
bs_specs,
enable_artifacts_buildcache))
_format_job_needs(bs['phase-name'],
bs['strip-compilers'],
dep_jobs,
str(bs_arch),
build_group,
prune_dag,
bs_specs,
enable_artifacts_buildcache))
else:
debug_msg = ''.join([
'Considered compiler {0} for spec ',
@@ -1009,9 +1079,9 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
continue
if (broken_spec_urls is not None and
release_spec_full_hash in broken_spec_urls):
release_spec_dag_hash in broken_spec_urls):
known_broken_specs_encountered.append('{0} ({1})'.format(
release_spec, release_spec_full_hash))
release_spec, release_spec_dag_hash))
if artifacts_root:
job_dependencies.append({
@@ -1022,7 +1092,7 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
job_vars['SPACK_SPEC_NEEDS_REBUILD'] = str(rebuild_spec)
if enable_cdash_reporting:
cdash_build_name = get_cdash_build_name(
cdash_build_name = _get_cdash_build_name(
release_spec, build_group)
all_job_names.append(cdash_build_name)
job_vars['SPACK_CDASH_BUILD_NAME'] = cdash_build_name
@@ -1087,7 +1157,7 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
phase_name = phase['name']
tty.msg('Stages for phase "{0}"'.format(phase_name))
phase_stages = staged_phases[phase_name]
print_staging_summary(*phase_stages)
_print_staging_summary(*phase_stages)
tty.debug('{0} build jobs generated in {1} stages'.format(
job_id, stage_id))
@@ -1099,8 +1169,8 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
# Use "all_job_names" to populate the build group for this set
if enable_cdash_reporting and cdash_auth_token:
try:
populate_buildgroup(all_job_names, build_group, cdash_project,
cdash_site, cdash_auth_token, cdash_url)
_populate_buildgroup(all_job_names, build_group, cdash_project,
cdash_site, cdash_auth_token, cdash_url)
except (SpackError, HTTPError, URLError) as err:
tty.warn('Problem populating buildgroup: {0}'.format(err))
else:
@@ -1136,9 +1206,13 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
cleanup_job = {}
if service_job_config:
copy_attributes(default_attrs,
service_job_config,
cleanup_job)
_copy_attributes(default_attrs,
service_job_config,
cleanup_job)
if 'tags' in cleanup_job:
service_tags = _remove_reserved_tags(cleanup_job['tags'])
cleanup_job['tags'] = service_tags
cleanup_job['stage'] = 'cleanup-temp-storage'
cleanup_job['script'] = [
@@ -1147,22 +1221,91 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
]
cleanup_job['when'] = 'always'
cleanup_job['retry'] = service_job_retries
cleanup_job['interruptible'] = True
output_object['cleanup'] = cleanup_job
if ('signing-job-attributes' in gitlab_ci and
spack_pipeline_type == 'spack_protected_branch'):
# External signing: generate a job to check and sign binary pkgs
stage_names.append('stage-sign-pkgs')
signing_job_config = gitlab_ci['signing-job-attributes']
signing_job = {}
signing_job_attrs_to_copy = [
'image',
'tags',
'variables',
'before_script',
'script',
'after_script',
]
_copy_attributes(signing_job_attrs_to_copy,
signing_job_config,
signing_job)
signing_job_tags = []
if 'tags' in signing_job:
signing_job_tags = _remove_reserved_tags(signing_job['tags'])
for tag in ['aws', 'protected', 'notary']:
if tag not in signing_job_tags:
signing_job_tags.append(tag)
signing_job['tags'] = signing_job_tags
signing_job['stage'] = 'stage-sign-pkgs'
signing_job['when'] = 'always'
signing_job['retry'] = {
'max': 2,
'when': ['always']
}
signing_job['interruptible'] = True
output_object['sign-pkgs'] = signing_job
if spack_buildcache_copy:
# Generate a job to copy the contents from wherever the builds are getting
# pushed to the url specified in the "SPACK_BUILDCACHE_COPY" environment
# variable.
src_url = remote_mirror_override or remote_mirror_url
dest_url = spack_buildcache_copy
stage_names.append('stage-copy-buildcache')
copy_job = {
'stage': 'stage-copy-buildcache',
'tags': ['spack', 'public', 'medium', 'aws', 'x86_64'],
'image': 'ghcr.io/spack/python-aws-bash:0.0.1',
'when': 'on_success',
'interruptible': True,
'retry': service_job_retries,
'script': [
'. ./share/spack/setup-env.sh',
'spack --version',
'aws s3 sync --exclude *index.json* --exclude *pgp* {0} {1}'.format(
src_url, dest_url)
]
}
output_object['copy-mirror'] = copy_job
if rebuild_index_enabled:
# Add a final job to regenerate the index
stage_names.append('stage-rebuild-index')
final_job = {}
if service_job_config:
copy_attributes(default_attrs,
service_job_config,
final_job)
_copy_attributes(default_attrs,
service_job_config,
final_job)
if 'tags' in final_job:
service_tags = _remove_reserved_tags(final_job['tags'])
final_job['tags'] = service_tags
index_target_mirror = mirror_urls[0]
if is_pr_pipeline:
index_target_mirror = pr_mirror_url
if remote_mirror_override:
index_target_mirror = remote_mirror_override
final_job['stage'] = 'stage-rebuild-index'
final_job['script'] = [
@@ -1171,6 +1314,7 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
]
final_job['when'] = 'always'
final_job['retry'] = service_job_retries
final_job['interruptible'] = True
output_object['rebuild-index'] = final_job
@@ -1203,8 +1347,9 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
'SPACK_PIPELINE_TYPE': str(spack_pipeline_type)
}
if pr_mirror_url:
output_object['variables']['SPACK_PR_MIRROR_URL'] = pr_mirror_url
if remote_mirror_override:
(output_object['variables']
['SPACK_REMOTE_MIRROR_OVERRIDE']) = remote_mirror_override
spack_stack_name = os.environ.get('SPACK_CI_STACK_NAME', None)
if spack_stack_name:
@@ -1229,9 +1374,9 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
noop_job = {}
if service_job_config:
copy_attributes(default_attrs,
service_job_config,
noop_job)
_copy_attributes(default_attrs,
service_job_config,
noop_job)
if 'script' not in noop_job:
noop_job['script'] = [
@@ -1254,7 +1399,7 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
outf.write(syaml.dump_config(sorted_output, default_flow_style=True))
def url_encode_string(input_string):
def _url_encode_string(input_string):
encoded_keyval = urlencode({'donotcare': input_string})
eq_idx = encoded_keyval.find('=') + 1
encoded_value = encoded_keyval[eq_idx:]
@@ -1262,6 +1407,17 @@ def url_encode_string(input_string):
def import_signing_key(base64_signing_key):
""" Given Base64-encoded gpg key, decode and import it to use for
signing packages.
Arguments:
base64_signing_key (str): A gpg key including the secret key,
armor-exported and base64 encoded, so it can be stored in a
gitlab CI variable. For an example of how to generate such
a key, see:
https://github.com/spack/spack-infrastructure/blob/main/gitlab-docker/files/gen-key
"""
if not base64_signing_key:
tty.warn('No key found for signing/verifying packages')
return
@@ -1299,14 +1455,34 @@ def import_signing_key(base64_signing_key):
def can_sign_binaries():
""" Utility method to determine if this spack instance is capable of
signing binary packages. This is currently only possible if the
spack gpg keystore contains exactly one secret key."""
return len(gpg_util.signing_keys()) == 1
def can_verify_binaries():
""" Utility method to determin if this spack instance is capable (at
least in theory) of verifying signed binaries."""
return len(gpg_util.public_keys()) >= 1
def configure_compilers(compiler_action, scope=None):
""" Depending on the compiler_action parameter, either turn on the
install_missing_compilers config option, or find spack compilers,
or do nothing. This is used from rebuild jobs in bootstrapping
pipelines, where in the bootsrapping phase we would pass
FIND_ANY in case of compiler-agnostic bootstrapping, while in the
spec building phase we would pass INSTALL_MISSING in order to get
spack to use the compiler which was built in the previous phase and
is now sitting in the binary mirror.
Arguments:
compiler_action (str): 'FIND_ANY', 'INSTALL_MISSING' have meanings
described above. Any other value essentially results in a no-op.
scope (spack.config.ConfigScope): Optional. The scope in which to look for
compilers, in case 'FIND_ANY' was provided.
"""
if compiler_action == 'INSTALL_MISSING':
tty.debug('Make sure bootstrapped compiler will be installed')
config = cfg.get('config')
@@ -1330,6 +1506,35 @@ def configure_compilers(compiler_action, scope=None):
def get_concrete_specs(env, root_spec, job_name, compiler_action):
""" Build a dictionary of concrete specs relevant to a particular
rebuild job. This includes the root spec and the spec to be
rebuilt (which could be the same).
Arguments:
env (spack.environment.Environment): Activated spack environment
used to get concrete root spec by hash in case compiler_action
is anthing other than FIND_ANY.
root_spec (str): If compiler_action is FIND_ANY root_spec is
a string representation which can be turned directly into
a spec, otherwise, it's a hash used to index the activated
spack environment.
job_name (str): Name of package to be built, used to index the
concrete root spec and produce the concrete spec to be
built.
compiler_action (str): Determines how to interpret the root_spec
parameter, either as a string representation as a hash.
Returns:
.. code-block:: JSON
{
"root": "<spec>",
"<job-pkg-name>": "<spec>",
}
"""
spec_map = {
'root': None,
}
@@ -1376,6 +1581,19 @@ def _push_mirror_contents(env, specfile_path, sign_binaries, mirror_url):
def push_mirror_contents(env, specfile_path, mirror_url, sign_binaries):
""" Push one or more binary packages to the mirror.
Arguments:
env (spack.environment.Environment): Optional environment. If
provided, it is used to make sure binary package to push
exists in the environment.
specfile_path (str): Path to spec.json corresponding to built pkg
to push.
mirror_url (str): Base url of target mirror
sign_binaries (bool): If True, spack will attempt to sign binary
package before pushing.
"""
try:
_push_mirror_contents(env, specfile_path, sign_binaries, mirror_url)
except Exception as inst:
@@ -1400,9 +1618,19 @@ def push_mirror_contents(env, specfile_path, mirror_url, sign_binaries):
def copy_stage_logs_to_artifacts(job_spec, job_log_dir):
""" Looks for spack-build-out.txt in the stage directory of the given
job_spec, and attempts to copy the file into the directory given
by job_log_dir.
Arguments:
job_spec (spack.spec.Spec): Spec associated with spack install log
job_log_dir (str): Path into which build log should be copied
"""
try:
job_pkg = spack.repo.get(job_spec)
tty.debug('job package: {0}'.format(job_pkg))
pkg_cls = spack.repo.path.get_pkg_class(job_spec.name)
job_pkg = pkg_cls(job_spec)
tty.debug('job package: {0.fullname}'.format(job_pkg))
stage_dir = job_pkg.stage.path
tty.debug('stage dir: {0}'.format(stage_dir))
build_out_src = os.path.join(stage_dir, 'spack-build-out.txt')
@@ -1418,6 +1646,14 @@ def copy_stage_logs_to_artifacts(job_spec, job_log_dir):
def download_and_extract_artifacts(url, work_dir):
""" Look for gitlab artifacts.zip at the given url, and attempt to download
and extract the contents into the given work_dir
Arguments:
url (str): Complete url to artifacts.zip file
work_dir (str): Path to destination where artifacts should be extracted
"""
tty.msg('Fetching artifacts from: {0}\n'.format(url))
headers = {
@@ -1457,6 +1693,8 @@ def download_and_extract_artifacts(url, work_dir):
def get_spack_info():
""" If spack is running from a git repo, return the most recent git log
entry, otherwise, return a string containing the spack version. """
git_path = os.path.join(spack.paths.prefix, ".git")
if os.path.exists(git_path):
git = exe.which("git")
@@ -1472,6 +1710,23 @@ def get_spack_info():
def setup_spack_repro_version(repro_dir, checkout_commit, merge_commit=None):
""" Look in the local spack clone to find the checkout_commit, and if
provided, the merge_commit given as arguments. If those commits can
be found locally, then clone spack and attempt to recreate a merge
commit with the same parent commits as tested in gitlab. This looks
something like 1) git clone repo && cd repo 2) git checkout
<checkout_commit> 3) git merge <merge_commit>. If there is no
merge_commit provided, then skip step (3).
Arguments:
repro_dir (str): Location where spack should be cloned
checkout_commit (str): SHA of PR branch commit
merge_commit (str): SHA of target branch parent
Returns: True if git repo state was successfully recreated, or False
otherwise.
"""
# figure out the path to the spack git version being used for the
# reproduction
print('checkout_commit: {0}'.format(checkout_commit))
@@ -1513,7 +1768,7 @@ def setup_spack_repro_version(repro_dir, checkout_commit, merge_commit=None):
fail_on_error=False)
if git.returncode != 0:
tty.error('Unable to clone your local spac repo:')
tty.error('Unable to clone your local spack repo:')
tty.msg(clone_out)
return False
@@ -1546,6 +1801,18 @@ def setup_spack_repro_version(repro_dir, checkout_commit, merge_commit=None):
def reproduce_ci_job(url, work_dir):
""" Given a url to gitlab artifacts.zip from a failed 'spack ci rebuild' job,
attempt to setup an environment in which the failure can be reproduced
locally. This entails the following:
First download and extract artifacts. Then look through those artifacts
to glean some information needed for the reproduer (e.g. one of the
artifacts contains information about the version of spack tested by
gitlab, another is the generated pipeline yaml containing details
of the job like the docker image used to run it). The output of this
function is a set of printed instructions for running docker and then
commands to run to reproduce the build once inside the container.
"""
download_and_extract_artifacts(url, work_dir)
lock_file = fs.find(work_dir, 'spack.lock')[0]

View File

@@ -8,7 +8,10 @@
import argparse
import os
import re
import shlex
import sys
from textwrap import dedent
from typing import List, Tuple
import ruamel.yaml as yaml
import six
@@ -147,6 +150,58 @@ def get_command(cmd_name):
return getattr(get_module(cmd_name), pname)
class _UnquotedFlags(object):
"""Use a heuristic in `.extract()` to detect whether the user is trying to set
multiple flags like the docker ENV attribute allows (e.g. 'cflags=-Os -pipe').
If the heuristic finds a match (which can be checked with `__bool__()`), a warning
message explaining how to quote multiple flags correctly can be generated with
`.report()`.
"""
flags_arg_pattern = re.compile(
r'^({0})=([^\'"].*)$'.format(
'|'.join(spack.spec.FlagMap.valid_compiler_flags()),
))
def __init__(self, all_unquoted_flag_pairs):
# type: (List[Tuple[re.Match, str]]) -> None
self._flag_pairs = all_unquoted_flag_pairs
def __bool__(self):
# type: () -> bool
return bool(self._flag_pairs)
@classmethod
def extract(cls, sargs):
# type: (str) -> _UnquotedFlags
all_unquoted_flag_pairs = [] # type: List[Tuple[re.Match, str]]
prev_flags_arg = None
for arg in shlex.split(sargs):
if prev_flags_arg is not None:
all_unquoted_flag_pairs.append((prev_flags_arg, arg))
prev_flags_arg = cls.flags_arg_pattern.match(arg)
return cls(all_unquoted_flag_pairs)
def report(self):
# type: () -> str
single_errors = [
'({0}) {1} {2} => {3}'.format(
i + 1, match.group(0), next_arg,
'{0}="{1} {2}"'.format(match.group(1), match.group(2), next_arg),
)
for i, (match, next_arg) in enumerate(self._flag_pairs)
]
return dedent("""\
Some compiler or linker flags were provided without quoting their arguments,
which now causes spack to try to parse the *next* argument as a spec component
such as a variant instead of an additional compiler or linker flag. If the
intent was to set multiple flags, try quoting them together as described below.
Possible flag quotation errors (with the correctly-quoted version after the =>):
{0}""").format('\n'.join(single_errors))
def parse_specs(args, **kwargs):
"""Convenience function for parsing arguments from specs. Handles common
exceptions and dies if there are errors.
@@ -155,29 +210,28 @@ def parse_specs(args, **kwargs):
normalize = kwargs.get('normalize', False)
tests = kwargs.get('tests', False)
sargs = args
if not isinstance(args, six.string_types):
sargs = ' '.join(args)
unquoted_flags = _UnquotedFlags.extract(sargs)
try:
sargs = args
if not isinstance(args, six.string_types):
sargs = ' '.join(spack.util.string.quote(args))
specs = spack.spec.parse(sargs)
for spec in specs:
if concretize:
spec.concretize(tests=tests) # implies normalize
elif normalize:
spec.normalize(tests=tests)
return specs
except spack.spec.SpecParseError as e:
msg = e.message + "\n" + str(e.string) + "\n"
msg += (e.pos + 2) * " " + "^"
raise spack.error.SpackError(msg)
except spack.error.SpecError as e:
msg = e.message
if e.long_message:
msg += e.long_message
if unquoted_flags:
msg += '\n\n'
msg += unquoted_flags.report()
raise spack.error.SpackError(msg)

View File

@@ -1,116 +0,0 @@
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import sys
import llnl.util.tty as tty
import spack.analyzers
import spack.build_environment
import spack.cmd
import spack.cmd.common.arguments as arguments
import spack.environment as ev
import spack.fetch_strategy
import spack.monitor
import spack.paths
import spack.report
description = "run analyzers on installed packages"
section = "analysis"
level = "long"
def setup_parser(subparser):
sp = subparser.add_subparsers(metavar='SUBCOMMAND', dest='analyze_command')
sp.add_parser('list-analyzers',
description="list available analyzers",
help="show list of analyzers that are available to run.")
# This adds the monitor group to the subparser
spack.monitor.get_monitor_group(subparser)
# Run Parser
run_parser = sp.add_parser('run', description="run an analyzer",
help="provide the name of the analyzer to run.")
run_parser.add_argument(
'--overwrite', action='store_true',
help="re-analyze even if the output file already exists.")
run_parser.add_argument(
'-p', '--path', default=None,
dest='path',
help="write output to a different directory than ~/.spack/analyzers")
run_parser.add_argument(
'-a', '--analyzers', default=None,
dest="analyzers", action="append",
help="add an analyzer (defaults to all available)")
arguments.add_common_arguments(run_parser, ['spec'])
def analyze_spec(spec, analyzers=None, outdir=None, monitor=None, overwrite=False):
"""
Do an analysis for a spec, optionally adding monitoring.
We also allow the user to specify a custom output directory.
analyze_spec(spec, args.analyzers, args.outdir, monitor)
Args:
spec (spack.spec.Spec): spec object of installed package
analyzers (list): list of analyzer (keys) to run
monitor (spack.monitor.SpackMonitorClient): a monitor client
overwrite (bool): overwrite result if already exists
"""
analyzers = analyzers or list(spack.analyzers.analyzer_types.keys())
# Load the build environment from the spec install directory, and send
# the spec to the monitor if it's not known
if monitor:
monitor.load_build_environment(spec)
monitor.new_configuration([spec])
for name in analyzers:
# Instantiate the analyzer with the spec and outdir
analyzer = spack.analyzers.get_analyzer(name)(spec, outdir)
# Run the analyzer to get a json result - results are returned as
# a dictionary with a key corresponding to the analyzer type, so
# we can just update the data
result = analyzer.run()
# Send the result. We do them separately because:
# 1. each analyzer might have differently organized output
# 2. the size of a result can be large
analyzer.save_result(result, overwrite)
def analyze(parser, args, **kwargs):
# If the user wants to list analyzers, do so and exit
if args.analyze_command == "list-analyzers":
spack.analyzers.list_all()
sys.exit(0)
# handle active environment, if any
env = ev.active_environment()
# Get an disambiguate spec (we should only have one)
specs = spack.cmd.parse_specs(args.spec)
if not specs:
tty.die("You must provide one or more specs to analyze.")
spec = spack.cmd.disambiguate_spec(specs[0], env)
# The user wants to monitor builds using github.com/spack/spack-monitor
# It is instantianted once here, and then available at spack.monitor.cli
monitor = None
if args.use_monitor:
monitor = spack.monitor.get_client(
host=args.monitor_host,
prefix=args.monitor_prefix,
)
# Run the analysis
analyze_spec(spec, args.analyzers, args.path, monitor, args.overwrite)

View File

@@ -99,8 +99,8 @@ def blame(parser, args):
blame_file = path
if not blame_file:
pkg = spack.repo.get(args.package_or_file)
blame_file = pkg.module.__file__.rstrip('c') # .pyc -> .py
pkg_cls = spack.repo.path.get_pkg_class(args.package_or_file)
blame_file = pkg_cls.module.__file__.rstrip('c') # .pyc -> .py
# get git blame for the package
with working_dir(spack.paths.prefix):

View File

@@ -6,7 +6,9 @@
import os.path
import shutil
import tempfile
import llnl.util.filesystem
import llnl.util.tty
import llnl.util.tty.color
@@ -15,6 +17,9 @@
import spack.cmd.common.arguments
import spack.config
import spack.main
import spack.mirror
import spack.spec
import spack.stage
import spack.util.path
description = "manage bootstrap configuration"
@@ -22,6 +27,38 @@
level = "long"
# Tarball to be downloaded if binary packages are requested in a local mirror
BINARY_TARBALL = 'https://github.com/spack/spack-bootstrap-mirrors/releases/download/v0.2/bootstrap-buildcache.tar.gz'
#: Subdirectory where to create the mirror
LOCAL_MIRROR_DIR = 'bootstrap_cache'
# Metadata for a generated binary mirror
BINARY_METADATA = {
'type': 'buildcache',
'description': ('Buildcache copied from a public tarball available on Github.'
'The sha256 checksum of binaries is checked before installation.'),
'info': {
'url': os.path.join('..', '..', LOCAL_MIRROR_DIR),
'homepage': 'https://github.com/spack/spack-bootstrap-mirrors',
'releases': 'https://github.com/spack/spack-bootstrap-mirrors/releases',
'tarball': BINARY_TARBALL
}
}
CLINGO_JSON = '$spack/share/spack/bootstrap/github-actions-v0.2/clingo.json'
GNUPG_JSON = '$spack/share/spack/bootstrap/github-actions-v0.2/gnupg.json'
# Metadata for a generated source mirror
SOURCE_METADATA = {
'type': 'install',
'description': 'Mirror with software needed to bootstrap Spack',
'info': {
'url': os.path.join('..', '..', LOCAL_MIRROR_DIR)
}
}
def _add_scope_option(parser):
scopes = spack.config.scopes()
scopes_metavar = spack.config.scopes_metavar
@@ -67,24 +104,61 @@ def setup_parser(subparser):
)
list = sp.add_parser(
'list', help='list the methods available for bootstrapping'
'list', help='list all the sources of software to bootstrap Spack'
)
_add_scope_option(list)
trust = sp.add_parser(
'trust', help='trust a bootstrapping method'
'trust', help='trust a bootstrapping source'
)
_add_scope_option(trust)
trust.add_argument(
'name', help='name of the method to be trusted'
'name', help='name of the source to be trusted'
)
untrust = sp.add_parser(
'untrust', help='untrust a bootstrapping method'
'untrust', help='untrust a bootstrapping source'
)
_add_scope_option(untrust)
untrust.add_argument(
'name', help='name of the method to be untrusted'
'name', help='name of the source to be untrusted'
)
add = sp.add_parser(
'add', help='add a new source for bootstrapping'
)
_add_scope_option(add)
add.add_argument(
'--trust', action='store_true',
help='trust the source immediately upon addition')
add.add_argument(
'name', help='name of the new source of software'
)
add.add_argument(
'metadata_dir', help='directory where to find metadata files'
)
remove = sp.add_parser(
'remove', help='remove a bootstrapping source'
)
remove.add_argument(
'name', help='name of the source to be removed'
)
mirror = sp.add_parser(
'mirror', help='create a local mirror to bootstrap Spack'
)
mirror.add_argument(
'--binary-packages', action='store_true',
help='download public binaries in the mirror'
)
mirror.add_argument(
'--dev', action='store_true',
help='download dev dependencies too'
)
mirror.add_argument(
metavar='DIRECTORY', dest='root_dir',
help='root directory in which to create the mirror and metadata'
)
@@ -137,10 +211,7 @@ def _root(args):
def _list(args):
sources = spack.config.get(
'bootstrap:sources', default=None, scope=args.scope
)
sources = spack.bootstrap.bootstrapping_sources(scope=args.scope)
if not sources:
llnl.util.tty.msg(
"No method available for bootstrapping Spack's dependencies"
@@ -249,6 +320,121 @@ def _status(args):
print()
def _add(args):
initial_sources = spack.bootstrap.bootstrapping_sources()
names = [s['name'] for s in initial_sources]
# If the name is already used error out
if args.name in names:
msg = 'a source named "{0}" already exist. Please choose a different name'
raise RuntimeError(msg.format(args.name))
# Check that the metadata file exists
metadata_dir = spack.util.path.canonicalize_path(args.metadata_dir)
if not os.path.exists(metadata_dir) or not os.path.isdir(metadata_dir):
raise RuntimeError(
'the directory "{0}" does not exist'.format(args.metadata_dir)
)
file = os.path.join(metadata_dir, 'metadata.yaml')
if not os.path.exists(file):
raise RuntimeError('the file "{0}" does not exist'.format(file))
# Insert the new source as the highest priority one
write_scope = args.scope or spack.config.default_modify_scope(section='bootstrap')
sources = spack.config.get('bootstrap:sources', scope=write_scope) or []
sources = [
{'name': args.name, 'metadata': args.metadata_dir}
] + sources
spack.config.set('bootstrap:sources', sources, scope=write_scope)
msg = 'New bootstrapping source "{0}" added in the "{1}" configuration scope'
llnl.util.tty.msg(msg.format(args.name, write_scope))
if args.trust:
_trust(args)
def _remove(args):
initial_sources = spack.bootstrap.bootstrapping_sources()
names = [s['name'] for s in initial_sources]
if args.name not in names:
msg = ('cannot find any bootstrapping source named "{0}". '
'Run `spack bootstrap list` to see available sources.')
raise RuntimeError(msg.format(args.name))
for current_scope in spack.config.scopes():
sources = spack.config.get('bootstrap:sources', scope=current_scope) or []
if args.name in [s['name'] for s in sources]:
sources = [s for s in sources if s['name'] != args.name]
spack.config.set('bootstrap:sources', sources, scope=current_scope)
msg = ('Removed the bootstrapping source named "{0}" from the '
'"{1}" configuration scope.')
llnl.util.tty.msg(msg.format(args.name, current_scope))
trusted = spack.config.get('bootstrap:trusted', scope=current_scope) or []
if args.name in trusted:
trusted.pop(args.name)
spack.config.set('bootstrap:trusted', trusted, scope=current_scope)
msg = 'Deleting information on "{0}" from list of trusted sources'
llnl.util.tty.msg(msg.format(args.name))
def _mirror(args):
mirror_dir = spack.util.path.canonicalize_path(
os.path.join(args.root_dir, LOCAL_MIRROR_DIR)
)
# TODO: Here we are adding gnuconfig manually, but this can be fixed
# TODO: as soon as we have an option to add to a mirror all the possible
# TODO: dependencies of a spec
root_specs = spack.bootstrap.all_root_specs(development=args.dev) + ['gnuconfig']
for spec_str in root_specs:
msg = 'Adding "{0}" and dependencies to the mirror at {1}'
llnl.util.tty.msg(msg.format(spec_str, mirror_dir))
# Suppress tty from the call below for terser messages
llnl.util.tty.set_msg_enabled(False)
spec = spack.spec.Spec(spec_str).concretized()
for node in spec.traverse():
spack.mirror.create(mirror_dir, [node])
llnl.util.tty.set_msg_enabled(True)
if args.binary_packages:
msg = 'Adding binary packages from "{0}" to the mirror at {1}'
llnl.util.tty.msg(msg.format(BINARY_TARBALL, mirror_dir))
llnl.util.tty.set_msg_enabled(False)
stage = spack.stage.Stage(BINARY_TARBALL, path=tempfile.mkdtemp())
stage.create()
stage.fetch()
stage.expand_archive()
build_cache_dir = os.path.join(stage.source_path, 'build_cache')
shutil.move(build_cache_dir, mirror_dir)
llnl.util.tty.set_msg_enabled(True)
def write_metadata(subdir, metadata):
metadata_rel_dir = os.path.join('metadata', subdir)
metadata_yaml = os.path.join(
args.root_dir, metadata_rel_dir, 'metadata.yaml'
)
llnl.util.filesystem.mkdirp(os.path.dirname(metadata_yaml))
with open(metadata_yaml, mode='w') as f:
spack.util.spack_yaml.dump(metadata, stream=f)
return os.path.dirname(metadata_yaml), metadata_rel_dir
instructions = ('\nTo register the mirror on the platform where it\'s supposed '
'to be used, move "{0}" to its final location and run the '
'following command(s):\n\n').format(args.root_dir)
cmd = ' % spack bootstrap add --trust {0} <final-path>/{1}\n'
_, rel_directory = write_metadata(subdir='sources', metadata=SOURCE_METADATA)
instructions += cmd.format('local-sources', rel_directory)
if args.binary_packages:
abs_directory, rel_directory = write_metadata(
subdir='binaries', metadata=BINARY_METADATA
)
shutil.copy(spack.util.path.canonicalize_path(CLINGO_JSON), abs_directory)
shutil.copy(spack.util.path.canonicalize_path(GNUPG_JSON), abs_directory)
instructions += cmd.format('local-binaries', rel_directory)
print(instructions)
def bootstrap(parser, args):
callbacks = {
'status': _status,
@@ -258,6 +444,9 @@ def bootstrap(parser, args):
'root': _root,
'list': _list,
'trust': _trust,
'untrust': _untrust
'untrust': _untrust,
'add': _add,
'remove': _remove,
'mirror': _mirror
}
callbacks[args.subcommand](args)

View File

@@ -161,11 +161,6 @@ def setup_parser(subparser):
help=('Check single spec from json or yaml file instead of release ' +
'specs file'))
check.add_argument(
'--rebuild-on-error', default=False, action='store_true',
help="Default to rebuilding packages if errors are encountered " +
"during the process of checking whether rebuilding is needed")
check.set_defaults(func=check_fn)
# Download tarball and specfile
@@ -361,7 +356,7 @@ def list_fn(args):
try:
specs = bindist.update_cache_and_get_specs()
except bindist.FetchCacheError as e:
tty.error(e)
tty.die(e)
if not args.allarch:
arch = spack.spec.Spec.default_arch()
@@ -430,7 +425,7 @@ def check_fn(args):
sys.exit(0)
sys.exit(bindist.check_specs_against_mirrors(
configured_mirrors, specs, args.output_file, args.rebuild_on_error))
configured_mirrors, specs, args.output_file))
def download_fn(args):
@@ -483,11 +478,12 @@ def save_specfile_fn(args):
if args.root_specfile:
with open(args.root_specfile) as fd:
root_spec_as_json = fd.read()
spec_format = 'yaml' if args.root_specfile.endswith('yaml') else 'json'
else:
root_spec = Spec(args.root_spec)
root_spec.concretize()
root_spec_as_json = root_spec.to_json(hash=ht.build_hash)
spec_format = 'yaml' if args.root_specfile.endswith('yaml') else 'json'
root_spec_as_json = root_spec.to_json(hash=ht.dag_hash)
spec_format = 'json'
save_dependency_specfiles(
root_spec_as_json, args.specfile_dir, args.specs.split(), spec_format)
@@ -701,7 +697,7 @@ def update_index(mirror_url, update_keys=False):
def update_index_fn(args):
"""Update a buildcache index."""
outdir = '.'
outdir = 'file://.'
if args.mirror_url:
outdir = args.mirror_url

View File

@@ -12,11 +12,12 @@
import spack.cmd
import spack.cmd.common.arguments as arguments
import spack.repo
import spack.spec
import spack.stage
import spack.util.crypto
from spack.package import preferred_version
from spack.package_base import preferred_version
from spack.util.naming import valid_fully_qualified_module_name
from spack.version import Version, ver
from spack.version import VersionBase, ver
description = "checksum available versions of a package"
section = "packaging"
@@ -54,7 +55,8 @@ def checksum(parser, args):
tty.die("`spack checksum` accepts package names, not URLs.")
# Get the package we're going to generate checksums for
pkg = spack.repo.get(args.package)
pkg_cls = spack.repo.path.get_pkg_class(args.package)
pkg = pkg_cls(spack.spec.Spec(args.package))
url_dict = {}
versions = args.versions
@@ -65,7 +67,7 @@ def checksum(parser, args):
remote_versions = None
for version in versions:
version = ver(version)
if not isinstance(version, Version):
if not isinstance(version, VersionBase):
tty.die("Cannot generate checksums for version lists or "
"version ranges. Use unambiguous versions.")
url = pkg.find_valid_url_for_version(version)

View File

@@ -64,6 +64,11 @@ def setup_parser(subparser):
'--dependencies', action='store_true', default=False,
help="(Experimental) disable DAG scheduling; use "
' "plain" dependencies.')
generate.add_argument(
'--buildcache-destination', default=None,
help="Override the mirror configured in the environment (spack.yaml) " +
"in order to push binaries from the generated pipeline to a " +
"different location.")
prune_group = generate.add_mutually_exclusive_group()
prune_group.add_argument(
'--prune-dag', action='store_true', dest='prune_dag',
@@ -127,6 +132,7 @@ def ci_generate(args):
prune_dag = args.prune_dag
index_only = args.index_only
artifacts_root = args.artifacts_root
buildcache_destination = args.buildcache_destination
if not output_file:
output_file = os.path.abspath(".gitlab-ci.yml")
@@ -140,7 +146,8 @@ def ci_generate(args):
spack_ci.generate_gitlab_ci_yaml(
env, True, output_file, prune_dag=prune_dag,
check_index_only=index_only, run_optimizer=run_optimizer,
use_dependencies=use_dependencies, artifacts_root=artifacts_root)
use_dependencies=use_dependencies, artifacts_root=artifacts_root,
remote_mirror_override=buildcache_destination)
if copy_yaml_to:
copy_to_dir = os.path.dirname(copy_yaml_to)
@@ -167,8 +174,7 @@ def ci_reindex(args):
def ci_rebuild(args):
"""Check a single spec against the remote mirror, and rebuild it from
source if the mirror does not contain the full hash match of the spec
as computed locally. """
source if the mirror does not contain the hash. """
env = spack.cmd.require_active_env(cmd_name='ci rebuild')
# Make sure the environment is "gitlab-enabled", or else there's nothing
@@ -181,6 +187,9 @@ def ci_rebuild(args):
if not gitlab_ci:
tty.die('spack ci rebuild requires an env containing gitlab-ci cfg')
tty.msg('SPACK_BUILDCACHE_DESTINATION={0}'.format(
os.environ.get('SPACK_BUILDCACHE_DESTINATION', None)))
# Grab the environment variables we need. These either come from the
# pipeline generation step ("spack ci generate"), where they were written
# out as variables, or else provided by GitLab itself.
@@ -197,7 +206,7 @@ def ci_rebuild(args):
compiler_action = get_env_var('SPACK_COMPILER_ACTION')
cdash_build_name = get_env_var('SPACK_CDASH_BUILD_NAME')
spack_pipeline_type = get_env_var('SPACK_PIPELINE_TYPE')
pr_mirror_url = get_env_var('SPACK_PR_MIRROR_URL')
remote_mirror_override = get_env_var('SPACK_REMOTE_MIRROR_OVERRIDE')
remote_mirror_url = get_env_var('SPACK_REMOTE_MIRROR_URL')
# Construct absolute paths relative to current $CI_PROJECT_DIR
@@ -245,6 +254,10 @@ def ci_rebuild(args):
tty.debug('Pipeline type - PR: {0}, develop: {1}'.format(
spack_is_pr_pipeline, spack_is_develop_pipeline))
# If no override url exists, then just push binary package to the
# normal remote mirror url.
buildcache_mirror_url = remote_mirror_override or remote_mirror_url
# Figure out what is our temporary storage mirror: Is it artifacts
# buildcache? Or temporary-storage-url-prefix? In some cases we need to
# force something or pipelines might not have a way to propagate build
@@ -280,8 +293,8 @@ def ci_rebuild(args):
env, root_spec, job_spec_pkg_name, compiler_action)
job_spec = spec_map[job_spec_pkg_name]
job_spec_yaml_file = '{0}.yaml'.format(job_spec_pkg_name)
job_spec_yaml_path = os.path.join(repro_dir, job_spec_yaml_file)
job_spec_json_file = '{0}.json'.format(job_spec_pkg_name)
job_spec_json_path = os.path.join(repro_dir, job_spec_json_file)
# To provide logs, cdash reports, etc for developer download/perusal,
# these things have to be put into artifacts. This means downstream
@@ -335,23 +348,23 @@ def ci_rebuild(args):
# using a compiler already installed on the target system).
spack_ci.configure_compilers(compiler_action)
# Write this job's spec yaml into the reproduction directory, and it will
# Write this job's spec json into the reproduction directory, and it will
# also be used in the generated "spack install" command to install the spec
tty.debug('job concrete spec path: {0}'.format(job_spec_yaml_path))
with open(job_spec_yaml_path, 'w') as fd:
fd.write(job_spec.to_yaml(hash=ht.build_hash))
tty.debug('job concrete spec path: {0}'.format(job_spec_json_path))
with open(job_spec_json_path, 'w') as fd:
fd.write(job_spec.to_json(hash=ht.dag_hash))
# Write the concrete root spec yaml into the reproduction directory
root_spec_yaml_path = os.path.join(repro_dir, 'root.yaml')
with open(root_spec_yaml_path, 'w') as fd:
fd.write(spec_map['root'].to_yaml(hash=ht.build_hash))
# Write the concrete root spec json into the reproduction directory
root_spec_json_path = os.path.join(repro_dir, 'root.json')
with open(root_spec_json_path, 'w') as fd:
fd.write(spec_map['root'].to_json(hash=ht.dag_hash))
# Write some other details to aid in reproduction into an artifact
repro_file = os.path.join(repro_dir, 'repro.json')
repro_details = {
'job_name': ci_job_name,
'job_spec_yaml': job_spec_yaml_file,
'root_spec_yaml': 'root.yaml',
'job_spec_json': job_spec_json_file,
'root_spec_json': 'root.json',
'ci_project_dir': ci_project_dir
}
with open(repro_file, 'w') as fd:
@@ -366,25 +379,41 @@ def ci_rebuild(args):
fd.write(b'\n')
# If we decided there should be a temporary storage mechanism, add that
# mirror now so it's used when we check for a full hash match already
# mirror now so it's used when we check for a hash match already
# built for this spec.
if pipeline_mirror_url:
spack.mirror.add(spack_ci.TEMP_STORAGE_MIRROR_NAME,
pipeline_mirror_url,
cfg.default_modify_scope())
# Check configured mirrors for a built spec with a matching full hash
# Check configured mirrors for a built spec with a matching hash
mirrors_to_check = None
if remote_mirror_override and spack_pipeline_type == 'spack_protected_branch':
# Passing "mirrors_to_check" below means we *only* look in the override
# mirror to see if we should skip building, which is what we want.
mirrors_to_check = {
'override': remote_mirror_override
}
# Adding this mirror to the list of configured mirrors means dependencies
# could be installed from either the override mirror or any other configured
# mirror (e.g. remote_mirror_url which is defined in the environment or
# pipeline_mirror_url), which is also what we want.
spack.mirror.add('mirror_override',
remote_mirror_override,
cfg.default_modify_scope())
matches = bindist.get_mirrors_for_spec(
job_spec, full_hash_match=True, index_only=False)
job_spec, mirrors_to_check=mirrors_to_check, index_only=False)
if matches:
# Got a full hash match on at least one configured mirror. All
# Got a hash match on at least one configured mirror. All
# matches represent the fully up-to-date spec, so should all be
# equivalent. If artifacts mirror is enabled, we just pick one
# of the matches and download the buildcache files from there to
# the artifacts, so they're available to be used by dependent
# jobs in subsequent stages.
tty.msg('No need to rebuild {0}, found full hash match at: '.format(
tty.msg('No need to rebuild {0}, found hash match at: '.format(
job_spec_pkg_name))
for match in matches:
tty.msg(' {0}'.format(match['mirror_url']))
@@ -403,7 +432,7 @@ def ci_rebuild(args):
# Now we are done and successful
sys.exit(0)
# No full hash match anywhere means we need to rebuild spec
# No hash match anywhere means we need to rebuild spec
# Start with spack arguments
install_args = [base_arg for base_arg in CI_REBUILD_INSTALL_BASE_ARGS]
@@ -415,7 +444,6 @@ def ci_rebuild(args):
install_args.extend([
'install',
'--keep-stage',
'--require-full-hash-match',
])
can_verify = spack_ci.can_verify_binaries()
@@ -443,8 +471,8 @@ def ci_rebuild(args):
# TODO: once we have the concrete spec registry, use the DAG hash
# to identify the spec to install, rather than the concrete spec
# yaml file.
install_args.extend(['-f', job_spec_yaml_path])
# json file.
install_args.extend(['-f', job_spec_json_path])
tty.debug('Installing {0} from source'.format(job_spec.name))
tty.debug('spack install arguments: {0}'.format(
@@ -477,13 +505,13 @@ def ci_rebuild(args):
tty.debug('spack install exited {0}'.format(install_exit_code))
# If a spec fails to build in a spack develop pipeline, we add it to a
# list of known broken full hashes. This allows spack PR pipelines to
# list of known broken hashes. This allows spack PR pipelines to
# avoid wasting compute cycles attempting to build those hashes.
if install_exit_code == INSTALL_FAIL_CODE and spack_is_develop_pipeline:
tty.debug('Install failed on develop')
if 'broken-specs-url' in gitlab_ci:
broken_specs_url = gitlab_ci['broken-specs-url']
dev_fail_hash = job_spec.full_hash()
dev_fail_hash = job_spec.dag_hash()
broken_spec_path = url_util.join(broken_specs_url, dev_fail_hash)
tty.msg('Reporting broken develop build as: {0}'.format(
broken_spec_path))
@@ -494,7 +522,7 @@ def ci_rebuild(args):
'broken-spec': {
'job-url': get_env_var('CI_JOB_URL'),
'pipeline-url': get_env_var('CI_PIPELINE_URL'),
'concrete-spec-yaml': job_spec.to_dict(hash=ht.full_hash)
'concrete-spec-dict': job_spec.to_dict(hash=ht.dag_hash)
}
}
@@ -520,13 +548,6 @@ def ci_rebuild(args):
# any logs from the staging directory to artifacts now
spack_ci.copy_stage_logs_to_artifacts(job_spec, job_log_dir)
# Create buildcache on remote mirror, either on pr-specific mirror or
# on the main mirror defined in the gitlab-enabled spack environment
if spack_is_pr_pipeline:
buildcache_mirror_url = pr_mirror_url
else:
buildcache_mirror_url = remote_mirror_url
# If the install succeeded, create a buildcache entry for this job spec
# and push it to one or more mirrors. If the install did not succeed,
# print out some instructions on how to reproduce this build failure
@@ -539,7 +560,7 @@ def ci_rebuild(args):
# per-PR mirror, if this is a PR pipeline
if buildcache_mirror_url:
spack_ci.push_mirror_contents(
env, job_spec_yaml_path, buildcache_mirror_url, sign_binaries
env, job_spec_json_path, buildcache_mirror_url, sign_binaries
)
# Create another copy of that buildcache in the per-pipeline
@@ -548,14 +569,14 @@ def ci_rebuild(args):
# prefix is set)
if pipeline_mirror_url:
spack_ci.push_mirror_contents(
env, job_spec_yaml_path, pipeline_mirror_url, sign_binaries
env, job_spec_json_path, pipeline_mirror_url, sign_binaries
)
# If this is a develop pipeline, check if the spec that we just built is
# on the broken-specs list. If so, remove it.
if spack_is_develop_pipeline and 'broken-specs-url' in gitlab_ci:
broken_specs_url = gitlab_ci['broken-specs-url']
just_built_hash = job_spec.full_hash()
just_built_hash = job_spec.dag_hash()
broken_spec_path = url_util.join(broken_specs_url, just_built_hash)
if web_util.url_exists(broken_spec_path):
tty.msg('Removing {0} from the list of broken specs'.format(

View File

@@ -58,6 +58,21 @@ def setup_parser(subparser):
arguments.add_common_arguments(subparser, ['specs'])
def remove_python_cache():
for directory in [lib_path, var_path]:
for root, dirs, files in os.walk(directory):
for f in files:
if f.endswith('.pyc') or f.endswith('.pyo'):
fname = os.path.join(root, f)
tty.debug('Removing {0}'.format(fname))
os.remove(fname)
for d in dirs:
if d == '__pycache__':
dname = os.path.join(root, d)
tty.debug('Removing {0}'.format(dname))
shutil.rmtree(dname)
def clean(parser, args):
# If nothing was set, activate the default
if not any([args.specs, args.stage, args.downloads, args.failures,
@@ -70,8 +85,7 @@ def clean(parser, args):
for spec in specs:
msg = 'Cleaning build stage [{0}]'
tty.msg(msg.format(spec.short_spec))
package = spack.repo.get(spec)
package.do_clean()
spec.package.do_clean()
if args.stage:
tty.msg('Removing all temporary build stages')
@@ -95,18 +109,7 @@ def clean(parser, args):
if args.python_cache:
tty.msg('Removing python cache files')
for directory in [lib_path, var_path]:
for root, dirs, files in os.walk(directory):
for f in files:
if f.endswith('.pyc') or f.endswith('.pyo'):
fname = os.path.join(root, f)
tty.debug('Removing {0}'.format(fname))
os.remove(fname)
for d in dirs:
if d == '__pycache__':
dname = os.path.join(root, d)
tty.debug('Removing {0}'.format(dname))
shutil.rmtree(dname)
remove_python_cache()
if args.bootstrap:
bootstrap_prefix = spack.util.path.canonicalize_path(

View File

@@ -403,4 +403,4 @@ def add_s3_connection_args(subparser, add_help):
default=None)
subparser.add_argument(
'--s3-endpoint-url',
help="Access Token to use to connect to this S3 mirror")
help="Endpoint URL to use to connect to this S3 mirror")

View File

@@ -18,6 +18,8 @@
def setup_parser(subparser):
arguments.add_common_arguments(subparser, ['clean', 'dirty'])
arguments.add_concretizer_args(subparser)
subparser.add_argument(
'--dump', metavar="FILE",
help="dump a source-able environment to FILE"

View File

@@ -22,6 +22,9 @@ def setup_parser(subparser):
help="""Concretize with test dependencies. When 'root' is chosen, test
dependencies are only added for the environment's root specs. When 'all' is
chosen, test dependencies are enabled for all packages in the environment.""")
subparser.add_argument(
'-q', '--quiet', action='store_true',
help="Don't print concretized specs")
spack.cmd.common.arguments.add_concretizer_args(subparser)
@@ -38,5 +41,6 @@ def concretize(parser, args):
with env.write_transaction():
concretized_specs = env.concretize(force=args.force, tests=tests)
ev.display_specs(concretized_specs)
if not args.quiet:
ev.display_specs(concretized_specs)
env.write()

View File

@@ -9,7 +9,6 @@
import spack.container
import spack.container.images
import spack.monitor
description = ("creates recipes to build images for different"
" container runtimes")
@@ -18,7 +17,6 @@
def setup_parser(subparser):
monitor_group = spack.monitor.get_monitor_group(subparser) # noqa
subparser.add_argument(
'--list-os', action='store_true', default=False,
help='list all the OS that can be used in the bootstrap phase and exit'
@@ -46,14 +44,5 @@ def containerize(parser, args):
raise ValueError(msg.format(config_file))
config = spack.container.validate(config_file)
# If we have a monitor request, add monitor metadata to config
if args.use_monitor:
config['spack']['monitor'] = {
"host": args.monitor_host,
"keep_going": args.monitor_keep_going,
"prefix": args.monitor_prefix,
"tags": args.monitor_tags
}
recipe = spack.container.recipe(config, last_phase=args.last_stage)
print(recipe)

View File

@@ -57,7 +57,7 @@
# See the Spack documentation for more information on packaging.
# ----------------------------------------------------------------------------
from spack import *
from spack.package import *
class {class_name}({base_class_name}):
@@ -187,6 +187,27 @@ def cmake_args(self):
return args"""
class LuaPackageTemplate(PackageTemplate):
"""Provides appropriate overrides for LuaRocks-based packages"""
base_class_name = 'LuaPackage'
body_def = """\
def luarocks_args(self):
# FIXME: Add arguments to `luarocks make` other than rockspec path
# FIXME: If not needed delete this function
args = []
return args"""
def __init__(self, name, url, *args, **kwargs):
# If the user provided `--name lua-lpeg`, don't rename it lua-lua-lpeg
if not name.startswith('lua-'):
# Make it more obvious that we are renaming the package
tty.msg("Changing package name from {0} to lua-{0}".format(name))
name = 'lua-{0}'.format(name)
super(LuaPackageTemplate, self).__init__(name, url, *args, **kwargs)
class MesonPackageTemplate(PackageTemplate):
"""Provides appropriate overrides for meson-based packages"""
@@ -580,6 +601,7 @@ def __init__(self, name, *args, **kwargs):
'makefile': MakefilePackageTemplate,
'intel': IntelPackageTemplate,
'meson': MesonPackageTemplate,
'lua': LuaPackageTemplate,
'sip': SIPPackageTemplate,
'generic': PackageTemplate,
}
@@ -644,6 +666,9 @@ def __call__(self, stage, url):
if url.endswith('.whl') or '.whl#' in url:
self.build_system = 'python'
return
if url.endswith('.rock'):
self.build_system = 'lua'
return
# A list of clues that give us an idea of the build system a package
# uses. If the regular expression matches a file contained in the
@@ -668,6 +693,7 @@ def __call__(self, stage, url):
(r'/Rakefile$', 'ruby'),
(r'/setup\.rb$', 'ruby'),
(r'/.*\.pro$', 'qmake'),
(r'/.*\.rockspec$', 'lua'),
(r'/(GNU)?[Mm]akefile$', 'makefile'),
(r'/DESCRIPTION$', 'octave'),
(r'/meson\.build$', 'meson'),
@@ -800,7 +826,7 @@ def get_versions(args, name):
spack.util.url.require_url_format(args.url)
if args.url.startswith('file://'):
valid_url = False # No point in spidering these
except ValueError:
except (ValueError, TypeError):
valid_url = False
if args.url is not None and args.template != 'bundle' and valid_url:

View File

@@ -11,7 +11,7 @@
import spack.cmd
import spack.cmd.common.arguments as arguments
import spack.environment as ev
import spack.package
import spack.package_base
import spack.repo
import spack.store
@@ -57,7 +57,7 @@ def dependencies(parser, args):
else:
spec = specs[0]
dependencies = spack.package.possible_dependencies(
dependencies = spack.package_base.possible_dependencies(
spec,
transitive=args.transitive,
expand_virtuals=args.expand_virtuals,

View File

@@ -39,9 +39,9 @@ def inverted_dependencies():
actual dependents.
"""
dag = {}
for pkg in spack.repo.path.all_packages():
dag.setdefault(pkg.name, set())
for dep in pkg.dependencies:
for pkg_cls in spack.repo.path.all_package_classes():
dag.setdefault(pkg_cls.name, set())
for dep in pkg_cls.dependencies:
deps = [dep]
# expand virtuals if necessary
@@ -49,7 +49,7 @@ def inverted_dependencies():
deps += [s.name for s in spack.repo.path.providers_for(dep)]
for d in deps:
dag.setdefault(d, set()).add(pkg.name)
dag.setdefault(d, set()).add(pkg_cls.name)
return dag

View File

@@ -87,12 +87,10 @@ def dev_build(self, args):
# Forces the build to run out of the source directory.
spec.constrain('dev_path=%s' % source_path)
spec.concretize()
package = spack.repo.get(spec)
if package.installed:
tty.error("Already installed in %s" % package.prefix)
if spec.installed:
tty.error("Already installed in %s" % spec.prefix)
tty.msg("Uninstall or try adding a version suffix for this dev build.")
sys.exit(1)
@@ -109,7 +107,7 @@ def dev_build(self, args):
elif args.test == 'root':
tests = [spec.name for spec in specs]
package.do_install(
spec.package.do_install(
tests=tests,
make_jobs=args.jobs,
keep_prefix=args.keep_prefix,
@@ -122,5 +120,5 @@ def dev_build(self, args):
# drop into the build environment of the package?
if args.shell is not None:
spack.build_environment.setup_package(package, dirty=False)
spack.build_environment.setup_package(spec.package, dirty=False)
os.execvp(args.shell, [args.shell])

View File

@@ -54,8 +54,9 @@ def develop(parser, args):
tty.msg(msg)
continue
stage = spack.spec.Spec(entry['spec']).package.stage
stage.steal_source(abspath)
spec = spack.spec.Spec(entry['spec'])
pkg_cls = spack.repo.path.get_pkg_class(spec.name)
pkg_cls(spec).stage.steal_source(abspath)
if not env.dev_specs:
tty.warn("No develop specs to download")

View File

@@ -68,8 +68,14 @@ def compare_specs(a, b, to_string=False, color=None):
# Prepare a solver setup to parse differences
setup = asp.SpackSolverSetup()
a_facts = set(t for t in setup.spec_clauses(a, body=True, expand_hashes=True))
b_facts = set(t for t in setup.spec_clauses(b, body=True, expand_hashes=True))
# get facts for specs, making sure to include build dependencies of concrete
# specs and to descend into dependency hashes so we include all facts.
a_facts = set(t for t in setup.spec_clauses(
a, body=True, expand_hashes=True, concrete_build_deps=True,
))
b_facts = set(t for t in setup.spec_clauses(
b, body=True, expand_hashes=True, concrete_build_deps=True,
))
# We want to present them to the user as simple key: values
intersect = sorted(a_facts.intersection(b_facts))

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