Compare commits

..

1 Commits

Author SHA1 Message Date
psakiev
707cc32d70 Spack-Snake: A stack for python
Spack has the ability to provide a binary cache of python packages
for general use in the scientific and data analytics communities.
This PR is an effort to begin such a collection
2025-05-07 21:36:37 -06:00
68 changed files with 383 additions and 510 deletions

View File

@@ -539,9 +539,7 @@ from the command line.
You can also include an environment directly in the ``spack.yaml`` file. It
involves adding the ``include_concrete`` heading in the yaml followed by the
absolute path to the independent environments. Note, that you may use Spack
config variables such as ``$spack`` or environment variables as long as the
expression expands to an absolute path.
absolute path to the independent environments.
.. code-block:: yaml
@@ -551,7 +549,7 @@ expression expands to an absolute path.
unify: true
include_concrete:
- /absolute/path/to/environment1
- $spack/../path/to/environment2
- /absolute/path/to/environment2
Once the ``spack.yaml`` has been updated you must concretize the environment to

View File

@@ -497,7 +497,7 @@ extends Spack's ``Package`` class. For example, here is
.. code-block:: python
:linenos:
from spack.package import *
from spack import *
class Libelf(Package):
""" ... description ... """
@@ -1089,7 +1089,7 @@ You've already seen the ``homepage`` and ``url`` package attributes:
.. code-block:: python
:linenos:
from spack.package import *
from spack import *
class Mpich(Package):
@@ -6183,7 +6183,7 @@ running:
.. code-block:: python
from spack.package import *
from spack import *
This is already part of the boilerplate for packages created with
``spack create``.

View File

@@ -350,7 +350,7 @@ def _ensure_no_folders_without_package_py(error_cls):
for repository in spack.repo.PATH.repos:
missing = []
for entry in os.scandir(repository.packages_path):
if not entry.is_dir() or entry.name == "__pycache__":
if not entry.is_dir():
continue
package_py = pathlib.Path(entry.path) / spack.repo.package_file_name
if not package_py.exists():

View File

@@ -717,11 +717,7 @@ def _read_specs_and_push_index(
temp_dir: Location to write index.json and hash for pushing
"""
for file in file_list:
try:
fetched_spec = spack.spec.Spec.from_dict(read_method(file))
except Exception as e:
tty.warn(f"Unable to fetch spec for manifest {file} due to: {e}")
continue
fetched_spec = spack.spec.Spec.from_dict(read_method(file))
db.add(fetched_spec)
db.mark(fetched_spec, "in_buildcache", True)
@@ -754,7 +750,6 @@ def file_read_method(manifest_path):
cache_entry.destroy()
return spec_dict
url_to_list = url_util.join(url, buildcache_relative_specs_url())
sync_command_args = [
"s3",
"sync",
@@ -762,11 +757,11 @@ def file_read_method(manifest_path):
"*",
"--include",
"*.spec.manifest.json",
url_to_list,
url,
tmpspecsdir,
]
tty.debug(f"Using aws s3 sync to download manifests from {url_to_list} to {tmpspecsdir}")
tty.debug(f"Using aws s3 sync to download manifests from {url} to {tmpspecsdir}")
try:
aws(*sync_command_args, output=os.devnull, error=os.devnull)

View File

@@ -56,7 +56,7 @@ def is_package(f):
"""Whether flake8 should consider a file as a core file or a package.
We run flake8 with different exceptions for the core and for
packages, since we allow `from spack.package import *` and poking globals
packages, since we allow `from spack import *` and poking globals
into packages.
"""
return f.startswith("var/spack/") and f.endswith("package.py")

View File

@@ -1049,11 +1049,7 @@ def add_view(name, values):
def _process_concrete_includes(self):
"""Extract and load into memory included concrete spec data."""
_included_concrete_envs = self.manifest[TOP_LEVEL_KEY].get(included_concrete_name, [])
# Expand config and environment variables
self.included_concrete_envs = [
spack.util.path.canonicalize_path(_env) for _env in _included_concrete_envs
]
self.included_concrete_envs = self.manifest[TOP_LEVEL_KEY].get(included_concrete_name, [])
if self.included_concrete_envs:
if os.path.exists(self.lock_path):

View File

@@ -550,6 +550,7 @@ def setup_main_options(args):
spack.config.CONFIG.scopes["command_line"].sections["repos"] = syaml.syaml_dict(
[(key, [spack.paths.mock_packages_path])]
)
spack.repo.PATH = spack.repo.create(spack.config.CONFIG)
# If the user asked for it, don't check ssl certs.
if args.insecure:
@@ -560,8 +561,6 @@ def setup_main_options(args):
for config_var in args.config_vars or []:
spack.config.add(fullpath=config_var, scope="command_line")
spack.repo.enable_repo(spack.repo.create(spack.config.CONFIG))
# On Windows10 console handling for ASCI/VT100 sequences is not
# on by default. Turn on before we try to write to console
# with color

View File

@@ -91,8 +91,29 @@ class ReposFinder:
Returns a loader based on the inspection of the current repository list.
"""
#: The current list of repositories.
repo_path: "RepoPath"
def __init__(self):
self._repo_init = _path
self._repo: Optional[RepoType] = None
@property
def current_repository(self):
if self._repo is None:
self._repo = self._repo_init()
return self._repo
@current_repository.setter
def current_repository(self, value):
self._repo = value
@contextlib.contextmanager
def switch_repo(self, substitute: "RepoType"):
"""Switch the current repository list for the duration of the context manager."""
old = self._repo
try:
self._repo = substitute
yield
finally:
self._repo = old
def find_spec(self, fullname, python_path, target=None):
# "target" is not None only when calling importlib.reload()
@@ -113,11 +134,14 @@ def compute_loader(self, fullname: str):
namespace, dot, module_name = fullname.rpartition(".")
# If it's a module in some repo, or if it is the repo's namespace, let the repo handle it.
current_repo = self.current_repository
is_repo_path = isinstance(current_repo, RepoPath)
if is_repo_path:
repos = current_repo.repos
else:
repos = [current_repo]
if not hasattr(self, "repo_path"):
return None
for repo in self.repo_path.repos:
for repo in repos:
# We are using the namespace of the repo and the repo contains the package
if namespace == repo.full_namespace:
# With 2 nested conditionals we can call "repo.real_name" only once
@@ -132,7 +156,9 @@ def compute_loader(self, fullname: str):
# No repo provides the namespace, but it is a valid prefix of
# something in the RepoPath.
if self.repo_path.by_namespace.is_prefix(fullname[len(PKG_MODULE_PREFIX_V1) :]):
if is_repo_path and current_repo.by_namespace.is_prefix(
fullname[len(PKG_MODULE_PREFIX_V1) :]
):
return SpackNamespaceLoader()
return None
@@ -232,8 +258,6 @@ def get_all_package_diffs(type: str, repo: "Repo", rev1="HEAD^1", rev2="HEAD") -
changed: Set[str] = set()
for path in lines:
dir_name, _, _ = path.partition("/")
if not nm.valid_module_name(dir_name, repo.package_api):
continue
pkg_name = nm.pkg_dir_to_pkg_name(dir_name, repo.package_api)
if pkg_name not in added and pkg_name not in removed:
changed.add(pkg_name)
@@ -638,6 +662,7 @@ def __init__(
if isinstance(repo, str):
assert cache is not None, "cache must hold a value, when repo is a string"
repo = Repo(repo, cache=cache, overrides=overrides)
repo.finder(self)
self.put_last(repo)
except RepoError as e:
tty.warn(
@@ -647,20 +672,6 @@ def __init__(
f" spack repo rm {repo}",
)
def enable(self) -> None:
"""Set the relevant search paths for package module loading"""
REPOS_FINDER.repo_path = self
for p in reversed(self.python_paths()):
if p not in sys.path:
sys.path.insert(0, p)
def disable(self) -> None:
"""Disable the search paths for package module loading"""
del REPOS_FINDER.repo_path
for p in self.python_paths():
if p in sys.path:
sys.path.remove(p)
def ensure_unwrapped(self) -> "RepoPath":
"""Ensure we unwrap this object from any dynamic wrapper (like Singleton)"""
return self
@@ -834,6 +845,9 @@ def python_paths(self) -> List[str]:
def get_pkg_class(self, pkg_name: str) -> Type["spack.package_base.PackageBase"]:
"""Find a class for the spec's package and return the class object."""
for p in self.python_paths():
if p not in sys.path:
sys.path.insert(0, p)
return self.repo_for_pkg(pkg_name).get_pkg_class(pkg_name)
@autospec
@@ -1080,6 +1094,9 @@ def check(condition, msg):
# Class attribute overrides by package name
self.overrides = overrides or {}
# Optional reference to a RepoPath to influence module import from spack.pkg
self._finder: Optional[RepoPath] = None
# Maps that goes from package name to corresponding file stat
self._fast_package_checker: Optional[FastPackageChecker] = None
@@ -1091,6 +1108,9 @@ def check(condition, msg):
def package_api_str(self) -> str:
return f"v{self.package_api[0]}.{self.package_api[1]}"
def finder(self, value: RepoPath) -> None:
self._finder = value
def real_name(self, import_name: str) -> Optional[str]:
"""Allow users to import Spack packages using Python identifiers.
@@ -1343,9 +1363,11 @@ def get_pkg_class(self, pkg_name: str) -> Type["spack.package_base.PackageBase"]
fullname += ".package"
class_name = nm.pkg_name_to_class_name(pkg_name)
if self.python_path and self.python_path not in sys.path:
sys.path.insert(0, self.python_path)
try:
module = importlib.import_module(fullname)
with REPOS_FINDER.switch_repo(self._finder or self):
module = importlib.import_module(fullname)
except ImportError as e:
raise UnknownPackageError(fullname) from e
except Exception as e:
@@ -1538,6 +1560,12 @@ def create_or_construct(
return from_path(repo_yaml_dir)
def _path(configuration=None):
"""Get the singleton RepoPath instance for Spack."""
configuration = configuration or spack.config.CONFIG
return create(configuration=configuration)
def create(configuration: spack.config.Configuration) -> RepoPath:
"""Create a RepoPath from a configuration object.
@@ -1560,10 +1588,8 @@ def create(configuration: spack.config.Configuration) -> RepoPath:
return RepoPath(*repo_dirs, cache=spack.caches.MISC_CACHE, overrides=overrides)
#: Global package repository instance.
PATH: RepoPath = llnl.util.lang.Singleton(
lambda: create(configuration=spack.config.CONFIG)
) # type: ignore[assignment]
#: Singleton repo path instance
PATH: RepoPath = llnl.util.lang.Singleton(_path) # type: ignore
# Add the finder to sys.meta_path
REPOS_FINDER = ReposFinder()
@@ -1589,27 +1615,20 @@ def use_repositories(
Returns:
Corresponding RepoPath object
"""
global PATH
paths = [getattr(x, "root", x) for x in paths_and_repos]
scope_name = f"use-repo-{uuid.uuid4()}"
scope_name = "use-repo-{}".format(uuid.uuid4())
repos_key = "repos:" if override else "repos"
spack.config.CONFIG.push_scope(
spack.config.InternalConfigScope(name=scope_name, data={repos_key: paths})
)
old_repo, new_repo = PATH, create(configuration=spack.config.CONFIG)
old_repo.disable()
enable_repo(new_repo)
PATH, saved = create(configuration=spack.config.CONFIG), PATH
try:
yield new_repo
with REPOS_FINDER.switch_repo(PATH): # type: ignore
yield PATH
finally:
spack.config.CONFIG.remove_scope(scope_name=scope_name)
enable_repo(old_repo)
def enable_repo(repo_path: RepoPath) -> None:
"""Set the global package repository and make them available in module search paths."""
global PATH
PATH = repo_path
PATH.enable()
PATH = saved
class MockRepositoryBuilder:

View File

@@ -106,7 +106,7 @@ def __init__(self):
def restore(self):
spack.config.CONFIG = self.config
spack.repo.enable_repo(spack.repo.create(self.config))
spack.repo.PATH = spack.repo.create(self.config)
spack.platforms.host = self.platform
spack.store.STORE = self.store
self.test_patches.restore()
@@ -129,6 +129,7 @@ def restore(self):
def store_patches():
global patches
module_patches = list()
class_patches = list()
if not patches:

View File

@@ -2028,12 +2028,13 @@ def test_ci_verify_versions_valid(
tmpdir,
):
repo, _, commits = mock_git_package_changes
with spack.repo.use_repositories(repo):
monkeypatch.setattr(spack.repo, "builtin_repo", lambda: repo)
spack.repo.PATH.put_first(repo)
out = ci_cmd("verify-versions", commits[-1], commits[-3])
assert "Validated diff-test@2.1.5" in out
assert "Validated diff-test@2.1.6" in out
monkeypatch.setattr(spack.repo, "builtin_repo", lambda: repo)
out = ci_cmd("verify-versions", commits[-1], commits[-3])
assert "Validated diff-test@2.1.5" in out
assert "Validated diff-test@2.1.6" in out
def test_ci_verify_versions_standard_invalid(
@@ -2044,21 +2045,23 @@ def test_ci_verify_versions_standard_invalid(
verify_git_versions_invalid,
):
repo, _, commits = mock_git_package_changes
with spack.repo.use_repositories(repo):
monkeypatch.setattr(spack.repo, "builtin_repo", lambda: repo)
spack.repo.PATH.put_first(repo)
out = ci_cmd("verify-versions", commits[-1], commits[-3], fail_on_error=False)
assert "Invalid checksum found diff-test@2.1.5" in out
assert "Invalid commit for diff-test@2.1.6" in out
monkeypatch.setattr(spack.repo, "builtin_repo", lambda: repo)
out = ci_cmd("verify-versions", commits[-1], commits[-3], fail_on_error=False)
assert "Invalid checksum found diff-test@2.1.5" in out
assert "Invalid commit for diff-test@2.1.6" in out
def test_ci_verify_versions_manual_package(monkeypatch, mock_packages, mock_git_package_changes):
repo, _, commits = mock_git_package_changes
with spack.repo.use_repositories(repo):
monkeypatch.setattr(spack.repo, "builtin_repo", lambda: repo)
spack.repo.PATH.put_first(repo)
pkg_class = spack.spec.Spec("diff-test").package_class
monkeypatch.setattr(pkg_class, "manual_download", True)
monkeypatch.setattr(spack.repo, "builtin_repo", lambda: repo)
out = ci_cmd("verify-versions", commits[-1], commits[-2])
assert "Skipping manual download package: diff-test" in out
pkg_class = spack.spec.Spec("diff-test").package_class
monkeypatch.setattr(pkg_class, "manual_download", True)
out = ci_cmd("verify-versions", commits[-1], commits[-2])
assert "Skipping manual download package: diff-test" in out

View File

@@ -448,7 +448,7 @@ def test_find_loaded(database, working_env):
@pytest.mark.regression("37712")
def test_environment_with_version_range_in_compiler_doesnt_fail(tmp_path, mock_packages):
def test_environment_with_version_range_in_compiler_doesnt_fail(tmp_path):
"""Tests that having an active environment with a root spec containing a compiler constrained
by a version range (i.e. @X.Y rather the single version than @=X.Y) doesn't result in an error
when invoking "spack find".

View File

@@ -312,6 +312,7 @@ class TestRepoPath:
def test_creation_from_string(self, mock_test_cache):
repo = spack.repo.RepoPath(spack.paths.mock_packages_path, cache=mock_test_cache)
assert len(repo.repos) == 1
assert repo.repos[0]._finder is repo
assert repo.by_namespace["builtin.mock"] is repo.repos[0]
def test_get_repo(self, mock_test_cache):

View File

@@ -55,7 +55,6 @@ def parser_and_speclist():
return parser, result
@pytest.mark.usefixtures("mock_packages")
class TestSpecList:
@pytest.mark.regression("28749")
@pytest.mark.parametrize(
@@ -84,8 +83,8 @@ class TestSpecList:
),
# A constraint affects both the root and a dependency
(
[{"matrix": [["version-test-root"], ["%gcc"], ["^version-test-pkg%gcc"]]}],
["version-test-root%gcc ^version-test-pkg%gcc"],
[{"matrix": [["gromacs"], ["%gcc"], ["+plumed ^plumed%gcc"]]}],
["gromacs+plumed%gcc ^plumed%gcc"],
),
],
)
@@ -159,7 +158,7 @@ def test_spec_list_recursion_specs_as_constraints(self):
assert result.specs == DEFAULT_SPECS
@pytest.mark.regression("16841")
def test_spec_list_matrix_exclude(self):
def test_spec_list_matrix_exclude(self, mock_packages):
parser = SpecListParser()
result = parser.parse_user_specs(
name="specs",
@@ -172,7 +171,7 @@ def test_spec_list_matrix_exclude(self):
)
assert len(result.specs) == 1
def test_spec_list_exclude_with_abstract_hashes(self, install_mockery):
def test_spec_list_exclude_with_abstract_hashes(self, mock_packages, install_mockery):
# Put mpich in the database so it can be referred to by hash.
mpich_1 = spack.concretize.concretize_one("mpich+debug")
mpich_2 = spack.concretize.concretize_one("mpich~debug")

View File

@@ -5,17 +5,11 @@ spack:
target: [ "x86_64_v3" ]
require:
- target=x86_64_v3
# prefer %gcc@7.5.0 but also allow %gcc@12
- one_of: ['%gcc@7.5.0', '%gcc@12']
- '%gcc@7.5.0'
providers:
mpi: [mvapich2]
mfem:
require:
# gcc@7.5.0 crashes when building mfem@4.8.0, so use gcc@12
- '%gcc@12'
specs:
- ascent # ^conduit@0.6.0
- axom

View File

@@ -0,0 +1,44 @@
spack:
view: false
concretizer:
reuse: false
unify: false
static_analysis: true
packages:
all:
require:
- "%gcc"
- target=x86_64_v3
variants: +mpi
c:
require: gcc
cxx:
require: gcc
fortran:
require: gcc
mpi:
require:
- openmpi
blas:
require:
- openblas
lapack:
require:
- openblas
specs:
- python
- py-numpy
- py-scipy
- py-matplotlib
- py-pip
- py-mpi4py
ci:
pipeline-gen:
- build-job:
image: ghcr.io/spack/spack/ubuntu22.04-runner-amd64-gcc-11.4:2024.03.01
cdash:
build-group: spack-snake

View File

@@ -40,7 +40,9 @@ spack -p --lines 20 spec mpileaks%gcc
$coverage_run $(which spack) bootstrap status --dev --optional
# Check that we can import Spack packages directly as a first import
$coverage_run $(which spack) python -c "from spack_repo.builtin.packages.mpileaks.package import Mpileaks"
# TODO: this check is disabled, because sys.path is only updated once
# spack.repo.PATH.get_pkg_class is called.
# $coverage_run $(which spack) python -c "import spack.pkg.builtin.mpileaks; repr(spack.pkg.builtin.mpileaks.Mpileaks)"
#-----------------------------------------------------------
# Run unit tests with code coverage

View File

@@ -1,3 +0,0 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -1,3 +0,0 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@@ -20,12 +20,6 @@ class AmrWind(CMakePackage, CudaPackage, ROCmPackage):
license("BSD-3-Clause")
version("main", branch="main", submodules=True)
version(
"3.4.2", tag="v3.4.2", commit="ed475a0533dfacf1fdff0b707518ccf99040d9f9", submodules=True
)
version(
"3.4.1", tag="v3.4.1", commit="effe63ca9061e6d2bd5c5e84b690d29c0869f029", submodules=True
)
version(
"3.4.0", tag="v3.4.0", commit="38d1b9fd0b70aab4a01fd507f039750c2508bd1c", submodules=True
)

View File

@@ -13,15 +13,13 @@ class ApacheTvm(CMakePackage, CudaPackage):
hardware backend."""
homepage = "https://tvm.apache.org/"
url = "https://dlcdn.apache.org/tvm/tvm-v0.16.0/apache-tvm-src-v0.16.0.tar.gz"
license("Apache-2.0", checked_by="alex391")
url = "https://github.com/apache/tvm/releases/download/v0.19.0/apache-tvm-src-v0.19.0.tar.gz"
version("0.19.0", sha256="13fd707eae37b9b2b77bccd39668764f61ae6824d50cd1ab8164df1c75565be1")
version(
"0.16.0",
sha256="55e2629c39248ef3b1ee280e34a960182bd17bea7ae0d0fa132bbdaaf5aba1ac",
url="https://dlcdn.apache.org/tvm/tvm-v0.16.0/apache-tvm-src-v0.16.0.tar.gz",
deprecated=True,
)
@@ -30,16 +28,10 @@ class ApacheTvm(CMakePackage, CudaPackage):
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("cmake@3.18:", type="build")
depends_on("python@3.7:", type=("build", "run"))
conflicts("^python@3.9.0:", when="@:0.16")
depends_on("python@3.7:3.8", type=("build", "run"))
depends_on("zlib-api", type=("link", "run"))
depends_on("ncurses", type=("link", "run"))
depends_on("llvm@4:", type="build", when="+llvm")
conflicts("^llvm@19.0.0:", when="@:0.16+llvm")
depends_on("llvm@4:18.1.8", type="build", when="+llvm")
depends_on("cuda@8:", when="+cuda")
def cmake_args(self):

View File

@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import spack.store
from spack.package import *
@@ -40,6 +41,11 @@ class CbtfKrell(CMakePackage):
description="The build type to build",
values=("Debug", "Release", "RelWithDebInfo"),
)
variant(
"crayfe",
default=False,
description="build only the FE tool using the runtime_dir to point to target build.",
)
# Fix build errors with gcc >= 10
patch(
@@ -141,6 +147,44 @@ def set_mpi_cmake_options(self, spec, cmake_options):
cmake_options.extend(mpi_options)
def set_cray_login_node_cmake_options(self, spec, cmake_options):
# Appends to cmake_options the options that will enable
# the appropriate Cray login node libraries
cray_login_node_options = []
rt_platform = "cray"
# How do we get the compute node (CNL) cbtf package
# install directory path. spec['cbtf'].prefix is the
# login node path for this build, as we are building
# the login node components with this spack invocation. We
# need these paths to be the ones created in the CNL
# spack invocation.
be_cbtf = spack.store.db.query_one("cbtf arch=cray-CNL-haswell")
be_cbtfk = spack.store.db.query_one("cbtf-krell arch=cray-CNL-haswell")
be_papi = spack.store.db.query_one("papi arch=cray-CNL-haswell")
be_boost = spack.store.db.query_one("boost arch=cray-CNL-haswell")
be_mont = spack.store.db.query_one("libmonitor arch=cray-CNL-haswell")
be_unw = spack.store.db.query_one("libunwind arch=cray-CNL-haswell")
be_xer = spack.store.db.query_one("xerces-c arch=cray-CNL-haswell")
be_dyn = spack.store.db.query_one("dyninst arch=cray-CNL-haswell")
be_mrnet = spack.store.db.query_one("mrnet arch=cray-CNL-haswell")
cray_login_node_options.append("-DCN_RUNTIME_PLATFORM=%s" % rt_platform)
# Use install directories as CMAKE args for the building
# of login cbtf-krell
cray_login_node_options.append("-DCBTF_CN_RUNTIME_DIR=%s" % be_cbtf.prefix)
cray_login_node_options.append("-DCBTF_KRELL_CN_RUNTIME_DIR=%s" % be_cbtfk.prefix)
cray_login_node_options.append("-DPAPI_CN_RUNTIME_DIR=%s" % be_papi.prefix)
cray_login_node_options.append("-DBOOST_CN_RUNTIME_DIR=%s" % be_boost.prefix)
cray_login_node_options.append("-DLIBMONITOR_CN_RUNTIME_DIR=%s" % be_mont.prefix)
cray_login_node_options.append("-DLIBUNWIND_CN_RUNTIME_DIR=%s" % be_unw.prefix)
cray_login_node_options.append("-DXERCESC_CN_RUNTIME_DIR=%s" % be_xer.prefix)
cray_login_node_options.append("-DDYNINST_CN_RUNTIME_DIR=%s" % be_dyn.prefix)
cray_login_node_options.append("-DMRNET_CN_RUNTIME_DIR=%s" % be_mrnet.prefix)
cmake_options.extend(cray_login_node_options)
def cmake_args(self):
spec = self.spec
@@ -174,6 +218,11 @@ def cmake_args(self):
# Add any MPI implementations coming from variant settings
self.set_mpi_cmake_options(spec, cmake_args)
if self.spec.satisfies("+crayfe"):
# We need to build target/compute node components/libraries first
# then pass those libraries to the cbtf-krell login node build
self.set_cray_login_node_cmake_options(spec, cmake_args)
return cmake_args
def setup_run_environment(self, env: EnvironmentModifications) -> None:

View File

@@ -87,8 +87,6 @@ def edit(self, spec, prefix):
else:
defs_file = FileFilter("./src/system.make")
defs_file.filter(".*FC=.*", f"FC={spec['mpi'].mpifc}")
defs_file.filter(".*F77=.*", f"F77={spec['mpi'].mpif77}")
defs_file.filter(".*COMPFLAGS=.*", f"COMPFLAGS= {fflags}")
defs_file.filter(".*LINKFLAGS=.*", f"LINKFLAGS= {ldflags}")
defs_file.filter(".*BLAS=.*", f"BLAS= {lapack_ld} {blas_ld}")

View File

@@ -15,26 +15,23 @@ class Cryodrgn(PythonPackage):
license("GPL-3.0-only", checked_by="A-N-Other")
version("3.4.3", sha256="eadc41190d3c6abe983164db299ebb0d7340840281774eaaea1a12627a80dc10")
version("2.3.0", sha256="9dd75967fddfa56d6b2fbfc56933c50c9fb994326112513f223e8296adbf0afc")
depends_on("python@3.9:3.11", type=("build", "run"), when="@3.4.3:")
depends_on("python@3.7:3.11", type=("build", "run"), when="@2.3.0")
depends_on("python@3.7:", type=("build", "run"))
depends_on("py-setuptools@61:", type="build")
depends_on("py-setuptools-scm@6.2:", type="build")
depends_on("py-torch@1:", type=("build", "run"))
depends_on("py-pandas@:1", type=("build", "run"))
depends_on("py-numpy@:1.26", type=("build", "run"))
depends_on("py-matplotlib@:3.6", type=("build", "run"))
depends_on("py-numpy", type=("build", "run"))
depends_on("py-matplotlib", type=("build", "run"))
depends_on("py-pyyaml", type=("build", "run"))
depends_on("py-scipy@1.3.1:", type=("build", "run"))
depends_on("py-scikit-learn", type=("build", "run"))
depends_on("py-seaborn@:0.11", type=("build", "run"))
depends_on("py-cufflinks", type=("build", "run"))
depends_on("py-jupyterlab", type=("build", "run"))
depends_on("py-notebook@:6", type=("build", "run"), when="@3.4.3:")
depends_on("py-umap-learn", type=("build", "run"))
depends_on("py-ipywidgets@:7", type=("build", "run"))
depends_on("py-healpy", type=("build", "run"))

View File

@@ -25,7 +25,6 @@ class Dd4hep(CMakePackage):
license("LGPL-3.0-or-later")
version("master", branch="master")
version("1.32", sha256="8bde4eab9af9841e040447282ea7df3a16e4bcec587c3a1e32f41987da9b1b4d")
version("1.31", sha256="9c06a1b4462fc1b51161404889c74b37350162d0b0ac2154db27e3f102670bd1")
version("1.30", sha256="02de46151e945eff58cffd84b4b86d35051f4436608199c3efb4d2e1183889fe")
version("1.29", sha256="435d25a7ef093d8bf660f288b5a89b98556b4c1c293c55b93bf641fb4cba77e9")

View File

@@ -17,7 +17,6 @@ class Fmt(CMakePackage):
license("MIT")
version("11.2.0", sha256="203eb4e8aa0d746c62d8f903df58e0419e3751591bb53ff971096eaa0ebd4ec3")
version("11.1.4", sha256="49b039601196e1a765e81c5c9a05a61ed3d33f23b3961323d7322e4fe213d3e6")
version("11.1.3", sha256="7df2fd3426b18d552840c071c977dc891efe274051d2e7c47e2c83c3918ba6df")
version("11.1.2", sha256="ef54df1d4ba28519e31bf179f6a4fb5851d684c328ca051ce5da1b52bf8b1641")

View File

@@ -30,11 +30,7 @@ class Glib(MesonPackage):
# 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",
preferred=True,
)
version("2.78.3", sha256="609801dd373796e515972bf95fc0b2daa44545481ee2f465c4f204d224b2bc21")
version("2.78.0", sha256="44eaab8b720877ce303c5540b657b126f12dc94972d9880b52959f43fb537b30")
version("2.76.6", sha256="1136ae6987dcbb64e0be3197a80190520f7acab81e2bfb937dc85c11c8aa9f04")
version("2.76.4", sha256="5a5a191c96836e166a7771f7ea6ca2b0069c603c7da3cba1cd38d1694a395dda")

View File

@@ -39,11 +39,9 @@ class Go(Package):
license("BSD-3-Clause")
version("1.24.3", sha256="229c08b600b1446798109fae1f569228102c8473caba8104b6418cb5bc032878")
version("1.24.2", sha256="9dc77ffadc16d837a1bf32d99c624cb4df0647cee7b119edd9e7b1bcc05f2e00")
version("1.24.1", sha256="8244ebf46c65607db10222b5806aeb31c1fcf8979c1b6b12f60c677e9a3c0656")
version("1.24.0", sha256="d14120614acb29d12bcab72bd689f257eb4be9e0b6f88a8fb7e41ac65f8556e5")
version("1.23.9", sha256="08f6419547563ed9e7037d12b9c8909677c72f75f62ef85887ed9dbf49b8d2dd")
version("1.23.8", sha256="0ca1f1e37ea255e3ce283af3f4e628502fb444587da987a5bb96d6c6f15930d4")
version("1.23.7", sha256="7cfabd46b73eb4c26b19d69515dd043d7183a6559acccd5cfdb25eb6b266a458")
version("1.23.6", sha256="039c5b04e65279daceee8a6f71e70bd05cf5b801782b6f77c6e19e2ed0511222")

View File

@@ -66,7 +66,7 @@ class Hpx(CMakePackage, CudaPackage, ROCmPackage):
values=lambda x: isinstance(x, str) and (x.isdigit() or x == "auto"),
)
instrumentation_values = ("google_perftools", "papi", "valgrind", "thread_debug")
instrumentation_values = ("apex", "google_perftools", "papi", "valgrind", "thread_debug")
variant(
"instrumentation",
values=any_combination_of(*instrumentation_values),
@@ -93,11 +93,10 @@ class Hpx(CMakePackage, CudaPackage, ROCmPackage):
variant("examples", default=False, description="Build examples")
variant("async_mpi", default=False, description="Enable MPI Futures.")
variant("async_cuda", default=False, description="Enable CUDA Futures.")
variant("apex", default=False, description="Enable APEX support")
# Build dependencies
depends_on("cxx", type="build")
depends_on("apex", when="+apex")
depends_on("python", type=("build", "test", "run"))
depends_on("git", type="build")
depends_on("cmake", type="build")
@@ -123,6 +122,7 @@ class Hpx(CMakePackage, CudaPackage, ROCmPackage):
depends_on("cuda", when="+async_cuda")
depends_on("otf2", when="instrumentation=apex")
depends_on("gperftools", when="instrumentation=google_perftools")
depends_on("papi", when="instrumentation=papi")
depends_on("valgrind", when="instrumentation=valgrind")
@@ -155,7 +155,6 @@ class Hpx(CMakePackage, CudaPackage, ROCmPackage):
# Restrictions for 1.5.x
conflicts("cxxstd=11", when="@1.5:")
depends_on("apex@2.3:", when="@1.5")
# Restrictions for 1.2.X
with when("@:1.2.1"):
@@ -212,6 +211,8 @@ class Hpx(CMakePackage, CudaPackage, ROCmPackage):
conflicts("~generic_coroutines", when="target=aarch64:", msg=_msg_generic_coroutines_target)
conflicts("~generic_coroutines", when="target=arm:", msg=_msg_generic_coroutines_target)
# Patches APEX
patch("git_external.patch", when="@1.3.0 instrumentation=apex")
patch("mimalloc_no_version_requirement.patch", when="@:1.8.0 malloc=mimalloc")
def url_for_version(self, version):
@@ -241,7 +242,6 @@ def cmake_args(self):
self.define_from_variant("HPX_WITH_EXAMPLES", "examples"),
self.define_from_variant("HPX_WITH_ASYNC_MPI", "async_mpi"),
self.define_from_variant("HPX_WITH_ASYNC_CUDA", "async_cuda"),
self.define_from_variant("HPX_WITH_APEX", "apex"),
self.define("HPX_WITH_TESTS", self.run_tests),
self.define("HPX_WITH_NETWORKING", "networking=none" not in spec),
self.define("HPX_WITH_PARCELPORT_TCP", spec.satisfies("networking=tcp")),
@@ -278,4 +278,14 @@ def cmake_args(self):
self.define("HPX_WITH_LOGGING", True),
]
if spec.satisfies("instrumentation=apex"):
args += [
self.define("APEX_WITH_OTF2", True),
self.define("OTF2_ROOT", spec["otf2"].prefix),
]
# it seems like there was a bug in the default version of APEX in 1.5.x
if spec.satisfies("@1.5"):
args += [self.define("HPX_WITH_APEX_TAG", "v2.3.0")]
return args

View File

@@ -14,16 +14,11 @@ class Icon(AutotoolsPackage):
homepage = "https://www.icon-model.org"
url = "https://gitlab.dkrz.de/icon/icon-model/-/archive/icon-2024.01-public/icon-model-icon-2024.01-public.tar.gz"
git = "https://gitlab.dkrz.de/icon/icon-model.git"
submodules = True
maintainers("skosukhin", "Try2Code")
license("BSD-3-Clause", checked_by="skosukhin")
version(
"2025.04", tag="icon-2025.04-public", commit="1be2ca66ea0de149971d2e77e88a9f11c764bd22"
)
version("2024.10", sha256="5c461c783eb577c97accd632b18140c3da91c1853d836ca2385f376532e9bad1")
version("2024.07", sha256="f53043ba1b36b8c19d0d2617ab601c3b9138b90f8ff8ca6db0fd079665eb5efa")
version("2024.01-1", sha256="3e57608b7e1e3cf2f4cb318cfe2fdb39678bd53ca093955d99570bd6d7544184")
@@ -100,9 +95,10 @@ class Icon(AutotoolsPackage):
# Optimization Features:
variant("mixed-precision", default=False, description="Enable mixed-precision dynamical core")
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
depends_on("fortran", type="build") # generated
depends_on("python", type="build")
depends_on("perl", type="build")
depends_on("cmake@3.18:", type="build")
@@ -209,13 +205,11 @@ def configure_args(self):
"-arch=sm_{0}".format(self.nvidia_targets[gpu]),
"-ccbin={0}".format(spack_cxx),
]
flags["ICON_LDFLAGS"].extend(self.compiler.stdcxx_libs)
libs += self.spec["cuda"].libs
else:
args.append("--disable-gpu")
if gpu in self.nvidia_targets or "+comin" in self.spec:
flags["ICON_LDFLAGS"].extend(self.compiler.stdcxx_libs)
if self.compiler.name == "gcc":
flags["CFLAGS"].append("-g")
flags["ICON_CFLAGS"].append("-O3")

View File

@@ -3,77 +3,41 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import spack.build_systems.python
from spack.build_systems import cmake, makefile
from spack.build_systems.python import PythonPipBuilder
from spack.package import *
class Jsonnet(MakefilePackage, CMakePackage):
class Jsonnet(MakefilePackage):
"""A data templating language for app and tool developers based on JSON"""
homepage = "https://jsonnet.org/"
git = "https://github.com/google/jsonnet.git"
url = "https://github.com/google/jsonnet/archive/refs/tags/v0.18.0.tar.gz"
maintainers("greenc-FNAL", "gartung", "jcpunk", "marcmengel", "marcpaterno")
maintainers("jcpunk")
license("Apache-2.0")
version("master", branch="master")
version("0.21.0", sha256="a12ebca72e43e7061ffe4ef910e572b95edd7778a543d6bf85f6355bd290300e")
version("0.20.0", sha256="77bd269073807731f6b11ff8d7c03e9065aafb8e4d038935deb388325e52511b")
version("0.19.1", sha256="f5a20f2dc98fdebd5d42a45365f52fa59a7e6b174e43970fea4f9718a914e887")
version("0.18.0", sha256="85c240c4740f0c788c4d49f9c9c0942f5a2d1c2ae58b2c71068107bc80a3ced4")
version("0.17.0", sha256="076b52edf888c01097010ad4299e3b2e7a72b60a41abbc65af364af1ed3c8dbe")
variant("python", default=False, description="Provide Python bindings for jsonnet")
build_system("makefile", conditional("cmake", when="@0.21.0:"), default="makefile")
conflicts("%gcc@:5.4.99", when="@0.18.0:")
depends_on("c", type="build")
depends_on("cxx", type="build")
with when("build_system=cmake"):
depends_on("nlohmann-json@3.6.1:")
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
variant("python", default=False, description="Provide Python bindings for jsonnet")
extends("python", when="+python")
depends_on("py-setuptools", type=("build",), when="+python")
depends_on("py-pip", type=("build",), when="+python")
depends_on("py-wheel", type=("build",), when="+python")
class MakefileBuilder(makefile.MakefileBuilder):
@property
def install_targets(self):
return ["PREFIX={0}".format(self.prefix), "install"]
@run_after("install")
def python_install(self):
if self.pkg.spec.satisfies("+python"):
pip(
*spack.build_systems.python.PythonPipBuilder.std_args(self.pkg),
f"--prefix={self.pkg.prefix}",
".",
)
class CMakeBuilder(cmake.CMakeBuilder):
def cmake_args(self):
return [
self.define("USE_SYSTEM_JSON", True),
self.define("BUILD_SHARED_BINARIES", True),
self.define("BUILD_TESTS", self.pkg.run_tests),
]
@run_after("install")
def python_install(self):
if self.pkg.spec.satisfies("+python"):
pip(
*spack.build_systems.python.PythonPipBuilder.std_args(self.pkg),
f"--prefix={self.pkg.prefix}",
".",
)
if "+python" in self.spec:
pip(*PythonPipBuilder.std_args(self), f"--prefix={self.prefix}", ".")

View File

@@ -22,8 +22,7 @@ class Lemon(CMakePackage):
# soplex not mentioned in docs but shown in cmakecache
# variant("soplex", default=False, description="Enable SOPLEX solver backend") #TODO
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("cxx", type="build") # generated
depends_on("glpk", when="+glpk")
depends_on("cplex", when="+ilog")

View File

@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import spack.build_systems
import spack.build_systems.autotools
import spack.build_systems.cmake
from spack.package import *

View File

@@ -3,6 +3,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import sys
import spack.build_systems
import spack.build_systems.autotools
from spack.package import *

View File

@@ -1212,7 +1212,6 @@ def cmake_args(self):
[
define("LLVM_ENABLE_RUNTIMES", runtimes),
define("RUNTIMES_CMAKE_ARGS", runtime_cmake_args),
define("LIBCXXABI_USE_LLVM_UNWINDER", not spec.satisfies("libunwind=none")),
]
)

View File

@@ -22,12 +22,10 @@ class Mesa(MesonPackage):
version("main", branch="main")
version(
"25.0.5",
sha256="c0d245dea0aa4b49f74b3d474b16542e4a8799791cd33d676c69f650ad4378d0",
"23.3.6",
sha256="cd3d6c60121dea73abbae99d399dc2facaecde1a8c6bd647e6d85410ff4b577b",
preferred=True,
)
version("24.3.4", sha256="e641ae27191d387599219694560d221b7feaa91c900bcec46bf444218ed66025")
version("23.3.6", sha256="cd3d6c60121dea73abbae99d399dc2facaecde1a8c6bd647e6d85410ff4b577b")
version("23.3.3", sha256="518307c0057fa3cee8b58df78be431d4df5aafa7edc60d09278b2d7a0a80f3b4")
version("23.2.1", sha256="64de0616fc2d801f929ab1ac2a4f16b3e2783c4309a724c8a259b20df8bbc1cc")
version("23.1.9", sha256="295ba27c28146ed09214e8ce79afa1659edf9d142decc3c91f804552d64f7510")
@@ -68,7 +66,6 @@ class Mesa(MesonPackage):
depends_on("python@:3.11", when="@:23.2", type="build")
depends_on("py-packaging", type="build", when="^python@3.12:")
depends_on("py-mako@0.8.0:", type="build")
depends_on("py-pyyaml", when="@24.2:", type="build")
depends_on("unwind")
depends_on("expat")
depends_on("zlib-api")
@@ -129,9 +126,6 @@ class Mesa(MesonPackage):
depends_on("libxt")
depends_on("xrandr")
depends_on("glproto@1.4.14:")
# In @24.3:, "libxshmfence@1.1:" is needed when:
# (with_dri_platform == 'drm') or (with_any_vk), see mesa's meson.build.
depends_on("libxshmfence@1.1:", when="@24.3:")
# version specific issue
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96130
@@ -204,6 +198,7 @@ def meson_args(self):
args = [
"-Dvulkan-drivers=",
"-Dgallium-vdpau=disabled",
"-Dgallium-omx=disabled",
"-Dgallium-va=disabled",
"-Dgallium-xa=disabled",
"-Dgallium-nine=false",
@@ -214,9 +209,6 @@ def meson_args(self):
# gallium-xvmc was removed in @main and @2.23:
if self.spec.satisfies("@:22.2"):
args.append("-Dgallium-xvmc=disabled")
# the option 'gallium-omx' is present in @24.2.4 and removed in @main
if spec.satisfies("@:24.2.4"):
args.append("-Dgallium-omx=disabled")
args_platforms = []
args_gallium_drivers = ["swrast"]
@@ -255,14 +247,10 @@ def meson_args(self):
if "+egl" in spec:
num_frontends += 1
args.extend(["-Degl=enabled", "-Dgbm=enabled"])
if spec.satisfies("@:24.2.4"):
args.extend(["-Ddri3=enabled"])
args.extend(["-Degl=enabled", "-Dgbm=enabled", "-Ddri3=enabled"])
args_platforms.append("surfaceless")
else:
args.extend(["-Degl=disabled", "-Dgbm=disabled"])
if spec.satisfies("@:24.2.4"):
args.extend(["-Ddri3=disabled"])
args.extend(["-Degl=disabled", "-Dgbm=disabled", "-Ddri3=disabled"])
args.append(opt_bool("+opengl" in spec, "opengl"))
args.append(opt_enable("+opengles" in spec, "gles1"))

View File

@@ -1,129 +0,0 @@
diff --git a/miniapps/dpg/convection-diffusion.cpp b/miniapps/dpg/convection-diffusion.cpp
index 7659e52745..170f8f1c5e 100644
--- a/miniapps/dpg/convection-diffusion.cpp
+++ b/miniapps/dpg/convection-diffusion.cpp
@@ -79,7 +79,7 @@ enum prob_type
};
prob_type prob;
-Vector beta;
+Vector beta_glob;
real_t epsilon;
real_t exact_u(const Vector & X);
@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
"Theta parameter for AMR");
args.AddOption(&iprob, "-prob", "--problem", "Problem case"
" 0: manufactured, 1: Erickson-Johnson ");
- args.AddOption(&beta, "-beta", "--beta",
+ args.AddOption(&beta_glob, "-beta", "--beta",
"Vector Coefficient beta");
args.AddOption(&static_cond, "-sc", "--static-condensation", "-no-sc",
"--no-static-condensation", "Enable static condensation.");
@@ -147,11 +147,11 @@ int main(int argc, char *argv[])
int dim = mesh.Dimension();
MFEM_VERIFY(dim > 1, "Dimension = 1 is not supported in this example");
- if (beta.Size() == 0)
+ if (beta_glob.Size() == 0)
{
- beta.SetSize(dim);
- beta = 0.0;
- beta[0] = 1.;
+ beta_glob.SetSize(dim);
+ beta_glob = 0.0;
+ beta_glob[0] = 1.;
}
args.PrintOptions(std::cout);
@@ -199,10 +199,10 @@ int main(int argc, char *argv[])
ConstantCoefficient eps2(1/(epsilon*epsilon));
ConstantCoefficient negeps(-epsilon);
- VectorConstantCoefficient betacoeff(beta);
- Vector negbeta = beta; negbeta.Neg();
- DenseMatrix bbt(beta.Size());
- MultVVt(beta, bbt);
+ VectorConstantCoefficient betacoeff(beta_glob);
+ Vector negbeta = beta_glob; negbeta.Neg();
+ DenseMatrix bbt(beta_glob.Size());
+ MultVVt(beta_glob, bbt);
MatrixConstantCoefficient bbtcoeff(bbt);
VectorConstantCoefficient negbetacoeff(negbeta);
@@ -598,7 +598,7 @@ void exact_hatf(const Vector & X, Vector & hatf)
hatf.SetSize(X.Size());
for (int i = 0; i<hatf.Size(); i++)
{
- hatf[i] = beta[i] * u - sigma[i];
+ hatf[i] = beta_glob[i] * u - sigma[i];
}
}
@@ -612,7 +612,7 @@ real_t f_exact(const Vector & X)
real_t s = 0;
for (int i = 0; i<du.Size(); i++)
{
- s += beta[i] * du[i];
+ s += beta_glob[i] * du[i];
}
return -epsilon * d2u + s;
}
diff --git a/miniapps/dpg/pconvection-diffusion.cpp b/miniapps/dpg/pconvection-diffusion.cpp
index 64d75d8d10..062f07d0f1 100644
--- a/miniapps/dpg/pconvection-diffusion.cpp
+++ b/miniapps/dpg/pconvection-diffusion.cpp
@@ -91,7 +91,7 @@ static const char *enum_str[] =
};
prob_type prob;
-Vector beta;
+Vector beta_glob;
real_t epsilon;
real_t exact_u(const Vector & X);
@@ -141,7 +141,7 @@ int main(int argc, char *argv[])
"Theta parameter for AMR");
args.AddOption(&iprob, "-prob", "--problem", "Problem case"
" 0: lshape, 1: General");
- args.AddOption(&beta, "-beta", "--beta",
+ args.AddOption(&beta_glob, "-beta", "--beta",
"Vector Coefficient beta");
args.AddOption(&static_cond, "-sc", "--static-condensation", "-no-sc",
"--no-static-condensation", "Enable static condensation.");
@@ -181,19 +181,19 @@ int main(int argc, char *argv[])
case sinusoidal:
case EJ:
{
- if (beta.Size() == 0)
+ if (beta_glob.Size() == 0)
{
- beta.SetSize(dim);
- beta = 0.0;
- beta[0] = 1.;
+ beta_glob.SetSize(dim);
+ beta_glob = 0.0;
+ beta_glob[0] = 1.;
}
break;
}
case bdr_layer:
{
- beta.SetSize(dim);
- beta[0] = 1.;
- beta[1] = 2.;
+ beta_glob.SetSize(dim);
+ beta_glob[0] = 1.;
+ beta_glob[1] = 2.;
exact_known = false;
}
break;
@@ -846,7 +846,7 @@ void beta_function(const Vector & X, Vector & beta_val)
}
else
{
- beta_val = beta;
+ beta_val = beta_glob;
}
}

View File

@@ -49,13 +49,6 @@ class Mfem(Package, CudaPackage, ROCmPackage):
# other version.
version("develop", branch="master")
version(
"4.8.0",
sha256="49bd2a076b0d87863092cb55f8524b5292d9afb2e48c19f80222ada367819016",
url="https://bit.ly/mfem-4-8",
extension="tar.gz",
)
version(
"4.7.0",
sha256="5e889493f5f79848f7b2d16afaae307c59880ac2a7ff2315551c60ca54717751",
@@ -289,7 +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.8.0:+rocm")
depends_on("hipblas", when="@4.4.0:+rocm")
with when("+mpi"):
depends_on("hypre")
@@ -339,7 +332,6 @@ class Mfem(Package, CudaPackage, ROCmPackage):
depends_on("gslib~mpi~mpiio", when="+gslib~mpi")
depends_on("gslib@1.0.5:1.0.6", when="@:4.2+gslib")
depends_on("gslib@1.0.7:", when="@4.3.0:+gslib")
depends_on("gslib@1.0.9:", when="@4.8.0:+gslib")
depends_on("suite-sparse", when="+suite-sparse")
depends_on("superlu-dist", when="+superlu-dist")
# If superlu-dist is built with +cuda, propagate cuda_arch
@@ -394,10 +386,8 @@ class Mfem(Package, CudaPackage, ROCmPackage):
depends_on("conduit@0.3.1:,master:", when="+conduit")
depends_on("conduit+mpi", when="+conduit+mpi")
depends_on("libfms@0.2.0:", when="+fms")
depends_on("ginkgo@1.4.0:1.8", when="@:4.7+ginkgo")
depends_on("ginkgo@1.9.0:", when="@4.8:+ginkgo")
depends_on("ginkgo@1.4.0:", when="+ginkgo")
conflicts("cxxstd=11", when="^ginkgo")
conflicts("cxxstd=14", when="^ginkgo@1.9:")
for sm_ in CudaPackage.cuda_arch_values:
depends_on(
"ginkgo+cuda cuda_arch={0}".format(sm_), when="+ginkgo+cuda cuda_arch={0}".format(sm_)
@@ -523,7 +513,6 @@ class Mfem(Package, CudaPackage, ROCmPackage):
)
patch("mfem-4.7.patch", when="@4.7.0")
patch("mfem-4.7-sundials-7.patch", when="@4.7.0+sundials ^sundials@7:")
patch("mfem-4.8-nvcc-c++17.patch", when="@4.8.0+cuda")
phases = ["configure", "build", "install"]
@@ -580,7 +569,7 @@ def find_optional_library(name, prefix):
mfem_mpiexec = "jsrun"
mfem_mpiexec_np = "-p"
elif "FLUX_EXEC_PATH" in os.environ:
mfem_mpiexec = "flux run -x -N 1"
mfem_mpiexec = "flux run"
mfem_mpiexec_np = "-n"
elif "PBS_JOBID" in os.environ:
mfem_mpiexec = "mpiexec"
@@ -647,13 +636,11 @@ def find_optional_library(name, prefix):
cxxstd = "14"
if self.spec.satisfies("^sundials@6.4.0:"):
cxxstd = "14"
if self.spec.satisfies("^ginkgo"):
cxxstd = "14"
# When rocPRIM is used (e.g. by PETSc + ROCm) we need C++14:
if self.spec.satisfies("^rocprim@5.5.0:"):
cxxstd = "14"
if self.spec.satisfies("^ginkgo@1.4.0:1.8"):
cxxstd = "14"
if self.spec.satisfies("^ginkgo@1.9.0:"):
cxxstd = "17"
cxxstd_req = spec.variants["cxxstd"].value
if cxxstd_req != "auto":
# Constraints for valid standard level should be imposed during
@@ -722,7 +709,7 @@ def find_optional_library(name, prefix):
hypre_gpu_libs = ""
if "+cuda" in hypre:
hypre_gpu_libs = " -lcusolver -lcusparse -lcurand -lcublas"
hypre_gpu_libs = " -lcusparse -lcurand -lcublas"
elif "+rocm" in hypre:
hypre_rocm_libs = LibraryList([])
if "^rocsparse" in hypre:
@@ -862,7 +849,7 @@ def find_optional_library(name, prefix):
]
if "+pumi" in spec:
pumi_libs_names = [
pumi_libs = [
"pumi",
"crv",
"ma",
@@ -876,11 +863,6 @@ def find_optional_library(name, prefix):
"apf_zoltan",
"spr",
]
pumi_libs_names = ["lib" + name for name in pumi_libs_names]
pumi = spec["pumi"]
pumi_libs = find_libraries(
pumi_libs_names, pumi.prefix, shared=("+shared" in pumi), recursive=True
)
pumi_dep_zoltan = ""
pumi_dep_parmetis = ""
if "+zoltan" in spec["pumi"]:
@@ -892,7 +874,11 @@ def find_optional_library(name, prefix):
options += [
"PUMI_OPT=-I%s" % spec["pumi"].prefix.include,
"PUMI_LIB=%s %s %s"
% (ld_flags_from_library_list(pumi_libs), pumi_dep_zoltan, pumi_dep_parmetis),
% (
ld_flags_from_dirs([spec["pumi"].prefix.lib], pumi_libs),
pumi_dep_zoltan,
pumi_dep_parmetis,
),
]
if "+gslib" in spec:
@@ -1001,10 +987,9 @@ 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: # hipblas is needed @4.8.0:+rocm
# note: superlu-dist+rocm needs the hipblas header path too
if "^hipblas" in spec:
hipblas = spec["hipblas"]
hip_headers += self.all_headers(hipblas)
hip_headers += hipblas.headers
hip_libs += hipblas.libs
if "%cce" in spec:
# We assume the proper Cray CCE module (cce) is loaded:
@@ -1028,22 +1013,6 @@ def find_optional_library(name, prefix):
hip_libs += find_libraries(craylibs, craylibs_path)
craylibs_path2 = join_path(craylibs_path, "../../../cce-clang", proc, "lib")
hip_libs += find_libraries("libunwind", craylibs_path2)
elif spec.satisfies("%rocmcc ^cray-mpich"):
# The AMD version of cray-mpich, libmpi_amd.so, needs the rpath
# to libflang.so (also needed for libpgmath.so and others).
rocmcc_bin_dir = os.path.dirname(env["SPACK_CXX"])
rocmcc_prefix = os.path.dirname(rocmcc_bin_dir)
rocmcc_libflang = find_libraries(
"libflang", join_path(rocmcc_prefix, "lib/llvm/lib"), recursive=False
)
hip_libs += rocmcc_libflang
if spec.satisfies("^cray-mpich"):
# The cray-mpich library, libmpi_*.so, needs the rpath to
# libpmi.so.0 and libpmi2.so.0 if that path is not configured
# properly on system level.
libpmi_lib = find_libraries("libpmi", "/opt/cray/pe/lib64")
if libpmi_lib:
hip_libs += libpmi_lib
if hip_headers:
options += ["HIP_OPT=%s" % hip_headers.cpp_flags]
@@ -1408,12 +1377,3 @@ def ld_flags_from_dirs(self, pkg_dirs_list, pkg_libs_list):
flags += ["-L%s" % dir for dir in pkg_dirs_list if not self.is_sys_lib_path(dir)]
flags += ["-l%s" % lib for lib in pkg_libs_list]
return " ".join(flags)
def all_headers(self, root_spec):
all_hdrs = HeaderList([])
for dep in root_spec.traverse(deptype="link"):
try:
all_hdrs += root_spec[dep.name].headers
except NoHeadersError:
pass
return all_hdrs

View File

@@ -38,8 +38,6 @@ class Mpilander(CMakePackage):
conflicts("%apple-clang@:7.4")
conflicts("%intel@:16")
conflicts("platform=windows")
def cmake_args(self):
args = [
# tests and examples

View File

@@ -40,7 +40,6 @@ class Musica(CMakePackage):
depends_on("cxx", type="build")
depends_on("fortran", type="build")
depends_on("mpi", when="+mpi")
depends_on("netcdf-fortran", when="+tuvx")
def cmake_args(self):
args = [

View File

@@ -4,6 +4,7 @@
import os
import spack.store
from spack.package import *
from ..boost.package import Boost
@@ -37,6 +38,11 @@ class Openspeedshop(CMakePackage):
variant(
"runtime", default=False, description="build only the runtime libraries and collectors."
)
variant(
"crayfe",
default=False,
description="build only the FE tool using the runtime_dir to point to target build.",
)
variant("cuda", default=False, description="build with cuda packages included.")
variant(
@@ -117,6 +123,11 @@ class Openspeedshop(CMakePackage):
depends_on("cbtf-krell@develop", when="@develop", type=("build", "link", "run"))
depends_on("cbtf-krell@1.9.3:9999", when="@2.4.0:9999", type=("build", "link", "run"))
depends_on("cbtf-krell@develop+crayfe", when="@develop+crayfe", type=("build", "link", "run"))
depends_on(
"cbtf-krell@1.9.3:9999+crayfe", when="@2.4.0:9999+crayfe", type=("build", "link", "run")
)
depends_on("cbtf-krell@develop+mpich2", when="@develop+mpich2", type=("build", "link", "run"))
depends_on(
"cbtf-krell@1.9.3:9999+mpich2", when="@2.4.0:9999+mpich2", type=("build", "link", "run")
@@ -153,6 +164,29 @@ class Openspeedshop(CMakePackage):
build_directory = "build_openspeedshop"
def set_cray_login_node_cmake_options(self, spec, cmake_options):
# Appends to cmake_options the options that will enable the appropriate
# Cray login node libraries
cray_login_node_options = []
rt_platform = "cray"
# How do we get the compute node (CNL) cbtf package install
# directory path?
# spec['cbtf'].prefix is the login node value for this build, as
# we only get here when building the login node components and
# that is all that is known to spack.
store = spack.store
be_ck = store.db.query_one("cbtf-krell arch=cray-CNL-haswell")
# Equivalent to install-tool cmake arg:
# '-DCBTF_KRELL_CN_RUNTIME_DIR=%s'
# % <base dir>/cbtf_v2.4.0.release/compute)
cray_login_node_options.append("-DCBTF_KRELL_CN_RUNTIME_DIR=%s" % be_ck.prefix)
cray_login_node_options.append("-DRUNTIME_PLATFORM=%s" % rt_platform)
cmake_options.extend(cray_login_node_options)
def cmake_args(self):
spec = self.spec
@@ -206,6 +240,13 @@ def cmake_args(self):
if spec.satisfies("+cuda"):
cmake_args.extend(["-DCBTF_ARGONAVIS_DIR=%s" % spec["cbtf-argonavis"].prefix])
if spec.satisfies("+crayfe"):
# We need to build target/compute node
# components/libraries first then pass
# those libraries to the openspeedshop
# login node build
self.set_cray_login_node_cmake_options(spec, cmake_args)
return cmake_args
def set_defaultbase_cmake_options(self, spec, cmake_options):

View File

@@ -4,6 +4,7 @@
import os
import spack.store
from spack.package import *
from ..boost.package import Boost
@@ -40,6 +41,11 @@ class OpenspeedshopUtils(CMakePackage):
variant(
"runtime", default=False, description="build only the runtime libraries and collectors."
)
variant(
"crayfe",
default=False,
description="build only the FE tool using the runtime_dir to point to target build.",
)
variant("cuda", default=False, description="build with cuda packages included.")
variant(
@@ -111,6 +117,11 @@ class OpenspeedshopUtils(CMakePackage):
depends_on("cbtf-krell@develop", when="@develop", type=("build", "link", "run"))
depends_on("cbtf-krell@1.9.3:9999", when="@2.4.0:9999", type=("build", "link", "run"))
depends_on("cbtf-krell@develop+crayfe", when="@develop+crayfe", type=("build", "link", "run"))
depends_on(
"cbtf-krell@1.9.3:9999+crayfe", when="@2.4.0:9999+crayfe", type=("build", "link", "run")
)
depends_on("cbtf-krell@develop+mpich2", when="@develop+mpich2", type=("build", "link", "run"))
depends_on(
"cbtf-krell@1.9.3:9999+mpich2", when="@2.4.0:9999+mpich2", type=("build", "link", "run")
@@ -147,6 +158,28 @@ class OpenspeedshopUtils(CMakePackage):
build_directory = "build_openspeedshop"
def set_cray_login_node_cmake_options(self, spec, cmake_options):
# Appends to cmake_options the options that will enable the appropriate
# Cray login node libraries
cray_login_node_options = []
rt_platform = "cray"
# How do we get the compute node (CNL) cbtf package install
# directory path?
# spec['cbtf'].prefix is the login node value for this build, as
# we only get here when building the login node components and
# that is all that is known to spack.
be_ck = spack.store.db.query_one("cbtf-krell arch=cray-CNL-haswell")
# Equivalent to install-tool cmake arg:
# '-DCBTF_KRELL_CN_RUNTIME_DIR=%s'
# % <base dir>/cbtf_v2.4.0elease/compute)
cray_login_node_options.append("-DCBTF_KRELL_CN_RUNTIME_DIR=%s" % be_ck.prefix)
cray_login_node_options.append("-DRUNTIME_PLATFORM=%s" % rt_platform)
cmake_options.extend(cray_login_node_options)
def cmake_args(self):
# Appends base options to cmake_args
spec = self.spec
@@ -187,6 +220,13 @@ def cmake_args(self):
]
)
if spec.satisfies("+crayfe"):
# We need to build target/compute node
# components/libraries first then pass
# those libraries to the openspeedshop
# login node build
self.set_cray_login_node_cmake_options(spec, cmake_args)
cmake_args.extend(["-DBUILD_QT3_GUI=FALSE"])
return cmake_args

View File

@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.package import *

View File

@@ -26,7 +26,6 @@ class Parsec(CMakePackage, CudaPackage):
license("BSD-3-Clause-Open-MPI")
version("master", branch="master")
version("4.0.2411", sha256="3f5750565b9f673626284dd0ba835dadea3633577fee50ac217baf43a335f2ef")
version("3.0.2209", sha256="67d383d076991484cb2a265f56420abdea7cc1f329c63ac65a3e96fbfb6cc295")
version("3.0.2012", sha256="7a8403ca67305738f3974cbc7a51b64c4ec353ae9170f2468262a9a52035eff6")
version(
@@ -60,8 +59,6 @@ class Parsec(CMakePackage, CudaPackage):
# TODO: Spack does not handle cross-compilation atm
# variant('xcompile', default=False, description='Cross compile')
depends_on("c", type="build")
depends_on("cmake@3.18:", type="build")
depends_on("python", type="build")
depends_on("flex", type="build")

View File

@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.hooks.sbang import sbang_shebang_line
from spack.package import *

View File

@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.package import *
from ..pdi.package import Pdi

View File

@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.package import *
from ..pdi.package import Pdi

View File

@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.package import *
from ..pdi.package import Pdi

View File

@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.package import *
from ..pdi.package import Pdi

View File

@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.package import *
from ..pdi.package import Pdi

View File

@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.package import *
from ..pdi.package import Pdi

View File

@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.package import *
from ..pdi.package import Pdi

View File

@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.package import *
from ..pdi.package import Pdi

View File

@@ -264,9 +264,6 @@ class Petsc(Package, CudaPackage, ROCmPackage):
variant("hwloc", default=False, description="Activates support for hwloc")
variant("kokkos", default=False, description="Activates support for kokkos and kokkos-kernels")
variant("fortran", default=True, description="Activates fortran support")
variant(
"fortran-bindings", default=True, when="+fortran", description="Activates fortran bindings"
)
with when("+rocm"):
# https://github.com/spack/spack/issues/37416
@@ -502,8 +499,6 @@ def mpi_dependent_options(self):
]
if "+fortran" in self.spec:
compiler_opts.append("--with-fc=%s" % os.environ["FC"])
fb = "1" if self.spec.satisfies("+fortran-bindings") else "0"
compiler_opts.append(f"--with-fortran-bindings={fb}")
else:
compiler_opts.append("--with-fc=0")
else:
@@ -513,8 +508,6 @@ def mpi_dependent_options(self):
]
if "+fortran" in self.spec:
compiler_opts.append("--with-fc=%s" % self.spec["mpi"].mpifc)
fb = "1" if self.spec.satisfies("+fortran-bindings") else "0"
compiler_opts.append(f"--with-fortran-bindings={fb}")
else:
compiler_opts.append("--with-fc=0")
if self.spec.satisfies("%intel"):

View File

@@ -1,43 +0,0 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PyHepstats(PythonPackage):
"""hepstats is a library for statistical inference aiming
to cover the needs in High Energy Physics.
It is part of the Scikit-HEP project.
"""
homepage = "https://github.com/scikit-hep/hepstats"
pypi = "hepstats/hepstats-0.8.1.tar.gz"
maintainers("jonas-eschle")
license("BSD-3-Clause", checked_by="jonas-eschle")
tags = ["likelihood", "statistics", "inference", "fitting", "hep"]
version("0.9.2", sha256="cf929871d45e338492eef585faaaa23eff93b200b4787d6b6181dc81f2607be7")
version("0.8.1", sha256="ebb890496d7aebbf1d717de15d073be31d6775065308a4e0f263ed4051992b3f")
depends_on("python@3.9:", type=("build", "run"), when="@0.8:")
# Build system changed from setuptools to hatch with v0.9.0
depends_on("py-setuptools@42:", type="build", when="@:0.8.1")
depends_on("py-setuptools-scm@3.4:+toml", type="build", when="@:0.8.1")
depends_on("py-hatchling", type="build", when="@0.9.0:")
depends_on("py-hatch-vcs", type="build", when="@0.9.0:")
variant("zfit", default=False, description="Allows to use improved tools from zfit.")
with default_args(type=("build", "run")):
depends_on("py-pandas")
depends_on("py-numpy")
depends_on("py-asdf")
depends_on("py-scipy")
depends_on("py-tqdm")
depends_on("py-uhi")
with when("+zfit"):
depends_on("py-zfit@0.20:", when="@0.8:")

View File

@@ -16,7 +16,6 @@ class PyNumba(PythonPackage):
license("BSD-2-Clause")
version("0.61.2", sha256="8750ee147940a6637b80ecf7f95062185ad8726c8c28a2295b8ec1160a196f7d")
version("0.61.0", sha256="888d2e89b8160899e19591467e8fdd4970e07606e1fbc248f239c89818d5f925")
version("0.60.0", sha256="5df6158e5584eece5fc83294b949fd30b9f1125df7708862205217e068aabf16")
version("0.59.1", sha256="76f69132b96028d2774ed20415e8c528a34e3299a40581bae178f0994a2f370b")
@@ -58,13 +57,7 @@ class PyNumba(PythonPackage):
depends_on("python@3.6:3.9", when="@0.53", type=("build", "run"))
depends_on("python@3.6:3.8", when="@0.52", type=("build", "run"))
depends_on("python@3.6:3.8", when="@0.48:0.51", type=("build", "run"))
# max_numpy_run_version in setup.py is a non inclusive upper bound
# min_numpy_run_version < min_numpy_build_version and these ranges use
# min_numpy_build_version
depends_on("py-numpy@2.0:2.2", when="@0.61.2", type=("build", "run"))
depends_on("py-numpy@2.0:2.1", when="@0.61.0", type=("build", "run"))
depends_on("py-numpy@2.0", when="@0.60", type=("build", "run"))
depends_on("py-numpy@2.0:2.2", when="@0.60:", type=("build", "run"))
depends_on("py-numpy@1.22:1.26", when="@0.58.1:0.59", type=("build", "run"))
depends_on("py-numpy@1.21:1.25", when="@0.58.0", type=("build", "run"))
depends_on("py-numpy@1.21:1.24", when="@0.57", type=("build", "run"))

View File

@@ -16,8 +16,7 @@ class Qjson(CMakePackage):
version("0.9.0", sha256="e812617477f3c2bb990561767a4cd8b1d3803a52018d4878da302529552610d4")
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("cxx", type="build") # generated
depends_on("qt")

View File

@@ -15,8 +15,7 @@ class Qtkeychain(CMakePackage):
version("0.9.1", sha256="9c2762d9d0759a65cdb80106d547db83c6e9fdea66f1973c6e9014f867c6f28e")
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("cxx", type="build") # generated
depends_on("qt+dbus")
depends_on("libsecret")

View File

@@ -195,7 +195,6 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage):
)
variant("omptarget", default=False, description="Build OpenMP on target device support")
variant("sycl", default=False, description="Build sycl backend")
variant("gpu-profiling", default=False, description="Enable GPU profiling")
variant("plugins", default=False, description="Enable runtime plugins")
variant("examples", default=True, description="Build examples.")
@@ -268,10 +267,6 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage):
for sm_ in CudaPackage.cuda_arch_values:
depends_on("camp +cuda cuda_arch={0}".format(sm_), when="cuda_arch={0}".format(sm_))
conflicts("+gpu-profiling", when="~cuda~rocm", msg="GPU profiling requires CUDA or ROCm")
conflicts("+gpu-profiling +cuda", when="@:2022.02.99")
conflicts("+gpu-profiling +rocm", when="@:2022.02.99")
conflicts("+omptarget +rocm")
conflicts("+sycl +omptarget")
conflicts("+sycl +rocm")
@@ -328,7 +323,11 @@ def initconfig_hardware_entries(self):
entries.append("#------------------{0}\n".format("-" * 30))
entries.append(cmake_cache_option("ENABLE_OPENMP", spec.satisfies("+openmp")))
entries.append(cmake_cache_option("ENABLE_CUDA", spec.satisfies("+cuda")))
if spec.satisfies("+cuda"):
entries.append(cmake_cache_option("ENABLE_CUDA", True))
else:
entries.append(cmake_cache_option("ENABLE_CUDA", False))
if spec.satisfies("+rocm"):
entries.append(cmake_cache_option("ENABLE_HIP", True))
@@ -377,12 +376,6 @@ def initconfig_package_entries(self):
)
entries.append(cmake_cache_option("RAJA_ENABLE_SYCL", spec.satisfies("+sycl")))
entries.append(
cmake_cache_option("RAJA_ENABLE_NV_TOOLS_EXT", spec.satisfies("+gpu-profiling +cuda"))
)
entries.append(
cmake_cache_option("RAJA_ENABLE_ROCTX", spec.satisfies("+gpu-profiling +rocm"))
)
if spec.satisfies("+lowopttest"):
entries.append(cmake_cache_string("CMAKE_CXX_FLAGS_RELEASE", "-O1"))

View File

@@ -5,6 +5,7 @@
import os
import re
import spack.build_systems
import spack.build_systems.cargo
from spack.package import *

View File

@@ -41,10 +41,6 @@ class Seissol(CMakePackage, CudaPackage, ROCmPackage):
maintainers("Thomas-Ulrich", "davschneller", "vikaskurapati")
depends_on("cxx", type="build")
depends_on("c", type="build")
depends_on("fortran", type="build", when="equations=poroelastic")
variant("asagi", default=True, description="Use ASAGI for material input")
variant(
"convergence_order",
@@ -210,10 +206,8 @@ class Seissol(CMakePackage, CudaPackage, ROCmPackage):
depends_on("asagi +mpi +mpi3", when="+asagi")
depends_on("asagi@:1.0.1", when="@:1.3.1 +asagi")
depends_on("easi ~asagi jit=lua", when="~asagi")
depends_on("easi +asagi jit=lua", when="+asagi")
depends_on("easi ~asagi jit=impalajit,lua", when="~asagi")
depends_on("easi +asagi jit=impalajit,lua", when="+asagi")
depends_on("intel-oneapi-mkl threads=none", when="gemm_tools_list=MKL")
depends_on("blis threads=none", when="gemm_tools_list=BLIS")
@@ -256,6 +250,7 @@ def cmake_args(self):
self.define_from_variant("EQUATIONS", "equations"),
self.define_from_variant("NETCDF", "netcdf"),
]
gemm_tools_list = ",".join(self.spec.variants["gemm_tools_list"].value)
args.append(f"-DGEMM_TOOLS_LIST={gemm_tools_list}")
@@ -366,7 +361,7 @@ def cmake_args(self):
args.append(f"-DHOST_ARCH={hostarch}")
args.append(self.define("Python3_EXECUTABLE", self.spec["python"].command.path))
args.append(self.define("PYTHON_EXECUTABLE", self.spec["python"].command.path))
return args

View File

@@ -4,6 +4,7 @@
import os
import spack
from spack.package import *
@@ -114,7 +115,9 @@ class SingularityEos(CMakePackage, CudaPackage):
# specfic specs when using GPU/cuda offloading
depends_on("kokkos +wrapper+cuda_lambda", when="+cuda+kokkos")
depends_on("kokkos-kernels ~shared", when="+kokkos-kernels")
# fix for older spacks
if Version(spack.spack_version) >= Version("0.17"):
depends_on("kokkos-kernels ~shared", when="+kokkos-kernels")
for _flag in list(CudaPackage.cuda_arch_values):
depends_on("kokkos cuda_arch=" + _flag, when="+cuda+kokkos cuda_arch=" + _flag)

View File

@@ -132,13 +132,10 @@ def setup_dependent_build_environment(
env.set("MPIF90", os.path.join(self.prefix.bin, "mpif90"))
dependent_module = dependent_spec.package.module
if dependent_spec.satisfies("^c"):
env.set("OMPI_CC", dependent_module.spack_cc)
if dependent_spec.satisfies("^cxx"):
env.set("OMPI_CXX", dependent_module.spack_cxx)
if dependent_spec.satisfies("^fortran"):
env.set("OMPI_FC", dependent_module.spack_fc)
env.set("OMPI_F77", dependent_module.spack_f77)
env.set("OMPI_CC", dependent_module.spack_cc)
env.set("OMPI_CXX", dependent_module.spack_cxx)
env.set("OMPI_FC", dependent_module.spack_fc)
env.set("OMPI_F77", dependent_module.spack_f77)
env.prepend_path("LD_LIBRARY_PATH", self.prefix.lib)
def setup_run_environment(self, env: EnvironmentModifications) -> None:

View File

@@ -405,7 +405,7 @@ def cmake_args(self):
if "+rocm" in spec:
args.extend(
[
define("CMAKE_C_COMPILER", spec["llvm-amdgpu"].prefix.bin.amdclang),
define("CMAKE_C_COMPILER", spec["llvm-amdgpu"].prefix.bin.clang),
define("CMAKE_CXX_COMPILER", spec["hip"].hipcc),
define("HIP_PATH", spec["hip"].prefix),
define("HIP_CLANG_INCLUDE_PATH", spec["llvm-amdgpu"].prefix.include),

View File

@@ -15,12 +15,9 @@ class Trivy(GoPackage):
license("Apache-2.0", checked_by="RobertMaaskant")
version("0.62.1", sha256="1b8000f08876dd02203021414581275daa69db00fab731351dbcf2a008ebe82a")
version("0.62.0", sha256="2b0b4df4bbfebde00a14a0616f5013db4cbba0f021a780a7e3b717a2c2978493")
version("0.61.1", sha256="f6ad43e008c008d67842c9e2b4af80c2e96854db8009fba48fc37b4f9b15f59b")
version("0.61.0", sha256="1e97b1b67a4c3aee9c567534e60355033a58ce43a3705bdf198d7449d53b6979")
depends_on("go@1.24.2:", type="build", when="@0.62:")
depends_on("go@1.24:", type="build")
build_directory = "cmd/trivy"

View File

@@ -3,6 +3,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
from spack.spec import ConflictsInSpecError
from ..boost.package import Boost
@@ -56,12 +57,20 @@ def flag_handler(self, name, flags):
# the user can add arbitrary strings to the flags. Here we can at least
# fail early.
# We'll include cppflags in case users mistakenly put c++ flags there.
if (
name in ("cxxflags", "cppflags")
and self.spec.satisfies("+tests")
and "-stdlib=libc++" in flags
):
raise InstallError(yaml_cpp_tests_libcxx_error_msg)
spec = self.spec
if name in ("cxxflags", "cppflags") and spec.satisfies("+tests"):
if "-stdlib=libc++" in flags:
raise ConflictsInSpecError(
spec,
[
(
spec,
spec.compiler_flags[name],
spec.variants["tests"],
yaml_cpp_tests_libcxx_error_msg,
)
],
)
return (flags, None, None)
def cmake_args(self):

View File

@@ -28,7 +28,6 @@ class Yosys(MakefilePackage):
version("master", branch="master")
version("0.53", commit="53c22ab7c0ced80861c7536c5dae682c30fb5834", submodules=True)
version("0.52", commit="fee39a3284c90249e1d9684cf6944ffbbcbb8f90", submodules=True)
version("0.51", commit="c4b5190229616f7ebf8197f43990b4429de3e420", submodules=True)
version("0.50", commit="b5170e1394f602c607e75bdbb1a2b637118f2086", submodules=True)

View File

@@ -16,7 +16,6 @@ class Yq(GoPackage):
license("MIT", checked_by="teaguesterling")
version("4.45.2", sha256="7ae8f8a4acc78dba5ab3a4bb004d390bbf6fe1cd1fc5746ff7db19f8e627b84f")
version("4.45.1", sha256="074a21a002c32a1db3850064ad1fc420083d037951c8102adecfea6c5fd96427")
version("4.44.6", sha256="c0acef928168e5fdb26cd7e8320eddde822f30cf1942817f3f6b854dd721653f")
version("4.44.5", sha256="1505367f4a6c0c4f3b91c6197ffed4112d29ef97c48d0b5e66530cfa851d3f0e")
@@ -27,6 +26,5 @@ class Yq(GoPackage):
version("4.35.2", sha256="8b17d710c56f764e9beff06d7a7b1c77d87c4ba4219ce4ce67e7ee29670f4f13")
# from go.mod
depends_on("go@1.23:", type="build", when="@4.45.2:")
depends_on("go@1.21:", type="build", when="@4.40:")
depends_on("go@1.20:", type="build", when="@4.31:")

View File

@@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.package import *