Compare commits

...

177 Commits

Author SHA1 Message Date
Teague Sterling
b52e4fc650 libxcvt: new package (#44640)
* Adding libxcvt package

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

* [@spackbot] updating style on behalf of teaguesterling

* Update package.py

* Update package.py

* updating checksum after swithc to x.org mirror

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

---------

Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-08-07 10:00:45 -05:00
Mathieu Cloirec
a653579e56 hipsycl: add compile options for ROCm (#45497)
Co-authored-by: cloirec <cloirec@pc54.cines.fr>
2024-08-07 16:23:53 +02:00
Chris Marsh
7f89391b14 parallelio: fix install_name for on macos (#45567) 2024-08-07 15:55:10 +02:00
Wouter Deconinck
34c98101ad xorg-server and xorg pkgs: Fix the build and mark protocols as build deps (#45536) 2024-08-07 14:51:52 +02:00
Jeremy Guillette
f1ea979e2b py-gevent: @:23.9.0 conflicts with py-cython@3.0.10 (#45257) (#45295)
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2024-08-07 14:35:30 +02:00
Christopher Christofi
55cbdd435c py-chex: add v0.1.86 (#45476) 2024-08-07 14:16:01 +02:00
Adam J. Stewart
1cce947be6 py-torchgeo: incompatible with lightning 2.3 (#45612) 2024-08-07 13:38:33 +02:00
Adam J. Stewart
0a735c6ea6 py-lightning: add v2.4.0 (#45611) 2024-08-07 13:36:33 +02:00
Adam J. Stewart
5400b1e222 py-lightly: add v1.5.11 (#45610) 2024-08-07 13:34:58 +02:00
Bernhard Kaindl
ef461befcc linux-perf: Add capstone variant to build with capstone disassembler 2024-08-07 13:34:07 +02:00
Bernhard Kaindl
831b4a3e4a linux-perf: If clang is in PATH, pass "CLANG=" + shutil.which("clang")
When clang is installed I get `clang: Permission denied`.
Setting CLANG to the full path of clang fixes this.

Signed-off-by: Bernhard Kaindl <bernhardkaindl7@gmail.com>
2024-08-07 13:34:07 +02:00
Jordan Galby
6007a77a33 Add linux-perf 2024-08-07 13:34:07 +02:00
Jordan Galby
a2794f04bc audit-userspace: Backport patch to fix build error
Fix build error:

```
     1711    ../../../py-compile: line 125: test: found: integer expression expected
     1712    ../../../py-compile: line 137: python: command not found
  >> 1713    make[4]: *** [Makefile:521: install-pyexecPYTHON] Error 127
```
2024-08-07 13:34:07 +02:00
Jordan GALBY
3ae3bfd997 audit-userspace: Add 3.1.2
Fixes build errors on almalinux 8 gcc 8.5.0:

```txt
     1352    audit_wrap.c: In function '_wrap_audit_rule_data_buf_set':
  >> 1353    audit_wrap.c:5010:17: error: cast specifies array type
     1354         arg1->buf = (char [])(char *)memcpy(malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
     1355                     ^
  >> 1356    audit_wrap.c:5010:15: error: invalid use of flexible array member
     1357         arg1->buf = (char [])(char *)memcpy(malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
     1358                   ^
  >> 1359    audit_wrap.c:5012:15: error: invalid use of flexible array member
     1360         arg1->buf = 0;
     1361                   ^
```
2024-08-07 13:34:07 +02:00
Jordan GALBY
5f3f968a1f xmlto: Fix missing flex build dep
Fixes error:

```txt
3 errors found in build log:
     61    ==> xmlto: Executing phase: 'build'
     62    ==> [2023-10-26-09:48:35.425903] 'make' '-j16' 'V=1'
     63    make  all-am
     64    make[1]: Entering directory '/tmp/root/spack-stage/spack-stage-xmlto-0.0.28-huuygrp4qasytrezg774yavnnaxzgp2e/spack-src'
     65    /bin/sh ./ylwrap xmlif/xmlif.l .c xmlif/xmlif.c -- /bin/sh /tmp/root/spack-stage/spack-stage-xmlto-0.0.28-huuygrp4qasytrezg774yavnnaxzgp2e/spack-src/missing flex
     66    /tmp/root/spack-stage/spack-stage-xmlto-0.0.28-huuygrp4qasytrezg774yavnnaxzgp2e/spack-src/missing: line 81: flex: command not found
  >> 67    WARNING: 'flex' is missing on your system.
     68             You should only need it if you modified a '.l' file.
     69             You may want to install the Fast Lexical Analyzer package:
     70             <http://flex.sourceforge.net/>
  >> 71    make[1]: *** [Makefile:757: xmlif/xmlif.c] Error 127
     72    make[1]: Leaving directory '/tmp/root/spack-stage/spack-stage-xmlto-0.0.28-huuygrp4qasytrezg774yavnnaxzgp2e/spack-src'
  >> 73    make: *** [Makefile:584: all] Error 2
```
2024-08-07 13:34:07 +02:00
Jordan GALBY
652de07d8c babeltrace: Fix build minimal OS: missing pkgconfig 2024-08-07 13:34:07 +02:00
Jordan GALBY
c16191d9ea babeltrace: Add 1.5.11 for linux-perf 2024-08-07 13:34:07 +02:00
Konstantinos Parasyris
1b1663acea flux-pmix: correct FLUX_PMI_CLIENT_SEARCHPATH (#45277) 2024-08-07 13:09:47 +02:00
Jordan Galby
d2f269ed7b Fix SIP build system installing files into python-venv (#45360)
For example: spack install py-pyqt5 or py-pyqt6 would install pylupdate5 pyrcc5 and
pyuic5 into in python-venv's install prefix.

Fix https://github.com/spack/spack/issues/45359
2024-08-07 12:12:56 +02:00
Tamara Dahlgren
4584d85ca6 biobambam2: fix test scripts to use installed binaries (#45609) 2024-08-07 11:43:23 +02:00
Wouter Deconinck
2106a2be26 qt-base: let QtPackage base class handle module files (#45603) 2024-08-07 10:53:32 +02:00
Wouter Deconinck
228c82502d qt-5compat: new package for QtCore5Compat module (#45601) 2024-08-07 10:47:31 +02:00
tygoetsch
431f5627d9 Add charliecloud@0.38 (#45566) 2024-08-07 01:33:36 -06:00
Teague Sterling
fb315c37ba py-hail: new package (#44521) 2024-08-07 06:55:07 +02:00
dependabot[bot]
f9fa160a24 build(deps): bump actions/upload-artifact from 4.3.5 to 4.3.6 (#45608)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.5 to 4.3.6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](89ef406dd8...834a144ee9)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-07 06:50:18 +02:00
Massimiliano Culpo
1ee29929a7 cmake: add v3.30.2 (#45593) 2024-08-06 19:53:45 -06:00
Massimiliano Culpo
97e691cdbf binutils: add v2.43 (#45594) 2024-08-06 15:09:55 -06:00
Matthieu Dorier
51ba25fec3 py-gcovr: add version 7.2 (#45597)
* py-gcovr: add version 7.2
* py-gcovr: fix dependency on py-tomli

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-08-06 13:41:03 -06:00
Matthieu Dorier
81281646e9 py-colorlog: added new version (#45596)
* py-colorlog: added new version
* py-colorlog: corrected dependency on py-setuptools
2024-08-06 13:23:46 -06:00
Wouter Deconinck
85ec4cca92 libxshmfence: add v1.3.1, v1.3.2 (#44393)
* libxshmfence: add v1.3.1, v1.3.2
* libxshmfence: fix url_for_version
* libxshmfence: url_for_version without spec.satisfies
* libxshmfence: mv url_for_version after directives

---------

Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2024-08-06 10:56:35 -07:00
Pranav Sivaraman
f3c21b0177 libdwarf: remove old versions with 0.10.1 (#45306) 2024-08-06 18:50:29 +02:00
Alex Leute
51ac4686b4 py-anvio and py-rich-argparse: new packages (#45367) 2024-08-06 17:52:18 +02:00
Michael Kuhn
82752ad0b7 rocksdb: add missing build dependencies (#45252) 2024-08-06 09:23:13 -06:00
Hariharan Devarajan
b231e6e9e9 Changes to DLIOProfiler and DFTracer Package (#45180)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-08-06 13:49:01 +02:00
Dave Keeshan
90f8c20133 verible: Add versions 0.0.3671 and 0.0.3667 (#44660) 2024-08-06 11:28:36 +02:00
Dave Keeshan
9835b072e2 yosys: add v0.42 2024-08-06 11:27:36 +02:00
Massimiliano Culpo
f438a33978 changa: add v3.5 (#45591) 2024-08-06 11:12:45 +02:00
Axel Huebl
8ded2ddf5e C-Blosc2: add v2.15.1 (#45582) 2024-08-06 02:54:24 -06:00
Gavin John
e3904d4cbf Fix spack url stats (#45584) 2024-08-06 02:54:01 -06:00
Bill Williams
e1bcbcf9f3 Score-P: Add remapping for rocmcc (#45316)
* Score-P: Add remapping for rocmcc

rocmcc -> amdclang for ScoreP

* [@spackbot] updating style on behalf of wrwilliams

---------

Co-authored-by: William Williams <william.williams@tu-dresden.de>
Co-authored-by: wrwilliams <wrwilliams@users.noreply.github.com>
2024-08-06 09:51:50 +02:00
Cameron Rutherford
fa671a639a hiop: update package.py with correct cusolver_lu CMake variable (#45332) 2024-08-06 09:40:56 +02:00
snehring
28171f1b9d diamond: add blast support and eigen (#45254)
Signed-off-by: Shane Nehring <snehring@iastate.edu>
2024-08-06 09:30:22 +02:00
Christopher Christofi
8de03e2bf5 py-numba4jax: add new package (#45481) 2024-08-06 09:17:41 +02:00
Massimiliano Culpo
2fa314b6b6 Avoid duplicate dependabot bumps (#45590)
* Avoid duplicate dependabot bumps

Example of a duplicate bump:
- https://github.com/spack/spack/pull/45124
- https://github.com/spack/spack/pull/45125

* Deduplicate "pip" ecosystem
2024-08-06 07:14:55 +00:00
alvaro-sch
7780059c64 orca: add v6.0.0 (#45489) 2024-08-06 09:13:42 +02:00
Satish Balay
7e69671570 petsc, py-petsc4py: add v3.21.4 (#45506) 2024-08-06 08:43:27 +02:00
Rocco Meli
5650d4d419 dbcsr: add v2.7.0 and +g2g variant (#45501)
Co-authored-by: RMeli <RMeli@users.noreply.github.com>
2024-08-06 08:40:09 +02:00
Andrew W Elble
fa38dd9386 gdrcopy: specify CUDA envvar during build (#45415)
otherwise /usr/local/cuda is used
2024-08-06 08:32:31 +02:00
Weiqun Zhang
16a2a5047c amrex: add v24.08 (#45543) 2024-08-06 08:10:53 +02:00
dependabot[bot]
899e458ee5 build(deps): bump flake8 in /.github/workflows/requirements/style (#45587)
Bumps [flake8](https://github.com/pycqa/flake8) from 7.1.0 to 7.1.1.
- [Commits](https://github.com/pycqa/flake8/compare/7.1.0...7.1.1)

---
updated-dependencies:
- dependency-name: flake8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-06 07:09:18 +02:00
dependabot[bot]
4a8d09dcc1 build(deps): bump flake8 from 7.1.0 to 7.1.1 in /lib/spack/docs (#45588)
Bumps [flake8](https://github.com/pycqa/flake8) from 7.1.0 to 7.1.1.
- [Commits](https://github.com/pycqa/flake8/compare/7.1.0...7.1.1)

---
updated-dependencies:
- dependency-name: flake8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-06 07:08:57 +02:00
Matthieu Dorier
98e206193b py-configspace: add main, 1.0.0, 1.0.1, 1.1.1, 1.1.2, 1.1.3, 1.1.4, fix url and fix cython dependency (#45193)
* [py-configspace] fix dependency on cython

* py-cython not needed starting from 1.0.0

* added py-configspace 1.0.0 and 1.0.1

* py-configspace: fix style

* added py-configspace version 1.1.0

* added py-configspace version 1.1.1

* py-configspace: two more versions and new maintainer

* py-configspace: fixed typo

* py-configspace: added version 1.1.4
2024-08-05 23:26:27 -05:00
Christopher Christofi
6a6c295938 r: add version 4.4.1 (#45564) 2024-08-05 18:45:27 -06:00
Tamara Dahlgren
9a1002c098 tix: skip implicit patch (#45244) 2024-08-05 17:34:26 -07:00
Zach Jibben
6c903543e1 Update Truchas package for 24.06 and 24.07 (#45583) 2024-08-05 16:40:56 -07:00
Jonathon Anderson
994d995b64 intel-xed: Rewrite recipe to match upstream install layout (v2) (#45155)
* intel-xed: Rewrite to use mbuild install procedure
  Fixes https://github.com/spack/spack/issues/41268
* hpctoolkit: depend on intel-xed +deprecated-includes
* intel-xed: add missing versions from 2024
* intel-xed: Verify dependencies on C/C++ compilers

---------

Signed-off-by: Jonathon Anderson <anderson.jonathonm@gmail.com>
2024-08-05 14:53:15 -07:00
Matt Thompson
54d17ae044 Update GFE packages (#45194)
* Update GFE packages
* Approve compiler depends_on
2024-08-05 14:00:23 -07:00
jmuddnv
9ea103f94e nvhpc: add v24.7 (#45511) 2024-08-05 21:49:59 +02:00
Richard Berger
83efafa09f Add language depends_on on several packages (#45298) 2024-08-05 21:48:58 +02:00
Jaroslav Hron
5f29bb9b22 petsc: fix zlib-api handling (#45545) 2024-08-05 21:24:50 +02:00
Luc Grosheintz
441b64c3d9 highfive: add v2.10.0 (#45486) 2024-08-05 21:16:54 +02:00
Sergey Kosukhin
cee6c59684 nag: add version 7.2.7203 (#45556) 2024-08-05 20:40:59 +02:00
Wouter Deconinck
b1adfcf665 seacas: limit to fmt@10 (#45565) 2024-08-05 13:11:45 -05:00
Michael Kuhn
433abfcc80 gcc: add 14.2.0 (#45577) 2024-08-05 11:01:09 -06:00
Wouter Deconinck
02063302c5 fastor: add git attribute, verify language dependency (#45549) 2024-08-05 18:56:36 +02:00
Massimiliano Culpo
b9125ae3e7 Do not halt concretization on unknown variants in externals (#45326)
* Do not halt concretization on unkwnown variants in externals
2024-08-05 09:24:57 -07:00
Pranav Sivaraman
0a2b63b032 highway: add v1.2.0 (#45335)
Co-authored-by: pranav-sivaraman <pranav-sivaraman@users.noreply.github.com>
2024-08-05 18:23:43 +02:00
SXS Bot
35d84a6456 spectre: add v2024.08.03 (#45575)
Co-authored-by: sxs-bot <sxs-bot@users.noreply.github.com>
2024-08-05 18:18:25 +02:00
jgraciahlrs
0257b2db4b libxcb: Set well-known locale for build (#45502)
* libxcb: Set well-known locale for build

Builds might fail if no valid locale is set. See https://www.linuxfromscratch.org/blfs/view/git/x/libxcb.html

* libxcb: fix style

* libxcb: change locale from en_US.UTF-8 to C.UTF-8

* libxcb: fix style

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

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

* [@spackbot] updating style on behalf of jgraciahlrs

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
Co-authored-by: jgraciahlrs <jgraciahlrs@users.noreply.github.com>
2024-08-05 08:47:38 -05:00
Wouter Deconinck
d3bf1e04fc py-vector: add through v1.4.1 (switch to hatchling) (#45527) 2024-08-05 10:45:57 +02:00
Auriane R.
530639e15f Use satisfies instead of if ... in spec in b* and c* directories (#45555) 2024-08-04 11:59:13 -06:00
Wouter Deconinck
c8695f2ba6 py-mypy: add v1.9.0, v1.10.1, v1.11.1 (#45542) 2024-08-04 13:08:04 +02:00
dependabot[bot]
f3bd820374 build(deps): bump pytest from 8.3.1 to 8.3.2 in /lib/spack/docs (#45461)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.1 to 8.3.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.3.1...8.3.2)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-04 05:44:52 +00:00
dependabot[bot]
29b9fe1f0b build(deps): bump black in /.github/workflows/requirements/style (#45561)
Bumps [black](https://github.com/psf/black) from 24.4.2 to 24.8.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/24.4.2...24.8.0)

---
updated-dependencies:
- dependency-name: black
  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>
2024-08-03 21:49:33 -05:00
dependabot[bot]
1090895e72 build(deps): bump black from 24.4.2 to 24.8.0 in /lib/spack/docs (#45563)
Bumps [black](https://github.com/psf/black) from 24.4.2 to 24.8.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/24.4.2...24.8.0)

---
updated-dependencies:
- dependency-name: black
  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>
2024-08-03 21:48:50 -05:00
dependabot[bot]
e983f4a858 build(deps): bump sphinx-design from 0.6.0 to 0.6.1 in /lib/spack/docs (#45562)
Bumps [sphinx-design](https://github.com/executablebooks/sphinx-design) from 0.6.0 to 0.6.1.
- [Release notes](https://github.com/executablebooks/sphinx-design/releases)
- [Changelog](https://github.com/executablebooks/sphinx-design/blob/main/CHANGELOG.md)
- [Commits](https://github.com/executablebooks/sphinx-design/compare/v0.6.0...v0.6.1)

---
updated-dependencies:
- dependency-name: sphinx-design
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-03 21:46:19 -05:00
Wouter Deconinck
72e3f10d5b ffmpeg: update patch hashes for addition of the X-Git-Tag (#45574) 2024-08-03 22:43:54 +02:00
Teague Sterling
c5ae5ba4db xfce4: new packages (#44646) 2024-08-03 13:29:48 +02:00
Alex Richert
a1090029f3 g2: add variants for recent releases (#45441) 2024-08-03 13:01:18 +02:00
Alex Richert
0135c808a0 landsfcutil: add testing with pfunit (#45449) 2024-08-03 13:00:15 +02:00
Alex Richert
678084fed8 bufr: add 12.1.0 (#45459) 2024-08-03 12:56:58 +02:00
Adam J. Stewart
705d58005d py-jax / JAX: add v0.4.31 (#45519) 2024-08-03 11:16:42 +02:00
Alex Richert
cee266046b sp: remove 'generated' tag (#45455) 2024-08-03 11:13:31 +02:00
dependabot[bot]
5aa3d9c39c build(deps): bump actions/upload-artifact from 4.3.4 to 4.3.5 (#45559)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.4 to 4.3.5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](0b2256b8c0...89ef406dd8)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-03 00:09:47 -06:00
dependabot[bot]
3ee6507dd6 build(deps): bump mypy from 1.11.0 to 1.11.1 in /lib/spack/docs (#45530)
Bumps [mypy](https://github.com/python/mypy) from 1.11.0 to 1.11.1.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.11...v1.11.1)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-02 17:01:25 -06:00
Todd Gamblin
425bba2f1a Allow spec queries by namespace (#45416)
* Allow spec queries by `namespace`

Spack specs have "namespaces" that indicate what package repository they come from, but
there has not been a way to use the spec syntax to match one.

You can say things like this:

```console
spack find builtin.zlib
spack find myrepo.zlib
```

But, because namespaces are written as a dot-separated prefix on the name, you can't say
"find me all specs in namespace myrepo". The syntax doesn't allow it.

This PR allows you to specify anonymous specs with namespaces on the CLI. Specifically
you can do queries like this:

```console
spack find namespace=builtin
spack find namespace=myrepo
```

You can use this anywhere else you use spec syntax, e.g. in a config file to separate
installations based on what repo they came from:

```yaml
spack:
    config:
        install_tree:
            root: $spack/opt/spack
            projections:
                namespace=myrepo: "myrepo_special_path/{name}-{hash}"
                namespace=builtin: "builtin/{name}-{hash}"
```

This PR adds a special `namespace_if_anonymous` attribute to specs, which returns the
`namespace` if the spec has no name, otherwise it returns `None`. This allows us to
print the namespace for anonymous specs but to continue hiding it for most views, as
we've done so far.

This is implemented as a special case, but it's one that already exists, along with
`platform`, `os`, `target`, etc. This also reserves existing special case names for
variants so that users cannot define them in their package files. This change is
potentially breaking, but I do not think it will be common. There are no builtin
packages with a variant called `namespace`, and defining `os`, `target`, or `platform`
as a variant would've likely caused other problems if they were already being used.

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-08-02 13:38:14 -05:00
Wouter Deconinck
a2cbc46dbc openblas: fix AttributeError when threads=openmp (#45338) 2024-08-02 12:19:06 -06:00
Wouter Deconinck
8538b0c01d xmlto: hotfix upstream patch removed by fedora (#45551) 2024-08-02 08:33:17 -06:00
Teague Sterling
ff30da7385 py-glean-sdk: new package (#45389)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
Co-authored-by: Bernhard Kaindl <bernhardkaindl7@gmail.com>
2024-08-02 07:29:36 -06:00
Alex Richert
7c5771ed11 ncio: add check function to run unit tests (#45448) 2024-08-02 11:36:01 +02:00
Alex Richert
81fb1a9b8f bacio: remove an old maintainer and 'generated' tags (#45440) 2024-08-02 11:33:37 +02:00
Alex Richert
835bd2557e g2c: remove the 'generated' tag (which is correct) (#45442) 2024-08-02 11:25:31 +02:00
Alex Richert
e5a8d7be49 gfsio: add testing with pfunit (#45444) 2024-08-02 11:24:54 +02:00
Alex Richert
9f795de60b nemsio: add check to run the unit tests (#45450) 2024-08-02 11:22:20 +02:00
Alex Richert
7791a30bc2 nemsiogfs: add running the unit tests (#45451) 2024-08-02 11:21:35 +02:00
Alex Richert
2e85c83301 sfcio: add unit testing with pfunit (#45453) 2024-08-02 11:20:44 +02:00
Alex Richert
251190a0c4 sigio: add unit testing with pfunit (#45454) 2024-08-02 11:19:41 +02:00
Alex Richert
90b85239d5 wrf-io: remove 'generated' tags (which are correct) (#45458) 2024-08-02 11:16:45 +02:00
Alex Richert
f276a8da75 w3emc: add @2.12.0, conflict on +shared~pic (#45456) 2024-08-02 11:16:05 +02:00
Alex Richert
93799ec641 w3nco: remove 'generated' tags (which are correct) (#45457) 2024-08-02 11:13:33 +02:00
Alex Richert
dddc056a29 prod-util: remove 'generated' tags (which are correct) (#45452) 2024-08-02 11:13:03 +02:00
Alex Richert
3e6d9cdc06 g2tmpl: remove 'generated' tags (which are correct) (#45443) 2024-08-02 11:12:29 +02:00
Alex Richert
091786411b grib-util: remove 'generated' tags (which are correct) (#45445) 2024-08-02 11:11:26 +02:00
Alex Richert
4af09dd506 ip2: remove 'generated' tags (which are correct) (#45447) 2024-08-02 11:10:53 +02:00
Adam J. Stewart
2626bff96d py-numpy: "@1.23:" add conflict for "%gcc@:6.4" (#45468) 2024-08-02 10:33:37 +02:00
jgraciahlrs
9ef1d609e2 py-markupsafe: add depends_on("python@3.7:", when="@2.0:") (#45503)
As per PyPI, recent versions of py-markupsafe (>=2) require Python >=3.7.
2024-08-02 10:28:25 +02:00
Wouter Deconinck
4c60deb992 xrootd: add github as secondary url to avoid SSL issues (#45512) 2024-08-02 10:24:00 +02:00
Adam J. Stewart
53bc782278 pthreadpool: use same flags as PyTorch (#45521) 2024-08-02 10:11:24 +02:00
Wouter Deconinck
4e087349a4 py-particle: add v0.23.1, v0.24.0 (#45528)
* py-particle: add v0.23.1, v0.24.0

* [@spackbot] updating style on behalf of wdconinc

---------

Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
2024-08-02 10:04:56 +02:00
Juan Miguel Carceller
53815b725a groff: Add missing depends_on("m4") (#45552) 2024-08-02 09:45:44 +02:00
eugeneswalker
e8c8e7b8a8 e4s oneapi ci: try enabling some disabled specs (#45355) 2024-08-01 21:25:30 -07:00
Seth R. Johnson
b781ce5b0f libspng: add maintainer, fix dependencies, args (#45410)
* libspng: add maintainer, fix dependencies, args

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

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

* Fix syntax error

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

---------

Co-authored-by: Alec Scott <hi@alecbcs.com>
2024-08-01 21:03:27 -06:00
Juan Miguel Carceller
a3c3f4c3d1 root: Add patch to fix TUri (#45428)
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2024-08-01 19:40:15 -07:00
Diego Alvarez S.
445b6dfcf8 Add blast+ v2.15.0, v2.16.0 (#45425) 2024-08-01 19:39:03 -07:00
Wouter Deconinck
b2ef64369f perl: add v5.40.0 (#45287)
Co-authored-by: Bernhard Kaindl <bernhardkaindl7@gmail.com>
2024-08-01 20:33:41 -06:00
Juan Miguel Carceller
a8d2ea68f5 gaudi: add versions 38.2 and 38.3 and limit the version of fmt (#45466)
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
2024-08-01 19:20:22 -07:00
afzpatel
c7a437573b py-tensorflow: change url for 2.16.1-rocm-enhanced (#45539)
* change url for 2.16.1-rocm-enhanced

* fix typo
2024-08-01 19:51:33 -06:00
Chris Marsh
5736d1e206 py-xarray: Update and ensure dask compatibility (#45537)
* Add 2024.7 and new +viz variant as per pyproject.toml

* Ensure dask/xarray versions are compatible
2024-08-01 18:21:28 -07:00
Teague Sterling
e110e3c3af py-zstandard: new package (#45388)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
Co-authored-by: Bernhard Kaindl <bernhardkaindl7@gmail.com>
2024-08-01 18:43:10 -06:00
Teague Sterling
e2d8b581db py-glean-parser: new package (#45390)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
Co-authored-by: Bernhard Kaindl <bernhardkaindl7@gmail.com>
2024-08-01 18:37:35 -06:00
Thomas Madlener
10a4de8e04 edm4hep: Add v0.99 release and deprecate older versions (#45516)
* edm4hep: Add v0.99 and deprecated older versions

* edm4hep: Fix nlohmann-json dependency version

* Keep 0.10.5 undeprecated
2024-08-01 18:26:42 -06:00
Todd Gamblin
96ddbd5e17 format: allow spaces in format specifiers (#45487)
* format: allow spaces in format specifiers

Key-value pair format specifiers can now contain spaces in the key. This allows us to
add spaces to format strings that are *only* present when the attribute formatted is not
``None``. Instead of writing:

```
    {arch=architecture}
```

and special casing `arch=` like a sigil in `Spec.format()`, we can now write:

```
    { arch=architecture}
```

And the space is *only* printed when `architecture` is not `None`. This allows us to
remove the special case in `Spec.format()` for `arch=`.

Previously the only `key=` prefix allowed in format specifiers was `arch=`, but this PR
removes that requirement, and the `key=` part of a key-value specifier can be any name.
It does *not* have to correspond to the formatted attribute.

- [x] modify `SPEC_FORMAT_RE` to allow arbitrary keys in key-value pairs.
- [x] remove special case for `arch=` from `Spec.format()`.
- [x] modify format strings using `{arch=architecture}` to use `{ arch=architecture}`
- [x] add more tests for formatting

This PR saves other more complex attributes like compiler flags and their spacing for later.

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-08-01 18:20:43 -06:00
Stephen Nicholas Swatman
65b530e7ec detray: add versions 0.70.0 through 0.72.1 (#45541)
* detray: add versions 0.69.1 through 0.72.1

This commit adds four new versions of the detray package.

* Remove v0.69.0
2024-08-01 17:55:58 -06:00
Auriane R.
de98e3d6e5 Update if ... in spec with satisfies in a* dirs (#44822) 2024-08-01 18:21:37 -05:00
John W. Parent
ffcb4ee487 Windows msvsc: Report accurate platform toolset version for VS2022 (#45525)
VC toolset versions 144 and 143 are both associated with the platform
toolset 143; this deviates from prior version choices made by the
MSVC devs; add a special case to report platform toolset version
as 143 when VC toolset version is >= 143 (this will need revisiting
for later releases).
2024-08-01 11:27:17 -07:00
Teague Sterling
bfba3c9d5c py-attrs: add v17.4.0 (#45385)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-08-01 11:04:37 -07:00
Teague Sterling
37e56ea24d py-pyrsistent: add v0.14.0 (#45387)
* py-pyrsistent: add v0.1.4.0 & conflict

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

* Update package.py

---------

Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-08-01 10:52:20 -07:00
Alex Richert
453e8c71ac ip: add v5.1.0 (#45331)
* ip: add v5.1.0

* [@spackbot] updating style on behalf of AlexanderRichert-NOAA

* Update package.py

* Update package.py
2024-08-01 10:33:13 -07:00
James Taliaferro
e669fcafd0 kakoune: add v2024.05.18 (#45460)
* update Kakoune, explicitly make install dirs first

* blacken
2024-08-01 09:40:28 -07:00
Stephen Hudson
2dbbcf3ca5 py-libensemble: add v1.4.0, v1.4.1 (#45463)
* libEnsemble: add v1.4.0

* libEnsemble: add v1.4.1
2024-08-01 09:39:10 -07:00
Christopher Christofi
bce710eec1 py-flax: add v0.8.5 (#45480) 2024-08-01 09:09:00 -07:00
Thomas Madlener
64a69796e2 lcio: add v2.22.1 (#45517)
* lcio: add latest version 2.22.1

* lcio: update sio dependency to match actual requirements
2024-08-01 08:56:04 -07:00
rfbgo
dd460a0eb0 py-torch-nvidia-apex: add v22.03 -> v24.04.01 (#45176) 2024-08-01 11:47:45 +02:00
Manuela Kuhn
475fe9977a py-rsatoolbox: add v0.1.5 (#45484) 2024-08-01 10:53:41 +02:00
Adam J. Stewart
b86e42a5aa py-sphinx: add v8.0 (#45520) 2024-08-01 08:40:29 +02:00
Claudia Comito
9f04c45dea py-heat: add v1.4.2 (#45317) 2024-08-01 05:38:30 +02:00
Szabolcs Horvát
20e6b60fce py-igraph: add 0.11.6 (#45132) 2024-08-01 05:34:20 +02:00
Teague Sterling
5f86ee5d93 scala: add v2.12.13 -> v2.12.19, v2.13.10, 2.13.14 (#45477)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-08-01 05:18:46 +02:00
Wouter Deconinck
84ad509621 py-onnxruntime: add v1.17.3 (#44500) 2024-08-01 04:17:56 +02:00
Rémi Lacroix
ea0da49acb OpenFOAM-org: Add missing dependency on readline for @:9 (#44482)
The setSet tool (removed in version 10) has an optional dependency on readline.
The build script will use the system readline if not provided by Spack.
2024-08-01 03:59:00 +02:00
Christopher Christofi
e77fbfe8f8 py-jaxtyping: new package (#45482) 2024-08-01 03:50:48 +02:00
Teague Sterling
d485650369 py-build: new package (#45478)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-08-01 03:47:33 +02:00
Melven Roehrig-Zoellner
c1f22ca5cb tixi: add python variant (sets PYTHONPATH and LD_LIBRARY_PATH) (#44592) 2024-08-01 03:44:11 +02:00
Melven Roehrig-Zoellner
c5d1c9ae61 t8code: fix build with gcc14 2024-08-01 03:26:56 +02:00
Melven Roehrig-Zoellner
d8184b37a3 py-pylint-gitlab: new package 2024-08-01 03:20:40 +02:00
Melven Roehrig-Zoellner
bd952a552f py-anybadge: new package 2024-08-01 03:20:40 +02:00
Cameron Smith
aa171a6cc9 omegah: Update c/c++ language deps (#45303)
Signed-off-by: Cameron Smith <smithc11@rpi.edu>
2024-08-01 03:06:00 +02:00
Alex Richert
e4ee59741e grib-util: Add 1.5.0 (#45310) 2024-08-01 02:23:31 +02:00
Manuela Kuhn
b3b9f4d4b7 py-pybv: new package (#45370) 2024-08-01 02:07:11 +02:00
Manuela Kuhn
c1f2b36854 py-edfio: add v0.4.3 and py-poetry-dynamic-versioning: add v1.4.0, fix url (#45369) 2024-08-01 02:06:05 +02:00
Vincent Michaud-Rioux
87494d2941 py-pennylane: Add 0.36 and 0.37 with deps (#45134) 2024-07-31 22:55:02 +02:00
Ian Lumsden
ad26dcfbfc flux-core,flux-sched: fix environments with external flux (#44775) 2024-07-31 21:36:51 +02:00
Vlad Savelyev
5541a184d5 py-multiqc: add v1.23 (#45325) 2024-07-31 21:16:21 +02:00
Manuela Kuhn
f1140055d0 py-pymatreader: Add v0.0.32 (#45366) 2024-07-31 21:06:15 +02:00
Manuela Kuhn
88782fb05a py-eeglabio: new package (#45372) 2024-07-31 21:04:44 +02:00
Manuela Kuhn
69d216a88e py-edflib-python: new package (#45371) 2024-07-31 21:03:26 +02:00
Wouter Deconinck
04f0af0a28 acts,dd4hep: restrict to podio@0 to prevent failures with podio@1 (#44825)
* dd4hep: restrict to podio@0 to prevent failures with podio@1

* acts: restrict to podio@0 to prevent failures with podio@1

* dd4hep: close when range for podio

* acts: close when range for podio

* acts: fix when range for podio

* acts: close when range for podio

* acts,dd4hep: ensure main/master still depends on podio
2024-07-31 20:51:38 +02:00
Wouter Deconinck
c71c7735fd py-globus-sdk: add through v3.42; pypi now uses underscores (#45349) 2024-07-31 20:48:06 +02:00
Teague Sterling
89bc483c87 py-cffi: add v1.16.0 (#45386)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
2024-07-31 20:16:49 +02:00
Felix Thaler
62d2e8d1f4 libvterm: Fix download: Use download from launchpad.net (#45094) 2024-07-31 19:14:18 +02:00
ron minnich
12abc233d0 mpigraph: new package (LLNL mpigraph) (#45121)
Signed-off-by: Ron Minnich <rminnich@google.com>
2024-07-31 19:08:48 +02:00
Andrew W Elble
c30c5df340 libxcb: xcb-proto is a build dependency (#45523) 2024-07-31 10:48:21 -04:00
Mikael Simberg
4a088f717e pika: add v0.26.1 (#45515) 2024-07-31 02:52:55 -06:00
Christopher Christofi
9a10538f6d openslide: add new version 4.0.0 (#42158)
* openslide: add new version 4.0.0

* openslide: update dependency organization
2024-07-31 09:27:34 +01:00
arezaii
c753446353 Chapel package: updates post release (#45304)
* Fix +rocm variant, to ensure correct dependencies on ROCm packages
  and use of AMD LLVM
* Add a +pshm variant for comm=gasnet to enable fast shared-memory
  comms between co-locales
* Add logic to ensure we get the native CXI libfabric network provider
  on Cray EX
* Expand dependency type for package modules to encompass runtime
  dependencies
* Factor logic for setting (LD_)LIBRARY_PATH and PKG_CONFIG_PATH of
  runtime dependencies
* Workaround issue #44746 that causes a transitive dependency on lua
  to break SLURM
* Disable nonfunctional checkChplDoc test
* Annotate some variants as conditional, to improve spack info output
  and reduce confusion

---------

Co-authored-by: Dan Bonachea <dobonachea@lbl.gov>
2024-07-30 18:24:56 -07:00
Chris Marsh
65a15c6145 Mac OS UUID virtual: platform-specific virtuals not correctly prioritized (#43002)
`apple-libuuid` includes types that aren't available in other `uuid`
providers; this cause issues in consuming packages (e.g., py-matplotlib)
that use SDKs like CarbonCore.framework when they attempt to use
`util-linux-uuid` as a `uuid` provider on Mac OS.

Tweak `util-linux-uuid` to indicate that it does not provide `uuid`
on Mac OS.
2024-07-30 11:38:07 -06:00
dependabot[bot]
e563f84ae2 build(deps): bump docker/setup-buildx-action from 3.5.0 to 3.6.1 (#45495)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.5.0 to 3.6.1.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](aa33708b10...988b5a0280)

---
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>
2024-07-30 07:57:15 -07:00
Teague Sterling
622ad1ddd7 perl-bio-ensembl-funcgen: new package (#44508)
* Adding the perl-bio-ensembl-funcgen package

* Update package.py

* Update package.py
2024-07-30 11:17:29 +01:00
jmlapre
1bd17876ed trilinos: add v16.0.0 (#45402) 2024-07-29 23:23:11 -06:00
Richard Berger
a789689709 py-furo: add new versions (#45439) 2024-07-29 19:58:43 -06:00
Teo
171a2e0e31 add new maintainer (#45436) 2024-07-29 19:58:14 -06:00
Seth R. Johnson
66d3fddedf Remove maintainership from packages I have no stake in (#45435) 2024-07-29 16:23:00 -06:00
RichardBuntLinaro
14a3b13900 linaro-forge: added 24.0.3 version (#45430) 2024-07-29 09:31:14 -06:00
Teague Sterling
40d41455db perl-bio-ensembl: new package (#44506)
* Adding perl-bio-ensembl package

* Fixing checksums

* Update package.py
2024-07-29 13:33:09 +01:00
Todd Gamblin
d63ead25ac add spack audit configs to ci
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-07-29 01:30:14 -07:00
Todd Gamblin
4a35dec206 wasi-sdk: add default provider
This was missed in #45394 because we don't run unit tests for package PRs, and
`test_all_virtual_packages_have_default_providers`, which would've caught it, is a unit
test, not an audit.

- [x] add a default provider for `wasi-sdk` in `etc/spack/defaults/packages.yaml` (which
      we require for all virtuals)
- [x] rework `test_all_virtual_packages_have_default_providers` as an audit called
      `_ensure_all_virtual_packages_have_default_providers`

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-07-29 01:30:14 -07:00
Matt Jolly
c294b9d3b9 meson: add v1.4.2, v1.5.1 (#45384)
Also deprecate old and superseded versions
2024-07-29 09:02:48 +02:00
429 changed files with 4751 additions and 1655 deletions

View File

@@ -5,14 +5,10 @@ updates:
directory: "/"
schedule:
interval: "daily"
# Requirements to build documentation
- package-ecosystem: "pip"
directory: "/lib/spack/docs"
schedule:
interval: "daily"
# Requirements to run style checks
# Requirements to run style checks and build documentation
- package-ecosystem: "pip"
directories:
- "/.github/workflows/requirements/*"
- "/.github/workflows/requirements/style/*"
- "/lib/spack/docs"
schedule:
interval: "daily"

View File

@@ -44,6 +44,7 @@ jobs:
run: |
. share/spack/setup-env.sh
coverage run $(which spack) audit packages
coverage run $(which spack) audit configs
coverage run $(which spack) -d audit externals
coverage combine
coverage xml
@@ -52,6 +53,7 @@ jobs:
run: |
. share/spack/setup-env.sh
spack -d audit packages
spack -d audit configs
spack -d audit externals
- name: Package audits (without coverage)
if: ${{ runner.os == 'Windows' }}
@@ -59,6 +61,8 @@ jobs:
. share/spack/setup-env.sh
spack -d audit packages
./share/spack/qa/validate_last_exit.ps1
spack -d audit configs
./share/spack/qa/validate_last_exit.ps1
spack -d audit externals
./share/spack/qa/validate_last_exit.ps1
- uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673

View File

@@ -87,7 +87,7 @@ jobs:
fi
- name: Upload Dockerfile
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a
with:
name: dockerfiles_${{ matrix.dockerfile[0] }}
path: dockerfiles
@@ -96,7 +96,7 @@ jobs:
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@aa33708b10e362ff993539393ff100fa93ed6a27
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db
- name: Log in to GitHub Container Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
@@ -126,7 +126,7 @@ jobs:
needs: deploy-images
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@0b2256b8c012f0828dc542b3febcab082c67f72b
uses: actions/upload-artifact/merge@834a144ee995460fba8ed112a2fc961b36a5ec5a
with:
name: dockerfiles
pattern: dockerfiles_*

View File

@@ -1,6 +1,6 @@
black==24.4.2
black==24.8.0
clingo==5.7.1
flake8==7.1.0
flake8==7.1.1
isort==5.13.2
mypy==1.8.0
types-six==1.16.21.20240513

View File

@@ -61,6 +61,7 @@ packages:
tbb: [intel-tbb]
unwind: [libunwind]
uuid: [util-linux-uuid, libuuid]
wasi-sdk: [wasi-sdk-prebuilt]
xxd: [xxd-standalone, vim]
yacc: [bison, byacc]
ziglang: [zig]

View File

@@ -1,13 +1,13 @@
sphinx==7.4.7
sphinxcontrib-programoutput==0.17
sphinx_design==0.6.0
sphinx_design==0.6.1
sphinx-rtd-theme==2.0.0
python-levenshtein==0.25.1
docutils==0.20.1
pygments==2.18.0
urllib3==2.2.2
pytest==8.3.1
pytest==8.3.2
isort==5.13.2
black==24.4.2
flake8==7.1.0
mypy==1.11.0
black==24.8.0
flake8==7.1.1
mypy==1.11.1

View File

@@ -351,6 +351,22 @@ def _wrongly_named_spec(error_cls):
return errors
@config_packages
def _ensure_all_virtual_packages_have_default_providers(error_cls):
"""All virtual packages must have a default provider explicitly set."""
configuration = spack.config.create()
defaults = configuration.get("packages", scope="defaults")
default_providers = defaults["all"]["providers"]
virtuals = spack.repo.PATH.provider_index.providers
default_providers_filename = configuration.scopes["defaults"].get_section_filename("packages")
return [
error_cls(f"'{virtual}' must have a default provider in {default_providers_filename}", [])
for virtual in virtuals
if virtual not in default_providers
]
def _make_config_error(config_data, summary, error_cls):
s = io.StringIO()
s.write("Occurring in the following file:\n")

View File

@@ -139,6 +139,10 @@ def configure(self, pkg, spec, prefix):
args = ["--verbose", "--target-dir", inspect.getmodule(self.pkg).python_platlib]
args.extend(self.configure_args())
# https://github.com/Python-SIP/sip/commit/cb0be6cb6e9b756b8b0db3136efb014f6fb9b766
if spec["py-sip"].satisfies("@6.1.0:"):
args.extend(["--scripts-dir", pkg.prefix.bin])
sip_build = Executable(spec["py-sip"].prefix.bin.join("sip-build"))
sip_build(*args)

View File

@@ -71,7 +71,7 @@
# TODO: Remove this in Spack 0.23
SHARED_PR_MIRROR_URL = "s3://spack-binaries-prs/shared_pr_mirror"
JOB_NAME_FORMAT = (
"{name}{@version} {/hash:7} {%compiler.name}{@compiler.version}{arch=architecture}"
"{name}{@version} {/hash:7} {%compiler.name}{@compiler.version}{ arch=architecture}"
)
IS_WINDOWS = sys.platform == "win32"
spack_gpg = spack.main.SpackCommand("gpg")

View File

@@ -237,7 +237,7 @@ def ensure_single_spec_or_die(spec, matching_specs):
if len(matching_specs) <= 1:
return
format_string = "{name}{@version}{%compiler.name}{@compiler.version}{arch=architecture}"
format_string = "{name}{@version}{%compiler.name}{@compiler.version}{ arch=architecture}"
args = ["%s matches multiple packages." % spec, "Matching packages:"]
args += [
colorize(" @K{%s} " % s.dag_hash(7)) + s.cformat(format_string) for s in matching_specs

View File

@@ -339,7 +339,7 @@ def add(self, pkg_name, fetcher):
for pkg_cls in spack.repo.PATH.all_package_classes():
npkgs += 1
for v in pkg_cls.versions:
for v in list(pkg_cls.versions):
try:
pkg = pkg_cls(spack.spec.Spec(pkg_cls.name))
fetcher = fs.for_package_version(pkg, v)

View File

@@ -231,24 +231,55 @@ def msvc_version(self):
@property
def short_msvc_version(self):
"""This is the shorthand VCToolset version of form
MSVC<short-ver>
"""
This is the shorthand VCToolset version of form
MSVC<short-ver> *NOT* the full version, for that see
return "MSVC" + self.vc_toolset_ver
@property
def vc_toolset_ver(self):
"""
The toolset version is the version of the combined set of cl and link
This typically relates directly to VS version i.e. VS 2022 is v143
VS 19 is v142, etc.
This value is defined by the first three digits of the major + minor
version of the VS toolset (143 for 14.3x.bbbbb). Traditionally the
minor version has remained a static two digit number for a VS release
series, however, as of VS22, this is no longer true, both
14.4x.bbbbb and 14.3x.bbbbb are considered valid VS22 VC toolset
versions due to a change in toolset minor version sentiment.
This is *NOT* the full version, for that see
Msvc.msvc_version or MSVC.platform_toolset_ver for the
raw platform toolset version
"""
ver = self.platform_toolset_ver
return "MSVC" + ver
ver = self.msvc_version[:2].joined.string[:3]
return ver
@property
def platform_toolset_ver(self):
"""
This is the platform toolset version of current MSVC compiler
i.e. 142.
i.e. 142. The platform toolset is the targeted MSVC library/compiler
versions by compilation (this is different from the VC Toolset)
This is different from the VC toolset version as established
by `short_msvc_version`
by `short_msvc_version`, but typically are represented by the same
three digit value
"""
return self.msvc_version[:2].joined.string[:3]
# Typically VS toolset version and platform toolset versions match
# VS22 introduces the first divergence of VS toolset version
# (144 for "recent" releases) and platform toolset version (143)
# so it needs additional handling until MS releases v144
# (assuming v144 is also for VS22)
# or adds better support for detection
# TODO: (johnwparent) Update this logic for the next platform toolset
# or VC toolset version update
toolset_ver = self.vc_toolset_ver
vs22_toolset = Version(toolset_ver) > Version("142")
return toolset_ver if not vs22_toolset else "143"
def _compiler_version(self, compiler):
"""Returns version object for given compiler"""

View File

@@ -81,7 +81,17 @@ class OpenMpi(Package):
]
#: These are variant names used by Spack internally; packages can't use them
reserved_names = ["patches", "dev_path"]
reserved_names = [
"arch",
"architecture",
"dev_path",
"namespace",
"operating_system",
"os",
"patches",
"platform",
"target",
]
#: Names of possible directives. This list is mostly populated using the @directive decorator.
#: Some directives leverage others and in that case are not automatically added.

View File

@@ -328,19 +328,26 @@ def next_spec(
if not self.ctx.next_token:
return initial_spec
def add_dependency(dep, **edge_properties):
"""wrapper around root_spec._add_dependency"""
try:
root_spec._add_dependency(dep, **edge_properties)
except spack.error.SpecError as e:
raise SpecParsingError(str(e), self.ctx.current_token, self.literal_str) from e
initial_spec = initial_spec or spack.spec.Spec()
root_spec = SpecNodeParser(self.ctx).parse(initial_spec)
root_spec = SpecNodeParser(self.ctx, self.literal_str).parse(initial_spec)
while True:
if self.ctx.accept(TokenType.START_EDGE_PROPERTIES):
edge_properties = EdgeAttributeParser(self.ctx, self.literal_str).parse()
edge_properties.setdefault("depflag", 0)
edge_properties.setdefault("virtuals", ())
dependency = self._parse_node(root_spec)
root_spec._add_dependency(dependency, **edge_properties)
add_dependency(dependency, **edge_properties)
elif self.ctx.accept(TokenType.DEPENDENCY):
dependency = self._parse_node(root_spec)
root_spec._add_dependency(dependency, depflag=0, virtuals=())
add_dependency(dependency, depflag=0, virtuals=())
else:
break
@@ -348,7 +355,7 @@ def next_spec(
return root_spec
def _parse_node(self, root_spec):
dependency = SpecNodeParser(self.ctx).parse()
dependency = SpecNodeParser(self.ctx, self.literal_str).parse()
if dependency is None:
msg = (
"the dependency sigil and any optional edge attributes must be followed by a "
@@ -367,10 +374,11 @@ def all_specs(self) -> List["spack.spec.Spec"]:
class SpecNodeParser:
"""Parse a single spec node from a stream of tokens"""
__slots__ = "ctx", "has_compiler", "has_version"
__slots__ = "ctx", "has_compiler", "has_version", "literal_str"
def __init__(self, ctx):
def __init__(self, ctx, literal_str):
self.ctx = ctx
self.literal_str = literal_str
self.has_compiler = False
self.has_version = False
@@ -388,7 +396,8 @@ def parse(
if not self.ctx.next_token or self.ctx.expect(TokenType.DEPENDENCY):
return initial_spec
initial_spec = initial_spec or spack.spec.Spec()
if initial_spec is None:
initial_spec = spack.spec.Spec()
# If we start with a package name we have a named spec, we cannot
# accept another package name afterwards in a node
@@ -405,12 +414,21 @@ def parse(
elif self.ctx.accept(TokenType.FILENAME):
return FileParser(self.ctx).parse(initial_spec)
def raise_parsing_error(string: str, cause: Optional[Exception] = None):
"""Raise a spec parsing error with token context."""
raise SpecParsingError(string, self.ctx.current_token, self.literal_str) from cause
def add_flag(name: str, value: str, propagate: bool):
"""Wrapper around ``Spec._add_flag()`` that adds parser context to errors raised."""
try:
initial_spec._add_flag(name, value, propagate)
except Exception as e:
raise_parsing_error(str(e), e)
while True:
if self.ctx.accept(TokenType.COMPILER):
if self.has_compiler:
raise spack.spec.DuplicateCompilerSpecError(
f"{initial_spec} cannot have multiple compilers"
)
raise_parsing_error("Spec cannot have multiple compilers")
compiler_name = self.ctx.current_token.value[1:]
initial_spec.compiler = spack.spec.CompilerSpec(compiler_name.strip(), ":")
@@ -418,9 +436,7 @@ def parse(
elif self.ctx.accept(TokenType.COMPILER_AND_VERSION):
if self.has_compiler:
raise spack.spec.DuplicateCompilerSpecError(
f"{initial_spec} cannot have multiple compilers"
)
raise_parsing_error("Spec cannot have multiple compilers")
compiler_name, compiler_version = self.ctx.current_token.value[1:].split("@")
initial_spec.compiler = spack.spec.CompilerSpec(
@@ -434,9 +450,8 @@ def parse(
or self.ctx.accept(TokenType.VERSION)
):
if self.has_version:
raise spack.spec.MultipleVersionError(
f"{initial_spec} cannot have multiple versions"
)
raise_parsing_error("Spec cannot have multiple versions")
initial_spec.versions = spack.version.VersionList(
[spack.version.from_string(self.ctx.current_token.value[1:])]
)
@@ -445,29 +460,25 @@ def parse(
elif self.ctx.accept(TokenType.BOOL_VARIANT):
variant_value = self.ctx.current_token.value[0] == "+"
initial_spec._add_flag(
self.ctx.current_token.value[1:].strip(), variant_value, propagate=False
)
add_flag(self.ctx.current_token.value[1:].strip(), variant_value, propagate=False)
elif self.ctx.accept(TokenType.PROPAGATED_BOOL_VARIANT):
variant_value = self.ctx.current_token.value[0:2] == "++"
initial_spec._add_flag(
self.ctx.current_token.value[2:].strip(), variant_value, propagate=True
)
add_flag(self.ctx.current_token.value[2:].strip(), variant_value, propagate=True)
elif self.ctx.accept(TokenType.KEY_VALUE_PAIR):
match = SPLIT_KVP.match(self.ctx.current_token.value)
assert match, "SPLIT_KVP and KEY_VALUE_PAIR do not agree."
name, delim, value = match.groups()
initial_spec._add_flag(name, strip_quotes_and_unescape(value), propagate=False)
name, _, value = match.groups()
add_flag(name, strip_quotes_and_unescape(value), propagate=False)
elif self.ctx.accept(TokenType.PROPAGATED_KEY_VALUE_PAIR):
match = SPLIT_KVP.match(self.ctx.current_token.value)
assert match, "SPLIT_KVP and PROPAGATED_KEY_VALUE_PAIR do not agree."
name, delim, value = match.groups()
initial_spec._add_flag(name, strip_quotes_and_unescape(value), propagate=True)
name, _, value = match.groups()
add_flag(name, strip_quotes_and_unescape(value), propagate=True)
elif self.ctx.expect(TokenType.DAG_HASH):
if initial_spec.abstract_hash:

View File

@@ -1438,16 +1438,14 @@ def condition(
# caller, we won't emit partial facts.
condition_id = next(self._id_counter)
self.gen.fact(fn.pkg_fact(required_spec.name, fn.condition(condition_id)))
self.gen.fact(fn.condition_reason(condition_id, msg))
trigger_id = self._get_condition_id(
required_spec, cache=self._trigger_cache, body=True, transform=transform_required
)
self.gen.fact(fn.pkg_fact(required_spec.name, fn.condition(condition_id)))
self.gen.fact(fn.condition_reason(condition_id, msg))
self.gen.fact(
fn.pkg_fact(required_spec.name, fn.condition_trigger(condition_id, trigger_id))
)
if not imposed_spec:
return condition_id
@@ -1696,19 +1694,43 @@ def external_packages(self):
spack.spec.parse_with_version_concrete(x["spec"]) for x in externals
]
external_specs = []
selected_externals = set()
if spec_filters:
for current_filter in spec_filters:
current_filter.factory = lambda: candidate_specs
external_specs.extend(current_filter.selected_specs())
else:
external_specs.extend(candidate_specs)
selected_externals.update(current_filter.selected_specs())
# Emit facts for externals specs. Note that "local_idx" is the index of the spec
# in packages:<pkg_name>:externals. This means:
#
# packages:<pkg_name>:externals[local_idx].spec == spec
external_versions = []
for local_idx, spec in enumerate(candidate_specs):
msg = f"{spec.name} available as external when satisfying {spec}"
if spec_filters and spec not in selected_externals:
continue
if not spec.versions.concrete:
warnings.warn(f"cannot use the external spec {spec}: needs a concrete version")
continue
def external_imposition(input_spec, requirements):
return requirements + [
fn.attr("external_conditions_hold", input_spec.name, local_idx)
]
try:
self.condition(spec, spec, msg=msg, transform_imposed=external_imposition)
except (spack.error.SpecError, RuntimeError) as e:
warnings.warn(f"while setting up external spec {spec}: {e}")
continue
external_versions.append((spec.version, local_idx))
self.possible_versions[spec.name].add(spec.version)
self.gen.newline()
# Order the external versions to prefer more recent versions
# even if specs in packages.yaml are not ordered that way
external_versions = [
(x.version, external_id) for external_id, x in enumerate(external_specs)
]
external_versions = [
(v, idx, external_id)
for idx, (v, external_id) in enumerate(sorted(external_versions, reverse=True))
@@ -1718,19 +1740,6 @@ def external_packages(self):
DeclaredVersion(version=version, idx=idx, origin=Provenance.EXTERNAL)
)
# Declare external conditions with a local index into packages.yaml
for local_idx, spec in enumerate(external_specs):
msg = "%s available as external when satisfying %s" % (spec.name, spec)
def external_imposition(input_spec, requirements):
return requirements + [
fn.attr("external_conditions_hold", input_spec.name, local_idx)
]
self.condition(spec, spec, msg=msg, transform_imposed=external_imposition)
self.possible_versions[spec.name].add(spec.version)
self.gen.newline()
self.trigger_rules()
self.effect_rules()

View File

@@ -99,7 +99,7 @@
"CompilerSpec",
"Spec",
"SpecParseError",
"ArchitecturePropagationError",
"UnsupportedPropagationError",
"DuplicateDependencyError",
"DuplicateCompilerSpecError",
"UnsupportedCompilerError",
@@ -129,7 +129,7 @@
r"|" # or
# OPTION 2: an actual format string
r"{" # non-escaped open brace {
r"([%@/]|arch=)?" # optional sigil (to print sigil in color)
r"([%@/]|[\w ][\w -]*=)?" # optional sigil (or identifier or space) to print sigil in color
r"(?:\^([^}\.]+)\.)?" # optional ^depname. (to get attr from dependency)
# after the sigil or depname, we can have a hash expression or another attribute
r"(?:" # one of
@@ -163,14 +163,14 @@
DEFAULT_FORMAT = (
"{name}{@versions}"
"{%compiler.name}{@compiler.versions}{compiler_flags}"
"{variants}{arch=architecture}{/abstract_hash}"
"{variants}{ namespace=namespace_if_anonymous}{ arch=architecture}{/abstract_hash}"
)
#: Display format, which eliminates extra `@=` in the output, for readability.
DISPLAY_FORMAT = (
"{name}{@version}"
"{%compiler.name}{@compiler.version}{compiler_flags}"
"{variants}{arch=architecture}{/abstract_hash}"
"{variants}{ namespace=namespace_if_anonymous}{ arch=architecture}{/abstract_hash}"
)
#: Regular expression to pull spec contents out of clearsigned signature
@@ -1640,19 +1640,9 @@ def _add_flag(self, name, value, propagate):
Known flags currently include "arch"
"""
# If the == syntax is used to propagate the spec architecture
# This is an error
architecture_names = [
"arch",
"architecture",
"platform",
"os",
"operating_system",
"target",
]
if propagate and name in architecture_names:
raise ArchitecturePropagationError(
"Unable to propagate the architecture failed." " Use a '=' instead."
if propagate and name in spack.directives.reserved_names:
raise UnsupportedPropagationError(
f"Propagation with '==' is not supported for '{name}'."
)
valid_flags = FlagMap.valid_compiler_flags()
@@ -1666,6 +1656,8 @@ def _add_flag(self, name, value, propagate):
self._set_architecture(os=value)
elif name == "target":
self._set_architecture(target=value)
elif name == "namespace":
self.namespace = value
elif name in valid_flags:
assert self.compiler_flags is not None
flags_and_propagation = spack.compiler.tokenize_flags(value, propagate)
@@ -1685,9 +1677,7 @@ def _set_architecture(self, **kwargs):
"""Called by the parser to set the architecture."""
arch_attrs = ["platform", "os", "target"]
if self.architecture and self.architecture.concrete:
raise DuplicateArchitectureError(
"Spec for '%s' cannot have two architectures." % self.name
)
raise DuplicateArchitectureError("Spec cannot have two architectures.")
if not self.architecture:
new_vals = tuple(kwargs.get(arg, None) for arg in arch_attrs)
@@ -1696,10 +1686,7 @@ def _set_architecture(self, **kwargs):
new_attrvals = [(a, v) for a, v in kwargs.items() if a in arch_attrs]
for new_attr, new_value in new_attrvals:
if getattr(self.architecture, new_attr):
raise DuplicateArchitectureError(
"Spec for '%s' cannot have two '%s' specified "
"for its architecture" % (self.name, new_attr)
)
raise DuplicateArchitectureError(f"Cannot specify '{new_attr}' twice")
else:
setattr(self.architecture, new_attr, new_value)
@@ -1894,14 +1881,14 @@ def short_spec(self):
"""Returns a version of the spec with the dependencies hashed
instead of completely enumerated."""
spec_format = "{name}{@version}{%compiler.name}{@compiler.version}"
spec_format += "{variants}{arch=architecture}{/hash:7}"
spec_format += "{variants}{ arch=architecture}{/hash:7}"
return self.format(spec_format)
@property
def cshort_spec(self):
"""Returns an auto-colorized version of ``self.short_spec``."""
spec_format = "{name}{@version}{%compiler.name}{@compiler.version}"
spec_format += "{variants}{arch=architecture}{/hash:7}"
spec_format += "{variants}{ arch=architecture}{/hash:7}"
return self.cformat(spec_format)
@property
@@ -4386,14 +4373,19 @@ def deps():
yield deps
def format(self, format_string: str = DEFAULT_FORMAT, color: Optional[bool] = False) -> str:
r"""Prints out particular pieces of a spec, depending on what is
in the format string.
@property
def namespace_if_anonymous(self):
return self.namespace if not self.name else None
Using the ``{attribute}`` syntax, any field of the spec can be
selected. Those attributes can be recursive. For example,
``s.format({compiler.version})`` will print the version of the
compiler.
def format(self, format_string: str = DEFAULT_FORMAT, color: Optional[bool] = False) -> str:
r"""Prints out attributes of a spec according to a format string.
Using an ``{attribute}`` format specifier, any field of the spec can be
selected. Those attributes can be recursive. For example,
``s.format({compiler.version})`` will print the version of the compiler.
If the attribute in a format specifier evaluates to ``None``, then the format
specifier will evaluate to the empty string, ``""``.
Commonly used attributes of the Spec for format strings include::
@@ -4409,6 +4401,7 @@ def format(self, format_string: str = DEFAULT_FORMAT, color: Optional[bool] = Fa
architecture.os
architecture.target
prefix
namespace
Some additional special-case properties can be added::
@@ -4417,40 +4410,51 @@ def format(self, format_string: str = DEFAULT_FORMAT, color: Optional[bool] = Fa
spack_install The spack install directory
The ``^`` sigil can be used to access dependencies by name.
``s.format({^mpi.name})`` will print the name of the MPI
implementation in the spec.
``s.format({^mpi.name})`` will print the name of the MPI implementation in the
spec.
The ``@``, ``%``, ``arch=``, and ``/`` sigils
can be used to include the sigil with the printed
string. These sigils may only be used with the appropriate
attributes, listed below::
The ``@``, ``%``, and ``/`` sigils can be used to include the sigil with the
printed string. These sigils may only be used with the appropriate attributes,
listed below::
@ ``{@version}``, ``{@compiler.version}``
% ``{%compiler}``, ``{%compiler.name}``
arch= ``{arch=architecture}``
/ ``{/hash}``, ``{/hash:7}``, etc
The ``@`` sigil may also be used for any other property named
``version``. Sigils printed with the attribute string are only
printed if the attribute string is non-empty, and are colored
according to the color of the attribute.
The ``@`` sigil may also be used for any other property named ``version``.
Sigils printed with the attribute string are only printed if the attribute
string is non-empty, and are colored according to the color of the attribute.
Sigils are not used for printing variants. Variants listed by
name naturally print with their sigil. For example,
``spec.format('{variants.debug}')`` would print either
``+debug`` or ``~debug`` depending on the name of the
variant. Non-boolean variants print as ``name=value``. To
print variant names or values independently, use
Variants listed by name naturally print with their sigil. For example,
``spec.format('{variants.debug}')`` prints either ``+debug`` or ``~debug``
depending on the name of the variant. Non-boolean variants print as
``name=value``. To print variant names or values independently, use
``spec.format('{variants.<name>.name}')`` or
``spec.format('{variants.<name>.value}')``.
Spec format strings use ``\`` as the escape character. Use
``\{`` and ``\}`` for literal braces, and ``\\`` for the
literal ``\`` character.
There are a few attributes on specs that can be specified as key-value pairs
that are *not* variants, e.g.: ``os``, ``arch``, ``architecture``, ``target``,
``namespace``, etc. You can format these with an optional ``key=`` prefix, e.g.
``{namespace=namespace}`` or ``{arch=architecture}``, etc. The ``key=`` prefix
will be colorized along with the value.
When formatting specs, key-value pairs are separated from preceding parts of the
spec by whitespace. To avoid printing extra whitespace when the formatted
attribute is not set, you can add whitespace to the key *inside* the braces of
the format string, e.g.:
{ namespace=namespace}
This evaluates to `` namespace=builtin`` if ``namespace`` is set to ``builtin``,
and to ``""`` if ``namespace`` is ``None``.
Spec format strings use ``\`` as the escape character. Use ``\{`` and ``\}`` for
literal braces, and ``\\`` for the literal ``\`` character.
Args:
format_string: string containing the format to be expanded
color: True for colorized result; False for no color; None for auto color.
"""
ensure_modern_format_string(format_string)
@@ -4504,10 +4508,6 @@ def format_attribute(match_object: Match) -> str:
raise SpecFormatSigilError(sig, "compilers", attribute)
elif sig == "/" and attribute != "abstract_hash":
raise SpecFormatSigilError(sig, "DAG hashes", attribute)
elif sig == "arch=":
if attribute not in ("architecture", "arch"):
raise SpecFormatSigilError(sig, "the architecture", attribute)
sig = " arch=" # include space as separator
# Iterate over components using getattr to get next element
for idx, part in enumerate(parts):
@@ -4552,15 +4552,19 @@ def format_attribute(match_object: Match) -> str:
# Set color codes for various attributes
color = None
if "variants" in parts:
color = VARIANT_COLOR
elif "architecture" in parts:
if "architecture" in parts:
color = ARCHITECTURE_COLOR
elif "variants" in parts or sig.endswith("="):
color = VARIANT_COLOR
elif "compiler" in parts or "compiler_flags" in parts:
color = COMPILER_COLOR
elif "version" in parts or "versions" in parts:
color = VERSION_COLOR
# return empty string if the value of the attribute is None.
if current is None:
return ""
# return colored output
return safe_color(sig, str(current), color)
@@ -5390,10 +5394,8 @@ def long_message(self):
)
class ArchitecturePropagationError(spack.error.SpecError):
"""Raised when the double equal symbols are used to assign
the spec's architecture.
"""
class UnsupportedPropagationError(spack.error.SpecError):
"""Raised when propagation (==) is used with reserved variant names."""
class DuplicateDependencyError(spack.error.SpecError):
@@ -5523,7 +5525,7 @@ def __init__(self, spec):
class AmbiguousHashError(spack.error.SpecError):
def __init__(self, msg, *specs):
spec_fmt = "{namespace}.{name}{@version}{%compiler}{compiler_flags}"
spec_fmt += "{variants}{arch=architecture}{/hash:7}"
spec_fmt += "{variants}{ arch=architecture}{/hash:7}"
specs_str = "\n " + "\n ".join(spec.format(spec_fmt) for spec in specs)
super().__init__(msg + specs_str)

View File

@@ -2609,6 +2609,55 @@ def test_cannot_reuse_host_incompatible_libc(self):
assert len(result.specs) == 1
assert result.specs[0] == snd
@pytest.mark.regression("45321")
@pytest.mark.parametrize(
"corrupted_str",
[
"cmake@3.4.3 foo=bar", # cmake has no variant "foo"
"mvdefaults@1.0 foo=a,d", # variant "foo" has no value "d"
"cmake %gcc", # spec has no version
],
)
def test_corrupted_external_does_not_halt_concretization(self, corrupted_str, mutable_config):
"""Tests that having a wrong variant in an external spec doesn't stop concretization"""
corrupted_spec = Spec(corrupted_str)
packages_yaml = {
f"{corrupted_spec.name}": {
"externals": [{"spec": corrupted_str, "prefix": "/dev/null"}]
}
}
mutable_config.set("packages", packages_yaml)
# Assert we don't raise due to the corrupted external entry above
s = Spec("pkg-a").concretized()
assert s.concrete
@pytest.mark.regression("44828")
@pytest.mark.not_on_windows("Tests use linux paths")
def test_correct_external_is_selected_from_packages_yaml(self, mutable_config):
"""Tests that when filtering external specs, the correct external is selected to
reconstruct the prefix, and other external attributes.
"""
packages_yaml = {
"cmake": {
"externals": [
{"spec": "cmake@3.23.1 %gcc", "prefix": "/tmp/prefix1"},
{"spec": "cmake@3.23.1 %clang", "prefix": "/tmp/prefix2"},
]
}
}
concretizer_yaml = {
"reuse": {"roots": True, "from": [{"type": "external", "exclude": ["%gcc"]}]}
}
mutable_config.set("packages", packages_yaml)
mutable_config.set("concretizer", concretizer_yaml)
s = Spec("cmake").concretized()
# Check that we got the properties from the right external
assert s.external
assert s.satisfies("%clang")
assert s.prefix == "/tmp/prefix2"
@pytest.fixture()
def duplicates_test_repository():

View File

@@ -131,19 +131,6 @@ def test_relative_import_spack_packages_as_python_modules(mock_packages):
assert issubclass(Mpileaks, spack.package_base.PackageBase)
def test_all_virtual_packages_have_default_providers():
"""All virtual packages must have a default provider explicitly set."""
configuration = spack.config.create()
defaults = configuration.get("packages", scope="defaults")
default_providers = defaults["all"]["providers"]
providers = spack.repo.PATH.provider_index.providers
default_providers_filename = configuration.scopes["defaults"].get_section_filename("packages")
for provider in providers:
assert provider in default_providers, (
"all providers must have a default in %s" % default_providers_filename
)
def test_get_all_mock_packages(mock_packages):
"""Get the mock packages once each too."""
for name in mock_packages.all_package_names():

View File

@@ -197,6 +197,9 @@ class TestSpecSemantics:
'multivalue-variant foo="baz"',
'multivalue-variant foo="bar,baz,barbaz"',
),
# Namespace (special case, but like variants
("builtin.libelf", "namespace=builtin", "builtin.libelf"),
("libelf", "namespace=builtin", "builtin.libelf"),
# Flags
("mpich ", 'mpich cppflags="-O3"', 'mpich cppflags="-O3"'),
(
@@ -317,6 +320,7 @@ def test_concrete_specs_which_satisfies_abstract(self, lhs, rhs, default_mock_co
("libelf debug=True", "libelf debug=False"),
('libelf cppflags="-O3"', 'libelf cppflags="-O2"'),
("libelf platform=test target=be os=be", "libelf target=fe os=fe"),
("namespace=builtin.mock", "namespace=builtin"),
],
)
def test_constraining_abstract_specs_with_empty_intersection(self, lhs, rhs):
@@ -406,6 +410,25 @@ def test_indirect_unsatisfied_single_valued_variant(self):
spec.concretize()
assert "pkg-a@1.0" not in spec
def test_satisfied_namespace(self):
spec = Spec("zlib").concretized()
assert spec.satisfies("namespace=builtin.mock")
assert not spec.satisfies("namespace=builtin")
@pytest.mark.parametrize(
"spec_string",
[
"tcl namespace==foobar",
"tcl arch==foobar",
"tcl os==foobar",
"tcl patches==foobar",
"tcl dev_path==foobar",
],
)
def test_propagate_reserved_variant_names(self, spec_string):
with pytest.raises(spack.parser.SpecParsingError, match="Propagation"):
Spec(spec_string)
def test_unsatisfiable_multi_value_variant(self, default_mock_concretization):
# Semantics for a multi-valued variant is different
# Depending on whether the spec is concrete or not
@@ -656,6 +679,7 @@ def test_spec_formatting(self, default_mock_concretization):
("{@VERSIONS}", "@", "versions", lambda spec: spec),
("{%compiler}", "%", "compiler", lambda spec: spec),
("{arch=architecture}", "arch=", "architecture", lambda spec: spec),
("{namespace=namespace}", "namespace=", "namespace", lambda spec: spec),
("{compiler.name}", "", "name", lambda spec: spec.compiler),
("{compiler.version}", "", "version", lambda spec: spec.compiler),
("{%compiler.name}", "%", "name", lambda spec: spec.compiler),
@@ -706,13 +730,40 @@ def check_prop(check_spec, fmt_str, prop, getter):
@pytest.mark.parametrize(
"fmt_str",
[
"{@name}",
"{@version.concrete}",
"{%compiler.version}",
"{/hashd}",
"{arch=architecture.os}",
"{name}",
"{version}",
"{@version}",
"{%compiler}",
"{namespace}",
"{ namespace=namespace}",
"{ namespace =namespace}",
"{ name space =namespace}",
"{arch}",
"{architecture}",
"{arch=architecture}",
"{ arch=architecture}",
"{ arch =architecture}",
],
)
def test_spec_format_null_attributes(self, fmt_str):
"""Ensure that attributes format to empty strings when their values are null."""
spec = spack.spec.Spec()
assert spec.format(fmt_str) == ""
def test_spec_formatting_spaces_in_key(self, default_mock_concretization):
spec = default_mock_concretization("multivalue-variant cflags=-O2")
# test that spaces are preserved, if they come after some other text, otherwise
# they are trimmed.
# TODO: should we be trimming whitespace from formats? Probably not.
assert spec.format("x{ arch=architecture}") == f"x arch={spec.architecture}"
assert spec.format("x{ namespace=namespace}") == f"x namespace={spec.namespace}"
assert spec.format("x{ name space =namespace}") == f"x name space ={spec.namespace}"
assert spec.format("x{ os =os}") == f"x os ={spec.os}"
@pytest.mark.parametrize(
"fmt_str", ["{@name}", "{@version.concrete}", "{%compiler.version}", "{/hashd}"]
)
def test_spec_formatting_sigil_mismatches(self, default_mock_concretization, fmt_str):
spec = default_mock_concretization("multivalue-variant cflags=-O2")
@@ -740,11 +791,11 @@ def test_spec_formatting_bad_formats(self, default_mock_concretization, fmt_str)
def test_combination_of_wildcard_or_none(self):
# Test that using 'none' and another value raises
with pytest.raises(spack.variant.InvalidVariantValueCombinationError):
with pytest.raises(spack.parser.SpecParsingError, match="cannot be combined"):
Spec("multivalue-variant foo=none,bar")
# Test that using wildcard and another value raises
with pytest.raises(spack.variant.InvalidVariantValueCombinationError):
with pytest.raises(spack.parser.SpecParsingError, match="cannot be combined"):
Spec("multivalue-variant foo=*,bar")
def test_errors_in_variant_directive(self):

View File

@@ -952,64 +952,60 @@ def test_disambiguate_hash_by_spec(spec1, spec2, constraint, mock_packages, monk
@pytest.mark.parametrize(
"text,exc_cls",
"text,match_string",
[
# Duplicate variants
("x@1.2+debug+debug", spack.variant.DuplicateVariantError),
("x ^y@1.2+debug debug=true", spack.variant.DuplicateVariantError),
("x ^y@1.2 debug=false debug=true", spack.variant.DuplicateVariantError),
("x ^y@1.2 debug=false ~debug", spack.variant.DuplicateVariantError),
("x@1.2+debug+debug", "variant"),
("x ^y@1.2+debug debug=true", "variant"),
("x ^y@1.2 debug=false debug=true", "variant"),
("x ^y@1.2 debug=false ~debug", "variant"),
# Multiple versions
("x@1.2@2.3", spack.spec.MultipleVersionError),
("x@1.2:2.3@1.4", spack.spec.MultipleVersionError),
("x@1.2@2.3:2.4", spack.spec.MultipleVersionError),
("x@1.2@2.3,2.4", spack.spec.MultipleVersionError),
("x@1.2 +foo~bar @2.3", spack.spec.MultipleVersionError),
("x@1.2%y@1.2@2.3:2.4", spack.spec.MultipleVersionError),
("x@1.2@2.3", "version"),
("x@1.2:2.3@1.4", "version"),
("x@1.2@2.3:2.4", "version"),
("x@1.2@2.3,2.4", "version"),
("x@1.2 +foo~bar @2.3", "version"),
("x@1.2%y@1.2@2.3:2.4", "version"),
# Duplicate dependency
("x ^y@1 ^y@2", spack.spec.DuplicateDependencyError),
("x ^y@1 ^y@2", "Cannot depend on incompatible specs"),
# Duplicate compiler
("x%intel%intel", spack.spec.DuplicateCompilerSpecError),
("x%intel%gcc", spack.spec.DuplicateCompilerSpecError),
("x%gcc%intel", spack.spec.DuplicateCompilerSpecError),
("x ^y%intel%intel", spack.spec.DuplicateCompilerSpecError),
("x ^y%intel%gcc", spack.spec.DuplicateCompilerSpecError),
("x ^y%gcc%intel", spack.spec.DuplicateCompilerSpecError),
("x%intel%intel", "compiler"),
("x%intel%gcc", "compiler"),
("x%gcc%intel", "compiler"),
("x ^y%intel%intel", "compiler"),
("x ^y%intel%gcc", "compiler"),
("x ^y%gcc%intel", "compiler"),
# Duplicate Architectures
(
"x arch=linux-rhel7-x86_64 arch=linux-rhel7-x86_64",
spack.spec.DuplicateArchitectureError,
),
(
"x arch=linux-rhel7-x86_64 arch=linux-rhel7-ppc64le",
spack.spec.DuplicateArchitectureError,
),
(
"x arch=linux-rhel7-ppc64le arch=linux-rhel7-x86_64",
spack.spec.DuplicateArchitectureError,
),
(
"y ^x arch=linux-rhel7-x86_64 arch=linux-rhel7-x86_64",
spack.spec.DuplicateArchitectureError,
),
(
"y ^x arch=linux-rhel7-x86_64 arch=linux-rhel7-ppc64le",
spack.spec.DuplicateArchitectureError,
),
("x os=fe os=fe", spack.spec.DuplicateArchitectureError),
("x os=fe os=be", spack.spec.DuplicateArchitectureError),
("x target=fe target=fe", spack.spec.DuplicateArchitectureError),
("x target=fe target=be", spack.spec.DuplicateArchitectureError),
("x platform=test platform=test", spack.spec.DuplicateArchitectureError),
("x os=fe platform=test target=fe os=fe", spack.spec.DuplicateArchitectureError),
("x target=be platform=test os=be os=fe", spack.spec.DuplicateArchitectureError),
("^[@foo] zlib", spack.parser.SpecParsingError),
("x arch=linux-rhel7-x86_64 arch=linux-rhel7-x86_64", "two architectures"),
("x arch=linux-rhel7-x86_64 arch=linux-rhel7-ppc64le", "two architectures"),
("x arch=linux-rhel7-ppc64le arch=linux-rhel7-x86_64", "two architectures"),
("y ^x arch=linux-rhel7-x86_64 arch=linux-rhel7-x86_64", "two architectures"),
("y ^x arch=linux-rhel7-x86_64 arch=linux-rhel7-ppc64le", "two architectures"),
("x os=fe os=fe", "'os'"),
("x os=fe os=be", "'os'"),
("x target=fe target=fe", "'target'"),
("x target=fe target=be", "'target'"),
("x platform=test platform=test", "'platform'"),
# TODO: these two seem wrong: need to change how arch is initialized (should fail on os)
("x os=fe platform=test target=fe os=fe", "'platform'"),
("x target=be platform=test os=be os=fe", "'platform'"),
# Dependencies
("^[@foo] zlib", "edge attributes"),
# TODO: Remove this as soon as use variants are added and we can parse custom attributes
("^[foo=bar] zlib", spack.parser.SpecParsingError),
("^[foo=bar] zlib", "edge attributes"),
# Propagating reserved names generates a parse error
("x namespace==foo.bar.baz", "Propagation"),
("x arch==linux-rhel9-x86_64", "Propagation"),
("x architecture==linux-rhel9-x86_64", "Propagation"),
("x os==rhel9", "Propagation"),
("x operating_system==rhel9", "Propagation"),
("x target==x86_64", "Propagation"),
("x dev_path==/foo/bar/baz", "Propagation"),
("x patches==abcde12345,12345abcde", "Propagation"),
],
)
def test_error_conditions(text, exc_cls):
with pytest.raises(exc_cls):
def test_error_conditions(text, match_string):
with pytest.raises(spack.parser.SpecParsingError, match=match_string):
SpecParser(text).next_spec()

View File

@@ -67,14 +67,16 @@ spack:
specs:
# CPU
- aml
- adios
- alquimia
- aml
- amrex
- arborx
- argobots
- axom
- bolt
- boost
- bricks ~cuda
- butterflypack
- cabana
- caliper
@@ -82,15 +84,20 @@ spack:
- charliecloud
- conduit
- datatransferkit
- dealii
- drishti
- dxt-explorer
- ecp-data-vis-sdk ~cuda ~rocm +adios2 ~ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc ~visit +vtkm +zfp # +ascent: fides: fides/xgc/XGCCommon.cxx:233:10: error: no member named 'iota' in namespace 'std'; +visit: visit_vtk/lightweight/vtkSkewLookupTable.C:32:10: error: cannot initialize return object of type 'unsigned char *' with an rvalue of type 'const unsigned char *'
- exaworks
- flecsi
- flit
- flux-core
- fortrilinos
- gasnet
- geopm-service
- ginkgo
- globalarrays
- glvis ^llvm
- gmp
- gotcha
- gptune ~mpispawn
@@ -106,7 +113,6 @@ spack:
- kokkos-kernels +openmp
- laghos
- lammps
# - lbann # 2024.2 internal compiler error
- legion
- libnrm
- libpressio +bitgrooming +bzip2 ~cuda ~cusz +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp
@@ -116,6 +122,7 @@ spack:
- mercury
- metall
- mfem
- mgard +serial +openmp +timing +unstructured ~cuda
- mpark-variant
- mpifileutils ~xattr
- nccmp
@@ -125,12 +132,13 @@ spack:
- omega-h
- openfoam
- openmpi
- openpmd-api
- papi
- papyrus
- parsec ~cuda
- pdt
- petsc
- phist
# - plasma # 2024.2 internal compiler error
- plumed
- precice
- pruners-ninja
@@ -152,12 +160,15 @@ spack:
- sundials
- superlu
- superlu-dist
- swig@4.0.2-fortran
- sz3
- tasmanian
- tau +mpi +python +syscall
- trilinos +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext +ifpack +ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu +stokhos +stratimikos +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long
- turbine
- umap
- umpire
- upcxx
- variorum
- wannier90
- xyce +mpi +shared +pymi +pymi_static_tpls
@@ -170,31 +181,21 @@ spack:
- hdf5
- libcatalyst
- parallel-netcdf
# - paraview # paraview: VTK/ThirdParty/cgns/vtkcgns/src/adfh/ADFH.c:2002:23: error: incompatible function pointer types passing 'herr_t (hid_t, const char *, const H5L_info1_t *, void *)' (aka 'int (long, const char *, const H5L_info1_t *, void *)') to parameter of type 'H5L_iterate2_t' (aka 'int (*)(long, const char *,const H5L_info2_t *, void *)') [-Wincompatible-function-pointer-types]
- paraview
- py-cinemasci
- sz
- unifyfs
- veloc
# - visit # silo: https://github.com/spack/spack/issues/39538
- vtk-m ~openmp # https://github.com/spack/spack/issues/31830
# - visit # visit: +visit: visit_vtk/lightweight/vtkSkewLookupTable.C:32:10: error: cannot initialize return object of type 'unsigned char *' with an rvalue of type 'const unsigned char *'
- vtk-m ~openmp
- zfp
# --
# - alquimia # pflotran: https://github.com/spack/spack/issues/39474
# - bricks ~cuda # bricks: /opt/intel/oneapi/compiler/2024.0/bin/sycl-post-link: error while loading shared libraries: libonnxruntime.1.12.22.721.so: cannot open shared object file: No such file or directory
# - cp2k +mpi # dbcsr
# - dealii # dealii: https://github.com/spack/spack/issues/39482
# - dxt-explorer # r: https://github.com/spack/spack/issues/40257
# - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc +visit +vtkm +zfp # embree: CMake Error at CMakeLists.txt:215 (MESSAGE): Unsupported compiler: IntelLLVM; qt: qtbase/src/corelib/global/qendian.h:333:54: error: incomplete type 'std::numeric_limits' used in nested name specifier
# - geopm # geopm issue: https://github.com/spack/spack/issues/38795
# - glvis ^llvm # glvis: https://github.com/spack/spack/issues/42839
# - hpctoolkit # dyninst@12.3.0%gcc: /usr/bin/ld: libiberty/./d-demangle.c:142: undefined reference to `_intel_fast_memcpy'; can't mix intel-tbb@%oneapi with dyninst%gcc
# - mgard +serial +openmp +timing +unstructured ~cuda # mgard: mgard.tpp:63:48: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned long' in initializer list [-Wc++11-narrowing]
# - openpmd-api # mgard: mgard.tpp:63:48: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned long' in initializer list [-Wc++11-narrowing]
# - pdt # pdt: pdbType.cc:193:21: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
# - quantum-espresso # quantum-espresso@7.2 /i3fqdx5: warning: <unknown>:0:0: loop not unroll-and-jammed: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering
# - swig@4.0.2-fortran # ?
# - tau +mpi +python +syscall # pdt: pdbType.cc:193:21: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
# - upcxx # upcxx: /opt/intel/oneapi/mpi/2021.10.0//libfabric/bin/fi_info: error while loading shared libraries: libfabric.so.1: cannot open shared object file: No such file or directory
# - cp2k +mpi # dbcsr: dbcsr_api.F(973): #error: incomplete macro call DBCSR_ABORT.
# - geopm-runtime # libelf: configure: error: installation or configuration problem: C compiler cannot create executables.
# - hpctoolkit # dyninst@13.0.0%gcc: libiberty/./d-demangle.c:142: undefined reference to `_intel_fast_memcpy'
# - lbann # 2024.2 internal compiler error
# - plasma # 2024.2 internal compiler error
# - quantum-espresso # quantum-espresso: external/mbd/src/mbd_c_api.F90(392): error #6645: The name of the module procedure conflicts with a name in the encompassing scoping unit. [F_C_STRING]
# PYTHON PACKAGES
- opencv +python3
@@ -232,8 +233,8 @@ spack:
- upcxx +level_zero
# --
# - hpctoolkit +level_zero # dyninst@12.3.0%gcc: /usr/bin/ld: libiberty/./d-demangle.c:142: undefined reference to `_intel_fast_memcpy'; can't mix intel-tbb@%oneapi with dyninst%gcc
# - slate +sycl # blaspp: CMake Error at CMakeLists.txt:313 (find_package): ... set MKL_FOUND to FALSE so package "MKL" is considered to be NOT FOUND.
# - warpx compute=sycl # warpx: spack-build-wzp6vvo/_deps/fetchedamrex-src/Src/Base/AMReX_RandomEngine.H:18:10: fatal error: 'oneapi/mkl/rng/device.hpp' file not found
# - slate +sycl # slate: ifx: error #10426: option '-fopenmp-targets' requires '-fiopenmp'
# - warpx compute=sycl # warpx: fetchedamrex-src/Src/Base/AMReX_RandomEngine.H:18:10: fatal error: 'oneapi/mkl/rng/device.hpp' file not found
ci:

View File

@@ -46,7 +46,7 @@ class Abacus(MakefilePackage):
build_directory = "source"
def edit(self, spec, prefix):
if "+openmp" in spec:
if spec.satisfies("+openmp"):
inc_var = "_openmp-"
system_var = "ELPA_LIB = -L${ELPA_LIB_DIR} -lelpa_openmp -Wl, -rpath=${ELPA_LIB_DIR}"
else:

View File

@@ -146,12 +146,12 @@ def configure_args(self):
options += self.with_or_without("libxml2")
oapp = options.append
if "@:8" in spec:
if spec.satisfies("@:8"):
oapp(f"--enable-optim={self.spec.variants['optimization-flavor'].value}")
else:
oapp(f"--with-optim-flavor={self.spec.variants['optimization-flavor'].value}")
if "+wannier90" in spec:
if spec.satisfies("+wannier90"):
if spec.satisfies("@:8"):
oapp(f"--with-wannier90-libs=-L{spec['wannier90'].prefix.lib} -lwannier -lm")
oapp(f"--with-wannier90-incs=-I{spec['wannier90'].prefix.modules}")
@@ -174,16 +174,16 @@ def configure_args(self):
]
)
else:
if "@:9.8" in spec:
if spec.satisfies("@:9.8"):
oapp(f"--with-fftw={spec['fftw-api'].prefix}")
oapp(f"--with-hdf5={spec['hdf5'].prefix}")
if "@:8" in spec:
if spec.satisfies("@:8"):
oapp("--with-dft-flavor=atompaw+libxc")
else:
"--without-wannier90",
if "+mpi" in spec:
if spec.satisfies("+mpi"):
oapp(f"CC={spec['mpi'].mpicc}")
oapp(f"CXX={spec['mpi'].mpicxx}")
oapp(f"FC={spec['mpi'].mpifc}")
@@ -192,18 +192,18 @@ def configure_args(self):
# MPI version:
# let the configure script auto-detect MPI support from mpi_prefix
if "@:8" in spec:
if spec.satisfies("@:8"):
oapp("--enable-mpi=yes")
else:
oapp("--with-mpi")
else:
if "@:8" in spec:
if spec.satisfies("@:8"):
oapp("--enable-mpi=no")
else:
oapp("--without-mpi")
# Activate OpenMP in Abinit Fortran code.
if "+openmp" in spec:
if spec.satisfies("+openmp"):
oapp("--enable-openmp=yes")
else:
oapp("--enable-openmp=no")
@@ -213,19 +213,19 @@ def configure_args(self):
is_using_intel_libraries = spec["lapack"].name in INTEL_MATH_LIBRARIES
if is_using_intel_libraries:
linalg_flavor = "mkl"
elif "@9:" in spec and "^openblas" in spec:
if spec.satisfies("@9:") and spec.satisfies("^openblas"):
linalg_flavor = "openblas"
elif "@9:" in spec and "^fujitsu-ssl2" in spec:
if spec.satisfies("@9:") and spec.satisfies("^fujitsu-ssl2"):
linalg_flavor = "openblas"
else:
linalg_flavor = "custom"
if "+scalapack" in spec:
if spec.satisfies("+scalapack"):
linalg = spec["scalapack"].libs + linalg
if "@:8" in spec:
if spec.satisfies("@:8"):
linalg_flavor = f"scalapack+{linalg_flavor}"
if "@:8" in spec:
if spec.satisfies("@:8"):
oapp(f"--with-linalg-libs={linalg.ld_flags}")
else:
oapp(f"LINALG_LIBS={linalg.ld_flags}")
@@ -235,14 +235,14 @@ def configure_args(self):
if is_using_intel_libraries:
fftflavor = "dfti"
else:
if "+openmp" in spec:
if spec.satisfies("+openmp"):
fftflavor, fftlibs = "fftw3-threads", "-lfftw3_omp -lfftw3 -lfftw3f"
else:
fftflavor, fftlibs = "fftw3", "-lfftw3 -lfftw3f"
oapp(f"--with-fft-flavor={fftflavor}")
if "@:8" in spec:
if spec.satisfies("@:8"):
if is_using_intel_libraries:
oapp(f"--with-fft-incs={spec['fftw-api'].headers.cpp_flags}")
oapp(f"--with-fft-libs={spec['fftw-api'].libs.ld_flags}")
@@ -271,7 +271,7 @@ def configure_args(self):
# LibXC library
libxc = spec["libxc:fortran"]
if "@:8" in spec:
if spec.satisfies("@:8"):
options.extend(
[
f"--with-libxc-incs={libxc.headers.cpp_flags}",
@@ -285,7 +285,7 @@ def configure_args(self):
hdf5 = spec["hdf5:hl"]
netcdfc = spec["netcdf-c"]
netcdff = spec["netcdf-fortran:shared"]
if "@:8" in spec:
if spec.satisfies("@:8"):
oapp("--with-trio-flavor=netcdf")
# Since version 8, Abinit started to use netcdf4 + hdf5 and we have
# to link with the high level HDF5 library
@@ -318,7 +318,7 @@ def check(self):
# the tests directly execute abinit. thus failing with MPI
# TODO: run tests in tests/ via the builtin runtests.py
# requires Python with numpy, pyyaml, pandas
if "~mpi" in self.spec:
if self.spec.satisfies("~mpi"):
make("tests_in")
# Abinit assumes the *old* behavior of HDF5 where the library flags to link
@@ -333,5 +333,5 @@ def patch(self):
def install(self, spec, prefix):
make("install")
if "+install-tests" in spec:
if spec.satisfies("+install-tests"):
install_tree("tests", spec.prefix.tests)

View File

@@ -42,7 +42,7 @@ def cmake_args(self):
self.define("BUILD_SHARED", str(spec.satisfies("+shared")).lower()),
]
if "+cuda" in spec:
if spec.satisfies("+cuda"):
cuda_arch = [x for x in spec.variants["cuda_arch"].value if x]
if cuda_arch:
args.append(f"-DCUDA_NVCC_FLAGS={' '.join(self.cuda_flags(cuda_arch))}")

View File

@@ -353,7 +353,9 @@ class Acts(CMakePackage, CudaPackage):
depends_on("nlohmann-json @3.9.1:", when="@0.14: +json")
depends_on("podio @0.6:", when="@25: +edm4hep")
depends_on("podio @0.16:", when="@30.3: +edm4hep")
depends_on("podio @:0", when="@:35 +edm4hep")
depends_on("podio @0.16:", when="+podio")
depends_on("podio @:0", when="@:35 +podio")
depends_on("pythia8", when="+pythia8")
depends_on("python", when="+python")
depends_on("python@3.8:", when="+python @19.11:19")
@@ -491,7 +493,7 @@ def plugin_cmake_variant(plugin_name, spack_variant):
if spec.satisfies("@14: +vecmem"):
args.append("-DACTS_USE_SYSTEM_VECMEM=ON")
if "+cuda" in spec:
if spec.satisfies("+cuda"):
cuda_arch = spec.variants["cuda_arch"].value
if cuda_arch != "none":
args.append(f"-DCUDA_FLAGS=-arch=sm_{cuda_arch[0]}")

View File

@@ -144,14 +144,14 @@ def configure_args(self):
extra_args += self.enable_or_disable("shared")
extra_args += self.enable_or_disable("fortran")
if "+mpi" in spec:
if spec.satisfies("+mpi"):
env["MPICC"] = spec["mpi"].mpicc
env["MPICXX"] = spec["mpi"].mpicxx
extra_args += self.with_or_without("mpi", activation_value="prefix")
extra_args += self.with_or_without("infiniband")
if "+zlib" in spec:
if spec.satisfies("+zlib"):
extra_args.append(f"--with-zlib={spec['zlib-api'].prefix}")
else:
extra_args.append("--without-zlib")

View File

@@ -292,7 +292,7 @@ def cmake_args(self):
self.define("ADIOS2_USE_MGARD", False),
]
if "+sst" in spec:
if spec.satisfies("+sst"):
args.extend(
[
# Broken dependency package
@@ -305,15 +305,15 @@ def cmake_args(self):
]
)
if "%fj" in spec:
if spec.satisfies("%fj"):
args.extend(["-DCMAKE_Fortran_SUBMODULE_EXT=.smod", "-DCMAKE_Fortran_SUBMODULE_SEP=."])
# hip support
if "+cuda" in spec:
if spec.satisfies("+cuda"):
args.append(self.builder.define_cuda_architectures(self))
# hip support
if "+rocm" in spec:
if spec.satisfies("+rocm"):
args.append(self.builder.define_hip_architectures(self))
return args
@@ -323,18 +323,18 @@ def libs(self):
spec = self.spec
libs_to_seek = set()
if "@2.6:" in spec:
if spec.satisfies("@2.6:"):
libs_to_seek.add("libadios2_core")
libs_to_seek.add("libadios2_c")
libs_to_seek.add("libadios2_cxx11")
if "+fortran" in spec:
if spec.satisfies("+fortran"):
libs_to_seek.add("libadios2_fortran")
if "+mpi" in spec:
if spec.satisfies("+mpi"):
libs_to_seek.add("libadios2_core_mpi")
libs_to_seek.add("libadios2_c_mpi")
libs_to_seek.add("libadios2_cxx11_mpi")
if "+fortran" in spec:
if spec.satisfies("+fortran"):
libs_to_seek.add("libadios2_fortran_mpi")
if "@2.7: +shared+hdf5" in spec and "@1.12:" in spec["hdf5"]:
@@ -342,7 +342,7 @@ def libs(self):
else:
libs_to_seek.add("libadios2")
if "+fortran" in spec:
if spec.satisfies("+fortran"):
libs_to_seek.add("libadios2_fortran")
return find_libraries(
@@ -391,7 +391,7 @@ def test_examples(self):
std_cmake_args = []
if "+mpi" in self.spec:
if self.spec.satisfies("+mpi"):
mpi_exec = join_path(self.spec["mpi"].prefix, "bin", "mpiexec")
std_cmake_args.append(f"-DMPIEXEC_EXECUTABLE={mpi_exec}")

View File

@@ -87,12 +87,12 @@ def configure_args(self):
configure_args = []
if "+boost" in spec:
if spec.satisfies("+boost"):
configure_args.append(f"--with-boost={spec['boost'].prefix}")
else:
configure_args.append("--with-boost=no")
if "+openmp" in spec:
if spec.satisfies("+openmp"):
configure_args.append(f"--with-openmp-flag={self.compiler.openmp_flag}")
configure_args.extend(
@@ -107,14 +107,14 @@ def configure_args(self):
# We can simply use the bundled examples to check
# whether Adol-C works as expected
if "+examples" in spec:
if spec.satisfies("+examples"):
configure_args.extend(
[
"--enable-docexa", # Documented examples
"--enable-addexa", # Additional examples
]
)
if "+openmp" in spec:
if spec.satisfies("+openmp"):
configure_args.append("--enable-parexa") # Parallel examples
return configure_args
@@ -130,11 +130,11 @@ def install_additional_files(self):
install(config_h, join_path(prefix.include, "adolc"))
# Install documentation to {prefix}/share
if "+doc" in spec:
if spec.satisfies("+doc"):
install_tree(join_path("ADOL-C", "doc"), join_path(prefix.share, "doc"))
# Install examples to {prefix}/share
if "+examples" in spec:
if spec.satisfies("+examples"):
install_tree(join_path("ADOL-C", "examples"), join_path(prefix.share, "examples"))
# Run some examples that don't require user input
@@ -148,7 +148,7 @@ def install_additional_files(self):
):
Executable("./checkpointing/checkpointing")()
if "+openmp" in spec:
if spec.satisfies("+openmp"):
with working_dir(
join_path(source_directory, "ADOL-C", "examples", "additional_examples")
):

View File

@@ -79,30 +79,30 @@ class Alpaka(CMakePackage, CudaPackage):
def cmake_args(self):
spec = self.spec
args = []
if "backend=serial" in spec:
if spec.satisfies("backend=serial"):
args.append(self.define("ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLE", True))
if "backend=threads" in self.spec:
if self.spec.satisfies("backend=threads"):
args.append(self.define("ALPAKA_ACC_CPU_B_SEQ_T_THREADS_ENABLE", True))
if "backend=fiber" in spec:
if spec.satisfies("backend=fiber"):
args.append(self.define("ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE", True))
if "backend=tbb" in spec:
if spec.satisfies("backend=tbb"):
args.append(self.define("ALPAKA_ACC_CPU_B_TBB_T_SEQ_ENABLE", True))
if "backend=omp2_gridblock" in spec:
if spec.satisfies("backend=omp2_gridblock"):
args.append(self.define("ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE", True))
if "backend=omp2_blockthread" in spec:
if spec.satisfies("backend=omp2_blockthread"):
args.append(self.define("ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE", True))
if "backend=omp5" in spec:
if spec.satisfies("backend=omp5"):
args.append(self.define("ALPAKA_ACC_ANY_BT_OMP5_ENABLE", True))
if "backend=oacc" in spec:
if spec.satisfies("backend=oacc"):
args.append(self.define("ALPAKA_ACC_ANY_BT_OACC_ENABLE", True))
if "backend=cuda" in spec:
if spec.satisfies("backend=cuda"):
args.append(self.define("ALPAKA_ACC_GPU_CUDA_ENABLE", True))
if "backend=cuda_only" in spec:
if spec.satisfies("backend=cuda_only"):
args.append(self.define("ALPAKA_ACC_GPU_CUDA_ENABLE", True))
args.append(self.define("ALPAKA_ACC_GPU_CUDA_ONLY_MODE", True))
if "backend=hip" in spec:
if spec.satisfies("backend=hip"):
args.append(self.define("ALPAKA_ACC_GPU_HIP_ENABLE", True))
if "backend=hip_only" in spec:
if spec.satisfies("backend=hip_only"):
args.append(self.define("ALPAKA_ACC_GPU_HIP_ENABLE", True))
args.append(self.define("ALPAKA_ACC_GPU_HIP_ONLY_MODE", True))

View File

@@ -165,11 +165,11 @@ def configure(self, spec, prefix):
# Dynamic dispatcher builds a single portable optimized library
# that can execute on different x86 CPU architectures.
# It is supported for GCC compiler and Linux based systems only.
if "+amd-dynamic-dispatcher" in spec:
if spec.satisfies("+amd-dynamic-dispatcher"):
options.append("--enable-dynamic-dispatcher")
# Check if compiler is AOCC
if "%aocc" in spec:
if spec.satisfies("%aocc"):
options.append("CC={0}".format(os.path.basename(spack_cc)))
options.append("FC={0}".format(os.path.basename(spack_fc)))
options.append("F77={0}".format(os.path.basename(spack_fc)))
@@ -186,10 +186,10 @@ def configure(self, spec, prefix):
"https://www.amd.com/content/dam/amd/en/documents/developer/version-4-2-documents/aocl/aocl-4-2-user-guide.pdf"
)
if "+debug" in spec:
if spec.satisfies("+debug"):
options.append("--enable-debug")
if "+mpi" in spec:
if spec.satisfies("+mpi"):
options.append("--enable-mpi")
options.append("--enable-amd-mpifft")
else:
@@ -223,7 +223,7 @@ def configure(self, spec, prefix):
simd_features = ["sse2", "avx", "avx2", "avx512"]
# "avx512" is supported from amdfftw 4.0 version onwards
if "@2.2:3.2" in self.spec:
if self.spec.satisfies("@2.2:3.2"):
simd_features.remove("avx512")
simd_options = []

View File

@@ -39,15 +39,15 @@ def build_targets(self):
include_cflags = ["-DTIMER_USE_MPI"]
include_lflags = ["-lm"]
if "+openmp" in self.spec:
if self.spec.satisfies("+openmp"):
include_cflags.append("-DHYPRE_USING_OPENMP")
include_cflags.append(self.compiler.openmp_flag)
include_lflags.append(self.compiler.openmp_flag)
if "+optflags" in self.spec:
if self.spec.satisfies("+optflags"):
include_cflags.append("-DHYPRE_USING_PERSISTENT_COMM")
include_cflags.append("-DHYPRE_HOPSCOTCH")
if "+int64" in self.spec:
if self.spec.satisfies("+int64"):
include_cflags.append("-DHYPRE_BIGINT")
targets.append(f"INCLUDE_CFLAGS={' '.join(include_cflags)}")

View File

@@ -45,7 +45,7 @@ def cmake_args(self):
args = []
args.append("-DCMAKE_NO_MPI={0}".format("1" if "+mpi" not in self.spec else "0"))
if "+cuda" in self.spec:
if self.spec.satisfies("+cuda"):
args.append("-DWITH_CUDA=ON")
cuda_arch = self.spec.variants["cuda_arch"].value
if cuda_arch != "none":
@@ -53,10 +53,10 @@ def cmake_args(self):
else:
args.append("-DWITH_CUDA=OFF")
if "+mkl" in self.spec:
if self.spec.satisfies("+mkl"):
args.append("-DMKL_ROOT_DIR={0}".format(self.spec["mkl"].prefix))
if "+magma" in self.spec:
if self.spec.satisfies("+magma"):
args.append("-DMAGMA_ROOT_DIR={0}".format(self.spec["magma"].prefix))
return args

View File

@@ -70,7 +70,7 @@ def cmake_args(self):
self.define("USE_MPI", "0"),
]
if "+mpi" in spec:
if spec.satisfies("+mpi"):
options.extend(
[
self.define("CMAKE_C_COMPILER", spec["mpi"].mpicc),
@@ -101,7 +101,7 @@ def cmake_args(self):
]
)
if "+zlib" in spec:
if spec.satisfies("+zlib"):
tpl_list.append("ZLIB")
options.append(self.define("TPL_ZLIB_INSTALL_DIR", spec["zlib-api"].prefix))
@@ -119,7 +119,7 @@ def cmake_args(self):
tpl_list.append(vname.upper())
options.append(self.define(f"TPL_{vname.upper()}_INSTALL_DIR", spec[vname].prefix))
if "+netcdf" in spec:
if spec.satisfies("+netcdf"):
tpl_list.append("NETCDF")
options.append(self.define("TPL_NETCDF_INSTALL_DIR", spec["netcdf-c"].prefix))

View File

@@ -26,6 +26,7 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage):
license("BSD-3-Clause")
version("develop", branch="development")
version("24.08", sha256="e09623e715887a19a1f86ed6fdb8335022fd6c03f19372d8f13b55cdeeadf5de")
version("24.07", sha256="6baf76c1377d765e94020a9bd89dd1bf1485d0440d41cce2ba35d4dfee562580")
version("24.06", sha256="103a97163d81716165fcff1af56df61741608b56f90730a725e9e4eb797bebf0")
version("24.05", sha256="f3db5ea2b81973e3e244c5cf39d5a5383a98f297f56ed91c8dcdd2e24f7b750e")
@@ -292,20 +293,20 @@ def cmake_args(self):
if self.spec.satisfies("%fj"):
args.append("-DCMAKE_Fortran_MODDIR_FLAG=-M")
if "+cuda" in self.spec:
if self.spec.satisfies("+cuda"):
args.append("-DAMReX_GPU_BACKEND=CUDA")
args.append("-DAMReX_CUDA_ERROR_CAPTURE_THIS=ON")
args.append("-DAMReX_CUDA_ERROR_CROSS_EXECUTION_SPACE_CALL=ON")
cuda_arch = self.spec.variants["cuda_arch"].value
args.append("-DAMReX_CUDA_ARCH=" + self.get_cuda_arch_string(cuda_arch))
if "+rocm" in self.spec:
if self.spec.satisfies("+rocm"):
args.append("-DCMAKE_CXX_COMPILER={0}".format(self.spec["hip"].hipcc))
args.append("-DAMReX_GPU_BACKEND=HIP")
targets = self.spec.variants["amdgpu_target"].value
args.append("-DAMReX_AMD_ARCH=" + ";".join(str(x) for x in targets))
if "+sycl" in self.spec:
if self.spec.satisfies("+sycl"):
args.append("-DAMReX_GPU_BACKEND=SYCL")
# SYCL GPU backend only supported with Intel's oneAPI or DPC++ compilers
sycl_compatible_compilers = ["icpx"]
@@ -344,7 +345,7 @@ def cmake_args(self):
if self.spec.satisfies("%fj"):
args.append("-DCMAKE_Fortran_MODDIR_FLAG=-M")
if "+cuda" in self.spec:
if self.spec.satisfies("+cuda"):
cuda_arch = self.spec.variants["cuda_arch"].value
args.append("-DCUDA_ARCH=" + self.get_cuda_arch_string(cuda_arch))
@@ -365,11 +366,11 @@ def test_run_install_test(self):
args = ["-S{0}".format(join_path(".", "cache", "amrex", "Tests", "SpackSmokeTest"))]
args.append("-DAMReX_ROOT=" + self.prefix)
if "+mpi" in self.spec:
if self.spec.satisfies("+mpi"):
args.append("-DMPI_C_COMPILER=" + self.spec["mpi"].mpicc)
args.append("-DMPI_CXX_COMPILER=" + self.spec["mpi"].mpicxx)
if "+cuda" in self.spec:
if self.spec.satisfies("+cuda"):
args.append("-DCMAKE_CUDA_COMPILER=" + join_path(self.spec["cuda"].prefix.bin, "nvcc"))
args.extend(self.cmake_args())

View File

@@ -148,7 +148,7 @@ def setup_build_environment(self, env):
# We don't want an AMREX_HOME the user may have set already
env.unset("AMREX_HOME")
# Help force Amrvis to not pick up random system compilers
if "+mpi" in self.spec:
if self.spec.satisfies("+mpi"):
env.set("MPI_HOME", self.spec["mpi"].prefix)
env.set("CC", self.spec["mpi"].mpicc)
env.set("CXX", self.spec["mpi"].mpicxx)

View File

@@ -114,31 +114,31 @@ def cmake_args(self):
)
)
if "+verbose" in spec:
if spec.satisfies("+verbose"):
args.append("-DWITH_AMS_DEBUG=On")
if "+hdf5" in spec:
if spec.satisfies("+hdf5"):
args.append("-DWITH_HDF5=On")
args.append("-DHDF5_Dir={0}".format(spec["hdf5"].prefix))
if "+cuda" in spec:
if spec.satisfies("+cuda"):
args.append("-DWITH_CUDA=On")
cuda_arch = spec.variants["cuda_arch"].value[0]
args.append("-DAMS_CUDA_ARCH={0}".format(cuda_arch))
if "+caliper" in spec:
if spec.satisfies("+caliper"):
args.append("-DWITH_CALIPER=On")
args.append("-DCALIPER_DIR={0}/share/cmake/caliper".format(spec["caliper"].prefix))
else:
args.append("-DWITH_CALIPER=Off")
if "+faiss" in spec:
if spec.satisfies("+faiss"):
args.append("-DWITH_FAISS=On")
args.append("-DFAISS_DIR={0}".format(spec["faiss"].prefix))
else:
args.append("-DWITH_FAISS=Off")
if "+torch" in spec:
if spec.satisfies("+torch"):
args.append("-DWITH_TORCH=On")
args.append(
"-DTorch_DIR={0}/lib/python{1}/site-packages"
@@ -147,15 +147,15 @@ def cmake_args(self):
)
)
if "+redis" in spec:
if spec.satisfies("+redis"):
args.append("-DWITH_REDIS=On")
args.append("-DREDIS_PLUS_PLUS_DIR={0}".format(spec["redis-plus-plus"].prefix))
if "+rabbitmq" in spec:
if spec.satisfies("+rabbitmq"):
args.append("-DWITH_RMQ=On")
args.append("-Damqpcpp_DIR={0}/cmake".format(spec["amqp-cpp"].prefix))
if "+examples" in spec:
if spec.satisfies("+examples"):
args.append("-DWITH_EXAMPLES=On")
args.append("-DMFEM_DIR={0}".format(spec["mfem"].prefix))

View File

@@ -80,7 +80,7 @@ class Aocc(Package, CompilerPackage):
@run_before("install")
def license_reminder(self):
if "+license-agreed" in self.spec:
if self.spec.satisfies("+license-agreed"):
tty.msg(
"Reminder: by setting +license-agreed you are confirming you agree to the terms "
"of the {0} EULA (found at {1})".format(self.spec.name, self.license_url)

View File

@@ -92,21 +92,21 @@ def cmake_args(self):
"-DLZ4_FRAME_FORMAT_SUPPORT=ON",
"-DAOCL_LZ4HC_DISABLE_PATTERN_ANALYSIS=ON",
]
if "~shared" in spec:
if spec.satisfies("~shared"):
args.append("-DBUILD_STATIC_LIBS=ON")
if "~zlib" in spec:
if spec.satisfies("~zlib"):
args.append("-DAOCL_EXCLUDE_ZLIB=ON")
if "~bzip2" in spec:
if spec.satisfies("~bzip2"):
args.append("-DAOCL_EXCLUDE_BZIP2=ON")
if "~snappy" in spec:
if spec.satisfies("~snappy"):
args.append("-DAOCL_EXCLUDE_SNAPPY=ON")
if "~zstd" in spec:
if spec.satisfies("~zstd"):
args.append("-DAOCL_EXCLUDE_ZSTD=ON")
if "~lzma" in spec:
if spec.satisfies("~lzma"):
args.append("-DAOCL_EXCLUDE_LZMA=ON")
if "~lz4" in spec:
if spec.satisfies("~lz4"):
args.append("-DAOCL_EXCLUDE_LZ4=ON")
if "~lz4hc" in spec:
if spec.satisfies("~lz4hc"):
args.append("-DAOCL_EXCLUDE_LZ4HC=ON")
return args

View File

@@ -121,7 +121,7 @@ def cmake_args(self):
"-DAOCL_LIBFLAME_INCLUDE_DIR={0}".format(self.spec["amdlibflame"].prefix.include)
)
if "@4.2:" in self.spec:
if self.spec.satisfies("@4.2:"):
args.append(f"-DAOCL_UTILS_LIB={self.spec['aocl-utils'].libs}")
args.append(
"-DAOCL_UTILS_INCLUDE_DIR={0}".format(self.spec["aocl-utils"].prefix.include)

View File

@@ -99,7 +99,7 @@ def create_host_config(self, spec, prefix):
# Find and record what CMake is used
##############################################
if "+cmake" in spec:
if spec.satisfies("+cmake"):
cmake_exe = spec["cmake"].command.path
else:
cmake_exe = which("cmake")
@@ -133,17 +133,17 @@ def create_host_config(self, spec, prefix):
cfg.write(cmake_cache_entry("CMAKE_CXX_COMPILER", cpp_compiler))
# shared vs static libs
if "+shared" in spec:
if spec.satisfies("+shared"):
cfg.write(cmake_cache_entry("BUILD_SHARED_LIBS", "ON"))
else:
cfg.write(cmake_cache_entry("BUILD_SHARED_LIBS", "OFF"))
if "+openmp" in spec:
if spec.satisfies("+openmp"):
cfg.write(cmake_cache_entry("ENABLE_OPENMP", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_OPENMP", "OFF"))
if "+mpi" in spec:
if spec.satisfies("+mpi"):
mpicc_path = spec["mpi"].mpicc
mpicxx_path = spec["mpi"].mpicxx
# if we are using compiler wrappers on cray systems
@@ -156,7 +156,7 @@ def create_host_config(self, spec, prefix):
cfg.write(cmake_cache_entry("ENABLE_MPI", "ON"))
cfg.write(cmake_cache_entry("MPI_C_COMPILER", mpicc_path))
cfg.write(cmake_cache_entry("MPI_CXX_COMPILER", mpicxx_path))
if "+blt_find_mpi" in spec:
if spec.satisfies("+blt_find_mpi"):
cfg.write(cmake_cache_entry("ENABLE_FIND_MPI", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_FIND_MPI", "OFF"))

View File

@@ -146,7 +146,7 @@ def cmake_args(self):
# CMake variables were updated in version 2.3.0, to make
prefix = "APEX_WITH"
test_prefix = "APEX_"
if "@2.2.0" in spec:
if spec.satisfies("@2.2.0"):
prefix = "USE"
test_prefix = ""
@@ -167,29 +167,29 @@ def cmake_args(self):
args.append(self.define_from_variant(test_prefix + "BUILD_TESTS", "tests"))
args.append(self.define_from_variant(test_prefix + "BUILD_EXAMPLES", "examples"))
if "+activeharmony" in spec:
if spec.satisfies("+activeharmony"):
args.append("-DACTIVEHARMONY_ROOT={0}".format(spec["activeharmony"].prefix))
if "+binutils" in spec:
if spec.satisfies("+binutils"):
args.append("-DBFD_ROOT={0}".format(spec["binutils"].prefix))
if "+binutils ^binutils+nls" in spec:
if spec.satisfies("+binutils ^binutils+nls"):
if "intl" in self.spec["gettext"].libs.names:
args.append("-DCMAKE_SHARED_LINKER_FLAGS=-lintl")
if "+otf2" in spec:
if spec.satisfies("+otf2"):
args.append("-DOTF2_ROOT={0}".format(spec["otf2"].prefix))
if "+papi" in spec:
if spec.satisfies("+papi"):
args.append("-DPAPI_ROOT={0}".format(spec["papi"].prefix))
if "+gperftools" in spec:
if spec.satisfies("+gperftools"):
args.append("-DGPERFTOOLS_ROOT={0}".format(spec["gperftools"].prefix))
if "+jemalloc" in spec:
if spec.satisfies("+jemalloc"):
args.append("-DJEMALLOC_ROOT={0}".format(spec["jemalloc"].prefix))
if "+hip" in spec:
if spec.satisfies("+hip"):
args.append("-DROCM_ROOT={0}".format(spec["hip"].prefix))
args.append("-DROCTRACER_ROOT={0}".format(spec["roctracer-dev"].prefix))
args.append("-DROCTX_ROOT={0}".format(spec["roctracer-dev"].prefix))

View File

@@ -12,17 +12,17 @@ class Appres(AutotoolsPackage, XorgPackage):
names. It can be used to determine which resources a particular
program will load."""
homepage = "https://cgit.freedesktop.org/xorg/app/appres"
homepage = "https://gitlab.freedesktop.org/xorg/app/appres"
xorg_mirror_path = "app/appres-1.0.4.tar.gz"
version("1.0.6", sha256="848f383ff429612fb9df840d79e97dc193dc72dbbf53d3217a8d1e90a5aa1e26")
version("1.0.4", sha256="22cb6f639c891ffdbb5371bc50a88278185789eae6907d05e9e0bd1086a80803")
depends_on("c", type="build") # generated
depends_on("c", type="build")
depends_on("libx11")
depends_on("libxt")
depends_on("xproto@7.0.17:")
depends_on("xproto@7.0.17:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")

View File

@@ -58,22 +58,22 @@ def configure_args(self):
"--without-oracle",
]
if "+crypto" in spec:
if spec.satisfies("+crypto"):
args.extend(["--with-crypto", f"--with-openssl={spec['openssl'].prefix}"])
else:
args.append("--without-crypto")
if "+gdbm" in spec:
if spec.satisfies("+gdbm"):
args.append(f"--with-gdbm={spec['gdbm'].prefix}")
else:
args.append("--without-gdbm")
if "+pgsql" in spec:
if spec.satisfies("+pgsql"):
args.append(f"--with-pgsql={spec['postgresql'].prefix}")
else:
args.append("--without-pgsql")
if "+sqlite" in spec:
if spec.satisfies("+sqlite"):
if spec.satisfies("^sqlite@3.0:3"):
args.extend([f"--with-sqlite3={spec['sqlite'].prefix}", "--without-sqlite2"])
elif spec.satisfies("^sqlite@2.0:2"):
@@ -81,7 +81,7 @@ def configure_args(self):
else:
args.extend(["--without-sqlite2", "--without-sqlite3"])
if "+odbc" in spec:
if spec.satisfies("+odbc"):
args.append(f"--with-odbc={spec['unixodbc'].prefix}")
else:
args.append("--without-odbc")

View File

@@ -117,7 +117,7 @@ def cmake_args(self):
self.define_from_variant("ARB_VECTORIZE", "vectorize"),
]
if "+cuda" in self.spec:
if self.spec.satisfies("+cuda"):
args.append("-DARB_GPU=cuda")
args.append(self.define_from_variant("ARB_USE_GPU_RNG", "gpu_rng"))

View File

@@ -115,10 +115,10 @@ def cmake_args(self):
self.define_from_variant("ARBORX_ENABLE_MPI", "mpi"),
]
if "+cuda" in spec:
if spec.satisfies("+cuda"):
# Only Kokkos allows '+cuda' for now
options.append("-DCMAKE_CXX_COMPILER=%s" % spec["kokkos"].kokkos_cxx)
if "+rocm" in spec:
if spec.satisfies("+rocm"):
options.append("-DCMAKE_CXX_COMPILER=%s" % spec["hip"].hipcc)
return options
@@ -152,7 +152,7 @@ def test_run_ctest(self):
),
self.define("ArborX_ROOT", self.spec["arborx".prefix]),
]
if "+mpi" in self.spec:
if self.spec.satisfies("+mpi"):
cmake_args.append(self.define("MPI_HOME", self.spec["mpi"].prefix))
cmake = which(self.spec["cmake"].prefix.bin.cmake)
make = which("make")

View File

@@ -53,20 +53,20 @@ class Argobots(AutotoolsPackage):
def configure_args(self):
args = []
if "+perf" in self.spec:
if self.spec.satisfies("+perf"):
args.append("--enable-perf-opt")
if "+valgrind" in self.spec:
if self.spec.satisfies("+valgrind"):
args.append("--enable-valgrind")
else:
args.append("--disable-valgrind")
if "+debug" in self.spec:
if self.spec.satisfies("+debug"):
args.append("--enable-debug=yes")
else:
args.append("--disable-debug")
if "+stackunwind" in self.spec:
if self.spec.satisfies("+stackunwind"):
args.append("--enable-stack-unwind")
args.append("--with-libunwind={0}".format(self.spec["libunwind"].prefix))
@@ -74,10 +74,10 @@ def configure_args(self):
if stackguard != "none":
args.append("--enable-stack-overflow-check={0}".format(stackguard))
if "+tool" in self.spec:
if self.spec.satisfies("+tool"):
args.append("--enable-tool")
if "+affinity" in self.spec:
if self.spec.satisfies("+affinity"):
args.append("--enable-affinity")
return args

View File

@@ -110,7 +110,7 @@ def libs(self):
# query_parameters = self.spec.last_query.extra_parameters
libraries = ["libarpack"]
if "+mpi" in self.spec:
if self.spec.satisfies("+mpi"):
libraries = ["libparpack"] + libraries
return find_libraries(libraries, root=self.prefix, shared=True, recursive=True)
@@ -160,7 +160,7 @@ def configure_args(self):
+ self.enable_or_disable("shared")
)
if "+mpi" in spec:
if spec.satisfies("+mpi"):
options.append(f"F77={spec['mpi'].mpif77}")
return options

View File

@@ -80,7 +80,7 @@ def cmake_args(self):
]
)
if "+cuda" in self.spec:
if self.spec.satisfies("+cuda"):
arch_list = [
"{}.{}".format(arch[:-1], arch[-1])
for arch in self.spec.variants["cuda_arch"].value

View File

@@ -396,7 +396,7 @@ def hostconfig(self):
#######################
c_compiler = env["SPACK_CC"]
cpp_compiler = env["SPACK_CXX"]
if "+fortran" in spec:
if spec.satisfies("+fortran"):
f_compiler = env["SPACK_FC"]
else:
f_compiler = None
@@ -414,7 +414,7 @@ def hostconfig(self):
# Find and record what CMake is used
##############################################
if "+cmake" in spec:
if spec.satisfies("+cmake"):
cmake_exe = spec["cmake"].command.path
else:
cmake_exe = which("cmake")
@@ -449,14 +449,14 @@ def hostconfig(self):
cfg.write(cmake_cache_entry("CMAKE_CXX_COMPILER", cpp_compiler))
cfg.write("# fortran compiler used by spack\n")
if "+fortran" in spec:
if spec.satisfies("+fortran"):
cfg.write(cmake_cache_entry("ENABLE_FORTRAN", "ON"))
cfg.write(cmake_cache_entry("CMAKE_Fortran_COMPILER", f_compiler))
else:
cfg.write(cmake_cache_entry("ENABLE_FORTRAN", "OFF"))
# shared vs static libs
if "+shared" in spec:
if spec.satisfies("+shared"):
cfg.write(cmake_cache_entry("BUILD_SHARED_LIBS", "ON"))
else:
cfg.write(cmake_cache_entry("BUILD_SHARED_LIBS", "OFF"))
@@ -481,7 +481,7 @@ def hostconfig(self):
#######################
# Unit Tests
#######################
if "+test" in spec:
if spec.satisfies("+test"):
cfg.write(cmake_cache_entry("ENABLE_TESTS", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_TESTS", "OFF"))
@@ -534,7 +534,7 @@ def hostconfig(self):
# Serial
#######################
if "+serial" in spec:
if spec.satisfies("+serial"):
cfg.write(cmake_cache_entry("ENABLE_SERIAL", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_SERIAL", "OFF"))
@@ -545,7 +545,7 @@ def hostconfig(self):
cfg.write("# MPI Support\n")
if "+mpi" in spec:
if spec.satisfies("+mpi"):
mpicc_path = spec["mpi"].mpicc
mpicxx_path = spec["mpi"].mpicxx
mpifc_path = spec["mpi"].mpifc if "+fortran" in spec else None
@@ -560,7 +560,7 @@ def hostconfig(self):
cfg.write(cmake_cache_entry("ENABLE_MPI", "ON"))
cfg.write(cmake_cache_entry("MPI_C_COMPILER", mpicc_path))
cfg.write(cmake_cache_entry("MPI_CXX_COMPILER", mpicxx_path))
if "+fortran" in spec:
if spec.satisfies("+fortran"):
cfg.write(cmake_cache_entry("MPI_Fortran_COMPILER", mpifc_path))
mpiexe_bin = join_path(spec["mpi"].prefix.bin, "mpiexec")
if os.path.isfile(mpiexe_bin):
@@ -571,14 +571,14 @@ def hostconfig(self):
else:
cfg.write(cmake_cache_entry("MPIEXEC", mpiexe_bin))
if "+blt_find_mpi" in spec:
if spec.satisfies("+blt_find_mpi"):
cfg.write(cmake_cache_entry("ENABLE_FIND_MPI", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_FIND_MPI", "OFF"))
###################################
# BABELFLOW (also depends on mpi)
###################################
if "+babelflow" in spec:
if spec.satisfies("+babelflow"):
cfg.write(cmake_cache_entry("ENABLE_BABELFLOW", "ON"))
cfg.write(cmake_cache_entry("BabelFlow_DIR", spec["babelflow"].prefix))
cfg.write(cmake_cache_entry("PMT_DIR", spec["parallelmergetree"].prefix))
@@ -591,12 +591,12 @@ def hostconfig(self):
cfg.write("# CUDA Support\n")
if "+cuda" in spec:
if spec.satisfies("+cuda"):
cfg.write(cmake_cache_entry("ENABLE_CUDA", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_CUDA", "OFF"))
if "+openmp" in spec:
if spec.satisfies("+openmp"):
cfg.write(cmake_cache_entry("ENABLE_OPENMP", "ON"))
else:
cfg.write(cmake_cache_entry("ENABLE_OPENMP", "OFF"))
@@ -606,7 +606,7 @@ def hostconfig(self):
#######################
cfg.write("# vtk-h support \n")
if "+vtkh" in spec:
if spec.satisfies("+vtkh"):
cfg.write("# vtk-h\n")
if self.spec.satisfies("@0.8.1:"):
cfg.write(cmake_cache_entry("ENABLE_VTKH", "ON"))
@@ -616,7 +616,7 @@ def hostconfig(self):
cfg.write("# vtk-m from spack\n")
cfg.write(cmake_cache_entry("VTKM_DIR", spec["vtk-m"].prefix))
if "+cuda" in spec:
if spec.satisfies("+cuda"):
cfg.write(cmake_cache_entry("VTKm_ENABLE_CUDA", "ON"))
cfg.write(cmake_cache_entry("CMAKE_CUDA_HOST_COMPILER", env["SPACK_CXX"]))
else:
@@ -632,7 +632,7 @@ def hostconfig(self):
#######################
# RAJA
#######################
if "+raja" in spec:
if spec.satisfies("+raja"):
cfg.write("# RAJA from spack \n")
cfg.write(cmake_cache_entry("RAJA_DIR", spec["raja"].prefix))
else:
@@ -641,7 +641,7 @@ def hostconfig(self):
#######################
# Umpire
#######################
if "+umpire" in spec:
if spec.satisfies("+umpire"):
cfg.write("# umpire from spack \n")
cfg.write(cmake_cache_entry("UMPIRE_DIR", spec["umpire"].prefix))
else:
@@ -659,7 +659,7 @@ def hostconfig(self):
#######################
# MFEM
#######################
if "+mfem" in spec:
if spec.satisfies("+mfem"):
cfg.write("# mfem from spack \n")
cfg.write(cmake_cache_entry("MFEM_DIR", spec["mfem"].prefix))
else:
@@ -668,7 +668,7 @@ def hostconfig(self):
#######################
# OCCA
#######################
if "+occa" in spec:
if spec.satisfies("+occa"):
cfg.write("# occa from spack \n")
cfg.write(cmake_cache_entry("OCCA_DIR", spec["occa"].prefix))
else:
@@ -677,7 +677,7 @@ def hostconfig(self):
#######################
# Devil Ray
#######################
if "+dray" in spec:
if spec.satisfies("+dray"):
cfg.write("# devil ray\n")
if self.spec.satisfies("@0.8.1:"):
cfg.write(cmake_cache_entry("ENABLE_DRAY", "ON"))
@@ -698,7 +698,7 @@ def hostconfig(self):
#######################
cfg.write("# adios2 support\n")
if "+adios2" in spec:
if spec.satisfies("+adios2"):
cfg.write(cmake_cache_entry("ADIOS2_DIR", spec["adios2"].prefix))
else:
cfg.write("# adios2 not built by spack \n")
@@ -708,7 +708,7 @@ def hostconfig(self):
#######################
cfg.write("# Fides support\n")
if "+fides" in spec:
if spec.satisfies("+fides"):
cfg.write(cmake_cache_entry("FIDES_DIR", spec["fides"].prefix))
else:
cfg.write("# fides not built by spack \n")
@@ -717,7 +717,7 @@ def hostconfig(self):
# Caliper
#######################
cfg.write("# caliper from spack \n")
if "+caliper" in spec:
if spec.satisfies("+caliper"):
cfg.write(cmake_cache_entry("CALIPER_DIR", spec["caliper"].prefix))
cfg.write(cmake_cache_entry("ADIAK_DIR", spec["adiak"].prefix))
else:

View File

@@ -185,7 +185,7 @@ def setup_build_environment(self, env):
env.set("OPT", "-O3")
if "+mpi" in spec:
if spec.satisfies("+mpi"):
env.set("CC", spec["mpi"].mpicc)
env.set("LDR", spec["mpi"].mpicc)
env.set("MPILIB", spec["mpi"].libs.ld_flags)
@@ -194,7 +194,7 @@ def setup_build_environment(self, env):
env.set("CC", spack_cc)
env.set("LDR", spack_cc)
if "+fft" in spec:
if spec.satisfies("+fft"):
env.set("FFTWLIB", spec["fftw"].libs.ld_flags)
env.set("FFTWINC", spec["fftw"].headers.include_flags)
@@ -202,82 +202,82 @@ def configure_args(self):
spec = self.spec
args = []
if "+conduction" in spec:
if spec.satisfies("+conduction"):
args.append("--enable-conduction")
else:
args.append("--disable-conduction")
if "+resistivity" in spec:
if spec.satisfies("+resistivity"):
args.append("--enable-resistivity")
else:
args.append("--disable-resistivity")
if "+special_relativity" in spec:
if spec.satisfies("+special_relativity"):
args.append("--enable-special-relativity")
else:
args.append("--disable-special-relativity")
if "+viscosity" in spec:
if spec.satisfies("+viscosity"):
args.append("--enable-viscosity")
else:
args.append("--disable-viscosity")
if "+single" in spec:
if spec.satisfies("+single"):
args.append("--enable-single")
else:
args.append("--disable-single")
if "+ghost" in spec:
if spec.satisfies("+ghost"):
args.append("--enable-ghost")
else:
args.append("--disable-ghost")
if "+mpi" in spec:
if spec.satisfies("+mpi"):
args.append("--enable-mpi")
else:
args.append("--disable-mpi")
if "+h_correction" in spec:
if spec.satisfies("+h_correction"):
args.append("--enable-h-correction")
else:
args.append("--disable-h-correction")
if "+fft" in spec:
if spec.satisfies("+fft"):
args.append("--enable-fft")
else:
args.append("--disable-fft")
if "+shearing_box" in spec:
if spec.satisfies("+shearing_box"):
args.append("--enable-shearing-box")
else:
args.append("--disable-shearing-box")
if "+fargo" in spec:
if spec.satisfies("+fargo"):
args.append("--enable-fargo")
else:
args.append("--disable-fargo")
if "+sts" in spec:
if spec.satisfies("+sts"):
args.append("--enable-sts")
else:
args.append("--disable-sts")
if "+smr" in spec:
if spec.satisfies("+smr"):
args.append("--enable-smr")
else:
args.append("--disable-smr")
if "+fofc" in spec:
if spec.satisfies("+fofc"):
args.append("--enable-fofc")
else:
args.append("--disable-fofc")
if "+rotating_frame" in spec:
if spec.satisfies("+rotating_frame"):
args.append("--enable-rotating_frame")
else:
args.append("--disable-rotating_frame")
if "+l1_inflow" in spec:
if spec.satisfies("+l1_inflow"):
args.append("--enable-l1_inflow")
else:
args.append("--disable-l1_inflow")

View File

@@ -100,7 +100,7 @@ def install(self, spec, prefix):
# https://github.com/macports/macports-ports/blob/master/math/atlas/Portfile
# https://github.com/Homebrew/homebrew-science/pull/3571
options = []
if "+shared" in spec:
if spec.satisfies("+shared"):
options.extend(["--shared"])
# TODO: for non GNU add '-Fa', 'alg', '-fPIC' ?
@@ -129,7 +129,7 @@ def install(self, spec, prefix):
make("check")
make("ptcheck")
make("time")
if "+shared" in spec:
if spec.satisfies("+shared"):
with working_dir("lib"):
make("shared_all")
@@ -143,7 +143,7 @@ def libs(self):
# serial BLAS), and all ATLAS symbols needed to support them. Whereas
# libtatlas.[so,dylib,dll ] is parallel (multithreaded) version.
is_threaded = self.spec.satisfies("threads=pthreads")
if "+shared" in self.spec:
if self.spec.satisfies("+shared"):
to_find = ["libtatlas"] if is_threaded else ["libsatlas"]
shared = True
else:

View File

@@ -15,6 +15,7 @@ class AuditUserspace(AutotoolsPackage):
license("LGPL-2.1-or-later")
version("4.0.1", sha256="f964610dc0c1e68075d5ae4b14d6280d1164b6eca3a4a13721d1a711681403d9")
version("3.1.2", sha256="4516dbfd1bea0eea10a30f907e50f17087673a536ec6322a2a568dff4ebe50f4")
version("3.1.1", sha256="6a97cc472920639d736e9927353be05e323f351067fcf6e5d34439cafa0e9006")
version("2.8.5", sha256="835ffdd65056ba0c26509dbf48882713b00dbe70e1d8cf25d538501136c2e3e9")
version("2.8.4", sha256="089dfdceb38edf056202a6de4892fd0c9aaa964c08bd7806c5d0c7c33f09e18d")
@@ -29,3 +30,9 @@ class AuditUserspace(AutotoolsPackage):
depends_on("m4", type="build")
depends_on("openldap")
depends_on("swig")
patch(
"https://github.com/linux-audit/audit-userspace/commit/28a74a445d54932e1450b60d6148912344615b44.patch?full_index=1",
sha256="63d4644c7037be21bcafa913f4c96fbaa37f388c170cf0344869a0dc2449fd65",
when="@4.0.1",
)

View File

@@ -69,7 +69,7 @@ class Augustus(MakefilePackage):
def edit(self, spec, prefix):
# Set compile commands for each compiler and
# Fix for using 'boost' on Spack. (only after ver.3.3.1-tag1)
if "@3.3.1-tag1:3.4.0" in spec:
if spec.satisfies("@3.3.1-tag1:3.4.0"):
with working_dir(join_path("auxprogs", "utrrnaseq", "Debug")):
filter_file("g++", spack_cxx, "makefile", string=True)
filter_file(
@@ -108,22 +108,22 @@ def edit(self, spec, prefix):
makefile = FileFilter("Makefile")
makefile.filter("BAMTOOLS = .*", f"BAMTOOLS = {bamtools}")
makefile.filter("INCLUDES = *", "INCLUDES = -I$(BAMTOOLS)/include/bamtools ")
if "bamtools@2.5:" in spec:
if spec.satisfies("bamtools@2.5:"):
makefile.filter(
"LIBS = -lbamtools -lz", "LIBS = $(BAMTOOLS)/lib64" "/libbamtools.a -lz"
)
if "bamtools@:2.4" in spec:
if spec.satisfies("bamtools@:2.4"):
makefile.filter(
"LIBS = -lbamtools -lz", "LIBS = $(BAMTOOLS)/lib/bamtools" "/libbamtools.a -lz"
)
with working_dir(join_path("auxprogs", "bam2hints")):
makefile = FileFilter("Makefile")
makefile.filter("/usr/include/bamtools", f"{bamtools}/include/bamtools")
if "bamtools@2.5:" in spec:
if spec.satisfies("bamtools@2.5:"):
makefile.filter(
"LIBS = -lbamtools -lz", f"LIBS = {bamtools}/lib64/libbamtools.a -lz"
)
if "bamtools@:2.4" in spec:
if spec.satisfies("bamtools@:2.4"):
makefile.filter(
"LIBS = -lbamtools -lz", f"LIBS = {bamtools}/lib/bamtools/libbamtools.a -lz"
)
@@ -151,7 +151,7 @@ def edit(self, spec, prefix):
with working_dir("src"):
makefile = FileFilter("Makefile")
makefile.filter(r"/usr/include/mysql\+\+", f"{mysqlpp}/include/mysql++")
if "^mariadb-c-client" in spec:
if spec.satisfies("^mariadb-c-client"):
makefile.filter("/usr/include/mysql", f"{mysql}/include/mariadb")
else:
makefile.filter("/usr/include/mysql", f"{mysql}/include/mysql")
@@ -180,10 +180,10 @@ def setup_build_environment(self, env):
htslib = self.spec["htslib"].prefix
bamtools = self.spec["bamtools"].prefix
if "@3.4.0" in self.spec:
if self.spec.satisfies("@3.4.0"):
env.set("HTSLIBDIR", htslib)
if "@3.5.0:" in self.spec:
if self.spec.satisfies("@3.5.0:"):
env.set("HTSLIB_INSTALL_DIR", htslib)
env.set("BAMTOOLS_INSTALL_DIR", bamtools)

View File

@@ -84,7 +84,7 @@ def patch(self):
# We save and restore the modification timestamp of the file to prevent
# regeneration of the respective man page:
with keep_modification_time(patched_file):
if "@2.70:" in self.spec:
if self.spec.satisfies("@2.70:"):
shebang_string = "^#! @PERL@"
else:
shebang_string = "^#! @PERL@ -w"
@@ -104,7 +104,7 @@ def filter_sbang(self):
# target will try to rebuild the binaries (filter_file updates the
# timestamps)
if "@2.70:" in self.spec:
if self.spec.satisfies("@2.70:"):
shebang_string = "#! {0}"
else:
shebang_string = "#! {0} -w"

View File

@@ -39,7 +39,7 @@ def configure_args(self):
"--disable-nls"
]
if "+xml" in spec:
if spec.satisfies("+xml"):
args.append(f"--with-libxml2={spec['libxml2'].prefix}")
else:
args.append("--without-libxml2")

View File

@@ -45,10 +45,10 @@ def determine_version(cls, exe):
def patch(self):
# The full perl shebang might be too long
files_to_be_patched_fmt = "bin/{0}.in"
if "@:1.15.1" in self.spec:
if self.spec.satisfies("@:1.15.1"):
files_to_be_patched_fmt = "t/wrap/{0}.in"
if "@1.16.3:" in self.spec:
if self.spec.satisfies("@1.16.3:"):
shebang_string = "^#!@PERL@"
else:
shebang_string = "^#!@PERL@ -w"

View File

@@ -243,11 +243,11 @@ def cache_name(self):
# Are we on a LLNL system then strip node number
hostname = hostname.rstrip("1234567890")
special_case = ""
if "+cuda" in self.spec:
if self.spec.satisfies("+cuda"):
special_case += "_cuda"
if "~fortran" in self.spec:
if self.spec.satisfies("~fortran"):
special_case += "_nofortran"
if "+rocm" in self.spec:
if self.spec.satisfies("+rocm"):
special_case += "_hip"
return "{0}-{1}-{2}@{3}{4}.cmake".format(
hostname,
@@ -261,7 +261,7 @@ def initconfig_compiler_entries(self):
spec = self.spec
entries = super().initconfig_compiler_entries()
if "+fortran" in spec:
if spec.satisfies("+fortran"):
entries.append(cmake_cache_option("ENABLE_FORTRAN", True))
if self.is_fortran_compiler("gfortran") and "clang" in self.compiler.cxx:
libdir = pjoin(os.path.dirname(os.path.dirname(self.compiler.cxx)), "lib")
@@ -282,7 +282,7 @@ def initconfig_compiler_entries(self):
entries.append(cmake_cache_string("BLT_CXX_STD", "c++14", ""))
# Add optimization flag workaround for Debug builds with cray compiler or newer HIP
if "+rocm" in spec:
if spec.satisfies("+rocm"):
entries.append(cmake_cache_string("CMAKE_CXX_FLAGS_DEBUG", "-O1 -g -DNDEBUG"))
return entries
@@ -291,7 +291,7 @@ def initconfig_hardware_entries(self):
spec = self.spec
entries = super().initconfig_hardware_entries()
if "+cuda" in spec:
if spec.satisfies("+cuda"):
entries.append(cmake_cache_option("ENABLE_CUDA", True))
entries.append(cmake_cache_option("CMAKE_CUDA_SEPARABLE_COMPILATION", True))
@@ -304,7 +304,7 @@ def initconfig_hardware_entries(self):
if spec.satisfies("^blt@:0.5.1"):
# This is handled internally by BLT now
if "+cpp14" in spec:
if spec.satisfies("+cpp14"):
cudaflags += " -std=c++14"
else:
cudaflags += " -std=c++11"
@@ -313,7 +313,7 @@ def initconfig_hardware_entries(self):
entries.append("# nvcc does not like gtest's 'pthreads' flag\n")
entries.append(cmake_cache_option("gtest_disable_pthreads", True))
if "+rocm" in spec:
if spec.satisfies("+rocm"):
entries.append("#------------------{0}\n".format("-" * 60))
entries.append("# Axom ROCm specifics\n")
entries.append("#------------------{0}\n\n".format("-" * 60))
@@ -385,7 +385,7 @@ def initconfig_hardware_entries(self):
entries.append(cmake_cache_string("BLT_EXE_LINKER_FLAGS", linker_flags, description))
if "+shared" in spec:
if spec.satisfies("+shared"):
linker_flags = "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath," + libdir
entries.append(
cmake_cache_string("CMAKE_SHARED_LINKER_FLAGS", linker_flags, description)
@@ -440,7 +440,7 @@ def initconfig_mpi_entries(self):
spec = self.spec
entries = super().initconfig_mpi_entries()
if "+mpi" in spec:
if spec.satisfies("+mpi"):
entries.append(cmake_cache_option("ENABLE_MPI", True))
if spec["mpi"].name == "spectrum-mpi":
entries.append(cmake_cache_string("BLT_MPI_COMMAND_APPEND", "mpibind"))
@@ -496,7 +496,7 @@ def initconfig_package_entries(self):
else:
entries.append("# %s not built\n" % dep.upper())
if "+profiling" in spec:
if spec.satisfies("+profiling"):
dep_dir = get_spec_path(spec, "adiak", path_replacements)
entries.append(cmake_cache_path("ADIAK_DIR", dep_dir))
@@ -508,7 +508,7 @@ def initconfig_package_entries(self):
entries.append(cmake_cache_path("CAMP_DIR", dep_dir))
# SCR does not export it's targets so we need to pull in its dependencies
if "+scr" in spec:
if spec.satisfies("+scr"):
dep_dir = get_spec_path(spec, "scr", path_replacements)
entries.append(cmake_cache_path("SCR_DIR", dep_dir))
@@ -541,7 +541,7 @@ def initconfig_package_entries(self):
entries.append("#------------------{0}\n".format("-" * 60))
# Add common prefix to path replacement list
if "+devtools" in spec:
if spec.satisfies("+devtools"):
# Grab common devtools root and strip the trailing slash
path1 = os.path.realpath(spec["cppcheck"].prefix)
path2 = os.path.realpath(spec["doxygen"].prefix)

View File

@@ -56,7 +56,7 @@ class Babelstream(CMakePackage, CudaPackage, ROCmPackage):
# ACC conflict
variant("cpu_arch", values=str, default="none", description="Enable CPU Target for ACC")
variant("target", values=str, default="none", description="Enable CPU Target for ACC")
variant("acc_target", values=str, default="none", description="Enable CPU Target for ACC")
# STD conflicts
conflicts("+stddata", when="%gcc@:10.1.0", msg="STD-data requires newer version of GCC")
@@ -77,7 +77,7 @@ class Babelstream(CMakePackage, CudaPackage, ROCmPackage):
conflicts(
"offload=none",
when="+raja",
msg="RAJA requires architecture to be specfied by target=[CPU,NVIDIA]",
msg="RAJA requires architecture to be specfied by acc_target=[CPU,NVIDIA]",
)
# download raja from https://github.com/LLNL/RAJA
@@ -253,7 +253,7 @@ def cmake_args(self):
# SYCL
# ===================================
if "+sycl" in self.spec:
if self.spec.satisfies("+sycl"):
args.append("-DSYCL_COMPILER=" + self.spec.variants["implementation"].value.upper())
if self.spec.variants["implementation"].value.upper() != "ONEAPI-DPCPP":
args.append(
@@ -266,7 +266,7 @@ def cmake_args(self):
# SYCL 2020
# ===================================
if "+sycl2020" in self.spec:
if self.spec.satisfies("+sycl2020"):
if self.spec.satisfies("%oneapi"):
# -fsycl flag is required for setting up sycl/sycl.hpp seems like
# it doesn't get it from the CMake file
@@ -288,7 +288,7 @@ def cmake_args(self):
# HIP(ROCM)
# ===================================
if "+rocm" in self.spec:
if self.spec.satisfies("+rocm"):
hip_comp = self.spec["rocm"].prefix + "/bin/hipcc"
args.append("-DCMAKE_CXX_COMPILER=" + hip_comp)
args.append(
@@ -303,14 +303,14 @@ def cmake_args(self):
# TBB
# ===================================
if "+tbb" in self.spec:
if self.spec.satisfies("+tbb"):
args.append("-DONE_TBB_DIR=" + self.spec["tbb"].prefix + "/tbb/latest/")
args.append("-DPARTITIONER=" + self.spec.variants["partitioner"].value.upper())
# ===================================
# OpenCL (ocl)
# ===================================
if "+ocl" in self.spec:
if self.spec.satisfies("+ocl"):
if "backend" in self.spec.variants:
if "cuda" in self.spec.variants["backend"].value:
cuda_dir = self.spec["cuda"].prefix
@@ -333,7 +333,7 @@ def cmake_args(self):
# ===================================
# RAJA
# ===================================
if "+raja" in self.spec:
if self.spec.satisfies("+raja"):
args.append("-DCMAKE_CXX_COMPILER=" + self.compiler.cxx)
args.append("-DRAJA_IN_TREE=" + self.spec.variants["dir"].value)
if "offload" in self.spec.variants:
@@ -360,7 +360,7 @@ def cmake_args(self):
# ===================================
# THRUST
# ===================================
if "+thrust" in self.spec:
if self.spec.satisfies("+thrust"):
if "cuda" in self.spec.variants["implementation"].value:
args.append("-DTHRUST_IMPL=" + self.spec.variants["implementation"].value.upper())
args.append("-SDK_DIR=" + self.spec["thrust"].prefix + "/include")
@@ -385,7 +385,7 @@ def cmake_args(self):
# ===================================
# kokkos implementation is versatile and it could use cuda or omp architectures as backend
# The usage should be spack install babelstream +kokkos +cuda [or +omp]
if "+kokkos" in self.spec:
if self.spec.satisfies("+kokkos"):
args.append("-DCMAKE_CXX_COMPILER=" + self.compiler.cxx)
args.append("-DKOKKOS_IN_TREE=" + self.spec.variants["dir"].value)
# args.append("-DKOKKOS_IN_PACKAGE=" + self.spec["kokkos"].prefix)

View File

@@ -16,10 +16,12 @@ class Babeltrace(AutotoolsPackage):
license("MIT")
version("1.5.11", sha256="67b43aaaef5c951fa7af1a557cf7201a11fe89876b7c22ba0a03cbc316db5a9c")
version("1.2.4", sha256="666e3a1ad2dc7d5703059963056e7800f0eab59c8eeb6be2efe4f3acc5209eb1")
depends_on("c", type="build") # generated
depends_on("pkgconfig", type="build")
depends_on("glib@2.22:", type=("build", "link"))
depends_on("uuid")
depends_on("popt")

View File

@@ -7,7 +7,7 @@
class Bacio(CMakePackage):
"""The bacio ibrary performs binary I/O for the NCEP models, processing
"""The bacio library performs binary I/O for the NCEP models, processing
unformatted byte-addressable data records, and transforming the little
endian files and big endian files."""
@@ -15,15 +15,15 @@ class Bacio(CMakePackage):
url = "https://github.com/NOAA-EMC/NCEPLIBS-bacio/archive/refs/tags/v2.4.1.tar.gz"
git = "https://github.com/NOAA-EMC/NCEPLIBS-bacio"
maintainers("t-brown", "edwardhartnett", "AlexanderRichert-NOAA", "Hang-Lei-NOAA")
maintainers("edwardhartnett", "AlexanderRichert-NOAA", "Hang-Lei-NOAA")
version("develop", branch="develop")
version("2.6.0", sha256="03fef581e1bd3710fb8d2f2659a6c3e01a0437c1350ba53958d2ff1ffef47bcb")
version("2.5.0", sha256="540a0ed73941d70dbf5d7b21d5d0a441e76fad2bfe37dfdfea0db3e98fc0fbfb")
version("2.4.1", sha256="7b9b6ba0a288f438bfba6a08b6e47f8133f7dba472a74ac56a5454e2260a7200")
depends_on("c", type="build") # generated
depends_on("fortran", type="build") # generated
depends_on("c", type="build")
depends_on("fortran", type="build")
variant("pic", default=True, description="Build with position-independent-code")
variant("shared", default=False, description="Build shared library", when="@2.6.0:")

View File

@@ -62,7 +62,7 @@ def edit(self, spec, prefix):
if "^netlib-lapack+lapacke" not in spec:
env["NOLAPACKE"] = "1"
if "+cuda" in spec:
if spec.satisfies("+cuda"):
cuda_arch = self.spec.variants["cuda_arch"].value
env["CUDA"] = "1"
env["CUDA_BASE"] = spec["cuda"].prefix
@@ -79,7 +79,7 @@ def install(self, spec, prefix):
install("python/cfl.py", python_platlib)
install("python/wslsupport.py", python_platlib)
if "^python@3:" in spec:
if spec.satisfies("^python@3:"):
install("python/bartview3.py", join_path(prefix.bin, "bartview"))
filter_file(r"#!/usr/bin/python3", "#!/usr/bin/env python", prefix.bin.bartview)
else:

View File

@@ -33,6 +33,6 @@ def configure_args(self):
spec = self.spec
args = ["--with-gmp-prefix={0}".format(self.spec["gmp"].prefix)]
if "+pet" in spec:
if spec.satisfies("+pet"):
args.append("--with-pet=bundled")
return args

View File

@@ -100,7 +100,7 @@ def set_make_options(self):
options.append("prefix={0}".format(self.prefix))
options.append("HTSDIR={0}".format(self.spec["htslib"].prefix))
if "+libgsl" in self.spec:
if self.spec.satisfies("+libgsl"):
options.append("USE_GPL=1")
return options

View File

@@ -14,19 +14,25 @@ class Bdftopcf(AutotoolsPackage, XorgPackage):
appropriate machine, but the files are still portable (but read more
slowly) on other machines."""
homepage = "https://cgit.freedesktop.org/xorg/app/bdftopcf"
xorg_mirror_path = "app/bdftopcf-1.0.5.tar.gz"
homepage = "https://gitlab.freedesktop.org/xorg/util/bdftopcf"
xorg_mirror_path = "util/bdftopcf-1.0.5.tar.gz"
license("MIT")
version("1.1.1", sha256="3291df9910c006a0345f3eac485e2a5734bbb79a0d97bf1f2b4cddad48fb1bc4")
version("1.1", sha256="699d1a62012035b1461c7f8e3f05a51c8bd6f28f348983249fb89bbff7309b47")
version("1.0.5", sha256="78a5ec945de1d33e6812167b1383554fda36e38576849e74a9039dc7364ff2c3")
depends_on("c", type="build") # generated
# note: url_for_version can only return a single url, no mirrors
@when("@:1.1.0")
def url_for_version(self, version):
return self.urls[0].replace("util", "app")
depends_on("c", type="build")
depends_on("libxfont")
depends_on("pkgconfig", type="build")
depends_on("xproto")
depends_on("fontsproto")
depends_on("xproto", type="build")
depends_on("fontsproto", type="build")
depends_on("util-macros", type="build")

View File

@@ -84,7 +84,7 @@ def cmake_args(self):
# Use hipcc as the c compiler if we are compiling for rocm. Doing it this way
# keeps the wrapper insted of changeing CMAKE_CXX_COMPILER keeps the spack wrapper
# and the rpaths it sets for us from the underlying spec.
if "+rocm" in self.spec:
if self.spec.satisfies("+rocm"):
env["SPACK_CXX"] = self.spec["hip"].hipcc
# If we're building with cray mpich, we need to make sure we get the GTL library for

View File

@@ -122,7 +122,7 @@ def edit(self, spec, prefix):
tar("-x", "-f", self.stage.archive_file, "--strip-components=1")
# get generic arch.mk template
if "+mpi" in spec:
if spec.satisfies("+mpi"):
copy(join_path(self.stage.source_path, "config", "generic.mpi.linux.mk"), "arch.mk")
else:
copy(join_path(self.stage.source_path, "config", "generic.serial.linux.mk"), "arch.mk")
@@ -189,27 +189,27 @@ def build(self, spec, prefix):
buildopts = []
paraflags = []
if "+mpi" in spec:
if spec.satisfies("+mpi"):
paraflags.append("-DMPI")
# We need to copy fflags in case we append to it (#34019):
fflags = spec.compiler_flags["fflags"][:]
if "+openmp" in spec:
if spec.satisfies("+openmp"):
paraflags.append("-DOMP")
fflags.append(self.compiler.openmp_flag)
if "+mpi" in spec:
if spec.satisfies("+mpi"):
buildopts.append("C_PARAFLAG=-DPARA")
buildopts.append("PARAFLAG=%s" % " ".join(paraflags))
debugflag = ""
if "+debug" in spec:
if spec.satisfies("+debug"):
debugflag += "-DDEBUG "
if "+verbose" in spec:
if spec.satisfies("+verbose"):
debugflag += "-DVERBOSE "
buildopts.append("DEBUGFLAG=%s" % debugflag)
if "+mpi" in spec:
if spec.satisfies("+mpi"):
buildopts.append("LINK=%s" % spec["mpi"].mpifc)
buildopts.append("C_LINK=%s" % spec["mpi"].mpicxx)
else:
@@ -228,7 +228,7 @@ def build(self, spec, prefix):
buildopts.append("LAPACKLIB=%s" % spec["lapack"].libs.ld_flags)
if "+mpi" in spec:
if spec.satisfies("+mpi"):
mathflags.append("-DUSESCALAPACK")
buildopts.append("SCALAPACKLIB=%s" % spec["scalapack"].libs.ld_flags)
@@ -236,7 +236,7 @@ def build(self, spec, prefix):
buildopts.append("COMPFLAG=-DINTEL")
buildopts.append("MOD_OPT=-module ")
buildopts.append("FCPP=cpp -C -P -ffreestanding")
if "+mpi" in spec:
if spec.satisfies("+mpi"):
buildopts.append("F90free=%s -free" % spec["mpi"].mpifc)
buildopts.append("C_COMP=%s" % spec["mpi"].mpicc)
buildopts.append("CC_COMP=%s" % spec["mpi"].mpicxx)
@@ -262,7 +262,7 @@ def build(self, spec, prefix):
buildopts.append(
"FCPP=%s -C -nostdinc -std=c11" % join_path(self.compiler.prefix, "bin", "cpp")
)
if "+mpi" in spec:
if spec.satisfies("+mpi"):
buildopts.append("F90free=%s %s" % (spec["mpi"].mpifc, f90_flags))
buildopts.append("C_COMP=%s %s" % (spec["mpi"].mpicc, c_flags))
buildopts.append("CC_COMP=%s %s" % (spec["mpi"].mpicxx, cxx_flags))
@@ -278,7 +278,7 @@ def build(self, spec, prefix):
buildopts.append("COMPFLAG=")
buildopts.append("MOD_OPT=-module ")
buildopts.append("FCPP=cpp -C -nostdinc")
if "+mpi" in spec:
if spec.satisfies("+mpi"):
buildopts.append("F90free=%s %s" % (spec["mpi"].mpifc, f90_flags))
buildopts.append("C_COMP=%s %s" % (spec["mpi"].mpicc, c_flags))
buildopts.append("CC_COMP=%s %s" % (spec["mpi"].mpicxx, cxx_flags))
@@ -293,16 +293,16 @@ def build(self, spec, prefix):
"BerkeleyGW with compiler %s" % spec.compiler
)
if "+hdf5" in spec:
if spec.satisfies("+hdf5"):
mathflags.append("-DHDF5")
buildopts.append("HDF5INCLUDE=%s" % spec["hdf5"].prefix.include)
buildopts.append("HDF5LIB=%s" % spec["hdf5:hl,fortran"].libs.ld_flags)
if "+elpa" in spec:
if spec.satisfies("+elpa"):
mathflags.append("-DUSEELPA")
elpa = spec["elpa"]
if "+openmp" in spec:
if spec.satisfies("+openmp"):
elpa_suffix = "_openmp"
else:
elpa_suffix = ""

View File

@@ -51,7 +51,7 @@ def configure_args(self):
cflags = []
cxxflags = []
if "+openmp" in spec:
if spec.satisfies("+openmp"):
fcflags.append(self.compiler.openmp_flag)
if spec.satisfies("+shared"):
@@ -74,7 +74,7 @@ def configure_args(self):
if spec.satisfies("+shared"):
args.append("--enable-dynamic-libraries")
if "+mpi" in spec:
if spec.satisfies("+mpi"):
args.append(f"CC={spec['mpi'].mpicc}")
args.append(f"CXX={spec['mpi'].mpicxx}")
args.append(f"FC={spec['mpi'].mpifc}")
@@ -83,12 +83,12 @@ def configure_args(self):
else:
args.append("--disable-mpi")
if "+openmp" in spec:
if spec.satisfies("+openmp"):
args.append("--with-openmp")
else:
args.append("--without-openmp")
if "+openbabel" in spec:
if spec.satisfies("+openbabel"):
args.append("--enable-openbabel")
args.append(f"--with-openbabel-libs={spec['openbabel'].prefix.lib}")
args.append(f"--with-openbabel-incs={spec['openbabel'].prefix.include}")

View File

@@ -60,11 +60,11 @@ def configure_args(self):
pyyaml = join_path(spec["py-pyyaml"].prefix.lib, f"python{python_version}")
openmp_flag = []
if "+openmp" in spec:
if spec.satisfies("+openmp"):
openmp_flag.append(self.compiler.openmp_flag)
linalg = []
if "+scalapack" in spec:
if spec.satisfies("+scalapack"):
linalg.append(spec["scalapack"].libs.ld_flags)
linalg.append(spec["lapack"].libs.ld_flags)
linalg.append(spec["blas"].libs.ld_flags)
@@ -83,7 +83,7 @@ def configure_args(self):
if spec.satisfies("+shared"):
args.append("--enable-dynamic-libraries")
if "+mpi" in spec:
if spec.satisfies("+mpi"):
args.append(f"CC={spec['mpi'].mpicc}")
args.append(f"CXX={spec['mpi'].mpicxx}")
args.append(f"FC={spec['mpi'].mpifc}")
@@ -92,22 +92,22 @@ def configure_args(self):
else:
args.append("--disable-mpi")
if "+openmp" in spec:
if spec.satisfies("+openmp"):
args.append("--with-openmp")
else:
args.append("--without-openmp")
args.append(f"--with-atlab-libs={spec['bigdft-atlab'].prefix.lib}")
if "+cuda" in spec:
if spec.satisfies("+cuda"):
args.append("--enable-cuda-gpu")
args.append(f"--with-cuda-path={spec['cuda'].prefix}")
args.append(f"--with-cuda-libs={spec['cuda'].libs.link_flags}")
if "+minpack" in spec:
if spec.satisfies("+minpack"):
args.append("--with-minpack")
if "+ntpoly" in spec:
if spec.satisfies("+ntpoly"):
args.append("--enable-ntpoly")
return args

View File

@@ -64,11 +64,11 @@ def configure_args(self):
pyyaml = join_path(spec["py-pyyaml"].prefix.lib, f"python{python_version}")
openmp_flag = []
if "+openmp" in spec:
if spec.satisfies("+openmp"):
openmp_flag.append(self.compiler.openmp_flag)
linalg = []
if "+scalapack" in spec:
if spec.satisfies("+scalapack"):
linalg.append(spec["scalapack"].libs.ld_flags)
linalg.append(spec["lapack"].libs.ld_flags)
linalg.append(spec["blas"].libs.ld_flags)
@@ -96,7 +96,7 @@ def configure_args(self):
if spec.satisfies("+shared"):
args.append("--enable-dynamic-libraries")
if "+mpi" in spec:
if spec.satisfies("+mpi"):
args.append(f"CC={spec['mpi'].mpicc}")
args.append(f"CXX={spec['mpi'].mpicxx}")
args.append(f"FC={spec['mpi'].mpifc}")
@@ -105,19 +105,19 @@ def configure_args(self):
else:
args.append("--disable-mpi")
if "+openmp" in spec:
if spec.satisfies("+openmp"):
args.append("--with-openmp")
else:
args.append("--without-openmp")
if "+cuda" in spec:
if spec.satisfies("+cuda"):
args.append("--enable-opencl")
args.append(f"--with-ocl-path={spec['cuda'].prefix}")
args.append("--enable-cuda-gpu")
args.append(f"--with-cuda-path={spec['cuda'].prefix}")
args.append(f"--with-cuda-libs={spec['cuda'].libs.link_flags}")
if "+openbabel" in spec:
if spec.satisfies("+openbabel"):
args.append("--enable-openbabel")
args.append(f"--with-openbabel-libs={spec['openbabel'].prefix.lib}")
args.append(f"--with-openbabel-incs={spec['openbabel'].prefix.include}")

View File

@@ -58,7 +58,7 @@ def configure_args(self):
pyyaml = join_path(spec["py-pyyaml"].prefix.lib, f"python{python_version}")
openmp_flag = []
if "+openmp" in spec:
if spec.satisfies("+openmp"):
openmp_flag.append(self.compiler.openmp_flag)
args = [
@@ -71,12 +71,12 @@ def configure_args(self):
if spec.satisfies("+shared"):
args.append("--enable-dynamic-libraries")
if "+openmp" in spec:
if spec.satisfies("+openmp"):
args.append("--with-openmp")
else:
args.append("--without-openmp")
if "+mpi" in spec:
if spec.satisfies("+mpi"):
args.append(f"CC={spec['mpi'].mpicc}")
args.append(f"CXX={spec['mpi'].mpicxx}")
args.append(f"FC={spec['mpi'].mpifc}")
@@ -85,7 +85,7 @@ def configure_args(self):
else:
args.append("--disable-mpi")
if "+cuda" in spec:
if spec.satisfies("+cuda"):
args.append("--enable-opencl")
args.append(f"--with-ocl-path={spec['cuda'].prefix}")
args.append("--enable-cuda-gpu")

View File

@@ -66,7 +66,7 @@ def configure_args(self):
if spec.satisfies("+shared"):
args.append("--enable-dynamic-libraries")
if "+mpi" in spec:
if spec.satisfies("+mpi"):
args.extend(
[
f"CC={spec['mpi'].mpicc}",

View File

@@ -59,11 +59,11 @@ def configure_args(self):
pyyaml = join_path(spec["py-pyyaml"].prefix.lib, f"python{python_version}")
openmp_flag = []
if "+openmp" in spec:
if spec.satisfies("+openmp"):
openmp_flag.append(self.compiler.openmp_flag)
linalg = []
if "+scalapack" in spec:
if spec.satisfies("+scalapack"):
linalg.append(spec["scalapack"].libs.ld_flags)
linalg.append(spec["lapack"].libs.ld_flags)
linalg.append(spec["blas"].libs.ld_flags)
@@ -81,7 +81,7 @@ def configure_args(self):
if spec.satisfies("+shared"):
args.append("--enable-dynamic-libraries")
if "+mpi" in spec:
if spec.satisfies("+mpi"):
args.append(f"CC={spec['mpi'].mpicc}")
args.append(f"CXX={spec['mpi'].mpicxx}")
args.append(f"FC={spec['mpi'].mpifc}")
@@ -90,14 +90,14 @@ def configure_args(self):
else:
args.append("--disable-mpi")
if "+openmp" in spec:
if spec.satisfies("+openmp"):
args.append("--with-openmp")
else:
args.append("--without-openmp")
args.append(f"--with-atlab-libs={spec['bigdft-atlab'].prefix.lib}")
if "+cuda" in spec:
if spec.satisfies("+cuda"):
args.append("--enable-cuda-gpu")
args.append(f"--with-cuda-path={spec['cuda'].prefix}")
args.append(f"--with-cuda-libs={spec['cuda'].libs.link_flags}")

View File

@@ -57,11 +57,11 @@ def configure_args(self):
pyyaml = join_path(spec["py-pyyaml"].prefix.lib, f"python{python_version}")
openmp_flag = []
if "+openmp" in spec:
if spec.satisfies("+openmp"):
openmp_flag.append(self.compiler.openmp_flag)
linalg = []
if "+scalapack" in spec:
if spec.satisfies("+scalapack"):
linalg.append(spec["scalapack"].libs.ld_flags)
linalg.append(spec["lapack"].libs.ld_flags)
linalg.append(spec["blas"].libs.ld_flags)
@@ -82,7 +82,7 @@ def configure_args(self):
if spec.satisfies("+shared"):
args.append("--enable-dynamic-libraries")
if "+mpi" in spec:
if spec.satisfies("+mpi"):
args.append(f"CC={spec['mpi'].mpicc}")
args.append(f"CXX={spec['mpi'].mpicxx}")
args.append(f"FC={spec['mpi'].mpifc}")
@@ -91,7 +91,7 @@ def configure_args(self):
else:
args.append("--disable-mpi")
if "+openmp" in spec:
if spec.satisfies("+openmp"):
args.append("--with-openmp")
else:
args.append("--without-openmp")

View File

@@ -27,6 +27,7 @@ class Binutils(AutotoolsPackage, GNUMirrorPackage):
checked_by="tgamblin",
)
version("2.43", sha256="fed3c3077f0df7a4a1aa47b080b8c53277593ccbb4e5e78b73ffb4e3f265e750")
version("2.42", sha256="aa54850ebda5064c72cd4ec2d9b056c294252991486350d9a97ab2a6dfdfaf12")
version("2.41", sha256="a4c4bec052f7b8370024e60389e194377f3f48b56618418ea51067f67aaab30b")
version("2.40", sha256="f8298eb153a4b37d112e945aa5cb2850040bcf26a3ea65b5a715c83afe05e48a")
@@ -286,7 +287,7 @@ def configure_args(self):
args += self.enable_or_disable("lto")
args += self.enable_or_disable("nls")
args += self.enable_or_disable("plugins")
if "+pgo" in self.spec:
if self.spec.satisfies("+pgo"):
args.append("--enable-pgo-build=lto")
else:
args.append("--disable-pgo-build")

View File

@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from spack.package import *
@@ -38,6 +40,12 @@ def cache_test_sources(self):
install test subdirectory for use during `spack test run`."""
self.cache_extra_test_sources(self.test_src_dir)
# Fix test scripts to run installed binaries
scripts_dir = join_path(install_test_root(self), self.test_src_dir)
for path in os.listdir(scripts_dir):
if path.endswith(".sh"):
filter_file(r"../src/", r"", join_path(scripts_dir, path))
def test_short_sort(self):
"""run testshortsort.sh to check alignments sorted by coordinate"""
test_dir = join_path(self.test_suite.current_test_cache_dir, self.test_src_dir)

View File

@@ -25,7 +25,7 @@ class Bitgroomingz(CMakePackage):
def cmake_args(self):
args = []
if "+shared" in self.spec:
if self.spec.satisfies("+shared"):
args.append("-DBUILD_SHARED_LIBS=ON")
else:
args.append("-DBUILD_SHARED_LIBS=OFF")

View File

@@ -9,14 +9,14 @@
class Bitmap(AutotoolsPackage, XorgPackage):
"""bitmap, bmtoa, atobm - X bitmap (XBM) editor and converter utilities."""
homepage = "https://cgit.freedesktop.org/xorg/app/bitmap"
homepage = "https://gitlab.freedesktop.org/xorg/app/bitmap"
xorg_mirror_path = "app/bitmap-1.0.8.tar.gz"
version("1.1.1", sha256="86928020ece030435eb5ae795a5f22c5ca0886a6c589187886d1b6d14d9eec81")
version("1.1.0", sha256="60ca941e8e38e1f8f9c61d3e86c098878113fd11eac4e07177c111f0bf00779e")
version("1.0.8", sha256="1a2fbd10a2ca5cd93f7b77bbb0555b86d8b35e0fc18d036b1607c761755006fc")
depends_on("c", type="build") # generated
depends_on("c", type="build")
depends_on("libx11")
depends_on("libxmu")
@@ -25,6 +25,6 @@ class Bitmap(AutotoolsPackage, XorgPackage):
depends_on("libxt")
depends_on("xbitmaps")
depends_on("xproto@7.0.25:")
depends_on("xproto@7.0.25:", type="build")
depends_on("pkgconfig", type="build")
depends_on("util-macros", type="build")

View File

@@ -91,11 +91,11 @@ def cmake_args(self):
backend_config = "-Duse_cuda=%s" % ("+cuda" in spec)
if self.version >= Version("2021.04.01"):
backend = "none"
if "+cuda" in spec:
if spec.satisfies("+cuda"):
backend = "cuda"
if "+rocm" in spec:
if spec.satisfies("+rocm"):
backend = "hip"
if "+sycl" in spec:
if spec.satisfies("+sycl"):
backend = "sycl"
backend_config = "-Dgpu_backend=%s" % backend

View File

@@ -14,6 +14,8 @@ class BlastPlus(AutotoolsPackage):
maintainers("weijianwen")
version("2.16.0", sha256="17c93cf009721023e5aecf5753f9c6a255d157561638b91b3ad7276fd6950c2b")
version("2.15.0", sha256="6918c370524c8d44e028bf491e8f245a895e07c66c77b261ce3b38d6058216e0")
version("2.14.1", sha256="712c2dbdf0fb13cc1c2d4f4ef5dd1ce4b06c3b57e96dfea8f23e6e99f5b1650e")
version("2.13.0", sha256="89553714d133daf28c477f83d333794b3c62e4148408c072a1b4620e5ec4feb2")
version("2.12.0", sha256="fda3c9c9d488cad6c1880a98a236d842bcf3610e3e702af61f7a48cf0a714b88")
@@ -92,7 +94,7 @@ def configure_args(self):
if spec.target.family != "aarch64":
config_args.append("--with-64")
if "+static" in spec:
if spec.satisfies("+static"):
config_args.append("--with-static")
# FIXME
# args << "--with-static-exe" unless OS.linux?
@@ -100,17 +102,17 @@ def configure_args(self):
else:
config_args.extend(["--with-dll", "--without-static", "--without-static-exe"])
if "+jpeg" in spec:
if spec.satisfies("+jpeg"):
config_args.append("--with-jpeg={0}".format(self.spec["jpeg"].prefix))
else:
config_args.append("--without-jpeg")
if "+png" in spec:
if spec.satisfies("+png"):
config_args.append("--with-png={0}".format(self.spec["libpng"].prefix))
else:
config_args.append("--without-png")
if "+freetype" in spec:
if spec.satisfies("+freetype"):
config_args.append("--with-freetype={0}".format(self.spec["freetype"].prefix))
else:
config_args.append("--without-freetype")
@@ -124,42 +126,42 @@ def configure_args(self):
# else:
# config_args.append('--without-hdf5')
if "+zlib" in spec:
if spec.satisfies("+zlib"):
config_args.append("--with-z={0}".format(self.spec["zlib-api"].prefix))
else:
config_args.append("--without-z")
if "+bzip2" in spec:
if spec.satisfies("+bzip2"):
config_args.append("--with-bz2={0}".format(self.spec["bzip2"].prefix))
else:
config_args.append("--without-bz2")
if "+lzo" in spec:
if spec.satisfies("+lzo"):
config_args.append("--with-lzo={0}".format(self.spec["lzo"].prefix))
else:
config_args.append("--without-lzo")
if "+gnutls" in spec:
if spec.satisfies("+gnutls"):
config_args.append("--with-gnutls={0}".format(self.spec["gnutls"].prefix))
else:
config_args.append("--without-gnutls")
if "+openssl" in spec:
if spec.satisfies("+openssl"):
config_args.append("--with-openssl={0}".format(self.spec["openssl"].prefix))
else:
config_args.append("--without-openssl")
if "+pcre" in spec:
if spec.satisfies("+pcre"):
config_args.append("--with-pcre={0}".format(self.spec["pcre"].prefix))
else:
config_args.append("--without-pcre")
if "+python" in spec:
if spec.satisfies("+python"):
config_args.append("--with-python={0}".format(self.spec["python"].home))
else:
config_args.append("--without-python")
if "+perl" in spec:
if spec.satisfies("+perl"):
config_args.append("--with-perl={0}".format(self.spec["perl"].prefix))
else:
config_args.append("--without-python")

View File

@@ -55,17 +55,17 @@ def configure_args(self):
spec = self.spec
config_args = ["--enable-threading={0}".format(spec.variants["threads"].value)]
if "+ilp64" in spec:
if spec.satisfies("+ilp64"):
config_args.append("--blas-int-size=64")
else:
config_args.append("--blas-int-size=32")
if "+cblas" in spec:
if spec.satisfies("+cblas"):
config_args.append("--enable-cblas")
else:
config_args.append("--disable-cblas")
if "+blas" in spec:
if spec.satisfies("+blas"):
config_args.append("--enable-blas")
else:
config_args.append("--disable-blas")

View File

@@ -49,7 +49,7 @@ class Bml(CMakePackage):
def cmake_args(self):
args = [self.define_from_variant("BUILD_SHARED_LIBS", "shared")]
spec = self.spec
if "+mpi" in spec:
if spec.satisfies("+mpi"):
args.append("-DBML_MPI=True")
args.append("-DCMAKE_C_COMPILER=%s" % spec["mpi"].mpicc)
args.append("-DCMAKE_CXX_COMPILER=%s" % spec["mpi"].mpicxx)

View File

@@ -148,7 +148,7 @@ def cmake_args(self):
#
args += ["-DVE_OPENCL=" + str("+opencl" in spec), "-DVE_CUDA=" + str("+cuda" in spec)]
if "+openmp" in spec:
if spec.satisfies("+openmp"):
args += [
"-DVE_OPENMP=ON",
"-DOPENMP_FOUND=True",
@@ -160,7 +160,7 @@ def cmake_args(self):
#
# Extension methods
#
if "+blas" in spec:
if spec.satisfies("+blas"):
args += [
"-DEXT_BLAS=ON",
"-DCBLAS_FOUND=True",
@@ -170,7 +170,7 @@ def cmake_args(self):
else:
args += ["-DEXT_BLAS=OFF", "-DDCBLAS_FOUND=False"]
if "+lapack" in spec:
if spec.satisfies("+lapack"):
args += [
"-DEXT_LAPACK=ON",
"-DLAPACKE_FOUND=True",
@@ -180,7 +180,7 @@ def cmake_args(self):
else:
args += ["-DEXT_LAPACK=OFF", "-DLAPACKE_FOUND=False"]
if "+opencv" in spec:
if spec.satisfies("+opencv"):
args += [
"-DEXT_OPENCV=ON",
"-DOpenCV_FOUND=True",
@@ -234,11 +234,11 @@ def check_install(self):
# Collect the stacks which should be available:
stacks = ["default"]
if "+openmp" in spec:
if spec.satisfies("+openmp"):
stacks.append("openmp")
if "+cuda" in spec:
if spec.satisfies("+cuda"):
stacks.append("cuda")
if "+opencl" in spec:
if spec.satisfies("+opencl"):
stacks.append("opencl")
# C++ compiler and compiler flags
@@ -268,7 +268,7 @@ def check_install(self):
compare_output(cpp_output, "Success!\n")
# Python test (if +python)
if "+python" in spec:
if spec.satisfies("+python"):
file_pyadd = join_path(os.path.dirname(self.module.__file__), "pyadd.py")
py_output = python(file_pyadd, output=str, env=test_env)
compare_output(py_output, "Success!\n")

View File

@@ -60,7 +60,7 @@ def configure_args(self):
args.append("--disable-server")
args.append("--enable-client")
if "+manager" in spec:
if spec.satisfies("+manager"):
args.append("--enable-manager")
else:
args.append("--disable-manager")

View File

@@ -39,16 +39,16 @@ def cmake_args(self):
spec = self.spec
cmake_args = []
if "+typhon" in spec:
if spec.satisfies("+typhon"):
cmake_args.append("-DENABLE_TYPHON=ON")
if "+parmetis" in spec:
if spec.satisfies("+parmetis"):
cmake_args.append("-DENABLE_PARMETIS=ON")
if "+silo" in spec:
if spec.satisfies("+silo"):
cmake_args.append("-DENABLE_SILO=ON")
if "+caliper" in spec:
if spec.satisfies("+caliper"):
cmake_args.append("-DENABLE_CALIPER=ON")
return cmake_args

View File

@@ -507,10 +507,10 @@ def determine_bootstrap_options(self, spec, with_libs, options):
options.append("--with-toolset=%s" % boost_toolset_id)
options.append("--with-libraries=%s" % ",".join(with_libs))
if "+python" in spec:
if spec.satisfies("+python"):
options.append("--with-python=%s" % spec["python"].command.path)
if "+icu" in spec:
if spec.satisfies("+icu"):
options.append("--with-icu")
else:
options.append("--without-icu")
@@ -522,7 +522,7 @@ def determine_bootstrap_options(self, spec, with_libs, options):
# Skip this on Windows since we don't have a cl.exe wrapper in spack
f.write("using {0} : : {1} ;\n".format(boost_toolset_id, spack_cxx))
if "+mpi" in spec:
if spec.satisfies("+mpi"):
# Use the correct mpi compiler. If the compiler options are
# empty or undefined, Boost will attempt to figure out the
# correct options by running "${mpicxx} -show" or something
@@ -532,21 +532,21 @@ def determine_bootstrap_options(self, spec, with_libs, options):
mpi_line = "using mpi : %s" % spec["mpi"].mpicxx
f.write(mpi_line + " ;\n")
if "+python" in spec:
if spec.satisfies("+python"):
f.write(self.bjam_python_line(spec))
def determine_b2_options(self, spec, options):
if "+debug" in spec:
if spec.satisfies("+debug"):
options.append("variant=debug")
else:
options.append("variant=release")
if "+icu" in spec:
if spec.satisfies("+icu"):
options.extend(["-s", "ICU_PATH=%s" % spec["icu4c"].prefix])
else:
options.append("--disable-icu")
if "+iostreams" in spec:
if spec.satisfies("+iostreams"):
options.extend(
[
"-s",
@@ -568,17 +568,17 @@ def determine_b2_options(self, spec, options):
]
)
# At least with older Xcode, _lzma_cputhreads is missing (#33998)
if "platform=darwin" in self.spec:
if self.spec.satisfies("platform=darwin"):
options.extend(["-s", "NO_LZMA=1"])
link_types = ["static"]
if "+shared" in spec:
if spec.satisfies("+shared"):
link_types.append("shared")
threading_opts = []
if "+multithreaded" in spec:
if spec.satisfies("+multithreaded"):
threading_opts.append("multi")
if "+singlethreaded" in spec:
if spec.satisfies("+singlethreaded"):
threading_opts.append("single")
if not threading_opts:
raise RuntimeError(
@@ -589,9 +589,9 @@ def determine_b2_options(self, spec, options):
if "+context" in spec and "context-impl" in spec.variants:
options.extend(["context-impl=%s" % spec.variants["context-impl"].value])
if "+taggedlayout" in spec:
if spec.satisfies("+taggedlayout"):
layout = "tagged"
elif "+versionedlayout" in spec:
elif spec.satisfies("+versionedlayout"):
layout = "versioned"
else:
if len(threading_opts) > 1:
@@ -623,7 +623,7 @@ def determine_b2_options(self, spec, options):
if flag:
cxxflags.append(flag)
if "+pic" in self.spec:
if self.spec.satisfies("+pic"):
cxxflags.append(self.compiler.cxx_pic_flag)
# clang is not officially supported for pre-compiled headers
@@ -632,7 +632,7 @@ def determine_b2_options(self, spec, options):
# https://svn.boost.org/trac/boost/ticket/12496
if spec.satisfies("%apple-clang") or spec.satisfies("%clang") or spec.satisfies("%fj"):
options.extend(["pch=off"])
if "+clanglibcpp" in spec:
if spec.satisfies("+clanglibcpp"):
cxxflags.append("-stdlib=libc++")
options.extend(["toolset=clang", 'linkflags="-stdlib=libc++"'])
elif spec.satisfies("%xl") or spec.satisfies("%xl_r"):
@@ -696,7 +696,7 @@ def install(self, spec, prefix):
with_libs.remove("random")
if not spec.satisfies("@1.39.0:") and "exception" in with_libs:
with_libs.remove("exception")
if "+graph" in spec and "+mpi" in spec:
if spec.satisfies("+graph") and spec.satisfies("+mpi"):
with_libs.append("graph_parallel")
if not with_libs:
@@ -753,7 +753,7 @@ def install(self, spec, prefix):
threading_opts = self.determine_b2_options(spec, b2_options)
# Create headers if building from a git checkout
if "@develop" in spec:
if spec.satisfies("@develop"):
b2("headers", *b2_options)
b2("--clean", *b2_options)
@@ -766,7 +766,7 @@ def install(self, spec, prefix):
else:
b2("install", *b2_options)
if "+multithreaded" in spec and "~taggedlayout" in spec:
if spec.satisfies("+multithreaded") and spec.satisfies("~taggedlayout"):
self.add_buildopt_symlinks(prefix)
# The shared libraries are not installed correctly

View File

@@ -60,7 +60,7 @@ def edit(self, spec, prefix):
def configure_args(self):
spec = self.spec
args = ["--prefix={0}".format(self.prefix)]
if "+doc" in spec:
if spec.satisfies("+doc"):
args.append("--with-documentation")
else:
args.append("--without-documentation")

View File

@@ -74,7 +74,7 @@ def edit(self, spec, prefix):
makefile.filter("CXX = .*", "CPP = " + env["CXX"])
def build(self, spec, prefix):
if "+tbb" in spec:
if spec.satisfies("+tbb"):
make()
else:
make("NO_TBB=1")

View File

@@ -47,7 +47,7 @@ class Bricks(CMakePackage):
def cmake_args(self):
"""CMake arguments for configure stage"""
args = [self.define_from_variant("BRICK_USE_OPENCL", "cuda")]
if "+cuda" in self.spec:
if self.spec.satisfies("+cuda"):
args.append(f"-DOCL_ROOT:STRING={self.spec['opencl-clhpp'].prefix}")
return args

View File

@@ -17,12 +17,13 @@ class Bufr(CMakePackage):
"""
homepage = "https://noaa-emc.github.io/NCEPLIBS-bufr"
url = "https://github.com/NOAA-EMC/NCEPLIBS-bufr/archive/refs/tags/bufr_v11.5.0.tar.gz"
url = "https://github.com/NOAA-EMC/NCEPLIBS-bufr/archive/refs/tags/v12.1.0.tar.gz"
git = "https://github.com/NOAA-EMC/NCEPLIBS-bufr"
maintainers("AlexanderRichert-NOAA", "edwardhartnett", "Hang-Lei-NOAA", "jbathegit")
version("develop", branch="develop")
version("12.1.0", sha256="b5eae61b50d4132b2933b6e6dfc607e5392727cdc4f46ec7a94a19109d91dcf3")
version("12.0.1", sha256="525f26238dba6511a453fc71cecc05f59e4800a603de2abbbbfb8cbb5adf5708")
version("12.0.0", sha256="d01c02ea8e100e51fd150ff1c4a1192ca54538474acb1b7f7a36e8aeab76ee75")
version("11.7.1", sha256="6533ce6eaa6b02c0cb5424cfbc086ab120ccebac3894980a4daafd4dfadd71f8")
@@ -31,8 +32,8 @@ class Bufr(CMakePackage):
version("11.5.0", sha256="d154839e29ef1fe82e58cf20232e9f8a4f0610f0e8b6a394b7ca052e58f97f43")
version("11.4.0", sha256="946482405e675b99e8e0c221d137768f246076f5e9ba92eed6cae47fb68b7a26")
depends_on("c", type="build") # generated
depends_on("fortran", type="build") # generated
depends_on("c", type="build")
depends_on("fortran", type="build")
# Patch to not add "-c" to ranlib flags when using llvm-ranlib on Apple systems
patch("cmakelists-apple-llvm-ranlib.patch", when="@11.5.0:11.6.0")
@@ -41,8 +42,10 @@ class Bufr(CMakePackage):
# Patch to identify Python version correctly
patch("python-version.patch", when="@11.5:12.0.0 +python")
variant("python", default=False, description="Enable Python interface?")
variant("python", default=False, description="Enable Python interface")
variant("shared", default=True, description="Build shared libraries", when="@11.5:")
variant("test_files", default="none", description="Path to test files")
variant("utils", default=True, description="Build utilities", when="@12.1:")
extends("python", when="+python")
@@ -52,6 +55,8 @@ class Bufr(CMakePackage):
depends_on("py-pip", type="build", when="+python")
depends_on("py-wheel", type="build", when="+python")
conflicts("%oneapi@:2024.1", msg="Requires oneapi 2024.2 or later")
def url_for_version(self, version):
pre = "bufr_" if version < Version("12.0.1") else ""
return (
@@ -68,8 +73,13 @@ def cmake_args(self):
self.define_from_variant("ENABLE_PYTHON", "python"),
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
self.define("BUILD_TESTS", self.run_tests),
self.define("BUILD_TESTING", self.run_tests),
self.define_from_variant("BUILD_UTILS", "utils"),
]
if not self.spec.satisfies("test_files=none"):
args.append(self.define_from_variant("TEST_FILE_DIR", "test_files"))
return args
def flag_handler(self, name, flags):
@@ -119,6 +129,5 @@ def setup_run_environment(self, env):
self._setup_bufr_environment(env, suffix)
def check(self):
if self.spec.satisfies("~python"):
with working_dir(self.builder.build_directory):
make("test")
with working_dir(self.builder.build_directory):
make("test")

View File

@@ -79,7 +79,7 @@ def cmake_args(self):
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
]
args.append("-Denable_openmp=%s" % ("ON" if "+openmp" in spec else "OFF"))
if "%cce" in spec:
if spec.satisfies("%cce"):
# Assume the proper Cray CCE module (cce) is loaded:
craylibs_var = "CRAYLIBS_" + str(spec.target.family).upper()
craylibs_path = env.get(craylibs_var, None)

View File

@@ -65,9 +65,9 @@ def libs(self):
def flag_handler(self, name, flags):
if name == "cflags":
if "+pic" in self.spec:
if self.spec.satisfies("+pic"):
flags.append(self.compiler.cc_pic_flag)
if "+debug" in self.spec:
if self.spec.satisfies("+debug"):
flags.append("-g")
return (flags, None, None)
@@ -123,7 +123,7 @@ def patch(self):
def install(self, spec, prefix):
# Build the dynamic library first
if "+shared" in spec:
if spec.satisfies("+shared"):
make("-f", "Makefile-libbz2_so")
# Build the static library and everything else
@@ -145,7 +145,7 @@ def install(self, spec, prefix):
make()
make("install", "PREFIX={0}".format(prefix))
if "+shared" in spec:
if spec.satisfies("+shared"):
install("bzip2-shared", join_path(prefix.bin, "bzip2"))
v1, v2, v3 = (self.spec.version.up_to(i) for i in (1, 2, 3))

View File

@@ -54,7 +54,7 @@ def libs(self):
def cmake_args(self):
args = []
if "+avx2" in self.spec:
if self.spec.satisfies("+avx2"):
args.append("-DDEACTIVATE_AVX2=OFF")
else:
args.append("-DDEACTIVATE_AVX2=ON")

View File

@@ -11,7 +11,7 @@ class CBlosc2(CMakePackage):
other bells and whistles"""
homepage = "https://www.blosc.org/"
url = "https://github.com/Blosc/c-blosc2/archive/refs/tags/v2.10.2.tar.gz"
url = "https://github.com/Blosc/c-blosc2/archive/refs/tags/v2.15.1.tar.gz"
git = "https://github.com/Blosc/c-blosc2.git"
maintainers("ax3l", "robert-mijakovic")
@@ -19,6 +19,7 @@ class CBlosc2(CMakePackage):
license("BSD-3-Clause")
version("develop", branch="master")
version("2.15.1", sha256="6cf32fcfc615542b9ba35e021635c8ab9fd3d328fd99d5bf04b7eebc80f1fae2")
version("2.11.1", sha256="1e9923e0f026eb6e6caee608b4b9a523837806076fc79409055a6386cf5de1ea")
version("2.10.5", sha256="a88f94bf839c1371aab8207a6a43698ceb92c72f65d0d7fe5b6e59f24c138b4d")
# 2.10.2+ fixes regressions with external dependencies

View File

@@ -144,7 +144,7 @@ def cmake_args(self):
options.append(self.define(cbn_disable, "ON"))
# Use hipcc for HIP.
if "+rocm" in self.spec:
if self.spec.satisfies("+rocm"):
options.append(self.define("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc))
return options

View File

@@ -92,7 +92,7 @@ def cmake_args(self):
]
)
if "+cuda" in spec:
if spec.satisfies("+cuda"):
if spec.variants["cuda_arch"].value[0] != "none":
cuda_arch = spec.variants["cuda_arch"].value
args.append(self.define("CUDA_ARCH_NAME", "Manual"))

View File

@@ -83,7 +83,7 @@ def autoreconf(self, spec, prefix):
def configure_args(self):
args = ["--disable-trace", "--enable-tee"] # can cause problems with libiberty
if "+X" in self.spec:
if self.spec.satisfies("+X"):
args.extend(["--enable-xlib", "--enable-xcb"])
else:
args.extend(["--disable-xlib", "--disable-xcb"])

View File

@@ -159,40 +159,40 @@ def cmake_args(self):
self.define_from_variant("WITH_KOKKOS", "kokkos"),
]
if "+papi" in spec:
if spec.satisfies("+papi"):
args.append("-DPAPI_PREFIX=%s" % spec["papi"].prefix)
if "+libdw" in spec:
if spec.satisfies("+libdw"):
args.append("-DLIBDW_PREFIX=%s" % spec["elfutils"].prefix)
if "+libpfm" in spec:
if spec.satisfies("+libpfm"):
args.append("-DLIBPFM_INSTALL=%s" % spec["libpfm4"].prefix)
if "+sosflow" in spec:
if spec.satisfies("+sosflow"):
args.append("-DSOS_PREFIX=%s" % spec["sosflow"].prefix)
if "+variorum" in spec:
if spec.satisfies("+variorum"):
args.append("-DVARIORUM_PREFIX=%s" % spec["variorum"].prefix)
# -DWITH_CALLPATH was renamed -DWITH_LIBUNWIND in 2.5
callpath_flag = "LIBUNWIND" if spec.satisfies("@2.5:") else "CALLPATH"
if "+libunwind" in spec:
if spec.satisfies("+libunwind"):
args.append("-DLIBUNWIND_PREFIX=%s" % spec["unwind"].prefix)
args.append("-DWITH_%s=On" % callpath_flag)
else:
args.append("-DWITH_%s=Off" % callpath_flag)
if "+mpi" in spec:
if spec.satisfies("+mpi"):
args.append("-DMPI_C_COMPILER=%s" % spec["mpi"].mpicc)
args.append("-DMPI_CXX_COMPILER=%s" % spec["mpi"].mpicxx)
if "+cuda" in spec:
if spec.satisfies("+cuda"):
args.append("-DCUDA_TOOLKIT_ROOT_DIR=%s" % spec["cuda"].prefix)
# technically only works with cuda 10.2+, otherwise cupti is in
# ${CUDA_TOOLKIT_ROOT_DIR}/extras/CUPTI
args.append("-DCUPTI_PREFIX=%s" % spec["cuda"].prefix)
if "+vtune" in spec:
if spec.satisfies("+vtune"):
itt_dir = join_path(spec["intel-oneapi-vtune"].prefix, "vtune", "latest")
args.append("-DITT_PREFIX=%s" % itt_dir)
if "+rocm" in spec:
if spec.satisfies("+rocm"):
args.append("-DCMAKE_CXX_COMPILER={0}".format(spec["hip"].hipcc))
args.append("-DROCM_PREFIX=%s" % spec["hsa-rocr-dev"].prefix)

View File

@@ -49,7 +49,7 @@ def cmake_args(self):
"-DBUILD_FOR_INSTALL:BOOL=ON",
]
if "+moab" in spec:
if spec.satisfies("+moab"):
options.extend(["-DENABLE_MOAB:BOOL=ON", "-DMOAB_PATH:PATH=%s" % spec["moab"].prefix])
else:
options.append("-DENABLE_MOAB:BOOL=OFF")

View File

@@ -75,7 +75,7 @@ def cmake_args(self):
options.append("-DBLT_SOURCE_DIR={0}".format(spec["blt"].prefix))
options.append(self.define_from_variant("ENABLE_CUDA", "cuda"))
if "+cuda" in spec:
if spec.satisfies("+cuda"):
options.append("-DCUDA_TOOLKIT_ROOT_DIR={0}".format(spec["cuda"].prefix))
if not spec.satisfies("cuda_arch=none"):
@@ -86,7 +86,7 @@ def cmake_args(self):
options.append("-DCMAKE_CUDA_FLAGS:STRING={0}".format(flag))
options.append(self.define_from_variant("ENABLE_HIP", "rocm"))
if "+rocm" in spec:
if spec.satisfies("+rocm"):
options.append("-DHIP_ROOT_DIR={0}".format(spec["hip"].prefix))
archs = self.spec.variants["amdgpu_target"].value

View File

@@ -92,7 +92,7 @@ def edit(self, spec, prefix):
)
makefile.filter("OPENMPI MVAPICH", "OPENMPI MVAPICH IntelMPI", string=True)
if "+mpi" in spec:
if spec.satisfies("+mpi"):
# Substitute CC, FC.
makefile.filter("CC = .*", "CC = " + spec["mpi"].mpicc)
makefile.filter("FC = .*", "FC = " + spec["mpi"].mpifc)
@@ -122,7 +122,7 @@ def build_targets(self):
compiler = os.path.basename(env["FC"]) + omp
args = ["COMPILER={0}".format(compiler)]
# Set MPI.
if "+mpi" in self.spec:
if self.spec.satisfies("+mpi"):
mpi = self.spec["mpi"]
args += ["MPI={0}".format(mpi.name), "MPI_INST={0}".format(mpi.prefix)]
return args

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