Compare commits

...

64 Commits

Author SHA1 Message Date
Wouter Deconinck
06dbda7465 Revert "Ensure if TCL is already sourced on the system the lib paths don't in…"
This reverts commit aa86342814.
2025-03-06 18:50:57 -06:00
Chris White
ca977ea9e1 Fix missing hipBlas symbol (#49298)
Co-authored-by: Eric B. Chin <chin23@llnl.gov>
Co-authored-by: Greg Becker <becker33@llnl.gov>
2025-03-06 13:43:18 -08:00
Robert Maaskant
0d2c624bcb glib: add v2.82.5 (#49281) 2025-03-06 17:49:14 +01:00
Alec Scott
765b6b7150 py-aiojobs: new-package (#49329)
* py-aiojobs: new-package

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

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

* Fix minimum required python dependency based on feedback

---------

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

* Use tag on main branch

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-05 22:34:49 -06:00
Wouter Deconinck
693376ea97 qt-*: add v6.8.2 (#49320) 2025-03-05 20:03:34 -07:00
Massimiliano Culpo
88bf2a8bcf globalarrays: add unconditional dep on C++ (#49317)
See https://gitlab.spack.io/spack/spack/-/jobs/15482194

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

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

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

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

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

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

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

* geomodel: support Qt6

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

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

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

---------

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

* typo

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

* Add me as maintainer

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

* refine depends_on and remove redundant version info

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

* veccore: apply ScalarWrapper.h patch for all compilers

---------

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

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

* Fixing new unit test for env repo var substitution

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

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

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

* Environment variables no longer needed either

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-03 19:18:42 -06:00
dependabot[bot]
2f8dcb8097 build(deps): bump python-levenshtein in /lib/spack/docs (#49269)
Bumps [python-levenshtein](https://github.com/rapidfuzz/python-Levenshtein) from 0.26.1 to 0.27.1.
- [Release notes](https://github.com/rapidfuzz/python-Levenshtein/releases)
- [Changelog](https://github.com/rapidfuzz/python-Levenshtein/blob/main/HISTORY.md)
- [Commits](https://github.com/rapidfuzz/python-Levenshtein/compare/v0.26.1...v0.27.1)

---
updated-dependencies:
- dependency-name: python-levenshtein
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-03 19:17:48 -06:00
dependabot[bot]
5b70fa8cc8 build(deps): bump sphinx from 8.2.1 to 8.2.3 in /lib/spack/docs (#49270)
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 8.2.1 to 8.2.3.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst)
- [Commits](https://github.com/sphinx-doc/sphinx/compare/v8.2.1...v8.2.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-03 19:17:08 -06:00
Adam J. Stewart
b4025e89ed py-torchmetrics: add v1.6.2 (#49262) 2025-03-03 19:15:49 -06:00
Eric Berquist
8db74e1b2f tmux: add 3.5a, 3.5, and 3.3 (#49259)
* tmux: add 3.5a, 3.5, and 3.3

* tmux: patch is in releases from 3.5 onward

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

* qwt: fix style

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

* visit: patch for missing cmath include

---------

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

* add new versions

* convert more conditionals to spec.satisfies

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

* [@spackbot] updating style on behalf of PhilipFackler

* Removing redundant text

* Add blank line

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

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

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

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

* Switch to CudaPackage and remove source dir from runtime env

* [@spackbot] updating style on behalf of PhilipFackler

---------

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

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

---------

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-01 08:18:06 -07:00
dependabot[bot]
ccca0d3354 build(deps): bump isort from 6.0.0 to 6.0.1 in /lib/spack/docs (#49213)
Bumps [isort](https://github.com/PyCQA/isort) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/PyCQA/isort/releases)
- [Changelog](https://github.com/PyCQA/isort/blob/main/CHANGELOG.md)
- [Commits](https://github.com/PyCQA/isort/compare/6.0.0...6.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-01 08:17:39 -07:00
HELICS-bot
9699bbc7b9 helics: Add version 3.6.1 (#49231)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-01 08:16:21 -07:00
Raffaele Solcà
c7e251de9f Add dla-future v0.8.0 (#49235) 2025-03-01 08:14:52 -07:00
Robert Maaskant
d788b15529 libmd: add version 1.1.0 (#49239)
Release notes can be read at https://archive.hadrons.org/software/libmd/libmd-1.1.0.announce
2025-03-01 08:11:12 -07:00
96 changed files with 781 additions and 1173 deletions

View File

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

1
.gitignore vendored
View File

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

View File

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

View File

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

View File

@@ -389,6 +389,7 @@ def create_in_dir(
# dev paths in this environment to refer to their original
# locations.
_rewrite_relative_dev_paths_on_relocation(env, init_file_dir)
_rewrite_relative_repos_paths_on_relocation(env, init_file_dir)
return env
@@ -405,8 +406,8 @@ def _rewrite_relative_dev_paths_on_relocation(env, init_file_dir):
dev_path = substitute_path_variables(entry["path"])
expanded_path = spack.util.path.canonicalize_path(dev_path, default_wd=init_file_dir)
# Skip if the expanded path is the same (e.g. when absolute)
if dev_path == expanded_path:
# Skip if the substituted and expanded path is the same (e.g. when absolute)
if entry["path"] == expanded_path:
continue
tty.debug("Expanding develop path for {0} to {1}".format(name, expanded_path))
@@ -421,6 +422,34 @@ def _rewrite_relative_dev_paths_on_relocation(env, init_file_dir):
env._re_read()
def _rewrite_relative_repos_paths_on_relocation(env, init_file_dir):
"""When initializing the environment from a manifest file and we plan
to store the environment in a different directory, we have to rewrite
relative repo paths to absolute ones and expand environment variables."""
with env:
repos_specs = spack.config.get("repos", default={}, scope=env.scope_name)
if not repos_specs:
return
for i, entry in enumerate(repos_specs):
repo_path = substitute_path_variables(entry)
expanded_path = spack.util.path.canonicalize_path(repo_path, default_wd=init_file_dir)
# Skip if the substituted and expanded path is the same (e.g. when absolute)
if entry == expanded_path:
continue
tty.debug("Expanding repo path for {0} to {1}".format(entry, expanded_path))
repos_specs[i] = expanded_path
spack.config.set("repos", repos_specs, scope=env.scope_name)
env.repos_specs = None
# If we changed the environment's spack.yaml scope, that will not be reflected
# in the manifest that we read
env._re_read()
def environment_dir_from_name(name: str, exists_ok: bool = True) -> str:
"""Returns the directory associated with a named environment.

View File

@@ -32,6 +32,7 @@
import llnl.util.tty as tty
from llnl.util.filesystem import working_dir
import spack
import spack.caches
import spack.config
import spack.error
@@ -49,6 +50,8 @@
#: Package modules are imported as spack.pkg.<repo-namespace>.<pkg-name>
ROOT_PYTHON_NAMESPACE = "spack.pkg"
_API_REGEX = re.compile(r"^v(\d+)\.(\d+)$")
def python_package_for_repo(namespace):
"""Returns the full namespace of a repository, given its relative one
@@ -909,19 +912,52 @@ def __reduce__(self):
return RepoPath.unmarshal, self.marshal()
def _parse_package_api_version(
config: Dict[str, Any],
min_api: Tuple[int, int] = spack.min_package_api_version,
max_api: Tuple[int, int] = spack.package_api_version,
) -> Tuple[int, int]:
api = config.get("api")
if api is None:
package_api = (1, 0)
else:
if not isinstance(api, str):
raise BadRepoError(f"Invalid Package API version '{api}'. Must be of the form vX.Y")
api_match = _API_REGEX.match(api)
if api_match is None:
raise BadRepoError(f"Invalid Package API version '{api}'. Must be of the form vX.Y")
package_api = (int(api_match.group(1)), int(api_match.group(2)))
if min_api <= package_api <= max_api:
return package_api
min_str = ".".join(str(i) for i in min_api)
max_str = ".".join(str(i) for i in max_api)
curr_str = ".".join(str(i) for i in package_api)
raise BadRepoError(
f"Package API v{curr_str} is not supported by this version of Spack ("
f"must be between v{min_str} and v{max_str})"
)
class Repo:
"""Class representing a package repository in the filesystem.
Each package repository must have a top-level configuration file
called `repo.yaml`.
Each package repository must have a top-level configuration file called `repo.yaml`.
Currently, `repo.yaml` must define:
It contains the following keys:
`namespace`:
A Python namespace where the repository's packages should live.
`subdirectory`:
An optional subdirectory name where packages are placed
`api`:
A string of the form vX.Y that indicates the Package API version. The default is "v1.0".
For the repo to be compatible with the current version of Spack, the version must be
greater than or equal to :py:data:`spack.min_package_api_version` and less than or equal to
:py:data:`spack.package_api_version`.
"""
def __init__(
@@ -958,7 +994,7 @@ def check(condition, msg):
f"{os.path.join(root, repo_config_name)} must define a namespace.",
)
self.namespace = config["namespace"]
self.namespace: str = config["namespace"]
check(
re.match(r"[a-zA-Z][a-zA-Z0-9_.]+", self.namespace),
f"Invalid namespace '{self.namespace}' in repo '{self.root}'. "
@@ -971,12 +1007,14 @@ def check(condition, msg):
# Keep name components around for checking prefixes.
self._names = self.full_namespace.split(".")
packages_dir = config.get("subdirectory", packages_dir_name)
packages_dir: str = config.get("subdirectory", packages_dir_name)
self.packages_path = os.path.join(self.root, packages_dir)
check(
os.path.isdir(self.packages_path), f"No directory '{packages_dir}' found in '{root}'"
)
self.package_api = _parse_package_api_version(config)
# Class attribute overrides by package name
self.overrides = overrides or {}
@@ -1026,7 +1064,7 @@ def is_prefix(self, fullname: str) -> bool:
parts = fullname.split(".")
return self._names[: len(parts)] == parts
def _read_config(self) -> Dict[str, str]:
def _read_config(self) -> Dict[str, Any]:
"""Check for a YAML config file in this db's root directory."""
try:
with open(self.config_file, encoding="utf-8") as reponame_file:

View File

@@ -569,7 +569,6 @@ def test_FetchCacheError_only_accepts_lists_of_errors():
def test_FetchCacheError_pretty_printing_multiple():
e = bindist.FetchCacheError([RuntimeError("Oops!"), TypeError("Trouble!")])
str_e = str(e)
print("'" + str_e + "'")
assert "Multiple errors" in str_e
assert "Error 1: RuntimeError: Oops!" in str_e
assert "Error 2: TypeError: Trouble!" in str_e

View File

@@ -210,7 +210,6 @@ def check_args_contents(cc, args, must_contain, must_not_contain):
"""
with set_env(SPACK_TEST_COMMAND="dump-args"):
cc_modified_args = cc(*args, output=str).strip().split("\n")
print(cc_modified_args)
for a in must_contain:
assert a in cc_modified_args
for a in must_not_contain:

View File

@@ -347,7 +347,6 @@ def test_get_spec_filter_list(mutable_mock_env_path, mutable_mock_repo):
for key, val in expectations.items():
affected_specs = ci.get_spec_filter_list(e1, touched, dependent_traverse_depth=key)
affected_pkg_names = set([s.name for s in affected_specs])
print(f"{key}: {affected_pkg_names}")
assert affected_pkg_names == val

View File

@@ -214,9 +214,7 @@ def verify_mirror_contents():
if in_env_pkg in p:
found_pkg = True
if not found_pkg:
print("Expected to find {0} in {1}".format(in_env_pkg, dest_mirror_dir))
assert False
assert found_pkg, f"Expected to find {in_env_pkg} in {dest_mirror_dir}"
# Install a package and put it in the buildcache
s = spack.concretize.concretize_one(out_env_pkg)

View File

@@ -898,7 +898,6 @@ def test_cdash_configure_warning(tmpdir, mock_fetch, install_mockery, capfd):
specfile = "./spec.json"
with open(specfile, "w", encoding="utf-8") as f:
f.write(spec.to_json())
print(spec.to_json())
install("--log-file=cdash_reports", "--log-format=cdash", specfile)
# Verify Configure.xml exists with expected contents.
report_dir = tmpdir.join("cdash_reports")

View File

@@ -5,9 +5,13 @@
import pytest
import spack.config
import spack.environment as ev
import spack.main
from spack.main import SpackCommand
repo = spack.main.SpackCommand("repo")
env = SpackCommand("env")
def test_help_option():
@@ -33,3 +37,33 @@ def test_create_add_list_remove(mutable_config, tmpdir):
repo("remove", "--scope=site", str(tmpdir))
output = repo("list", "--scope=site", output=str)
assert "mockrepo" not in output
def test_env_repo_path_vars_substitution(
tmpdir, install_mockery, mutable_mock_env_path, monkeypatch
):
"""Test Spack correctly substitues repo paths with environment variables when creating an
environment from a manifest file."""
monkeypatch.setenv("CUSTOM_REPO_PATH", ".")
# setup environment from spack.yaml
envdir = tmpdir.mkdir("env")
with envdir.as_cwd():
with open("spack.yaml", "w", encoding="utf-8") as f:
f.write(
"""\
spack:
specs: []
repos:
- $CUSTOM_REPO_PATH
"""
)
# creating env from manifest file
env("create", "test", "./spack.yaml")
# check that repo path was correctly substituted with the environment variable
current_dir = os.getcwd()
with ev.read("test") as newenv:
repos_specs = spack.config.get("repos", default={}, scope=newenv.scope_name)
assert current_dir in repos_specs

View File

@@ -50,7 +50,7 @@ def test_list_long(capsys):
def test_list_long_with_pytest_arg(capsys):
with capsys.disabled():
output = spack_test("--list-long", cmd_test_py)
print(output)
assert "unit_test.py::\n" in output
assert "test_list" in output
assert "test_list_with_pytest_arg" in output

View File

@@ -49,7 +49,6 @@ def test_single_file_verify_cmd(tmpdir):
sjson.dump({filepath: data}, f)
results = verify("manifest", "-f", filepath, fail_on_error=False)
print(results)
assert not results
os.utime(filepath, (0, 0))

View File

@@ -2018,7 +2018,6 @@ def test_git_ref_version_is_equivalent_to_specified_version(self, git_ref):
s = Spec("develop-branch-version@git.%s=develop" % git_ref)
c = spack.concretize.concretize_one(s)
assert git_ref in str(c)
print(str(c))
assert s.satisfies("@develop")
assert s.satisfies("@0.1:")

View File

@@ -2148,7 +2148,6 @@ def _c_compiler_always_exists():
@pytest.fixture(scope="session")
def mock_test_cache(tmp_path_factory):
cache_dir = tmp_path_factory.mktemp("cache")
print(cache_dir)
return spack.util.file_cache.FileCache(cache_dir)

View File

@@ -977,7 +977,6 @@ class MyBuildException(Exception):
def _install_fail_my_build_exception(installer, task, install_status, **kwargs):
print(task, task.pkg.name)
if task.pkg.name == "pkg-a":
raise MyBuildException("mock internal package build error for pkg-a")
else:

View File

@@ -319,3 +319,48 @@ def test_get_repo(self, mock_test_cache):
# foo is not there, raise
with pytest.raises(spack.repo.UnknownNamespaceError):
repo.get_repo("foo")
def test_parse_package_api_version():
"""Test that we raise an error if a repository has a version that is not supported."""
# valid version
assert spack.repo._parse_package_api_version(
{"api": "v1.2"}, min_api=(1, 0), max_api=(2, 3)
) == (1, 2)
# too new and too old
with pytest.raises(
spack.repo.BadRepoError,
match=r"Package API v2.4 is not supported .* \(must be between v1.0 and v2.3\)",
):
spack.repo._parse_package_api_version({"api": "v2.4"}, min_api=(1, 0), max_api=(2, 3))
with pytest.raises(
spack.repo.BadRepoError,
match=r"Package API v0.9 is not supported .* \(must be between v1.0 and v2.3\)",
):
spack.repo._parse_package_api_version({"api": "v0.9"}, min_api=(1, 0), max_api=(2, 3))
# default to v1.0 if not specified
assert spack.repo._parse_package_api_version({}, min_api=(1, 0), max_api=(2, 3)) == (1, 0)
# if v1.0 support is dropped we should also raise
with pytest.raises(
spack.repo.BadRepoError,
match=r"Package API v1.0 is not supported .* \(must be between v2.0 and v2.3\)",
):
spack.repo._parse_package_api_version({}, min_api=(2, 0), max_api=(2, 3))
# finally test invalid input
with pytest.raises(spack.repo.BadRepoError, match="Invalid Package API version"):
spack.repo._parse_package_api_version({"api": "v2"}, min_api=(1, 0), max_api=(3, 3))
with pytest.raises(spack.repo.BadRepoError, match="Invalid Package API version"):
spack.repo._parse_package_api_version({"api": 2.0}, min_api=(1, 0), max_api=(3, 3))
def test_repo_package_api_version(tmp_path: pathlib.Path):
"""Test that we can specify the API version of a repository."""
(tmp_path / "example" / "packages").mkdir(parents=True)
(tmp_path / "example" / "repo.yaml").write_text(
"""\
repo:
namespace: example
"""
)
cache = spack.util.file_cache.FileCache(tmp_path / "cache")
assert spack.repo.Repo(str(tmp_path / "example"), cache=cache).package_api == (1, 0)

View File

@@ -27,9 +27,7 @@ def check_spliced_spec_prefixes(spliced_spec):
text_file_path = os.path.join(node.prefix, node.name)
with open(text_file_path, "r", encoding="utf-8") as f:
text = f.read()
print(text)
for modded_spec in node.traverse(root=True, deptype=dt.ALL & ~dt.BUILD):
print(modded_spec)
assert modded_spec.prefix in text

View File

@@ -149,11 +149,8 @@ def test_reverse_environment_modifications(working_env):
os.environ.clear()
os.environ.update(start_env)
print(os.environ)
to_reverse.apply_modifications()
print(os.environ)
reversal.apply_modifications()
print(os.environ)
start_env.pop("UNSET")
assert os.environ == start_env

View File

@@ -257,7 +257,6 @@ def test_core_lib_files():
names.append(os.path.join(test_dir, n))
for filename in names:
print("Testing %s" % filename)
source = read_pyfile(filename)
check_ast_roundtrip(source)

View File

@@ -20,8 +20,9 @@ ci:
- k=$CI_GPG_KEY_ROOT/intermediate_ci_signing_key.gpg; [[ -r $k ]] && spack gpg trust $k
- k=$CI_GPG_KEY_ROOT/spack_public_key.gpg; [[ -r $k ]] && spack gpg trust $k
script::
- - spack config blame mirrors
- spack --color=always --backtrace ci rebuild -j ${SPACK_BUILD_JOBS} --tests > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2)
- - if [ -n "$SPACK_EXTRA_MIRROR" ]; then spack mirror add local "$SPACK_EXTRA_MIRROR"; fi
- spack config blame mirrors
- - spack --color=always --backtrace ci rebuild -j ${SPACK_BUILD_JOBS} --tests > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2)
after_script:
- - cat /proc/loadavg || true
- cat /proc/meminfo | grep 'MemTotal\|MemFree' || true

View File

@@ -28,6 +28,7 @@ class Abinit(AutotoolsPackage):
license("Apache-2.0")
maintainers("downloadico")
version("10.2.7", sha256="e0e1049b01b4ebaec29be632cd554caeccb4b2a8acf2e148c8ac505e6b226dc1")
version("10.0.9", sha256="17650580295e07895f6c3c4b1f3f0fe0e0f3fea9bab5fd8ce7035b16a62f8e5e")
version("10.0.7", sha256="a9fc044b33861b7defd50fafd19a73eb6f225e18ae30b23bc731d9c8009c881c")
version("9.10.5", sha256="a9e0f0e058baa6088ea93d26ada369ccf0fe52dc9d4a865b1c38c20620148cd5")
@@ -76,13 +77,22 @@ class Abinit(AutotoolsPackage):
depends_on("fftw-api")
depends_on("netcdf-fortran")
depends_on("netcdf-c+mpi", when="+mpi")
depends_on("netcdf-c~mpi", when="~mpi")
depends_on("hdf5+mpi", when="+mpi")
depends_on("hdf5~mpi", when="~mpi")
with when("+mpi"):
depends_on("netcdf-c+mpi")
depends_on("hdf5+mpi")
depends_on("wannier90+shared", when="+wannier90")
with when("~mpi"):
depends_on("netcdf-c~mpi")
depends_on("hdf5~mpi")
# Cannot ask for +scalapack if it does not depend on MPI
conflicts("+scalapack")
# Cannot ask for +wannier90 if it does not depend on MPI
conflicts("+wannier90")
# constrain version of hdf5
depends_on("hdf5@:1.8", when="@9:")
depends_on("wannier90+shared", when="+wannier90+mpi")
# constrain libxc version
depends_on("libxc")
@@ -93,15 +103,8 @@ class Abinit(AutotoolsPackage):
depends_on("libxml2", when="@9:+libxml2")
# If the Intel suite is used for Lapack, it must be used for fftw and vice-versa
for _intel_pkg in INTEL_MATH_LIBRARIES:
requires(f"^[virtuals=fftw-api] {_intel_pkg}", when=f"^[virtuals=lapack] {_intel_pkg}")
requires(f"^[virtuals=lapack] {_intel_pkg}", when=f"^[virtuals=fftw-api] {_intel_pkg}")
# Cannot ask for +scalapack if it does not depend on MPI
conflicts("+scalapack", when="~mpi")
# Cannot ask for +wannier90 if it does not depend on MPI
conflicts("+wannier90", when="~mpi")
requires("^[virtuals=fftw-api] intel-oneapi-mkl", when="^[virtuals=lapack] intel-oneapi-mkl")
requires("^[virtuals=lapack] intel-oneapi-mkl", when="^[virtuals=fftw-api] intel-oneapi-mkl")
# libxml2 needs version 9 and above
conflicts("+libxml2", when="@:8")
@@ -115,10 +118,8 @@ class Abinit(AutotoolsPackage):
for fftw in ["amdfftw", "cray-fftw", "fujitsu-fftw", "fftw"]:
conflicts("+openmp", when=f"^{fftw}~openmp", msg=f"Need to request {fftw} +openmp")
mkl_message = "Need to set dependent variant to threads=openmp"
conflicts("+openmp", when="^intel-mkl threads=none", msg=mkl_message)
conflicts("+openmp", when="^intel-mkl threads=tbb", msg=mkl_message)
conflicts("+openmp", when="^intel-parallel-studio +mkl threads=none", msg=mkl_message)
with when("+openmp"):
requires("^intel-oneapi-mkl threads=openmp", when="^[virtuals=lapack] intel-oneapi-mkl")
conflicts(
"+openmp", when="^fujitsu-ssl2 ~parallel", msg="Need to request fujitsu-ssl2 +parallel"
@@ -139,9 +140,7 @@ class Abinit(AutotoolsPackage):
def configure_args(self):
spec = self.spec
options = []
options += self.with_or_without("libxml2")
options = self.with_or_without("libxml2")
oapp = options.append
if spec.satisfies("@:8"):

View File

@@ -40,6 +40,7 @@ class Acts(CMakePackage, CudaPackage):
# Supported Acts versions
version("main", branch="main")
version("master", branch="main", deprecated=True) # For compatibility
version("39.2.0", commit="94cf48783efd713f38106b18211d1c59f4e8cdec", submodules=True)
version("39.1.0", commit="09225b0d0bba24d57a696e347e3027b39404bb75", submodules=True)
version("39.0.0", commit="b055202e2fbdd509bc186eb4782714bc46f38f3f", submodules=True)
version("38.2.0", commit="9cb8f4494656553fd9b85955938b79b2fac4c9b0", submodules=True)

View File

@@ -25,6 +25,7 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage):
license("BSD-3-Clause")
version("develop", branch="development")
version("25.03", sha256="7a2dc60d01619afdcbce0ff624a3c1a5a605e28dd8721c0fbec638076228cab0")
version("25.02", sha256="2680a5a9afba04e211cd48d27799c5a25abbb36c6c3d2b6c13cd4757c7176b23")
version("25.01", sha256="29eb35cf67d66b0fd0654282454c210abfadf27fcff8478b256e3196f237c74f")
version("24.12", sha256="ca4b41ac73fabb9cf3600b530c9823eb3625f337d9b7b9699c1089e81c67fc67")
@@ -137,7 +138,8 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage):
)
variant("eb", default=True, description="Build Embedded Boundary classes", when="@24.10:")
variant("eb", default=False, description="Build Embedded Boundary classes", when="@:24.09")
variant("fft", default=False, description="Build FFT support", when="@24.11:")
variant("fft", default=True, description="Build FFT support", when="@25.03:")
variant("fft", default=False, description="Build FFT support", when="@24.11:25.02")
variant("fortran", default=False, description="Build Fortran API")
variant("linear_solvers", default=True, description="Build linear solvers")
variant("amrdata", default=False, description="Build data services")

View File

@@ -41,6 +41,7 @@ class ArpackNg(CMakePackage, AutotoolsPackage):
build_system("cmake", "autotools", default="cmake")
version("develop", branch="master")
version("3.9.1", sha256="f6641deb07fa69165b7815de9008af3ea47eb39b2bb97521fbf74c97aba6e844")
version("3.9.0", sha256="24f2a2b259992d3c797d80f626878aa8e2ed5009d549dad57854bbcfb95e1ed0")
version("3.8.0", sha256="ada5aeb3878874383307239c9235b716a8a170c6d096a6625bfd529844df003d")
version("3.7.0", sha256="972e3fc3cd0b9d6b5a737c9bf6fd07515c0d6549319d4ffb06970e64fa3cc2d6")
@@ -49,11 +50,6 @@ class ArpackNg(CMakePackage, AutotoolsPackage):
version("3.6.0", sha256="3c88e74cc10bba81dc2c72c4f5fff38a800beebaa0b4c64d321c28c9203b37ea")
version("3.5.0", sha256="50f7a3e3aec2e08e732a487919262238f8504c3ef927246ec3495617dde81239")
version("3.4.0", sha256="69e9fa08bacb2475e636da05a6c222b17c67f1ebeab3793762062248dd9d842f")
version(
"3.3.0",
sha256="ad59811e7d79d50b8ba19fd908f92a3683d883597b2c7759fdcc38f6311fe5b3",
deprecated=True,
)
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
@@ -63,11 +59,6 @@ class ArpackNg(CMakePackage, AutotoolsPackage):
variant("mpi", default=True, description="Activates MPI support")
variant("icb", default=False, when="@3.6:", description="Activates iso_c_binding support")
# The function pdlamch10 does not set the return variable.
# This is fixed upstream
# see https://github.com/opencollab/arpack-ng/issues/34
patch("pdlamch10.patch", when="@3.3.0")
patch("make_install.patch", when="@3.4.0")
patch("parpack_cmake.patch", when="@3.4.0")
@@ -100,17 +91,13 @@ def flag_handler(self, name, flags):
if self.spec.satisfies("%cce"):
flags.append("-hnopattern")
return (flags, None, None)
return flags, None, None
@property
def libs(self):
# TODO: do we need spec['arpack-ng:parallel'].libs ?
# query_parameters = self.spec.last_query.extra_parameters
libraries = ["libarpack"]
if self.spec.satisfies("+mpi"):
libraries = ["libparpack"] + libraries
return find_libraries(libraries, root=self.prefix, shared=True, recursive=True)
@@ -136,10 +123,8 @@ def cmake_args(self):
]
# If 64-bit BLAS is used:
if (
spec.satisfies("^openblas+ilp64")
or spec.satisfies("^intel-mkl+ilp64")
or spec.satisfies("^intel-parallel-studio+mkl+ilp64")
if spec.satisfies("^[virtuals=lapack] openblas+ilp64") or spec.satisfies(
"^[virtuals=lapack] intel-oneapi-mkl+ilp64"
):
options.append("-DINTERFACE64=1")

View File

@@ -1,15 +0,0 @@
diff --git a/PARPACK/SRC/MPI/pdlamch10.f b/PARPACK/SRC/MPI/pdlamch10.f
index 6571da9..2882c2e 100644
--- a/PARPACK/SRC/MPI/pdlamch10.f
+++ b/PARPACK/SRC/MPI/pdlamch10.f
@@ -86,8 +86,8 @@
TEMP = TEMP1
END IF
*
- PDLAMCH = TEMP
+ PDLAMCH10 = TEMP
*
-* End of PDLAMCH
+* End of PDLAMCH10
*
END

View File

@@ -16,6 +16,7 @@ class Arrow(CMakePackage, CudaPackage):
license("Apache-2.0")
version("19.0.1", sha256="4c898504958841cc86b6f8710ecb2919f96b5e10fa8989ac10ac4fca8362d86a")
version("18.0.0", sha256="9c473f2c9914c59ab571761c9497cf0e5cfd3ea335f7782ccc6121f5cb99ae9b")
version("16.1.0", sha256="9762d9ecc13d09de2a03f9c625a74db0d645cb012de1e9a10dfed0b4ddc09524")
version("15.0.2", sha256="4735b349845bff1fe95ed11abbfed204eb092cabc37523aa13a80cb830fe5b5e")
@@ -41,8 +42,8 @@ class Arrow(CMakePackage, CudaPackage):
version("0.9.0", sha256="65f89a3910b6df02ac71e4d4283db9b02c5b3f1e627346c7b6a5982ae994af91")
version("0.8.0", sha256="c61a60c298c30546fc0b418a35be66ef330fb81b06c49928acca7f1a34671d54")
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("boost@1.60: +filesystem +system")
depends_on("brotli", when="+brotli")
@@ -95,6 +96,7 @@ class Arrow(CMakePackage, CudaPackage):
variant(
"compute", default=False, description="Computational kernel functions and other support"
)
variant("dataset", default=False, description="Build the Arrow Dataset integration")
variant("gandiva", default=False, description="Build Gandiva support")
variant(
"glog",
@@ -156,6 +158,7 @@ def cmake_args(self):
args.append(self.define_from_variant("ARROW_COMPUTE", "compute"))
args.append(self.define_from_variant("ARROW_CUDA", "cuda"))
args.append(self.define_from_variant("ARROW_DATASET", "dataset"))
args.append(self.define_from_variant("ARROW_GANDIVA", "gandiva"))
args.append(self.define_from_variant("ARROW_GLOG", "glog"))
args.append(self.define_from_variant("ARROW_HDFS", "hdfs"))

View File

@@ -8,6 +8,7 @@
from os.path import join as pjoin
from spack.package import *
from spack.util.executable import which_string
def get_spec_path(spec, package_name, path_replacements={}, use_bin=False):
@@ -44,6 +45,8 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
version("main", branch="main")
version("develop", branch="develop")
version("0.10.1", tag="v0.10.1", commit="6626ee1c5668176fb64dd9a52dec3e8596b3ba6b")
version("0.10.0", tag="v0.10.0", commit="ea853a34a834415ea75f824160fc44cba9a0755d")
version("0.9.0", tag="v0.9.0", commit="5f531595d941d16fa3b8583bfc347a845d9feb6d")
version("0.8.1", tag="v0.8.1", commit="0da8a5b1be596887158ac2fcd321524ba5259e15")
version("0.8.0", tag="v0.8.0", commit="71fab3262eb7e1aa44a04c21d072b77f06362f7b")
@@ -58,9 +61,9 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
version("0.3.0", tag="v0.3.0", commit="20068ccab4b4f70055918b4f17960ec3ed6dbce8")
version("0.2.9", tag="v0.2.9", commit="9e9a54ede3326817c05f35922738516e43b5ec3d")
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
depends_on("fortran", type="build") # generated
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build", when="+fortran")
# https://github.com/spack/spack/issues/31829
patch("examples-oneapi.patch", when="@0.6.1 +examples %oneapi")
@@ -95,6 +98,8 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
description="Build with hooks for Adiak/Caliper performance analysis",
)
variant("opencascade", default=False, description="Build with opencascade")
variant("mfem", default=False, description="Build with mfem")
variant("hdf5", default=True, description="Build with hdf5")
variant("lua", default=True, description="Build with Lua")
@@ -180,6 +185,8 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
depends_on("rocprim", when="+rocm")
depends_on("opencascade", when="+opencascade")
with when("+mfem"):
depends_on("mfem+mpi", when="+mpi")
depends_on("mfem~mpi", when="~mpi")
@@ -196,7 +203,7 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
depends_on("py-sphinx")
depends_on("py-shroud")
depends_on("py-jsonschema")
depends_on("llvm+clang@10.0.0", type="build")
depends_on("llvm+clang@14", type="build")
# -----------------------------------------------------------------------
# Conflicts
@@ -213,6 +220,11 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
conflicts("+openmp", when="+rocm")
conflicts("+cuda", when="+rocm")
conflicts("~raja", when="+cuda")
conflicts("~raja", when="+rocm")
conflicts("~umpire", when="+cuda")
conflicts("~umpire", when="+rocm")
conflicts("^blt@:0.3.6", when="+rocm")
def flag_handler(self, name, flags):
@@ -277,12 +289,12 @@ def initconfig_compiler_entries(self):
else:
entries.append(cmake_cache_option("ENABLE_FORTRAN", False))
if "+cpp14" in spec and spec.satisfies("@:0.6.1"):
if spec.satisfies("+cpp14") and spec.satisfies("@:0.6.1"):
entries.append(cmake_cache_string("BLT_CXX_STD", "c++14", ""))
# Add optimization flag workaround for Debug builds with cray compiler or newer HIP
if spec.satisfies("+rocm"):
entries.append(cmake_cache_string("CMAKE_CXX_FLAGS_DEBUG", "-O1 -g -DNDEBUG"))
# Add optimization flag workaround for builds with cray compiler
if spec.satisfies("%cce"):
entries.append(cmake_cache_string("CMAKE_CXX_FLAGS_DEBUG", "-O1 -g"))
return entries
@@ -319,43 +331,40 @@ def initconfig_hardware_entries(self):
entries.append(cmake_cache_option("ENABLE_HIP", True))
hip_root = spec["hip"].prefix
rocm_root = hip_root + "/.."
rocm_root = os.path.dirname(spec["llvm-amdgpu"].prefix)
entries.append(cmake_cache_path("ROCM_PATH", rocm_root))
# Fix blt_hip getting HIP_CLANG_INCLUDE_PATH-NOTFOUND bad include directory
# TODO: verify that this is still needed and is indeed specific to LC
if (
self.spec.satisfies("%cce") or self.spec.satisfies("%clang")
) and "toss_4" in self._get_sys_type(spec):
# Set the patch version to 0 if not already
clang_version = str(self.compiler.version)[:-1] + "0"
hip_clang_include_path = (
rocm_root + "/llvm/lib/clang/" + clang_version + "/include"
)
if os.path.isdir(hip_clang_include_path):
entries.append(
cmake_cache_path("HIP_CLANG_INCLUDE_PATH", hip_clang_include_path)
)
hip_link_flags = "-L{0}/lib -Wl,-rpath,{0}/lib ".format(rocm_root)
# Recommended MPI flags
hip_link_flags += "-lxpmem "
hip_link_flags += "-L/opt/cray/pe/mpich/{0}/gtl/lib ".format(spec["mpi"].version)
hip_link_flags += "-Wl,-rpath,/opt/cray/pe/mpich/{0}/gtl/lib ".format(
spec["mpi"].version
)
hip_link_flags += "-lmpi_gtl_hsa "
# Fixes for mpi for rocm until wrapper paths are fixed
# These flags are already part of the wrapped compilers on TOSS4 systems
hip_link_flags = ""
if "+fortran" in spec and self.is_fortran_compiler("amdflang"):
if spec.satisfies("+fortran") and self.is_fortran_compiler("amdflang"):
hip_link_flags += "-Wl,--disable-new-dtags "
hip_link_flags += "-L{0}/../llvm/lib -L{0}/lib ".format(hip_root)
hip_link_flags += "-Wl,-rpath,{0}/../llvm/lib:{0}/lib ".format(hip_root)
hip_link_flags += "-lpgmath -lflang -lflangrti -lompstub -lamdhip64 "
if spec.satisfies("^hip@6.0.0:"):
hip_link_flags += "-L{0}/lib/llvm/lib -Wl,-rpath,{0}/lib/llvm/lib ".format(
rocm_root
)
else:
hip_link_flags += "-L{0}/llvm/lib -Wl,-rpath,{0}/llvm/lib ".format(rocm_root)
hip_link_flags += "-lpgmath -lflang -lflangrti -lompstub "
# Remove extra link library for crayftn
if "+fortran" in spec and self.is_fortran_compiler("crayftn"):
if spec.satisfies("+fortran") and self.is_fortran_compiler("crayftn"):
entries.append(
cmake_cache_string("BLT_CMAKE_IMPLICIT_LINK_LIBRARIES_EXCLUDE", "unwind")
)
# Additional libraries for TOSS4
hip_link_flags += " -L{0}/../lib64 -Wl,-rpath,{0}/../lib64 ".format(hip_root)
hip_link_flags += " -L{0}/../lib -Wl,-rpath,{0}/../lib ".format(hip_root)
hip_link_flags += "-lamd_comgr -lhsa-runtime64 "
hip_link_flags += "-lamdhip64 -lhsakmt -lhsa-runtime64 -lamd_comgr "
entries.append(cmake_cache_string("CMAKE_EXE_LINKER_FLAGS", hip_link_flags))
@@ -373,7 +382,7 @@ def initconfig_hardware_entries(self):
)
)
if "+fortran" in spec and self.is_fortran_compiler("xlf"):
if spec.satisfies("+fortran") and self.is_fortran_compiler("xlf"):
# Grab lib directory for the current fortran compiler
libdir = pjoin(os.path.dirname(os.path.dirname(self.compiler.fc)), "lib")
description = (
@@ -398,9 +407,9 @@ def initconfig_hardware_entries(self):
)
if (
"+openmp" in spec
spec.satisfies("+openmp")
and "clang" in self.compiler.cxx
and "+fortran" in spec
and spec.satisfies("+fortran")
and self.is_fortran_compiler("xlf")
):
openmp_gen_exp = (
@@ -453,7 +462,8 @@ def initconfig_mpi_entries(self):
mpi_exec_index = [
index for index, entry in enumerate(entries) if "MPIEXEC_EXECUTABLE" in entry
]
del entries[mpi_exec_index[0]]
if mpi_exec_index:
del entries[mpi_exec_index[0]]
entries.append(cmake_cache_path("MPIEXEC_EXECUTABLE", srun_wrapper))
else:
entries.append(cmake_cache_option("ENABLE_MPI", False))
@@ -488,8 +498,8 @@ def initconfig_package_entries(self):
entries.append(cmake_cache_path("CONDUIT_DIR", conduit_dir))
# optional tpls
for dep in ("mfem", "hdf5", "lua", "raja", "umpire"):
if "+%s" % dep in spec:
for dep in ("mfem", "hdf5", "lua", "raja", "umpire", "opencascade"):
if spec.satisfies("+%s" % dep):
dep_dir = get_spec_path(spec, dep, path_replacements)
entries.append(cmake_cache_path("%s_DIR" % dep.upper(), dep_dir))
else:
@@ -502,7 +512,7 @@ def initconfig_package_entries(self):
dep_dir = get_spec_path(spec, "caliper", path_replacements)
entries.append(cmake_cache_path("CALIPER_DIR", dep_dir))
if "+umpire" in spec and spec.satisfies("^camp"):
if spec.satisfies("+umpire") and spec.satisfies("^camp"):
dep_dir = get_spec_path(spec, "camp", path_replacements)
entries.append(cmake_cache_path("CAMP_DIR", dep_dir))
@@ -546,14 +556,14 @@ def initconfig_package_entries(self):
path2 = os.path.realpath(spec["doxygen"].prefix)
self.find_path_replacement(path1, path2, path_replacements, "DEVTOOLS_ROOT", entries)
if "+devtools" in spec and spec.satisfies("^llvm"):
if spec.satisfies("+devtools") and spec.satisfies("^llvm"):
clang_fmt_path = spec["llvm"].prefix.bin.join("clang-format")
entries.append(cmake_cache_path("CLANGFORMAT_EXECUTABLE", clang_fmt_path))
else:
entries.append("# ClangFormat disabled due to llvm and devtools not in spec\n")
entries.append(cmake_cache_option("ENABLE_CLANGFORMAT", False))
if "+python" in spec or "+devtools" in spec:
if spec.satisfies("+python") or spec.satisfies("+devtools"):
python_path = os.path.realpath(spec["python"].command.path)
for key in path_replacements:
python_path = python_path.replace(key, path_replacements[key])
@@ -599,6 +609,8 @@ def cmake_args(self):
options.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
options.append(self.define_from_variant("AXOM_ENABLE_EXAMPLES", "examples"))
options.append(self.define_from_variant("AXOM_ENABLE_TOOLS", "tools"))
if self.spec.satisfies("~raja") or self.spec.satisfies("+umpire"):
options.append("-DAXOM_ENABLE_MIR:BOOL=OFF")
return options

View File

@@ -136,6 +136,15 @@ def cmake_args(self):
args.append(self.define_from_variant("ADDRESS_SANITIZER", "asan"))
return args
def setup_build_environment(self, env):
if self.spec.satisfies("@5.7: +asan"):
env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang")
env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++")
env.set("ASAN_OPTIONS", "detect_leaks=0")
env.set("CFLAGS", "-fsanitize=address -shared-libasan")
env.set("CXXFLAGS", "-fsanitize=address -shared-libasan")
env.set("LDFLAGS", "-fuse-ld=lld")
@classmethod
def determine_version(cls, lib):
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)

View File

@@ -424,8 +424,6 @@ def hostconfig(self):
cfg.write(cmake_cache_entry("CMAKE_EXE_LINKER_FLAGS", linkerflags))
if spec.satisfies("+shared"):
cfg.write(cmake_cache_entry("CMAKE_SHARED_LINKER_FLAGS", linkerflags))
else:
cfg.write(cmake_cache_entry("CMAKE_STATIC_LINKER_FLAGS", linkerflags))
#######################
# BLT

View File

@@ -144,6 +144,13 @@ class Cp2k(MakefilePackage, CMakePackage, CudaPackage, ROCmPackage):
" conventional location. This option is only relevant when regtests need to be run.",
)
variant(
"grpp",
default=False,
description="Enable GRPP psuedo potentials",
when="@2025.2: build_system=cmake",
)
with when("+cuda"):
variant(
"cuda_arch_35_k20x",
@@ -1048,6 +1055,7 @@ def cmake_args(self):
self.define_from_variant("CP2K_ENABLE_GRID_GPU", "grid_gpu"),
self.define_from_variant("CP2K_ENABLE_DBM_GPU", "dbm_gpu"),
self.define_from_variant("CP2K_ENABLE_PW_GPU", "pw_gpu"),
self.define_from_variant("CP2K_USE_GRPP", "grpp"),
]
# we force the use elpa openmp threading support. might need to be revisited though

View File

@@ -19,6 +19,7 @@ class Detray(CMakePackage):
license("MPL-2.0", checked_by="stephenswat")
version("0.89.0", sha256="b893b7f5434c1c9951433876ef43d1db1b08d36749f062e261b4e6d48e77d5db")
version("0.88.1", sha256="89134c86c6857cb3a821181e3bb0565ebb726dd8b1245678db1681483d792cf9")
version("0.88.0", sha256="bda15501c9c96af961e24ce243982f62051c535b9fe458fb28336a19b54eb47d")
version("0.87.0", sha256="2d4a76432dd6ddbfc00b88b5d482072e471fefc264b60748bb1f9a123963576e")
@@ -75,7 +76,7 @@ class Detray(CMakePackage):
depends_on("vecmem@1.8.0:", when="@0.76:")
depends_on("covfie@0.10.0:")
depends_on("nlohmann-json@3.11.0:", when="+json")
depends_on("dfelibs@20211029:")
depends_on("dfelibs@20211029:", when="@:0.88")
depends_on("acts-algebra-plugins@0.18.0: +vecmem")
depends_on("acts-algebra-plugins +vc", when="+vc")
depends_on("acts-algebra-plugins +eigen", when="+eigen")

View File

@@ -15,6 +15,7 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage):
license("BSD-3-Clause")
version("0.8.0", sha256="4c30c33ee22417514d839a75d99ae4c24860078fb595ee24ce4ebf45fbce5e69")
version("0.7.3", sha256="8c829b72f4ea9c924abdb6fe2ac7489304be4056ab76b8eba226c33ce7b7dc0e")
version(
"0.7.1",

View File

@@ -1,22 +0,0 @@
diff --git a/cmake/configure_files/ElementalConfig.cmake.in b/cmake/configure_files/ElementalConfig.cmake.in
index d37649f..8511d81 100644
--- a/cmake/configure_files/ElementalConfig.cmake.in
+++ b/cmake/configure_files/ElementalConfig.cmake.in
@@ -1,6 +1,8 @@
set(Elemental_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include")
set(Elemental_INCLUDE_DIRS "${Elemental_INCLUDE_DIRS};@MPI_CXX_INCLUDE_PATH@")
-set(Elemental_INCLUDE_DIRS "${Elemental_INCLUDE_DIRS};@QD_INCLUDES@")
+IF(@QD_FOUND@)
+ set(Elemental_INCLUDE_DIRS "${Elemental_INCLUDE_DIRS};@QD_INCLUDES@")
+ENDIF()
set(Elemental_INCLUDE_DIRS "${Elemental_INCLUDE_DIRS};@MPC_INCLUDES@")
set(Elemental_INCLUDE_DIRS "${Elemental_INCLUDE_DIRS};@MPFR_INCLUDES@")
set(Elemental_INCLUDE_DIRS "${Elemental_INCLUDE_DIRS};@GMP_INCLUDES@")
@@ -13,6 +15,6 @@ set(Elemental_LINK_FLAGS "@EL_LINK_FLAGS@")
set(Elemental_DEFINITIONS "@Qt5Widgets_DEFINITIONS@")
# Our library dependencies (contains definitions for IMPORTED targets)
-include("@CMAKE_INSTALL_PREFIX@/CMake/ElementalTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/ElementalTargets.cmake")
set(Elemental_LIBRARIES El)

View File

@@ -1,668 +0,0 @@
diff -Naur a/include/El/blas_like/level3.hpp b/include/El/blas_like/level3.hpp
--- a/include/El/blas_like/level3.hpp 2017-06-08 07:30:43.180249917 -0700
+++ b/include/El/blas_like/level3.hpp 2017-06-08 07:35:27.325434602 -0700
@@ -31,6 +31,10 @@
}
using namespace GemmAlgorithmNS;
+void GemmUseGPU(int min_M, int min_N, int min_K);
+
+void GemmUseCPU();
+
template<typename T>
void Gemm
( Orientation orientA, Orientation orientB,
diff -Naur a/include/El/core/imports/blas.hpp b/include/El/core/imports/blas.hpp
--- a/include/El/core/imports/blas.hpp 2017-06-08 07:30:43.522016908 -0700
+++ b/include/El/core/imports/blas.hpp 2017-06-08 07:35:06.834030908 -0700
@@ -916,4 +916,63 @@
} // namespace blas
} // namespace El
+
+#if defined(EL_USE_CUBLAS)
+
+namespace El {
+
+#ifdef EL_USE_64BIT_BLAS_INTS
+typedef long long int BlasInt;
+#else
+typedef int BlasInt;
+#endif
+
+namespace cublas {
+
+// NOTE: templated routines are custom and not wrappers
+
+// Level 3 BLAS
+// ============
+template<typename T>
+void Gemm
+( char transA, char transB, BlasInt m, BlasInt n, BlasInt k,
+ const T& alpha,
+ const T* A, BlasInt ALDim,
+ const T* B, BlasInt BLDim,
+ const T& beta,
+ T* C, BlasInt CLDim );
+
+void Gemm
+( char transA, char transB, BlasInt m, BlasInt n, BlasInt k,
+ const float& alpha,
+ const float* A, BlasInt ALDim,
+ const float* B, BlasInt BLDim,
+ const float& beta,
+ float* C, BlasInt CLDim );
+void Gemm
+( char transA, char transB, BlasInt m, BlasInt n, BlasInt k,
+ const double& alpha,
+ const double* A, BlasInt ALDim,
+ const double* B, BlasInt BLDim,
+ const double& beta,
+ double* C, BlasInt CLDim );
+void Gemm
+( char transA, char transB, BlasInt m, BlasInt n, BlasInt k,
+ const scomplex& alpha,
+ const scomplex* A, BlasInt ALDim,
+ const scomplex* B, BlasInt BLDim,
+ const scomplex& beta,
+ scomplex* C, BlasInt CLDim );
+void Gemm
+( char transA, char transB, BlasInt m, BlasInt n, BlasInt k,
+ const dcomplex& alpha,
+ const dcomplex* A, BlasInt ALDim,
+ const dcomplex* B, BlasInt BLDim,
+ const dcomplex& beta,
+ dcomplex* C, BlasInt CLDim );
+
+} // namespace cublas
+} // namespace El
+#endif
+
#endif // ifndef EL_IMPORTS_BLAS_DECL_HPP
diff -Naur a/src/blas_like/level3/Gemm.cpp b/src/blas_like/level3/Gemm.cpp
--- a/src/blas_like/level3/Gemm.cpp 2017-06-08 07:30:44.307096427 -0700
+++ b/src/blas_like/level3/Gemm.cpp 2017-06-08 07:34:23.062863489 -0700
@@ -16,6 +16,20 @@
namespace El {
+char gemm_cpu_gpu_switch = 'c';
+int min_M = 0, min_N = 0, min_K = 0;
+
+void GemmUseGPU(int _min_M, int _min_N, int _min_K) {
+ gemm_cpu_gpu_switch = 'g';
+ min_M = _min_M;
+ min_N = _min_N;
+ min_K = _min_K;
+}
+
+void GemmUseCPU() {
+ gemm_cpu_gpu_switch = 'c';
+}
+
template<typename T>
void Gemm
( Orientation orientA, Orientation orientB,
@@ -59,11 +73,30 @@
const Int k = ( orientA == NORMAL ? A.Width() : A.Height() );
if( k != 0 )
{
+#if defined(EL_USE_CUBLAS)
+ if (gemm_cpu_gpu_switch == 'g' &&
+ m >= min_M &&
+ n >= min_N &&
+ k >= min_K) {
+ cublas::Gemm
+ ( transA, transB, m, n, k,
+ alpha, A.LockedBuffer(), A.LDim(),
+ B.LockedBuffer(), B.LDim(),
+ beta, C.Buffer(), C.LDim() );
+ } else {
+ blas::Gemm
+ ( transA, transB, m, n, k,
+ alpha, A.LockedBuffer(), A.LDim(),
+ B.LockedBuffer(), B.LDim(),
+ beta, C.Buffer(), C.LDim() );
+ }
+#else
blas::Gemm
( transA, transB, m, n, k,
alpha, A.LockedBuffer(), A.LDim(),
B.LockedBuffer(), B.LDim(),
beta, C.Buffer(), C.LDim() );
+#endif
}
else
{
diff -Naur a/src/core/imports/blas/Gemm.hpp b/src/core/imports/blas/Gemm.hpp
--- a/src/core/imports/blas/Gemm.hpp 2017-06-08 07:30:45.090529967 -0700
+++ b/src/core/imports/blas/Gemm.hpp 2017-06-08 07:34:46.503009958 -0700
@@ -41,6 +41,12 @@
} // extern "C"
+
+#if defined(EL_USE_CUBLAS)
+#include <cublas.h>
+#include <cub/util_allocator.cuh>
+#endif
+
namespace El {
namespace blas {
@@ -515,3 +521,515 @@
} // namespace blas
} // namespace El
+
+
+#if EL_USE_CUBLAS
+
+#define USE_CUB 1
+
+namespace El {
+namespace cublas {
+
+#if USE_CUB
+cub::CachingDeviceAllocator g_allocator(true); // Caching allocator for device memory
+#endif
+
+template<typename T>
+void Gemm
+( char transA, char transB,
+ BlasInt m, BlasInt n, BlasInt k,
+ const T& alpha,
+ const T* A, BlasInt ALDim,
+ const T* B, BlasInt BLDim,
+ const T& beta,
+ T* C, BlasInt CLDim )
+{
+ // put something here
+ printf("integer version \n");
+}
+template void Gemm
+( char transA, char transB,
+ BlasInt m, BlasInt n, BlasInt k,
+ const Int& alpha,
+ const Int* A, BlasInt ALDim,
+ const Int* B, BlasInt BLDim,
+ const Int& beta,
+ Int* C, BlasInt CLDim );
+#ifdef EL_HAVE_QD
+template void Gemm
+( char transA, char transB,
+ BlasInt m, BlasInt n, BlasInt k,
+ const DoubleDouble& alpha,
+ const DoubleDouble* A, BlasInt ALDim,
+ const DoubleDouble* B, BlasInt BLDim,
+ const DoubleDouble& beta,
+ DoubleDouble* C, BlasInt CLDim );
+template void Gemm
+( char transA, char transB,
+ BlasInt m, BlasInt n, BlasInt k,
+ const QuadDouble& alpha,
+ const QuadDouble* A, BlasInt ALDim,
+ const QuadDouble* B, BlasInt BLDim,
+ const QuadDouble& beta,
+ QuadDouble* C, BlasInt CLDim );
+template void Gemm
+( char transA, char transB,
+ BlasInt m, BlasInt n, BlasInt k,
+ const Complex<DoubleDouble>& alpha,
+ const Complex<DoubleDouble>* A, BlasInt ALDim,
+ const Complex<DoubleDouble>* B, BlasInt BLDim,
+ const Complex<DoubleDouble>& beta,
+ Complex<DoubleDouble>* C, BlasInt CLDim );
+template void Gemm
+( char transA, char transB,
+ BlasInt m, BlasInt n, BlasInt k,
+ const Complex<QuadDouble>& alpha,
+ const Complex<QuadDouble>* A, BlasInt ALDim,
+ const Complex<QuadDouble>* B, BlasInt BLDim,
+ const Complex<QuadDouble>& beta,
+ Complex<QuadDouble>* C, BlasInt CLDim );
+#endif
+#ifdef EL_HAVE_QUAD
+template void Gemm
+( char transA, char transB,
+ BlasInt m, BlasInt n, BlasInt k,
+ const Quad& alpha,
+ const Quad* A, BlasInt ALDim,
+ const Quad* B, BlasInt BLDim,
+ const Quad& beta,
+ Quad* C, BlasInt CLDim );
+template void Gemm
+( char transA, char transB,
+ BlasInt m, BlasInt n, BlasInt k,
+ const Complex<Quad>& alpha,
+ const Complex<Quad>* A, BlasInt ALDim,
+ const Complex<Quad>* B, BlasInt BLDim,
+ const Complex<Quad>& beta,
+ Complex<Quad>* C, BlasInt CLDim );
+#endif
+#ifdef EL_HAVE_MPC
+template void Gemm
+( char transA, char transB,
+ BlasInt m, BlasInt n, BlasInt k,
+ const BigInt& alpha,
+ const BigInt* A, BlasInt ALDim,
+ const BigInt* B, BlasInt BLDim,
+ const BigInt& beta,
+ BigInt* C, BlasInt CLDim );
+template void Gemm
+( char transA, char transB,
+ BlasInt m, BlasInt n, BlasInt k,
+ const BigFloat& alpha,
+ const BigFloat* A, BlasInt ALDim,
+ const BigFloat* B, BlasInt BLDim,
+ const BigFloat& beta,
+ BigFloat* C, BlasInt CLDim );
+template void Gemm
+( char transA, char transB,
+ BlasInt m, BlasInt n, BlasInt k,
+ const Complex<BigFloat>& alpha,
+ const Complex<BigFloat>* A, BlasInt ALDim,
+ const Complex<BigFloat>* B, BlasInt BLDim,
+ const Complex<BigFloat>& beta,
+ Complex<BigFloat>* C, BlasInt CLDim );
+#endif
+
+void Gemm
+( char transA, char transB,
+ BlasInt m, BlasInt n, BlasInt k,
+ const float& alpha,
+ const float* A, BlasInt ALDim,
+ const float* B, BlasInt BLDim,
+ const float& beta,
+ float* C, BlasInt CLDim )
+{
+ EL_DEBUG_CSE
+ EL_DEBUG_ONLY(
+ if( std::toupper(transA) == 'N' )
+ {
+ if( ALDim < Max(m,1) )
+ LogicError("ALDim was too small: ALDim=",ALDim,",m=",m);
+ }
+ else
+ {
+ if( ALDim < Max(k,1) )
+ LogicError("ALDim was too small: ALDim=",ALDim,",k=",k);
+ }
+
+ if( std::toupper(transB) == 'N' )
+ {
+ if( BLDim < Max(k,1) )
+ LogicError("BLDim was too small: BLDim=",BLDim,",k=",k);
+ }
+ else
+ {
+ if( BLDim < Max(n,1) )
+ LogicError("BLDim was too small: BLDim=",BLDim,",n=",n);
+ }
+
+ if( CLDim < Max(m,1) )
+ LogicError("CLDim was too small: CLDim=",CLDim,",m=",m);
+ )
+ const char fixedTransA = ( std::toupper(transA) == 'C' ? 'T' : transA );
+ const char fixedTransB = ( std::toupper(transB) == 'C' ? 'T' : transB );
+
+ const mpi::Comm comm;
+ const Int commRank = mpi::Rank( comm );
+ if (commRank == 0) {
+ //printf("calling cublas Sgemm: m %d n %d k %d\n", m, n, k);
+ }
+
+ BlasInt rowA, colA, rowB, colB, rowC, colC;
+ // device memory size for A, B and C
+ BlasInt sizeA, sizeB, sizeC;
+ float *devA=NULL, *devB=NULL, *devC=NULL;
+
+ rowA = fixedTransA == 'T' ? k : m;
+ colA = fixedTransA == 'T' ? m : k;
+ rowB = fixedTransB == 'T' ? n : k;
+ colB = fixedTransB == 'T' ? k : n;
+ rowC = m;
+ colC = n;
+ sizeA = rowA * colA;
+ sizeB = rowB * colB;
+ sizeC = rowC * colC;
+
+ cublasStatus stat;
+
+#if USE_CUB
+ CubDebugExit(g_allocator.DeviceAllocate((void**)&devA,
+ sizeof(float) * (sizeA+sizeB+sizeC) ));
+#else
+ stat = cublasAlloc(sizeA+sizeB+sizeC, sizeof(float), (void **) &devA);
+ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("Alloc A,B,C error\n"); }
+#endif
+
+ devB = devA + sizeA;
+ devC = devB + sizeB;
+
+ // copy matrix A, B and C to device
+ stat = cublasSetMatrix(rowA, colA, sizeof(float), A, ALDim, devA, rowA);
+ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix A error\n"); }
+
+ stat = cublasSetMatrix(rowB, colB, sizeof(float), B, BLDim, devB, rowB);
+ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix B error\n"); }
+
+ if (beta != 0.0)
+ {
+ stat = cublasSetMatrix(rowC, colC, sizeof(float), C, CLDim, devC, rowC);
+ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix C error\n"); }
+ }
+
+ // cublas<t>gemm
+ cublasSgemm
+ ( fixedTransA, fixedTransB, m, n, k,
+ alpha, devA, rowA, devB, rowB, beta, devC, rowC );
+
+ // copy matrix C to host
+ stat = cublasGetMatrix(rowC, colC, sizeof(float), devC, rowC, C, CLDim);
+ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("GetMatrix C error\n"); }
+
+ // free
+#if USE_CUB
+ CubDebugExit(g_allocator.DeviceFree(devA));
+#else
+ cublasFree(devA);
+#endif
+ //printf("CUBLAS float done ...\n");
+}
+
+void Gemm
+( char transA, char transB,
+ BlasInt m, BlasInt n, BlasInt k,
+ const double& alpha,
+ const double* A, BlasInt ALDim,
+ const double* B, BlasInt BLDim,
+ const double& beta,
+ double* C, BlasInt CLDim )
+{
+ EL_DEBUG_CSE
+ EL_DEBUG_ONLY(
+ if( std::toupper(transA) == 'N' )
+ {
+ if( ALDim < Max(m,1) )
+ LogicError("ALDim was too small: ALDim=",ALDim,",m=",m);
+ }
+ else
+ {
+ if( ALDim < Max(k,1) )
+ LogicError("ALDim was too small: ALDim=",ALDim,",k=",k);
+ }
+
+ if( std::toupper(transB) == 'N' )
+ {
+ if( BLDim < Max(k,1) )
+ LogicError("BLDim was too small: BLDim=",BLDim,",k=",k);
+ }
+ else
+ {
+ if( BLDim < Max(n,1) )
+ LogicError("BLDim was too small: BLDim=",BLDim,",n=",n);
+ }
+
+ if( CLDim < Max(m,1) )
+ LogicError("CLDim was too small: CLDim=",CLDim,",m=",m);
+ )
+ const char fixedTransA = ( std::toupper(transA) == 'C' ? 'T' : transA );
+ const char fixedTransB = ( std::toupper(transB) == 'C' ? 'T' : transB );
+
+ const mpi::Comm comm;
+ const Int commRank = mpi::Rank( comm );
+ if (commRank == 0) {
+ //printf("calling cublas Dgemm: m %d n %d k %d\n", m, n, k);
+ }
+
+ BlasInt rowA, colA, rowB, colB, rowC, colC;
+ // device memory size for A, B and C
+ BlasInt sizeA, sizeB, sizeC;
+ double *devA=NULL, *devB=NULL, *devC=NULL;
+
+ rowA = fixedTransA == 'T' ? k : m;
+ colA = fixedTransA == 'T' ? m : k;
+ rowB = fixedTransB == 'T' ? n : k;
+ colB = fixedTransB == 'T' ? k : n;
+ rowC = m;
+ colC = n;
+ sizeA = rowA * colA;
+ sizeB = rowB * colB;
+ sizeC = rowC * colC;
+
+ cublasStatus stat;
+
+#if USE_CUB
+ CubDebugExit(g_allocator.DeviceAllocate((void**)&devA,
+ sizeof(double) * (sizeA+sizeB+sizeC) ));
+#else
+ stat = cublasAlloc(sizeA+sizeB+sizeC, sizeof(double), (void **) &devA);
+ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("Alloc A,B,C error\n"); }
+#endif
+
+ devB = devA + sizeA;
+ devC = devB + sizeB;
+
+ // copy matrix A, B and C to device
+ stat = cublasSetMatrix(rowA, colA, sizeof(double), A, ALDim, devA, rowA);
+ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix A error\n"); }
+
+ stat = cublasSetMatrix(rowB, colB, sizeof(double), B, BLDim, devB, rowB);
+ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix B error\n"); }
+
+ if (beta != 0.0)
+ {
+ stat = cublasSetMatrix(rowC, colC, sizeof(double), C, CLDim, devC, rowC);
+ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix C error\n"); }
+ }
+
+ // cublas<t>gemm
+ cublasDgemm
+ ( fixedTransA, fixedTransB, m, n, k,
+ alpha, devA, rowA, devB, rowB, beta, devC, rowC );
+
+ // copy matrix C to host
+ stat = cublasGetMatrix(rowC, colC, sizeof(double), devC, rowC, C, CLDim);
+ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("GetMatrix C error\n"); }
+
+ // free
+#if USE_CUB
+ CubDebugExit(g_allocator.DeviceFree(devA));
+#else
+ cublasFree(devA);
+#endif
+ //printf("CUBLAS double done ...\n");
+}
+
+void Gemm
+( char transA, char transB, BlasInt m, BlasInt n, BlasInt k,
+ const scomplex& alpha,
+ const scomplex* A, BlasInt ALDim,
+ const scomplex* B, BlasInt BLDim,
+ const scomplex& beta,
+ scomplex* C, BlasInt CLDim )
+{
+ EL_DEBUG_CSE
+ EL_DEBUG_ONLY(
+ if( std::toupper(transA) == 'N' )
+ {
+ if( ALDim < Max(m,1) )
+ LogicError("ALDim was too small: ALDim=",ALDim,",m=",m);
+ }
+ else
+ {
+ if( ALDim < Max(k,1) )
+ LogicError("ALDim was too small: ALDim=",ALDim,",k=",k);
+ }
+
+ if( std::toupper(transB) == 'N' )
+ {
+ if( BLDim < Max(k,1) )
+ LogicError("BLDim was too small: BLDim=",BLDim,",k=",k);
+ }
+ else
+ {
+ if( BLDim < Max(n,1) )
+ LogicError("BLDim was too small: BLDim=",BLDim,",n=",n);
+ }
+
+ if( CLDim < Max(m,1) )
+ LogicError("CLDim was too small: CLDim=",CLDim,",m=",m);
+ )
+
+ const char fixedTransA = transA;
+ const char fixedTransB = transB;
+
+ const mpi::Comm comm;
+ const Int commRank = mpi::Rank( comm );
+ if (commRank == 0) {
+ //printf("calling cublas Cgemm: m %d n %d k %d\n", m, n, k);
+ }
+
+ BlasInt rowA, colA, rowB, colB, rowC, colC;
+ // device memory size for A, B and C
+ BlasInt sizeA, sizeB, sizeC;
+ cuComplex *devA=NULL, *devB=NULL, *devC=NULL;
+
+ rowA = fixedTransA == 'T' ? k : m;
+ colA = fixedTransA == 'T' ? m : k;
+ rowB = fixedTransB == 'T' ? n : k;
+ colB = fixedTransB == 'T' ? k : n;
+ rowC = m;
+ colC = n;
+ sizeA = rowA * colA;
+ sizeB = rowB * colB;
+ sizeC = rowC * colC;
+
+ cublasStatus stat;
+ stat = cublasAlloc(sizeA+sizeB+sizeC, sizeof(cuComplex), (void **) &devA);
+ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("Alloc A,B,C error\n"); }
+
+ devB = devA + sizeA;
+ devC = devB + sizeB;
+
+ // copy matrix A, B and C to device
+ stat = cublasSetMatrix(rowA, colA, sizeof(cuComplex), A, ALDim, devA, rowA);
+ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix A error\n"); }
+
+ stat = cublasSetMatrix(rowB, colB, sizeof(cuComplex), B, BLDim, devB, rowB);
+ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix B error\n"); }
+
+ if (beta.real() != 0.0 || beta.imag() != 0.0)
+ {
+ stat = cublasSetMatrix(rowC, colC, sizeof(cuComplex), C, CLDim, devC, rowC);
+ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix C error\n"); }
+ }
+
+ // cublas<t>gemm
+ cublasCgemm
+ ( fixedTransA, fixedTransB, m, n, k,
+ *((cuComplex*) &alpha), devA, rowA, devB, rowB, *((cuComplex*) &beta), devC, rowC );
+
+ // copy matrix C to host
+ stat = cublasGetMatrix(rowC, colC, sizeof(cuComplex), devC, rowC, C, CLDim);
+ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("GetMatrix C error\n"); }
+
+ // free
+ cublasFree(devA);
+}
+
+void Gemm
+( char transA, char transB, BlasInt m, BlasInt n, BlasInt k,
+ const dcomplex& alpha,
+ const dcomplex* A, BlasInt ALDim,
+ const dcomplex* B, BlasInt BLDim,
+ const dcomplex& beta,
+ dcomplex* C, BlasInt CLDim )
+{
+ EL_DEBUG_CSE
+ EL_DEBUG_ONLY(
+ if( std::toupper(transA) == 'N' )
+ {
+ if( ALDim < Max(m,1) )
+ LogicError("ALDim was too small: ALDim=",ALDim,",m=",m);
+ }
+ else
+ {
+ if( ALDim < Max(k,1) )
+ LogicError("ALDim was too small: ALDim=",ALDim,",k=",k);
+ }
+
+ if( std::toupper(transB) == 'N' )
+ {
+ if( BLDim < Max(k,1) )
+ LogicError("BLDim was too small: BLDim=",BLDim,",k=",k);
+ }
+ else
+ {
+ if( BLDim < Max(n,1) )
+ LogicError("BLDim was too small: BLDim=",BLDim,",n=",n);
+ }
+
+ if( CLDim < Max(m,1) )
+ LogicError("CLDim was too small: CLDim=",CLDim,",m=",m);
+ )
+
+ const char fixedTransA = transA;
+ const char fixedTransB = transB;
+
+ const mpi::Comm comm;
+ const Int commRank = mpi::Rank( comm );
+ if (commRank == 0) {
+ //printf("calling cublas Zgemm: m %d n %d k %d\n", m, n, k);
+ }
+
+ BlasInt rowA, colA, rowB, colB, rowC, colC;
+ // device memory size for A, B and C
+ BlasInt sizeA, sizeB, sizeC;
+ cuDoubleComplex *devA=NULL, *devB=NULL, *devC=NULL;
+
+ rowA = fixedTransA == 'T' ? k : m;
+ colA = fixedTransA == 'T' ? m : k;
+ rowB = fixedTransB == 'T' ? n : k;
+ colB = fixedTransB == 'T' ? k : n;
+ rowC = m;
+ colC = n;
+ sizeA = rowA * colA;
+ sizeB = rowB * colB;
+ sizeC = rowC * colC;
+
+ cublasStatus stat;
+ stat = cublasAlloc(sizeA+sizeB+sizeC, sizeof(cuDoubleComplex), (void **) &devA);
+ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("Alloc A,B,C error\n"); }
+
+ devB = devA + sizeA;
+ devC = devB + sizeB;
+
+ // copy matrix A, B and C to device
+ stat = cublasSetMatrix(rowA, colA, sizeof(cuDoubleComplex), A, ALDim, devA, rowA);
+ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix A error\n"); }
+
+ stat = cublasSetMatrix(rowB, colB, sizeof(cuDoubleComplex), B, BLDim, devB, rowB);
+ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix B error\n"); }
+
+ if (beta.real() != 0.0 || beta.imag() != 0.0)
+ {
+ stat = cublasSetMatrix(rowC, colC, sizeof(cuDoubleComplex), C, CLDim, devC, rowC);
+ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix C error\n"); }
+ }
+
+ cublasZgemm
+ ( fixedTransA, fixedTransB, m, n, k,
+ *((cuDoubleComplex*) &alpha), devA, rowA, devB, rowB, *((cuDoubleComplex*) &beta),
+ devC, rowC );
+
+ // copy matrix C to host
+ stat = cublasGetMatrix(rowC, colC, sizeof(cuDoubleComplex), devC, rowC, C, CLDim);
+ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("GetMatrix C error\n"); }
+
+ // free
+ cublasFree(devA);
+}
+
+} // namespace cublas
+} // namespace El
+
+#endif
+

View File

@@ -1,171 +0,0 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from spack.package import *
class Elemental(CMakePackage):
"""Elemental: Distributed-memory dense and sparse-direct linear algebra
and optimization library."""
homepage = "https://libelemental.org"
url = "https://github.com/elemental/Elemental/archive/v0.87.7.tar.gz"
git = "https://github.com/elemental/Elemental.git"
license("Apache-2.0")
version("develop", branch="master")
version("0.87.7", sha256="7becfdbc223e9c72e65ae876d842c48d2037d13f83e9f41cea285e21b840d7d9")
version("0.87.6", sha256="b597987c99ddd3462e0619524c5b7f711177ae8ae541b1b961e11d96e15afc64")
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
variant("shared", default=True, description="Enables the build of shared libraries")
variant("hybrid", default=True, description="Make use of OpenMP within MPI packing/unpacking")
variant(
"openmp_blas", default=False, description="Use OpenMP for threading in the BLAS library"
)
variant("c", default=False, description="Build C interface")
variant("parmetis", default=False, description="Enable ParMETIS")
variant("quad", default=False, description="Enable quad precision")
variant("int64", default=False, description="Use 64bit integers")
variant("cublas", default=False, description="Enable cuBLAS for local BLAS operations")
# When this variant is set remove the normal dependencies since
# Elemental has to build BLAS and ScaLAPACK internally
variant(
"int64_blas",
default=False,
description="Use 64bit integers for BLAS." " Requires local build of BLAS library.",
)
variant("scalapack", default=False, description="Build with ScaLAPACK library")
variant(
"build_type",
default="Release",
description="The build type to build",
values=("Debug", "Release"),
)
variant(
"blas",
default="openblas",
values=("openblas", "mkl", "accelerate", "essl"),
description="Enable the use of OpenBlas/MKL/Accelerate/ESSL",
)
variant(
"mpfr",
default=False,
description="Support GNU MPFR's" "arbitrary-precision floating-point arithmetic",
)
# Note that #1712 forces us to enumerate the different blas variants
depends_on("blas", when="~openmp_blas ~int64_blas")
# Hack to forward variant to openblas package
depends_on("openblas", when="blas=openblas ~openmp_blas ~int64_blas")
# Allow Elemental to build internally when using 8-byte ints
depends_on("openblas threads=openmp", when="blas=openblas +openmp_blas ~int64_blas")
depends_on("intel-mkl", when="blas=mkl")
depends_on("intel-mkl threads=openmp", when="blas=mkl +openmp_blas")
depends_on("intel-mkl@2017.1 +ilp64", when="blas=mkl +int64_blas")
depends_on("veclibfort", when="blas=accelerate")
depends_on("essl", when="blas=essl")
depends_on("essl threads=openmp", when="blas=essl +openmp_blas")
# Note that this forces us to use OpenBLAS until #1712 is fixed
depends_on("lapack", when="blas=openblas ~openmp_blas")
depends_on("netlib-lapack +external-blas", when="blas=essl")
depends_on("metis")
depends_on("metis +int64", when="+int64")
depends_on("mpi")
# Allow Elemental to build internally when using 8-byte ints
depends_on("scalapack", when="+scalapack ~int64_blas")
depends_on("gmp", when="+mpfr")
depends_on("mpc", when="+mpfr")
depends_on("mpfr", when="+mpfr")
patch("elemental_cublas.patch", when="+cublas")
patch("cmake_0.87.7.patch", when="@0.87.7")
conflicts("%intel@:17.0.2", when="@:0.87.7")
@property
def libs(self):
shared = True if "+shared" in self.spec else False
return find_libraries("libEl", root=self.prefix, shared=shared, recursive=True)
def cmake_args(self):
spec = self.spec
args = [
"-DCMAKE_INSTALL_MESSAGE:STRING=LAZY",
"-DCMAKE_C_COMPILER=%s" % spec["mpi"].mpicc,
"-DCMAKE_CXX_COMPILER=%s" % spec["mpi"].mpicxx,
"-DCMAKE_Fortran_COMPILER=%s" % spec["mpi"].mpifc,
"-DEL_PREFER_OPENBLAS:BOOL=TRUE",
"-DEL_DISABLE_SCALAPACK:BOOL=%s" % ("~scalapack" in spec),
"-DBUILD_SHARED_LIBS:BOOL=%s" % ("+shared" in spec),
"-DEL_HYBRID:BOOL=%s" % ("+hybrid" in spec),
"-DEL_C_INTERFACE:BOOL=%s" % ("+c" in spec),
"-DEL_DISABLE_PARMETIS:BOOL=%s" % ("~parmetis" in spec),
"-DEL_DISABLE_QUAD:BOOL=%s" % ("~quad" in spec),
"-DEL_USE_64BIT_INTS:BOOL=%s" % ("+int64" in spec),
"-DEL_USE_64BIT_BLAS_INTS:BOOL=%s" % ("+int64_blas" in spec),
"-DEL_DISABLE_MPFR:BOOL=%s" % ("~mpfr" in spec),
]
if self.spec.satisfies("%intel"):
ifort = env["SPACK_F77"]
intel_bin = os.path.dirname(ifort)
intel_root = os.path.dirname(intel_bin)
libfortran = find_libraries("libifcoremt", root=intel_root, recursive=True)
elif self.spec.satisfies("%gcc"):
# see <stage_folder>/debian/rules as an example:
mpif77 = Executable(spec["mpi"].mpif77)
libfortran = LibraryList(
mpif77("--print-file-name", "libgfortran.%s" % dso_suffix, output=str).strip()
)
elif self.spec.satisfies("%xl") or self.spec.satisfies("%xl_r"):
xl_fort = env["SPACK_F77"]
xl_bin = os.path.dirname(xl_fort)
xl_root = os.path.dirname(xl_bin)
libfortran = find_libraries("libxlf90_r", root=xl_root, recursive=True)
else:
libfortran = None
if libfortran:
args.append("-DGFORTRAN_LIB=%s" % libfortran.libraries[0])
# If using 64bit int BLAS libraries, elemental has to build
# them internally
if spec.satisfies("+int64_blas"):
args.extend(
[
"-DEL_BLAS_SUFFIX:STRING={0}".format(
("_64_" if "+int64_blas" in spec else "_")
),
"-DCUSTOM_BLAS_SUFFIX:BOOL=TRUE",
]
)
if spec.satisfies("+scalapack"):
args.extend(
[
"-DEL_LAPACK_SUFFIX:STRING={0}".format(
("_64_" if "+int64_blas" in spec else "_")
),
"-DCUSTOM_LAPACK_SUFFIX:BOOL=TRUE",
]
)
else:
math_libs = spec["lapack"].libs + spec["blas"].libs
if spec.satisfies("+scalapack"):
math_libs = spec["scalapack"].libs + math_libs
args.extend(["-DMATH_LIBS:STRING={0}".format(math_libs.ld_flags)])
return args

View File

@@ -22,6 +22,7 @@ class FluxSched(CMakePackage, AutotoolsPackage):
license("LGPL-3.0-only")
version("master", branch="master")
version("0.42.2", sha256="3a4a513c6539f2927e7a544f431e97456e50c71b63f8744d31e0dee3dc7fcc2e")
version("0.42.1", sha256="ab56b257e4918ad7e26ef6a375d0ea500a4929bf6633937f0c11c06e21db56b9")
version("0.41.0", sha256="c89baf72867031847748c157aa99f3b36755f2801df917aae66010d2112e10fe")
version("0.40.0", sha256="1484befcf8628b0af7833bf550d0bb3864db32b70f2c1bb363c35e30ada1ecc5")
@@ -110,6 +111,12 @@ class FluxSched(CMakePackage, AutotoolsPackage):
patch("no-valgrind.patch", when="@:0.20.0")
patch("jobid-sign-compare-fix.patch", when="@:0.22.0")
patch(
"https://github.com/flux-framework/flux-sched/pull/1338.patch?full_index=1",
when="@0.42.2 %oneapi@2025:",
sha256="b46579efa70176055f88493caa3fefbfea5a5663a33d9c561b71e83046f763c5",
)
def url_for_version(self, version):
"""
Flux uses a fork of ZeroMQ's Collective Code Construction Contract

View File

@@ -20,6 +20,7 @@ class FluxSecurity(AutotoolsPackage):
license("LGPL-3.0-or-later")
version("master", branch="master")
version("0.14.0", sha256="fae93bdaf94110a614d2806dfddf8b70bb43f73d89a7cb6856f26ab9055afc70")
version("0.13.0", sha256="d61b8d0e6d6c8d7497e9542eadc110c496cbd57ba6a33bfd26271d805bda9869")
version("0.12.0", sha256="2876d1f10c4f898f2ff10d60ddb446af9c8a913dda69f0136d820ad1fdf28a93")
version("0.11.0", sha256="d1ef78a871155a252f07e4f0a636eb272d6c2048d5e0e943860dd687c6cf808a")

View File

@@ -12,8 +12,8 @@ class Gasnet(Package, CudaPackage, ROCmPackage):
"""GASNet is a language-independent, networking middleware layer that
provides network-independent, high-performance communication primitives
including Remote Memory Access (RMA) and Active Messages (AM). It has been
used to implement parallel programming models and libraries such as UPC,
UPC++, Co-Array Fortran, Legion, Chapel, and many others. The interface is
used to implement parallel programming models and libraries including UPC,
UPC++, multi-image Fortran, Legion, Chapel, and many others. The interface is
primarily intended as a compilation target and for use by runtime library
writers (as opposed to end users), and the primary goals are high
performance, interface portability, and expressiveness.
@@ -21,12 +21,12 @@ class Gasnet(Package, CudaPackage, ROCmPackage):
***NOTICE***: The GASNet library built by this Spack package is ONLY intended for
unit-testing purposes, and is generally UNSUITABLE FOR PRODUCTION USE.
The RECOMMENDED way to build GASNet is as an embedded library as configured
by the higher-level client runtime package (UPC++, Legion, etc), including
by the higher-level client runtime package (UPC++, Legion, Chapel, etc), including
system-specific configuration.
"""
homepage = "https://gasnet.lbl.gov"
url = "https://gasnet.lbl.gov/EX/GASNet-2021.3.0.tar.gz"
url = "https://gasnet.lbl.gov/EX/GASNet-2024.5.0.tar.gz"
git = "https://bitbucket.org/berkeleylab/gasnet.git"
maintainers("PHHargrove", "bonachea")
@@ -37,11 +37,26 @@ class Gasnet(Package, CudaPackage, ROCmPackage):
version("main", branch="stable")
version("master", branch="master")
# commit hash e2fdec corresponds to tag gex-2025.2.0-snapshot
version("2025.2.0-snapshot", commit="e2fdece76d86d7b4fa090fbff9b46eb98ce97177")
# Versions fetched from git require a Bootstrap step
def bootstrap_version():
return "@master:,2025.2.0-snapshot"
version("2024.5.0", sha256="f945e80f71d340664766b66290496d230e021df5e5cd88f404d101258446daa9")
version("2023.9.0", sha256="2d9f15a794e10683579ce494cd458b0dd97e2d3327c4d17e1fea79bd95576ce6")
version("2023.3.0", sha256="e1fa783d38a503cf2efa7662be591ca5c2bb98d19ac72a9bc6da457329a9a14f")
version("2022.9.2", sha256="2352d52f395a9aa14cc57d82957d9f1ebd928d0a0021fd26c5f1382a06cd6f1d")
version("2022.9.0", sha256="6873ff4ad8ebee49da4378f2d78095a6ccc31333d6ae4cd739b9f772af11f936")
version(
"2022.9.2",
deprecated=True,
sha256="2352d52f395a9aa14cc57d82957d9f1ebd928d0a0021fd26c5f1382a06cd6f1d",
)
version(
"2022.9.0",
deprecated=True,
sha256="6873ff4ad8ebee49da4378f2d78095a6ccc31333d6ae4cd739b9f772af11f936",
)
version(
"2022.3.0",
deprecated=True,
@@ -129,8 +144,8 @@ class Gasnet(Package, CudaPackage, ROCmPackage):
depends_on("mpi", when="conduits=mpi")
depends_on("libfabric", when="conduits=ofi")
depends_on("autoconf@2.69", type="build", when="@master:")
depends_on("automake@1.16:", type="build", when="@master:")
depends_on("autoconf@2.69", type="build", when=bootstrap_version())
depends_on("automake@1.16:", type="build", when=bootstrap_version())
conflicts("^hip@:4.4.0", when="+rocm")
@@ -139,7 +154,7 @@ class Gasnet(Package, CudaPackage, ROCmPackage):
depends_on("oneapi-level-zero@1.8.0:", when="+level_zero")
def install(self, spec, prefix):
if spec.satisfies("@master:"):
if spec.satisfies(Gasnet.bootstrap_version()):
bootstrapsh = Executable("./Bootstrap")
bootstrapsh()
# Record git-describe when fetched from git:

View File

@@ -80,7 +80,12 @@ class Geomodel(CMakePackage):
depends_on("pythia8", when="+pythia")
with when("+visualization"):
depends_on("hdf5+cxx")
depends_on("qt +gui +opengl +sql")
depends_on("qmake")
with when("^[virtuals=qmake] qt"):
depends_on("qt +gui +opengl +sql")
with when("^[virtuals=qmake] qt-base"):
depends_on("qt-base +gui +opengl +sql +widgets")
depends_on("qt-5compat")
depends_on("coin3d")
depends_on("soqt")
depends_on("opengl")
@@ -94,5 +99,8 @@ def cmake_args(self):
self.define_from_variant("GEOMODEL_BUILD_EXAMPLES", "examples"),
self.define_from_variant("GEOMODEL_BUILD_TOOLS", "tools"),
self.define_from_variant("CMAKE_CXX_STANDARD", "cxxstd"),
self.define(
"GEOMODEL_USE_QT6", self.spec.satisfies("+visualization ^[virtuals=qmake] qt-base")
),
]
return args

View File

@@ -19,7 +19,7 @@ class Glib(MesonPackage):
"""
homepage = "https://developer.gnome.org/glib/"
url = "https://download.gnome.org/sources/glib/2.82/glib-2.82.2.tar.xz"
url = "https://download.gnome.org/sources/glib/2.82/glib-2.82.5.tar.xz"
list_url = "https://download.gnome.org/sources/glib"
list_depth = 1
@@ -28,6 +28,7 @@ class Glib(MesonPackage):
license("LGPL-2.1-or-later")
# Even minor versions are stable, odd minor versions are development, only add even numbers
version("2.82.5", sha256="05c2031f9bdf6b5aba7a06ca84f0b4aced28b19bf1b50c6ab25cc675277cbc3f")
version("2.82.2", sha256="ab45f5a323048b1659ee0fbda5cecd94b099ab3e4b9abf26ae06aeb3e781fd63")
version("2.78.3", sha256="609801dd373796e515972bf95fc0b2daa44545481ee2f465c4f204d224b2bc21")
version("2.78.0", sha256="44eaab8b720877ce303c5540b657b126f12dc94972d9880b52959f43fb537b30")

View File

@@ -34,10 +34,11 @@ class Globalarrays(AutotoolsPackage):
version("5.6.1", sha256="b324deed49f930f55203e1d18294ce07dd02680b9ac0728ebc54f94a12557ebc")
version("5.6", sha256="a228dfbae9a6cfaae34694d7e56f589ac758e959b58f4bc49e6ef44058096767")
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
depends_on("fortran", type="build") # generated
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")
variant("cxx", default=False, description="Enable C++")
variant("scalapack", default=False, description="Enable SCALAPACK")
variant(
"armci",
@@ -52,7 +53,6 @@ class Globalarrays(AutotoolsPackage):
depends_on("libfabric", when="armci=ofi")
depends_on("rdma-core", when="armci=openib")
depends_on("scalapack", when="+scalapack")
# See release https://github.com/GlobalArrays/ga/releases/tag/v5.7.1
@@ -74,6 +74,9 @@ def configure_args(self):
"--with-lapack={0}".format(lapack_libs),
]
if self.spec.satisfies("+cxx"):
args.append("--enable-cxx")
if self.spec.satisfies("+scalapack"):
scalapack_libs = self.spec["scalapack"].libs.ld_flags
args.append("--with-scalapack={0}".format(scalapack_libs))

View File

@@ -22,6 +22,7 @@ class Helics(CMakePackage):
version("develop", branch="develop", submodules=True)
version("main", branch="main", submodules=True)
version("master", branch="main", submodules=True)
version("3.6.1", sha256="d607c1b47dd5ae32f3076c4aa4aa584d37b6056a9bd049234494698ed95cd70f")
version("3.6.0", sha256="e111ac5d92e808f27e330afd1f8b8ca4d86adf6ccd74e3280f2d40fb3e0e2ce9")
version("3.5.3", sha256="f9ace240510b18caf642f55d08f9009a9babb203fbc032ec7d7d8aa6fd5e1553")
version("3.5.2", sha256="c2604694698a1e33c4a68f3d1c5ab0a228ef2bfca1b0d3bae94801dbd3b11048")

View File

@@ -90,6 +90,8 @@ class Hipsparselt(CMakePackage, ROCmPackage):
def setup_build_environment(self, env):
env.set("CXX", self.spec["hip"].hipcc)
if self.spec.satisfies("+asan"):
env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang")
env.set("TENSILE_ROCM_ASSEMBLER_PATH", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++")
env.set(
"TENSILE_ROCM_OFFLOAD_BUNDLER_PATH",

View File

@@ -155,6 +155,17 @@ def determine_version(cls, lib):
ver = None
return ver
def setup_build_environment(self, env):
if self.spec.satisfies("@5.7: +asan"):
numa_inc = self.spec["numactl"].prefix.include
numa_lib = self.spec["numactl"].prefix.lib
env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang")
env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++")
env.set("ASAN_OPTIONS", "detect_leaks=0")
env.set("CFLAGS", f"-fsanitize=address -shared-libasan -I{numa_inc} -L{numa_lib}")
env.set("CXXFLAGS", f"-fsanitize=address -shared-libasan -I{numa_inc} -L{numa_lib}")
env.set("LDFLAGS", "-fuse-ld=lld")
def cmake_args(self):
spec = self.spec

View File

@@ -15,7 +15,10 @@
class Hydrogen(CachedCMakePackage, CudaPackage, ROCmPackage):
"""Hydrogen: Distributed-memory dense and sparse-direct linear algebra
and optimization library. Based on the Elemental library."""
and optimization library.
Based on the Elemental library.
"""
homepage = "https://libelemental.org"
url = "https://github.com/LLNL/Elemental/archive/v1.5.1.tar.gz"
@@ -31,8 +34,8 @@ class Hydrogen(CachedCMakePackage, CudaPackage, ROCmPackage):
version("1.5.2", sha256="a902cad3962471216cfa278ba0561c18751d415cd4d6b2417c02a43b0ab2ea33")
version("1.5.1", sha256="447da564278f98366906d561d9c8bc4d31678c56d761679c2ff3e59ee7a2895c")
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
depends_on("c", type="build")
depends_on("cxx", type="build")
# Older versions are no longer supported.
variant("shared", default=True, description="Enables the build of shared libraries.")
@@ -71,13 +74,6 @@ class Hydrogen(CachedCMakePackage, CudaPackage, ROCmPackage):
description="Use OpenMP taskloops instead of parallel for loops",
)
# Users should spec this on their own on the command line, no?
# This doesn't affect Hydrogen itself at all. Not one bit.
# variant(
# "openmp_blas",
# default=False,
# description="Use OpenMP for threading in the BLAS library")
variant("test", default=False, description="Builds test suite")
conflicts("+cuda", when="+rocm", msg="CUDA and ROCm support are mutually exclusive")
@@ -90,22 +86,25 @@ class Hydrogen(CachedCMakePackage, CudaPackage, ROCmPackage):
depends_on("blas")
depends_on("lapack")
# Note that #1712 forces us to enumerate the different blas variants
# Note that this forces us to use OpenBLAS until #1712 is fixed
depends_on("openblas", when="blas=openblas")
depends_on("openblas +ilp64", when="blas=openblas +int64_blas")
depends_on("openblas@0.3.21:0.3.23", when="blas=openblas arch=ppc64le:")
with when("blas=openblas"):
requires("^[virtuals=blas,lapack] openblas")
requires("^[virtuals=blas,lapack] openblas~ilp64", when="~int64_blas")
requires("^[virtuals=blas,lapack] openblas+ilp64", when="+int64_blas")
requires("^[virtuals=blas,lapack] openblas@0.3.21:0.3.23", when="arch=ppc64le:")
depends_on("intel-mkl", when="blas=mkl")
depends_on("intel-mkl +ilp64", when="blas=mkl +int64_blas")
with when("blas=mkl"):
requires("^[virtuals=blas,lapack] intel-oneapi-mkl")
requires("^[virtuals=blas,lapack] intel-oneapi-mkl ~ilp64", when="~int64_blas")
requires("^[virtuals=blas,lapack] intel-oneapi-mkl +ilp64", when="+int64_blas")
# I don't think this is true...
depends_on("veclibfort", when="blas=accelerate")
depends_on("essl", when="blas=essl")
depends_on("essl +ilp64", when="blas=essl +int64_blas")
depends_on("netlib-lapack +external-blas", when="blas=essl")
with when("blas=essl"):
requires("^[virtuals=blas] essl")
requires("^[virtuals=blas] essl ~ilp64", when="~int64_blas")
requires("^[virtuals=blas] essl +ilp64", when="+int64_blas")
requires("^[virtuals=lapack] netlib-lapack +external-blas")
depends_on("cray-libsci", when="blas=libsci")
@@ -117,14 +116,12 @@ class Hydrogen(CachedCMakePackage, CudaPackage, ROCmPackage):
depends_on("aluminum +rocm +ht", when="+al +rocm")
for arch in CudaPackage.cuda_arch_values:
depends_on("aluminum +cuda cuda_arch=%s" % arch, when="+al +cuda cuda_arch=%s" % arch)
depends_on(f"aluminum +cuda cuda_arch={arch}", when=f"+al +cuda cuda_arch={arch}")
# variants +rocm and amdgpu_targets are not automatically passed to
# dependencies, so do it manually.
for val in ROCmPackage.amdgpu_targets:
depends_on(
"aluminum +rocm amdgpu_target=%s" % val, when="+al +rocm amdgpu_target=%s" % val
)
depends_on(f"aluminum +rocm amdgpu_target={val}", when=f"+al +rocm amdgpu_target={val}")
depends_on("cuda@11.0.0:", when="+cuda")
depends_on("hipcub +rocm", when="+rocm +cub")
@@ -142,8 +139,7 @@ def libs(self):
return find_libraries("libHydrogen", root=self.prefix, shared=shared, recursive=True)
def cmake_args(self):
args = []
return args
return []
def get_cuda_flags(self):
spec = self.spec
@@ -188,9 +184,7 @@ def initconfig_compiler_entries(self):
entries.append(cmake_cache_string("OpenMP_CXX_FLAGS", "-fopenmp=libomp"))
entries.append(cmake_cache_string("OpenMP_CXX_LIB_NAMES", "libomp"))
entries.append(
cmake_cache_string(
"OpenMP_libomp_LIBRARY", "{0}/lib/libomp.dylib".format(clang_root)
)
cmake_cache_string("OpenMP_libomp_LIBRARY", f"{clang_root}/lib/libomp.dylib")
)
return entries
@@ -259,9 +253,9 @@ def initconfig_package_entries(self):
)
# CMAKE_PREFIX_PATH should handle this
entries.append(cmake_cache_string("OpenBLAS_DIR", spec["openblas"].prefix))
elif spec.satisfies("blas=mkl") or spec.satisfies("^intel-mkl"):
elif spec.satisfies("blas=mkl"):
entries.append(cmake_cache_option("Hydrogen_USE_MKL", True))
elif spec.satisfies("blas=essl") or spec.satisfies("^essl"):
elif spec.satisfies("blas=essl"):
entries.append(cmake_cache_string("BLA_VENDOR", "IBMESSL"))
# IF IBM ESSL is used it needs help finding the proper LAPACK libraries
entries.append(
@@ -280,7 +274,7 @@ def initconfig_package_entries(self):
)
elif spec.satisfies("blas=accelerate"):
entries.append(cmake_cache_option("Hydrogen_USE_ACCELERATE", True))
elif spec.satisfies("^netlib-lapack"):
elif spec.satisfies("^[virtuals=blas,lapack] netlib-lapack"):
entries.append(cmake_cache_string("BLA_VENDOR", "Generic"))
return entries

View File

@@ -19,6 +19,7 @@ class JacamarCi(GoPackage):
license("Apache-2.0 OR MIT")
version("develop", branch="develop")
version("0.25.0", sha256="20626ed931f5bf6ba1d5a2dd56af5793efa69a4f355bdac9b8bf742aaf806653")
version("0.24.2", sha256="d2b8be464b88a92df0ad2ba1e846226b993c4162779432cb8366fb9bca5c40db")
version("0.24.1", sha256="fe1036fee2e97e38457212bf1246895803eeb6e1a6aa1ecd24eba1d3ea994029")
version("0.23.0", sha256="796679e13ece5f88dd7d4a4f40a27a87a6f3273085bb07043b258a612a4b43d3")

View File

@@ -11,10 +11,11 @@ class Libmd(AutotoolsPackage):
macOS, Solaris) libraries and lacking on others like GNU systems."""
homepage = "https://www.hadrons.org/software/libmd/"
url = "https://archive.hadrons.org/software/libmd/libmd-1.0.3.tar.xz"
url = "https://archive.hadrons.org/software/libmd/libmd-1.1.0.tar.xz"
maintainers("haampie")
version("1.1.0", sha256="1bd6aa42275313af3141c7cf2e5b964e8b1fd488025caf2f971f43b00776b332")
version("1.0.4", sha256="f51c921042e34beddeded4b75557656559cf5b1f2448033b4c1eec11c07e530f")
version("1.0.3", sha256="5a02097f95cc250a3f1001865e4dbba5f1d15554120f95693c0541923c52af4a")
version("1.0.2", sha256="dc66b8278f82e7e1bf774fbd4bc83a0348e8f27afa185b2c2779cfcb3da25013")

View File

@@ -10,9 +10,14 @@ class Librsvg(AutotoolsPackage):
homepage = "https://wiki.gnome.org/Projects/LibRsvg"
url = "https://download.gnome.org/sources/librsvg/2.44/librsvg-2.44.14.tar.xz"
list_url = "https://download.gnome.org/sources/librsvg"
list_depth = 1
license("LGPL-2.1-or-later")
license("LGPL-2.1-or-later", checked_by="wdconinc")
version("2.58.2", sha256="18e9d70c08cf25f50d610d6d5af571561d67cf4179f962e04266475df6e2e224")
version("2.57.3", sha256="1b2267082c0b77ef93b15747a5c754584eb5886baf2d5a08011cde0659c2c479")
version("2.56.4", sha256="ea87fdcf5159348fcb08b14c43e91a9d3d9e45dc2006a875d1711bb65b6740f5")
version("2.56.2", sha256="3ec3c4d8f73e0ba4b9130026969e8371c092b734298d36e2fdb3eb4afcec1200")
version("2.51.0", sha256="89d32e38445025e1b1d9af3dd9d3aeb9f6fce527aeecbecf38b369b34c80c038")
version("2.50.2", sha256="6211f271ce4cd44a7318190d36712e9cea384a933d3e3570004edeb210a056d3")
@@ -27,6 +32,8 @@ class Librsvg(AutotoolsPackage):
depends_on("gobject-introspection", type="build")
depends_on("pkgconfig", type="build")
# rust minimal version also in `configure` file
depends_on("rust@1.70:", when="@2.57:", type="build")
# rust minimal version from NEWS file
depends_on("rust@1.65:", when="@2.56.1:", type="build")
# upper bound because "Unaligned references to packed fields are a hard
@@ -36,8 +43,9 @@ class Librsvg(AutotoolsPackage):
depends_on("gtk-doc", type="build", when="+doc")
# requirements according to `configure` file
depends_on("cairo@1.16:+gobject+png", when="@2.50:")
depends_on("cairo@1.15.12:+gobject+png", when="@2.44.14:")
depends_on("cairo@1.17:", when="@2.57:")
depends_on("cairo@1.16:", when="@2.50:")
depends_on("cairo@1.15.12:", when="@2.44.14:")
depends_on("cairo@1.2.0:+gobject+png")
depends_on("libcroco@0.6.1:", when="@:2.44.14")
depends_on("gdk-pixbuf@2.20:")
@@ -46,6 +54,7 @@ class Librsvg(AutotoolsPackage):
depends_on("glib@2.12:")
depends_on("harfbuzz@2:", when="@2.50:")
depends_on("libxml2@2.9:")
depends_on("pango@1.50:", when="@2.57.1:")
depends_on("pango@1.46:", when="@2.51:")
depends_on("pango@1.38:")

View File

@@ -315,6 +315,11 @@ def setup_run_environment(self, env):
def setup_dependent_run_environment(self, env, dependent_spec):
llvm_amdgpu_home = self.spec["llvm-amdgpu"].prefix
env.prepend_path("LD_LIBRARY_PATH", llvm_amdgpu_home + "/lib")
# Required for enabling asan on dependent packages
for root, _, files in os.walk(self.spec["llvm-amdgpu"].prefix):
if "libclang_rt.asan-x86_64.so" in files:
env.prepend_path("LD_LIBRARY_PATH", root)
env.prune_duplicate_paths("LD_LIBRARY_PATH")
@run_after("install")
def post_install(self):

View File

@@ -19,7 +19,9 @@ class Meson(PythonPackage):
license("Apache-2.0")
version("1.5.1", sha256="55f6acd5bf72c14d4aa5a781993633f84a1d117bdf2c2057735902ced9b81390")
version("1.7.0", sha256="a6ca46e2a11a0278bb6492ecd4e0520ff441b164ebfdef1e012b11beb848d26e")
version("1.6.1", sha256="4889795777b536ea1a351982f3ef7c7b06a786ccb47036daba63cc5757c59edb")
version("1.5.2", sha256="fb41882bef26ffc02647d9978cba502a4accdf2e94c0a6dc9cc498dd7463381e")
version("1.4.2", sha256="11d1336fe35e1ade57510a846a31d7dc2e3b6ac1e2491c2831bce5a2a192ba0d")
version("1.3.2", sha256="683082fb3c5cddf203b21d29bdf4c227e2f7964da5324a15e1a5f7db94322b4b")
version("1.2.2", sha256="1caa0ef6082e311bdca9836e7907f548b8c3f041a42ed41f0ff916b83ac7dddd")
@@ -27,6 +29,7 @@ class Meson(PythonPackage):
version("1.0.2", sha256="1f1239c3091668643f7d2086663d6afd8cc87fbab84fe7462bc18b9ba6d65de8")
with default_args(deprecated=True):
version("1.5.1", sha256="55f6acd5bf72c14d4aa5a781993633f84a1d117bdf2c2057735902ced9b81390")
version("1.2.1", sha256="e1f3b32b636cc86496261bd89e63f00f206754697c7069788b62beed5e042713")
version("1.2.0", sha256="603489f0aaa6305f806c6cc4a4455a965f22290fc74f65871f589b002110c790")
version("1.1.0", sha256="f29a3e14062043d75e82d16f1e41856e6b1ed7a7c016e10c7b13afa7ee6364cc")

View File

@@ -282,6 +282,7 @@ class Mfem(Package, CudaPackage, ROCmPackage):
depends_on("mpi", when="+mpi")
depends_on("hipsparse", when="@4.4.0:+rocm")
depends_on("hipblas", when="@4.4.0:+rocm")
with when("+mpi"):
depends_on("hypre")
@@ -986,9 +987,10 @@ def find_optional_library(name, prefix):
if "^rocprim" in spec and not spec["hip"].external:
# rocthrust [via petsc+rocm] has a dependency on rocprim
hip_headers += spec["rocprim"].headers
if "^hipblas" in spec and not spec["hip"].external:
# superlu-dist+rocm needs the hipblas header path
hip_headers += spec["hipblas"].headers
if "^hipblas" in spec:
hipblas = spec["hipblas"]
hip_headers += hipblas.headers
hip_libs += hipblas.libs
if "%cce" in spec:
# We assume the proper Cray CCE module (cce) is loaded:
proc = str(spec.target.family)

View File

@@ -53,6 +53,8 @@ class Mgard(CMakePackage, CudaPackage):
depends_on("pkgconfig", type=("build",), when="@2022-11-18:")
depends_on("zstd")
depends_on("protobuf@3.4:", when="@2022-11-18:")
# See https://github.com/CODARcode/MGARD/issues/240
depends_on("protobuf@:3.28", when="@:2023-12-09")
depends_on("libarchive", when="@2021-11-12:")
depends_on("tclap", when="@2021-11-12")
depends_on("yaml-cpp", when="@2021-11-12:")

View File

@@ -19,6 +19,7 @@ class Multicharge(CMakePackage, MesonPackage):
build_system("cmake", "meson", default="meson")
version("0.3.1", sha256="180541714c26804a2d66edd892c8cd4cb40a21acbaf7edb24aaf04d580368b97")
version("0.3.0", sha256="e8f6615d445264798b12d2854e25c93938373dc149bb79e6eddd23fc4309749d")
variant("openmp", default=True, description="Enable OpenMP support")
@@ -27,6 +28,12 @@ class Multicharge(CMakePackage, MesonPackage):
depends_on("mctc-lib build_system=cmake", when="build_system=cmake")
depends_on("mctc-lib build_system=meson", when="build_system=meson")
def url_for_version(self, version):
if self.spec.satisfies("@:0.3.0"):
return f"https://github.com/grimme-lab/multicharge/releases/download/v{version}/multicharge-{version}.tar.xz"
else:
return f"https://github.com/grimme-lab/multicharge/releases/download/v{version}/multicharge-{version}-source.tar.xz"
class CMakeBuilder(cmake.CMakeBuilder):
def cmake_args(self):

View File

@@ -18,6 +18,7 @@ class NvplFft(Package):
license("UNKNOWN")
version("0.4.0.1", sha256="e0309f28a98a5f920919a9c6a766b89b507907bde66e665e0a239005c6942781")
version("0.3.0", sha256="e20791b77fa705e5a4f7aa5dada39b2a41e898189e0e60e680576128d532269b")
version("0.2.0.2", sha256="264343405aad6aca451bf8bd0988b6217b2bb17fd8f99394b83e04d9ab2f7f91")
version("0.1.0", sha256="0344f8e15e5b40f4d552f7013fe04a32e54a092cc3ebede51ddfce74b44c6e7d")

View File

@@ -940,6 +940,9 @@ def cmake_args(self):
if spec.variants["cuda_arch"].value[0] != "none":
cuda_arch = spec.variants["cuda_arch"].value
args.append(self.define("CUDA_ARCH_BIN", " ".join(cuda_arch)))
# https://github.com/opencv/opencv/pull/23021
if spec.satisfies("@4.9: ^cmake@3.18:"):
args.append(self.define("ENABLE_CUDA_FIRST_CLASS_LANGUAGE", True))
# TODO: this CMake flag is deprecated
if spec.target.family == "ppc64le":

View File

@@ -15,6 +15,7 @@ class Protobuf(CMakePackage):
license("BSD-3-Clause")
version("3.29.3", sha256="c8d0ed0085f559444f70311791cf7aef414246b9942441443963184b534dbf9e")
version("3.28.2", sha256="1b6b6a7a7894f509f099c4469b5d4df525c2f3c9e4009e5b2db5b0f66cb8ee0e")
version("3.27.5", sha256="a4aa92d0a207298149bf553d9a3192f3562eb91740086f50fa52331e60fa480c")
version("3.26.1", sha256="f3c0830339eaa5036eba8ff8ce7fca5aa3088f7d616f7c3713d946f611ae92bf")

View File

@@ -0,0 +1,27 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PyAiojobs(PythonPackage):
"""Jobs scheduler for managing background task (asyncio)."""
homepage = "https://github.com/aio-libs/aiojobs"
pypi = "aiojobs/aiojobs-1.3.0.tar.gz"
maintainers("alecbcs")
license("Apache-2.0", checked_by="alecbcs")
version("1.3.0", sha256="03074c884b3dc388b8d798c0de24ec17d72b2799018497fda8062c0431a494b5")
variant("aiohttp", default=False, description="Enable aiohttp integration")
depends_on("python@3.8:", type=("build", "run"))
depends_on("py-setuptools@46.4:", type="build")
depends_on("py-async-timeout@4:", type=("build", "run"), when="^python@:3.10")
depends_on("py-aiohttp@3.9:", type=("build", "run"), when="+aiohttp")

View File

@@ -29,7 +29,8 @@ class PyCudf(PythonPackage):
depends_on("py-cython", type="build")
depends_on("py-numba@0.40.0:", type=("build", "run"))
depends_on("py-numpy@1.14.4:", type=("build", "run"))
depends_on("py-pyarrow+cuda+orc+parquet", type=("build", "run"))
depends_on("py-pyarrow", type=("build", "run"))
depends_on("arrow+cuda+orc+parquet")
depends_on("py-pandas@0.23.4:", type=("build", "run"))
depends_on("py-rmm", type=("build", "run"))
depends_on("cuda@10:")

View File

@@ -21,5 +21,6 @@ class PyDaskExpr(PythonPackage):
# Can't do circular run-time dependencies yet?
# depends_on("py-dask@2024.7.1", type="run")
depends_on("py-pyarrow@7: +dataset", type="run")
depends_on("py-pyarrow@7:", type="run")
depends_on("arrow+dataset")
depends_on("py-pandas@2:", type="run")

View File

@@ -39,7 +39,8 @@ class PyDatasets(PythonPackage):
depends_on("py-fsspec@:0.8.0", when="^python@:3.7")
depends_on("py-huggingface-hub@:0.0")
depends_on("py-importlib-metadata", when="^python@:3.7")
depends_on("py-pyarrow@1:3+parquet")
depends_on("py-pyarrow@1:3")
depends_on("arrow+parquet")
depends_on("py-tqdm@4.27:4.49")
with when("@2.8.0"):
depends_on("py-responses@:0.18")
@@ -49,7 +50,8 @@ class PyDatasets(PythonPackage):
depends_on("py-dill@:0.3.6")
depends_on("py-fsspec@2021.11.1:+http")
depends_on("py-huggingface-hub@0.2:0")
depends_on("py-pyarrow@6:+parquet")
depends_on("py-pyarrow@6:")
depends_on("arrow+parquet")
depends_on("py-tqdm@4.62.1:")
depends_on("python@3.7:")
with when("@2.20.0:"):
@@ -57,7 +59,8 @@ class PyDatasets(PythonPackage):
depends_on("py-dill@0.3.0:0.3.8") # temporary upper bound
depends_on("py-fsspec@2023.1.0:2024.5.0+http")
depends_on("py-huggingface-hub@0.21.2:")
depends_on("py-pyarrow@15:+parquet+dataset")
depends_on("py-pyarrow@15:")
depends_on("arrow+parquet+dataset")
depends_on("py-requests@2.32.2:")
depends_on("py-tqdm@4.66.3:")
depends_on("python@3.8:")

View File

@@ -25,6 +25,7 @@ class PyMatplotlib(PythonPackage):
license("Apache-2.0")
maintainers("adamjstewart", "rgommers")
version("3.10.1", sha256="e8d2d0e3881b129268585bf4765ad3ee73a4591d77b9a18c214ac7e3a79fb2ba")
version("3.10.0", sha256="b886d02a581b96704c9d1ffe55709e49b4d2d52709ccebc4be42db856e511278")
version("3.9.4", sha256="1e00e8be7393cbdc6fedfa8a6fba02cf3e83814b285db1c60b906a023ba41bc3")
version("3.9.3", sha256="cd5dbbc8e25cad5f706845c4d100e2c8b34691b412b93717ce38d8ae803bcfa5")

View File

@@ -15,6 +15,12 @@ class PyNetworkx(PythonPackage):
license("BSD-3-Clause")
version("3.4.2", sha256="307c3669428c5362aab27c8a1260aa8f47c4e91d3891f48be0141738d8d053e1")
version("3.4.1", sha256="f9df45e85b78f5bd010993e897b4f1fdb242c11e015b101bd951e5c0e29982d8")
version("3.4", sha256="1269b90f8f0d3a4095f016f49650f35ac169729f49b69d0572b2bb142748162b")
version("3.3", sha256="0c127d8b2f4865f59ae9cb8aafcd60b5c70f3241ebd66f7defad7c4ab90126c9")
version("3.2.1", sha256="9f1bb5cf3409bf324e0a722c20bdb4c20ee39bf1c30ce8ae499c8502b0b5e0c6")
version("3.2", sha256="bda29edf392d9bfa5602034c767d28549214ec45f620081f0b74dc036a1fbbc1")
version("3.1", sha256="de346335408f84de0eada6ff9fafafff9bcda11f0a0dfaa931133debb146ab61")
version("3.0", sha256="9a9992345353618ae98339c2b63d8201c381c2944f38a2ab49cb45a4c667e412")
version("2.8.6", sha256="bd2b7730300860cbd2dafe8e5af89ff5c9a65c3975b352799d87a6238b4301a6")
@@ -41,18 +47,29 @@ class PyNetworkx(PythonPackage):
description="Optional requirements that may require extra steps to install",
)
depends_on("python@3.10:", when="@3.3:", type=("build", "run"))
depends_on("python@3.9:", when="@3.2:", type=("build", "run"))
depends_on("python@3.8:", when="@2.7:", type=("build", "run"))
depends_on("python@3.7:", when="@2.6:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-setuptools@61.2:", type="build", when="@3.2:")
with when("+default"):
# From requirements/default.txt
depends_on("py-numpy@1.24:", when="@3.4:", type=("build", "run"))
depends_on("py-numpy@1.23:", when="@3.3:", type=("build", "run"))
depends_on("py-numpy@1.22:", when="@3.2:", type=("build", "run"))
depends_on("py-numpy@1.20:", when="@3:", type=("build", "run"))
depends_on("py-numpy@1.19:", when="@2.8.6:", type=("build", "run"))
# https://github.com/networkx/networkx/pull/7390
depends_on("py-numpy@:1", when="@:3.2", type=("build", "run"))
depends_on("py-scipy@1.11.2:", when="@3.2:", type=("build", "run"))
depends_on("py-scipy@1.8:", when="@2.8.6:", type=("build", "run"))
depends_on("py-matplotlib@3.8:", when="@3.4:", type=("build", "run"))
depends_on("py-matplotlib@3.5:", when="@3.2:", type=("build", "run"))
depends_on("py-matplotlib@3.4:", when="@2.8.6:", type=("build", "run"))
depends_on("py-pandas@2.0:", when="@3.4:", type=("build", "run"))
depends_on("py-pandas@1.4:", when="@3.2:", type=("build", "run"))
depends_on("py-pandas@1.3:", when="@2.8.6:", type=("build", "run"))
# Historical dependencies

View File

@@ -45,11 +45,16 @@ class PyPip(Package, PythonExtension):
version("9.0.1", sha256="690b762c0a8460c303c089d5d0be034fb15a5ea2b75bdf565f40421f542fefb0")
extends("python")
depends_on("python@3.8:", when="@24.1:", type=("build", "run"))
depends_on("python@3.7:", when="@22:", type=("build", "run"))
# Uses collections.MutableMapping
depends_on("python@:3.9", when="@:19.1", type=("build", "run"))
with default_args(type=("build", "run")):
depends_on("python@3.8:", when="@24.1:")
depends_on("python@3.7:", when="@22:")
# Uses pkgutil.ImpImporter
depends_on("python@:3.11", when="@:23.1.1")
# Uses collections.MutableMapping
depends_on("python@:3.9", when="@:19.1")
resource(
name="pip-bootstrap",

View File

@@ -5,7 +5,7 @@
from spack.package import *
class PyPyarrow(PythonPackage, CudaPackage):
class PyPyarrow(PythonPackage):
"""A cross-language development platform for in-memory data.
This package contains the Python bindings.
@@ -19,6 +19,7 @@ class PyPyarrow(PythonPackage, CudaPackage):
license("Apache-2.0")
version("19.0.1", sha256="3bf266b485df66a400f282ac0b6d1b500b9d2ae73314a153dbe97d6d5cc8a99e")
version("16.1.0", sha256="15fbb22ea96d11f0b5768504a3f961edab25eaf4197c341720c4a387f6c60315")
version("15.0.2", sha256="9c9bc803cb3b7bfacc1e96ffbfd923601065d9d3f911179d81e72d99fd74a3d9")
version("14.0.2", sha256="36cef6ba12b499d864d1def3e990f97949e0b79400d08b7cf74504ffbd3eb025")
@@ -36,39 +37,31 @@ class PyPyarrow(PythonPackage, CudaPackage):
version("0.11.0", sha256="07a6fd71c5d7440f2c42383dd2c5daa12d7f0a012f1e88288ed08a247032aead")
version("0.9.0", sha256="7db8ce2f0eff5a00d6da918ce9f9cfec265e13f8a119b4adb1595e5b19fd6242")
depends_on("cxx", type="build") # generated
depends_on("cxx", type="build")
variant("parquet", default=False, description="Build with Parquet support")
variant("orc", default=False, description="Build with orc support")
variant("dataset", default=False, description="Build with Dataset support")
with default_args(type="build"):
# CMakeLists.txt
depends_on("cmake@3.16:", when="@13:")
depends_on("cmake@3.5:", when="@11:")
depends_on("cmake@3.2:", when="@0.17:")
depends_on("cmake@2.7:")
conflicts("~parquet", when="+dataset")
# cmake_modules and pyarrow/__init__.py
depends_on("pkgconfig")
depends_on("cmake@3.0.0:", type="build")
depends_on("pkgconfig", type="build")
depends_on("python@3.8:", type=("build", "run"), when="@13:")
depends_on("python@3.7:", type=("build", "run"), when="@7:")
depends_on("python@3.6:", type=("build", "run"), when="@3:")
depends_on("python@3.5:", type=("build", "run"), when="@0.17:")
depends_on("py-setuptools", type="build")
depends_on("py-setuptools@40.1.0:", type="build", when="@10.0.1:")
depends_on("py-setuptools@38.6.0:", type="build", when="@7:")
depends_on("py-setuptools-scm@:7", type="build", when="@0.15:")
depends_on("py-cython", type="build")
depends_on("py-cython@0.29.31:", type="build", when="@14:")
depends_on("py-cython@0.29.31:2", type="build", when="@12:13")
depends_on("py-cython@0.29.22:2", type="build", when="@8:11")
depends_on("py-cython@0.29:2", type="build", when="@0.15:7")
depends_on("py-cython@:2", type="build", when="@:0.14")
# in newer pip versions --install-option does not exist
depends_on("py-pip@:23.0", type="build")
depends_on("py-numpy@1.16.6:", type=("build", "run"), when="@3:")
# Prior to python 3.9 numpy must be >=0.14,<1.25
depends_on("py-numpy@0.14:1.24", when="^python@:3.8", type=("build", "run"))
depends_on("py-numpy@1.25:", when="^python@3.9:", type=("build", "run"))
# https://github.com/apache/arrow/issues/39532
depends_on("py-numpy@:1", when="@:15", type=("build", "run"))
# pyproject.toml, setup.py
depends_on("py-cython@0.29.31:", when="@14:")
depends_on("py-cython@0.29.31:2", when="@12:13")
depends_on("py-cython@0.29.22:2", when="@8:11")
depends_on("py-cython@0.29:2", when="@0.15:7")
depends_on("py-cython@:2", when="@:0.14")
depends_on("py-setuptools-scm@8:+toml", when="@17:")
depends_on("py-setuptools-scm", when="@16")
depends_on("py-setuptools-scm@:7", when="@0.15:15")
depends_on("py-setuptools@64:", when="@17:")
depends_on("py-setuptools@40.1:", when="@10.0.1:")
depends_on("py-setuptools@38.6:", when="@7:")
depends_on("py-setuptools")
arrow_versions = (
"@0.9.0",
@@ -87,29 +80,41 @@ class PyPyarrow(PythonPackage, CudaPackage):
"@14.0.2",
"@15.0.2",
"@16.1.0",
"@19.0.1",
)
for v in arrow_versions:
depends_on("arrow+python" + v, when=v)
depends_on("arrow+parquet+python" + v, when="+parquet" + v)
depends_on("arrow+cuda" + v, when="+cuda" + v)
depends_on("arrow+orc" + v, when="+orc" + v)
# Historical dependencies
# In newer pip versions --install-option does not exist
depends_on("py-pip@:23.0", when="@:16", type="build")
with default_args(type=("build", "run")):
# pyproject.toml, setup.py
depends_on("py-numpy@1.16.6:", when="@3:17")
depends_on("py-numpy@1.14:", when="@0.11:")
depends_on("py-numpy@1.10:")
depends_on("py-numpy@:1", when="@:15")
patch("for_aarch64.patch", when="@0 target=aarch64:")
# Starting with pyarrow 17+, backend support is built if arrow was built with it
@when("@:16")
def setup_build_environment(self, env):
env.set("PYARROW_WITH_PARQUET", self.spec.satisfies("+parquet"))
env.set("PYARROW_WITH_CUDA", self.spec.satisfies("+cuda"))
env.set("PYARROW_WITH_ORC", self.spec.satisfies("+orc"))
env.set("PYARROW_WITH_DATASET", self.spec.satisfies("+dataset"))
env.set("PYARROW_WITH_PARQUET", self.spec.satisfies("^arrow+parquet"))
env.set("PYARROW_WITH_CUDA", self.spec.satisfies("^arrow+cuda"))
env.set("PYARROW_WITH_ORC", self.spec.satisfies("^arrow+orc"))
env.set("PYARROW_WITH_DATASET", self.spec.satisfies("^arrow+dataset"))
@when("@:16")
def install_options(self, spec, prefix):
args = []
if spec.satisfies("+parquet"):
if spec.satisfies("^arrow+parquet"):
args.append("--with-parquet")
if spec.satisfies("+cuda"):
if spec.satisfies("^arrow+cuda"):
args.append("--with-cuda")
if spec.satisfies("+orc"):
if spec.satisfies("^arrow+orc"):
args.append("--with-orc")
if spec.satisfies("+dataset"):
if spec.satisfies("^arrow+dataset"):
args.append("--with-dataset")
return args

View File

@@ -22,7 +22,9 @@ class PyPymc3(PythonPackage):
depends_on("py-setuptools", type="build")
depends_on("py-arviz@0.4.1:", type=("build", "run"))
depends_on("py-theano@1.0.4:", type=("build", "run"))
depends_on("py-numpy@1.13.0:", type=("build", "run"))
# numpy 2 support added in pymc 5.21, pymc3 is the legacy package
# https://github.com/pymc-devs/pymc/pull/7688
depends_on("py-numpy@1.13.0:1", type=("build", "run"))
depends_on("py-scipy@0.18.1:", type=("build", "run"))
depends_on("py-pandas@0.18.0:", type=("build", "run"))
depends_on("py-patsy@0.4.0:", type=("build", "run"))

View File

@@ -10,39 +10,66 @@ class PyRpy2(PythonPackage):
interface to R from Python, a proposed high-level interface,
including wrappers to graphical libraries, as well as R-like
structures and functions.
"""
homepage = "https://rpy2.github.io"
pypi = "rpy2/rpy2-2.5.4.tar.gz"
license("GPL-2.0-or-later")
version("3.0.4", sha256="2af5158a5d56af7f7bf5e54d8d7e87b6f115ff40f056d82f93cad0cbf6acc0cb")
version("3.0.0", sha256="34efc2935d9015527837d6b1de29641863d184b19d39ad415d5384be8a015bce")
version("2.9.4", sha256="be57f741d0c284b5d8785ab03dff0e829303e5ac30e548d5ceb46e05b168812e")
version("2.8.6", sha256="004d13734a7b9a85cbc1e7a93ec87df741e28db1273ab5b0d9efaac04a9c5f98")
version("2.5.6", sha256="d0d584c435b5ed376925a95a4525dbe87de7fa9260117e9f208029e0c919ad06")
version("2.5.4", sha256="d521ecdd05cd0c31ab017cb63e9f63c29b524e46ec9063a920f640b5875f8a90")
maintainers("Chrismarsh")
# FIXME: Missing dependencies:
# ld: cannot find -licuuc
# ld: cannot find -licui18
version("3.5.17", sha256="dbff08c30f3d79161922623858a5b3b68a3fba8ee1747d6af41bc4ba68f3d582")
# All versions
depends_on("py-setuptools", type="build")
depends_on("r", type=("build", "run"))
# these are from 2019 and don't cleanly work with new r (4+) and pandas versions
# but the exact version incompatibility range is not clear without substantial testing
with default_args(deprecated=True):
version("3.0.4", sha256="2af5158a5d56af7f7bf5e54d8d7e87b6f115ff40f056d82f93cad0cbf6acc0cb")
version("3.0.0", sha256="34efc2935d9015527837d6b1de29641863d184b19d39ad415d5384be8a015bce")
# @3.0.0:
depends_on("py-cffi@1.0.0:", when="@3.0.0:", type=("build", "run"))
depends_on("py-simplegeneric", when="@3.0.0:", type=("build", "run"))
depends_on("py-pytest", when="@3:", type=("build", "run"))
variant("numpy", default=True, description="Numpy", when="@3.5.17:")
variant("pandas", default=True, description="Pandas", when="@3.5.17:")
variant("ipython", default=True, description="iPython", when="@3.5.17:")
# @2.9.0:
depends_on("r@3.3:", when="@2.9.0:", type=("build", "run"))
depends_on("python@3.5:", when="@2.9.0:", type=("build", "run"))
depends_on("py-jinja2", when="@2.9.0:", type=("build", "run"))
depends_on("py-six", when="@2.9.0:2.9", type=("build", "run"))
# many of the previous minor and patch versions change dependency versions so future updates
# should be careful of that
depends_on("python@3.8:", type=("build", "run"), when="@3.5.17:")
# @:2.8.6
depends_on("r@2.8:", when="@:2.8.6", type=("build", "run"))
depends_on("python@2.7:2.8,3.5:", type=("build", "run"))
# https://github.com/rpy2/rpy2/blob/RELEASE_3_5_17/setup.py#L42C1-L42C14
depends_on("r@3.5:", type=("build", "run"), when="@3.5.17:")
depends_on("py-setuptools@61:", type="build", when="@3.5.17:")
# not explicity stated as required but needed from testing
depends_on("readline", type=("build", "run"), when="@3.5.17:")
# @1.15.1: is needed for run, @1.15.0: for build but use one version for simplicity
depends_on("py-cffi@1.15.1:", type=("build", "run"), when="@3.5.17:")
depends_on("py-jinja2", type=("build", "run"), when="@3.5.17:")
depends_on("py-tzlocal", type=("build", "run"), when="@3.5.17:")
# optional variant
depends_on("py-ipython", type=("build", "run"), when="+ipython")
# optional variant
depends_on("py-numpy@1.26:", type=("build", "run"), when="+numpy ^python@3.9:")
depends_on("py-numpy@:1.25", type=("build", "run"), when="+numpy ^python@:3.8")
# optional variant
depends_on("py-pandas", type=("build", "run"), when="+pandas ^python@:3.9")
depends_on("py-pandas@1.3.5:", type=("build", "run"), when="+pandas ^python@3.10:")
depends_on("py-backports-zoneinfo", type=("build", "run"), when="@3.5.17: ^python@:3.8")
# These are from 2019 and predate the pyproject.toml config that currently exists
with when("@3.0.0:3.0.4"):
# Doesn't support post-distutil removal until 3.5.13
# https://github.com/rpy2/rpy2/releases/tag/RELEASE_3_5_13
depends_on("python@3.5:3.11", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-cffi@1.0.0:", type=("build", "run"))
depends_on("py-simplegeneric", type=("build", "run"))
depends_on("py-pytest", type=("build", "run"))
depends_on("r@3.3:", type=("build", "run"))

View File

@@ -14,6 +14,7 @@ class PyTorchmetrics(PythonPackage):
license("Apache-2.0")
maintainers("adamjstewart")
version("1.6.2", sha256="a3fa6372dbf01183d0f6fda2159e9526fb62818aa3630660909c290425f67df6")
version("1.6.1", sha256="a5dc236694b392180949fdd0a0fcf2b57135c8b600e557c725e077eb41e53e64")
version("1.6.0", sha256="aebba248708fb90def20cccba6f55bddd134a58de43fb22b0c5ca0f3a89fa984")
version("1.5.2", sha256="2d0e4957af0ea76438d2779fe1a626d8cba6cda8607eadb54267598153e7ea63")

View File

@@ -10,7 +10,8 @@
class Qrupdate(MakefilePackage, SourceforgePackage):
"""qrupdate is a Fortran library for fast updates of QR and
Cholesky decompositions."""
Cholesky decompositions.
"""
homepage = "https://sourceforge.net/projects/qrupdate/"
sourceforge_mirror_path = "qrupdate/qrupdate-1.1.2.tar.gz"
@@ -35,7 +36,7 @@ def edit(self, spec, prefix):
makefile = FileFilter("Makefile")
makefile.filter("make", "$(MAKE)")
# We may like to compile with any Forran compiler, not always gfortran
# We may like to compile with any Fortran compiler, not always gfortran
makefile = FileFilter("Makeconf")
makefile.filter("FC=gfortran", "FC ?= gfortran")
@@ -45,16 +46,11 @@ def edit(self, spec, prefix):
def build(self, spec, prefix):
lapack_blas = spec["lapack"].libs + spec["blas"].libs
make_args = [
"BLAS={0}".format(lapack_blas.ld_flags),
"LAPACK={0}".format(lapack_blas.ld_flags),
]
make_args = [f"BLAS={lapack_blas.ld_flags}", f"LAPACK={lapack_blas.ld_flags}"]
# If 64-bit BLAS is used:
if (
spec.satisfies("^openblas+ilp64")
or spec.satisfies("^intel-mkl+ilp64")
or spec.satisfies("^intel-parallel-studio+mkl+ilp64")
if spec.satisfies("^[virtuals=lapack] openblas+ilp64") or spec.satisfies(
"^[virtuals=lapack] intel-oneapi-mkl+ilp64"
):
if spec.satisfies("%intel") or spec.satisfies("%oneapi") or spec.satisfies("%nvhpc"):
# 64bits integer for ifort and nvfortran are promoted by:

View File

@@ -17,6 +17,7 @@ class Qt5compat(QtPackage):
license("LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only")
version("6.8.2", sha256="9b78a025f17d65eb826ee153f167546e6c12790235d75b7f4fcd03c166d9c689")
version("6.8.1", sha256="5e51feb8d9362d860017ae72f63daa5caeddf3ec3396e73a4b27c672536fd774")
version("6.8.0", sha256="0ea312a2d7e7033857712273e5ea42e61d1f485d23420307f7bbf0b8ca701453")
version("6.7.3", sha256="959634d1a6a53f9a483882e81da87ec182ff44d7747a0cc771c786b0f2cf52e0")

View File

@@ -3,7 +3,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import re
import shutil
import sys
import tempfile
@@ -59,17 +58,6 @@ def cmake_args(self):
# Start with upstream cmake_args
args = super().cmake_args()
# Qt components typically install cmake config files in a single prefix,
# so we have to point them to the cmake config files of dependencies
qt_prefix_path = []
re_qt = re.compile("qt-.*")
for dep in self.spec.dependencies():
if re_qt.match(dep.name):
qt_prefix_path.append(self.spec[dep.name].prefix)
# Now append all qt-* dependency prefixes into a prefix path
args.append(self.define("QT_ADDITIONAL_PACKAGES_PREFIX_PATH", ":".join(qt_prefix_path)))
# Make our CMAKE_INSTALL_RPATH redundant:
# for prefix of current package ($ORIGIN/../lib type of rpaths),
args.append(self.define("QT_DISABLE_RPATH", True))
@@ -130,6 +118,16 @@ def setup_run_environment(self, env):
if os.path.exists(self.prefix.plugins):
env.prepend_path("QT_PLUGIN_PATH", self.prefix.plugins)
def setup_dependent_build_environment(self, env, dependent_spec):
# Qt components typically install cmake config files in a single prefix,
# so we have to point dependencies to the cmake config files.
env.prepend_path("QT_ADDITIONAL_PACKAGES_PREFIX_PATH", self.spec.prefix)
# Qt creates SBOM files based on the used SBOM files in the prefix, and
# in additional paths for other components.
if self.spec.satisfies("@6.9:"):
env.prepend_path("QT_ADDITIONAL_SBOM_DOCUMENT_PATHS", self.spec.prefix)
class QtBase(QtPackage):
"""Qt Base (Core, Gui, Widgets, Network, ...)"""
@@ -141,6 +139,7 @@ class QtBase(QtPackage):
license("BSD-3-Clause")
version("6.8.2", sha256="9dddbb2ea3c107e20a99b816c1c6ba1483915325918936dda2c762bd73836ad9")
version("6.8.1", sha256="9b81b83e4079d2f79ae057902973fc0ebb10d566ec022f483e7c0f2294acb19c")
version("6.8.0", sha256="3e526ceaaf615005bc89a98ee8a52b87db6fefe7155595bf75c40fd82cd1a7ce")
version("6.7.3", sha256="65771d1618cab08ec5e9bbfdc265b5d2ce2ccf0373143d7d9d139647a7196aec")

View File

@@ -15,6 +15,7 @@ class QtDeclarative(QtPackage):
license("BSD-3-Clause")
version("6.8.2", sha256="1c29e98fac88f6d3b8a790248f4e6ad80439fe6e791116339d080e064ad8ae91")
version("6.8.1", sha256="c3f41f5de5b2f02aa31bc5668f617f65d9adb3fb1939679b2a57a73a98c36ed6")
version("6.8.0", sha256="d28e15cec7754ee16588deace17ee83d75e2613f4751a79dd60c277721f7480f")
version("6.7.3", sha256="f39fa4e7e3b4011e52fc55fbde5f41e61815bffea432869abc9b90aa4de07613")

View File

@@ -15,6 +15,7 @@ class QtQuick3d(QtPackage):
license("BSD-3-Clause")
version("6.8.2", sha256="2901927d84fa3e55cd598575fa8a47dd97c770ed3c1893af9c9ee2aa167b7433")
version("6.8.1", sha256="67878e0ecb9e8b760567364afd3c1b90d8c65087d8f676e9df51cad95df1bf21")
version("6.8.0", sha256="3fc965c7c867e21d894e5394ec1c3f7626ecb895e335115661133ac499a14408")
version("6.7.3", sha256="3e68f3a9a330e7b9a92ddf5b8d7a0874a107ea77636c788f598de65e327eb4a0")

View File

@@ -15,6 +15,7 @@ class QtQuicktimeline(QtPackage):
license("BSD-3-Clause")
version("6.8.2", sha256="74050e1b87495a500b66d114ba2311e9d2feb5bdadb46979b6986aedf93cd97e")
version("6.8.1", sha256="29d79b17c0de962ce5dc9f2984eb89b701946522537cf5c90ca803c75148de19")
version("6.8.0", sha256="3128c0f1a9e944c52ac8d080ecab7e7ed2a37e67cd06ab573dc178b3f8832fb4")
version("6.7.3", sha256="81ce374a22bf00d53d0a9d5293d6495a224137e9427e4d4913d87f2f0adc5a58")

View File

@@ -17,6 +17,7 @@ class QtShadertools(QtPackage):
license("BSD-3-Clause")
version("6.8.2", sha256="13d62df354ca2ca034d8a28263ee67104a6d94f5671417152556eb5eb3d64839")
version("6.8.1", sha256="b780ae2746d98fa3fc896c8ea8cd5c17ea360bedb33948e7343946bd9b115c24")
version("6.8.0", sha256="19a6fce3e958d8e8d6cb2c13501a4a8fa61ad9e5bc0cd0496901b34012f2362e")
version("6.7.3", sha256="8ec6a48c41d49b6f9595659169b2c69aecd46e96a88131f19f6a4cda394fa3f4")

View File

@@ -17,6 +17,7 @@ class QtSvg(QtPackage):
license("BSD-3-Clause")
version("6.8.2", sha256="b2d1f8acc7471658c963cacf8dc99912fd20e7072b3bdf7a53ccf99ba41788e8")
version("6.8.1", sha256="288f233991686bc411a11cc331fb1be5f12ed43be03e29639158e545685ce7c9")
version("6.8.0", sha256="ec3112668b7b8cfd1790bf4f936268dd6d32251ea81bb20d3aa4c4bac2031866")
version("6.7.3", sha256="2852d8f1f52b60f0624ca5edf479125e4b32d579b1177d8b76d8e28fac98a701")
@@ -37,7 +38,8 @@ class QtSvg(QtPackage):
version("6.4.0", sha256="375eb69f320121e42d5dc107f9455008980c149646931b8ace19e6bc235dcd80")
version("6.3.2", sha256="781055bca458be46ef69f2fff147a00226e41f3a23d02c91238b0328a7156518")
depends_on("cxx", type="build") # generated
depends_on("c", type="build")
depends_on("cxx", type="build")
variant("widgets", default=False, description="Build SVG widgets.")

View File

@@ -19,6 +19,7 @@ class QtTools(QtPackage):
license("BSD-3-Clause")
# src/assistant/qlitehtml is a submodule that is not in the git archive
version("6.8.2", commit="8aa2456d4461516f54c98916fcd699557afb41ad", submodules=True)
version("6.8.1", commit="b0d66c51cbda17b213bed73d379f0900c77f457c", submodules=True)
version("6.8.0", commit="3dd2b6ad0dd1a0480628b4cc74cb7b89a89e4a61", submodules=True)
version("6.7.3", commit="ec4747e62a837a0262212a5f4fb03734660c7360", submodules=True)

View File

@@ -18,6 +18,8 @@ class Qwt(QMakePackage):
license("custom")
version("6.3.0", sha256="dcb085896c28aaec5518cbc08c0ee2b4e60ada7ac929d82639f6189851a6129a")
version("6.2.0", sha256="9194f6513955d0fd7300f67158175064460197abab1a92fa127a67a4b0b71530")
version("6.1.6", sha256="99460d31c115ee4117b0175d885f47c2c590d784206f09815dc058fbe5ede1f6")
version("6.1.4", sha256="1529215329e51fc562e0009505a838f427919a18b362afff441f035b2d9b5bd9")
version("6.1.3", sha256="f3ecd34e72a9a2b08422fb6c8e909ca76f4ce5fa77acad7a2883b701f4309733")
@@ -31,11 +33,19 @@ class Qwt(QMakePackage):
patch("no-designer.patch", when="~designer")
patch("no-opengl_6_1.patch", when="@6.1 ~opengl")
depends_on("qt+tools", when="+designer")
depends_on("qt+opengl", when="+opengl")
depends_on("qmake")
with when("^[virtuals=qmake] qt-base"):
depends_on("qt-svg")
depends_on("qt-tools", when="+designer")
depends_on("qt-base+opengl+widgets", when="+opengl")
with when("^[virtuals=qmake] qt"):
depends_on("qt+tools", when="+designer")
depends_on("qt+opengl", when="+opengl")
# Qwt does not support Qt6; this picks the right qmake provider
conflicts("^qt-base", msg="Qwt requires Qt5")
# Qwt@:6.1 does not support Qt6; this picks the right qmake provider
conflicts(
"^[virtuals=qmake] qt-base", when="@:6.1", msg="Qwt support for Qt6 was added in v6.2.0"
)
# the qt@5.14.2 limitation was lifted in qwt@6.1.5
# https://sourceforge.net/p/qwt/code/HEAD/tree/tags/qwt-6.1.6/CHANGES-6.1

View File

@@ -41,3 +41,7 @@ class RDataTable(RPackage):
depends_on("r@3.1.0:", type=("build", "run"))
depends_on("zlib-api")
depends_on("llvm-openmp", when="platform=darwin %apple-clang", type=("build", "run"))
# gettext linkage is passed in from libR, however data-table looks for libintl.h directly
depends_on("gettext")

View File

@@ -37,3 +37,5 @@ class RMatrix(RPackage):
depends_on("r@3.5.0:", type=("build", "run"), when="@1.3-3:")
depends_on("r@4.4.0:", type=("build", "run"), when="@1.7-0:")
depends_on("r-lattice", type=("build", "run"))
# looks for libintl.h directly
depends_on("gettext")

View File

@@ -41,3 +41,4 @@ class RMgcv(RPackage):
depends_on("r@3.6.0:", type=("build", "run"), when="@1.8.34:")
depends_on("r-nlme@3.1-64:", type=("build", "run"))
depends_on("r-matrix", type=("build", "run"))
depends_on("gettext")

View File

@@ -34,3 +34,6 @@ class RNlme(RPackage):
depends_on("r@3.4.0:", type=("build", "run"), when="@3.1-135.5:")
depends_on("r@3.6.0:", type=("build", "run"), when="@3.1-165:")
depends_on("r-lattice", type=("build", "run"))
# looks for libintl.h directly
depends_on("gettext")

View File

@@ -96,6 +96,7 @@ class R(AutotoolsPackage):
depends_on("zlib-api")
depends_on("zlib@1.2.5:", when="^[virtuals=zlib-api] zlib")
depends_on("texinfo", type="build")
depends_on("gettext")
with when("+X"):
depends_on("cairo+X+gobject+pdf")
@@ -197,6 +198,8 @@ def configure_args(self):
"ac_cv_path_TEXI2DVI=",
]
config_args.append("--with-libintl-prefix={0}".format(spec["gettext"].prefix))
if "+X" in spec:
config_args.append("--with-cairo")
config_args.append("--with-jpeglib")

View File

@@ -69,6 +69,7 @@ class Rccl(CMakePackage):
values=auto_or_any_combination_of(*amdgpu_targets),
sticky=True,
)
variant("asan", default=False, description="Build with address-sanitizer enabled or disabled")
patch("0003-Fix-numactl-rocm-smi-path-issue.patch", when="@5.2.3:5.6")
patch("0004-Set-rocm-core-path-for-version-file.patch", when="@6.0:6.2")
@@ -143,6 +144,11 @@ def determine_version(cls, lib):
def setup_build_environment(self, env):
env.set("CXX", self.spec["hip"].hipcc)
env.set("ROCMCORE_PATH", self.spec["rocm-core"].prefix)
if self.spec.satisfies("+asan"):
env.set("ASAN_OPTIONS", "detect_leaks=0")
env.set("CFLAGS", "-fsanitize=address -shared-libasan")
env.set("CXXFLAGS", "-fsanitize=address -shared-libasan")
env.set("LDFLAGS", "-fuse-ld=lld")
def cmake_args(self):
args = [

View File

@@ -364,14 +364,6 @@ def setup_build_environment(self, env):
env.set("FC", "{0}/bin/flang".format(openmp_extras_prefix))
if self.spec.satisfies("@6.1:"):
env.prepend_path("LD_LIBRARY_PATH", self.spec["hsa-rocr-dev"].prefix.lib)
if self.spec.satisfies("+asan"):
env.set("SANITIZER", 1)
env.set("VERBOSE", 1)
env.set(
"LDSHARED",
self.spec["llvm-amdgpu"].prefix.bin.clang
+ " -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2",
)
gfx_list = "gfx700 gfx701 gfx801 gfx803 gfx900 gfx902 gfx906 gfx908"
if self.spec.version >= Version("4.3.1"):
@@ -611,6 +603,13 @@ def install(self, spec, prefix):
"-DHSAKMT_LIB={0}/lib".format(hsakmt_prefix),
"-DHSAKMT_LIB64={0}/lib64".format(hsakmt_prefix),
]
if self.spec.satisfies("+asan"):
openmp_common_args += [
"-DASAN_OPTIONS=detect_leaks=0",
"-DCMAKE_C_FLAGS=-fsanitize=address -shared-libasan",
"-DCMAKE_CXX_FLAGS=-fsanitize=address -shared-libasan",
"-DCMAKE_LD_FLAGS=-fuse-ld=lld",
]
components["openmp"] = ["../rocm-openmp-extras/llvm-project/openmp"]
components["openmp"] += openmp_common_args

View File

@@ -76,6 +76,9 @@ class RocmSmiLib(CMakePackage):
]:
depends_on(f"rocm-core@{ver}", when=f"@{ver}")
for ver in ["6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4", "6.3.0", "6.3.1", "6.3.2"]:
depends_on("llvm-amdgpu", when=f"@{ver}+asan")
patch(
"https://github.com/ROCm/rocm_smi_lib/commit/11f12b86517d0e9868f4d16d74d4e8504c3ba7da.patch?full_index=1",
sha256="62be7262f6e1e71bf82a03f500a424a536638f04e913d0f4b477f60e8e1190fd",
@@ -94,6 +97,15 @@ def cmake_args(self):
args.append(self.define_from_variant("ADDRESS_SANITIZER", "asan"))
return args
def setup_build_environment(self, env):
if self.spec.satisfies("@6.1: +asan"):
env.set("CC", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang")
env.set("CXX", f"{self.spec['llvm-amdgpu'].prefix}/bin/clang++")
env.set("ASAN_OPTIONS", "detect_leaks=0")
env.set("CFLAGS", "-fsanitize=address -shared-libasan")
env.set("CXXFLAGS", "-fsanitize=address -shared-libasan")
env.set("LDFLAGS", "-fuse-ld=lld")
@classmethod
def determine_version(cls, lib):
match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib)

View File

@@ -35,7 +35,7 @@ class Seacas(CMakePackage):
# ###################### Versions ##########################
version("master", branch="master")
version(
"2025-02-27", sha256="3906fedf17e0a5f1c6f941cb94b56134f41abe4da89f4ec25766fc33b327f521"
"2025-02-27", sha256="224468d6215b4f4b15511ee7a29f755cdd9e7be18c08dfece9d9991e68185cfc"
)
version(
"2024-08-15", sha256="c85130b0dac5ab9a08dcb53c8ccff478122d72b08bd41d99c0adfddc5eb18a52"

View File

@@ -288,7 +288,7 @@ class Sundials(CMakePackage, CudaPackage, ROCmPackage):
# ==========================================================================
# https://github.com/LLNL/sundials/pull/434
# https://github.com/LLNL/sundials/pull/437
patch("sundials-hip-platform.patch", when="@7.0.0 +rocm")
patch("sundials-hip-platform.patch", when="@6.7.0:7.0.0 +rocm")
# https://github.com/spack/spack/issues/29526
patch("nvector-pic.patch", when="@6.1.0:6.2.0 +rocm")

View File

@@ -19,8 +19,11 @@ class Tmux(AutotoolsPackage):
license("ISC")
version("3.5a", sha256="16216bd0877170dfcc64157085ba9013610b12b082548c7c9542cc0103198951")
version("3.5", sha256="2fe01942e7e7d93f524a22f2c883822c06bc258a4d61dba4b407353d7081950f")
version("3.4", sha256="551ab8dea0bf505c0ad6b7bb35ef567cdde0ccb84357df142c254f35a23e19aa")
version("3.3a", sha256="e4fd347843bd0772c4f48d6dde625b0b109b7a380ff15db21e97c11a4dcdf93f")
version("3.3", sha256="b2382ac391f6a1c5b93293016cdc9488337d9a04b9d611ae05eac164740351dc")
version("3.2a", sha256="551553a4f82beaa8dadc9256800bcc284d7c000081e47aa6ecbb6ff36eacd05f")
version("3.2", sha256="664d345338c11cbe429d7ff939b92a5191e231a7c1ef42f381cebacb1e08a399")
version("3.1c", sha256="918f7220447bef33a1902d4faff05317afd9db4ae1c9971bef5c787ac6c88386")
@@ -48,6 +51,9 @@ class Tmux(AutotoolsPackage):
"utf8proc", default=False, description="Build with UTF-8 support from utf8proc library"
)
variant("static", default=False, description="Create a static build")
variant(
"jemalloc", default=False, description="Use jemalloc for memory allocation", when="@3.5:"
)
# used by configure to e.g. find libtinfo
depends_on("pkgconfig", type="build")
@@ -55,6 +61,7 @@ class Tmux(AutotoolsPackage):
depends_on("ncurses")
depends_on("utf8proc", when="+utf8proc")
depends_on("jemalloc", when="+jemalloc")
depends_on("automake", when="@master")
depends_on("autoconf", when="@master")
@@ -66,7 +73,7 @@ class Tmux(AutotoolsPackage):
patch(
"https://github.com/tmux/tmux/commit/775789fbd5c4f3aa93061480cd64e61daf7fb689.patch?full_index=1",
sha256="c1b61a1244f758480578888d3f89cac470271c376ea0879996b81e10b397cad0",
when="@2.4:",
when="@2.4:3.4",
)
@run_before("autoreconf")
@@ -80,5 +87,6 @@ def configure_args(self):
options.extend(self.enable_or_disable("utf8proc"))
options.extend(self.enable_or_disable("static"))
options.extend(self.enable_or_disable("jemalloc"))
return options

View File

@@ -39,6 +39,13 @@ class Veccore(CMakePackage):
variant("vc", default=False, description="Enable Vc backend")
# Fix a typo in ScalarWrapper.h
patch(
"https://github.com/root-project/veccore/commit/247b9c6bd48a26b298a73683bb6015b08829ca70.patch?full_index=1",
sha256="7ea1b7ade302201fefe0b460ed32e86c39f241e4554e77e19c144985339e47f9",
when="@:0.8.1",
)
depends_on("cmake@3.16:", type="build", when="@0.8.1:")
depends_on("vc@1.2.0:", when="@0.2.0: +vc")
depends_on("vc@1.3.3:", when="@0.6.0: +vc")

View File

@@ -19,11 +19,17 @@ class Vecgeom(CMakePackage, CudaPackage):
maintainers("drbenmorgan", "sethrj")
version("master", branch="master")
version("master", branch="master", get_full_repo=True)
version(
"2.0.0-surfacedev.1",
tag="v2.0.0-surfacedev.1",
commit="1d9797ea47e3b35ab0114e72ce5925ecbd59cbf4",
)
version(
"1.2.10",
url="https://gitlab.cern.ch/-/project/981/uploads/8e0a94013efdd1b2d4f44c3fbb10bcdf/VecGeom-v1.2.10.tar.gz",
sha256="3e0934842694452e4cb4a265428cb99af1ecc45f0e2d28a32dfeaa0634c21e2a",
preferred=True,
)
version(
"1.2.9",
@@ -88,6 +94,7 @@ class Vecgeom(CMakePackage, CudaPackage):
variant("geant4", default=False, description="Support Geant4 geometry construction")
variant("root", default=False, description="Support ROOT geometry construction")
variant("shared", default=True, description="Build shared libraries")
variant("surface", default=False, when="@2:", description="Use surface frame representation")
depends_on("veccore")
depends_on("veccore@0.8.1:", when="+cuda")
@@ -97,6 +104,9 @@ class Vecgeom(CMakePackage, CudaPackage):
conflicts("+cuda", when="@:1.1.5")
# NOTE: surface branch doesn't yet compile with volume
conflicts("~surface", when="@=2.0.0-surfacedev.1")
# Fix empty -Xcompiler= with nvcc
patch(
"https://gitlab.cern.ch/VecGeom/VecGeom/-/commit/0bf9b675ab70eb5cb9409ff73c1152fd1326dbf4.diff",
@@ -159,6 +169,8 @@ def cmake_args(self):
raise InstallError("Exactly one cuda_arch must be specified")
args.append(define("CUDA_ARCH", arch[0]))
args.append(from_variant("VECGEOM_USE_SURF", "surface"))
# Set testing flags
build_tests = self.run_tests
args.append(define("BUILD_TESTING", build_tests))

View File

@@ -0,0 +1,12 @@
diff --git a/src/gui/QvisStripChart.C b/src/gui/QvisStripChart.C
index 452e2c29e93b0f1b4a1b6e9b5be48288ac5fdd3f..cbb8582e9ab72c5afa29d606ce86e0a4573c0b89 100644
--- a/src/gui/QvisStripChart.C
+++ b/src/gui/QvisStripChart.C
@@ -18,6 +18,7 @@
#include <DebugStream.h>
+#include <cmath>
#include <sstream>
#include <iostream>
#include <limits>

View File

@@ -120,6 +120,9 @@ class Visit(CMakePackage):
patch("19958-enable-python-and-check-pip.patch", when="@3.4:3.4.1 +python")
patch("20127-remove-relink-visitmodule-py-setup.patch", when="@3.4.1 +python")
# Fix missing cmath include in QvisStripChart.C
patch("20270-missing-cmath-QvisStripChart.patch", when="@:3.4.2")
conflicts(
"+gui", when="^[virtuals=gl] osmesa", msg="GUI cannot be activated with OSMesa front-end"
)

View File

@@ -0,0 +1,65 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class Xolotl(CMakePackage, CudaPackage):
"""Xolotl is a high-performance computing code using
advection-reaction-diffusion (ADR) kinetic rate theory to model the
time evolution of the divertor material in next generation tokamaks,
like ITER, as well as nuclear fuel in fission reactors."""
homepage = "https://github.com/ORNL-Fusion/xolotl"
url = "https://github.com/ORNL-Fusion/xolotl/archive/refs/tags/v3.1.0.tar.gz"
git = "https://github.com/ORNL-Fusion/xolotl.git"
# notify when the package is updated.
maintainers("sblondel", "PhilipFackler")
license("BSD-3-Clause", checked_by="PhilipFackler")
version("3.1.0", sha256="68a495ab0c3efb495189f73474d218eb591099b90d52d427ac868b63e8fc2ee8")
depends_on("cxx", type="build")
depends_on("mpi")
depends_on("boost +log +program_options")
depends_on("hdf5 +mpi")
variant("int64", default=True, description="Use 64-bit indices")
variant("openmp", default=False, description="Activates OpenMP backend")
conflicts("+cuda", when="cuda_arch=none")
conflicts("+openmp", when="+cuda", msg="Can't use both OpenMP and CUDA")
depends_on("petsc ~fortran +kokkos")
depends_on("petsc +int64", when="+int64")
depends_on("petsc +openmp", when="+openmp")
depends_on("plsm@2.0.4", when="@3.1.0")
depends_on("plsm")
depends_on("plsm +int64", when="+int64")
depends_on("plsm +openmp", when="+openmp")
for cuda_arch in CudaPackage.cuda_arch_values:
depends_on(f"petsc+cuda cuda_arch={cuda_arch}", when=f"+cuda cuda_arch={cuda_arch}")
depends_on(f"plsm+cuda cuda_arch={cuda_arch}", when=f"+cuda cuda_arch={cuda_arch}")
variant("papi", default=False, description="Activates PAPI perfHandler")
depends_on("papi", when="+papi")
variant("vtkm", default=False, description="Activates VTK-m vizHandler")
depends_on("vtk-m", when="+vtkm")
depends_on("boost +test", type="test")
def cmake_args(self):
args = [self.define("BUILD_TESTING", self.run_tests)]
spec = self.spec
if "+vtk-m" in spec:
args.append(self.define("VTKm_DIR", spec["vtk-m"].prefix))
return args

View File

@@ -27,8 +27,10 @@ class Xz(MSBuildPackage, AutotoolsPackage, SourceforgePackage):
license("GPL-2.0-or-later AND Public-Domain AND LGPL-2.1-or-later", checked_by="tgamblin")
# NOTE: don't add XZ 5.6 until this compromise is resolved:
# https://www.openwall.com/lists/oss-security/2024/03/29/4
version("5.6.3", sha256="a95a49147b2dbb5487517acc0adcd77f9c2032cf00664eeae352405357d14a6c")
version("5.6.2", sha256="e12aa03cbd200597bd4ce11d97be2d09a6e6d39a9311ce72c91ac7deacde3171")
# ALERT: don't add XZ 5.6.0 or 5.6.1, https://nvd.nist.gov/vuln/detail/CVE-2024-3094
version("5.4.7", sha256="9976ed9cd0764e962d852d7d519ee1c3a7f87aca3b86e5d021a45650ba3ecb41")
version("5.4.6", sha256="913851b274e8e1d31781ec949f1c23e8dbcf0ecf6e73a2436dc21769dd3e6f49")
version("5.4.5", sha256="8ccf5fff868c006f29522e386fb4c6a1b66463fbca65a4cfc3c4bd596e895e79")
version("5.4.1", sha256="dd172acb53867a68012f94c17389401b2f274a1aa5ae8f84cbfb8b7e383ea8d3")
@@ -60,6 +62,7 @@ class Xz(MSBuildPackage, AutotoolsPackage, SourceforgePackage):
conflicts("platform=windows", when="+pic") # no pic on Windows
# prior to 5.2.3, build system is for MinGW only, not currently supported by Spack
conflicts("platform=windows", when="@:5.2.3")
conflicts("platform=windows", when="@5.6:") # CMake is required
patch(
"nvhpc.patch",