Compare commits

..

68 Commits

Author SHA1 Message Date
Harmen Stoppels
01423a9bea ROCmPackage: depend on hip-lang 2025-04-09 10:02:54 +02:00
Harmen Stoppels
0ac63a3799 add hip compiler property 2025-04-09 10:02:54 +02:00
Harmen Stoppels
2519ad20da compiler-wrapper: add hip support 2025-04-09 10:02:54 +02:00
Harmen Stoppels
adfb6ee6aa depends_on llvm-amdgpu -> requires %llvm-amdpu 2025-04-09 10:00:38 +02:00
Harmen Stoppels
d17c118a78 add hip-lang as a language virtual 2025-04-09 10:00:35 +02:00
Harmen Stoppels
1a57df46f6 compiler-wrapper: respect -x and --language
To compile hip code, the clang++ is invoked with -x hip, so we should
derive the language from the -x flag.
2025-04-09 10:00:35 +02:00
Harmen Stoppels
8ffd6c29bf gcc/oneapi: inject runtime iff language virtual (#49956)
Currently we inject runtimes when a package has a direct build dep on a
compiler, but what matters is whether the package depends on a language.

That way we can avoid recursion of injecting runtimes to runtimes
without a rule in the solver: runtimes don't depend on languages, they
just have a build dep on the same compiler.
2025-04-08 19:51:16 +02:00
Jon Rood
4372907fc1 h5z-zfp: update to use CMake (#49735)
* h5z-zfp: update to use CMake.

* Add depedency requirement.

* Remove shared variant.
2025-04-08 10:43:40 -07:00
Cameron Smith
63a506ed17 pumi: remove redundant compiler deps (#49936) 2025-04-08 11:39:08 -06:00
Jon Rood
382647c8af trilinos: depends on kokkos~cuda when ~cuda and kokkos~rocm when ~rocm (#49951) 2025-04-08 10:49:10 -06:00
Kyle Brindley
4b73da5bb2 scons: add v4.9.1(#49942) 2025-04-08 10:43:51 -06:00
Adam J. Stewart
17b47c9dbe py-torchmetrics: add v1.7.1 (#49955) 2025-04-08 09:41:35 -07:00
Thomas Padioleau
5075275873 Set tpadioleau and nmm0 as mdspan maintainers (#49938) 2025-04-08 10:39:10 -06:00
arezaii
2acdacb129 py-pyarrow: add depends_on c (#49940) 2025-04-08 10:38:44 -06:00
Nicholson Koukpaizan
bedc7bd518 coinhsl: fix typo when setting liblapack_path (#49937) 2025-04-08 10:38:28 -06:00
Adrien Bernede
dd8d2a2515 Radiuss-Spack-Configs update 2025-03-0 (#49637)
* Clearly split old and new hip settings requirements

* Fix style

* TO REVERT: Trigger CI

* Apply generic rocm handling to every project

* TO REVERT: Trigger CI

* Revert "TO REVERT: Trigger CI"

This reverts commit dcedb2ead5.

* Revert "TO REVERT: Trigger CI"

This reverts commit 02f76a8ca6.

* Update RADIUSS packages with latest release and sync with RSC implementation

* Update CARE package

* make default logic for hip support more robust

* TO REVERT: Trigger CI

* Fix style

* Fix style (bis)

* Shorten message

* GPU_TARGET is only necessary under certain project specific conditions, it should not be necessary in general

* Update logic to find amdclang++

* Fix syntax

* Let's postpone update of hip handling in camp

* Revert "TO REVERT: Trigger CI"

This reverts commit 620fbc1b01.

* Remove unecessary logic from CARE

* Update CARE: add 0.15.1
2025-04-08 09:29:16 -07:00
Massimiliano Culpo
129338c4c9 Group together all concretization unit test (#49960)
In this way, to run them, we just need to run:

spack unit-test lib/spack/spack/test/concretization

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-04-08 17:27:17 +02:00
Harmen Stoppels
e7b009e350 asp.py: reduce verbosity of "preferences" comment (#49954) 2025-04-08 15:17:21 +02:00
Massimiliano Culpo
9e6e478ccf llvm: don't detect +flang multiple times (#49876)
fixes #49831

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-04-08 09:12:34 +02:00
Adam J. Stewart
357089f347 py-nbstripout: add v0.8.1 (#49896) 2025-04-08 08:54:39 +02:00
Wouter Deconinck
6228247eda hep: build Geant4 with Qt5 and Qt6 (#49777)
* hep: build geant4 with qt5 and qt6

* hep: keep geant4 ~vtk for now
2025-04-08 08:51:22 +02:00
Wouter Deconinck
a919b67cb4 hep: root +arrow +emaca (#49931) 2025-04-08 08:50:52 +02:00
Wouter Deconinck
58ac6f7cba py-kiwisolver: add v1.4.6, v1.4.7, v1.4.8 (#49911) 2025-04-08 08:49:07 +02:00
Wouter Deconinck
86b57c233d apptainer: add v1.4.0 (#49912) 2025-04-08 08:48:32 +02:00
Wouter Deconinck
b6dec56f4f lbzip2: change URL and deprecate (#49948) 2025-04-08 08:26:26 +02:00
Jon Rood
d403060cf2 trilinos: patch version 16.1.0 to build on MacOS. (#49811) 2025-04-07 11:05:41 -06:00
Robert Maaskant
7d0dd27363 py-setuptools-scm: add v8.2.1 (#49901) 2025-04-07 09:56:45 -07:00
dependabot[bot]
cfbc92c2f0 build(deps): bump flake8 from 7.1.2 to 7.2.0 in /lib/spack/docs (#49816)
Bumps [flake8](https://github.com/pycqa/flake8) from 7.1.2 to 7.2.0.
- [Commits](https://github.com/pycqa/flake8/compare/7.1.2...7.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-07 09:49:58 -07:00
Wouter Deconinck
e7bca5b8f6 cppgsl: add v4.2.0 (#49915) 2025-04-07 12:46:37 -04:00
Wouter Deconinck
cf5ba8aee3 dbus: add v1.16.2 (#49916) 2025-04-07 12:46:06 -04:00
Wouter Deconinck
32a4eb4ebb jwt-cpp: add v0.7.1 (#49917)
* jwt-cpp: add v0.7.1

* jwt-cpp: depends on c only thru 0.7.0

* jwt-cpp: fix checksum
2025-04-07 09:45:24 -07:00
Adam J. Stewart
a3f4fd68d6 Packages: add missing compiler dependencies (#49920)
* Packages: add missing compiler dependencies

* Undo changes to cray-mpich
2025-04-07 09:42:54 -07:00
Wouter Deconinck
95f8c7e073 cmark: add v0.31.1 (#49913) 2025-04-07 09:41:42 -07:00
Wouter Deconinck
20f31ce39d voms: add v2.1.2 (#49921)
* voms: add v2.1.2

* voms: patch only when @:2.1.0
2025-04-07 12:39:52 -04:00
Wouter Deconinck
91ef8c056b vdt: add v0.4.5, v0.4.6 (#49922)
* vdt: add thru v0.4.6

* vdt: add maintainer
2025-04-07 12:39:01 -04:00
Wouter Deconinck
c6ce7637fc spdlog: add v1.15.2 (#49923) 2025-04-07 09:37:51 -07:00
Adam J. Stewart
770c6cc612 py-torchgeo: add v0.7.0 (#49903) 2025-04-07 09:36:52 -07:00
Wouter Deconinck
97bad2f5a7 soqt: depends on c (#49924) 2025-04-07 09:35:55 -07:00
Wouter Deconinck
8ca82fb2b6 r: add v4.4.3 (#49926) 2025-04-07 09:34:50 -07:00
Wouter Deconinck
36540708f1 py-zope-interface: add thru v7.2 (#49927) 2025-04-07 09:33:53 -07:00
Wouter Deconinck
7e027cae3e gdbm: add v1.25 (#49928) 2025-04-07 09:32:38 -07:00
Wouter Deconinck
a311d0a8c0 armadillo: add v14.4.1 (#49929) 2025-04-07 09:30:40 -07:00
Wouter Deconinck
cd8ebdcfbd embree: add v4.4.0 (#49930) 2025-04-07 09:28:43 -07:00
Wouter Deconinck
8b3bfbd95e libsm: add v1.2.6 (#49933) 2025-04-07 09:26:21 -07:00
Tahmid Khan
10afe49877 simdjson: new package (#49453)
* simdjson: new package
* simdjson: update description
* simdjson: make line lengths < 100 chars to pass style checks
* simdjson: add variants for enabling sanitizers
* simdjson: improve description
* simdjson: fixes and improvements
* simdjson: fix conditions and requirements for variants

---------

Co-authored-by: Tahmid A. Khan <60913202+tahmid-khan@users.noreply.github.com>
2025-04-07 09:21:01 -07:00
Robert Maaskant
2afbeded25 py-python-dateutil: add v2.9.0.post0 (#49527) 2025-04-07 08:04:03 -07:00
Wouter Deconinck
415055d303 scitokens-cpp: add v1.1.3 (#49925) 2025-04-07 09:45:41 -05:00
Massimiliano Culpo
081e4c463b compilers: add .stdcxx_libs to the compiler adaptor (#49873)
This property is used by a few recipes, including `cp2k` under
certain configurations

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2025-04-07 15:39:13 +02:00
Harmen Stoppels
e5ec08771b docs: editor support config files (#49935) 2025-04-07 15:35:21 +02:00
Rémi Lacroix
98605621e7 cuDDN: Add versions 9.5.1, 9.6.0, 9.7.1 and 9.8.0 (#49789) 2025-04-07 05:53:01 -06:00
Rocco Meli
625a4b854c greenx: new package (#49646)
* greenx

* [@spackbot] updating style on behalf of RMeli

* split desc

* license

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

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

---------

Co-authored-by: RMeli <RMeli@users.noreply.github.com>
Co-authored-by: Alberto Invernizzi <9337627+albestro@users.noreply.github.com>
2025-04-07 03:42:33 -06:00
Wouter Deconinck
dcf2c8744a zstd: add v1.5.7 (#49904) 2025-04-07 10:39:50 +02:00
Wouter Deconinck
d1b7cc9b5e zlib-ng: add v2.2.4 (#49905) 2025-04-07 10:39:12 +02:00
Wouter Deconinck
8fbe1ad941 libarchive: add thru v3.7.9 (#49932) 2025-04-07 10:38:54 +02:00
Vanessasaurus
440ae973d1 flux-sched: add v0.44.0 (#49894)
* Automated deployment to update package flux-sched 2025-04-04

* depends on c/cxx... order matters!

* Empty space

---------

Co-authored-by: github-actions <github-actions@users.noreply.github.com>
2025-04-06 00:22:53 -06:00
Wouter Deconinck
2cb140f9a8 py-maturin: add v1.8.3 (#49910) 2025-04-05 22:31:54 -07:00
dependabot[bot]
fb2cca4e1e build(deps): bump clingo in /.github/workflows/requirements/style (#49868)
Bumps [clingo](https://github.com/potassco/clingo) from 5.7.1 to 5.8.0.
- [Release notes](https://github.com/potassco/clingo/releases)
- [Changelog](https://github.com/potassco/clingo/blob/master/CHANGES.md)
- [Commits](https://github.com/potassco/clingo/compare/v5.7.1...v5.8.0)

---
updated-dependencies:
- dependency-name: clingo
  dependency-version: 5.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-05 22:31:31 -07:00
dependabot[bot]
03b0d299f9 build(deps): bump types-six in /.github/workflows/requirements/style (#49869)
Bumps [types-six](https://github.com/typeshed-internal/stub_uploader) from 1.17.0.20250304 to 1.17.0.20250403.
- [Commits](https://github.com/typeshed-internal/stub_uploader/commits)

---
updated-dependencies:
- dependency-name: types-six
  dependency-version: 1.17.0.20250403
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-05 22:30:35 -07:00
Robert Maaskant
8f93ea80fd util-linux-uuid: add v2.41 (#49900) 2025-04-06 01:26:11 -04:00
Wouter Deconinck
5cd5fcdd7f xtrans: add v1.6.0 (#49906) 2025-04-06 01:18:12 -04:00
Wouter Deconinck
da760a898e py-paramiko: add v3.5.1 (#49908) 2025-04-06 01:17:05 -04:00
Wouter Deconinck
dd55635fae py-mplhep: add thru v0.3.59 (#49909) 2025-04-06 01:14:31 -04:00
Richard Berger
320c758fea legion: extend slingshot11 support (#49713)
- allow conduit=ofi-slingshot11 to work with regular OpenMPI and MPICH when
  they are built with ^libfabric fabrics=cxi.
- add missing libfabric dependency for conduit=ofi-slingshot11. Embedded GASNet
  build uses PATH to detect libfabric installation.
2025-04-05 09:42:19 -07:00
Richard Berger
ff82ba24e9 kokkos: allow using new gfx942_apu arch (#48609)
Add an apu variant that promotes GPU architectures to their APU
equivalent. Right now this is just gfx942 -> gfx942_apu.
2025-04-04 22:29:29 -07:00
Alec Scott
d00b05b71e ci: decrease style checks setup time (#49888)
* ci: test speeding up style

* Combine pylint check with existing style checks to reduce overhead
2025-04-05 01:08:40 +00:00
John W. Parent
f8524f9d5e libpng package: find correct zlib library on Windows (#49034)
This explicitly specifies the correct library for zlib to CMake:

CMake's find zlib looks for zlib before zdll. On Windows, zlib is the
static lib, and zdll the import library. LibPNG only links to shared
zlib, but was getting zlib from CMake on Windows, which was resulting
in a linker failure.
2025-04-04 17:58:05 -07:00
John W. Parent
924204828e libxml2 package: add CMake builder; add version 2.13.5 (#47878) 2025-04-04 17:43:01 -07:00
Peter Brady
2f4c5f2aa2 libffi: add v3.4.7 (#49887)
* update libffi to 3.4.7
* Add conflict for libffi/apple-clang

---------

Co-authored-by: pbrady <pbrady@users.noreply.github.com>
2025-04-04 16:58:00 -06:00
156 changed files with 982 additions and 243 deletions

View File

@@ -25,14 +25,16 @@ jobs:
with:
python-version: '3.13'
cache: 'pip'
cache-dependency-path: '.github/workflows/requirements/style/requirements.txt'
- name: Install Python Packages
run: |
pip install --upgrade pip setuptools
pip install -r .github/workflows/requirements/style/requirements.txt
- name: vermin (Spack's Core)
run: vermin --backport importlib --backport argparse --violations --backport typing -t=3.6- -vvv lib/spack/spack/ lib/spack/llnl/ bin/
run: |
vermin --backport importlib --backport argparse --violations --backport typing -t=3.6- -vvv lib/spack/spack/ lib/spack/llnl/ bin/
- name: vermin (Repositories)
run: vermin --backport importlib --backport argparse --violations --backport typing -t=3.6- -vvv var/spack/repos
run: |
vermin --backport importlib --backport argparse --violations --backport typing -t=3.6- -vvv var/spack/repos
# Run style checks on the files that have been changed
style:
@@ -40,23 +42,20 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
fetch-depth: 2
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: '3.13'
cache: 'pip'
cache-dependency-path: '.github/workflows/requirements/style/requirements.txt'
- name: Install Python packages
run: |
pip install --upgrade pip setuptools
pip install -r .github/workflows/requirements/style/requirements.txt
- name: Setup git configuration
run: |
# Need this for the git tests to succeed.
git --version
. .github/workflows/bin/setup_git.sh
- name: Run style tests
run: |
share/spack/qa/run-style-tests
bin/spack style --base HEAD^1
bin/spack license verify
pylint -j $(nproc) --disable=all --enable=unspecified-encoding --ignore-paths=lib/spack/external lib
audit:
uses: ./.github/workflows/audit.yaml
@@ -103,21 +102,3 @@ jobs:
spack -d bootstrap now --dev
spack -d style -t black
spack unit-test -V
# Further style checks from pylint
pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: '3.13'
cache: 'pip'
- name: Install Python packages
run: |
pip install --upgrade pip setuptools pylint
- name: Pylint (Spack Core)
run: |
pylint -j 4 --disable=all --enable=unspecified-encoding --ignore-paths=lib/spack/external lib

View File

@@ -1,7 +1,8 @@
black==25.1.0
clingo==5.7.1
clingo==5.8.0
flake8==7.2.0
isort==6.0.1
mypy==1.15.0
types-six==1.17.0.20250304
types-six==1.17.0.20250403
vermin==1.6.0
pylint==3.3.6

View File

@@ -33,6 +33,7 @@ packages:
glu: [mesa-glu, openglu]
golang: [go, gcc]
go-or-gccgo-bootstrap: [go-bootstrap, gcc]
hip-lang: [llvm-amdgpu]
iconv: [libiconv]
ipp: [intel-oneapi-ipp]
java: [openjdk, jdk]

View File

@@ -46,6 +46,12 @@ Each Spack configuration file is nested under a top-level section
corresponding to its name. So, ``config.yaml`` starts with ``config:``,
``mirrors.yaml`` starts with ``mirrors:``, etc.
.. tip::
Validation and autocompletion of Spack config files can be enabled in
your editor with the YAML language server. See `spack/schemas
<https://github.com/spack/schemas>`_ for more information.
.. _configuration-scopes:
--------------------

View File

@@ -9,5 +9,5 @@ urllib3==2.3.0
pytest==8.3.5
isort==6.0.1
black==25.1.0
flake8==7.1.2
flake8==7.2.0
mypy==1.11.1

View File

@@ -199,10 +199,21 @@ def cxx(self) -> Optional[str]:
return self.spec.extra_attributes["compilers"].get("cxx", None)
return self._cxx_path()
@property
def hip(self) -> Optional[str]:
assert self.spec.concrete, "cannot retrieve HIP compiler, spec is not concrete"
if self.spec.external:
return self.spec.extra_attributes["compilers"].get("hip", None)
return self._hip_path()
def _cxx_path(self) -> Optional[str]:
"""Returns the path to the C++ compiler, if the package was installed by Spack"""
return None
def _hip_path(self) -> Optional[str]:
"""Returns the path to the HIP compiler, if the package was installed by Spack"""
return self._cxx_path()
@property
def fortran(self):
assert self.spec.concrete, "cannot retrieve Fortran compiler, spec is not concrete"

View File

@@ -77,7 +77,7 @@
import os
import spack.variant
from spack.directives import conflicts, depends_on, variant
from spack.directives import conflicts, depends_on, requires, variant
from spack.package_base import PackageBase
from spack.util.environment import EnvironmentModifications
@@ -140,9 +140,7 @@ class ROCmPackage(PackageBase):
when="+rocm",
)
depends_on("llvm-amdgpu", type="build", when="+rocm")
depends_on("hsa-rocr-dev", when="+rocm")
depends_on("hip +rocm", when="+rocm")
depends_on("hip-lang", type="build", when="+rocm")
# need amd gpu type for rocm builds
conflicts("amdgpu_target=none", when="+rocm")
@@ -183,14 +181,14 @@ def asan_on(self, env: EnvironmentModifications):
# Add compiler minimum versions based on the first release where the
# processor is included in llvm/lib/Support/TargetParser.cpp
depends_on("llvm-amdgpu@5.2.0:", when="amdgpu_target=gfx940")
depends_on("llvm-amdgpu@5.7.0:", when="amdgpu_target=gfx941")
depends_on("llvm-amdgpu@5.7.0:", when="amdgpu_target=gfx942")
depends_on("llvm-amdgpu@5.2.0:", when="amdgpu_target=gfx1036")
depends_on("llvm-amdgpu@5.3.0:", when="amdgpu_target=gfx1100")
depends_on("llvm-amdgpu@5.3.0:", when="amdgpu_target=gfx1101")
depends_on("llvm-amdgpu@5.3.0:", when="amdgpu_target=gfx1102")
depends_on("llvm-amdgpu@5.3.0:", when="amdgpu_target=gfx1103")
requires("%[virtuals=hip-lang] llvm-amdgpu@5.2.0:", when="amdgpu_target=gfx940")
requires("%[virtuals=hip-lang] llvm-amdgpu@5.7.0:", when="amdgpu_target=gfx941")
requires("%[virtuals=hip-lang] llvm-amdgpu@5.7.0:", when="amdgpu_target=gfx942")
requires("%[virtuals=hip-lang] llvm-amdgpu@5.2.0:", when="amdgpu_target=gfx1036")
requires("%[virtuals=hip-lang] llvm-amdgpu@5.3.0:", when="amdgpu_target=gfx1100")
requires("%[virtuals=hip-lang] llvm-amdgpu@5.3.0:", when="amdgpu_target=gfx1101")
requires("%[virtuals=hip-lang] llvm-amdgpu@5.3.0:", when="amdgpu_target=gfx1102")
requires("%[virtuals=hip-lang] llvm-amdgpu@5.3.0:", when="amdgpu_target=gfx1103")
# Compiler conflicts

View File

@@ -190,6 +190,10 @@ def f77(self):
self._lang_exists_or_raise("f77", lang=Languages.FORTRAN)
return self.compilers[Languages.FORTRAN].package.fortran
@property
def stdcxx_libs(self):
return self._maybe_return_attribute("stdcxx_libs", lang=Languages.CXX)
class DeprecatedCompiler(lang.DeprecatedProperty):
def __init__(self) -> None:

View File

@@ -2334,6 +2334,8 @@ def preferred_variants(self, pkg_name):
if not preferred_variants:
return
self.gen.h2(f"Package preferences: {pkg_name}")
for variant_name in sorted(preferred_variants):
variant = preferred_variants[variant_name]
@@ -3128,7 +3130,6 @@ def setup(
for pkg in sorted(self.pkgs):
self.gen.h2("Package rules: %s" % pkg)
self.pkg_rules(pkg, tests=self.tests)
self.gen.h2("Package preferences: %s" % pkg)
self.preferred_variants(pkg)
self.gen.h1("Special variants")
@@ -3200,12 +3201,13 @@ def define_runtime_constraints(self) -> List[spack.spec.Spec]:
# FIXME (compiler as nodes): think of using isinstance(compiler_cls, WrappedCompiler)
# Add a dependency on the compiler wrapper
recorder("*").depends_on(
"compiler-wrapper",
when=f"%{compiler.name}@{compiler.versions}",
type="build",
description=f"Add the compiler wrapper when using {compiler}",
)
for language in ("c", "cxx", "fortran"):
recorder("*").depends_on(
"compiler-wrapper",
when=f"%[virtuals={language}] {compiler.name}@{compiler.versions}",
type="build",
description=f"Add the compiler wrapper when using {compiler} for {language}",
)
if not using_libc_compatibility():
continue
@@ -3600,11 +3602,9 @@ def rule_body_from(self, when_spec: "spack.spec.Spec") -> Tuple[str, str]:
# (avoid adding virtuals everywhere, if a single edge needs it)
_, provider, virtual = clause.args
clause.args = "virtual_on_edge", node_placeholder, provider, virtual
body_str = (
f" {f',{os.linesep} '.join(str(x) for x in body_clauses)},\n"
f" not external({node_variable}),\n"
f" not runtime(Package)"
).replace(f'"{node_placeholder}"', f"{node_variable}")
body_str = ",\n".join(f" {x}" for x in body_clauses)
body_str += f",\n not external({node_variable})"
body_str = body_str.replace(f'"{node_placeholder}"', f"{node_variable}")
for old, replacement in when_substitutions.items():
body_str = body_str.replace(old, replacement)
return body_str, node_variable

View File

@@ -1421,6 +1421,7 @@ compiler(Compiler) :- compiler_supports_target(Compiler, _, _).
language("c").
language("cxx").
language("fortran").
language("hip-lang").
language_runtime("fortran-rt").
error(10, "Only external, or concrete, compilers are allowed for the {0} language", Language)

View File

@@ -216,16 +216,13 @@ def check_args_contents(cc, args, must_contain, must_not_contain):
assert a not in cc_modified_args
def check_env_var(executable, var, expected):
"""Check environment variables updated by the passed compiler wrapper
This assumes that cc will print debug output when it's environment
contains SPACK_TEST_COMMAND=dump-env-<variable-to-debug>
"""
executable = Executable(str(executable))
with set_env(SPACK_TEST_COMMAND="dump-env-" + var):
output = executable(*test_args, output=str).strip()
assert executable.path + ": " + var + ": " + expected == output
def check_wrapper_var(exe, *args, var, expected):
"""Check variables set by the compiler wrapper. This works by setting SPACK_TEST_COMMAND to
dump-var-<variable-to-debug>, which will print the variable and exit."""
executable = Executable(str(exe))
with set_env(SPACK_TEST_COMMAND=f"dump-var-{var}"):
output = executable(*args, output=str).strip()
assert f"{executable.path}: {var}: {expected}" == output
def dump_mode(cc, args):
@@ -749,11 +746,22 @@ def test_system_path_cleanup(wrapper_environment, wrapper_dir):
"""
cc = wrapper_dir / "cc"
system_path = "/bin:/usr/bin:/usr/local/bin"
with set_env(SPACK_COMPILER_WRAPPER_PATH=str(wrapper_dir), SPACK_CC="true"):
with set_env(SPACK_COMPILER_WRAPPER_PATH=str(wrapper_dir)):
with set_env(PATH=str(wrapper_dir) + ":" + system_path):
check_env_var(cc, "PATH", system_path)
check_wrapper_var(cc, *test_args, var="PATH", expected=system_path)
with set_env(PATH=str(wrapper_dir) + "/:" + system_path):
check_env_var(cc, "PATH", system_path)
check_wrapper_var(cc, *test_args, var="PATH", expected=system_path)
def test_language_from_flags(wrapper_environment, wrapper_dir):
"""Tes that the compiler language mode is determined by -x/--language flags if present"""
cc = wrapper_dir / "cc"
for flag_value, lang in [("c", "CC"), ("c++", "CXX"), ("f77", "F77"), ("f95", "FC")]:
check_wrapper_var(cc, "-c", "file", "-x", flag_value, var="comp", expected=lang)
check_wrapper_var(cc, "-c", "file", f"-x{flag_value}", var="comp", expected=lang)
check_wrapper_var(cc, "-c", "file", f"--language={flag_value}", var="comp", expected=lang)
check_wrapper_var(cc, "-c", "file", "--language", flag_value, var="comp", expected=lang)
def test_ld_deps_partial(wrapper_environment, wrapper_dir):

View File

@@ -20,12 +20,14 @@ spack:
require: +analysis +dd4hep +edm4hep +examples +fatras +geant4 +hepmc3 +podio +pythia8 +python +svg +tgeo cxxstd=20
celeritas:
require: +geant4 +hepmc3 +root +shared cxxstd=20
geant4:
require: +opengl +qt +threads +x11
hip:
require: '@5.7.1 +rocm'
rivet:
require: hepmc=3
root:
require: +davix +dcache +examples +fftw +fits +fortran +gdml +graphviz +gsl +http +math +minuit +mlp +mysql +opengl +postgres +pythia8 +python +r +roofit +root7 +rpath ~shadow +spectrum +sqlite +ssl +tbb +threads +tmva +tmva-cpu +unuran +vc +vdt +veccore +webgui +x +xml +xrootd # cxxstd=20
require: +arrow +davix +dcache +emacs +examples +fftw +fits +fortran +gdml +graphviz +gsl +http +math +minuit +mlp +mysql +opengl +postgres +pythia8 +python +r +roofit +root7 +rpath ~shadow +spectrum +sqlite +ssl +tbb +threads +tmva +tmva-cpu +unuran +vc +vdt +veccore +webgui +x +xml +xrootd # cxxstd=20
# note: root cxxstd=20 not concretizable within sherpa
vecgeom:
require: +gdml +geant4 +root +shared cxxstd=20
@@ -66,7 +68,8 @@ spack:
- fjcontrib
#- garfieldpp
- gaudi +aida +examples +heppdt +xercesc ^gdb +debuginfod +python
- geant4 +opengl +qt +threads ~vtk ^[virtuals=qmake] qt
- geant4 ~vtk ^[virtuals=qmake] qt
- geant4 ~vtk ^[virtuals=qmake] qt-base
#- genie +atmo
- hepmc
- hepmc3 +interfaces +protobuf +python +rootio

View File

@@ -81,19 +81,13 @@ def runtime_constraints(cls, *, spec, pkg):
spec: spec that will inject runtime dependencies
pkg: object used to forward information to the solver
"""
pkg("*").depends_on(
"gcc-runtime",
when="%gcc",
type="link",
description="If any package uses %gcc, it depends on gcc-runtime",
)
pkg("*").depends_on(
f"gcc-runtime@{str(spec.version)}:",
when=f"^[deptypes=build] {spec.name}@{spec.versions}",
type="link",
description=f"If any package uses %{str(spec)}, "
f"it depends on gcc-runtime@{str(spec.version)}:",
)
for language in ("c", "cxx", "fortran"):
pkg("*").depends_on(
f"gcc-runtime@{spec.version}:",
when=f"%[virtuals={language}] {spec.name}@{spec.versions}",
type="link",
description=f"Inject gcc-runtime when gcc is used as a {language} compiler",
)
gfortran_str = "libgfortran@5"
if spec.satisfies("gcc@:6"):
@@ -104,18 +98,14 @@ def runtime_constraints(cls, *, spec, pkg):
for fortran_virtual in ("fortran-rt", gfortran_str):
pkg("*").depends_on(
fortran_virtual,
when=f"^[virtuals=fortran deptypes=build] {spec.name}@{spec.versions}",
when=f"%[virtuals=fortran] {spec.name}@{spec.versions}",
type="link",
description=f"Add a dependency on '{gfortran_str}' for nodes compiled with "
f"{str(spec)} and using the 'fortran' language",
f"{spec} and using the 'fortran' language",
)
# The version of gcc-runtime is the same as the %gcc used to "compile" it
pkg("gcc-runtime").requires(
f"@{str(spec.versions)}", when=f"^[deptypes=build] {spec.name}@{spec.versions}"
)
pkg("gcc-runtime").requires(f"@{spec.versions}", when=f"%{spec.name}@{spec.versions}")
# If a node used %gcc@X.Y its dependencies must use gcc-runtime@:X.Y
# (technically @:X is broader than ... <= @=X but this should work in practice)
pkg("*").propagate(
f"gcc@:{str(spec.version)}", when=f"^[deptypes=build] {spec.name}@{spec.versions}"
)
pkg("*").propagate(f"gcc@:{spec.version}", when=f"%{spec.name}@{spec.versions}")

View File

@@ -31,6 +31,10 @@ class Amp(CMakePackage):
variant("trilinos", default=True, description="Build with support for Trilinos")
variant("zlib", default=True, description="Build with support for zlib")
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")
# Everything should be compiled position independent (-fpic)
depends_on("blas")
depends_on("lapack")

View File

@@ -65,6 +65,7 @@ class Aocc(Package, LlvmDetection, CompilerPackage):
license_url = "https://www.amd.com/en/developer/aocc/aocc-compiler/eula.html"
depends_on("c", type="build") # generated
depends_on("cxx", type="build")
depends_on("libxml2")
depends_on("zlib-api")
@@ -138,6 +139,7 @@ def cfg_files(self):
}
implicit_rpath_libs = ["libclang"]
stdcxx_libs = ("-lstdc++",)
def _standard_flag(self, *, language: str, standard: str) -> str:
flags = {

View File

@@ -52,6 +52,8 @@ class AoclDa(CMakePackage):
when="@5.0",
)
depends_on("c", type="build")
depends_on("cmake@3.22:", type="build")
for vers in ["5.0"]:
with when(f"@={vers}"):

View File

@@ -37,6 +37,7 @@ class Apptainer(SingularityBase):
)
version("main", branch="main", get_full_repo=True) # apptainer version uses git describe
version("1.4.0", sha256="204cded54046547cb3eb4c7874bdf45892fedc58b0d104195c59d2972cba51d3")
version("1.3.6", sha256="b5343369e7fdf67572f887d81f8d2b938f099fb39c876d96430d747935960d51")
version("1.3.5", sha256="fe1c977da952edf1056915b2df67ae2203ef06065d4e4901a237c902329306b2")
version("1.3.4", sha256="c6ccfdd7c967e5c36dde8711f369c4ac669a16632b79fa0dcaf7e772b7a47397")
@@ -53,18 +54,23 @@ class Apptainer(SingularityBase):
version("1.1.3", sha256="c7bf7f4d5955e1868739627928238d02f94ca9fd0caf110b0243d65548427899")
version("1.0.2", sha256="2d7a9d0a76d5574459d249c3415e21423980d9154ce85e8c34b0600782a7dfd3")
variant("libsubid", default=True, when="@1.4:", description="Enable libsubid support")
depends_on("c", type="build") # generated
depends_on("e2fsprogs@1.47:+fuse2fs", type="run")
depends_on("go@1.17.5:", when="@1.1.0:")
depends_on("go@1.19:", when="@1.2:")
depends_on("go@1.20:", when="@1.3:")
depends_on("go@1.22.7:", when="@1.4:")
depends_on("gocryptfs@2.4:", type="run", when="@1.3:")
depends_on("squashfuse", type="run")
depends_on("squashfuse@0.5.1:", type="run", when="@1.3:")
depends_on("fuse-overlayfs", type="run")
depends_on("fuse-overlayfs@1.13:", type="run", when="@1.3:")
depends_on("shadow", when="+libsubid")
singularity_org = "apptainer"
singularity_name = "apptainer"
singularity_security_urls = (
@@ -79,6 +85,10 @@ def config_options(self):
options = []
if spec.satisfies("@1.1.0: +suid"):
options.append("--with-suid")
if spec.satisfies("+libsubid"):
options.append("--with-libsubid")
else:
options.append("--without-libsubid")
return options
def flag_handler(self, name, flags):

View File

@@ -28,6 +28,8 @@ class Aragorn(Package):
expand=False,
)
depends_on("c", type="build")
# fix checksum error
def url_for_version(self, version):
return f"http://www.ansikte.se/ARAGORN/Downloads/aragorn{version}.c"

View File

@@ -16,6 +16,7 @@ class Armadillo(CMakePackage):
license("Apache-2.0")
version("14.4.1", sha256="26ce272bfdc8246c278e6f8cfa53777a1efb14ef196e88082fee05da1a463491")
version("14.4.0", sha256="023242fd59071d98c75fb015fd3293c921132dc39bf46d221d4b059aae8d79f4")
version("14.2.3", sha256="fc70c3089a8d2bb7f2510588597d4b35b4323f6d4be5db5c17c6dba20ab4a9cc")
version("14.2.2", sha256="3054c8e63db3abdf1a5c8f9fdb7e6b4ad833f9bcfb58324c0ff86de0784c70e0")

View File

@@ -25,6 +25,8 @@ class Babelstream(CMakePackage, CudaPackage, ROCmPackage, MakefilePackage):
version("main", branch="main")
maintainers("tomdeakin", "kaanolgu", "tom91136")
# Previous maintainers: "robj0nes"
depends_on("c", type="build")
depends_on("cxx", type="build", when="languages=cxx")
depends_on("fortran", type="build", when="languages=fortran")
# Languages

View File

@@ -16,6 +16,7 @@ class BamReadcount(CMakePackage):
version("1.0.1", sha256="8ebf84d9efee0f2d3b43f0452dbf16b27337c960e25128f6a7173119e62588b8")
version("0.8.0", sha256="4f4dd558e3c6bfb24d6a57ec441568f7524be6639b24f13ea6f2bb350c7ea65f")
depends_on("c", type="build")
depends_on("cxx", type="build") # generated
def setup_build_environment(self, env):

View File

@@ -16,6 +16,8 @@ class Bioawk(MakefilePackage):
version("1.0", sha256="316a6561dda41e8327b85106db3704e94e23d7a89870392d19ef8559f7859e2d")
depends_on("c", type="build")
depends_on("zlib-api")
depends_on("bison", type=("build"))

View File

@@ -16,6 +16,8 @@ class Blat(Package):
version("37", sha256="88ee2b272d42ab77687c61d200b11f1d58443951069feb7e10226a2509f84cf2")
version("35", sha256="06d9bcf114ec4a4b21fef0540a0532556b6602322a5a2b33f159dc939ae53620")
depends_on("c", type="build")
depends_on("libpng")
depends_on("uuid", when="@37:")
depends_on("mysql-client", when="@37:")

View File

@@ -19,6 +19,8 @@ class Bucky(MakefilePackage):
requires("%gcc", msg="bucky can only be compiled with GCC")
depends_on("cxx", type="build")
build_directory = "src"
def edit(self, spec, prefix):

View File

@@ -3,6 +3,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import socket
import sys
from spack.package import *
@@ -149,6 +150,19 @@ def _get_sys_type(self, spec):
sys_type = env["SYS_TYPE"]
return sys_type
@property
def cache_name(self):
hostname = socket.gethostname()
if "SYS_TYPE" in env:
hostname = hostname.rstrip("1234567890")
return "{0}-{1}-{2}@{3}-{4}.cmake".format(
hostname,
self._get_sys_type(self.spec),
self.spec.compiler.name,
self.spec.compiler.version,
self.spec.dag_hash(8),
)
def initconfig_compiler_entries(self):
spec = self.spec
entries = super().initconfig_compiler_entries()

View File

@@ -15,11 +15,17 @@ class Camp(CMakePackage, CudaPackage, ROCmPackage):
git = "https://github.com/LLNL/camp.git"
url = "https://github.com/LLNL/camp/archive/v0.1.0.tar.gz"
maintainers("trws", "adrienbernede")
maintainers("adrienbernede", "kab163", "trws")
license("BSD-3-Clause")
version("main", branch="main", submodules=False)
version(
"2025.03.0",
tag="v2025.03.0",
commit="ee0a3069a7ae72da8bcea63c06260fad34901d43",
submodules=False,
)
version(
"2024.07.0",
tag="v2024.07.0",

View File

@@ -24,6 +24,30 @@ class Care(CachedCMakePackage, CudaPackage, ROCmPackage):
version("develop", branch="develop", submodules=False)
version("master", branch="master", submodules=False)
version(
"0.15.1",
tag="v0.15.1",
commit="f198c8b3d5dcfd274107b4263331818e86b50c7a",
submodules=False,
)
version(
"0.15.0",
tag="v0.15.0",
commit="aff9eea69b6d95342371aacc44b73bef785255f3",
submodules=False,
)
version(
"0.14.1",
tag="v0.14.1",
commit="110c6e5766ead59b231e2b05deecd7567874e907",
submodules=False,
)
version(
"0.14.0",
tag="v0.14.0",
commit="2784188a067abac35747d58b5a5daa1b3852756b",
submodules=False,
)
version(
"0.13.3",
tag="v0.13.3",
@@ -67,6 +91,7 @@ class Care(CachedCMakePackage, CudaPackage, ROCmPackage):
variant(
"implicit_conversions",
default=False,
when="@:0.14",
description="Enable implicit" "conversions to/from raw pointers",
)
variant("tests", default=False, description="Build tests")
@@ -111,7 +136,6 @@ class Care(CachedCMakePackage, CudaPackage, ROCmPackage):
depends_on("raja@2024.02.0:", when="@0.12.0:")
depends_on("raja@2022.10.5:", when="@0.10.0:")
# TODO: Add an enable_pick variant
depends_on("chai+enable_pick+raja")
depends_on("chai@2024.07.0:", when="@0.13.2:")
depends_on("chai@2024.02.2:", when="@0.13.1:")
@@ -209,12 +233,6 @@ def initconfig_hardware_entries(self):
if spec.satisfies("+rocm"):
entries.append(cmake_cache_option("ENABLE_HIP", True))
archs = self.spec.variants["amdgpu_target"].value
if archs != "none":
arch_str = ",".join(archs)
entries.append(
cmake_cache_string("HIP_HIPCC_FLAGS", "--amdgpu-target={0}".format(arch_str))
)
else:
entries.append(cmake_cache_option("ENABLE_HIP", False))
@@ -250,6 +268,13 @@ def initconfig_package_entries(self):
entries.append(cmake_cache_string("CMAKE_BUILD_TYPE", spec.variants["build_type"].value))
# C++14
if spec.satisfies("@:0.14.1"):
entries.append(cmake_cache_string("BLT_CXX_STD", "c++14"))
# C++17
else:
entries.append(cmake_cache_string("BLT_CXX_STD", "c++17"))
entries.append(cmake_cache_option("ENABLE_TESTS", spec.satisfies("+tests")))
entries.append(cmake_cache_option("CARE_ENABLE_TESTS", spec.satisfies("+tests")))
# For tests to work, we also need BLT_ENABLE_TESTS to be on.

View File

@@ -23,6 +23,7 @@ class Casper(MakefilePackage):
)
depends_on("c", type="build") # generated
depends_on("cxx", type="build")
depends_on("jellyfish@2.2.3:")
depends_on("boost+exception")

View File

@@ -18,11 +18,17 @@ class Chai(CachedCMakePackage, CudaPackage, ROCmPackage):
git = "https://github.com/LLNL/CHAI.git"
tags = ["ecp", "e4s", "radiuss"]
maintainers("davidbeckingsale", "adayton1", "adrienbernede")
maintainers("adayton1", "adrienbernede", "davidbeckingsale", "kab163")
license("BSD-3-Clause")
version("develop", branch="develop", submodules=False)
version(
"2025.03.0",
tag="v2025.03.0",
commit="79f6414a00a89070054ac97baed47d21d10c83a4",
submodules=False,
)
version(
"2024.07.0",
tag="v2024.07.0",
@@ -101,7 +107,7 @@ class Chai(CachedCMakePackage, CudaPackage, ROCmPackage):
# We propagate the patch here.
patch("change_mpi_target_name_umpire_patch.patch", when="@2022.10.0:2023.06.0")
variant("enable_pick", default=False, description="Enable pick method")
variant("enable_pick", default=False, when="@:2024", description="Enable pick method")
variant(
"separable_compilation",
default=True,

View File

@@ -14,6 +14,7 @@ class Cmark(CMakePackage):
license("BSD-2-Clause")
version("0.31.1", sha256="3da93db5469c30588cfeb283d9d62edfc6ded9eb0edc10a4f5bbfb7d722ea802")
version("0.31.0", sha256="bbcb8f8c03b5af33fcfcf11a74e9499f20a9043200b8552f78a6e8ba76e04d11")
version("0.29.0", sha256="2558ace3cbeff85610de3bda32858f722b359acdadf0c4691851865bb84924a6")
version("0.28.3", sha256="acc98685d3c1b515ff787ac7c994188dadaf28a2d700c10c1221da4199bae1fc")

View File

@@ -62,7 +62,7 @@ def meson_args(self):
args.append(f"-Dlibblas={blas}")
args.extend([f"-Dlibblas_path={p}" for p in blas_paths])
args.append(f"-Dliblapack={lapack}")
args.extend([f"-Dlibblas_path={p}" for p in lapack_paths])
args.extend([f"-Dliblapack_path={p}" for p in lapack_paths])
if spec.satisfies("+metis"):
metis = spec["metis"]
if metis.satisfies("@5"):

View File

@@ -68,6 +68,7 @@ def url_for_version(self, version):
depends_on("zlib-api", type="link")
depends_on("z3", type="link")
depends_on("ncurses", type="link")
requires("%[virtuals=c,cxx] llvm-amdgpu")
for ver in [
"5.3.0",
@@ -94,12 +95,9 @@ def url_for_version(self, version):
"6.3.3",
"master",
]:
# llvm libs are linked statically, so this *could* be a build dep
depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
# aomp may not build rocm-device-libs as part of llvm-amdgpu, so make
# that a conditional dependency
depends_on(f"rocm-device-libs@{ver}", when=f"@{ver} ^llvm-amdgpu ~rocm-device-libs")
# in reality this should be a link type dep, but libLLVM is linked statically,
# and just requiring llvm-amdgpu as a compiler suffices for now.
requires(f"%llvm-amdgpu@{ver}", when=f"@{ver}")
depends_on(f"rocm-cmake@{ver}", when=f"@{ver}", type="build")
for ver in [

View File

@@ -178,9 +178,10 @@ execute() {
unset IFS
exit
;;
dump-env-*)
var=${SPACK_TEST_COMMAND#dump-env-}
dump-var-*)
var=${SPACK_TEST_COMMAND#dump-var-}
eval "printf '%s\n' \"\$0: \$var: \$$var\""
exit
;;
*)
die "Unknown test command: '$SPACK_TEST_COMMAND'"
@@ -296,9 +297,36 @@ fi
# Note. SPACK_ALWAYS_XFLAGS are applied for all compiler invocations,
# including version checks (SPACK_XFLAGS variants are not applied
# for version checks).
command="${0##*/}"
command_from_argv0="${0##*/}"
command="$command_from_argv0"
comp="CC"
vcheck_flags=""
_command_from_flags() {
while [ $# -ne 0 ]; do
arg="$1"
shift
case "$arg" in
-x|--language)
_lang="$1"
shift ;;
-x*)
_lang="${arg#-x}" ;;
--language=*)
_lang="${arg#--language=}" ;;
*) continue ;;
esac
done
case "$_lang" in
c) command=cc ;;
c++|f77|f95|hip) command="$_lang" ;;
*) command="$command_from_argv0" ;; # drop unknown languages
esac
}
_command_from_flags "$@"
case "$command" in
cpp)
mode=cpp
@@ -337,6 +365,14 @@ case "$command" in
debug_flags="-g"
vcheck_flags="${SPACK_ALWAYS_FFLAGS}"
;;
hip)
command="$SPACK_HIPCXX"
language="HIP"
comp="HIPCXX"
lang_flags=HIP
debug_flags="-g"
vcheck_flags="${SPACK_ALWAYS_HIPCXXFLAGS}"
;;
ld|ld.gold|ld.lld)
mode=ld
if [ -z "$SPACK_CC_RPATH_ARG" ]; then

View File

@@ -43,7 +43,7 @@ class CompilerWrapper(Package):
if sys.platform != "win32":
version(
"1.0",
sha256="c65a9d2b2d4eef67ab5cb0684d706bb9f005bb2be94f53d82683d7055bdb837c",
sha256="01db837305c8e181f142da3341c8438e0a7b4e03f0361df19d5784ab68b3c1f2",
expand=False,
)
else:
@@ -156,6 +156,9 @@ def setup_dependent_build_environment(self, env, dependent_spec):
_var_list.append(("fortran", "fortran", "F77", "SPACK_F77"))
_var_list.append(("fortran", "fortran", "FC", "SPACK_FC"))
if dependent_spec.has_virtual_dependency("hip-lang"):
_var_list.append(("hip-lang", "hip", "HIPCXX", "SPACK_HIPCXX"))
# The package is not used as a compiler, so skip this setup
if not _var_list:
return

View File

@@ -16,6 +16,8 @@ class ConnectProxy(MakefilePackage):
version("1.105", sha256="07366026b1f81044ecd8da9b5b5b51321327ecdf6ba23576271a311bbd69d403")
depends_on("c", type="build")
def build(self, spec, prefix):
make("CC={0}".format(spack_cc))

View File

@@ -15,6 +15,7 @@ class Cppgsl(CMakePackage):
license("MIT")
version("main", branch="main")
version("4.2.0", sha256="2c717545a073649126cb99ebd493fa2ae23120077968795d2c69cbab821e4ac6")
version("4.1.0", sha256="0a227fc9c8e0bf25115f401b9a46c2a68cd28f299d24ab195284eb3f1d7794bd")
version("4.0.0", sha256="f0e32cb10654fea91ad56bde89170d78cfbf4363ee0b01d8f097de2ba49f6ce9")
version("3.1.0", sha256="d3234d7f94cea4389e3ca70619b82e8fb4c2f33bb3a070799f1e18eef500a083")

View File

@@ -8,6 +8,38 @@
from spack.package import *
_versions = {
# cuDNN 9.8.0
"9.8.0.87-12": {
"Linux-x86_64": "321b9b33bb1287404d93d5672d352f16feabc4b220ac6ae0b86e4b27f257dcf4",
"Linux-aarch64": "f03ece3ff07d1719f06218973a8797cec1be387cc317baab5bb118dc988199e7",
},
"9.8.0.87-11": {
"Linux-x86_64": "cf4dfaef8311d987d640a322f668cd5240ac3e5302abe9617dd991b5b2532758"
},
# cuDNN 9.7.1
"9.7.1.26-12": {
"Linux-x86_64": "109a5e5c6bcdf4396e6f63f3f862ed2dcf16ee93ee034dc704a1b11bdf00c0b1",
"Linux-aarch64": "8c33d601728e8896296e53f08391544a1ec5d03820e7d2cb9ddfa95fdcbbaf5c",
},
"9.7.1.26-11": {
"Linux-x86_64": "73aadf2d1b721a34bd7b90908d02906257f2addbd246cf8db58e21d68d855ea2"
},
# cuDNN 9.6.0
"9.6.0.74-12": {
"Linux-x86_64": "72595f0d17d952cf568c1d76e370a9c303bb08c2f80888a8cf33e316a65d46a8",
"Linux-aarch64": "6f907bf97731d30ffd55dcc53fe8aa666b583b2c0c6b20e88c7341f98bb0b594",
},
"9.6.0.74-11": {
"Linux-x86_64": "9717b0022d4f5ea88ccd9796bef7ad1cc5d04b3bd53f690041767aabfb98d14d"
},
# cuDNN 9.5.1
"9.5.1.17-12": {
"Linux-x86_64": "35dd20b9c68324ae1288ac36f66ab1f318d2bfecfafb703a82617aa283272be4",
"Linux-aarch64": "0099b8e4081ac146f802e769cdd30d9e01a289ea0fd056e64e44297a13e1aa0c",
},
"9.5.1.17-11": {
"Linux-x86_64": "b1f5050cd2bfd7fa9d3d0dd00d417cc2124692d8421295e12f841be6c8e3a426"
},
# cuDNN 9.2.0
"9.2.0.82-12": {
"Linux-x86_64": "1362b4d437e37e92c9814c3b4065db5106c2e03268e22275a5869e968cee7aa8",

View File

@@ -34,6 +34,8 @@ class Dataspaces(AutotoolsPackage):
variant("ptag", default="250", description="Cray UGNI protection tag", values=is_string)
variant("mpi", default=True, description="Use MPI for collective communication")
depends_on("c", type="build")
depends_on("m4", type="build")
depends_on("automake", type="build")
depends_on("autoconf", type="build")

View File

@@ -30,6 +30,7 @@ class Dbus(AutotoolsPackage, MesonPackage):
)
# Note: odd minor versions are unstable, keep last stable version preferred
version("1.16.2", sha256="0ba2a1a4b16afe7bceb2c07e9ce99a8c2c3508e5dec290dbb643384bd6beb7e2")
version("1.16.0", sha256="9f8ca5eb51cbe09951aec8624b86c292990ae2428b41b856e2bed17ec65c8849")
version("1.15.12", sha256="0589c9c707dd593e31f0709caefa5828e69c668c887a7c0d2e5ba445a86bae4d")
version("1.15.10", sha256="f700f2f1d0473f11e52f3f3e179f577f31b85419f9ae1972af8c3db0bcfde178")

View File

@@ -15,6 +15,9 @@ class DhpmmF(MakefilePackage):
version("alpha", sha256="35321ecbc749f2682775ffcd27833afc8c8eb4fa7753ce769727c9d1fe097848")
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("blas", type="link")
depends_on("lapack", type="link")

View File

@@ -18,6 +18,8 @@ class DialignTx(MakefilePackage):
build_directory = "source"
depends_on("c", type="build")
conflicts("%gcc@6:")
def edit(self, spec, prefix):

View File

@@ -26,6 +26,7 @@ class Dicom3tools(MakefilePackage):
description="default UID Root assignment",
)
depends_on("c", type="build")
depends_on("cxx", type="build") # generated
depends_on("bzip2", type="build")

View File

@@ -125,6 +125,7 @@ class Dihydrogen(CachedCMakePackage, CudaPackage, ROCmPackage):
)
# Dependencies
depends_on("c", type="build")
depends_on("cxx", type="build") # generated
depends_on("catch2@3.0.1:", type=("build", "test"), when="+developer")

View File

@@ -21,6 +21,7 @@ class Dire(Package):
version("2.004", sha256="8cc1213b58fec744fdaa50834560a14b141de99efb2c3e3d3d47f3d6d84b179f")
depends_on("c", type="build")
depends_on("cxx", type="build") # generated
depends_on("zlib-api")

View File

@@ -65,6 +65,7 @@ class Dray(Package, CudaPackage):
# set to false for systems that implicitly link mpi
variant("blt_find_mpi", default=True, description="Use BLT CMake Find MPI logic")
depends_on("c", type="build")
depends_on("cxx", type="build") # generated
depends_on("fortran", type="build") # generated

View File

@@ -28,6 +28,8 @@ class EclipseGcjParser(Package):
expand=False,
)
depends_on("c", type="build")
@property
def gcj(self):
"""Obtain Executable for the gcj included with this GCC,

View File

@@ -14,6 +14,7 @@ class Embree(CMakePackage):
license("Apache-2.0", checked_by="wdconinc")
version("4.4.0", sha256="acb517b0ea0f4b442235d5331b69f96192c28da6aca5d5dde0cbe40799638d5c")
version("4.3.3", sha256="8a3bc3c3e21aa209d9861a28f8ba93b2f82ed0dc93341dddac09f1f03c36ef2d")
version("4.3.2", sha256="dc7bb6bac095b2e7bc64321435acd07c6137d6d60e4b79ec07bb0b215ddf81cb")
version("4.3.1", sha256="824edcbb7a8cd393c5bdb7a16738487b21ecc4e1d004ac9f761e934f97bb02a4")

View File

@@ -33,6 +33,8 @@ class Examinimd(MakefilePackage):
conflicts("+openmp", when="+pthreads")
depends_on("cxx", type="build")
depends_on("kokkos-legacy")
depends_on("mpi", when="+mpi")

View File

@@ -31,6 +31,8 @@ class Fasttree(Package):
variant("openmp", default=True, description="Add openmp support to Fasttree.")
depends_on("c", type="build")
def install(self, spec, prefix):
cc = Executable(spack_cc)
if self.spec.satisfies("+openmp"):

View File

@@ -30,6 +30,7 @@ class Ferret(Package):
variant("datasets", default=False, description="Install Ferret standard datasets")
depends_on("c", type="build") # generated
depends_on("cxx", type="build")
depends_on("fortran", type="build") # generated
depends_on("hdf5+hl")

View File

@@ -22,6 +22,10 @@ class Ffb(MakefilePackage):
patch("xvx.patch")
patch("gffv3tr.patch")
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")
depends_on("mpi")
depends_on("blas")
depends_on("scalapack")

View File

@@ -32,6 +32,9 @@ class Ffr(MakefilePackage):
patch("gfortran_format_31.patch", when="@3.1.004 %gcc")
patch("gfortran_format_30.patch", when="@3.0_000 %gcc")
depends_on("c", type="build")
depends_on("fortran", type="build")
depends_on("mpi")
depends_on("metis@:4", type="link")

View File

@@ -127,6 +127,9 @@ class Flamemaster(CMakePackage):
variant("eglib", default=False, description="Build with EG lib")
variant("sundials", default=True, description="with sundials")
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("blas")
depends_on("lapack")
depends_on("cmake@3.12", type="build")

View File

@@ -22,6 +22,7 @@ class FluxSched(CMakePackage, AutotoolsPackage):
license("LGPL-3.0-only")
version("master", branch="master")
version("0.44.0", sha256="a2b71a0c5fb51a89d32cff9eca2fc7c275a7a1a81746bea8d00b4c1868af366e")
version("0.43.0", sha256="0d9f6b88f99270fa84094b144a35bd6075adf92b9ec5c7f7f60fceffa668c996")
version("0.42.2", sha256="3a4a513c6539f2927e7a544f431e97456e50c71b63f8744d31e0dee3dc7fcc2e")
version("0.42.1", sha256="ab56b257e4918ad7e26ef6a375d0ea500a4929bf6633937f0c11c06e21db56b9")

View File

@@ -23,6 +23,7 @@ class Fontconfig(AutotoolsPackage):
version("2.11.1", sha256="b6b066c7dce3f436fdc0dfbae9d36122b38094f4f53bd8dffd45e195b0540d8d")
depends_on("c", type="build") # generated
depends_on("fortran", type="build")
# freetype2 21.0.15+ provided by freetype 2.8.1+
depends_on("freetype@2.8.1:", when="@2.13:")

View File

@@ -44,6 +44,10 @@ class Fplo(MakefilePackage):
# Sets the correct python module import order.
patch("fedit_py.patch")
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")
depends_on("mkl")
depends_on("ncurses")
depends_on("perl", type="run")

View File

@@ -26,6 +26,9 @@ class Fsl(Package, CudaPackage):
version("6.0.4", sha256="58b88f38e080b05d70724d57342f58e1baf56e2bd3b98506a72b4446cad5033e")
version("5.0.10", sha256="ca183e489320de0e502a7ba63230a7f55098917a519e8c738b005d526e700842")
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("python", type=("build", "run"))
depends_on("expat")
depends_on("libx11")

View File

@@ -618,7 +618,7 @@ def supported_languages(self):
opt_flags = ["-O", "-O0", "-O1", "-O2", "-O3", "-Os", "-Ofast", "-Og"]
implicit_rpath_libs = ["libgcc", "libgfortran"]
stdcxx_libs = "-lstdc++"
stdcxx_libs = ("-lstdc++",)
def _standard_flag(self, *, language, standard):
flags = {
@@ -1158,19 +1158,13 @@ def runtime_constraints(cls, *, spec, pkg):
spec: spec that will inject runtime dependencies
pkg: object used to forward information to the solver
"""
pkg("*").depends_on(
"gcc-runtime",
when="%gcc",
type="link",
description="If any package uses %gcc, it depends on gcc-runtime",
)
pkg("*").depends_on(
f"gcc-runtime@{str(spec.version)}:",
when=f"^[deptypes=build] {spec.name}@{spec.versions}",
type="link",
description=f"If any package uses %{str(spec)}, "
f"it depends on gcc-runtime@{str(spec.version)}:",
)
for language in ("c", "cxx", "fortran"):
pkg("*").depends_on(
f"gcc-runtime@{spec.version}:",
when=f"%[virtuals={language}] {spec.name}@{spec.versions}",
type="link",
description=f"Inject gcc-runtime when gcc is used as a {language} compiler",
)
gfortran_str = "libgfortran@5"
if spec.satisfies("gcc@:6"):
@@ -1181,21 +1175,17 @@ def runtime_constraints(cls, *, spec, pkg):
for fortran_virtual in ("fortran-rt", gfortran_str):
pkg("*").depends_on(
fortran_virtual,
when=f"^[virtuals=fortran deptypes=build] {spec.name}@{spec.versions}",
when=f"%[virtuals=fortran] {spec.name}@{spec.versions}",
type="link",
description=f"Add a dependency on '{gfortran_str}' for nodes compiled with "
f"{str(spec)} and using the 'fortran' language",
f"{spec} and using the 'fortran' language",
)
# The version of gcc-runtime is the same as the %gcc used to "compile" it
pkg("gcc-runtime").requires(
f"@{str(spec.versions)}", when=f"^[deptypes=build] {spec.name}@{spec.versions}"
)
pkg("gcc-runtime").requires(f"@{spec.versions}", when=f"%{spec.name}@{spec.versions}")
# If a node used %gcc@X.Y its dependencies must use gcc-runtime@:X.Y
# (technically @:X is broader than ... <= @=X but this should work in practice)
pkg("*").propagate(
f"gcc@:{str(spec.version)}", when=f"^[deptypes=build] {spec.name}@{spec.versions}"
)
pkg("*").propagate(f"gcc@:{spec.version}", when=f"%{spec.name}@{spec.versions}")
def _post_buildcache_install_hook(self):
if not self.spec.satisfies("platform=linux"):

View File

@@ -16,6 +16,7 @@ class Gdbm(AutotoolsPackage, GNUMirrorPackage):
license("GPL-3.0-or-later")
version("1.25", sha256="d02db3c5926ed877f8817b81cd1f92f53ef74ca8c6db543fbba0271b34f393ec")
version("1.24", sha256="695e9827fdf763513f133910bc7e6cfdb9187943a4fec943e57449723d2b8dbf")
version("1.23", sha256="74b1081d21fff13ae4bd7c16e5d6e504a4c26f7cde1dca0d963a484174bbcacd")
version("1.22", sha256="f366c823a6724af313b6bbe975b2809f9a157e5f6a43612a72949138d161d762")

View File

@@ -28,6 +28,8 @@ class Grackle(Package):
depends_on("libtool", when="@2.2:")
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")
depends_on("tcsh", type="build")
depends_on("mpi")

View File

@@ -0,0 +1,50 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class Greenx(CMakePackage):
"""GreenX: An open-source library that supports exascale implementations
of Green's-function-based methodologies."""
homepage = "https://nomad-coe.github.io/greenX"
url = "https://github.com/nomad-coe/greenX/archive/refs/tags/v2.1.tar.gz"
maintainers("RMeli")
license("Apache-2.0", checked_by="RMeli")
version("2.1", sha256="2fc1fc2c93b0bab14babc33386f7932192336813cea6db11cd27dbc36b541e41")
variant("shared", default=True, description="Build shared libraries")
variant("ac", default=True, description="Enable Analytical Continuation component")
variant(
"gmp",
when="+ac",
default=True,
description="Enable GMP library for multiple precision arithmetic",
)
variant("minmax", default=True, description="Enable minmax time-frequency grids component")
variant("lbasis", default=False, description="Enable localized basis component")
variant("paw", default=False, description="Enable PAW component")
depends_on("cxx", type="build")
depends_on("fortran", type="build")
depends_on("blas")
depends_on("lapack")
depends_on("gmp", when="+gmp")
def cmake_args(self):
args = [
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
self.define_from_variant("AC_COMPONENT", "ac"),
self.define_from_variant("ENABLE_GNU_GMP", "gmp"),
self.define_from_variant("MINMAX_COMPONENT", "minmax"),
self.define_from_variant("LBASIS_COMPONENT", "lbasis"),
self.define_from_variant("PAW_COMPONENT", "paw"),
]
return args

View File

@@ -70,6 +70,8 @@ class GribApi(CMakePackage):
# tests are enabled but the testing scripts don't use it.
# depends_on('valgrind', type='test', when='+test')
depends_on("fortran", type="build", when="+fortran")
depends_on("netcdf-c", when="+netcdf")
depends_on("openjpeg@1.5.0:1.5", when="jp2k=openjpeg")
depends_on("jasper", when="jp2k=jasper")
@@ -85,11 +87,6 @@ class GribApi(CMakePackage):
# CMAKE_INSTALL_RPATH must be a semicolon-separated list.
patch("cmake_install_rpath.patch")
@run_before("cmake")
def check_fortran(self):
if "+fortran" in self.spec and self.compiler.fc is None:
raise InstallError("Fortran interface requires a Fortran compiler!")
def cmake_args(self):
var_opt_list = [
("+pthreads", "GRIB_THREADS"),

View File

@@ -20,47 +20,19 @@ class H5zZfp(CMakePackage):
version("1.1.0", sha256="48a81e69d1f3b61d9a1eb07e868164fadf3b88690ec930efd849f5889681a893")
variant("fortran", default=True, description="Enable Fortran support")
variant("tests", default=False, description="Build tests")
depends_on("c", type="build") # generated
depends_on("fortran", type="build") # generated
depends_on("hdf5+fortran", when="+fortran")
depends_on("hdf5", when="~fortran")
depends_on("mpi", when="^hdf5+mpi")
depends_on("c", type="build")
depends_on("fortran", type="build", when="+fortran")
depends_on("hdf5")
depends_on("zfp bsws=8")
depends_on("hdf5+fortran", when="+fortran")
depends_on("mpi", when="^hdf5+mpi")
@property
def make_defs(self):
cc = spack_cc
fc = spack_fc
if self.spec.satisfies("^hdf5+mpi"):
cc = self.spec["mpi"].mpicc
fc = self.spec["mpi"].mpifc
make_defs = [
"PREFIX=%s" % prefix,
"CC=%s" % cc,
"HDF5_HOME=%s" % self.spec["hdf5"].prefix,
"ZFP_HOME=%s" % self.spec["zfp"].prefix,
def cmake_args(self):
args = [
self.define_from_variant("FORTRAN_INTERFACE", "fortran"),
self.define_from_variant("BUILD_TESTING", "tests"),
]
if self.spec.satisfies("+fortran") and fc:
make_defs += ["FC=%s" % fc]
else:
make_defs += ["FC="]
return make_defs
@property
def build_targets(self):
targets = ["all"]
return self.make_defs + targets
@property
def install_targets(self):
make_args = ["install"]
return make_args + self.make_defs
@run_after("build")
@on_package_attributes(run_tests=True)
def check_build(self):
make("check", *self.make_defs, parallel=False)
return args

View File

@@ -67,6 +67,8 @@ class HdfEos2(AutotoolsPackage):
conflicts("~static", when="~shared", msg="At least one of +static or +shared must be set")
depends_on("c", type="build")
# Build dependencies
depends_on("hdf")
# Because hdf always depends on zlib and jpeg in spack, the tests below in configure_args

View File

@@ -69,6 +69,8 @@ class Hip(CMakePackage):
depends_on("libedit", type="build")
depends_on("perl@5.10:", type=("build", "run"))
requires("%[virtuals=c,cxx] llvm-amdgpu")
test_requires_compiler = True
with when("+rocm"):
@@ -123,8 +125,8 @@ class Hip(CMakePackage):
"6.3.3",
]:
depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
requires(f"%llvm-amdgpu@{ver}", when=f"@{ver}")
depends_on(f"comgr@{ver}", when=f"@{ver}")
depends_on(f"llvm-amdgpu@{ver} +rocm-device-libs", when=f"@{ver}")
depends_on(f"rocminfo@{ver}", when=f"@{ver}")
depends_on(f"roctracer-dev-api@{ver}", when=f"@{ver}")

View File

@@ -57,6 +57,8 @@ class HipifyClang(CMakePackage):
depends_on("cxx", type="build")
depends_on("cmake@3.5:", type="build")
requires("%[virtuals=c,cxx] llvm-amdgpu")
for ver in [
"5.3.0",
"5.3.3",
@@ -82,7 +84,7 @@ class HipifyClang(CMakePackage):
"6.3.3",
"master",
]:
depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
requires(f"%llvm-amdgpu@{ver}", when=f"@{ver}")
for ver in [
"5.5.0",

View File

@@ -38,6 +38,8 @@ class Hipsycl(CMakePackage, ROCmPackage):
variant("cuda", default=False, description="Enable CUDA backend for SYCL kernels")
variant("rocm", default=False, description="Enable ROCM backend for SYCL kernels")
depends_on("cxx", type="build")
depends_on("cmake@3.5:", type="build")
depends_on("boost +filesystem", when="@:0.8")
depends_on("boost@1.67.0:1.69.0 +filesystem +fiber +context cxxstd=17", when="@0.9.1:")

View File

@@ -64,6 +64,7 @@ class HsaRocrDev(CMakePackage):
depends_on("numactl")
depends_on("pkgconfig")
depends_on("libdrm", when="@6.3:")
requires("%[virtuals=c,cxx] llvm-amdgpu")
for ver in [
"5.3.0",
@@ -112,9 +113,7 @@ class HsaRocrDev(CMakePackage):
"6.3.3",
"master",
]:
depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
# allow standalone rocm-device-libs (useful for aomp)
depends_on(f"rocm-device-libs@{ver}", when=f"@{ver} ^llvm-amdgpu ~rocm-device-libs")
requires(f"%llvm-amdgpu@{ver}", when=f"@{ver}")
for ver in [
"5.5.0",

View File

@@ -22,6 +22,7 @@ class ImprovedRdock(MakefilePackage):
version("main", branch="main")
depends_on("c", type="build")
depends_on("cxx", type="build") # generated
depends_on("popt")

View File

@@ -655,38 +655,32 @@ def determine_variants(cls, exes, version_str):
@classmethod
def runtime_constraints(cls, *, spec, pkg):
pkg("*").depends_on(
"intel-oneapi-runtime",
when="%oneapi",
type="link",
description="If any package uses %oneapi, it depends on intel-oneapi-runtime",
)
pkg("*").depends_on(
f"intel-oneapi-runtime@{str(spec.version)}:",
when=f"^[deptypes=build] {spec.name}@{spec.versions}",
type="link",
description=f"If any package uses %{str(spec)}, "
f"it depends on intel-oneapi-runtime@{str(spec.version)}:",
)
for language in ("c", "cxx", "fortran"):
pkg("*").depends_on(
f"intel-oneapi-runtime@{spec.version}:",
when=f"%[virtuals={language}] {spec.name}@{spec.versions}",
type="link",
description="Inject intel-oneapi-runtime when oneapi is used as "
f"a {language} compiler",
)
for fortran_virtual in ("fortran-rt", "libifcore@5"):
pkg("*").depends_on(
fortran_virtual,
when=f"^[virtuals=fortran deptypes=build] {spec.name}@{spec.versions}",
when=f"%[virtuals=fortran] {spec.name}@{spec.versions}",
type="link",
description=f"Add a dependency on 'libifcore' for nodes compiled with "
f"{str(spec)} and using the 'fortran' language",
description="Add a dependency on 'libifcore' for nodes compiled with "
f"{spec.name}@{spec.versions} and using the 'fortran' language",
)
# The version of intel-oneapi-runtime is the same as the %oneapi used to "compile" it
pkg("intel-oneapi-runtime").requires(
f"@{str(spec.versions)}", when=f"^[deptypes=build] {spec.name}@{spec.versions}"
f"@{spec.versions}", when=f"%{spec.name}@{spec.versions}"
)
# If a node used %intel-oneapi=runtime@X.Y its dependencies must use @:X.Y
# If a node used %intel-oneapi-runtime@X.Y its dependencies must use @:X.Y
# (technically @:X is broader than ... <= @=X but this should work in practice)
pkg("*").propagate(
f"intel-oneapi-compilers@:{str(spec.version)}",
when=f"^[deptypes=build] {spec.name}@{spec.versions}",
f"intel-oneapi-compilers@:{spec.version}", when=f"%{spec.name}@{spec.versions}"
)
def _cc_path(self):

View File

@@ -37,6 +37,7 @@ class Itensor(MakefilePackage):
variant("hdf5", default=False, description="Build rockstar with HDF5 support.")
variant("shared", default=False, description="Also build dynamic libraries.")
depends_on("c", type="build")
depends_on("cxx", type="build") # generated
depends_on("lapack")

View File

@@ -15,6 +15,7 @@ class JwtCpp(CMakePackage):
license("MIT")
version("0.7.1", sha256="e52f247d5e62fac5da6191170998271a70ce27f747f2ce8fde9b09f96a5375a4")
version("0.7.0", sha256="b9eb270e3ba8221e4b2bc38723c9a1cb4fa6c241a42908b9a334daff31137406")
version("0.6.0", sha256="0227bd6e0356b211341075c7997c837f0b388c01379bd256aa525566a5553f03")
version("0.5.2", sha256="d3188f9611597eb1bb285169879e1d87202bf10a08e4e7734c9f2097bfd4a850")
@@ -35,7 +36,7 @@ class JwtCpp(CMakePackage):
description="SSL library to use",
)
depends_on("c", type="build")
depends_on("c", type="build", when="@:0.7.0")
depends_on("cxx", type="build")
depends_on("openssl@1.0.2:", when="@0.4.0:0.4.99")

View File

@@ -271,16 +271,26 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
"gfx1030": "navi1030",
"gfx1100": "navi1100",
}
amdgpu_apu_arch_map = {"gfx942": "amd_gfx942_apu"}
amd_support_conflict_msg = (
"{0} is not supported; "
"Kokkos supports the following AMD GPU targets: " + ", ".join(amdgpu_arch_map.keys())
)
amd_apu_support_conflict_msg = (
"{0} is not supported; "
"Kokkos supports the following AMD GPU targets with unified memory: "
+ ", ".join(amdgpu_apu_arch_map.keys())
)
for arch in ROCmPackage.amdgpu_targets:
if arch not in amdgpu_arch_map:
conflicts(
"+rocm",
when="amdgpu_target={0}".format(arch),
msg=amd_support_conflict_msg.format(arch),
"+rocm", when=f"amdgpu_target={arch}", msg=amd_support_conflict_msg.format(arch)
)
if arch not in amdgpu_apu_arch_map:
conflicts(
"+rocm+apu",
when=f"amdgpu_target={arch}",
msg=amd_apu_support_conflict_msg.format(arch),
)
intel_gpu_arches = (
@@ -298,6 +308,7 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
values=("none",) + intel_gpu_arches,
description="Intel GPU architecture",
)
variant("apu", default=False, description="Enable APU support", when="@4.5: +rocm")
for dev, (dflt, desc) in devices_variants.items():
variant(dev, default=dflt, description=desc)
@@ -456,7 +467,10 @@ def cmake_args(self):
for amdgpu_target in spec.variants["amdgpu_target"].value:
if amdgpu_target != "none":
if amdgpu_target in self.amdgpu_arch_map:
spack_microarches.append(self.amdgpu_arch_map[amdgpu_target])
if spec.satisfies("+apu") and amdgpu_target in self.amdgpu_apu_arch_map:
spack_microarches.append(self.amdgpu_apu_arch_map[amdgpu_target])
else:
spack_microarches.append(self.amdgpu_arch_map[amdgpu_target])
else:
# Note that conflict declarations should prevent
# choosing an unsupported AMD GPU target

View File

@@ -117,6 +117,7 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage):
conflicts("+gold", when="platform=darwin", msg="gold does not work on Darwin")
conflicts("+lld", when="platform=darwin", msg="lld does not work on Darwin")
depends_on("c", type="build")
depends_on("cxx", type="build") # generated
depends_on("cmake@3.17.0:", type="build")

View File

@@ -9,7 +9,17 @@ class Lbzip2(AutotoolsPackage):
"""Multi-threaded compression utility with support for bzip2
compressed file format"""
homepage = "https://lbzip2.org/"
url = "http://archive.lbzip2.org/lbzip2-2.5.tar.gz"
homepage = "https://github.com/kjn/lbzip2/"
url = "https://github.com/kjn/lbzip2/archive/refs/tags/v2.5.tar.gz"
version("2.5", sha256="46c75ee93cc95eedc6005625442b2b8e59a2bef3ba80987d0491f055185650e9")
depends_on("c", type="build")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
version(
"2.5",
sha256="7be69ece83ecdc8f12b9201d838eee5cdb499f2fd68cffd2af58866076ccac43",
deprecated=True,
)

View File

@@ -30,6 +30,8 @@ class Lcals(MakefilePackage):
values=("sse", "avx", "MIC"),
)
depends_on("cxx", type="build")
@property
def build_targets(self):
targets = []

View File

@@ -24,6 +24,8 @@ class Ldak(Package):
variant("glpk", default=False, description="Use glpk instead of vendored qsopt")
depends_on("c", type="build")
depends_on("zlib-api")
depends_on("blas")
depends_on("lapack")

View File

@@ -129,6 +129,7 @@ class Legion(CMakePackage, ROCmPackage):
depends_on("hip@5.1:", when="+rocm")
depends_on("hdf5", when="+hdf5")
depends_on("hwloc", when="+hwloc")
depends_on("libfabric", when="network=gasnet conduit=ofi-slingshot11")
# cuda-centric
cuda_arch_list = CudaPackage.cuda_arch_values
@@ -150,8 +151,10 @@ class Legion(CMakePackage, ROCmPackage):
patch("hip-offload-arch.patch", when="@23.03.0 +rocm")
def patch(self):
if self.spec.satisfies(
"network=gasnet conduit=ofi-slingshot11 ^[virtuals=mpi] cray-mpich+wrappers"
if self.spec.satisfies("network=gasnet conduit=ofi-slingshot11") and (
self.spec.satisfies("^[virtuals=mpi] cray-mpich+wrappers")
or self.spec.satisfies("^[virtuals=mpi] mpich netmod=ofi ^libfabric fabrics=cxi")
or self.spec.satisfies("^[virtuals=mpi] openmpi fabrics=ofi ^libfabric fabrics=cxi")
):
filter_file(
r"--with-mpi-cc=cc",

View File

@@ -16,6 +16,9 @@ class Libarchive(AutotoolsPackage):
license("BSD-2-Clause AND BSD-3-Clause AND Public-Domain")
version("3.7.9", sha256="aa90732c5a6bdda52fda2ad468ac98d75be981c15dde263d7b5cf6af66fd009f")
version("3.7.8", sha256="a123d87b1bd8adb19e8c187da17ae2d957c7f9596e741b929e6b9ceefea5ad0f")
version("3.7.7", sha256="4cc540a3e9a1eebdefa1045d2e4184831100667e6d7d5b315bb1cbc951f8ddff")
version("3.7.6", sha256="b4071807367b15b72777c2eaac80f42c8ea2d20212ab279514a19fe1f6f96ef4")
version("3.7.5", sha256="37556113fe44d77a7988f1ef88bf86ab68f53d11e85066ffd3c70157cc5110f1")
@@ -131,6 +134,7 @@ class Libarchive(AutotoolsPackage):
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
depends_on("pkgconfig", type="build")
depends_on("bzip2", when="compression=bz2lib")
depends_on("lz4", when="compression=lz4")

View File

@@ -16,6 +16,7 @@ class Libffi(AutotoolsPackage):
license("MIT")
version("3.4.7", sha256="138607dee268bdecf374adf9144c00e839e38541f75f24a1fcf18b78fda48b2d")
version("3.4.6", sha256="b0dea9df23c863a7a50e825440f3ebffabd65df1497108e5d437747843895a4e")
version("3.4.5", sha256="96fff4e589e3b239d888d9aa44b3ff30693c2ba1617f953925a70ddebcc102b2")
version("3.4.4", sha256="d66c56ad259a82cf2a9dfc408b32bf5da52371500b84745f7fb8b645712df676")
@@ -44,6 +45,10 @@ class Libffi(AutotoolsPackage):
when="@3.4.3:3.4.4",
)
conflicts(
"%apple-clang@17.0.0", when="@:3.4.6", msg="Newer libffi required for Apple Clang 17.0.0"
)
@property
def headers(self):
# The headers are probably in self.prefix.lib but we search everywhere

View File

@@ -133,6 +133,9 @@ class Libmesh(AutotoolsPackage):
"variant.",
)
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("boost", when="+boost")
# TODO: replace this with an explicit list of components of Boost,

View File

@@ -62,6 +62,9 @@ def cmake_args(self):
self.define("PNG_STATIC", "static" in self.spec.variants["libs"].value),
self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
]
zlib_lib = self.spec["zlib-api"].libs
if zlib_lib:
args.append(self.define("ZLIB_LIBRARY", zlib_lib[0]))
if self.spec.satisfies("platform=darwin target=aarch64:"):
args.append("-DPNG_ARM_NEON=off")
return args

View File

@@ -15,6 +15,7 @@ class Libsm(AutotoolsPackage, XorgPackage):
maintainers("wdconinc")
version("1.2.6", sha256="166b4b50d606cdd83f1ddc61b5b9162600034f848b3e32ccbb0e63536b7d6cdd")
version("1.2.5", sha256="a11c3d23b60dce0c13256a8ce9478c1ea330719c0747b5adfbce60571198fa57")
version("1.2.4", sha256="51464ce1abce323d5b6707ceecf8468617106e1a8a98522f8342db06fd024c15")
version("1.2.3", sha256="1e92408417cb6c6c477a8a6104291001a40b3bb56a4a60608fdd9cd2c5a0f320")

View File

@@ -5,11 +5,11 @@
import llnl.util.filesystem as fs
from spack.build_systems import autotools, nmake
from spack.build_systems import autotools, cmake, nmake
from spack.package import *
class Libxml2(AutotoolsPackage, NMakePackage):
class Libxml2(AutotoolsPackage, CMakePackage, NMakePackage):
"""Libxml2 is the XML C parser and toolkit developed for the Gnome
project (but usable outside of the Gnome platform), it is free
software available under the MIT License."""
@@ -106,7 +106,12 @@ def url_for_version(self, version):
sha256="5dc43fed02b443d2563a502a52caafe39477c06fc30b70f786d5ed3eb5aea88d",
when="@2.9.11:2.9.14",
)
build_system(conditional("nmake", when="platform=windows"), "autotools", default="autotools")
build_system(
conditional("nmake", when="platform=windows"),
conditional("cmake", when="@2.11:"),
"autotools",
default="autotools",
)
def flag_handler(self, name, flags):
if name == "cflags" and self.spec.satisfies("+pic"):
@@ -262,6 +267,18 @@ def configure_args(self):
return args
class CMakeBuilder(AnyBuilder, cmake.CMakeBuilder):
def cmake_args(self):
args = [
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
self.define_from_variant("LIBXML2_WITH_PYTHON", "python"),
self.define("LIBXML2_WITH_LZMA", True),
self.define("LIBXML2_WITH_ZLIB", True),
self.define("LIBXML2_WITH_TESTS", True),
]
return args
class NMakeBuilder(AnyBuilder, nmake.NMakeBuilder):
phases = ("configure", "build", "install")

View File

@@ -23,6 +23,7 @@ class LlvmAmdgpu(CMakePackage, LlvmDetection, CompilerPackage):
"c": "rocmcc/amdclang",
"cxx": "rocmcc/amdclang++",
"fortran": "rocmcc/amdflang",
"hip-lang": "rocmcc/amdclang++",
}
stdcxx_libs = ("-lstdc++",)
@@ -59,6 +60,7 @@ class LlvmAmdgpu(CMakePackage, LlvmDetection, CompilerPackage):
version("5.3.0", sha256="4e3fcddb5b8ea8dcaa4417e0e31a9c2bbdc9e7d4ac3401635a636df32905c93e")
provides("c", "cxx")
provides("hip-lang")
provides("fortran")
variant(
@@ -372,3 +374,20 @@ def _cxx_path(self):
def _fortran_path(self):
return os.path.join(self.spec.prefix.bin, "amdflang")
@classmethod
def runtime_constraints(cls, *, spec, pkg):
"""Callback function to inject runtime-related rules into the solver.
Rule-injection is obtained through method calls of the ``pkg`` argument.
Args:
spec: spec that will inject runtime dependencies
pkg: object used to forward information to the solver
"""
pkg("*").depends_on(
"hip +rocm",
when="%[virtuals=hip-lang] llvm-amdgpu",
type="link",
description="If any package uses %llvm-amdgpu for hip-lang, it depends on hip",
)

View File

@@ -68,6 +68,34 @@ paths:
cxx: ".*/bin/clang[+][+]"
fortran: ".*/bin/flang"
# flang and flang-new in the same directory
- layout:
- executables:
- "bin/clang"
- "bin/clang++"
script: |
echo "clang version 20.1.0-rc1 (https://github.com/llvm/llvm-project af7f483a9d801252247b6c72e3763c1f55c5a506)"
echo "Target: x86_64-unknown-linux-gnu"
echo "Thread model: posix"
echo "InstalledDir: /tmp/clang/LLVM-20.1.0-rc1-Linux-X64/bin"
- executables:
- "bin/flang"
- "bin/flang-new"
script: |
echo "flang version 20.1.0-rc1 (https://github.com/llvm/llvm-project af7f483a9d801252247b6c72e3763c1f55c5a506)"
echo "Target: x86_64-unknown-linux-gnu"
echo "Thread model: posix"
echo "InstalledDir: /tmp/clang/LLVM-20.1.0-rc1-Linux-X64/bin"
platforms: ["darwin", "linux"]
results:
- spec: 'llvm@20.1.0 +flang+clang~lld~lldb'
extra_attributes:
compilers:
c: ".*/bin/clang"
cxx: ".*/bin/clang[+][+]"
fortran: ".*/bin/flang"
# `~` and other weird characters in the version string
- layout:
- executables:

View File

@@ -801,7 +801,7 @@ def determine_version(cls, exe):
def determine_variants(cls, exes, version_str):
# Do not need to reuse more general logic from CompilerPackage
# because LLVM has kindly named compilers
variants, compilers = ["+clang"], {}
variants, compilers = {"+clang"}, {}
lld_found, lldb_found = False, False
for exe in sorted(exes, key=len):
name = os.path.basename(exe)
@@ -809,18 +809,18 @@ def determine_variants(cls, exes, version_str):
compilers.setdefault("cxx", exe)
elif "clang" in name:
compilers.setdefault("c", exe)
elif "flang" in name:
variants.append("+flang")
elif "flang" in name and "fortran" not in compilers:
variants.add("+flang")
compilers.setdefault("fortran", exe)
elif "ld.lld" in name:
lld_found = True
elif "lldb" in name:
lldb_found = True
variants.append("+lld" if lld_found else "~lld")
variants.append("+lldb" if lldb_found else "~lldb")
variants.add("+lld" if lld_found else "~lld")
variants.add("+lldb" if lldb_found else "~lldb")
return "".join(variants), {"compilers": compilers}
return "".join(sorted(variants)), {"compilers": compilers}
@classmethod
def validate_detected_spec(cls, spec, extra_attributes):

View File

@@ -30,6 +30,9 @@ class Lorene(MakefilePackage):
description="Build Bin_star solver for binary neutron star systems",
)
depends_on("cxx", type="build")
depends_on("fortran", type="build")
depends_on("blas")
depends_on("fftw @3:", when="+fftw")
depends_on("gsl")

View File

@@ -19,6 +19,9 @@ class Mapsplice2(MakefilePackage):
patch("Makefile.patch")
patch("mapsplice_ebwt.patch")
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("bowtie")
depends_on("ncurses", type="link")
depends_on("samtools", type="link")

View File

@@ -13,6 +13,8 @@ class Mdspan(CMakePackage):
url = "https://github.com/kokkos/mdspan/archive/refs/tags/mdspan-0.6.0.zip"
git = "https://github.com/kokkos/mdspan.git"
maintainers("tpadioleau", "nmm0")
version("stable", branch="stable")
version("0.6.0", sha256="d6b7b9d4f472106df1d28729bd8383a8a7ea7938adf9f82d3be9c151344830d9")

View File

@@ -59,6 +59,7 @@ class Mpitrampoline(CMakePackage):
version("1.0.1", sha256="4ce91b99fb6d2dab481b5e477b6b6a0709add48cf0f287afbbb440fdf3232500")
depends_on("c", type="build") # generated
depends_on("cxx", type="build")
depends_on("fortran", type="build") # generated
variant("shared", default=True, description="Build a shared version of the library")

View File

@@ -19,7 +19,9 @@ class Mptensor(CMakePackage):
variant("mpi", default=False, description="Build with MPI library")
variant("doc", default=False, description="build documentation with Doxygen")
depends_on("c", type="build")
depends_on("cxx", type="build") # generated
depends_on("fortran", type="build")
depends_on("cmake@3.6:", type="build")
depends_on("mpi", when="+mpi")

View File

@@ -28,6 +28,8 @@ class Msmpi(Package):
provides("mpi")
depends_on("c", type="build")
depends_on("win-wdk")
patch("ifort_compat.patch")

View File

@@ -30,6 +30,8 @@ class Mumax(MakefilePackage, CudaPackage):
variant("cuda", default=True, description="Use CUDA; must be true")
variant("gnuplot", default=False, description="Use gnuplot for graphs")
depends_on("c", type="build")
depends_on("cuda")
depends_on("go", type="build")
depends_on("gnuplot", type="run", when="+gnuplot")

View File

@@ -99,6 +99,9 @@ class Namd(MakefilePackage, CudaPackage, ROCmPackage):
# Handle change in python-config for python@3.8:
patch("namd-python38.patch", when="interface=python ^python@3.8:")
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("charmpp@7.0.0:", when="@3.0:")
depends_on("charmpp@6.10.1:6", when="@2.14:2")
depends_on("charmpp@6.8.2", when="@2.13")

View File

@@ -19,6 +19,8 @@ class NnC(AutotoolsPackage):
variant("pic", default=True, description="Produce position-independent code (for shared libs)")
depends_on("c", type="build") # generated
depends_on("cxx", type="build")
depends_on("fortran", type="build")
configure_directory = "nn"

View File

@@ -23,6 +23,8 @@ class Openfdtd(MakefilePackage):
variant("mpi", default=False, description="Build with MPI Support")
depends_on("c", type="build")
depends_on("mpi", when="+mpi")
def url_for_version(self, version):

View File

@@ -82,6 +82,7 @@ class Openssl(Package): # Uses Fake Autotools, should subclass Package
variant("dynamic", default=False, description="Link with MSVC's dynamic runtime library")
depends_on("c", type="build") # generated
depends_on("cxx", type="build")
depends_on("zlib-api")
depends_on("perl@5.14.0:", type=("build", "test"))

View File

@@ -22,6 +22,8 @@ class Openstf(MakefilePackage):
variant("mpi", default=False, description="Build with MPI Support")
depends_on("c", type="build")
depends_on("mpi", when="+mpi")
def edit(self, spec, prefix):

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