Compare commits
18 Commits
hs/rocm-op
...
packages/c
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1e38c62748 | ||
![]() |
9697c1934c | ||
![]() |
a011b49e1e | ||
![]() |
ae50757f3c | ||
![]() |
6f1dce95f9 | ||
![]() |
fd59d3e589 | ||
![]() |
0172208c52 | ||
![]() |
02c2516e88 | ||
![]() |
a8e37ccbbb | ||
![]() |
f0f463c8dc | ||
![]() |
a137da1cd5 | ||
![]() |
03e972314f | ||
![]() |
9a7a3d2743 | ||
![]() |
76f00a3659 | ||
![]() |
cd98781fb4 | ||
![]() |
dd16f451fc | ||
![]() |
4f6cd5abde | ||
![]() |
d7f05e08be |
@@ -1010,7 +1010,7 @@ def _issues_in_depends_on_directive(pkgs, error_cls):
|
||||
for dep_name, dep in deps_by_name.items():
|
||||
|
||||
def check_virtual_with_variants(spec, msg):
|
||||
if not spec.virtual or not spec.variants:
|
||||
if not spack.repo.PATH.is_virtual(spec.name) or not spec.variants:
|
||||
return
|
||||
error = error_cls(
|
||||
f"{pkg_name}: {msg}",
|
||||
|
@@ -2529,10 +2529,10 @@ def install_root_node(
|
||||
allow_missing: when true, allows installing a node with missing dependencies
|
||||
"""
|
||||
# Early termination
|
||||
if spec.external or spec.virtual:
|
||||
warnings.warn("Skipping external or virtual package {0}".format(spec.format()))
|
||||
if spec.external or not spec.concrete:
|
||||
warnings.warn("Skipping external or abstract spec {0}".format(spec.format()))
|
||||
return
|
||||
elif spec.concrete and spec.installed and not force:
|
||||
elif spec.installed and not force:
|
||||
warnings.warn("Package for spec {0} already installed.".format(spec.format()))
|
||||
return
|
||||
|
||||
|
@@ -16,6 +16,7 @@
|
||||
from typing import Callable, Dict, List, Set
|
||||
from urllib.request import Request
|
||||
|
||||
import llnl.path
|
||||
import llnl.util.filesystem as fs
|
||||
import llnl.util.tty as tty
|
||||
from llnl.util.tty.color import cescape, colorize
|
||||
@@ -83,6 +84,9 @@ def get_stack_changed(env_path, rev1="HEAD^", rev2="HEAD"):
|
||||
whether or not the stack was changed. Returns True if the environment
|
||||
manifest changed between the provided revisions (or additionally if the
|
||||
`.gitlab-ci.yml` file itself changed). Returns False otherwise."""
|
||||
# git returns posix paths always, normalize input to be comptaible
|
||||
# with that
|
||||
env_path = llnl.path.convert_to_posix_path(env_path)
|
||||
git = spack.util.git.git()
|
||||
if git:
|
||||
with fs.working_dir(spack.paths.prefix):
|
||||
|
@@ -41,7 +41,11 @@ def providers(parser, args):
|
||||
specs = spack.cmd.parse_specs(args.virtual_package)
|
||||
|
||||
# Check prerequisites
|
||||
non_virtual = [str(s) for s in specs if not s.virtual or s.name not in valid_virtuals]
|
||||
non_virtual = [
|
||||
str(s)
|
||||
for s in specs
|
||||
if not spack.repo.PATH.is_virtual(s.name) or s.name not in valid_virtuals
|
||||
]
|
||||
if non_virtual:
|
||||
msg = "non-virtual specs cannot be part of the query "
|
||||
msg += "[{0}]\n".format(", ".join(non_virtual))
|
||||
|
@@ -220,7 +220,7 @@ def concretize_one(spec: Union[str, Spec], tests: TestsType = False) -> Spec:
|
||||
opt, i, answer = min(result.answers)
|
||||
name = spec.name
|
||||
# TODO: Consolidate this code with similar code in solve.py
|
||||
if spec.virtual:
|
||||
if spack.repo.PATH.is_virtual(spec.name):
|
||||
providers = [s.name for s in answer.values() if s.package.provides(name)]
|
||||
name = providers[0]
|
||||
|
||||
|
@@ -41,6 +41,8 @@
|
||||
Union,
|
||||
)
|
||||
|
||||
import spack.repo
|
||||
|
||||
try:
|
||||
import uuid
|
||||
|
||||
@@ -1556,7 +1558,12 @@ def _query(
|
||||
# If we did fine something, the query spec can't be virtual b/c we matched an actual
|
||||
# package installation, so skip the virtual check entirely. If we *didn't* find anything,
|
||||
# check all the deferred specs *if* the query is virtual.
|
||||
if not results and query_spec is not None and deferred and query_spec.virtual:
|
||||
if (
|
||||
not results
|
||||
and query_spec is not None
|
||||
and deferred
|
||||
and spack.repo.PATH.is_virtual(query_spec.name)
|
||||
):
|
||||
results = [spec for spec in deferred if spec.satisfies(query_spec)]
|
||||
|
||||
return results
|
||||
|
@@ -259,6 +259,8 @@ def detect_specs(
|
||||
)
|
||||
return []
|
||||
|
||||
from spack.repo import PATH as repo_path
|
||||
|
||||
result = []
|
||||
for candidate_path, items_in_prefix in _group_by_prefix(
|
||||
llnl.util.lang.dedupe(paths)
|
||||
@@ -305,7 +307,10 @@ def detect_specs(
|
||||
|
||||
resolved_specs[spec] = candidate_path
|
||||
try:
|
||||
spec.validate_detection()
|
||||
# Validate the spec calling a package specific method
|
||||
pkg_cls = repo_path.get_pkg_class(spec.name)
|
||||
validate_fn = getattr(pkg_cls, "validate_detected_spec", lambda x, y: None)
|
||||
validate_fn(spec, spec.extra_attributes)
|
||||
except Exception as e:
|
||||
msg = (
|
||||
f'"{spec}" has been detected on the system but will '
|
||||
|
@@ -209,7 +209,7 @@ def provides(self):
|
||||
# All the other tokens in the hierarchy must be virtual dependencies
|
||||
for x in self.hierarchy_tokens:
|
||||
if self.spec.package.provides(x):
|
||||
provides[x] = self.spec[x]
|
||||
provides[x] = self.spec
|
||||
return provides
|
||||
|
||||
@property
|
||||
|
@@ -406,8 +406,8 @@ def fixup_macos_rpaths(spec):
|
||||
entries which makes it harder to adjust with ``install_name_tool
|
||||
-delete_rpath``.
|
||||
"""
|
||||
if spec.external or spec.virtual:
|
||||
tty.warn("external or virtual package cannot be fixed up: {0!s}".format(spec))
|
||||
if spec.external or not spec.concrete:
|
||||
tty.warn("external/abstract spec cannot be fixed up: {0!s}".format(spec))
|
||||
return False
|
||||
|
||||
if "platform=darwin" not in spec:
|
||||
|
@@ -6,6 +6,7 @@
|
||||
import copy
|
||||
import enum
|
||||
import functools
|
||||
import io
|
||||
import itertools
|
||||
import os
|
||||
import pathlib
|
||||
@@ -73,17 +74,19 @@
|
||||
#: Enable the addition of a runtime node
|
||||
WITH_RUNTIME = sys.platform != "win32"
|
||||
|
||||
#: Data class that contain configuration on what a
|
||||
#: clingo solve should output.
|
||||
#:
|
||||
#: Args:
|
||||
#: timers (bool): Print out coarse timers for different solve phases.
|
||||
#: stats (bool): Whether to output Clingo's internal solver statistics.
|
||||
#: out: Optional output stream for the generated ASP program.
|
||||
#: setup_only (bool): if True, stop after setup and don't solve (default False).
|
||||
OutputConfiguration = collections.namedtuple(
|
||||
"OutputConfiguration", ["timers", "stats", "out", "setup_only"]
|
||||
)
|
||||
|
||||
class OutputConfiguration(NamedTuple):
|
||||
"""Data class that contains configuration on what a clingo solve should output."""
|
||||
|
||||
#: Print out coarse timers for different solve phases
|
||||
timers: bool
|
||||
#: Whether to output Clingo's internal solver statistics
|
||||
stats: bool
|
||||
#: Optional output stream for the generated ASP program
|
||||
out: Optional[io.IOBase]
|
||||
#: If True, stop after setup and don't solve
|
||||
setup_only: bool
|
||||
|
||||
|
||||
#: Default output configuration for a solve
|
||||
DEFAULT_OUTPUT_CONFIGURATION = OutputConfiguration(
|
||||
@@ -498,7 +501,7 @@ def _compute_specs_from_answer_set(self):
|
||||
# The specs must be unified to get here, so it is safe to associate any satisfying spec
|
||||
# with the input. Multiple inputs may be matched to the same concrete spec
|
||||
node = SpecBuilder.make_node(pkg=input_spec.name)
|
||||
if input_spec.virtual:
|
||||
if spack.repo.PATH.is_virtual(input_spec.name):
|
||||
providers = [
|
||||
spec.name for spec in answer.values() if spec.package.provides(input_spec.name)
|
||||
]
|
||||
@@ -2080,7 +2083,11 @@ def _spec_clauses(
|
||||
f: Union[Type[_Head], Type[_Body]] = _Body if body else _Head
|
||||
|
||||
if spec.name:
|
||||
clauses.append(f.node(spec.name) if not spec.virtual else f.virtual_node(spec.name))
|
||||
clauses.append(
|
||||
f.node(spec.name)
|
||||
if not spack.repo.PATH.is_virtual(spec.name)
|
||||
else f.virtual_node(spec.name)
|
||||
)
|
||||
if spec.namespace:
|
||||
clauses.append(f.namespace(spec.name, spec.namespace))
|
||||
|
||||
@@ -2107,7 +2114,7 @@ def _spec_clauses(
|
||||
|
||||
for value in variant.value_as_tuple:
|
||||
# ensure that the value *can* be valid for the spec
|
||||
if spec.name and not spec.concrete and not spec.virtual:
|
||||
if spec.name and not spec.concrete and not spack.repo.PATH.is_virtual(spec.name):
|
||||
variant_defs = vt.prevalidate_variant_value(
|
||||
self.pkg_class(spec.name), variant, spec
|
||||
)
|
||||
@@ -2667,7 +2674,9 @@ def setup(
|
||||
# Fail if we already know an unreachable node is requested
|
||||
for spec in specs:
|
||||
missing_deps = [
|
||||
str(d) for d in spec.traverse() if d.name not in self.pkgs and not d.virtual
|
||||
str(d)
|
||||
for d in spec.traverse()
|
||||
if d.name not in self.pkgs and not spack.repo.PATH.is_virtual(d.name)
|
||||
]
|
||||
if missing_deps:
|
||||
raise spack.spec.InvalidDependencyError(spec.name, missing_deps)
|
||||
@@ -2884,7 +2893,11 @@ def literal_specs(self, specs):
|
||||
pkg_name = clause.args[1]
|
||||
self.gen.fact(fn.mentioned_in_literal(trigger_id, root_name, pkg_name))
|
||||
|
||||
requirements.append(fn.attr("virtual_root" if spec.virtual else "root", spec.name))
|
||||
requirements.append(
|
||||
fn.attr(
|
||||
"virtual_root" if spack.repo.PATH.is_virtual(spec.name) else "root", spec.name
|
||||
)
|
||||
)
|
||||
cache[imposed_spec_key] = (effect_id, requirements)
|
||||
self.gen.fact(fn.pkg_fact(spec.name, fn.condition_effect(condition_id, effect_id)))
|
||||
|
||||
@@ -4085,10 +4098,10 @@ def _check_input_and_extract_concrete_specs(specs):
|
||||
reusable = []
|
||||
for root in specs:
|
||||
for s in root.traverse():
|
||||
if s.virtual:
|
||||
continue
|
||||
if s.concrete:
|
||||
reusable.append(s)
|
||||
elif spack.repo.PATH.is_virtual(s.name):
|
||||
continue
|
||||
spack.spec.Spec.ensure_valid_variants(s)
|
||||
return reusable
|
||||
|
||||
|
@@ -265,6 +265,7 @@ error(100, "Cannot select a single version for virtual '{0}'", Virtual)
|
||||
% If we select a deprecated version, mark the package as deprecated
|
||||
attr("deprecated", node(ID, Package), Version) :-
|
||||
attr("version", node(ID, Package), Version),
|
||||
not external(node(ID, Package)),
|
||||
pkg_fact(Package, deprecated_version(Version)).
|
||||
|
||||
error(100, "Package '{0}' needs the deprecated version '{1}', and this is not allowed", Package, Version)
|
||||
|
@@ -381,7 +381,9 @@ def __init__(
|
||||
self.all_types = dt.LINK | dt.RUN | dt.BUILD
|
||||
|
||||
self._possible_dependencies: Set[str] = set()
|
||||
self._possible_virtuals: Set[str] = set(x.name for x in specs if x.virtual)
|
||||
self._possible_virtuals: Set[str] = {
|
||||
x.name for x in specs if spack.repo.PATH.is_virtual(x.name)
|
||||
}
|
||||
|
||||
def possible_dependencies(self) -> Set[str]:
|
||||
"""Returns the list of possible dependencies"""
|
||||
|
@@ -1337,14 +1337,20 @@ class SpecBuildInterface(lang.ObjectWrapper):
|
||||
"command", default_handler=_command_default_handler, _indirect=True
|
||||
)
|
||||
|
||||
def __init__(self, spec: "Spec", name: str, query_parameters: List[str], _parent: "Spec"):
|
||||
def __init__(
|
||||
self,
|
||||
spec: "Spec",
|
||||
name: str,
|
||||
query_parameters: List[str],
|
||||
_parent: "Spec",
|
||||
is_virtual: bool,
|
||||
):
|
||||
super().__init__(spec)
|
||||
# Adding new attributes goes after super() call since the ObjectWrapper
|
||||
# resets __dict__ to behave like the passed object
|
||||
original_spec = getattr(spec, "wrapped_obj", spec)
|
||||
self.wrapped_obj = original_spec
|
||||
self.token = original_spec, name, query_parameters, _parent
|
||||
is_virtual = spack.repo.PATH.is_virtual(name)
|
||||
self.token = original_spec, name, query_parameters, _parent, is_virtual
|
||||
self.last_query = QueryState(
|
||||
name=name, extra_parameters=query_parameters, isvirtual=is_virtual
|
||||
)
|
||||
@@ -1915,6 +1921,12 @@ def package_class(self):
|
||||
|
||||
@property
|
||||
def virtual(self):
|
||||
warnings.warn(
|
||||
"`Spec.virtual` is deprecated and will be removed in version 1.0.0. Use "
|
||||
"`spack.repo.PATH.is_virtual(spec.name)` instead.",
|
||||
category=spack.error.SpackAPIWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
return spack.repo.PATH.is_virtual(self.name)
|
||||
|
||||
@property
|
||||
@@ -2814,24 +2826,6 @@ def from_detection(
|
||||
s.extra_attributes = extra_attributes
|
||||
return s
|
||||
|
||||
def validate_detection(self):
|
||||
"""Validate the detection of an external spec.
|
||||
|
||||
This method is used as part of Spack's detection protocol, and is
|
||||
not meant for client code use.
|
||||
"""
|
||||
# Assert that _extra_attributes is a Mapping and not None,
|
||||
# which likely means the spec was created with Spec.from_detection
|
||||
msg = 'cannot validate "{0}" since it was not created ' "using Spec.from_detection".format(
|
||||
self
|
||||
)
|
||||
assert isinstance(self.extra_attributes, collections.abc.Mapping), msg
|
||||
|
||||
# Validate the spec calling a package specific method
|
||||
pkg_cls = spack.repo.PATH.get_pkg_class(self.name)
|
||||
validate_fn = getattr(pkg_cls, "validate_detected_spec", lambda x, y: None)
|
||||
validate_fn(self, self.extra_attributes)
|
||||
|
||||
def _patches_assigned(self):
|
||||
"""Whether patches have been assigned to this spec by the concretizer."""
|
||||
# FIXME: _patches_in_order_of_appearance is attached after concretization
|
||||
@@ -3090,7 +3084,7 @@ def validate_or_raise(self):
|
||||
# FIXME: raise just the first one encountered
|
||||
for spec in self.traverse():
|
||||
# raise an UnknownPackageError if the spec's package isn't real.
|
||||
if (not spec.virtual) and spec.name:
|
||||
if spec.name and not spack.repo.PATH.is_virtual(spec.name):
|
||||
spack.repo.PATH.get_pkg_class(spec.fullname)
|
||||
|
||||
# validate compiler in addition to the package name.
|
||||
@@ -3099,7 +3093,7 @@ def validate_or_raise(self):
|
||||
raise UnsupportedCompilerError(spec.compiler.name)
|
||||
|
||||
# Ensure correctness of variants (if the spec is not virtual)
|
||||
if not spec.virtual:
|
||||
if not spack.repo.PATH.is_virtual(spec.name):
|
||||
Spec.ensure_valid_variants(spec)
|
||||
substitute_abstract_variants(spec)
|
||||
|
||||
@@ -3334,7 +3328,9 @@ def intersects(self, other: Union[str, "Spec"], deps: bool = True) -> bool:
|
||||
|
||||
# If the names are different, we need to consider virtuals
|
||||
if self.name != other.name and self.name and other.name:
|
||||
if self.virtual and other.virtual:
|
||||
self_virtual = spack.repo.PATH.is_virtual(self.name)
|
||||
other_virtual = spack.repo.PATH.is_virtual(other.name)
|
||||
if self_virtual and other_virtual:
|
||||
# Two virtual specs intersect only if there are providers for both
|
||||
lhs = spack.repo.PATH.providers_for(str(self))
|
||||
rhs = spack.repo.PATH.providers_for(str(other))
|
||||
@@ -3342,8 +3338,8 @@ def intersects(self, other: Union[str, "Spec"], deps: bool = True) -> bool:
|
||||
return bool(intersection)
|
||||
|
||||
# A provider can satisfy a virtual dependency.
|
||||
elif self.virtual or other.virtual:
|
||||
virtual_spec, non_virtual_spec = (self, other) if self.virtual else (other, self)
|
||||
elif self_virtual or other_virtual:
|
||||
virtual_spec, non_virtual_spec = (self, other) if self_virtual else (other, self)
|
||||
try:
|
||||
# Here we might get an abstract spec
|
||||
pkg_cls = spack.repo.PATH.get_pkg_class(non_virtual_spec.fullname)
|
||||
@@ -3448,7 +3444,9 @@ def satisfies(self, other: Union[str, "Spec"], deps: bool = True) -> bool:
|
||||
# If the names are different, we need to consider virtuals
|
||||
if self.name != other.name and self.name and other.name:
|
||||
# A concrete provider can satisfy a virtual dependency.
|
||||
if not self.virtual and other.virtual:
|
||||
if not spack.repo.PATH.is_virtual(self.name) and spack.repo.PATH.is_virtual(
|
||||
other.name
|
||||
):
|
||||
try:
|
||||
# Here we might get an abstract spec
|
||||
pkg_cls = spack.repo.PATH.get_pkg_class(self.fullname)
|
||||
@@ -3516,7 +3514,7 @@ def satisfies(self, other: Union[str, "Spec"], deps: bool = True) -> bool:
|
||||
lhs_edges: Dict[str, Set[DependencySpec]] = collections.defaultdict(set)
|
||||
for rhs_edge in other.traverse_edges(root=False, cover="edges"):
|
||||
# If we are checking for ^mpi we need to verify if there is any edge
|
||||
if rhs_edge.spec.virtual:
|
||||
if spack.repo.PATH.is_virtual(rhs_edge.spec.name):
|
||||
rhs_edge.update_virtuals(virtuals=(rhs_edge.spec.name,))
|
||||
|
||||
if not rhs_edge.virtuals:
|
||||
@@ -3562,7 +3560,7 @@ def satisfies(self, other: Union[str, "Spec"], deps: bool = True) -> bool:
|
||||
|
||||
def virtual_dependencies(self):
|
||||
"""Return list of any virtual deps in this spec."""
|
||||
return [spec for spec in self.traverse() if spec.virtual]
|
||||
return [spec for spec in self.traverse() if spack.repo.PATH.is_virtual(spec.name)]
|
||||
|
||||
@property # type: ignore[misc] # decorated prop not supported in mypy
|
||||
def patches(self):
|
||||
@@ -3762,21 +3760,16 @@ def __getitem__(self, name: str):
|
||||
# Consider runtime dependencies and direct build/test deps before transitive dependencies,
|
||||
# and prefer matches closest to the root.
|
||||
try:
|
||||
child: Spec = next(
|
||||
e.spec
|
||||
for e in itertools.chain(
|
||||
(e for e in order() if e.spec.name == name or name in e.virtuals),
|
||||
# for historical reasons
|
||||
(e for e in order() if e.spec.concrete and e.spec.package.provides(name)),
|
||||
)
|
||||
)
|
||||
edge = next((e for e in order() if e.spec.name == name or name in e.virtuals))
|
||||
except StopIteration:
|
||||
raise KeyError(f"No spec with name {name} in {self}")
|
||||
|
||||
if self._concrete:
|
||||
return SpecBuildInterface(child, name, query_parameters, _parent=self)
|
||||
return SpecBuildInterface(
|
||||
edge.spec, name, query_parameters, _parent=self, is_virtual=name in edge.virtuals
|
||||
)
|
||||
|
||||
return child
|
||||
return edge.spec
|
||||
|
||||
def __contains__(self, spec):
|
||||
"""True if this spec or some dependency satisfies the spec.
|
||||
@@ -4850,7 +4843,9 @@ def reconstruct_virtuals_on_edges(spec):
|
||||
possible_virtuals = set()
|
||||
for node in spec.traverse():
|
||||
try:
|
||||
possible_virtuals.update({x for x in node.package.dependencies if Spec(x).virtual})
|
||||
possible_virtuals.update(
|
||||
{x for x in node.package.dependencies if spack.repo.PATH.is_virtual(x)}
|
||||
)
|
||||
except Exception as e:
|
||||
warnings.warn(f"cannot reconstruct virtual dependencies on package {node.name}: {e}")
|
||||
continue
|
||||
|
@@ -1243,7 +1243,7 @@ def test_transitive_conditional_virtual_dependency(self, mutable_config):
|
||||
def test_conditional_provides_or_depends_on(self):
|
||||
# Check that we can concretize correctly a spec that can either
|
||||
# provide a virtual or depend on it based on the value of a variant
|
||||
s = spack.concretize.concretize_one("conditional-provider +disable-v1")
|
||||
s = spack.concretize.concretize_one("v1-consumer ^conditional-provider +disable-v1")
|
||||
assert "v1-provider" in s
|
||||
assert s["v1"].name == "v1-provider"
|
||||
assert s["v2"].name == "conditional-provider"
|
||||
|
@@ -259,7 +259,7 @@ def test_develop(self):
|
||||
def test_external_mpi(self):
|
||||
# make sure this doesn't give us an external first.
|
||||
spec = spack.concretize.concretize_one("mpi")
|
||||
assert not spec["mpi"].external
|
||||
assert not spec.external and spec.package.provides("mpi")
|
||||
|
||||
# load config
|
||||
conf = syaml.load_config(
|
||||
@@ -293,7 +293,7 @@ def mock_module(cmd, module):
|
||||
monkeypatch.setattr(spack.util.module_cmd, "module", mock_module)
|
||||
|
||||
spec = spack.concretize.concretize_one("mpi")
|
||||
assert not spec["mpi"].external
|
||||
assert not spec.external and spec.package.provides("mpi")
|
||||
|
||||
# load config
|
||||
conf = syaml.load_config(
|
||||
|
@@ -194,7 +194,8 @@ class Acts(CMakePackage, CudaPackage):
|
||||
version("0.08.1", commit="289bdcc320f0b3ff1d792e29e462ec2d3ea15df6")
|
||||
version("0.08.0", commit="99eedb38f305e3a1cd99d9b4473241b7cd641fa9")
|
||||
|
||||
depends_on("cxx", type="build") # generated
|
||||
depends_on("c", type="build", when="+dd4hep") # DD4hep requires C
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
# Variants that affect the core Acts library
|
||||
variant(
|
||||
|
@@ -27,6 +27,7 @@ class Apfel(AutotoolsPackage, CMakePackage):
|
||||
version("3.0.6", sha256="7063c9eee457e030b97926ac166cdaedd84625b31397e1dfd01ae47371fb9f61")
|
||||
version("3.0.4", sha256="c7bfae7fe2dc0185981850f2fe6ae4842749339d064c25bf525b4ef412bbb224")
|
||||
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
depends_on("fortran", type="build")
|
||||
|
||||
|
@@ -36,7 +36,7 @@ class Apptainer(SingularityBase):
|
||||
checked_by="tgamblin",
|
||||
)
|
||||
|
||||
version("main", branch="main")
|
||||
version("main", branch="main", get_full_repo=True) # apptainer version uses git describe
|
||||
version("1.3.6", sha256="b5343369e7fdf67572f887d81f8d2b938f099fb39c876d96430d747935960d51")
|
||||
version("1.3.5", sha256="fe1c977da952edf1056915b2df67ae2203ef06065d4e4901a237c902329306b2")
|
||||
version("1.3.4", sha256="c6ccfdd7c967e5c36dde8711f369c4ac669a16632b79fa0dcaf7e772b7a47397")
|
||||
|
@@ -72,6 +72,7 @@ class Celeritas(CMakePackage, CudaPackage, ROCmPackage):
|
||||
depends_on("nlohmann-json")
|
||||
depends_on("geant4@10.5:", when="@0.4.2: +geant4")
|
||||
depends_on("geant4@10.5:11.1", when="@0.3.1:0.4.1 +geant4")
|
||||
depends_on("geant4@:11.2", when="@:0.5.0 +geant4")
|
||||
depends_on("hepmc3", when="+hepmc3")
|
||||
depends_on("root", when="+root")
|
||||
depends_on("swig@4.1:", when="+swig")
|
||||
|
@@ -21,8 +21,9 @@ class Cepgen(CMakePackage):
|
||||
"1.0.2patch1", sha256="333bba0cb1965a98dec127e00c150eab1a515cd348a90f7b1d66d5cd8d206d21"
|
||||
)
|
||||
|
||||
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")
|
||||
|
||||
generator("ninja")
|
||||
|
||||
|
@@ -52,7 +52,8 @@ class Clhep(CMakePackage):
|
||||
version("2.2.0.4", sha256="9bf7fcd9892313c8d1436bc4a4a285a016c4f8e81e1fc65bdf6783207ae57550")
|
||||
version("2.1.2.3", sha256="4353231be09c134507092161cd3ced27a065ca0ebb31ee0256e60a8163c47c3b")
|
||||
|
||||
depends_on("cxx", type="build") # generated
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
variant(
|
||||
"cxxstd",
|
||||
|
@@ -31,7 +31,9 @@ class Collier(CMakePackage):
|
||||
version("1.1", sha256="80fd54e2c30029d3d7d646738ae9469ad3a6f5ea7aa1179b951030df048e36bc")
|
||||
version("1.0", sha256="54f40c1ed07a6829230af400abfe48791e74e56eac2709c0947cec3410a4473d")
|
||||
|
||||
depends_on("fortran", type="build") # generated
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
depends_on("fortran", type="build")
|
||||
|
||||
@property
|
||||
def parallel(self):
|
||||
|
@@ -4,20 +4,24 @@
|
||||
|
||||
import os
|
||||
|
||||
import llnl.util.tty as tty
|
||||
|
||||
from spack.package import *
|
||||
from spack.pkg.builtin.mpich import MpichEnvironmentModifications
|
||||
from spack.util.module_cmd import get_path_args_from_module_line, module
|
||||
|
||||
|
||||
class CrayMpich(MpichEnvironmentModifications, Package):
|
||||
class CrayMpich(MpichEnvironmentModifications, Package, CudaPackage, ROCmPackage):
|
||||
"""Cray's MPICH is a high performance and widely portable implementation of
|
||||
the Message Passing Interface (MPI) standard."""
|
||||
|
||||
homepage = "https://docs.nersc.gov/development/compilers/wrappers/"
|
||||
has_code = False # Skip attempts to fetch source that is not available
|
||||
|
||||
maintainers("haampie")
|
||||
maintainers("etiennemlb", "haampie")
|
||||
|
||||
version("8.1.30")
|
||||
version("8.1.28")
|
||||
version("8.1.25")
|
||||
version("8.1.24")
|
||||
version("8.1.21")
|
||||
@@ -123,3 +127,86 @@ def libs(self):
|
||||
libs += find_libraries(libraries, root=self.prefix.lib64, recursive=True)
|
||||
|
||||
return libs
|
||||
|
||||
@property
|
||||
def gtl_lib(self):
|
||||
# GPU transport Layer (GTL) handling background:
|
||||
# - The cray-mpich module defines an environment variable per supported
|
||||
# GPU (say, PE_MPICH_GTL_LIBS_amd_gfx942). So we should read the
|
||||
# appropriate variable.
|
||||
# In practice loading a module and checking its content is a PITA. We
|
||||
# simplify by assuming that the GTL for a given vendor (say, AMD), is
|
||||
# one and the same for all the targets of this vendor (one GTL for all
|
||||
# Nvidia or one GTL for all AMD devices).
|
||||
# - Second, except if you have a very weird mpich layout, the GTL are
|
||||
# located in /opt/cray/pe/mpich/<cray_mpich_version>/gtl/lib when the
|
||||
# MPI libraries are in
|
||||
# /opt/cray/pe/mpich/<cray_mpich_version>/ofi/<vendor>/<vendor_version>.
|
||||
# Example:
|
||||
# /opt/cray/pe/mpich/8.1.28/gtl/lib
|
||||
# /opt/cray/pe/mpich/8.1.28/ofi/<vendor>/<vendor_version>
|
||||
# /opt/cray/pe/mpich/8.1.28/ofi/<vendor>/<vendor_version>/../../../gtl/lib
|
||||
|
||||
gtl_kinds = {
|
||||
"cuda": {
|
||||
"lib": "libmpi_gtl_cuda",
|
||||
"variant": "cuda_arch",
|
||||
"values": {"70", "80", "90"},
|
||||
},
|
||||
"rocm": {
|
||||
"lib": "libmpi_gtl_hsa",
|
||||
"variant": "amdgpu_target",
|
||||
"values": {"gfx906", "gfx908", "gfx90a", "gfx940", "gfx942"},
|
||||
},
|
||||
}
|
||||
|
||||
for variant, gtl_kind in gtl_kinds.items():
|
||||
arch_variant = gtl_kind["variant"]
|
||||
arch_values = gtl_kind["values"]
|
||||
gtl_lib = gtl_kind["lib"]
|
||||
|
||||
if self.spec.satisfies(f"+{variant} {arch_variant}=*"):
|
||||
accelerator_architecture_set = set(self.spec.variants[arch_variant].value)
|
||||
|
||||
if len(
|
||||
accelerator_architecture_set
|
||||
) >= 1 and not accelerator_architecture_set.issubset(arch_values):
|
||||
raise InstallError(
|
||||
f"cray-mpich variant '+{variant} {arch_variant}'"
|
||||
" was specified but no GTL support could be found for it."
|
||||
)
|
||||
|
||||
mpi_root = os.path.abspath(
|
||||
os.path.join(self.prefix, os.pardir, os.pardir, os.pardir)
|
||||
)
|
||||
|
||||
gtl_root = os.path.join(mpi_root, "gtl", "lib")
|
||||
|
||||
gtl_shared_libraries = find_libraries(
|
||||
[gtl_lib], root=gtl_root, shared=True, recursive=False
|
||||
)
|
||||
|
||||
if len(gtl_shared_libraries) != 1:
|
||||
raise InstallError(
|
||||
f"cray-mpich variant '+{variant} {arch_variant}'"
|
||||
" was specified and GTL support was found for it but"
|
||||
f" the '{gtl_lib}' could not be correctly found on disk."
|
||||
)
|
||||
|
||||
gtl_library_fullpath = list(gtl_shared_libraries)[0]
|
||||
tty.debug(f"Selected GTL: {gtl_library_fullpath}")
|
||||
|
||||
gtl_library_directory = os.path.dirname(gtl_library_fullpath)
|
||||
gtl_library_name = os.path.splitext(
|
||||
os.path.basename(gtl_library_fullpath).split("lib")[1]
|
||||
)[0]
|
||||
|
||||
# Early break. Only one GTL can be active at a given time.
|
||||
return {
|
||||
"ldflags": [
|
||||
f"-L{gtl_library_directory}",
|
||||
f"-Wl,-rpath,{gtl_library_directory}",
|
||||
],
|
||||
"ldlibs": [f"-l{gtl_library_name}"],
|
||||
}
|
||||
return {}
|
||||
|
@@ -57,6 +57,9 @@ class Davix(CMakePackage):
|
||||
description="Use the specified C++ standard when building.",
|
||||
)
|
||||
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
depends_on("pkgconfig", type="build")
|
||||
depends_on("libxml2")
|
||||
depends_on("uuid")
|
||||
@@ -68,14 +71,10 @@ class Davix(CMakePackage):
|
||||
depends_on("gsoap", when="+thirdparty")
|
||||
|
||||
def cmake_args(self):
|
||||
cmake_args = [
|
||||
return [
|
||||
self.define_from_variant("CMAKE_CXX_STANDARD", variant="cxxstd"),
|
||||
self.define_from_variant("ENABLE_THIRD_PARTY_COPY", variant="thirdparty"),
|
||||
# Disable the use of embedded packages; use Spack to fetch them instead
|
||||
self.define("EMBEDDED_LIBCURL", False),
|
||||
self.define("CMAKE_MACOSX_RPATH", self.spec.satisfies("platform=darwin")),
|
||||
]
|
||||
|
||||
# Disable the use of embedded packages; use Spack to fetch them instead.
|
||||
cmake_args.append("-DEMBEDDED_LIBCURL=OFF")
|
||||
|
||||
if "darwin" in self.spec.architecture:
|
||||
cmake_args.append("-DCMAKE_MACOSX_RPATH=ON")
|
||||
return cmake_args
|
||||
|
@@ -47,7 +47,8 @@ class Dd4hep(CMakePackage):
|
||||
version("1.17", sha256="036a9908aaf1e13eaf5f2f43b6f5f4a8bdda8183ddc5befa77a4448dbb485826")
|
||||
version("1.16.1", sha256="c8b1312aa88283986f89cc008d317b3476027fd146fdb586f9f1fbbb47763f1a")
|
||||
|
||||
depends_on("cxx", type="build") # generated
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
generator("ninja")
|
||||
|
||||
|
@@ -22,7 +22,8 @@ class Evtgen(CMakePackage):
|
||||
version("02.02.00", sha256="0c626e51cb17e799ad0ffd0beea5cb94d7ac8a5f8777b746aa1944dd26071ecf")
|
||||
version("02.00.00", sha256="02372308e1261b8369d10538a3aa65fe60728ab343fcb64b224dac7313deb719")
|
||||
|
||||
depends_on("cxx", type="build") # generated
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
variant("pythia8", default=True, description="Build with pythia8")
|
||||
variant("tauola", default=False, description="Build with tauola")
|
||||
|
@@ -59,6 +59,7 @@ class Fastjet(AutotoolsPackage):
|
||||
version("2.3.0", sha256="e452fe4a9716627bcdb726cfb0917f46a7ac31f6006330a6ccc1abc43d9c2d53")
|
||||
# older version use .tar instead of .tar.gz extension, to be added
|
||||
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
depends_on("fortran", type="build", when="plugins=all")
|
||||
depends_on("fortran", type="build", when="plugins=pxcone")
|
||||
|
@@ -9,12 +9,15 @@ class G4vg(CMakePackage):
|
||||
"""Generate VecGeom geometry representations from in-memory Geant4 geometry."""
|
||||
|
||||
homepage = "https://github.com/celeritas-project/g4vg"
|
||||
git = "https://github.com/celeritas-project/g4vg.git"
|
||||
url = "https://github.com/celeritas-project/g4vg/releases/download/v1.0.1/g4vg-1.0.1.tar.gz"
|
||||
|
||||
maintainers("sethrj", "drbenmorgan")
|
||||
|
||||
license("Apache-2.0", checked_by="sethrj")
|
||||
|
||||
version("develop", branch="main", get_full_repo=True)
|
||||
|
||||
version("1.0.1", sha256="add7ce4bc37889cac2101323a997cea8574b18da6cbeffdab44a2b714d134e99")
|
||||
|
||||
variant("debug", default=False, description="Enable runtime debug assertions")
|
||||
|
@@ -49,6 +49,7 @@ class Geant4(CMakePackage):
|
||||
version("10.3.3", sha256="bcd36a453da44de9368d1d61b0144031a58e4b43a6d2d875e19085f2700a89d8")
|
||||
version("10.0.4", sha256="97f3744366b00143d1eed52f8786823034bbe523f45998106f798af61d83f863")
|
||||
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
_cxxstd_values = (
|
||||
|
@@ -16,8 +16,9 @@ class GosamContrib(AutotoolsPackage):
|
||||
version("2.0", sha256="c05beceea74324eb51c1049773095e2cb0c09c8c909093ee913d8b0da659048d")
|
||||
version("1.0", sha256="a29d4232d9190710246abc2ed97fdcd8790ce83580f56a360f3456b0377c40ec")
|
||||
|
||||
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")
|
||||
|
||||
# whizard checks for .la files ( but does not use them )
|
||||
install_libtool_archives = True
|
||||
|
@@ -25,8 +25,8 @@ class Hepmc(CMakePackage):
|
||||
version("2.06.06", sha256="8cdff26c10783ed4248220a84a43b7e1f9b59cc2c9a29bd634d024ca469db125")
|
||||
version("2.06.05", sha256="4c411077cc97522c03b74f973264b8d9fd2b6ccec0efc7ceced2645371c73618")
|
||||
|
||||
depends_on("cxx", type="build") # generated
|
||||
depends_on("fortran", type="build") # generated
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
variant("length", default="MM", values=("CM", "MM"), multi=False, description="Unit of length")
|
||||
variant(
|
||||
|
@@ -42,7 +42,8 @@ class Highfive(CMakePackage):
|
||||
version("1.1", sha256="430fc312fc1961605ffadbfad82b9753a5e59482e9fbc64425fb2c184123d395")
|
||||
version("1.0", sha256="d867fe73d00817f686d286f3c69a23731c962c3e2496ca1657ea7302cd0bb944")
|
||||
|
||||
depends_on("cxx", type="build") # generated
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
variant("boost", default=False, description="Support Boost")
|
||||
variant("mpi", default=True, description="Support MPI")
|
||||
@@ -57,10 +58,9 @@ class Highfive(CMakePackage):
|
||||
depends_on("hdf5 +mpi", when="+mpi")
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
"-DUSE_BOOST:Bool={0}".format(self.spec.satisfies("+boost")),
|
||||
"-DHIGHFIVE_PARALLEL_HDF5:Bool={0}".format(self.spec.satisfies("+mpi")),
|
||||
"-DHIGHFIVE_UNIT_TESTS:Bool=false",
|
||||
"-DHIGHFIVE_EXAMPLES:Bool=false",
|
||||
return [
|
||||
self.define_from_variant("USE_BOOST", "boost"),
|
||||
self.define_from_variant("HIGHFIVE_PARALLEL_HDF5", "mpi"),
|
||||
self.define("HIGHFIVE_UNIT_TESTS", False),
|
||||
self.define("HIGHFIVE_EXAMPLES", False),
|
||||
]
|
||||
return args
|
||||
|
@@ -22,7 +22,8 @@ class JwtCpp(CMakePackage):
|
||||
version("0.5.0", sha256="079a273f070dd11213e301712319a65881e51ab81535cc436d5313191df852a2")
|
||||
version("0.4.0", sha256="f0dcc7b0e8bef8f9c3f434e7121f9941145042c9fe3055a5bdd709085a4f2be4")
|
||||
|
||||
depends_on("cxx", type="build") # generated
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
# TODO: jwt-cpp>=0.5.0 has an embedded copy of picojson which can be packaged seperately
|
||||
|
||||
|
@@ -30,6 +30,8 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
|
||||
# marked deprecated=True
|
||||
# * patch releases older than a stable release should be marked deprecated=True
|
||||
version("develop", branch="develop")
|
||||
version("20250204", sha256="a4cb0a58451d47ac31ee3e1f148d92f445298d6e27f2d06f161b9b4168d79eb1")
|
||||
version("20241119", sha256="7d1a825f13eef06d82ed8ae950f4a5ca6da9f6a5979745a85a7a58781e4c6ffa")
|
||||
version(
|
||||
"20240829.1",
|
||||
sha256="3aea41869aa2fb8120fc4814cab645686f969e2eb7c66aa5587e500597d482dc",
|
||||
@@ -649,7 +651,7 @@ def url_for_version(self, version):
|
||||
default="fftw3",
|
||||
when="+kspace",
|
||||
description="FFT library for KSPACE package",
|
||||
values=("kiss", "fftw3", "mkl"),
|
||||
values=("kiss", "fftw3", "mkl", "nvpl"),
|
||||
multi=False,
|
||||
)
|
||||
variant(
|
||||
@@ -664,7 +666,7 @@ def url_for_version(self, version):
|
||||
default="fftw3",
|
||||
when="@20240417: +kspace+kokkos",
|
||||
description="FFT library for Kokkos-enabled KSPACE package",
|
||||
values=("kiss", "fftw3", "mkl", "hipfft", "cufft"),
|
||||
values=("kiss", "fftw3", "mkl", "mkl_gpu", "nvpl", "hipfft", "cufft"),
|
||||
multi=False,
|
||||
)
|
||||
variant(
|
||||
@@ -688,6 +690,8 @@ def url_for_version(self, version):
|
||||
depends_on("hipfft", when="+kokkos+kspace+rocm fft_kokkos=hipfft")
|
||||
depends_on("fftw-api@3", when="+kokkos+kspace fft_kokkos=fftw3")
|
||||
depends_on("mkl", when="+kokkos+kspace fft_kokkos=mkl")
|
||||
depends_on("nvpl-fft", when="+kspace fft=nvpl")
|
||||
depends_on("nvpl-fft", when="+kokkos+kspace fft_kokkos=nvpl")
|
||||
depends_on("voropp", when="+voronoi")
|
||||
depends_on("netcdf-c+mpi", when="+user-netcdf")
|
||||
depends_on("netcdf-c+mpi", when="+netcdf")
|
||||
@@ -720,6 +724,8 @@ def url_for_version(self, version):
|
||||
depends_on("kokkos@3.7.01:", when="@20230208: +kokkos")
|
||||
depends_on("kokkos@4.3.00:", when="@20240417: +kokkos")
|
||||
depends_on("kokkos@4.3.01:", when="@20240627: +kokkos")
|
||||
depends_on("kokkos@4.4.01:", when="@20241119: +kokkos")
|
||||
depends_on("kokkos@4.5.01:", when="@20250204: +kokkos")
|
||||
depends_on("adios2", when="+user-adios")
|
||||
depends_on("adios2", when="+adios")
|
||||
depends_on("plumed", when="+user-plumed")
|
||||
@@ -807,6 +813,15 @@ def url_for_version(self, version):
|
||||
msg="ROCm builds of the GPU package not maintained prior to version 20220623",
|
||||
)
|
||||
conflicts("+intel", when="%aocc@:3.2.9999", msg="+intel with AOCC requires version 4 or newer")
|
||||
conflicts("fft=nvpl", when="@:20240829", msg="fft=nvpl requires newer LAMMPS version")
|
||||
conflicts(
|
||||
"fft_kokkos=nvpl", when="@:20240829", msg="fft_kokkos=nvpl requires newer LAMMPS version"
|
||||
)
|
||||
conflicts(
|
||||
"fft_kokkos=mkl_gpu",
|
||||
when="@:20240829",
|
||||
msg="fft_kokkos=mkl_gpu requires newer LAMMPS version",
|
||||
)
|
||||
|
||||
# Backport of https://github.com/lammps/lammps/pull/3726
|
||||
conflicts("+kokkos+rocm+kspace", when="@:20210929.3")
|
||||
@@ -857,6 +872,22 @@ def url_for_version(self, version):
|
||||
|
||||
root_cmakelists_dir = "cmake"
|
||||
|
||||
def flag_handler(self, name, flags):
|
||||
wrapper_flags = []
|
||||
build_system_flags = []
|
||||
|
||||
if self.spec.satisfies("+mpi+cuda") or self.spec.satisfies("+mpi+rocm"):
|
||||
if self.spec.satisfies("^[virtuals=mpi] cray-mpich"):
|
||||
gtl_lib = self.spec["cray-mpich"].package.gtl_lib
|
||||
build_system_flags.extend(gtl_lib.get(name) or [])
|
||||
# hipcc is not wrapped, we need to pass the flags via the build
|
||||
# system.
|
||||
build_system_flags.extend(flags)
|
||||
else:
|
||||
wrapper_flags.extend(flags)
|
||||
|
||||
return (wrapper_flags, [], build_system_flags)
|
||||
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
|
||||
|
@@ -20,6 +20,7 @@ class Lcio(CMakePackage):
|
||||
license("BSD-3-Clause")
|
||||
|
||||
version("master", branch="master")
|
||||
version("2.22.5", sha256="a756521a2419f8d25d4a4f1bab0008e16c9947020d015f2f6ce457ab0a0429bf")
|
||||
version("2.22.4", sha256="5d60eeb4df8611059f4bc839ac098f5d7e3608a662591e9cbae48aed07995514")
|
||||
version("2.22.3", sha256="5b9715786c5e953f8854881c5d0c4a48030a5491f1701232b82e960ac7980162")
|
||||
version("2.22.2", sha256="e5ad9690af85160ef52dd407fc0995451b4293f3aee415a8ea8a950de63d87a1")
|
||||
@@ -47,7 +48,8 @@ class Lcio(CMakePackage):
|
||||
version("2.13.2", sha256="9f153ba13e56ee16795378f9192678d40df1faca51d00aaa8fb80547bfecb8d8")
|
||||
version("2.13.1", sha256="aa572e2ba38c0cadd6a92fa933c3ed97e21d016c7982578d3f293901169f4ec0")
|
||||
|
||||
depends_on("cxx", type="build") # generated
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
variant(
|
||||
"cxxstd",
|
||||
|
@@ -31,8 +31,9 @@ class Lhapdf(AutotoolsPackage):
|
||||
version("6.3.0", sha256="864468439c7662bbceed6c61c7132682ec83381a23c9c9920502fdd7329dd816")
|
||||
version("6.2.3", sha256="37200a1ab70247250a141dfed7419d178f9a83bd23a4f8a38e203d4e27b41308")
|
||||
|
||||
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("python", default=True, description="Build python bindings")
|
||||
|
||||
|
@@ -160,9 +160,8 @@ def determine_variants(cls, exes, version):
|
||||
variants = []
|
||||
output = Executable(exe)("--list", output=str, error=os.devnull)
|
||||
# fabrics
|
||||
fabrics = get_options_from_variant(cls, "fabrics")
|
||||
used_fabrics = []
|
||||
for fabric in fabrics:
|
||||
for fabric in cls.fabrics:
|
||||
match = re.search(r"^%s:.*\n.*version: (\S+)" % fabric, output, re.MULTILINE)
|
||||
if match:
|
||||
used_fabrics.append(fabric)
|
||||
@@ -219,20 +218,3 @@ def configure_args(self):
|
||||
def installcheck(self):
|
||||
fi_info = Executable(self.prefix.bin.fi_info)
|
||||
fi_info()
|
||||
|
||||
|
||||
# This code gets all the fabric names from the variants list
|
||||
# Idea taken from the AutotoolsPackage source.
|
||||
def get_options_from_variant(self, name):
|
||||
values = self.variants[name][0].values
|
||||
explicit_values = []
|
||||
if getattr(values, "feature_values", None):
|
||||
values = values.feature_values
|
||||
for value in sorted(values):
|
||||
if hasattr(value, "when"):
|
||||
if value.when is True:
|
||||
# Explicitly extract the True value for downstream use
|
||||
explicit_values.append("{0}".format(value))
|
||||
else:
|
||||
explicit_values.append(value)
|
||||
return explicit_values
|
||||
|
@@ -23,7 +23,8 @@ class Opendatadetector(CMakePackage):
|
||||
version("v2", tag="v2", commit="7041ae086dff4ee4a8d5b65f5d9559acc6dbec47")
|
||||
version("v1", tag="v1", commit="81c43c6511723c13c15327479082d3dcfa1947c7")
|
||||
|
||||
depends_on("cxx", type="build") # generated
|
||||
depends_on("c", type="build") # because of DD4hep
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
depends_on("dd4hep")
|
||||
depends_on("root")
|
||||
|
@@ -21,7 +21,8 @@ class Pandoramonitoring(CMakePackage):
|
||||
version("master", branch="master")
|
||||
version("3.5.0", sha256="274562abb7c797194634d5460a56227444a1de07a240c88ae35ca806abcbaf60")
|
||||
|
||||
depends_on("cxx", type="build") # generated
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
depends_on("root@6.18.04: +x +opengl")
|
||||
depends_on("pandorasdk")
|
||||
|
@@ -22,7 +22,8 @@ class Pandorasdk(CMakePackage):
|
||||
version("3.4.1", sha256="9607bf52a9d79d88d28c45d4f3336e066338b36ab81b4d2d125226f4ad3a7aaf")
|
||||
version("3.4.0", sha256="1e30db056d4a43f8659fccdda00270af14593425d933f91e91d5c97f1e124c6b")
|
||||
|
||||
depends_on("cxx", type="build") # generated
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
depends_on("pandorapfa")
|
||||
|
||||
|
@@ -70,7 +70,8 @@ class Podio(CMakePackage):
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("cxx", type="build") # generated
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
_cxxstd_values = (conditional("17", when="@:1.2"), conditional("20", when="@0.14.1:"))
|
||||
variant(
|
||||
|
@@ -20,6 +20,7 @@ class Postgresql(AutotoolsPackage):
|
||||
|
||||
license("PostgreSQL")
|
||||
|
||||
version("17.2", sha256="82ef27c0af3751695d7f64e2d963583005fbb6a0c3df63d0e4b42211d7021164")
|
||||
version("16.4", sha256="971766d645aa73e93b9ef4e3be44201b4f45b5477095b049125403f9f3386d6f")
|
||||
version("16.3", sha256="331963d5d3dc4caf4216a049fa40b66d6bcb8c730615859411b9518764e60585")
|
||||
version("15.8", sha256="4403515f9a69eeb3efebc98f30b8c696122bfdf895e92b3b23f5b8e769edcb6a")
|
||||
@@ -74,6 +75,8 @@ class Postgresql(AutotoolsPackage):
|
||||
depends_on("perl+opcode", when="+perl")
|
||||
depends_on("python", when="+python")
|
||||
depends_on("libxml2", when="+xml")
|
||||
depends_on("flex", when="@17:")
|
||||
depends_on("bison", when="@17:")
|
||||
depends_on("pkgconfig", when="+xml", type="build")
|
||||
|
||||
@property
|
||||
|
@@ -12,6 +12,8 @@ class PyTokenizers(PythonPackage):
|
||||
homepage = "https://github.com/huggingface/tokenizers"
|
||||
pypi = "tokenizers/tokenizers-0.6.0.tar.gz"
|
||||
|
||||
version("0.21.0", sha256="ee0894bf311b75b0c03079f33859ae4b2334d675d4e93f5a4132e1eae2834fe4")
|
||||
version("0.20.4", sha256="db50ac15e92981227f499268541306824f49e97dbeec05d118ebdc7c2d22322c")
|
||||
version("0.19.1", sha256="ee59e6680ed0fdbe6b724cf38bd70400a0c1dd623b07ac729087270caeac88e3")
|
||||
version("0.15.0", sha256="10c7e6e7b4cabd757da59e93f5f8d1126291d16f8b54f28510825ef56a3e5d0e")
|
||||
version("0.13.3", sha256="2e546dbb68b623008a5442353137fbb0123d311a6d7ba52f2667c8862a75af2e")
|
||||
|
@@ -17,6 +17,10 @@ class PyTransformers(PythonPackage):
|
||||
|
||||
license("Apache-2.0")
|
||||
|
||||
version("4.48.3", sha256="a5e8f1e9a6430aa78215836be70cecd3f872d99eeda300f41ad6cc841724afdb")
|
||||
version("4.46.3", sha256="8ee4b3ae943fe33e82afff8e837f4b052058b07ca9be3cb5b729ed31295f72cc")
|
||||
version("4.44.2", sha256="36aa17cc92ee154058e426d951684a2dab48751b35b49437896f898931270826")
|
||||
version("4.42.4", sha256="f956e25e24df851f650cb2c158b6f4352dfae9d702f04c113ed24fc36ce7ae2d")
|
||||
version("4.42.3", sha256="7539873ff45809145265cbc94ea4619d2713c41ceaa277b692d8b0be3430f7eb")
|
||||
version("4.38.1", sha256="86dc84ccbe36123647e84cbd50fc31618c109a41e6be92514b064ab55bf1304c")
|
||||
version("4.35.2", sha256="2d125e197d77b0cdb6c9201df9fa7e2101493272e448b9fba9341c695bee2f52")
|
||||
@@ -31,15 +35,17 @@ class PyTransformers(PythonPackage):
|
||||
depends_on("py-setuptools")
|
||||
|
||||
with default_args(type=("build", "run")):
|
||||
depends_on("python@3.9:", when="@4.47:")
|
||||
depends_on("py-filelock")
|
||||
depends_on("py-huggingface-hub@0.24:0", when="@4.47:")
|
||||
depends_on("py-huggingface-hub@0.23.2:", when="@4.42.3:")
|
||||
depends_on("py-huggingface-hub@0.19.3:", when="@4.38.1:")
|
||||
depends_on("py-huggingface-hub@0.16.4:0", when="@4.34:")
|
||||
depends_on("py-huggingface-hub@0.14.1:0", when="@4.26:")
|
||||
depends_on("py-huggingface-hub@0.10:0", when="@4.24:")
|
||||
depends_on("py-huggingface-hub@0.0.8", when="@4.6.1")
|
||||
depends_on("py-numpy@1.17:1", when="@4.6:")
|
||||
depends_on("py-numpy@:1")
|
||||
depends_on("py-numpy@1.17:", when="@4.6:")
|
||||
depends_on("py-numpy@:1", when="@:4.42")
|
||||
depends_on("py-packaging@20:", when="@4.24:")
|
||||
depends_on("py-packaging", when="@4.6.1")
|
||||
depends_on("py-pyyaml@5.1:", when="@4.24:")
|
||||
@@ -47,7 +53,9 @@ class PyTransformers(PythonPackage):
|
||||
depends_on("py-requests")
|
||||
depends_on("py-safetensors@0.4.1:", when="@4.38.1:")
|
||||
depends_on("py-safetensors@0.3.1:", when="@4.31:")
|
||||
depends_on("py-tokenizers@0.19", when="@4.40.0:")
|
||||
depends_on("py-tokenizers@0.21", when="@4.47:")
|
||||
depends_on("py-tokenizers@0.20", when="@4.45:4.46")
|
||||
depends_on("py-tokenizers@0.19", when="@4.40:4.44")
|
||||
depends_on("py-tokenizers@0.14:0.18", when="@4.35:4.39.3")
|
||||
depends_on("py-tokenizers@0.11.1:0.11.2,0.11.4:0.13", when="@4.24:4.33")
|
||||
depends_on("py-tokenizers@0.10.1:0.10", when="@4.6.1")
|
||||
|
@@ -40,7 +40,8 @@ class Pythia6(CMakePackage):
|
||||
sha256="01cbff47e99365b5e46f6d62c1735d3cae1932c4710604850d59f538cb758020",
|
||||
)
|
||||
|
||||
depends_on("fortran", type="build") # generated
|
||||
depends_on("c", type="build")
|
||||
depends_on("fortran", type="build")
|
||||
|
||||
# Root's TPythia6 interface requires extra sources to be built into
|
||||
# the Pythia6 library.
|
||||
|
@@ -516,7 +516,9 @@ def install(self, spec, prefix):
|
||||
llvm_inc = "/rocm-openmp-extras/llvm-project/llvm/include"
|
||||
llvm_prefix = self.spec["llvm-amdgpu"].prefix
|
||||
omp_bin_dir = "{0}/bin".format(openmp_extras_prefix)
|
||||
omp_lib_dir = "{0}/lib".format(openmp_extras_prefix)
|
||||
bin_dir = "{0}/bin".format(llvm_prefix)
|
||||
lib_dir = "{0}/lib".format(llvm_prefix)
|
||||
flang_warning = "-Wno-incompatible-pointer-types-discards-qualifiers"
|
||||
libpgmath = "/rocm-openmp-extras/flang/runtime/libpgmath/lib/common"
|
||||
elfutils_inc = spec["elfutils"].prefix.include
|
||||
@@ -525,6 +527,34 @@ def install(self, spec, prefix):
|
||||
ncurses_lib_dir = self.spec["ncurses"].prefix.lib
|
||||
zlib_lib_dir = self.spec["zlib"].prefix.lib
|
||||
|
||||
# flang1 and flang2 symlink needed for build of flang-runtime
|
||||
# libdevice symlink to rocm-openmp-extras for runtime
|
||||
# libdebug symlink to rocm-openmp-extras for runtime
|
||||
if os.path.islink((os.path.join(bin_dir, "flang1"))):
|
||||
os.unlink(os.path.join(bin_dir, "flang1"))
|
||||
if os.path.islink((os.path.join(bin_dir, "flang2"))):
|
||||
os.unlink(os.path.join(bin_dir, "flang2"))
|
||||
if self.spec.version >= Version("6.1.0"):
|
||||
if os.path.islink((os.path.join(bin_dir, "flang-legacy"))):
|
||||
os.unlink(os.path.join(bin_dir, "flang-legacy"))
|
||||
if os.path.islink((os.path.join(lib_dir, "libdevice"))):
|
||||
os.unlink(os.path.join(lib_dir, "libdevice"))
|
||||
if os.path.islink((os.path.join(llvm_prefix, "lib-debug"))):
|
||||
os.unlink(os.path.join(llvm_prefix, "lib-debug"))
|
||||
if not os.path.exists(os.path.join(bin_dir, "flang1")):
|
||||
os.symlink(os.path.join(omp_bin_dir, "flang1"), os.path.join(bin_dir, "flang1"))
|
||||
if not os.path.exists(os.path.join(bin_dir, "flang2")):
|
||||
os.symlink(os.path.join(omp_bin_dir, "flang2"), os.path.join(bin_dir, "flang2"))
|
||||
|
||||
if self.spec.version >= Version("6.1.0"):
|
||||
os.symlink(
|
||||
os.path.join(omp_bin_dir, "flang-legacy"), os.path.join(bin_dir, "flang-legacy")
|
||||
)
|
||||
os.symlink(os.path.join(omp_lib_dir, "libdevice"), os.path.join(lib_dir, "libdevice"))
|
||||
os.symlink(
|
||||
os.path.join(openmp_extras_prefix, "lib-debug"), os.path.join(llvm_prefix, "lib-debug")
|
||||
)
|
||||
|
||||
# Set cmake args
|
||||
components = dict()
|
||||
|
||||
|
@@ -40,7 +40,6 @@ class Thepeg(AutotoolsPackage):
|
||||
version("1.9.0", sha256="3ee58e5e3a26184567df1b9a10ca70df228e86f322e72f018dd7d8d5a4700a5d")
|
||||
version("1.8.3", sha256="55ede3a3dd0bd07b90d0d49cf7ae28c18cd965780fdf53528508b97d57152fc7")
|
||||
|
||||
depends_on("cxx", type="build") # generated
|
||||
# version('1.8.2', sha256='44ccd0d70e42bb6ecd801a51bade6c25b3953c56f33017402d4f52ee6492dffa')
|
||||
# version('1.8.1', sha256='84c2a212a681545cddd541dca191eb65d96f41df86c87480b6f4f7d4f9683562')
|
||||
# version('1.8.0', sha256='4b22fda1078f410b999a23a17f611c9ae3a7f0f4cee4e83dc82c9336b7adf037')
|
||||
@@ -63,6 +62,9 @@ class Thepeg(AutotoolsPackage):
|
||||
|
||||
force_autoreconf = True
|
||||
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
depends_on("gsl")
|
||||
depends_on("lhapdf")
|
||||
depends_on("lhapdf@:6.2", when="@:1.9")
|
||||
|
@@ -112,10 +112,12 @@ def setup_build_environment(self, env):
|
||||
if self.spec.satisfies("%oneapi"):
|
||||
env.append_flags("CFLAGS", "-Wno-unused-function")
|
||||
|
||||
@when("%cce@11.0.3:")
|
||||
def patch(self):
|
||||
filter_file("-Werror", "", "client/src/Makefile.in")
|
||||
filter_file("-Werror", "", "client/src/Makefile.am")
|
||||
if self.spec.satisfies("%cce@11.0.3:"):
|
||||
filter_file("-Werror", "", "client/src/Makefile.in")
|
||||
filter_file("-Werror", "", "client/src/Makefile.am")
|
||||
if self.spec.satisfies("@2.0 %oneapi@2025:"):
|
||||
filter_file("static int asprintf", "int asprintf", "examples/src/testutil.c")
|
||||
|
||||
@when("@develop")
|
||||
def autoreconf(self, spec, prefix):
|
||||
|
@@ -24,7 +24,8 @@ class Vc(CMakePackage):
|
||||
version("1.2.0", sha256="9cd7b6363bf40a89e8b1d2b39044b44a4ce3f1fd6672ef3fc45004198ba28a2b")
|
||||
version("1.1.0", sha256="281b4c6152fbda11a4b313a0a0ca18565ee049a86f35f672f1383967fef8f501")
|
||||
|
||||
depends_on("cxx", type="build") # generated
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
depends_on("cmake@3.5:", type="build", when="@1.4.5:")
|
||||
|
||||
|
@@ -34,6 +34,7 @@ class Veccore(CMakePackage):
|
||||
version("0.4.0", sha256="0a38b958c92647c30b5709d17edaf39d241b92b988f1040c0fbe24932b42927e")
|
||||
version("0.3.2", sha256="d72b03df00f5e94b2d07f78ab3af6d9d956c19e9a1fae07267b48f6fc8d7713f")
|
||||
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
variant("vc", default=False, description="Enable Vc backend")
|
||||
|
@@ -73,6 +73,7 @@ class Vecgeom(CMakePackage, CudaPackage):
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
_cxxstd_values = (conditional("11", "14", when="@:1.1"), "17", conditional("20", when="@1.2:"))
|
||||
|
Reference in New Issue
Block a user