From ac82f344bd8e1da704a8aa346bd77b3d65ee198d Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Wed, 4 Dec 2024 12:53:38 -0600 Subject: [PATCH 01/69] trilinos@develop: update kokkos dependency (#47838) --- var/spack/repos/builtin/packages/trilinos/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 0339690085777b..aa3236306231a7 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -411,11 +411,11 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage): depends_on("kokkos+wrapper", when="+wrapper") depends_on("kokkos~wrapper", when="~wrapper") depends_on("kokkos~complex_align") - depends_on("kokkos@4.4.01", when="@master:") + depends_on("kokkos@4.5.00", when="@master:") depends_on("kokkos@4.3.01", when="@16") depends_on("kokkos@4.2.01", when="@15.1:15") depends_on("kokkos@4.1.00", when="@14.4:15.0") - depends_on("kokkos-kernels@4.4.01", when="@master:") + depends_on("kokkos-kernels@4.5.00", when="@master:") depends_on("kokkos-kernels@4.3.01", when="@16") depends_on("kokkos-kernels@4.2.01", when="@15.1:15") depends_on("kokkos-kernels@4.1.00", when="@15.0") From 6aafefd43dbda58f76c6dd37ddbccf65aedf31e4 Mon Sep 17 00:00:00 2001 From: James Taliaferro <44253038+taliaferro@users.noreply.github.com> Date: Wed, 4 Dec 2024 14:17:55 -0800 Subject: [PATCH 02/69] package version: Neovim 0.10.2 (#47925) --- var/spack/repos/builtin/packages/neovim/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/neovim/package.py b/var/spack/repos/builtin/packages/neovim/package.py index c21e2def03fec2..5b7753876a917e 100644 --- a/var/spack/repos/builtin/packages/neovim/package.py +++ b/var/spack/repos/builtin/packages/neovim/package.py @@ -19,6 +19,7 @@ class Neovim(CMakePackage): version("master", branch="master") version("stable", tag="stable", commit="d772f697a281ce9c58bf933997b87c7f27428a60") + version("0.10.2", sha256="546cb2da9fffbb7e913261344bbf4cf1622721f6c5a67aa77609e976e78b8e89") version("0.10.0", sha256="372ea2584b0ea2a5a765844d95206bda9e4a57eaa1a2412a9a0726bab750f828") version("0.9.5", sha256="fe74369fc30a32ec7a086b1013acd0eacd674e7570eb1acc520a66180c9e9719") version("0.9.4", sha256="148356027ee8d586adebb6513a94d76accc79da9597109ace5c445b09d383093") From aa81d59958e42cfc34978d8d162818ee12f524a9 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Fri, 29 Nov 2024 19:08:58 -0800 Subject: [PATCH 03/69] directives: don't include `Optional` in `PatchesType` `Optional` shouldn't be part of `PatchesType` -- it's clearer to specify `Optional` it in the methods that need their arguments to be optional. Signed-off-by: Todd Gamblin --- lib/spack/spack/directives.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/directives.py b/lib/spack/spack/directives.py index 44d95f38373144..41fc314b038d63 100644 --- a/lib/spack/spack/directives.py +++ b/lib/spack/spack/directives.py @@ -82,7 +82,7 @@ class OpenMpi(Package): DepType = Union[Tuple[str, ...], str] WhenType = Optional[Union[spack.spec.Spec, str, bool]] Patcher = Callable[[Union[spack.package_base.PackageBase, Dependency]], None] -PatchesType = Optional[Union[Patcher, str, List[Union[Patcher, str]]]] +PatchesType = Union[Patcher, str, List[Union[Patcher, str]]] SUPPORTED_LANGUAGES = ("fortran", "cxx", "c") @@ -254,7 +254,7 @@ def _depends_on( *, when: WhenType = None, type: DepType = dt.DEFAULT_TYPES, - patches: PatchesType = None, + patches: Optional[PatchesType] = None, ): when_spec = _make_when_spec(when) if not when_spec: @@ -348,7 +348,7 @@ def depends_on( spec: SpecType, when: WhenType = None, type: DepType = dt.DEFAULT_TYPES, - patches: PatchesType = None, + patches: Optional[PatchesType] = None, ): """Creates a dict of deps with specs defining when they apply. From 175a4bf101adf7eb6071e13159881510928a5344 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Fri, 29 Nov 2024 22:55:18 -0800 Subject: [PATCH 04/69] directives: use `Type[PackageBase]` instead of `PackageBase` The first argument to each Spack directive is not a `PackageBase` instance but a `PackageBase` class object, so fix the type annotations to reflect this. Signed-off-by: Todd Gamblin --- lib/spack/spack/dependency.py | 4 +-- lib/spack/spack/directives.py | 42 ++++++++++++++++++------------ lib/spack/spack/package_base.py | 1 + lib/spack/spack/test/directives.py | 4 +-- 4 files changed, 30 insertions(+), 21 deletions(-) diff --git a/lib/spack/spack/dependency.py b/lib/spack/spack/dependency.py index d8dd7b941fa71d..a680af083672ba 100644 --- a/lib/spack/spack/dependency.py +++ b/lib/spack/spack/dependency.py @@ -3,7 +3,7 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) """Data structures that represent Spack's dependency relationships.""" -from typing import Dict, List +from typing import Dict, List, Type import spack.deptypes as dt import spack.spec @@ -38,7 +38,7 @@ class Dependency: def __init__( self, - pkg: "spack.package_base.PackageBase", + pkg: Type["spack.package_base.PackageBase"], spec: "spack.spec.Spec", depflag: dt.DepFlag = dt.DEFAULT, ): diff --git a/lib/spack/spack/directives.py b/lib/spack/spack/directives.py index 41fc314b038d63..87e68da002e24b 100644 --- a/lib/spack/spack/directives.py +++ b/lib/spack/spack/directives.py @@ -21,6 +21,7 @@ class OpenMpi(Package): * ``conflicts`` * ``depends_on`` * ``extends`` + * ``license`` * ``patch`` * ``provides`` * ``resource`` @@ -34,7 +35,7 @@ class OpenMpi(Package): import collections.abc import os.path import re -from typing import Any, Callable, List, Optional, Tuple, Union +from typing import Any, Callable, List, Optional, Tuple, Type, Union import llnl.util.tty.color @@ -81,7 +82,7 @@ class OpenMpi(Package): SpecType = str DepType = Union[Tuple[str, ...], str] WhenType = Optional[Union[spack.spec.Spec, str, bool]] -Patcher = Callable[[Union[spack.package_base.PackageBase, Dependency]], None] +Patcher = Callable[[Union[Type[spack.package_base.PackageBase], Dependency]], None] PatchesType = Union[Patcher, str, List[Union[Patcher, str]]] @@ -218,7 +219,7 @@ def version( return lambda pkg: _execute_version(pkg, ver, **kwargs) -def _execute_version(pkg, ver, **kwargs): +def _execute_version(pkg: Type[spack.package_base.PackageBase], ver: Union[str, int], **kwargs): if ( (any(s in kwargs for s in spack.util.crypto.hashes) or "checksum" in kwargs) and hasattr(pkg, "has_code") @@ -249,7 +250,7 @@ def _execute_version(pkg, ver, **kwargs): def _depends_on( - pkg: spack.package_base.PackageBase, + pkg: Type[spack.package_base.PackageBase], spec: spack.spec.Spec, *, when: WhenType = None, @@ -329,7 +330,7 @@ def conflicts(conflict_spec: SpecType, when: WhenType = None, msg: Optional[str] msg (str): optional user defined message """ - def _execute_conflicts(pkg: spack.package_base.PackageBase): + def _execute_conflicts(pkg: Type[spack.package_base.PackageBase]): # If when is not specified the conflict always holds when_spec = _make_when_spec(when) if not when_spec: @@ -370,14 +371,16 @@ def depends_on( assert type == "build", "languages must be of 'build' type" return _language(lang_spec_str=spec, when=when) - def _execute_depends_on(pkg: spack.package_base.PackageBase): + def _execute_depends_on(pkg: Type[spack.package_base.PackageBase]): _depends_on(pkg, dep_spec, when=when, type=type, patches=patches) return _execute_depends_on @directive("disable_redistribute") -def redistribute(source=None, binary=None, when: WhenType = None): +def redistribute( + source: Optional[bool] = None, binary: Optional[bool] = None, when: WhenType = None +): """Can be used inside a Package definition to declare that the package source and/or compiled binaries should not be redistributed. @@ -392,7 +395,10 @@ def redistribute(source=None, binary=None, when: WhenType = None): def _execute_redistribute( - pkg: spack.package_base.PackageBase, source=None, binary=None, when: WhenType = None + pkg: Type[spack.package_base.PackageBase], + source: Optional[bool], + binary: Optional[bool], + when: WhenType, ): if source is None and binary is None: return @@ -468,7 +474,7 @@ def provides(*specs: SpecType, when: WhenType = None): when: condition when this provides clause needs to be considered """ - def _execute_provides(pkg: spack.package_base.PackageBase): + def _execute_provides(pkg: Type[spack.package_base.PackageBase]): import spack.parser # Avoid circular dependency when_spec = _make_when_spec(when) @@ -516,7 +522,7 @@ def can_splice( variants will be skipped by '*'. """ - def _execute_can_splice(pkg: spack.package_base.PackageBase): + def _execute_can_splice(pkg: Type[spack.package_base.PackageBase]): when_spec = _make_when_spec(when) if isinstance(match_variants, str) and match_variants != "*": raise ValueError( @@ -557,10 +563,10 @@ def patch( compressed URL patches) """ - def _execute_patch(pkg_or_dep: Union[spack.package_base.PackageBase, Dependency]): - pkg = pkg_or_dep - if isinstance(pkg, Dependency): - pkg = pkg.pkg + def _execute_patch( + pkg_or_dep: Union[Type[spack.package_base.PackageBase], Dependency] + ) -> None: + pkg = pkg_or_dep.pkg if isinstance(pkg_or_dep, Dependency) else pkg_or_dep if hasattr(pkg, "has_code") and not pkg.has_code: raise UnsupportedPackageDirective( @@ -817,7 +823,9 @@ def _execute_maintainer(pkg): return _execute_maintainer -def _execute_license(pkg, license_identifier: str, when): +def _execute_license( + pkg: Type[spack.package_base.PackageBase], license_identifier: str, when: WhenType +): # If when is not specified the license always holds when_spec = _make_when_spec(when) if not when_spec: @@ -881,7 +889,7 @@ def requires(*requirement_specs: str, policy="one_of", when=None, msg=None): msg: optional user defined message """ - def _execute_requires(pkg: spack.package_base.PackageBase): + def _execute_requires(pkg: Type[spack.package_base.PackageBase]): if policy not in ("one_of", "any_of"): err_msg = ( f"the 'policy' argument of the 'requires' directive in {pkg.name} is set " @@ -906,7 +914,7 @@ def _execute_requires(pkg: spack.package_base.PackageBase): def _language(lang_spec_str: str, *, when: Optional[Union[str, bool]] = None): """Temporary implementation of language virtuals, until compilers are proper dependencies.""" - def _execute_languages(pkg: spack.package_base.PackageBase): + def _execute_languages(pkg: Type[spack.package_base.PackageBase]): when_spec = _make_when_spec(when) if not when_spec: return diff --git a/lib/spack/spack/package_base.py b/lib/spack/spack/package_base.py index 6ebc948ca46ba4..cfd28038054509 100644 --- a/lib/spack/spack/package_base.py +++ b/lib/spack/spack/package_base.py @@ -595,6 +595,7 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta): patches: Dict[spack.spec.Spec, List[spack.patch.Patch]] variants: Dict[spack.spec.Spec, Dict[str, spack.variant.Variant]] languages: Dict[spack.spec.Spec, Set[str]] + licenses: Dict[spack.spec.Spec, str] splice_specs: Dict[spack.spec.Spec, Tuple[spack.spec.Spec, Union[None, str, List[str]]]] #: Store whether a given Spec source/binary should not be redistributed. diff --git a/lib/spack/spack/test/directives.py b/lib/spack/spack/test/directives.py index c941a60049680c..fb75b2c0ed60be 100644 --- a/lib/spack/spack/test/directives.py +++ b/lib/spack/spack/test/directives.py @@ -219,10 +219,10 @@ class MockPackage: disable_redistribute = {} cls = MockPackage - spack.directives._execute_redistribute(cls, source=False, when="@1.0") + spack.directives._execute_redistribute(cls, source=False, binary=None, when="@1.0") spec_key = spack.directives._make_when_spec("@1.0") assert not cls.disable_redistribute[spec_key].binary assert cls.disable_redistribute[spec_key].source - spack.directives._execute_redistribute(cls, binary=False, when="@1.0") + spack.directives._execute_redistribute(cls, source=None, binary=False, when="@1.0") assert cls.disable_redistribute[spec_key].binary assert cls.disable_redistribute[spec_key].source From f54526957aff1485f975302375c4feec917c2762 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Fri, 29 Nov 2024 23:17:28 -0800 Subject: [PATCH 05/69] directives: add type annotations to `DirectiveMeta` class Some of the class-level annotations were wrong, and some were missing. Annotate all the functions here and fix the class properties to match what's actually happening. Signed-off-by: Todd Gamblin --- lib/spack/spack/directives_meta.py | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/lib/spack/spack/directives_meta.py b/lib/spack/spack/directives_meta.py index 70ba0298a88a82..0ba1acb7bb0ed4 100644 --- a/lib/spack/spack/directives_meta.py +++ b/lib/spack/spack/directives_meta.py @@ -5,7 +5,7 @@ import collections.abc import functools -from typing import List, Set +from typing import Any, Callable, Dict, List, Optional, Sequence, Set, Type, Union import llnl.util.lang @@ -25,11 +25,13 @@ class DirectiveMeta(type): # Set of all known directives _directive_dict_names: Set[str] = set() - _directives_to_be_executed: List[str] = [] - _when_constraints_from_context: List[str] = [] + _directives_to_be_executed: List[Callable] = [] + _when_constraints_from_context: List[spack.spec.Spec] = [] _default_args: List[dict] = [] - def __new__(cls, name, bases, attr_dict): + def __new__( + cls: Type["DirectiveMeta"], name: str, bases: tuple, attr_dict: dict + ) -> "DirectiveMeta": # Initialize the attribute containing the list of directives # to be executed. Here we go reversed because we want to execute # commands: @@ -60,7 +62,7 @@ def __new__(cls, name, bases, attr_dict): return super(DirectiveMeta, cls).__new__(cls, name, bases, attr_dict) - def __init__(cls, name, bases, attr_dict): + def __init__(cls: "DirectiveMeta", name: str, bases: tuple, attr_dict: dict): # The instance is being initialized: if it is a package we must ensure # that the directives are called to set it up. @@ -81,27 +83,27 @@ def __init__(cls, name, bases, attr_dict): super(DirectiveMeta, cls).__init__(name, bases, attr_dict) @staticmethod - def push_to_context(when_spec): + def push_to_context(when_spec: spack.spec.Spec) -> None: """Add a spec to the context constraints.""" DirectiveMeta._when_constraints_from_context.append(when_spec) @staticmethod - def pop_from_context(): + def pop_from_context() -> spack.spec.Spec: """Pop the last constraint from the context""" return DirectiveMeta._when_constraints_from_context.pop() @staticmethod - def push_default_args(default_args): + def push_default_args(default_args: Dict[str, Any]) -> None: """Push default arguments""" DirectiveMeta._default_args.append(default_args) @staticmethod - def pop_default_args(): + def pop_default_args() -> dict: """Pop default arguments""" return DirectiveMeta._default_args.pop() @staticmethod - def directive(dicts=None): + def directive(dicts: Optional[Union[Sequence[str], str]] = None) -> Callable: """Decorator for Spack directives. Spack directives allow you to modify a package while it is being @@ -156,7 +158,7 @@ class Foo(Package): DirectiveMeta._directive_dict_names |= set(dicts) # This decorator just returns the directive functions - def _decorator(decorated_function): + def _decorator(decorated_function: Callable) -> Callable: directive_names.append(decorated_function.__name__) @functools.wraps(decorated_function) From 8b1009a4a074d31b02defc6800ac0161c0bfdc39 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 25 Nov 2024 00:02:40 -0800 Subject: [PATCH 06/69] `resource`: clean up arguments and typing - [x] Clean up arguments on the `resource` directive. - [x] Add type annotations - [x] Add `resource` to type annotations on `PackageBase` - [x] Fix up `resource` docstrings Signed-off-by: Todd Gamblin --- lib/spack/spack/audit.py | 6 +-- lib/spack/spack/directives.py | 71 ++++++++++++++++----------------- lib/spack/spack/package_base.py | 2 + lib/spack/spack/resource.py | 5 ++- 4 files changed, 43 insertions(+), 41 deletions(-) diff --git a/lib/spack/spack/audit.py b/lib/spack/spack/audit.py index 7e6b87c987c613..77e85172d72563 100644 --- a/lib/spack/spack/audit.py +++ b/lib/spack/spack/audit.py @@ -693,19 +693,19 @@ def invalid_sha256_digest(fetcher): return h, True return None, False - error_msg = "Package '{}' does not use sha256 checksum".format(pkg_name) + error_msg = f"Package '{pkg_name}' does not use sha256 checksum" details = [] for v, args in pkg.versions.items(): fetcher = spack.fetch_strategy.for_package_version(pkg, v) digest, is_bad = invalid_sha256_digest(fetcher) if is_bad: - details.append("{}@{} uses {}".format(pkg_name, v, digest)) + details.append(f"{pkg_name}@{v} uses {digest}") for _, resources in pkg.resources.items(): for resource in resources: digest, is_bad = invalid_sha256_digest(resource.fetcher) if is_bad: - details.append("Resource in '{}' uses {}".format(pkg_name, digest)) + details.append(f"Resource in '{pkg_name}' uses {digest}") if details: errors.append(error_cls(error_msg, details)) diff --git a/lib/spack/spack/directives.py b/lib/spack/spack/directives.py index 87e68da002e24b..2f152f813d9c59 100644 --- a/lib/spack/spack/directives.py +++ b/lib/spack/spack/directives.py @@ -40,6 +40,7 @@ class OpenMpi(Package): import llnl.util.tty.color import spack.deptypes as dt +import spack.fetch_strategy import spack.package_base import spack.patch import spack.spec @@ -47,7 +48,6 @@ class OpenMpi(Package): import spack.variant from spack.dependency import Dependency from spack.directives_meta import DirectiveError, DirectiveMeta -from spack.fetch_strategy import from_kwargs from spack.resource import Resource from spack.version import ( GitVersion, @@ -740,58 +740,55 @@ def _execute_variant(pkg): @directive("resources") -def resource(**kwargs): - """Define an external resource to be fetched and staged when building the - package. Based on the keywords present in the dictionary the appropriate - FetchStrategy will be used for the resource. Resources are fetched and - staged in their own folder inside spack stage area, and then moved into - the stage area of the package that needs them. - - List of recognized keywords: - - * 'when' : (optional) represents the condition upon which the resource is - needed - * 'destination' : (optional) path where to move the resource. This path - must be relative to the main package stage area. - * 'placement' : (optional) gives the possibility to fine tune how the - resource is moved into the main package stage area. +def resource( + *, + name: Optional[str] = None, + destination: str = "", + placement: Optional[str] = None, + when: WhenType = None, + # additional kwargs are as for `version()` + **kwargs, +): + """Define an external resource to be fetched and staged when building the package. + Based on the keywords present in the dictionary the appropriate FetchStrategy will + be used for the resource. Resources are fetched and staged in their own folder + inside spack stage area, and then moved into the stage area of the package that + needs them. + + Keyword Arguments: + name: name for the resource + when: condition defining when the resource is needed + destination: path, relative to the package stage area, to which resource should be moved + placement: optionally rename the expanded resource inside the destination directory + """ def _execute_resource(pkg): - when = kwargs.get("when") when_spec = _make_when_spec(when) if not when_spec: return - destination = kwargs.get("destination", "") - placement = kwargs.get("placement", None) - # Check if the path is relative if os.path.isabs(destination): - message = ( - "The destination keyword of a resource directive " "can't be an absolute path.\n" - ) - message += "\tdestination : '{dest}\n'".format(dest=destination) - raise RuntimeError(message) + msg = "The destination keyword of a resource directive can't be an absolute path.\n" + msg += f"\tdestination : '{destination}\n'" + raise RuntimeError(msg) # Check if the path falls within the main package stage area test_path = "stage_folder_root" - normalized_destination = os.path.normpath( - os.path.join(test_path, destination) - ) # Normalized absolute path + + # Normalized absolute path + normalized_destination = os.path.normpath(os.path.join(test_path, destination)) if test_path not in normalized_destination: - message = ( - "The destination folder of a resource must fall " - "within the main package stage directory.\n" - ) - message += "\tdestination : '{dest}'\n".format(dest=destination) - raise RuntimeError(message) + msg = "Destination of a resource must be within the package stage directory.\n" + msg += f"\tdestination : '{destination}'\n" + raise RuntimeError(msg) resources = pkg.resources.setdefault(when_spec, []) - name = kwargs.get("name") - fetcher = from_kwargs(**kwargs) - resources.append(Resource(name, fetcher, destination, placement)) + resources.append( + Resource(name, spack.fetch_strategy.from_kwargs(**kwargs), destination, placement) + ) return _execute_resource diff --git a/lib/spack/spack/package_base.py b/lib/spack/spack/package_base.py index cfd28038054509..85f23c4b8ef14d 100644 --- a/lib/spack/spack/package_base.py +++ b/lib/spack/spack/package_base.py @@ -54,6 +54,7 @@ import spack.variant from spack.error import InstallError, NoURLError, PackageError from spack.filesystem_view import YamlFilesystemView +from spack.resource import Resource from spack.solver.version_order import concretization_version_order from spack.stage import DevelopStage, ResourceStage, Stage, StageComposite, compute_stage_name from spack.util.package_hash import package_hash @@ -585,6 +586,7 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta): # Declare versions dictionary as placeholder for values. # This allows analysis tools to correctly interpret the class attributes. versions: dict + resources: Dict[spack.spec.Spec, List[Resource]] dependencies: Dict[spack.spec.Spec, Dict[str, spack.dependency.Dependency]] conflicts: Dict[spack.spec.Spec, List[Tuple[spack.spec.Spec, Optional[str]]]] requirements: Dict[ diff --git a/lib/spack/spack/resource.py b/lib/spack/spack/resource.py index ba855cbb6388ed..5f222fe016aa25 100644 --- a/lib/spack/spack/resource.py +++ b/lib/spack/spack/resource.py @@ -12,7 +12,10 @@ class Resource: - """Represents an optional resource to be fetched by a package. + """Represents any resource to be fetched by a package. + + This includes the main tarball or source archive, as well as extra archives defined + by the resource() directive. Aggregates a name, a fetcher, a destination and a placement. """ From 22d104d7a92df60dcfed775ae61c5fd725ee6059 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 5 Dec 2024 10:07:24 +0100 Subject: [PATCH 07/69] ci: add bootstrap stack for python@3.6:3.13 (#47719) Resurrect latest Python 3.6 Add clingo-bootstrap to Gitlab CI. --- .../gitlab/cloud_pipelines/.gitlab-ci.yml | 46 ++++++++ .../bootstrap-aarch64-darwin/spack.yaml | 33 ++++++ .../bootstrap-x86_64-linux-gnu/spack.yaml | 35 ++++++ .../packages/clingo-bootstrap/package.py | 3 +- .../clingo-bootstrap/version-script-5.4.patch | 35 ++++++ .../builtin/packages/py-setuptools/package.py | 22 ++-- .../repos/builtin/packages/python/package.py | 102 +++--------------- 7 files changed, 174 insertions(+), 102 deletions(-) create mode 100644 share/spack/gitlab/cloud_pipelines/stacks/bootstrap-aarch64-darwin/spack.yaml create mode 100644 share/spack/gitlab/cloud_pipelines/stacks/bootstrap-x86_64-linux-gnu/spack.yaml create mode 100644 var/spack/repos/builtin/packages/clingo-bootstrap/version-script-5.4.patch diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index f082b3b413dd02..07fd16c88bcff7 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -951,3 +951,49 @@ windows-vis-build: needs: - artifacts: True job: windows-vis-generate + +####################################### +# Bootstrap x86_64-linux-gnu +####################################### +.bootstrap-x86_64-linux-gnu: + extends: [ ".linux_x86_64_v3" ] + variables: + SPACK_CI_STACK_NAME: bootstrap-x86_64-linux-gnu + +bootstrap-x86_64-linux-gnu-generate: + extends: [ .generate-x86_64, .bootstrap-x86_64-linux-gnu ] + image: ghcr.io/spack/ubuntu-24.04:v2024-09-05-v2 + +bootstrap-x86_64-linux-gnu-build: + extends: [ .build, .bootstrap-x86_64-linux-gnu ] + trigger: + include: + - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml + job: bootstrap-x86_64-linux-gnu-generate + strategy: depend + needs: + - artifacts: True + job: bootstrap-x86_64-linux-gnu-generate + +####################################### +# Bootstrap aarch64-darwin +####################################### +.bootstrap-aarch64-darwin: + extends: [.darwin_aarch64] + variables: + SPACK_CI_STACK_NAME: bootstrap-aarch64-darwin + +bootstrap-aarch64-darwin-generate: + tags: [macos-ventura, apple-clang-15, aarch64-macos] + extends: [.bootstrap-aarch64-darwin, .generate-base] + +bootstrap-aarch64-darwin-build: + extends: [.bootstrap-aarch64-darwin, .build] + trigger: + include: + - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml + job: bootstrap-aarch64-darwin-generate + strategy: depend + needs: + - artifacts: true + job: bootstrap-aarch64-darwin-generate diff --git a/share/spack/gitlab/cloud_pipelines/stacks/bootstrap-aarch64-darwin/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/bootstrap-aarch64-darwin/spack.yaml new file mode 100644 index 00000000000000..d267db430ea2dc --- /dev/null +++ b/share/spack/gitlab/cloud_pipelines/stacks/bootstrap-aarch64-darwin/spack.yaml @@ -0,0 +1,33 @@ +spack: + view: false + + packages: + all: + require: target=aarch64 + + config: + deprecated: true # allow old python versions + + specs: + - clingo-bootstrap +optimized ^python@3.13 + - clingo-bootstrap +optimized ^python@3.12 + - clingo-bootstrap +optimized ^python@3.11 + - clingo-bootstrap +optimized ^python@3.10 + - clingo-bootstrap +optimized ^python@3.9 + - clingo-bootstrap +optimized ^python@3.8 + + - clingo-bootstrap@spack +optimized ^python@3.13 + - clingo-bootstrap@spack +optimized ^python@3.12 + - clingo-bootstrap@spack +optimized ^python@3.11 + - clingo-bootstrap@spack +optimized ^python@3.10 + - clingo-bootstrap@spack +optimized ^python@3.9 + - clingo-bootstrap@spack +optimized ^python@3.8 + + ci: + pipeline-gen: + - build-job-remove: + tags: [spack, public] + - build-job: + variables: + CI_GPG_KEY_ROOT: /etc/protected-runner + tags: [macos-ventura, apple-clang-15, aarch64-macos] diff --git a/share/spack/gitlab/cloud_pipelines/stacks/bootstrap-x86_64-linux-gnu/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/bootstrap-x86_64-linux-gnu/spack.yaml new file mode 100644 index 00000000000000..67d5b20fa323f9 --- /dev/null +++ b/share/spack/gitlab/cloud_pipelines/stacks/bootstrap-x86_64-linux-gnu/spack.yaml @@ -0,0 +1,35 @@ +spack: + view: false + + packages: + all: + require: target=x86_64_v3 + + config: + deprecated: true # allow old python versions + + specs: + - clingo-bootstrap +optimized ^python@3.13 + - clingo-bootstrap +optimized ^python@3.12 + - clingo-bootstrap +optimized ^python@3.11 + - clingo-bootstrap +optimized ^python@3.10 + - clingo-bootstrap +optimized ^python@3.9 + - clingo-bootstrap +optimized ^python@3.8 + - clingo-bootstrap +optimized ^python@3.7 + - clingo-bootstrap +optimized ^python@3.6 + + - clingo-bootstrap@spack +optimized ^python@3.13 + - clingo-bootstrap@spack +optimized ^python@3.12 + - clingo-bootstrap@spack +optimized ^python@3.11 + - clingo-bootstrap@spack +optimized ^python@3.10 + - clingo-bootstrap@spack +optimized ^python@3.9 + - clingo-bootstrap@spack +optimized ^python@3.8 + - clingo-bootstrap@spack +optimized ^python@3.7 + - clingo-bootstrap@spack +optimized ^python@3.6 + + ci: + pipeline-gen: + - build-job: + image: + name: ghcr.io/spack/ubuntu-24.04:v2024-09-05-v2 + entrypoint: [''] diff --git a/var/spack/repos/builtin/packages/clingo-bootstrap/package.py b/var/spack/repos/builtin/packages/clingo-bootstrap/package.py index bff3edef945780..17258082034c01 100644 --- a/var/spack/repos/builtin/packages/clingo-bootstrap/package.py +++ b/var/spack/repos/builtin/packages/clingo-bootstrap/package.py @@ -44,7 +44,8 @@ class ClingoBootstrap(Clingo): patch("mimalloc.patch", when="@5.5.0:") patch("mimalloc-pre-5.5.0.patch", when="@:5.4") # ensure we hide libstdc++ with custom operator new/delete symbols - patch("version-script.patch") + patch("version-script.patch", when="@spack,5.5:5.6") + patch("version-script-5.4.patch", when="@5.2:5.4") # CMake at version 3.16.0 or higher has the possibility to force the # Python interpreter, which is crucial to build against external Python diff --git a/var/spack/repos/builtin/packages/clingo-bootstrap/version-script-5.4.patch b/var/spack/repos/builtin/packages/clingo-bootstrap/version-script-5.4.patch new file mode 100644 index 00000000000000..60be38ee1a3f60 --- /dev/null +++ b/var/spack/repos/builtin/packages/clingo-bootstrap/version-script-5.4.patch @@ -0,0 +1,35 @@ +diff --git a/libclingo/CMakeLists.txt b/libclingo/CMakeLists.txt +index 041fd6f0..e8c4caf6 100644 +--- a/libclingo/CMakeLists.txt ++++ b/libclingo/CMakeLists.txt +@@ -50,6 +50,19 @@ target_include_directories(libclingo + PRIVATE + "$") + target_compile_definitions(libclingo PRIVATE CLINGO_BUILD_LIBRARY) ++ ++# Hide private symbols on Linux. ++include(CheckCSourceCompiles) ++file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/version.map" "{ global: f; local: *;};") ++set(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS}) ++set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Wl,--version-script='${CMAKE_CURRENT_BINARY_DIR}/version.map'") ++check_c_source_compiles("void f(void) {} int main(void) {return 0;}" HAVE_LD_VERSION_SCRIPT) ++set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE}) ++file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/version.map") ++if(HAVE_LD_VERSION_SCRIPT) ++set_target_properties(libclingo PROPERTIES LINK_FLAGS "-Wl,--version-script='${CMAKE_CURRENT_SOURCE_DIR}/clingo.map'") ++endif() ++ + if (NOT CLINGO_BUILD_SHARED) + target_compile_definitions(libclingo PUBLIC CLINGO_NO_VISIBILITY) + else() +diff --git a/libclingo/clingo.map b/libclingo/clingo.map +new file mode 100644 +index 00000000..a665456c +--- /dev/null ++++ b/libclingo/clingo.map +@@ -0,0 +1,4 @@ ++{ ++ global: clingo_*; gringo_*; g_clingo_*; ++ local: *; ++}; +\ No newline at end of file diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py index 677c4c06d2cef4..89930c88d5a296 100644 --- a/var/spack/repos/builtin/packages/py-setuptools/package.py +++ b/var/spack/repos/builtin/packages/py-setuptools/package.py @@ -62,20 +62,20 @@ class PySetuptools(Package, PythonExtension): extends("python") - depends_on("python@3.7:", when="@59.7:", type=("build", "run")) - depends_on("python@3.6:", when="@51:", type=("build", "run")) - depends_on("python@3.5:", when="@45:50", type=("build", "run")) - depends_on("python@2.7:2.8,3.5:", when="@44", type=("build", "run")) - depends_on("python@2.7:2.8,3.4:", when="@:43", type=("build", "run")) + with default_args(type=("build", "run")): + depends_on("python@3.9:", when="@75.4:") + depends_on("python@3.8:", when="@68.1:") + depends_on("python@3.7:", when="@59.7:") + depends_on("python@3.6:", when="@51:") - # Uses HTMLParser.unescape - depends_on("python@:3.8", when="@:41.0", type=("build", "run")) + # Uses HTMLParser.unescape + depends_on("python@:3.8", when="@:41.0") - # Uses collections.MutableMapping - depends_on("python@:3.9", when="@:40.4.2", type=("build", "run")) + # Uses collections.MutableMapping + depends_on("python@:3.9", when="@:40.4.2") - # https://github.com/pypa/setuptools/issues/3661 - depends_on("python@:3.11", when="@:67", type=("build", "run")) + # https://github.com/pypa/setuptools/issues/3661 + depends_on("python@:3.11", when="@:67") depends_on("py-pip", type="build") diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index f6d13f49063789..841b94b54c0b03 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -132,96 +132,13 @@ class Python(Package): version("3.8.2", sha256="e634a7a74776c2b89516b2e013dda1728c89c8149b9863b8cea21946daf9d561") version("3.8.1", sha256="c7cfa39a43b994621b245e029769e9126caa2a93571cee2e743b213cceac35fb") version("3.8.0", sha256="f1069ad3cae8e7ec467aa98a6565a62a48ef196cb8f1455a245a08db5e1792df") - version( - "3.7.17", - sha256="fd50161bc2a04f4c22a0971ff0f3856d98b4bf294f89740a9f06b520aae63b49", - deprecated=True, - ) - version( - "3.7.16", - sha256="0cf2da07fa464636755215415909e22eb1d058817af4824bc15af8390d05fb38", - deprecated=True, - ) - version( - "3.7.15", - sha256="cf2993798ae8430f3af3a00d96d9fdf320719f4042f039380dca79967c25e436", - deprecated=True, - ) - version( - "3.7.14", - sha256="82b2abf8978caa61a9011d166eede831b32de9cbebc0db8162900fa23437b709", - deprecated=True, - ) - version( - "3.7.13", - sha256="e405417f50984bc5870c7e7a9f9aeb93e9d270f5ac67f667a0cd3a09439682b5", - deprecated=True, - ) - version( - "3.7.12", - sha256="33b4daaf831be19219659466d12645f87ecec6eb21d4d9f9711018a7b66cce46", - deprecated=True, - ) - version( - "3.7.11", - sha256="b4fba32182e16485d0a6022ba83c9251e6a1c14676ec243a9a07d3722cd4661a", - deprecated=True, - ) - version( - "3.7.10", - sha256="c9649ad84dc3a434c8637df6963100b2e5608697f9ba56d82e3809e4148e0975", - deprecated=True, - ) - version( - "3.7.9", - sha256="39b018bc7d8a165e59aa827d9ae45c45901739b0bbb13721e4f973f3521c166a", - deprecated=True, - ) - version( - "3.7.8", - sha256="0e25835614dc221e3ecea5831b38fa90788b5389b99b675a751414c858789ab0", - deprecated=True, - ) - version( - "3.7.7", - sha256="8c8be91cd2648a1a0c251f04ea0bb4c2a5570feb9c45eaaa2241c785585b475a", - deprecated=True, - ) - version( - "3.7.6", - sha256="aeee681c235ad336af116f08ab6563361a0c81c537072c1b309d6e4050aa2114", - deprecated=True, - ) - version( - "3.7.5", - sha256="8ecc681ea0600bbfb366f2b173f727b205bb825d93d2f0b286bc4e58d37693da", - deprecated=True, - ) - version( - "3.7.4", - sha256="d63e63e14e6d29e17490abbe6f7d17afb3db182dbd801229f14e55f4157c4ba3", - deprecated=True, - ) - version( - "3.7.3", - sha256="d62e3015f2f89c970ac52343976b406694931742fbde2fed8d1ce8ebb4e1f8ff", - deprecated=True, - ) - version( - "3.7.2", - sha256="f09d83c773b9cc72421abba2c317e4e6e05d919f9bcf34468e192b6a6c8e328d", - deprecated=True, - ) - version( - "3.7.1", - sha256="36c1b81ac29d0f8341f727ef40864d99d8206897be96be73dc34d4739c9c9f06", - deprecated=True, - ) - version( - "3.7.0", - sha256="85bb9feb6863e04fb1700b018d9d42d1caac178559ffa453d7e6a436e259fd0d", - deprecated=True, - ) + with default_args(deprecated=True): + version( + "3.7.17", sha256="fd50161bc2a04f4c22a0971ff0f3856d98b4bf294f89740a9f06b520aae63b49" + ) + version( + "3.6.15", sha256="54570b7e339e2cfd72b29c7e2fdb47c0b7b18b7412e61de5b463fc087c13b043" + ) depends_on("c", type="build") # generated depends_on("cxx", type="build") # generated @@ -298,6 +215,11 @@ class Python(Package): depends_on("tix", when="+tix") depends_on("libxcrypt", when="+crypt") + patch( + "https://bugs.python.org/file44413/alignment.patch", + when="@3.6", + sha256="d39bacde16128f380933992ea7f237ac8f70f9cdffb40c051aca3be46dc29bdf", + ) # Python needs to be patched to build extensions w/ mixed C/C++ code: # https://github.com/NixOS/nixpkgs/pull/19585/files # https://bugs.python.org/issue1222585 From 3fcc38ef0443fc5824c9b0b1c82f4f69f8dbe63a Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:53:09 +0100 Subject: [PATCH 08/69] pandoramonitoring,pandorasdk: change docstrings that are wrong (#47937) and are copied from the pandorapfa package Co-authored-by: jmcarcell --- .../repos/builtin/packages/pandoramonitoring/package.py | 5 ++--- var/spack/repos/builtin/packages/pandorasdk/package.py | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/pandoramonitoring/package.py b/var/spack/repos/builtin/packages/pandoramonitoring/package.py index 25008056ad968c..7448a04ce415ec 100644 --- a/var/spack/repos/builtin/packages/pandoramonitoring/package.py +++ b/var/spack/repos/builtin/packages/pandoramonitoring/package.py @@ -8,9 +8,8 @@ class Pandoramonitoring(CMakePackage): - """Metadata package to bring together and build multiple Pandora libraries. - NOTE: for proper version control with spack, this should be broken up and - the subpackages installed individually.""" + """ROOT-based Event Visualisation Environment for Pandora with + tree-writing functionality""" url = "https://github.com/PandoraPFA/PandoraMonitoring/archive/v03-04-00.tar.gz" homepage = "https://github.com/PandoraPFA/PandoraMonitoring" diff --git a/var/spack/repos/builtin/packages/pandorasdk/package.py b/var/spack/repos/builtin/packages/pandorasdk/package.py index 77535e003eb442..92286d5b50c66a 100644 --- a/var/spack/repos/builtin/packages/pandorasdk/package.py +++ b/var/spack/repos/builtin/packages/pandorasdk/package.py @@ -8,9 +8,7 @@ class Pandorasdk(CMakePackage): - """Metadata package to bring together and build multiple Pandora libraries. - NOTE: for proper version control with spack, this should be broken up and - the subpackages installed individually.""" + """Pandora Software Development Kit for pattern-recognition algorithms""" url = "https://github.com/PandoraPFA/PandoraSDK/archive/v03-04-00.tar.gz" homepage = "https://github.com/PandoraPFA/PandoraSDK" From 1f2a68f2b6da57f3a52c2ee9636f9a224df2abe0 Mon Sep 17 00:00:00 2001 From: Kin Fai Tse Date: Fri, 6 Dec 2024 00:09:18 +0800 Subject: [PATCH 09/69] tar: conditionally link iconv (#47933) * fix broken packages requiring iconv * tar: -liconv only when libiconv * Revert "fix broken packages requiring iconv" This reverts commit 5fa426b52fe163ea7e017ccbbb87deaf5f294800. --------- Co-authored-by: Harmen Stoppels --- var/spack/repos/builtin/packages/tar/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/tar/package.py b/var/spack/repos/builtin/packages/tar/package.py index c293f620372e18..d583f7e32acdd6 100644 --- a/var/spack/repos/builtin/packages/tar/package.py +++ b/var/spack/repos/builtin/packages/tar/package.py @@ -72,7 +72,7 @@ def determine_version(cls, exe): return match.group(1) if match else None def flag_handler(self, name, flags): - if name == "ldflags" and self.spec.satisfies("@1.35"): + if name == "ldflags" and self.spec.satisfies("@1.35 ^[virtuals=iconv] libiconv"): # https://savannah.gnu.org/bugs/?64441 flags.append("-liconv") return (flags, None, None) From 4693b323ac591714dc0651711019fb94ce4aaf44 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 5 Dec 2024 18:09:08 +0100 Subject: [PATCH 10/69] spack.mirror: split into submodules (#47936) --- lib/spack/docs/conf.py | 3 + lib/spack/spack/binary_distribution.py | 34 +- lib/spack/spack/bootstrap/core.py | 4 +- lib/spack/spack/ci.py | 11 +- lib/spack/spack/cmd/bootstrap.py | 4 +- lib/spack/spack/cmd/buildcache.py | 6 +- lib/spack/spack/cmd/ci.py | 6 +- lib/spack/spack/cmd/common/arguments.py | 13 +- lib/spack/spack/cmd/gpg.py | 8 +- lib/spack/spack/cmd/mirror.py | 31 +- lib/spack/spack/error.py | 7 + lib/spack/spack/hooks/autopush.py | 4 +- lib/spack/spack/installer.py | 4 +- lib/spack/spack/mirrors/layout.py | 146 ++++++++ lib/spack/spack/{ => mirrors}/mirror.py | 401 +-------------------- lib/spack/spack/mirrors/utils.py | 262 ++++++++++++++ lib/spack/spack/oci/oci.py | 10 +- lib/spack/spack/oci/opener.py | 6 +- lib/spack/spack/package_base.py | 11 +- lib/spack/spack/patch.py | 7 +- lib/spack/spack/stage.py | 9 +- lib/spack/spack/test/bindist.py | 6 +- lib/spack/spack/test/build_distribution.py | 4 +- lib/spack/spack/test/cmd/bootstrap.py | 6 +- lib/spack/spack/test/cmd/buildcache.py | 6 +- lib/spack/spack/test/cmd/mirror.py | 4 +- lib/spack/spack/test/install.py | 7 +- lib/spack/spack/test/mirror.py | 62 ++-- lib/spack/spack/test/oci/urlopen.py | 16 +- lib/spack/spack/test/packaging.py | 4 +- lib/spack/spack/test/web.py | 4 +- lib/spack/spack/util/s3.py | 4 +- 32 files changed, 578 insertions(+), 532 deletions(-) create mode 100644 lib/spack/spack/mirrors/layout.py rename lib/spack/spack/{ => mirrors}/mirror.py (54%) create mode 100644 lib/spack/spack/mirrors/utils.py diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py index 688554fac6da13..c73bf7c19636c2 100644 --- a/lib/spack/docs/conf.py +++ b/lib/spack/docs/conf.py @@ -222,6 +222,9 @@ def setup(sphinx): ("py:class", "spack.traverse.EdgeAndDepth"), ("py:class", "archspec.cpu.microarchitecture.Microarchitecture"), ("py:class", "spack.compiler.CompilerCache"), + ("py:class", "spack.mirrors.mirror.Mirror"), + ("py:class", "spack.mirrors.layout.MirrorLayout"), + ("py:class", "spack.mirrors.utils.MirrorStats"), # TypeVar that is not handled correctly ("py:class", "llnl.util.lang.T"), ] diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index da8f7d03644d6b..0dbe8c08318e10 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -40,7 +40,7 @@ import spack.hash_types as ht import spack.hooks import spack.hooks.sbang -import spack.mirror +import spack.mirrors.mirror import spack.oci.image import spack.oci.oci import spack.oci.opener @@ -369,7 +369,7 @@ def update(self, with_cooldown=False): on disk under ``_index_cache_root``).""" self._init_local_index_cache() configured_mirror_urls = [ - m.fetch_url for m in spack.mirror.MirrorCollection(binary=True).values() + m.fetch_url for m in spack.mirrors.mirror.MirrorCollection(binary=True).values() ] items_to_remove = [] spec_cache_clear_needed = False @@ -1176,7 +1176,7 @@ def _url_upload_tarball_and_specfile( class Uploader: - def __init__(self, mirror: spack.mirror.Mirror, force: bool, update_index: bool): + def __init__(self, mirror: spack.mirrors.mirror.Mirror, force: bool, update_index: bool): self.mirror = mirror self.force = force self.update_index = update_index @@ -1224,7 +1224,7 @@ def tag(self, tag: str, roots: List[spack.spec.Spec]): class OCIUploader(Uploader): def __init__( self, - mirror: spack.mirror.Mirror, + mirror: spack.mirrors.mirror.Mirror, force: bool, update_index: bool, base_image: Optional[str], @@ -1273,7 +1273,7 @@ def tag(self, tag: str, roots: List[spack.spec.Spec]): class URLUploader(Uploader): def __init__( self, - mirror: spack.mirror.Mirror, + mirror: spack.mirrors.mirror.Mirror, force: bool, update_index: bool, signing_key: Optional[str], @@ -1297,7 +1297,7 @@ def push( def make_uploader( - mirror: spack.mirror.Mirror, + mirror: spack.mirrors.mirror.Mirror, force: bool = False, update_index: bool = False, signing_key: Optional[str] = None, @@ -1953,9 +1953,9 @@ def download_tarball(spec, unsigned: Optional[bool] = False, mirrors_for_spec=No "signature_verified": "true-if-binary-pkg-was-already-verified" } """ - configured_mirrors: Iterable[spack.mirror.Mirror] = spack.mirror.MirrorCollection( - binary=True - ).values() + configured_mirrors: Iterable[spack.mirrors.mirror.Mirror] = ( + spack.mirrors.mirror.MirrorCollection(binary=True).values() + ) if not configured_mirrors: tty.die("Please add a spack mirror to allow download of pre-compiled packages.") @@ -1980,7 +1980,7 @@ def fetch_url_to_mirror(url): for mirror in configured_mirrors: if mirror.fetch_url == url: return mirror - return spack.mirror.Mirror(url) + return spack.mirrors.mirror.Mirror(url) mirrors = [fetch_url_to_mirror(url) for url in mirror_urls] @@ -2650,7 +2650,7 @@ def try_direct_fetch(spec, mirrors=None): specfile_is_signed = False found_specs = [] - binary_mirrors = spack.mirror.MirrorCollection(mirrors=mirrors, binary=True).values() + binary_mirrors = spack.mirrors.mirror.MirrorCollection(mirrors=mirrors, binary=True).values() for mirror in binary_mirrors: buildcache_fetch_url_json = url_util.join( @@ -2711,7 +2711,7 @@ def get_mirrors_for_spec(spec=None, mirrors_to_check=None, index_only=False): if spec is None: return [] - if not spack.mirror.MirrorCollection(mirrors=mirrors_to_check, binary=True): + if not spack.mirrors.mirror.MirrorCollection(mirrors=mirrors_to_check, binary=True): tty.debug("No Spack mirrors are currently configured") return {} @@ -2750,7 +2750,7 @@ def clear_spec_cache(): def get_keys(install=False, trust=False, force=False, mirrors=None): """Get pgp public keys available on mirror with suffix .pub""" - mirror_collection = mirrors or spack.mirror.MirrorCollection(binary=True) + mirror_collection = mirrors or spack.mirrors.mirror.MirrorCollection(binary=True) if not mirror_collection: tty.die("Please add a spack mirror to allow " + "download of build caches.") @@ -2805,7 +2805,7 @@ def get_keys(install=False, trust=False, force=False, mirrors=None): def _url_push_keys( - *mirrors: Union[spack.mirror.Mirror, str], + *mirrors: Union[spack.mirrors.mirror.Mirror, str], keys: List[str], tmpdir: str, update_index: bool = False, @@ -2872,7 +2872,7 @@ def check_specs_against_mirrors(mirrors, specs, output_file=None): """ rebuilds = {} - for mirror in spack.mirror.MirrorCollection(mirrors, binary=True).values(): + for mirror in spack.mirrors.mirror.MirrorCollection(mirrors, binary=True).values(): tty.debug("Checking for built specs at {0}".format(mirror.fetch_url)) rebuild_list = [] @@ -2916,7 +2916,7 @@ def _download_buildcache_entry(mirror_root, descriptions): def download_buildcache_entry(file_descriptions, mirror_url=None): - if not mirror_url and not spack.mirror.MirrorCollection(binary=True): + if not mirror_url and not spack.mirrors.mirror.MirrorCollection(binary=True): tty.die( "Please provide or add a spack mirror to allow " + "download of buildcache entries." ) @@ -2925,7 +2925,7 @@ def download_buildcache_entry(file_descriptions, mirror_url=None): mirror_root = os.path.join(mirror_url, BUILD_CACHE_RELATIVE_PATH) return _download_buildcache_entry(mirror_root, file_descriptions) - for mirror in spack.mirror.MirrorCollection(binary=True).values(): + for mirror in spack.mirrors.mirror.MirrorCollection(binary=True).values(): mirror_root = os.path.join(mirror.fetch_url, BUILD_CACHE_RELATIVE_PATH) if _download_buildcache_entry(mirror_root, file_descriptions): diff --git a/lib/spack/spack/bootstrap/core.py b/lib/spack/spack/bootstrap/core.py index 0c6127e63e8289..d396aaac68700d 100644 --- a/lib/spack/spack/bootstrap/core.py +++ b/lib/spack/spack/bootstrap/core.py @@ -37,7 +37,7 @@ import spack.binary_distribution import spack.config import spack.detection -import spack.mirror +import spack.mirrors.mirror import spack.platforms import spack.spec import spack.store @@ -91,7 +91,7 @@ def __init__(self, conf: ConfigDictionary) -> None: self.metadata_dir = spack.util.path.canonicalize_path(conf["metadata"]) # Promote (relative) paths to file urls - self.url = spack.mirror.Mirror(conf["info"]["url"]).fetch_url + self.url = spack.mirrors.mirror.Mirror(conf["info"]["url"]).fetch_url @property def mirror_scope(self) -> spack.config.InternalConfigScope: diff --git a/lib/spack/spack/ci.py b/lib/spack/spack/ci.py index 6fba4863561184..56d1980a3ac57d 100644 --- a/lib/spack/spack/ci.py +++ b/lib/spack/spack/ci.py @@ -37,7 +37,8 @@ import spack.config as cfg import spack.error import spack.main -import spack.mirror +import spack.mirrors.mirror +import spack.mirrors.utils import spack.paths import spack.repo import spack.spec @@ -204,7 +205,7 @@ def _print_staging_summary(spec_labels, stages, rebuild_decisions): if not stages: return - mirrors = spack.mirror.MirrorCollection(binary=True) + mirrors = spack.mirrors.mirror.MirrorCollection(binary=True) tty.msg("Checked the following mirrors for binaries:") for m in mirrors.values(): tty.msg(f" {m.fetch_url}") @@ -797,7 +798,7 @@ def ensure_expected_target_path(path): path = path.replace("\\", "/") return path - pipeline_mirrors = spack.mirror.MirrorCollection(binary=True) + pipeline_mirrors = spack.mirrors.mirror.MirrorCollection(binary=True) buildcache_destination = None if "buildcache-destination" not in pipeline_mirrors: raise SpackCIError("spack ci generate requires a mirror named 'buildcache-destination'") @@ -1323,7 +1324,7 @@ def push_to_build_cache(spec: spack.spec.Spec, mirror_url: str, sign_binaries: b """ tty.debug(f"Pushing to build cache ({'signed' if sign_binaries else 'unsigned'})") signing_key = bindist.select_signing_key() if sign_binaries else None - mirror = spack.mirror.Mirror.from_url(mirror_url) + mirror = spack.mirrors.mirror.Mirror.from_url(mirror_url) try: with bindist.make_uploader(mirror, signing_key=signing_key) as uploader: uploader.push_or_raise([spec]) @@ -1343,7 +1344,7 @@ def remove_other_mirrors(mirrors_to_keep, scope=None): mirrors_to_remove.append(name) for mirror_name in mirrors_to_remove: - spack.mirror.remove(mirror_name, scope) + spack.mirrors.utils.remove(mirror_name, scope) def copy_files_to_artifacts(src, artifacts_dir): diff --git a/lib/spack/spack/cmd/bootstrap.py b/lib/spack/spack/cmd/bootstrap.py index 8704f2c7a411e9..97feea89f299bf 100644 --- a/lib/spack/spack/cmd/bootstrap.py +++ b/lib/spack/spack/cmd/bootstrap.py @@ -16,7 +16,7 @@ import spack.bootstrap.config import spack.bootstrap.core import spack.config -import spack.mirror +import spack.mirrors.utils import spack.spec import spack.stage import spack.util.path @@ -400,7 +400,7 @@ def _mirror(args): llnl.util.tty.set_msg_enabled(False) spec = spack.spec.Spec(spec_str).concretized() for node in spec.traverse(): - spack.mirror.create(mirror_dir, [node]) + spack.mirrors.utils.create(mirror_dir, [node]) llnl.util.tty.set_msg_enabled(True) if args.binary_packages: diff --git a/lib/spack/spack/cmd/buildcache.py b/lib/spack/spack/cmd/buildcache.py index 8daa78610c128f..40e2393204b88c 100644 --- a/lib/spack/spack/cmd/buildcache.py +++ b/lib/spack/spack/cmd/buildcache.py @@ -21,7 +21,7 @@ import spack.deptypes as dt import spack.environment as ev import spack.error -import spack.mirror +import spack.mirrors.mirror import spack.oci.oci import spack.spec import spack.stage @@ -392,7 +392,7 @@ def push_fn(args): roots = spack.cmd.require_active_env(cmd_name="buildcache push").concrete_roots() mirror = args.mirror - assert isinstance(mirror, spack.mirror.Mirror) + assert isinstance(mirror, spack.mirrors.mirror.Mirror) push_url = mirror.push_url @@ -750,7 +750,7 @@ def manifest_copy(manifest_file_list, dest_mirror=None): copy_buildcache_file(copy_file["src"], dest) -def update_index(mirror: spack.mirror.Mirror, update_keys=False): +def update_index(mirror: spack.mirrors.mirror.Mirror, update_keys=False): # Special case OCI images for now. try: image_ref = spack.oci.oci.image_from_mirror(mirror) diff --git a/lib/spack/spack/cmd/ci.py b/lib/spack/spack/cmd/ci.py index 8d835b0af41f59..a7d4f097584d5d 100644 --- a/lib/spack/spack/cmd/ci.py +++ b/lib/spack/spack/cmd/ci.py @@ -20,7 +20,7 @@ import spack.config as cfg import spack.environment as ev import spack.hash_types as ht -import spack.mirror +import spack.mirrors.mirror import spack.util.gpg as gpg_util import spack.util.timer as timer import spack.util.url as url_util @@ -240,7 +240,7 @@ def ci_reindex(args): ci_mirrors = yaml_root["mirrors"] mirror_urls = [url for url in ci_mirrors.values()] remote_mirror_url = mirror_urls[0] - mirror = spack.mirror.Mirror(remote_mirror_url) + mirror = spack.mirrors.mirror.Mirror(remote_mirror_url) buildcache.update_index(mirror, update_keys=True) @@ -328,7 +328,7 @@ def ci_rebuild(args): full_rebuild = True if rebuild_everything and rebuild_everything.lower() == "true" else False - pipeline_mirrors = spack.mirror.MirrorCollection(binary=True) + pipeline_mirrors = spack.mirrors.mirror.MirrorCollection(binary=True) buildcache_destination = None if "buildcache-destination" not in pipeline_mirrors: tty.die("spack ci rebuild requires a mirror named 'buildcache-destination") diff --git a/lib/spack/spack/cmd/common/arguments.py b/lib/spack/spack/cmd/common/arguments.py index 7ddafd4d14c566..2ac136de1f3a44 100644 --- a/lib/spack/spack/cmd/common/arguments.py +++ b/lib/spack/spack/cmd/common/arguments.py @@ -14,7 +14,8 @@ import spack.config import spack.deptypes as dt import spack.environment as ev -import spack.mirror +import spack.mirrors.mirror +import spack.mirrors.utils import spack.reporters import spack.spec import spack.store @@ -689,31 +690,31 @@ def mirror_name_or_url(m): # If there's a \ or / in the name, it's interpreted as a path or url. if "/" in m or "\\" in m or m in (".", ".."): - return spack.mirror.Mirror(m) + return spack.mirrors.mirror.Mirror(m) # Otherwise, the named mirror is required to exist. try: - return spack.mirror.require_mirror_name(m) + return spack.mirrors.utils.require_mirror_name(m) except ValueError as e: raise argparse.ArgumentTypeError(f"{e}. Did you mean {os.path.join('.', m)}?") from e def mirror_url(url): try: - return spack.mirror.Mirror.from_url(url) + return spack.mirrors.mirror.Mirror.from_url(url) except ValueError as e: raise argparse.ArgumentTypeError(str(e)) from e def mirror_directory(path): try: - return spack.mirror.Mirror.from_local_path(path) + return spack.mirrors.mirror.Mirror.from_local_path(path) except ValueError as e: raise argparse.ArgumentTypeError(str(e)) from e def mirror_name(name): try: - return spack.mirror.require_mirror_name(name) + return spack.mirrors.utils.require_mirror_name(name) except ValueError as e: raise argparse.ArgumentTypeError(str(e)) from e diff --git a/lib/spack/spack/cmd/gpg.py b/lib/spack/spack/cmd/gpg.py index 288212b51fc6c1..616755d8321e41 100644 --- a/lib/spack/spack/cmd/gpg.py +++ b/lib/spack/spack/cmd/gpg.py @@ -8,7 +8,7 @@ import tempfile import spack.binary_distribution -import spack.mirror +import spack.mirrors.mirror import spack.paths import spack.stage import spack.util.gpg @@ -217,11 +217,11 @@ def gpg_publish(args): mirror = None if args.directory: url = spack.util.url.path_to_file_url(args.directory) - mirror = spack.mirror.Mirror(url, url) + mirror = spack.mirrors.mirror.Mirror(url, url) elif args.mirror_name: - mirror = spack.mirror.MirrorCollection(binary=True).lookup(args.mirror_name) + mirror = spack.mirrors.mirror.MirrorCollection(binary=True).lookup(args.mirror_name) elif args.mirror_url: - mirror = spack.mirror.Mirror(args.mirror_url, args.mirror_url) + mirror = spack.mirrors.mirror.Mirror(args.mirror_url, args.mirror_url) with tempfile.TemporaryDirectory(dir=spack.stage.get_stage_root()) as tmpdir: spack.binary_distribution._url_push_keys( diff --git a/lib/spack/spack/cmd/mirror.py b/lib/spack/spack/cmd/mirror.py index ede042949796c0..d2891b1276cffd 100644 --- a/lib/spack/spack/cmd/mirror.py +++ b/lib/spack/spack/cmd/mirror.py @@ -14,7 +14,8 @@ import spack.concretize import spack.config import spack.environment as ev -import spack.mirror +import spack.mirrors.mirror +import spack.mirrors.utils import spack.repo import spack.spec import spack.util.web as web_util @@ -365,15 +366,15 @@ def mirror_add(args): connection["autopush"] = args.autopush if args.signed is not None: connection["signed"] = args.signed - mirror = spack.mirror.Mirror(connection, name=args.name) + mirror = spack.mirrors.mirror.Mirror(connection, name=args.name) else: - mirror = spack.mirror.Mirror(args.url, name=args.name) - spack.mirror.add(mirror, args.scope) + mirror = spack.mirrors.mirror.Mirror(args.url, name=args.name) + spack.mirrors.utils.add(mirror, args.scope) def mirror_remove(args): """remove a mirror by name""" - spack.mirror.remove(args.name, args.scope) + spack.mirrors.utils.remove(args.name, args.scope) def _configure_mirror(args): @@ -382,7 +383,7 @@ def _configure_mirror(args): if args.name not in mirrors: tty.die(f"No mirror found with name {args.name}.") - entry = spack.mirror.Mirror(mirrors[args.name], args.name) + entry = spack.mirrors.mirror.Mirror(mirrors[args.name], args.name) direction = "fetch" if args.fetch else "push" if args.push else None changes = {} if args.url: @@ -449,7 +450,7 @@ def mirror_set_url(args): def mirror_list(args): """print out available mirrors to the console""" - mirrors = spack.mirror.MirrorCollection(scope=args.scope) + mirrors = spack.mirrors.mirror.MirrorCollection(scope=args.scope) if not mirrors: tty.msg("No mirrors configured.") return @@ -489,9 +490,9 @@ def concrete_specs_from_user(args): def extend_with_additional_versions(specs, num_versions): if num_versions == "all": - mirror_specs = spack.mirror.get_all_versions(specs) + mirror_specs = spack.mirrors.utils.get_all_versions(specs) else: - mirror_specs = spack.mirror.get_matching_versions(specs, num_versions=num_versions) + mirror_specs = spack.mirrors.utils.get_matching_versions(specs, num_versions=num_versions) mirror_specs = [x.concretized() for x in mirror_specs] return mirror_specs @@ -570,7 +571,7 @@ def concrete_specs_from_environment(): def all_specs_with_all_versions(): specs = [spack.spec.Spec(n) for n in spack.repo.all_package_names()] - mirror_specs = spack.mirror.get_all_versions(specs) + mirror_specs = spack.mirrors.utils.get_all_versions(specs) mirror_specs.sort(key=lambda s: (s.name, s.version)) return mirror_specs @@ -659,19 +660,21 @@ def _specs_and_action(args): def create_mirror_for_all_specs(mirror_specs, path, skip_unstable_versions): - mirror_cache, mirror_stats = spack.mirror.mirror_cache_and_stats( + mirror_cache, mirror_stats = spack.mirrors.utils.mirror_cache_and_stats( path, skip_unstable_versions=skip_unstable_versions ) for candidate in mirror_specs: pkg_cls = spack.repo.PATH.get_pkg_class(candidate.name) pkg_obj = pkg_cls(spack.spec.Spec(candidate)) mirror_stats.next_spec(pkg_obj.spec) - spack.mirror.create_mirror_from_package_object(pkg_obj, mirror_cache, mirror_stats) + spack.mirrors.utils.create_mirror_from_package_object(pkg_obj, mirror_cache, mirror_stats) process_mirror_stats(*mirror_stats.stats()) def create_mirror_for_individual_specs(mirror_specs, path, skip_unstable_versions): - present, mirrored, error = spack.mirror.create(path, mirror_specs, skip_unstable_versions) + present, mirrored, error = spack.mirrors.utils.create( + path, mirror_specs, skip_unstable_versions + ) tty.msg("Summary for mirror in {}".format(path)) process_mirror_stats(present, mirrored, error) @@ -681,7 +684,7 @@ def mirror_destroy(args): mirror_url = None if args.mirror_name: - result = spack.mirror.MirrorCollection().lookup(args.mirror_name) + result = spack.mirrors.mirror.MirrorCollection().lookup(args.mirror_name) mirror_url = result.push_url elif args.mirror_url: mirror_url = args.mirror_url diff --git a/lib/spack/spack/error.py b/lib/spack/spack/error.py index 45a39a4f201d97..b7c21b73416b6c 100644 --- a/lib/spack/spack/error.py +++ b/lib/spack/spack/error.py @@ -192,3 +192,10 @@ def __reduce__(self): def _make_stop_phase(msg, long_msg): return StopPhase(msg, long_msg) + + +class MirrorError(SpackError): + """Superclass of all mirror-creation related errors.""" + + def __init__(self, msg, long_msg=None): + super().__init__(msg, long_msg) diff --git a/lib/spack/spack/hooks/autopush.py b/lib/spack/spack/hooks/autopush.py index 05fad82ef9cda8..07beef3c20f9d3 100644 --- a/lib/spack/spack/hooks/autopush.py +++ b/lib/spack/spack/hooks/autopush.py @@ -6,7 +6,7 @@ import llnl.util.tty as tty import spack.binary_distribution as bindist -import spack.mirror +import spack.mirrors.mirror def post_install(spec, explicit): @@ -22,7 +22,7 @@ def post_install(spec, explicit): return # Push the package to all autopush mirrors - for mirror in spack.mirror.MirrorCollection(binary=True, autopush=True).values(): + for mirror in spack.mirrors.mirror.MirrorCollection(binary=True, autopush=True).values(): signing_key = bindist.select_signing_key() if mirror.signed else None with bindist.make_uploader(mirror=mirror, force=True, signing_key=signing_key) as uploader: uploader.push_or_raise([spec]) diff --git a/lib/spack/spack/installer.py b/lib/spack/spack/installer.py index 1fffe251f35773..dba9f574667341 100644 --- a/lib/spack/spack/installer.py +++ b/lib/spack/spack/installer.py @@ -56,7 +56,7 @@ import spack.deptypes as dt import spack.error import spack.hooks -import spack.mirror +import spack.mirrors.mirror import spack.package_base import spack.package_prefs as prefs import spack.repo @@ -491,7 +491,7 @@ def _try_install_from_binary_cache( timer: timer to keep track of binary install phases. """ # Early exit if no binary mirrors are configured. - if not spack.mirror.MirrorCollection(binary=True): + if not spack.mirrors.mirror.MirrorCollection(binary=True): return False tty.debug(f"Searching for binary cache of {package_id(pkg.spec)}") diff --git a/lib/spack/spack/mirrors/layout.py b/lib/spack/spack/mirrors/layout.py new file mode 100644 index 00000000000000..94a2606bc8b575 --- /dev/null +++ b/lib/spack/spack/mirrors/layout.py @@ -0,0 +1,146 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os +import os.path +from typing import Optional + +import llnl.url +import llnl.util.symlink +from llnl.util.filesystem import mkdirp + +import spack.fetch_strategy +import spack.oci.image +import spack.repo +import spack.spec +from spack.error import MirrorError + + +class MirrorLayout: + """A ``MirrorLayout`` object describes the relative path of a mirror entry.""" + + def __init__(self, path: str) -> None: + self.path = path + + def __iter__(self): + """Yield all paths including aliases where the resource can be found.""" + yield self.path + + def make_alias(self, root: str) -> None: + """Make the entry ``root / self.path`` available under a human readable alias""" + pass + + +class DefaultLayout(MirrorLayout): + def __init__(self, alias_path: str, digest_path: Optional[str] = None) -> None: + # When we have a digest, it is used as the primary storage location. If not, then we use + # the human-readable alias. In case of mirrors of a VCS checkout, we currently do not have + # a digest, that's why an alias is required and a digest optional. + super().__init__(path=digest_path or alias_path) + self.alias = alias_path + self.digest_path = digest_path + + def make_alias(self, root: str) -> None: + """Symlink a human readible path in our mirror to the actual storage location.""" + # We already use the human-readable path as the main storage location. + if not self.digest_path: + return + + alias, digest = os.path.join(root, self.alias), os.path.join(root, self.digest_path) + + alias_dir = os.path.dirname(alias) + relative_dst = os.path.relpath(digest, start=alias_dir) + + mkdirp(alias_dir) + tmp = f"{alias}.tmp" + llnl.util.symlink.symlink(relative_dst, tmp) + + try: + os.rename(tmp, alias) + except OSError: + # Clean up the temporary if possible + try: + os.unlink(tmp) + except OSError: + pass + raise + + def __iter__(self): + if self.digest_path: + yield self.digest_path + yield self.alias + + +class OCILayout(MirrorLayout): + """Follow the OCI Image Layout Specification to archive blobs where paths are of the form + ``blobs//``""" + + def __init__(self, digest: spack.oci.image.Digest) -> None: + super().__init__(os.path.join("blobs", digest.algorithm, digest.digest)) + + +def _determine_extension(fetcher): + if isinstance(fetcher, spack.fetch_strategy.URLFetchStrategy): + if fetcher.expand_archive: + # If we fetch with a URLFetchStrategy, use URL's archive type + ext = llnl.url.determine_url_file_extension(fetcher.url) + + if ext: + # Remove any leading dots + ext = ext.lstrip(".") + else: + msg = """\ +Unable to parse extension from {0}. + +If this URL is for a tarball but does not include the file extension +in the name, you can explicitly declare it with the following syntax: + + version('1.2.3', 'hash', extension='tar.gz') + +If this URL is for a download like a .jar or .whl that does not need +to be expanded, or an uncompressed installation script, you can tell +Spack not to expand it with the following syntax: + + version('1.2.3', 'hash', expand=False) +""" + raise MirrorError(msg.format(fetcher.url)) + else: + # If the archive shouldn't be expanded, don't check extension. + ext = None + else: + # Otherwise we'll make a .tar.gz ourselves + ext = "tar.gz" + + return ext + + +def default_mirror_layout( + fetcher: "spack.fetch_strategy.FetchStrategy", + per_package_ref: str, + spec: Optional["spack.spec.Spec"] = None, +) -> MirrorLayout: + """Returns a ``MirrorReference`` object which keeps track of the relative + storage path of the resource associated with the specified ``fetcher``.""" + ext = None + if spec: + pkg_cls = spack.repo.PATH.get_pkg_class(spec.name) + versions = pkg_cls.versions.get(spec.version, {}) + ext = versions.get("extension", None) + # If the spec does not explicitly specify an extension (the default case), + # then try to determine it automatically. An extension can only be + # specified for the primary source of the package (e.g. the source code + # identified in the 'version' declaration). Resources/patches don't have + # an option to specify an extension, so it must be inferred for those. + ext = ext or _determine_extension(fetcher) + + if ext: + per_package_ref += ".%s" % ext + + global_ref = fetcher.mirror_id() + if global_ref: + global_ref = os.path.join("_source-cache", global_ref) + if global_ref and ext: + global_ref += ".%s" % ext + + return DefaultLayout(per_package_ref, global_ref) diff --git a/lib/spack/spack/mirror.py b/lib/spack/spack/mirrors/mirror.py similarity index 54% rename from lib/spack/spack/mirror.py rename to lib/spack/spack/mirrors/mirror.py index a4fd8535c44e8d..21da1b92346e67 100644 --- a/lib/spack/spack/mirror.py +++ b/lib/spack/spack/mirrors/mirror.py @@ -2,42 +2,20 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -""" -This file contains code for creating spack mirror directories. A -mirror is an organized hierarchy containing specially named archive -files. This enabled spack to know where to find files in a mirror if -the main server for a particular package is down. Or, if the computer -where spack is run is not connected to the internet, it allows spack -to download packages directly from a mirror (e.g., on an intranet). -""" -import collections import collections.abc import operator import os -import os.path -import sys -import traceback import urllib.parse from typing import Any, Dict, Optional, Tuple, Union -import llnl.url -import llnl.util.symlink import llnl.util.tty as tty -from llnl.util.filesystem import mkdirp -import spack.caches import spack.config -import spack.error -import spack.fetch_strategy -import spack.mirror -import spack.oci.image -import spack.repo -import spack.spec import spack.util.path import spack.util.spack_json as sjson import spack.util.spack_yaml as syaml import spack.util.url as url_util -import spack.version +from spack.error import MirrorError #: What schemes do we support supported_url_schemes = ("file", "http", "https", "sftp", "ftp", "s3", "gs", "oci") @@ -490,380 +468,3 @@ def __iter__(self): def __len__(self): return len(self._mirrors) - - -def _determine_extension(fetcher): - if isinstance(fetcher, spack.fetch_strategy.URLFetchStrategy): - if fetcher.expand_archive: - # If we fetch with a URLFetchStrategy, use URL's archive type - ext = llnl.url.determine_url_file_extension(fetcher.url) - - if ext: - # Remove any leading dots - ext = ext.lstrip(".") - else: - msg = """\ -Unable to parse extension from {0}. - -If this URL is for a tarball but does not include the file extension -in the name, you can explicitly declare it with the following syntax: - - version('1.2.3', 'hash', extension='tar.gz') - -If this URL is for a download like a .jar or .whl that does not need -to be expanded, or an uncompressed installation script, you can tell -Spack not to expand it with the following syntax: - - version('1.2.3', 'hash', expand=False) -""" - raise MirrorError(msg.format(fetcher.url)) - else: - # If the archive shouldn't be expanded, don't check extension. - ext = None - else: - # Otherwise we'll make a .tar.gz ourselves - ext = "tar.gz" - - return ext - - -class MirrorLayout: - """A ``MirrorLayout`` object describes the relative path of a mirror entry.""" - - def __init__(self, path: str) -> None: - self.path = path - - def __iter__(self): - """Yield all paths including aliases where the resource can be found.""" - yield self.path - - def make_alias(self, root: str) -> None: - """Make the entry ``root / self.path`` available under a human readable alias""" - pass - - -class DefaultLayout(MirrorLayout): - def __init__(self, alias_path: str, digest_path: Optional[str] = None) -> None: - # When we have a digest, it is used as the primary storage location. If not, then we use - # the human-readable alias. In case of mirrors of a VCS checkout, we currently do not have - # a digest, that's why an alias is required and a digest optional. - super().__init__(path=digest_path or alias_path) - self.alias = alias_path - self.digest_path = digest_path - - def make_alias(self, root: str) -> None: - """Symlink a human readible path in our mirror to the actual storage location.""" - # We already use the human-readable path as the main storage location. - if not self.digest_path: - return - - alias, digest = os.path.join(root, self.alias), os.path.join(root, self.digest_path) - - alias_dir = os.path.dirname(alias) - relative_dst = os.path.relpath(digest, start=alias_dir) - - mkdirp(alias_dir) - tmp = f"{alias}.tmp" - llnl.util.symlink.symlink(relative_dst, tmp) - - try: - os.rename(tmp, alias) - except OSError: - # Clean up the temporary if possible - try: - os.unlink(tmp) - except OSError: - pass - raise - - def __iter__(self): - if self.digest_path: - yield self.digest_path - yield self.alias - - -class OCILayout(MirrorLayout): - """Follow the OCI Image Layout Specification to archive blobs where paths are of the form - ``blobs//``""" - - def __init__(self, digest: spack.oci.image.Digest) -> None: - super().__init__(os.path.join("blobs", digest.algorithm, digest.digest)) - - -def default_mirror_layout( - fetcher: "spack.fetch_strategy.FetchStrategy", - per_package_ref: str, - spec: Optional["spack.spec.Spec"] = None, -) -> MirrorLayout: - """Returns a ``MirrorReference`` object which keeps track of the relative - storage path of the resource associated with the specified ``fetcher``.""" - ext = None - if spec: - pkg_cls = spack.repo.PATH.get_pkg_class(spec.name) - versions = pkg_cls.versions.get(spec.version, {}) - ext = versions.get("extension", None) - # If the spec does not explicitly specify an extension (the default case), - # then try to determine it automatically. An extension can only be - # specified for the primary source of the package (e.g. the source code - # identified in the 'version' declaration). Resources/patches don't have - # an option to specify an extension, so it must be inferred for those. - ext = ext or _determine_extension(fetcher) - - if ext: - per_package_ref += ".%s" % ext - - global_ref = fetcher.mirror_id() - if global_ref: - global_ref = os.path.join("_source-cache", global_ref) - if global_ref and ext: - global_ref += ".%s" % ext - - return DefaultLayout(per_package_ref, global_ref) - - -def get_all_versions(specs): - """Given a set of initial specs, return a new set of specs that includes - each version of each package in the original set. - - Note that if any spec in the original set specifies properties other than - version, this information will be omitted in the new set; for example; the - new set of specs will not include variant settings. - """ - version_specs = [] - for spec in specs: - pkg_cls = spack.repo.PATH.get_pkg_class(spec.name) - # Skip any package that has no known versions. - if not pkg_cls.versions: - tty.msg("No safe (checksummed) versions for package %s" % pkg_cls.name) - continue - - for version in pkg_cls.versions: - version_spec = spack.spec.Spec(pkg_cls.name) - version_spec.versions = spack.version.VersionList([version]) - version_specs.append(version_spec) - - return version_specs - - -def get_matching_versions(specs, num_versions=1): - """Get a spec for EACH known version matching any spec in the list. - For concrete specs, this retrieves the concrete version and, if more - than one version per spec is requested, retrieves the latest versions - of the package. - """ - matching = [] - for spec in specs: - pkg = spec.package - - # Skip any package that has no known versions. - if not pkg.versions: - tty.msg("No safe (checksummed) versions for package %s" % pkg.name) - continue - - pkg_versions = num_versions - - version_order = list(reversed(sorted(pkg.versions))) - matching_spec = [] - if spec.concrete: - matching_spec.append(spec) - pkg_versions -= 1 - if spec.version in version_order: - version_order.remove(spec.version) - - for v in version_order: - # Generate no more than num_versions versions for each spec. - if pkg_versions < 1: - break - - # Generate only versions that satisfy the spec. - if spec.concrete or v.intersects(spec.versions): - s = spack.spec.Spec(pkg.name) - s.versions = spack.version.VersionList([v]) - s.variants = spec.variants.copy() - # This is needed to avoid hanging references during the - # concretization phase - s.variants.spec = s - matching_spec.append(s) - pkg_versions -= 1 - - if not matching_spec: - tty.warn("No known version matches spec: %s" % spec) - matching.extend(matching_spec) - - return matching - - -def create(path, specs, skip_unstable_versions=False): - """Create a directory to be used as a spack mirror, and fill it with - package archives. - - Arguments: - path: Path to create a mirror directory hierarchy in. - specs: Any package versions matching these specs will be added \ - to the mirror. - skip_unstable_versions: if true, this skips adding resources when - they do not have a stable archive checksum (as determined by - ``fetch_strategy.stable_target``) - - Return Value: - Returns a tuple of lists: (present, mirrored, error) - - * present: Package specs that were already present. - * mirrored: Package specs that were successfully mirrored. - * error: Package specs that failed to mirror due to some error. - """ - # automatically spec-ify anything in the specs array. - specs = [s if isinstance(s, spack.spec.Spec) else spack.spec.Spec(s) for s in specs] - - mirror_cache, mirror_stats = mirror_cache_and_stats(path, skip_unstable_versions) - for spec in specs: - mirror_stats.next_spec(spec) - create_mirror_from_package_object(spec.package, mirror_cache, mirror_stats) - - return mirror_stats.stats() - - -def mirror_cache_and_stats(path, skip_unstable_versions=False): - """Return both a mirror cache and a mirror stats, starting from the path - where a mirror ought to be created. - - Args: - path (str): path to create a mirror directory hierarchy in. - skip_unstable_versions: if true, this skips adding resources when - they do not have a stable archive checksum (as determined by - ``fetch_strategy.stable_target``) - """ - # Get the absolute path of the root before we start jumping around. - if not os.path.isdir(path): - try: - mkdirp(path) - except OSError as e: - raise MirrorError("Cannot create directory '%s':" % path, str(e)) - mirror_cache = spack.caches.MirrorCache(path, skip_unstable_versions=skip_unstable_versions) - mirror_stats = MirrorStats() - return mirror_cache, mirror_stats - - -def add(mirror: Mirror, scope=None): - """Add a named mirror in the given scope""" - mirrors = spack.config.get("mirrors", scope=scope) - if not mirrors: - mirrors = syaml.syaml_dict() - - if mirror.name in mirrors: - tty.die("Mirror with name {} already exists.".format(mirror.name)) - - items = [(n, u) for n, u in mirrors.items()] - items.insert(0, (mirror.name, mirror.to_dict())) - mirrors = syaml.syaml_dict(items) - spack.config.set("mirrors", mirrors, scope=scope) - - -def remove(name, scope): - """Remove the named mirror in the given scope""" - mirrors = spack.config.get("mirrors", scope=scope) - if not mirrors: - mirrors = syaml.syaml_dict() - - if name not in mirrors: - tty.die("No mirror with name %s" % name) - - mirrors.pop(name) - spack.config.set("mirrors", mirrors, scope=scope) - tty.msg("Removed mirror %s." % name) - - -class MirrorStats: - def __init__(self): - self.present = {} - self.new = {} - self.errors = set() - - self.current_spec = None - self.added_resources = set() - self.existing_resources = set() - - def next_spec(self, spec): - self._tally_current_spec() - self.current_spec = spec - - def _tally_current_spec(self): - if self.current_spec: - if self.added_resources: - self.new[self.current_spec] = len(self.added_resources) - if self.existing_resources: - self.present[self.current_spec] = len(self.existing_resources) - self.added_resources = set() - self.existing_resources = set() - self.current_spec = None - - def stats(self): - self._tally_current_spec() - return list(self.present), list(self.new), list(self.errors) - - def already_existed(self, resource): - # If an error occurred after caching a subset of a spec's - # resources, a secondary attempt may consider them already added - if resource not in self.added_resources: - self.existing_resources.add(resource) - - def added(self, resource): - self.added_resources.add(resource) - - def error(self): - self.errors.add(self.current_spec) - - -def create_mirror_from_package_object(pkg_obj, mirror_cache, mirror_stats): - """Add a single package object to a mirror. - - The package object is only required to have an associated spec - with a concrete version. - - Args: - pkg_obj (spack.package_base.PackageBase): package object with to be added. - mirror_cache (spack.caches.MirrorCache): mirror where to add the spec. - mirror_stats (spack.mirror.MirrorStats): statistics on the current mirror - - Return: - True if the spec was added successfully, False otherwise - """ - tty.msg("Adding package {} to mirror".format(pkg_obj.spec.format("{name}{@version}"))) - num_retries = 3 - while num_retries > 0: - try: - # Includes patches and resources - with pkg_obj.stage as pkg_stage: - pkg_stage.cache_mirror(mirror_cache, mirror_stats) - exception = None - break - except Exception as e: - exc_tuple = sys.exc_info() - exception = e - num_retries -= 1 - if exception: - if spack.config.get("config:debug"): - traceback.print_exception(file=sys.stderr, *exc_tuple) - else: - tty.warn( - "Error while fetching %s" % pkg_obj.spec.cformat("{name}{@version}"), - getattr(exception, "message", exception), - ) - mirror_stats.error() - return False - return True - - -def require_mirror_name(mirror_name): - """Find a mirror by name and raise if it does not exist""" - mirror = MirrorCollection().get(mirror_name) - if not mirror: - raise ValueError(f'no mirror named "{mirror_name}"') - return mirror - - -class MirrorError(spack.error.SpackError): - """Superclass of all mirror-creation related errors.""" - - def __init__(self, msg, long_msg=None): - super().__init__(msg, long_msg) diff --git a/lib/spack/spack/mirrors/utils.py b/lib/spack/spack/mirrors/utils.py new file mode 100644 index 00000000000000..ba5aba37741c19 --- /dev/null +++ b/lib/spack/spack/mirrors/utils.py @@ -0,0 +1,262 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os +import os.path +import sys +import traceback + +import llnl.util.tty as tty +from llnl.util.filesystem import mkdirp + +import spack.caches +import spack.config +import spack.error +import spack.repo +import spack.spec +import spack.util.spack_yaml as syaml +import spack.version +from spack.error import MirrorError +from spack.mirrors.mirror import Mirror, MirrorCollection + + +def get_all_versions(specs): + """Given a set of initial specs, return a new set of specs that includes + each version of each package in the original set. + + Note that if any spec in the original set specifies properties other than + version, this information will be omitted in the new set; for example; the + new set of specs will not include variant settings. + """ + version_specs = [] + for spec in specs: + pkg_cls = spack.repo.PATH.get_pkg_class(spec.name) + # Skip any package that has no known versions. + if not pkg_cls.versions: + tty.msg("No safe (checksummed) versions for package %s" % pkg_cls.name) + continue + + for version in pkg_cls.versions: + version_spec = spack.spec.Spec(pkg_cls.name) + version_spec.versions = spack.version.VersionList([version]) + version_specs.append(version_spec) + + return version_specs + + +def get_matching_versions(specs, num_versions=1): + """Get a spec for EACH known version matching any spec in the list. + For concrete specs, this retrieves the concrete version and, if more + than one version per spec is requested, retrieves the latest versions + of the package. + """ + matching = [] + for spec in specs: + pkg = spec.package + + # Skip any package that has no known versions. + if not pkg.versions: + tty.msg("No safe (checksummed) versions for package %s" % pkg.name) + continue + + pkg_versions = num_versions + + version_order = list(reversed(sorted(pkg.versions))) + matching_spec = [] + if spec.concrete: + matching_spec.append(spec) + pkg_versions -= 1 + if spec.version in version_order: + version_order.remove(spec.version) + + for v in version_order: + # Generate no more than num_versions versions for each spec. + if pkg_versions < 1: + break + + # Generate only versions that satisfy the spec. + if spec.concrete or v.intersects(spec.versions): + s = spack.spec.Spec(pkg.name) + s.versions = spack.version.VersionList([v]) + s.variants = spec.variants.copy() + # This is needed to avoid hanging references during the + # concretization phase + s.variants.spec = s + matching_spec.append(s) + pkg_versions -= 1 + + if not matching_spec: + tty.warn("No known version matches spec: %s" % spec) + matching.extend(matching_spec) + + return matching + + +def create(path, specs, skip_unstable_versions=False): + """Create a directory to be used as a spack mirror, and fill it with + package archives. + + Arguments: + path: Path to create a mirror directory hierarchy in. + specs: Any package versions matching these specs will be added \ + to the mirror. + skip_unstable_versions: if true, this skips adding resources when + they do not have a stable archive checksum (as determined by + ``fetch_strategy.stable_target``) + + Return Value: + Returns a tuple of lists: (present, mirrored, error) + + * present: Package specs that were already present. + * mirrored: Package specs that were successfully mirrored. + * error: Package specs that failed to mirror due to some error. + """ + # automatically spec-ify anything in the specs array. + specs = [s if isinstance(s, spack.spec.Spec) else spack.spec.Spec(s) for s in specs] + + mirror_cache, mirror_stats = mirror_cache_and_stats(path, skip_unstable_versions) + for spec in specs: + mirror_stats.next_spec(spec) + create_mirror_from_package_object(spec.package, mirror_cache, mirror_stats) + + return mirror_stats.stats() + + +def mirror_cache_and_stats(path, skip_unstable_versions=False): + """Return both a mirror cache and a mirror stats, starting from the path + where a mirror ought to be created. + + Args: + path (str): path to create a mirror directory hierarchy in. + skip_unstable_versions: if true, this skips adding resources when + they do not have a stable archive checksum (as determined by + ``fetch_strategy.stable_target``) + """ + # Get the absolute path of the root before we start jumping around. + if not os.path.isdir(path): + try: + mkdirp(path) + except OSError as e: + raise MirrorError("Cannot create directory '%s':" % path, str(e)) + mirror_cache = spack.caches.MirrorCache(path, skip_unstable_versions=skip_unstable_versions) + mirror_stats = MirrorStats() + return mirror_cache, mirror_stats + + +def add(mirror: Mirror, scope=None): + """Add a named mirror in the given scope""" + mirrors = spack.config.get("mirrors", scope=scope) + if not mirrors: + mirrors = syaml.syaml_dict() + + if mirror.name in mirrors: + tty.die("Mirror with name {} already exists.".format(mirror.name)) + + items = [(n, u) for n, u in mirrors.items()] + items.insert(0, (mirror.name, mirror.to_dict())) + mirrors = syaml.syaml_dict(items) + spack.config.set("mirrors", mirrors, scope=scope) + + +def remove(name, scope): + """Remove the named mirror in the given scope""" + mirrors = spack.config.get("mirrors", scope=scope) + if not mirrors: + mirrors = syaml.syaml_dict() + + if name not in mirrors: + tty.die("No mirror with name %s" % name) + + mirrors.pop(name) + spack.config.set("mirrors", mirrors, scope=scope) + tty.msg("Removed mirror %s." % name) + + +class MirrorStats: + def __init__(self): + self.present = {} + self.new = {} + self.errors = set() + + self.current_spec = None + self.added_resources = set() + self.existing_resources = set() + + def next_spec(self, spec): + self._tally_current_spec() + self.current_spec = spec + + def _tally_current_spec(self): + if self.current_spec: + if self.added_resources: + self.new[self.current_spec] = len(self.added_resources) + if self.existing_resources: + self.present[self.current_spec] = len(self.existing_resources) + self.added_resources = set() + self.existing_resources = set() + self.current_spec = None + + def stats(self): + self._tally_current_spec() + return list(self.present), list(self.new), list(self.errors) + + def already_existed(self, resource): + # If an error occurred after caching a subset of a spec's + # resources, a secondary attempt may consider them already added + if resource not in self.added_resources: + self.existing_resources.add(resource) + + def added(self, resource): + self.added_resources.add(resource) + + def error(self): + self.errors.add(self.current_spec) + + +def create_mirror_from_package_object(pkg_obj, mirror_cache, mirror_stats): + """Add a single package object to a mirror. + + The package object is only required to have an associated spec + with a concrete version. + + Args: + pkg_obj (spack.package_base.PackageBase): package object with to be added. + mirror_cache (spack.caches.MirrorCache): mirror where to add the spec. + mirror_stats (spack.mirror.MirrorStats): statistics on the current mirror + + Return: + True if the spec was added successfully, False otherwise + """ + tty.msg("Adding package {} to mirror".format(pkg_obj.spec.format("{name}{@version}"))) + num_retries = 3 + while num_retries > 0: + try: + # Includes patches and resources + with pkg_obj.stage as pkg_stage: + pkg_stage.cache_mirror(mirror_cache, mirror_stats) + exception = None + break + except Exception as e: + exc_tuple = sys.exc_info() + exception = e + num_retries -= 1 + if exception: + if spack.config.get("config:debug"): + traceback.print_exception(file=sys.stderr, *exc_tuple) + else: + tty.warn( + "Error while fetching %s" % pkg_obj.spec.cformat("{name}{@version}"), + getattr(exception, "message", exception), + ) + mirror_stats.error() + return False + return True + + +def require_mirror_name(mirror_name): + """Find a mirror by name and raise if it does not exist""" + mirror = MirrorCollection().get(mirror_name) + if not mirror: + raise ValueError(f'no mirror named "{mirror_name}"') + return mirror diff --git a/lib/spack/spack/oci/oci.py b/lib/spack/spack/oci/oci.py index 1b84860d2682cb..d6f4d1efd54c23 100644 --- a/lib/spack/spack/oci/oci.py +++ b/lib/spack/spack/oci/oci.py @@ -16,7 +16,8 @@ import llnl.util.tty as tty import spack.fetch_strategy -import spack.mirror +import spack.mirrors.layout +import spack.mirrors.mirror import spack.oci.opener import spack.stage import spack.util.url @@ -213,7 +214,7 @@ def upload_manifest( return digest, size -def image_from_mirror(mirror: spack.mirror.Mirror) -> ImageReference: +def image_from_mirror(mirror: spack.mirrors.mirror.Mirror) -> ImageReference: """Given an OCI based mirror, extract the URL and image name from it""" url = mirror.push_url if not url.startswith("oci://"): @@ -385,5 +386,8 @@ def make_stage( # is the `oci-layout` and `index.json` files, which are # required by the spec. return spack.stage.Stage( - fetch_strategy, mirror_paths=spack.mirror.OCILayout(digest), name=digest.digest, keep=keep + fetch_strategy, + mirror_paths=spack.mirrors.layout.OCILayout(digest), + name=digest.digest, + keep=keep, ) diff --git a/lib/spack/spack/oci/opener.py b/lib/spack/spack/oci/opener.py index 2f9e83f5be1619..118fdcf9314d8c 100644 --- a/lib/spack/spack/oci/opener.py +++ b/lib/spack/spack/oci/opener.py @@ -20,7 +20,7 @@ import llnl.util.lang import spack.config -import spack.mirror +import spack.mirrors.mirror import spack.parser import spack.util.web @@ -367,11 +367,11 @@ def http_error_401(self, req: Request, fp, code, msg, headers): def credentials_from_mirrors( - domain: str, *, mirrors: Optional[Iterable[spack.mirror.Mirror]] = None + domain: str, *, mirrors: Optional[Iterable[spack.mirrors.mirror.Mirror]] = None ) -> Optional[UsernamePassword]: """Filter out OCI registry credentials from a list of mirrors.""" - mirrors = mirrors or spack.mirror.MirrorCollection().values() + mirrors = mirrors or spack.mirrors.mirror.MirrorCollection().values() for mirror in mirrors: # Prefer push credentials over fetch. Unlikely that those are different diff --git a/lib/spack/spack/package_base.py b/lib/spack/spack/package_base.py index 85f23c4b8ef14d..1bc67005f19714 100644 --- a/lib/spack/spack/package_base.py +++ b/lib/spack/spack/package_base.py @@ -40,7 +40,8 @@ import spack.error import spack.fetch_strategy as fs import spack.hooks -import spack.mirror +import spack.mirrors.layout +import spack.mirrors.mirror import spack.multimethod import spack.patch import spack.phase_callbacks @@ -1187,10 +1188,10 @@ def _make_resource_stage(self, root_stage, resource): root=root_stage, resource=resource, name=self._resource_stage(resource), - mirror_paths=spack.mirror.default_mirror_layout( + mirror_paths=spack.mirrors.layout.default_mirror_layout( resource.fetcher, os.path.join(self.name, pretty_resource_name) ), - mirrors=spack.mirror.MirrorCollection(source=True).values(), + mirrors=spack.mirrors.mirror.MirrorCollection(source=True).values(), path=self.path, ) @@ -1202,7 +1203,7 @@ def _make_root_stage(self, fetcher): # Construct a mirror path (TODO: get this out of package.py) format_string = "{name}-{version}" pretty_name = self.spec.format_path(format_string) - mirror_paths = spack.mirror.default_mirror_layout( + mirror_paths = spack.mirrors.layout.default_mirror_layout( fetcher, os.path.join(self.name, pretty_name), self.spec ) # Construct a path where the stage should build.. @@ -1211,7 +1212,7 @@ def _make_root_stage(self, fetcher): stage = Stage( fetcher, mirror_paths=mirror_paths, - mirrors=spack.mirror.MirrorCollection(source=True).values(), + mirrors=spack.mirrors.mirror.MirrorCollection(source=True).values(), name=stage_name, path=self.path, search_fn=self._download_search, diff --git a/lib/spack/spack/patch.py b/lib/spack/spack/patch.py index a0f4152317c1e9..8d2d0b690d676b 100644 --- a/lib/spack/spack/patch.py +++ b/lib/spack/spack/patch.py @@ -16,7 +16,8 @@ import spack import spack.error import spack.fetch_strategy -import spack.mirror +import spack.mirrors.layout +import spack.mirrors.mirror import spack.repo import spack.stage import spack.util.spack_json as sjson @@ -329,12 +330,12 @@ def stage(self) -> "spack.stage.Stage": name = "{0}-{1}".format(os.path.basename(self.url), fetch_digest[:7]) per_package_ref = os.path.join(self.owner.split(".")[-1], name) - mirror_ref = spack.mirror.default_mirror_layout(fetcher, per_package_ref) + mirror_ref = spack.mirrors.layout.default_mirror_layout(fetcher, per_package_ref) self._stage = spack.stage.Stage( fetcher, name=f"{spack.stage.stage_prefix}patch-{fetch_digest}", mirror_paths=mirror_ref, - mirrors=spack.mirror.MirrorCollection(source=True).values(), + mirrors=spack.mirrors.mirror.MirrorCollection(source=True).values(), ) return self._stage diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index 08a6e31b93c83b..eca80df2272ac7 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -34,7 +34,8 @@ import spack.caches import spack.config import spack.error -import spack.mirror +import spack.mirrors.layout +import spack.mirrors.utils import spack.resource import spack.spec import spack.util.crypto @@ -353,8 +354,8 @@ def __init__( url_or_fetch_strategy, *, name=None, - mirror_paths: Optional["spack.mirror.MirrorLayout"] = None, - mirrors: Optional[Iterable["spack.mirror.Mirror"]] = None, + mirror_paths: Optional["spack.mirrors.layout.MirrorLayout"] = None, + mirrors: Optional[Iterable["spack.mirrors.mirror.Mirror"]] = None, keep=False, path=None, lock=True, @@ -601,7 +602,7 @@ def cache_local(self): spack.caches.FETCH_CACHE.store(self.fetcher, self.mirror_layout.path) def cache_mirror( - self, mirror: "spack.caches.MirrorCache", stats: "spack.mirror.MirrorStats" + self, mirror: "spack.caches.MirrorCache", stats: "spack.mirrors.utils.MirrorStats" ) -> None: """Perform a fetch if the resource is not already cached diff --git a/lib/spack/spack/test/bindist.py b/lib/spack/spack/test/bindist.py index 77b11ce98f66a4..d8383ca0fed38a 100644 --- a/lib/spack/spack/test/bindist.py +++ b/lib/spack/spack/test/bindist.py @@ -32,7 +32,7 @@ import spack.fetch_strategy import spack.hooks.sbang as sbang import spack.main -import spack.mirror +import spack.mirrors.mirror import spack.paths import spack.spec import spack.stage @@ -324,8 +324,8 @@ def test_push_and_fetch_keys(mock_gnupghome, tmp_path): mirror = os.path.join(testpath, "mirror") mirrors = {"test-mirror": url_util.path_to_file_url(mirror)} - mirrors = spack.mirror.MirrorCollection(mirrors) - mirror = spack.mirror.Mirror(url_util.path_to_file_url(mirror)) + mirrors = spack.mirrors.mirror.MirrorCollection(mirrors) + mirror = spack.mirrors.mirror.Mirror(url_util.path_to_file_url(mirror)) gpg_dir1 = os.path.join(testpath, "gpg1") gpg_dir2 = os.path.join(testpath, "gpg2") diff --git a/lib/spack/spack/test/build_distribution.py b/lib/spack/spack/test/build_distribution.py index 5edcbe5673d3a7..f2976da8ae9541 100644 --- a/lib/spack/spack/test/build_distribution.py +++ b/lib/spack/spack/test/build_distribution.py @@ -9,7 +9,7 @@ import pytest import spack.binary_distribution as bd -import spack.mirror +import spack.mirrors.mirror import spack.spec from spack.installer import PackageInstaller @@ -23,7 +23,7 @@ def test_build_tarball_overwrite(install_mockery, mock_fetch, monkeypatch, tmp_p specs = [spec] # populate cache, everything is new - mirror = spack.mirror.Mirror.from_local_path(str(tmp_path)) + mirror = spack.mirrors.mirror.Mirror.from_local_path(str(tmp_path)) with bd.make_uploader(mirror) as uploader: skipped = uploader.push_or_raise(specs) assert not skipped diff --git a/lib/spack/spack/test/cmd/bootstrap.py b/lib/spack/spack/test/cmd/bootstrap.py index 03421ede7725b4..a44482530311ba 100644 --- a/lib/spack/spack/test/cmd/bootstrap.py +++ b/lib/spack/spack/test/cmd/bootstrap.py @@ -14,7 +14,7 @@ import spack.config import spack.environment as ev import spack.main -import spack.mirror +import spack.mirrors.utils import spack.spec _bootstrap = spack.main.SpackCommand("bootstrap") @@ -182,8 +182,8 @@ def test_bootstrap_mirror_metadata(mutable_config, linux_os, monkeypatch, tmpdir `spack bootstrap add`. Here we don't download data, since that would be an expensive operation for a unit test. """ - old_create = spack.mirror.create - monkeypatch.setattr(spack.mirror, "create", lambda p, s: old_create(p, [])) + old_create = spack.mirrors.utils.create + monkeypatch.setattr(spack.mirrors.utils, "create", lambda p, s: old_create(p, [])) monkeypatch.setattr(spack.spec.Spec, "concretized", lambda p: p) # Create the mirror in a temporary folder diff --git a/lib/spack/spack/test/cmd/buildcache.py b/lib/spack/spack/test/cmd/buildcache.py index 840dd61f1aba86..22b63e1e2a7867 100644 --- a/lib/spack/spack/test/cmd/buildcache.py +++ b/lib/spack/spack/test/cmd/buildcache.py @@ -16,7 +16,7 @@ import spack.environment as ev import spack.error import spack.main -import spack.mirror +import spack.mirrors.mirror import spack.spec import spack.util.url from spack.installer import PackageInstaller @@ -385,7 +385,9 @@ def test_correct_specs_are_pushed( class DontUpload(spack.binary_distribution.Uploader): def __init__(self): - super().__init__(spack.mirror.Mirror.from_local_path(str(tmpdir)), False, False) + super().__init__( + spack.mirrors.mirror.Mirror.from_local_path(str(tmpdir)), False, False + ) self.pushed = [] def push(self, specs: List[spack.spec.Spec]): diff --git a/lib/spack/spack/test/cmd/mirror.py b/lib/spack/spack/test/cmd/mirror.py index ee827c05547e8d..b10335d56f704e 100644 --- a/lib/spack/spack/test/cmd/mirror.py +++ b/lib/spack/spack/test/cmd/mirror.py @@ -11,7 +11,7 @@ import spack.config import spack.environment as ev import spack.error -import spack.mirror +import spack.mirrors.utils import spack.spec import spack.util.url as url_util import spack.version @@ -74,7 +74,7 @@ def test_mirror_skip_unstable(tmpdir_factory, mock_packages, config, source_for_ mirror_dir = str(tmpdir_factory.mktemp("mirror-dir")) specs = [spack.spec.Spec(x).concretized() for x in ["git-test", "trivial-pkg-with-valid-hash"]] - spack.mirror.create(mirror_dir, specs, skip_unstable_versions=True) + spack.mirrors.utils.create(mirror_dir, specs, skip_unstable_versions=True) assert set(os.listdir(mirror_dir)) - set(["_source-cache"]) == set( ["trivial-pkg-with-valid-hash"] diff --git a/lib/spack/spack/test/install.py b/lib/spack/spack/test/install.py index bcbe45bf3e5e40..7b45b8969f9db6 100644 --- a/lib/spack/spack/test/install.py +++ b/lib/spack/spack/test/install.py @@ -16,7 +16,8 @@ import spack.database import spack.error import spack.installer -import spack.mirror +import spack.mirrors.mirror +import spack.mirrors.utils import spack.package_base import spack.patch import spack.repo @@ -615,7 +616,7 @@ def test_install_from_binary_with_missing_patch_succeeds( temporary_store.db.add(s, explicit=True) # Push it to a binary cache - mirror = spack.mirror.Mirror.from_local_path(str(tmp_path / "my_build_cache")) + mirror = spack.mirrors.mirror.Mirror.from_local_path(str(tmp_path / "my_build_cache")) with binary_distribution.make_uploader(mirror=mirror) as uploader: uploader.push_or_raise([s]) @@ -628,7 +629,7 @@ def test_install_from_binary_with_missing_patch_succeeds( PackageInstaller([s.package], explicit=True).install() # Binary install: succeeds, we don't need the patch. - spack.mirror.add(mirror) + spack.mirrors.utils.add(mirror) PackageInstaller( [s.package], explicit=True, diff --git a/lib/spack/spack/test/mirror.py b/lib/spack/spack/test/mirror.py index ce104259fc76ca..c44b96b3fc8b96 100644 --- a/lib/spack/spack/test/mirror.py +++ b/lib/spack/spack/test/mirror.py @@ -14,7 +14,9 @@ import spack.caches import spack.config import spack.fetch_strategy -import spack.mirror +import spack.mirrors.layout +import spack.mirrors.mirror +import spack.mirrors.utils import spack.patch import spack.stage import spack.util.executable @@ -60,7 +62,7 @@ def check_mirror(): with spack.config.override("mirrors", mirrors): with spack.config.override("config:checksum", False): specs = [Spec(x).concretized() for x in repos] - spack.mirror.create(mirror_root, specs) + spack.mirrors.utils.create(mirror_root, specs) # Stage directory exists assert os.path.isdir(mirror_root) @@ -68,7 +70,9 @@ def check_mirror(): for spec in specs: fetcher = spec.package.fetcher per_package_ref = os.path.join(spec.name, "-".join([spec.name, str(spec.version)])) - mirror_layout = spack.mirror.default_mirror_layout(fetcher, per_package_ref) + mirror_layout = spack.mirrors.layout.default_mirror_layout( + fetcher, per_package_ref + ) expected_path = os.path.join(mirror_root, mirror_layout.path) assert os.path.exists(expected_path) @@ -135,16 +139,16 @@ def test_all_mirror(mock_git_repository, mock_svn_repository, mock_hg_repository @pytest.mark.parametrize( "mirror", [ - spack.mirror.Mirror( + spack.mirrors.mirror.Mirror( {"fetch": "https://example.com/fetch", "push": "https://example.com/push"} ) ], ) -def test_roundtrip_mirror(mirror: spack.mirror.Mirror): +def test_roundtrip_mirror(mirror: spack.mirrors.mirror.Mirror): mirror_yaml = mirror.to_yaml() - assert spack.mirror.Mirror.from_yaml(mirror_yaml) == mirror + assert spack.mirrors.mirror.Mirror.from_yaml(mirror_yaml) == mirror mirror_json = mirror.to_json() - assert spack.mirror.Mirror.from_json(mirror_json) == mirror + assert spack.mirrors.mirror.Mirror.from_json(mirror_json) == mirror @pytest.mark.parametrize( @@ -152,14 +156,14 @@ def test_roundtrip_mirror(mirror: spack.mirror.Mirror): ) def test_invalid_yaml_mirror(invalid_yaml): with pytest.raises(SpackYAMLError, match="error parsing YAML") as e: - spack.mirror.Mirror.from_yaml(invalid_yaml) + spack.mirrors.mirror.Mirror.from_yaml(invalid_yaml) assert invalid_yaml in str(e.value) @pytest.mark.parametrize("invalid_json, error_message", [("{13:", "Expecting property name")]) def test_invalid_json_mirror(invalid_json, error_message): with pytest.raises(sjson.SpackJSONError) as e: - spack.mirror.Mirror.from_json(invalid_json) + spack.mirrors.mirror.Mirror.from_json(invalid_json) exc_msg = str(e.value) assert exc_msg.startswith("error parsing JSON mirror:") assert error_message in exc_msg @@ -168,9 +172,9 @@ def test_invalid_json_mirror(invalid_json, error_message): @pytest.mark.parametrize( "mirror_collection", [ - spack.mirror.MirrorCollection( + spack.mirrors.mirror.MirrorCollection( mirrors={ - "example-mirror": spack.mirror.Mirror( + "example-mirror": spack.mirrors.mirror.Mirror( "https://example.com/fetch", "https://example.com/push" ).to_dict() } @@ -179,9 +183,15 @@ def test_invalid_json_mirror(invalid_json, error_message): ) def test_roundtrip_mirror_collection(mirror_collection): mirror_collection_yaml = mirror_collection.to_yaml() - assert spack.mirror.MirrorCollection.from_yaml(mirror_collection_yaml) == mirror_collection + assert ( + spack.mirrors.mirror.MirrorCollection.from_yaml(mirror_collection_yaml) + == mirror_collection + ) mirror_collection_json = mirror_collection.to_json() - assert spack.mirror.MirrorCollection.from_json(mirror_collection_json) == mirror_collection + assert ( + spack.mirrors.mirror.MirrorCollection.from_json(mirror_collection_json) + == mirror_collection + ) @pytest.mark.parametrize( @@ -189,14 +199,14 @@ def test_roundtrip_mirror_collection(mirror_collection): ) def test_invalid_yaml_mirror_collection(invalid_yaml): with pytest.raises(SpackYAMLError, match="error parsing YAML") as e: - spack.mirror.MirrorCollection.from_yaml(invalid_yaml) + spack.mirrors.mirror.MirrorCollection.from_yaml(invalid_yaml) assert invalid_yaml in str(e.value) @pytest.mark.parametrize("invalid_json, error_message", [("{13:", "Expecting property name")]) def test_invalid_json_mirror_collection(invalid_json, error_message): with pytest.raises(sjson.SpackJSONError) as e: - spack.mirror.MirrorCollection.from_json(invalid_json) + spack.mirrors.mirror.MirrorCollection.from_json(invalid_json) exc_msg = str(e.value) assert exc_msg.startswith("error parsing JSON mirror collection:") assert error_message in exc_msg @@ -205,7 +215,7 @@ def test_invalid_json_mirror_collection(invalid_json, error_message): def test_mirror_archive_paths_no_version(mock_packages, mock_archive): spec = Spec("trivial-install-test-package@=nonexistingversion").concretized() fetcher = spack.fetch_strategy.URLFetchStrategy(url=mock_archive.url) - spack.mirror.default_mirror_layout(fetcher, "per-package-ref", spec) + spack.mirrors.layout.default_mirror_layout(fetcher, "per-package-ref", spec) def test_mirror_with_url_patches(mock_packages, monkeypatch): @@ -238,10 +248,12 @@ def successful_make_alias(*args, **kwargs): monkeypatch.setattr(spack.fetch_strategy.URLFetchStrategy, "expand", successful_expand) monkeypatch.setattr(spack.patch, "apply_patch", successful_apply) monkeypatch.setattr(spack.caches.MirrorCache, "store", record_store) - monkeypatch.setattr(spack.mirror.DefaultLayout, "make_alias", successful_make_alias) + monkeypatch.setattr( + spack.mirrors.layout.DefaultLayout, "make_alias", successful_make_alias + ) with spack.config.override("config:checksum", False): - spack.mirror.create(mirror_root, list(spec.traverse())) + spack.mirrors.utils.create(mirror_root, list(spec.traverse())) assert { "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234", @@ -268,7 +280,7 @@ def test_mirror_layout_make_alias(tmpdir): alias = os.path.join("zlib", "zlib-1.2.11.tar.gz") path = os.path.join("_source-cache", "archive", "c3", "c3e5.tar.gz") cache = spack.caches.MirrorCache(root=str(tmpdir), skip_unstable_versions=False) - layout = spack.mirror.DefaultLayout(alias, path) + layout = spack.mirrors.layout.DefaultLayout(alias, path) cache.store(MockFetcher(), layout.path) layout.make_alias(cache.root) @@ -288,7 +300,7 @@ def test_mirror_layout_make_alias(tmpdir): ) def test_get_all_versions(specs, expected_specs): specs = [Spec(s) for s in specs] - output_list = spack.mirror.get_all_versions(specs) + output_list = spack.mirrors.utils.get_all_versions(specs) output_list = [str(x) for x in output_list] # Compare sets since order is not important assert set(output_list) == set(expected_specs) @@ -296,14 +308,14 @@ def test_get_all_versions(specs, expected_specs): def test_update_1(): # No change - m = spack.mirror.Mirror("https://example.com") + m = spack.mirrors.mirror.Mirror("https://example.com") assert not m.update({"url": "https://example.com"}) assert m.to_dict() == "https://example.com" def test_update_2(): # Change URL, shouldn't expand to {"url": ...} dict. - m = spack.mirror.Mirror("https://example.com") + m = spack.mirrors.mirror.Mirror("https://example.com") assert m.update({"url": "https://example.org"}) assert m.to_dict() == "https://example.org" assert m.fetch_url == "https://example.org" @@ -312,7 +324,7 @@ def test_update_2(): def test_update_3(): # Change fetch url, ensure minimal config - m = spack.mirror.Mirror("https://example.com") + m = spack.mirrors.mirror.Mirror("https://example.com") assert m.update({"url": "https://example.org"}, "fetch") assert m.to_dict() == {"url": "https://example.com", "fetch": "https://example.org"} assert m.fetch_url == "https://example.org" @@ -321,7 +333,7 @@ def test_update_3(): def test_update_4(): # Change push url, ensure minimal config - m = spack.mirror.Mirror("https://example.com") + m = spack.mirrors.mirror.Mirror("https://example.com") assert m.update({"url": "https://example.org"}, "push") assert m.to_dict() == {"url": "https://example.com", "push": "https://example.org"} assert m.push_url == "https://example.org" @@ -331,7 +343,7 @@ def test_update_4(): @pytest.mark.parametrize("direction", ["fetch", "push"]) def test_update_connection_params(direction, tmpdir, monkeypatch): """Test whether new connection params expand the mirror config to a dict.""" - m = spack.mirror.Mirror("https://example.com", "example") + m = spack.mirrors.mirror.Mirror("https://example.com", "example") assert m.update( { diff --git a/lib/spack/spack/test/oci/urlopen.py b/lib/spack/spack/test/oci/urlopen.py index efc3f3c2b06fb4..2d82ea5d098469 100644 --- a/lib/spack/spack/test/oci/urlopen.py +++ b/lib/spack/spack/test/oci/urlopen.py @@ -14,7 +14,7 @@ import pytest -import spack.mirror +import spack.mirrors.mirror from spack.oci.image import Digest, ImageReference, default_config, default_manifest from spack.oci.oci import ( copy_missing_layers, @@ -474,7 +474,7 @@ def test_copy_missing_layers(tmpdir, config): def test_image_from_mirror(): - mirror = spack.mirror.Mirror("oci://example.com/image") + mirror = spack.mirrors.mirror.Mirror("oci://example.com/image") assert image_from_mirror(mirror) == ImageReference.from_string("example.com/image") @@ -511,25 +511,25 @@ def test_default_credentials_provider(): mirrors = [ # OCI mirror with push credentials - spack.mirror.Mirror( + spack.mirrors.mirror.Mirror( {"url": "oci://a.example.com/image", "push": {"access_pair": ["user.a", "pass.a"]}} ), # Not an OCI mirror - spack.mirror.Mirror( + spack.mirrors.mirror.Mirror( {"url": "https://b.example.com/image", "access_pair": ["user.b", "pass.b"]} ), # No credentials - spack.mirror.Mirror("oci://c.example.com/image"), + spack.mirrors.mirror.Mirror("oci://c.example.com/image"), # Top-level credentials - spack.mirror.Mirror( + spack.mirrors.mirror.Mirror( {"url": "oci://d.example.com/image", "access_pair": ["user.d", "pass.d"]} ), # Dockerhub short reference - spack.mirror.Mirror( + spack.mirrors.mirror.Mirror( {"url": "oci://user/image", "access_pair": ["dockerhub_user", "dockerhub_pass"]} ), # Localhost (not a dockerhub short reference) - spack.mirror.Mirror( + spack.mirrors.mirror.Mirror( {"url": "oci://localhost/image", "access_pair": ["user.localhost", "pass.localhost"]} ), ] diff --git a/lib/spack/spack/test/packaging.py b/lib/spack/spack/test/packaging.py index 0f2d89dcce0f74..1732c3e9906c09 100644 --- a/lib/spack/spack/test/packaging.py +++ b/lib/spack/spack/test/packaging.py @@ -24,7 +24,7 @@ import spack.config import spack.error import spack.fetch_strategy -import spack.mirror +import spack.mirrors.utils import spack.package_base import spack.stage import spack.util.gpg @@ -64,7 +64,7 @@ def test_buildcache(mock_archive, tmp_path, monkeypatch, mutable_config): # Create the build cache and put it directly into the mirror mirror_path = str(tmp_path / "test-mirror") - spack.mirror.create(mirror_path, specs=[]) + spack.mirrors.utils.create(mirror_path, specs=[]) # register mirror with spack config mirrors = {"spack-mirror-test": url_util.path_to_file_url(mirror_path)} diff --git a/lib/spack/spack/test/web.py b/lib/spack/spack/test/web.py index 8998d89efc5fbb..19dcd78840d2a7 100644 --- a/lib/spack/spack/test/web.py +++ b/lib/spack/spack/test/web.py @@ -14,7 +14,7 @@ import llnl.util.tty as tty import spack.config -import spack.mirror +import spack.mirrors.mirror import spack.paths import spack.url import spack.util.s3 @@ -276,7 +276,7 @@ def head_object(self, Bucket=None, Key=None): def test_gather_s3_information(monkeypatch, capfd): - mirror = spack.mirror.Mirror( + mirror = spack.mirrors.mirror.Mirror( { "fetch": { "access_token": "AAAAAAA", diff --git a/lib/spack/spack/util/s3.py b/lib/spack/spack/util/s3.py index 700db07135704c..60c466f6894340 100644 --- a/lib/spack/spack/util/s3.py +++ b/lib/spack/spack/util/s3.py @@ -25,7 +25,7 @@ def get_s3_session(url, method="fetch"): from botocore.exceptions import ClientError # Circular dependency - from spack.mirror import MirrorCollection + from spack.mirrors.mirror import MirrorCollection global s3_client_cache @@ -87,7 +87,7 @@ def _parse_s3_endpoint_url(endpoint_url): def get_mirror_s3_connection_info(mirror, method): """Create s3 config for session/client from a Mirror instance (or just set defaults when no mirror is given.)""" - from spack.mirror import Mirror + from spack.mirrors.mirror import Mirror s3_connection = {} s3_client_args = {"use_ssl": spack.config.get("config:verify_ssl")} From c1b2ac549d8ba6832e40146e866ab3298c74d579 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 5 Dec 2024 18:10:06 +0100 Subject: [PATCH 11/69] solver: partition classes related to requirement parsing into their own file (#47915) --- lib/spack/spack/solver/asp.py | 228 +----------------------- lib/spack/spack/solver/concretize.lp | 2 + lib/spack/spack/solver/requirements.py | 232 +++++++++++++++++++++++++ 3 files changed, 238 insertions(+), 224 deletions(-) create mode 100644 lib/spack/spack/solver/requirements.py diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index a57e1183b43c65..436776e272144f 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -48,8 +48,6 @@ import spack.version as vn import spack.version.git_ref_lookup from spack import traverse -from spack.config import get_mark_from_yaml_data -from spack.error import SpecSyntaxError from .core import ( AspFunction, @@ -65,6 +63,7 @@ parse_term, ) from .counter import FullDuplicatesCounter, MinimalDuplicatesCounter, NoDuplicatesCounter +from .requirements import RequirementKind, RequirementParser, RequirementRule from .version_order import concretization_version_order GitOrStandardVersion = Union[spack.version.GitVersion, spack.version.StandardVersion] @@ -144,17 +143,6 @@ def named_spec( spec.name = old_name -class RequirementKind(enum.Enum): - """Purpose / provenance of a requirement""" - - #: Default requirement expressed under the 'all' attribute of packages.yaml - DEFAULT = enum.auto() - #: Requirement expressed on a virtual package - VIRTUAL = enum.auto() - #: Requirement expressed on a specific package - PACKAGE = enum.auto() - - class DeclaredVersion(NamedTuple): """Data class to contain information on declared versions used in the solve""" @@ -757,17 +745,6 @@ def on_model(model): raise UnsatisfiableSpecError(msg) -class RequirementRule(NamedTuple): - """Data class to collect information on a requirement""" - - pkg_name: str - policy: str - requirements: List["spack.spec.Spec"] - condition: "spack.spec.Spec" - kind: RequirementKind - message: Optional[str] - - class KnownCompiler(NamedTuple): """Data class to collect information on compilers""" @@ -1146,6 +1123,7 @@ class SpackSolverSetup: def __init__(self, tests: bool = False): # these are all initialized in setup() self.gen: "ProblemInstanceBuilder" = ProblemInstanceBuilder() + self.requirement_parser = RequirementParser(spack.config.CONFIG) self.possible_virtuals: Set[str] = set() self.assumptions: List[Tuple["clingo.Symbol", bool]] = [] # type: ignore[name-defined] @@ -1332,8 +1310,7 @@ def compiler_facts(self): self.gen.newline() def package_requirement_rules(self, pkg): - parser = RequirementParser(spack.config.CONFIG) - self.emit_facts_from_requirement_rules(parser.rules(pkg)) + self.emit_facts_from_requirement_rules(self.requirement_parser.rules(pkg)) def pkg_rules(self, pkg, tests): pkg = self.pkg_class(pkg) @@ -1811,9 +1788,8 @@ def provider_defaults(self): def provider_requirements(self): self.gen.h2("Requirements on virtual providers") - parser = RequirementParser(spack.config.CONFIG) for virtual_str in sorted(self.possible_virtuals): - rules = parser.rules_from_virtual(virtual_str) + rules = self.requirement_parser.rules_from_virtual(virtual_str) if rules: self.emit_facts_from_requirement_rules(rules) self.trigger_rules() @@ -3088,202 +3064,6 @@ def value(self) -> str: return "".join(self.asp_problem) -def parse_spec_from_yaml_string(string: str) -> "spack.spec.Spec": - """Parse a spec from YAML and add file/line info to errors, if it's available. - - Parse a ``Spec`` from the supplied string, but also intercept any syntax errors and - add file/line information for debugging using file/line annotations from the string. - - Arguments: - string: a string representing a ``Spec`` from config YAML. - - """ - try: - return spack.spec.Spec(string) - except SpecSyntaxError as e: - mark = get_mark_from_yaml_data(string) - if mark: - msg = f"{mark.name}:{mark.line + 1}: {str(e)}" - raise SpecSyntaxError(msg) from e - raise e - - -class RequirementParser: - """Parses requirements from package.py files and configuration, and returns rules.""" - - def __init__(self, configuration): - self.config = configuration - - def rules(self, pkg: "spack.package_base.PackageBase") -> List[RequirementRule]: - result = [] - result.extend(self.rules_from_package_py(pkg)) - result.extend(self.rules_from_require(pkg)) - result.extend(self.rules_from_prefer(pkg)) - result.extend(self.rules_from_conflict(pkg)) - return result - - def rules_from_package_py(self, pkg) -> List[RequirementRule]: - rules = [] - for when_spec, requirement_list in pkg.requirements.items(): - for requirements, policy, message in requirement_list: - rules.append( - RequirementRule( - pkg_name=pkg.name, - policy=policy, - requirements=requirements, - kind=RequirementKind.PACKAGE, - condition=when_spec, - message=message, - ) - ) - return rules - - def rules_from_virtual(self, virtual_str: str) -> List[RequirementRule]: - requirements = self.config.get("packages", {}).get(virtual_str, {}).get("require", []) - return self._rules_from_requirements( - virtual_str, requirements, kind=RequirementKind.VIRTUAL - ) - - def rules_from_require(self, pkg: "spack.package_base.PackageBase") -> List[RequirementRule]: - kind, requirements = self._raw_yaml_data(pkg, section="require") - return self._rules_from_requirements(pkg.name, requirements, kind=kind) - - def rules_from_prefer(self, pkg: "spack.package_base.PackageBase") -> List[RequirementRule]: - result = [] - kind, preferences = self._raw_yaml_data(pkg, section="prefer") - for item in preferences: - spec, condition, message = self._parse_prefer_conflict_item(item) - result.append( - # A strong preference is defined as: - # - # require: - # - any_of: [spec_str, "@:"] - RequirementRule( - pkg_name=pkg.name, - policy="any_of", - requirements=[spec, spack.spec.Spec("@:")], - kind=kind, - message=message, - condition=condition, - ) - ) - return result - - def rules_from_conflict(self, pkg: "spack.package_base.PackageBase") -> List[RequirementRule]: - result = [] - kind, conflicts = self._raw_yaml_data(pkg, section="conflict") - for item in conflicts: - spec, condition, message = self._parse_prefer_conflict_item(item) - result.append( - # A conflict is defined as: - # - # require: - # - one_of: [spec_str, "@:"] - RequirementRule( - pkg_name=pkg.name, - policy="one_of", - requirements=[spec, spack.spec.Spec("@:")], - kind=kind, - message=message, - condition=condition, - ) - ) - return result - - def _parse_prefer_conflict_item(self, item): - # The item is either a string or an object with at least a "spec" attribute - if isinstance(item, str): - spec = parse_spec_from_yaml_string(item) - condition = spack.spec.Spec() - message = None - else: - spec = parse_spec_from_yaml_string(item["spec"]) - condition = spack.spec.Spec(item.get("when")) - message = item.get("message") - return spec, condition, message - - def _raw_yaml_data(self, pkg: "spack.package_base.PackageBase", *, section: str): - config = self.config.get("packages") - data = config.get(pkg.name, {}).get(section, []) - kind = RequirementKind.PACKAGE - if not data: - data = config.get("all", {}).get(section, []) - kind = RequirementKind.DEFAULT - return kind, data - - def _rules_from_requirements( - self, pkg_name: str, requirements, *, kind: RequirementKind - ) -> List[RequirementRule]: - """Manipulate requirements from packages.yaml, and return a list of tuples - with a uniform structure (name, policy, requirements). - """ - if isinstance(requirements, str): - requirements = [requirements] - - rules = [] - for requirement in requirements: - # A string is equivalent to a one_of group with a single element - if isinstance(requirement, str): - requirement = {"one_of": [requirement]} - - for policy in ("spec", "one_of", "any_of"): - if policy not in requirement: - continue - - constraints = requirement[policy] - # "spec" is for specifying a single spec - if policy == "spec": - constraints = [constraints] - policy = "one_of" - - # validate specs from YAML first, and fail with line numbers if parsing fails. - constraints = [ - parse_spec_from_yaml_string(constraint) for constraint in constraints - ] - when_str = requirement.get("when") - when = parse_spec_from_yaml_string(when_str) if when_str else spack.spec.Spec() - - constraints = [ - x - for x in constraints - if not self.reject_requirement_constraint(pkg_name, constraint=x, kind=kind) - ] - if not constraints: - continue - - rules.append( - RequirementRule( - pkg_name=pkg_name, - policy=policy, - requirements=constraints, - kind=kind, - message=requirement.get("message"), - condition=when, - ) - ) - return rules - - def reject_requirement_constraint( - self, pkg_name: str, *, constraint: spack.spec.Spec, kind: RequirementKind - ) -> bool: - """Returns True if a requirement constraint should be rejected""" - if kind == RequirementKind.DEFAULT: - # Requirements under all: are applied only if they are satisfiable considering only - # package rules, so e.g. variants must exist etc. Otherwise, they are rejected. - try: - s = spack.spec.Spec(pkg_name) - s.constrain(constraint) - s.validate_or_raise() - except spack.error.SpackError as e: - tty.debug( - f"[SETUP] Rejecting the default '{constraint}' requirement " - f"on '{pkg_name}': {str(e)}", - level=2, - ) - return True - return False - - class CompilerParser: """Parses configuration files, and builds a list of possible compilers for the solve.""" diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp index 9bb237754e1d88..ebcffa784d16e4 100644 --- a/lib/spack/spack/solver/concretize.lp +++ b/lib/spack/spack/solver/concretize.lp @@ -1003,6 +1003,8 @@ variant_default_not_used(node(ID, Package), Variant, Value) node_has_variant(node(ID, Package), Variant, _), not attr("variant_value", node(ID, Package), Variant, Value), not propagate(node(ID, Package), variant_value(Variant, _, _)), + % variant set explicitly don't count for this metric + not attr("variant_set", node(ID, Package), Variant, _), attr("node", node(ID, Package)). % The variant is set in an external spec diff --git a/lib/spack/spack/solver/requirements.py b/lib/spack/spack/solver/requirements.py new file mode 100644 index 00000000000000..412f4c22cddc24 --- /dev/null +++ b/lib/spack/spack/solver/requirements.py @@ -0,0 +1,232 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) +import enum +from typing import List, NamedTuple, Optional, Sequence + +from llnl.util import tty + +import spack.config +import spack.error +import spack.package_base +import spack.spec +from spack.config import get_mark_from_yaml_data + + +class RequirementKind(enum.Enum): + """Purpose / provenance of a requirement""" + + #: Default requirement expressed under the 'all' attribute of packages.yaml + DEFAULT = enum.auto() + #: Requirement expressed on a virtual package + VIRTUAL = enum.auto() + #: Requirement expressed on a specific package + PACKAGE = enum.auto() + + +class RequirementRule(NamedTuple): + """Data class to collect information on a requirement""" + + pkg_name: str + policy: str + requirements: Sequence[spack.spec.Spec] + condition: spack.spec.Spec + kind: RequirementKind + message: Optional[str] + + +class RequirementParser: + """Parses requirements from package.py files and configuration, and returns rules.""" + + def __init__(self, configuration: spack.config.Configuration): + self.config = configuration + + def rules(self, pkg: spack.package_base.PackageBase) -> List[RequirementRule]: + result = [] + result.extend(self.rules_from_package_py(pkg)) + result.extend(self.rules_from_require(pkg)) + result.extend(self.rules_from_prefer(pkg)) + result.extend(self.rules_from_conflict(pkg)) + return result + + def rules_from_package_py(self, pkg: spack.package_base.PackageBase) -> List[RequirementRule]: + rules = [] + for when_spec, requirement_list in pkg.requirements.items(): + for requirements, policy, message in requirement_list: + rules.append( + RequirementRule( + pkg_name=pkg.name, + policy=policy, + requirements=requirements, + kind=RequirementKind.PACKAGE, + condition=when_spec, + message=message, + ) + ) + return rules + + def rules_from_virtual(self, virtual_str: str) -> List[RequirementRule]: + requirements = self.config.get("packages", {}).get(virtual_str, {}).get("require", []) + return self._rules_from_requirements( + virtual_str, requirements, kind=RequirementKind.VIRTUAL + ) + + def rules_from_require(self, pkg: spack.package_base.PackageBase) -> List[RequirementRule]: + kind, requirements = self._raw_yaml_data(pkg, section="require") + return self._rules_from_requirements(pkg.name, requirements, kind=kind) + + def rules_from_prefer(self, pkg: spack.package_base.PackageBase) -> List[RequirementRule]: + result = [] + kind, preferences = self._raw_yaml_data(pkg, section="prefer") + for item in preferences: + spec, condition, message = self._parse_prefer_conflict_item(item) + result.append( + # A strong preference is defined as: + # + # require: + # - any_of: [spec_str, "@:"] + RequirementRule( + pkg_name=pkg.name, + policy="any_of", + requirements=[spec, spack.spec.Spec("@:")], + kind=kind, + message=message, + condition=condition, + ) + ) + return result + + def rules_from_conflict(self, pkg: spack.package_base.PackageBase) -> List[RequirementRule]: + result = [] + kind, conflicts = self._raw_yaml_data(pkg, section="conflict") + for item in conflicts: + spec, condition, message = self._parse_prefer_conflict_item(item) + result.append( + # A conflict is defined as: + # + # require: + # - one_of: [spec_str, "@:"] + RequirementRule( + pkg_name=pkg.name, + policy="one_of", + requirements=[spec, spack.spec.Spec("@:")], + kind=kind, + message=message, + condition=condition, + ) + ) + return result + + def _parse_prefer_conflict_item(self, item): + # The item is either a string or an object with at least a "spec" attribute + if isinstance(item, str): + spec = parse_spec_from_yaml_string(item) + condition = spack.spec.Spec() + message = None + else: + spec = parse_spec_from_yaml_string(item["spec"]) + condition = spack.spec.Spec(item.get("when")) + message = item.get("message") + return spec, condition, message + + def _raw_yaml_data(self, pkg: spack.package_base.PackageBase, *, section: str): + config = self.config.get("packages") + data = config.get(pkg.name, {}).get(section, []) + kind = RequirementKind.PACKAGE + if not data: + data = config.get("all", {}).get(section, []) + kind = RequirementKind.DEFAULT + return kind, data + + def _rules_from_requirements( + self, pkg_name: str, requirements, *, kind: RequirementKind + ) -> List[RequirementRule]: + """Manipulate requirements from packages.yaml, and return a list of tuples + with a uniform structure (name, policy, requirements). + """ + if isinstance(requirements, str): + requirements = [requirements] + + rules = [] + for requirement in requirements: + # A string is equivalent to a one_of group with a single element + if isinstance(requirement, str): + requirement = {"one_of": [requirement]} + + for policy in ("spec", "one_of", "any_of"): + if policy not in requirement: + continue + + constraints = requirement[policy] + # "spec" is for specifying a single spec + if policy == "spec": + constraints = [constraints] + policy = "one_of" + + # validate specs from YAML first, and fail with line numbers if parsing fails. + constraints = [ + parse_spec_from_yaml_string(constraint) for constraint in constraints + ] + when_str = requirement.get("when") + when = parse_spec_from_yaml_string(when_str) if when_str else spack.spec.Spec() + + constraints = [ + x + for x in constraints + if not self.reject_requirement_constraint(pkg_name, constraint=x, kind=kind) + ] + if not constraints: + continue + + rules.append( + RequirementRule( + pkg_name=pkg_name, + policy=policy, + requirements=constraints, + kind=kind, + message=requirement.get("message"), + condition=when, + ) + ) + return rules + + def reject_requirement_constraint( + self, pkg_name: str, *, constraint: spack.spec.Spec, kind: RequirementKind + ) -> bool: + """Returns True if a requirement constraint should be rejected""" + if kind == RequirementKind.DEFAULT: + # Requirements under all: are applied only if they are satisfiable considering only + # package rules, so e.g. variants must exist etc. Otherwise, they are rejected. + try: + s = spack.spec.Spec(pkg_name) + s.constrain(constraint) + s.validate_or_raise() + except spack.error.SpackError as e: + tty.debug( + f"[SETUP] Rejecting the default '{constraint}' requirement " + f"on '{pkg_name}': {str(e)}", + level=2, + ) + return True + return False + + +def parse_spec_from_yaml_string(string: str) -> spack.spec.Spec: + """Parse a spec from YAML and add file/line info to errors, if it's available. + + Parse a ``Spec`` from the supplied string, but also intercept any syntax errors and + add file/line information for debugging using file/line annotations from the string. + + Arguments: + string: a string representing a ``Spec`` from config YAML. + + """ + try: + return spack.spec.Spec(string) + except spack.error.SpecSyntaxError as e: + mark = get_mark_from_yaml_data(string) + if mark: + msg = f"{mark.name}:{mark.line + 1}: {str(e)}" + raise spack.error.SpecSyntaxError(msg) from e + raise e From 901cea7a54afac0c5258bd513f174be2a9452538 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 5 Dec 2024 10:14:57 -0700 Subject: [PATCH 12/69] Add conflict for pixman with Intel Classic (#47922) --- var/spack/repos/builtin/packages/pixman/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/pixman/package.py b/var/spack/repos/builtin/packages/pixman/package.py index 638496d50fab05..d4323eb4695f26 100644 --- a/var/spack/repos/builtin/packages/pixman/package.py +++ b/var/spack/repos/builtin/packages/pixman/package.py @@ -35,6 +35,9 @@ class Pixman(AutotoolsPackage, MesonPackage): default="meson", ) + # https://github.com/spack/spack/issues/47917 + conflicts("%intel") + depends_on("c", type="build") with when("build_system=meson"): depends_on("meson@0.52:", type="build") From 112e47cc2367b888f7cd09fe37973b1843d67984 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 5 Dec 2024 20:06:41 +0100 Subject: [PATCH 13/69] Don't inject import statements in package recipes Remove a hack done by RepoLoader, which was injecting an extra ``` from spack.package import * ``` at the beginning of each package.py --- lib/spack/spack/repo.py | 40 +------------------ lib/spack/spack/test/cmd/diff.py | 12 ++++++ lib/spack/spack/test/cmd/find.py | 10 +++++ lib/spack/spack/test/concretization/core.py | 4 ++ lib/spack/spack/test/directives.py | 4 ++ .../templates/mock-repository/package.pyt | 2 + 6 files changed, 34 insertions(+), 38 deletions(-) diff --git a/lib/spack/spack/repo.py b/lib/spack/spack/repo.py index f3872aed8d1d1f..c4a104c6b98008 100644 --- a/lib/spack/spack/repo.py +++ b/lib/spack/spack/repo.py @@ -81,43 +81,6 @@ def namespace_from_fullname(fullname): return namespace -class _PrependFileLoader(importlib.machinery.SourceFileLoader): - def __init__(self, fullname, path, prepend=None): - super(_PrependFileLoader, self).__init__(fullname, path) - self.prepend = prepend - - def path_stats(self, path): - stats = super(_PrependFileLoader, self).path_stats(path) - if self.prepend: - stats["size"] += len(self.prepend) + 1 - return stats - - def get_data(self, path): - data = super(_PrependFileLoader, self).get_data(path) - if path != self.path or self.prepend is None: - return data - else: - return self.prepend.encode() + b"\n" + data - - -class RepoLoader(_PrependFileLoader): - """Loads a Python module associated with a package in specific repository""" - - #: Code in ``_package_prepend`` is prepended to imported packages. - #: - #: Spack packages are expected to call `from spack.package import *` - #: themselves, but we are allowing a deprecation period before breaking - #: external repos that don't do this yet. - _package_prepend = "from spack.package import *" - - def __init__(self, fullname, repo, package_name): - self.repo = repo - self.package_name = package_name - self.package_py = repo.filename_for_package_name(package_name) - self.fullname = fullname - super().__init__(self.fullname, self.package_py, prepend=self._package_prepend) - - class SpackNamespaceLoader: def create_module(self, spec): return SpackNamespace(spec.name) @@ -187,7 +150,8 @@ def compute_loader(self, fullname): # With 2 nested conditionals we can call "repo.real_name" only once package_name = repo.real_name(module_name) if package_name: - return RepoLoader(fullname, repo, package_name) + module_path = repo.filename_for_package_name(package_name) + return importlib.machinery.SourceFileLoader(fullname, module_path) # We are importing a full namespace like 'spack.pkg.builtin' if fullname == repo.full_namespace: diff --git a/lib/spack/spack/test/cmd/diff.py b/lib/spack/spack/test/cmd/diff.py index e352ce1352bcc1..125a6462535acf 100644 --- a/lib/spack/spack/test/cmd/diff.py +++ b/lib/spack/spack/test/cmd/diff.py @@ -20,6 +20,8 @@ _p1 = ( "p1", """\ +from spack.package import * + class P1(Package): version("1.0") @@ -35,6 +37,8 @@ class P1(Package): _p2 = ( "p2", """\ +from spack.package import * + class P2(Package): version("1.0") @@ -48,6 +52,8 @@ class P2(Package): _p3 = ( "p3", """\ +from spack.package import * + class P3(Package): version("1.0") @@ -58,6 +64,8 @@ class P3(Package): _i1 = ( "i1", """\ +from spack.package import * + class I1(Package): version("1.0") @@ -73,6 +81,8 @@ class I1(Package): _i2 = ( "i2", """\ +from spack.package import * + class I2(Package): version("1.0") @@ -89,6 +99,8 @@ class I2(Package): _p4 = ( "p4", """\ +from spack.package import * + class P4(Package): version("1.0") diff --git a/lib/spack/spack/test/cmd/find.py b/lib/spack/spack/test/cmd/find.py index 5398dff46918d4..656ddac442e218 100644 --- a/lib/spack/spack/test/cmd/find.py +++ b/lib/spack/spack/test/cmd/find.py @@ -462,6 +462,8 @@ def test_environment_with_version_range_in_compiler_doesnt_fail(tmp_path): _pkga = ( "a0", """\ +from spack.package import * + class A0(Package): version("1.2") version("1.1") @@ -475,6 +477,8 @@ class A0(Package): _pkgb = ( "b0", """\ +from spack.package import * + class B0(Package): version("1.2") version("1.1") @@ -485,6 +489,8 @@ class B0(Package): _pkgc = ( "c0", """\ +from spack.package import * + class C0(Package): version("1.2") version("1.1") @@ -497,6 +503,8 @@ class C0(Package): _pkgd = ( "d0", """\ +from spack.package import * + class D0(Package): version("1.2") version("1.1") @@ -510,6 +518,8 @@ class D0(Package): _pkge = ( "e0", """\ +from spack.package import * + class E0(Package): tags = ["tag1", "tag2"] diff --git a/lib/spack/spack/test/concretization/core.py b/lib/spack/spack/test/concretization/core.py index e33f9761dad728..8f136d46a4a7ff 100644 --- a/lib/spack/spack/test/concretization/core.py +++ b/lib/spack/spack/test/concretization/core.py @@ -188,6 +188,8 @@ def repo_with_changing_recipe(tmp_path_factory, mutable_mock_repo): packages_dir = repo_dir / "packages" root_pkg_str = """ +from spack.package import * + class Root(Package): homepage = "http://www.example.com" url = "http://www.example.com/root-1.0.tar.gz" @@ -202,6 +204,8 @@ class Root(Package): package_py.write_text(root_pkg_str) changing_template = """ +from spack.package import * + class Changing(Package): homepage = "http://www.example.com" url = "http://www.example.com/changing-1.0.tar.gz" diff --git a/lib/spack/spack/test/directives.py b/lib/spack/spack/test/directives.py index fb75b2c0ed60be..6b38b282f43c58 100644 --- a/lib/spack/spack/test/directives.py +++ b/lib/spack/spack/test/directives.py @@ -148,6 +148,8 @@ def test_version_type_validation(): _pkgx = ( "x", """\ +from spack.package import * + class X(Package): version("1.3") version("1.2") @@ -166,6 +168,8 @@ class X(Package): _pkgy = ( "y", """\ +from spack.package import * + class Y(Package): version("2.1") version("2.0") diff --git a/share/spack/templates/mock-repository/package.pyt b/share/spack/templates/mock-repository/package.pyt index 82bd50bd053a8e..a4a52ec700c62e 100644 --- a/share/spack/templates/mock-repository/package.pyt +++ b/share/spack/templates/mock-repository/package.pyt @@ -1,3 +1,5 @@ +from spack.package import * + class {{ cls_name }}(Package): homepage = "http://www.example.com" url = "http://www.example.com/root-1.0.tar.gz" From b808338792f7e3f45436fe62df86e87e9c0661aa Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 5 Dec 2024 19:20:55 -0700 Subject: [PATCH 14/69] py-uxarray: new package plus dependencies (#47573) * Add py-param@2.1.1 * Add py-panel@1.5.2 * Add py-bokeh@3.5.2 * New package py-datashader * New package py-geoviews * New package py-holoviews * WIP: new package py-uxarray * New package py-antimeridian * New package py-dask-expr * New package py-spatialpandas * New package py-hvplot * Add dependency on py-dask-expr for 'py-dask@2024.3: +dataframe' * Added all dependencies for py-uxarray; still having problems with py-dask +dataframe / py-dask-expr * Fix style errors in many packages * Clean up comments and fix style errors in var/spack/repos/builtin/packages/py-dask-expr/package.py * In var/spack/repos/builtin/packages/py-dask/package.py: since 2023.8, the dataframe variant requires the array variant * Fix style errors in py-uxarray package --- .../packages/py-antimeridian/package.py | 24 ++++++++ .../builtin/packages/py-bokeh/package.py | 4 ++ .../builtin/packages/py-dask-expr/package.py | 26 +++++++++ .../repos/builtin/packages/py-dask/package.py | 5 ++ .../builtin/packages/py-datashader/package.py | 39 +++++++++++++ .../builtin/packages/py-geoviews/package.py | 34 +++++++++++ .../builtin/packages/py-holoviews/package.py | 32 +++++++++++ .../builtin/packages/py-hvplot/package.py | 31 ++++++++++ .../builtin/packages/py-panel/package.py | 49 ++++++++++++---- .../builtin/packages/py-param/package.py | 10 +++- .../packages/py-spatialpandas/package.py | 31 ++++++++++ .../builtin/packages/py-uxarray/package.py | 56 +++++++++++++++++++ 12 files changed, 328 insertions(+), 13 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-antimeridian/package.py create mode 100644 var/spack/repos/builtin/packages/py-dask-expr/package.py create mode 100644 var/spack/repos/builtin/packages/py-datashader/package.py create mode 100644 var/spack/repos/builtin/packages/py-geoviews/package.py create mode 100644 var/spack/repos/builtin/packages/py-holoviews/package.py create mode 100644 var/spack/repos/builtin/packages/py-hvplot/package.py create mode 100644 var/spack/repos/builtin/packages/py-spatialpandas/package.py create mode 100644 var/spack/repos/builtin/packages/py-uxarray/package.py diff --git a/var/spack/repos/builtin/packages/py-antimeridian/package.py b/var/spack/repos/builtin/packages/py-antimeridian/package.py new file mode 100644 index 00000000000000..31b2d20308d1c8 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-antimeridian/package.py @@ -0,0 +1,24 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PyAntimeridian(PythonPackage): + """Fix shapes that cross the antimeridian.""" + + homepage = "https://antimeridian.readthedocs.io/" + pypi = "antimeridian/antimeridian-0.3.11.tar.gz" + git = "https://github.com/gadomski/antimeridian.git" + + license("Apache-2.0") + + version("0.3.11", sha256="fde0134e6799676ec68765d3e588f5f32cabd4041b1f969b923758d0a6cd0c7f") + + depends_on("python@3.10:", type=("build", "run")) + depends_on("py-hatchling", type="build") + + depends_on("py-numpy@1.22.4:", type="run") + depends_on("py-shapely@2:", type="run") diff --git a/var/spack/repos/builtin/packages/py-bokeh/package.py b/var/spack/repos/builtin/packages/py-bokeh/package.py index 1384201b2dbe76..429dfd8ddffd02 100644 --- a/var/spack/repos/builtin/packages/py-bokeh/package.py +++ b/var/spack/repos/builtin/packages/py-bokeh/package.py @@ -14,6 +14,7 @@ class PyBokeh(PythonPackage): license("BSD-3-Clause") + version("3.5.2", sha256="03a54a67db677b8881834271c620a781b383ae593af5c3ea2149164754440d07") version("3.3.1", sha256="2a7b3702d7e9f03ef4cd801b02b7380196c70cff2773859bcb84fa565218955c") version("2.4.3", sha256="ef33801161af379665ab7a34684f2209861e3aefd5c803a21fbbb99d94874b03") version("2.4.1", sha256="d0410717d743a0ac251e62480e2ea860a7341bdcd1dbe01499a904f233c90512") @@ -33,6 +34,7 @@ class PyBokeh(PythonPackage): depends_on("python@3.7:", type=("build", "run"), when="@2.4.0:") depends_on("python@3.8:", type=("build", "run"), when="@3.0.0:") depends_on("python@3.9:", type=("build", "run"), when="@3.2.0:") + depends_on("python@3.10:", type=("build", "run"), when="@3.5.0:") depends_on("py-requests@1.2.3:", type=("build", "run"), when="@0.12.2") depends_on("py-six@1.5.2:", type=("build", "run"), when="@:1.3.4") @@ -42,6 +44,7 @@ class PyBokeh(PythonPackage): depends_on("py-jinja2@2.9:", type=("build", "run"), when="@2.3.3:") depends_on("py-contourpy@1:", type=("build", "run"), when="@3:") + depends_on("py-contourpy@1.2:", type=("build", "run"), when="@3.5:") depends_on("py-numpy@1.7.1:", type=("build", "run")) depends_on("py-numpy@1.11.3:", type=("build", "run"), when="@2.3.3:") @@ -60,6 +63,7 @@ class PyBokeh(PythonPackage): depends_on("py-tornado@4.3:", type=("build", "run")) depends_on("py-tornado@5.1:", type=("build", "run"), when="@2.3.3:") + depends_on("py-tornado@6.2:", type=("build", "run"), when="@3.5:") depends_on("py-typing-extensions@3.7.4:", type=("build", "run"), when="@2.3.3:3.0.0") depends_on("py-typing-extensions@3.10.0:", type=("build", "run"), when="@2.4.0:3.0.0") diff --git a/var/spack/repos/builtin/packages/py-dask-expr/package.py b/var/spack/repos/builtin/packages/py-dask-expr/package.py new file mode 100644 index 00000000000000..bed0fe2010aeb2 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-dask-expr/package.py @@ -0,0 +1,26 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PyDaskExpr(PythonPackage): + """Dask DataFrames with query optimization.""" + + homepage = "https://github.com/dask/dask-expr" + url = "https://github.com/dask/dask-expr/archive/refs/tags/v1.1.9.tar.gz" + + license("BSD-3-Clause") + + version("1.1.9", sha256="e5a1b82de1142c29fed899a80541a98ca5e12cb85ce9d86bc8ada204a22599d3") + + depends_on("python@3.10:", type=("build", "run")) + depends_on("py-setuptools@62.6:", type="build") + depends_on("py-versioneer@0.28+toml", type="build") + + # Can't do circular run-time dependencies yet? + # depends_on("py-dask@2024.7.1", type="run") + depends_on("py-pyarrow@7: +dataset", type="run") + depends_on("py-pandas@2:", type="run") diff --git a/var/spack/repos/builtin/packages/py-dask/package.py b/var/spack/repos/builtin/packages/py-dask/package.py index d117823869af28..8783a8b8b8df50 100644 --- a/var/spack/repos/builtin/packages/py-dask/package.py +++ b/var/spack/repos/builtin/packages/py-dask/package.py @@ -38,6 +38,8 @@ class PyDask(PythonPackage): description="Install requirements for dask.delayed (dask.imperative)", ) + conflicts("~array", when="@2023.8: +dataframe", msg="From 2023.8, +dataframe requires +array") + depends_on("python@3.8:", type=("build", "run"), when="@2022.10.2:") depends_on("py-setuptools", type="build") @@ -99,6 +101,9 @@ class PyDask(PythonPackage): depends_on("py-partd@0.3.10:", type=("build", "run"), when="@:2021.3.0 +dataframe") # The dependency on py-fsspec is non-optional starting version 2021.3.1 depends_on("py-fsspec@0.6.0:", type=("build", "run"), when="@:2021.3.0 +dataframe") + # Starting with version 2024.3.0, dataframe requires a separate package py-dask-expr + depends_on("py-dask-expr", type=("build", "run"), when="@2024.3: +dataframe") + depends_on("py-dask-expr@1.1.9", type=("build", "run"), when="@2024.7.1 +dataframe") # Requirements for dask.distributed depends_on( diff --git a/var/spack/repos/builtin/packages/py-datashader/package.py b/var/spack/repos/builtin/packages/py-datashader/package.py new file mode 100644 index 00000000000000..6b87b7c407a5c4 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-datashader/package.py @@ -0,0 +1,39 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PyDatashader(PythonPackage): + """Datashader is a data rasterization pipeline for automating the process of creating + meaningful representations of large amounts of data""" + + homepage = "https://datashader.org" + pypi = "datashader/datashader-0.16.3.tar.gz" + git = "https://github.com/holoviz/datashader.git" + + license("BSD-3-Clause", checked_by="climbfuji") + + version("0.16.3", sha256="9d0040c7887f7a5a5edd374c297402fd208a62bf6845e87631b54f03b9ae479d") + + # pyproject.toml + depends_on("python@3.9:", type=("build", "run")) + depends_on("py-pyct", type=("build", "run")) + depends_on("py-hatchling", type="build") + depends_on("py-hatch-vcs", type="build") + depends_on("py-param", type=("build", "run")) + + depends_on("py-colorcet", type="run") + depends_on("py-dask", type="run") + depends_on("py-multipledispatch", type="run") + depends_on("py-numba", type="run") + depends_on("py-numpy", type="run") + depends_on("py-packaging", type="run") + depends_on("py-pandas", type="run") + depends_on("py-pillow", type="run") + depends_on("py-requests", type="run") + depends_on("py-scipy", type="run") + depends_on("py-toolz", type="run") + depends_on("py-xarray", type="run") diff --git a/var/spack/repos/builtin/packages/py-geoviews/package.py b/var/spack/repos/builtin/packages/py-geoviews/package.py new file mode 100644 index 00000000000000..03c2b7fb4da96e --- /dev/null +++ b/var/spack/repos/builtin/packages/py-geoviews/package.py @@ -0,0 +1,34 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PyGeoviews(PythonPackage): + """A Python library designed to make data analysis and visualization seamless and simple.""" + + homepage = "https://geoviews.org/" + pypi = "geoviews/geoviews-1.13.0.tar.gz" + git = "https://github.com/holoviz/geoviews.git" + + license("BSD-3-Clause", checked_by="climbfuji") + + version("1.13.0", sha256="7554a1e9114995acd243546fac6c6c7f157fc28529fde6ab236a72a6e77fe0bf") + # version("1.12.0", sha256="e2cbef0605e8fd1529bc643a31aeb61997f8f93c9b41a5aff8b2b355a76fa789") + + depends_on("python@3.10:", type=("build", "run")) + depends_on("py-hatchling", type="build") + depends_on("py-hatch-vcs", type="build") + depends_on("py-bokeh@3.5", type=("build", "run")) + + depends_on("py-cartopy@0.18:", type="run") + depends_on("py-holoviews@1.16:", type="run") + depends_on("py-numpy", type="run") + depends_on("py-packaging", type="run") + depends_on("py-panel@1:", type="run") + depends_on("py-param", type="run") + depends_on("py-pyproj", type="run") + depends_on("py-shapely", type="run") + depends_on("py-xyzservices", type="run") diff --git a/var/spack/repos/builtin/packages/py-holoviews/package.py b/var/spack/repos/builtin/packages/py-holoviews/package.py new file mode 100644 index 00000000000000..428fdae648d13c --- /dev/null +++ b/var/spack/repos/builtin/packages/py-holoviews/package.py @@ -0,0 +1,32 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PyHoloviews(PythonPackage): + """A Python library designed to make data analysis and visualization seamless and simple.""" + + homepage = "https://holoviews.org/" + pypi = "holoviews/holoviews-1.19.1.tar.gz" + git = "https://github.com/holoviz/holoviews.git" + + license("BSD-3-Clause", checked_by="climbfuji") + + version("1.19.1", sha256="b9e85e8c07275a456c0ef8d06bc157d02b37eff66fb3602aa12f5c86f084865c") + # version("1.19.0", sha256="cab1522f75a9b46377f9364b675befd79812e220059714470a58e21475d531ba") + + depends_on("python@3.9:", type=("build", "run")) + depends_on("py-hatchling", type="build") + depends_on("py-hatch-vcs", type="build") + + depends_on("py-bokeh@3.1:", type="run") + depends_on("py-colorcet", type="run") + depends_on("py-numpy@1.21:", type="run") + depends_on("py-packaging", type="run") + depends_on("py-pandas@1.3:", type="run") + depends_on("py-panel@1:", type="run") + depends_on("py-param@2", type="run") + depends_on("py-pyviz-comms@2.1:", type="run") diff --git a/var/spack/repos/builtin/packages/py-hvplot/package.py b/var/spack/repos/builtin/packages/py-hvplot/package.py new file mode 100644 index 00000000000000..291d38723c6605 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-hvplot/package.py @@ -0,0 +1,31 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PyHvplot(PythonPackage): + """A high-level plotting API for pandas, dask, xarray, and networkx built on HoloViews.""" + + homepage = "https://hvplot.holoviz.org/" + pypi = "hvplot/hvplot-1.19.1.tar.gz" + git = "http://github.com/holoviz/hvplot.git" + + license("BSD-3-Clause", checked_by="climbfuji") + + version("0.11.1", sha256="989ed0389189adc47edcd2601d2eab18bf366e74b07f5e2873e021323c4a14bb") + + depends_on("python@3.9:", type=("build", "run")) + depends_on("py-setuptools@30.3:", type="build") + depends_on("py-setuptools-scm@6:", type="build") + + depends_on("py-bokeh@3.1:", type="run") + depends_on("py-colorcet", type="run") + depends_on("py-holoviews@1.19:", type="run") + depends_on("py-numpy@1.21:", type="run") + depends_on("py-packaging", type="run") + depends_on("py-pandas@1.3:", type="run") + depends_on("py-panel@1:", type="run") + depends_on("py-param@1.12:2", type="run") diff --git a/var/spack/repos/builtin/packages/py-panel/package.py b/var/spack/repos/builtin/packages/py-panel/package.py index 4444026be7f50d..4108967c02a6af 100644 --- a/var/spack/repos/builtin/packages/py-panel/package.py +++ b/var/spack/repos/builtin/packages/py-panel/package.py @@ -14,16 +14,43 @@ class PyPanel(PythonPackage): license("BSD-3-Clause") + version("1.5.2", sha256="30a45f314716bdde2de5c002fbd3a0b4d6ff85459e2179284df559455ff1534b") version("0.14.4", sha256="b853d2f53d7738ec6372525360c5bf9427a71ed990685ccac703bc9b442e9951") - depends_on("py-param@1.12:", type=("build", "run")) - depends_on("py-pyct@0.4.4:", type=("build", "run")) - depends_on("py-setuptools@42:", type=("build", "run")) - depends_on("py-bokeh@2.4.3:2.4", type=("build", "run")) - depends_on("py-pyviz-comms@0.7.4:", type=("build", "run")) - depends_on("py-requests", type=("build", "run")) - depends_on("py-bleach", type=("build", "run")) - depends_on("py-packaging", type="build") - depends_on("py-tqdm@4.48:", type=("build", "run")) - depends_on("py-markdown", type=("build", "run")) - depends_on("py-typing-extensions", type=("build", "run")) + with when("@0.14.4"): + depends_on("py-param@1.12:", type=("build", "run")) + depends_on("py-pyct@0.4.4:", type=("build", "run")) + depends_on("py-setuptools@42:", type=("build", "run")) + depends_on("py-bokeh@2.4.3:2.4", type=("build", "run")) + depends_on("py-pyviz-comms@0.7.4:", type=("build", "run")) + depends_on("py-requests", type=("build", "run")) + depends_on("py-bleach", type=("build", "run")) + depends_on("py-packaging", type="build") + depends_on("py-tqdm@4.48:", type=("build", "run")) + depends_on("py-markdown", type=("build", "run")) + depends_on("py-typing-extensions", type=("build", "run")) + + with when("@1.5.2"): + depends_on("python@3.10:", type=("build", "run")) + depends_on("py-hatchling", type="build") + depends_on("py-hatch-vcs", type="build") + depends_on("py-param@2.1:2", type=("build", "run")) + depends_on("py-bokeh@3.5:3.6", type=("build", "run")) + depends_on("py-pyviz-comms@2:", type=("build", "run")) + depends_on("py-requests", type=("build", "run")) + depends_on("py-packaging", type=("build", "run")) + # Version 18 or later are requested by py-panel + depends_on("node-js@18:", type=("build", "run")) + # Version 9 is not requested explicitly, it's + # a guess that the more recent version of node-js + # should go with a more recent version of npm + depends_on("npm@9:", type=("build", "run")) + + depends_on("py-markdown", type="run") + depends_on("py-markdown-it-py", type="run") + depends_on("py-linkify-it-py", type="run") + depends_on("py-mdit-py-plugins", type="run") + depends_on("py-bleach", type="run") + depends_on("py-typing-extensions", type="run") + depends_on("py-pandas@1.2:", type="run") + depends_on("py-tqdm", type="run") diff --git a/var/spack/repos/builtin/packages/py-param/package.py b/var/spack/repos/builtin/packages/py-param/package.py index 840c2279cfa60f..706fcb70325def 100644 --- a/var/spack/repos/builtin/packages/py-param/package.py +++ b/var/spack/repos/builtin/packages/py-param/package.py @@ -19,7 +19,13 @@ class PyParam(PythonPackage): license("BSD-3-Clause") + version("2.1.1", sha256="3b1da14abafa75bfd908572378a58696826b3719a723bc31b40ffff2e9a5c852") version("1.12.0", sha256="35d0281c8e3beb6dd469f46ff0b917752a54bed94d1b0c567346c76d0ff59c4a") - depends_on("python@2.7:", type=("build", "run")) - depends_on("py-setuptools", type="build") + depends_on("python@2.7:", when="@1", type=("build", "run")) + depends_on("python@3.8:", when="@2:", type=("build", "run")) + + depends_on("py-setuptools", when="@1", type="build") + + depends_on("py-hatchling", when="@2", type="build") + depends_on("py-hatch-vcs", when="@2", type="build") diff --git a/var/spack/repos/builtin/packages/py-spatialpandas/package.py b/var/spack/repos/builtin/packages/py-spatialpandas/package.py new file mode 100644 index 00000000000000..307eca5c42e491 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-spatialpandas/package.py @@ -0,0 +1,31 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PySpatialpandas(PythonPackage): + """Pandas extension arrays for spatial/geometric operations.""" + + homepage = "https://holoviz.org/" + pypi = "spatialpandas/spatialpandas-1.19.1.tar.gz" + git = "https://github.com/holoviz/spatialpandas.git" + + license("BSD-2-Clause", checked_by="climbfuji") + + version("0.4.10", sha256="032e24ebb40f75c5c79cb79d7c281f2990e69ba382c0b24acb53da7bba60851c") + + depends_on("python@3.9:", type=("build", "run")) + depends_on("py-hatchling", type="build") + depends_on("py-hatch-vcs", type="build") + depends_on("py-param", type="build") + + depends_on("py-dask", type="run") + depends_on("py-fsspec@2022.8:", type="run") + depends_on("py-numba", type="run") + depends_on("py-packaging", type="run") + depends_on("py-pandas", type="run") + depends_on("py-pyarrow@10:", type="run") + depends_on("py-retrying", type="run") diff --git a/var/spack/repos/builtin/packages/py-uxarray/package.py b/var/spack/repos/builtin/packages/py-uxarray/package.py new file mode 100644 index 00000000000000..06bccff20bc706 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-uxarray/package.py @@ -0,0 +1,56 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PyUxarray(PythonPackage): + """Xarray extension for unstructured climate and global weather data analysis and + visualization""" + + homepage = "https://uxarray.readthedocs.io" + pypi = "uxarray/uxarray-2024.10.0.tar.gz" + git = "https://github.com/uxarray/uxarray.git" + + license("Apache-2.0", checked_by="climbfuji") + + version("2024.10.0", sha256="f65a9920ce085af9a38349dc5ece4f9b83bc015dc8cb738d245d343f7816fd59") + + # Build-time dependencies + depends_on("python@3.9:", type=("build", "run")) + depends_on("py-setuptools@60:", type="build") + depends_on("py-setuptools-scm@8:", type="build") + + # "Minimal" run-time dependencies + depends_on("py-antimeridian", type="run") + depends_on("py-cartopy", type="run") + depends_on("py-datashader", type="run") + depends_on("py-geopandas", type="run") + depends_on("py-geoviews", type="run") + depends_on("py-holoviews", type="run") + depends_on("py-hvplot", type="run") + # With older versions of py-dask (2021.6.2): + # @derived_from(pd.core.strings.StringMethods) + # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + # AttributeError: module 'pandas.core.strings' has no attribute 'StringMethods' + # With py-dask@2023.4.1: + # return get(descriptor, obj, type(obj)) + # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + # TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object + # https://github.com/dask/dask/issues/11038 + depends_on("py-dask@2024.7.1 +dataframe", type="run") + depends_on("py-dask-expr@1.1.9", type="run") + depends_on("py-matplotlib", type="run") + depends_on("py-matplotlib-inline", type="run") + depends_on("py-netcdf4", type="run") + depends_on("py-numba", type="run") + depends_on("py-pandas", type="run") + depends_on("py-pyarrow", type="run") + depends_on("py-pytest", type="run") + depends_on("py-requests", type="run") + depends_on("py-scipy", type="run") + depends_on("py-spatialpandas", type="run") + depends_on("py-scikit-learn", type="run") + depends_on("py-xarray", type="run") From a8da7993adac41f026adf5df134cc128be756663 Mon Sep 17 00:00:00 2001 From: Sreenivasa Murthy Kolam Date: Fri, 6 Dec 2024 08:11:02 +0530 Subject: [PATCH 15/69] Bump up the version for rocm-6.2.4 release (#47707) * Bump up the version for rocm-6.2.4 release --- .../repos/builtin/packages/amdsmi/package.py | 1 + .../builtin/packages/aqlprofile/package.py | 35 +++++++++++++++++++ .../repos/builtin/packages/comgr/package.py | 3 ++ .../packages/composable-kernel/package.py | 2 ++ .../builtin/packages/hip-tensor/package.py | 4 ++- .../repos/builtin/packages/hip/package.py | 13 +++++-- .../repos/builtin/packages/hipblas/package.py | 4 ++- .../builtin/packages/hipblaslt/package.py | 3 +- .../repos/builtin/packages/hipcc/package.py | 1 + .../repos/builtin/packages/hipcub/package.py | 2 ++ .../repos/builtin/packages/hipfft/package.py | 2 ++ .../repos/builtin/packages/hipfort/package.py | 2 ++ .../builtin/packages/hipify-clang/package.py | 5 ++- .../repos/builtin/packages/hiprand/package.py | 2 ++ .../builtin/packages/hipsolver/package.py | 2 ++ .../builtin/packages/hipsparse/package.py | 4 ++- .../builtin/packages/hipsparselt/package.py | 3 +- .../builtin/packages/hsa-rocr-dev/package.py | 7 +++- .../builtin/packages/hsakmt-roct/package.py | 4 ++- .../builtin/packages/llvm-amdgpu/package.py | 4 ++- .../builtin/packages/migraphx/package.py | 4 ++- .../builtin/packages/miopen-hip/package.py | 8 +++-- .../builtin/packages/mivisionx/package.py | 19 +++++++++- .../builtin/packages/omniperf/package.py | 5 +-- .../builtin/packages/omnitrace/package.py | 8 ++++- .../repos/builtin/packages/rccl/package.py | 5 ++- .../repos/builtin/packages/rdc/package.py | 5 ++- .../repos/builtin/packages/rocal/package.py | 3 +- .../builtin/packages/rocalution/package.py | 2 ++ .../repos/builtin/packages/rocblas/package.py | 8 +++-- .../builtin/packages/rocdecode/package.py | 3 +- .../repos/builtin/packages/rocfft/package.py | 2 ++ .../packages/rocm-bandwidth-test/package.py | 5 ++- .../builtin/packages/rocm-cmake/package.py | 4 ++- .../builtin/packages/rocm-core/package.py | 5 +-- .../builtin/packages/rocm-dbgapi/package.py | 5 ++- .../packages/rocm-debug-agent/package.py | 5 ++- .../packages/rocm-device-libs/package.py | 3 ++ .../builtin/packages/rocm-gdb/package.py | 6 +++- .../builtin/packages/rocm-opencl/package.py | 5 ++- .../packages/rocm-openmp-extras/package.py | 12 +++++-- .../builtin/packages/rocm-smi-lib/package.py | 4 ++- .../builtin/packages/rocm-tensile/package.py | 2 ++ .../packages/rocm-validation-suite/package.py | 6 ++-- .../builtin/packages/rocminfo/package.py | 5 ++- .../repos/builtin/packages/rocmlir/package.py | 2 ++ .../repos/builtin/packages/rocprim/package.py | 2 ++ .../packages/rocprofiler-dev/package.py | 18 ++++++++-- .../packages/rocprofiler-register/package.py | 3 +- .../builtin/packages/rocpydecode/package.py | 11 ++++-- .../repos/builtin/packages/rocrand/package.py | 2 ++ .../builtin/packages/rocsolver/package.py | 4 ++- .../builtin/packages/rocsparse/package.py | 4 ++- .../builtin/packages/rocthrust/package.py | 2 ++ .../packages/roctracer-dev-api/package.py | 3 +- .../builtin/packages/roctracer-dev/package.py | 3 ++ .../repos/builtin/packages/rocwmma/package.py | 3 ++ .../repos/builtin/packages/rpp/package.py | 2 ++ 58 files changed, 254 insertions(+), 47 deletions(-) diff --git a/var/spack/repos/builtin/packages/amdsmi/package.py b/var/spack/repos/builtin/packages/amdsmi/package.py index e51e0600328820..64f1402cb3d7bb 100644 --- a/var/spack/repos/builtin/packages/amdsmi/package.py +++ b/var/spack/repos/builtin/packages/amdsmi/package.py @@ -20,6 +20,7 @@ class Amdsmi(CMakePackage): libraries = ["libamd_smi"] license("MIT") + version("6.2.4", sha256="5ebe8d0f176bf4a73b0e7000d9c47cb7f65ecca47011d3f9b08b93047dcf7ac5") version("6.2.1", sha256="136941e3f13e0d373ee3698bd60d4fc36353a2df6406e5a50b6ac78f1b639698") version("6.2.0", sha256="49e4b15af62bf9800c02a24c75c6cd99dc8b146d69cc7f00ecbbcd60f6106315") version("6.1.2", sha256="4583ea9bc71d55e987db4a42f9b3b730def22892953d30bca64ca29ac844e058") diff --git a/var/spack/repos/builtin/packages/aqlprofile/package.py b/var/spack/repos/builtin/packages/aqlprofile/package.py index ca5a74b21160cb..f6975256857cf8 100644 --- a/var/spack/repos/builtin/packages/aqlprofile/package.py +++ b/var/spack/repos/builtin/packages/aqlprofile/package.py @@ -9,6 +9,20 @@ from spack.package import * _versions = { + "6.2.4": { + "apt": ( + "614ad0c01b7f18eaa9e8a33fb73b9d8445c8785841ed41b406e129101dea854d", + "https://repo.radeon.com/rocm/apt/6.2.4/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.60204.60204-139~20.04_amd64.deb", + ), + "yum": ( + "fe499f5f0f4dac3652913d4009ff802d2136725341a8346c797af790700b5f31", + "https://repo.radeon.com/rocm/yum/6.2.4/main/hsa-amd-aqlprofile-1.0.0.60204.60204-139.el7.x86_64.rpm", + ), + "zyp": ( + "7109118f0edce2f85e5554330ce6f6c6519d45558d8912940c9f7ee9c01fc4dd", + "https://repo.radeon.com/rocm/zyp/6.2.4/main/hsa-amd-aqlprofile-1.0.0.60204.60204-sles155.139.x86_64.rpm", + ), + }, "6.2.1": { "apt": ( "a196698d39c567aef39734b4a47e0daa1596c86945868b4b0cffc6fcb0904dea", @@ -217,6 +231,24 @@ class Aqlprofile(Package): depends_on("cpio") + for ver in [ + "5.5.0", + "5.5.1", + "5.6.0", + "5.6.1", + "5.7.0", + "5.7.1", + "6.0.0", + "6.0.2", + "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", + "6.2.4", + ]: + depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}") + def install(self, spec, prefix): # find deb or rpm pkg and extract files for file in os.listdir("."): @@ -230,3 +262,6 @@ def install(self, spec, prefix): install_tree(f"opt/rocm-{spec.version}/share/", prefix.share) install_tree(f"opt/rocm-{spec.version}/lib/", prefix.lib) + + def setup_run_environment(self, env): + env.prepend_path("LD_LIBRARY_PATH", self.spec["hsa-rocr-dev"].prefix.lib) diff --git a/var/spack/repos/builtin/packages/comgr/package.py b/var/spack/repos/builtin/packages/comgr/package.py index 1e64717b579eb2..135be5d24b71f8 100644 --- a/var/spack/repos/builtin/packages/comgr/package.py +++ b/var/spack/repos/builtin/packages/comgr/package.py @@ -30,6 +30,7 @@ def url_for_version(self, version): license("NCSA") version("master", branch="amd-stg-open") + version("6.2.4", sha256="7af782bf5835fcd0928047dbf558f5000e7f0207ca39cf04570969343e789528") version("6.2.1", sha256="4840f109d8f267c28597e936c869c358de56b8ad6c3ed4881387cf531846e5a7") version("6.2.0", sha256="12ce17dc920ec6dac0c5484159b3eec00276e4a5b301ab1250488db3b2852200") version("6.1.2", sha256="300e9d6a137dcd91b18d5809a316fddb615e0e7f982dc7ef1bb56876dff6e097") @@ -85,6 +86,7 @@ def url_for_version(self, version): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", "master", ]: # llvm libs are linked statically, so this *could* be a build dep @@ -108,6 +110,7 @@ def url_for_version(self, version): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-core@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/composable-kernel/package.py b/var/spack/repos/builtin/packages/composable-kernel/package.py index d666737cb3ec57..5ccaaf205cc588 100644 --- a/var/spack/repos/builtin/packages/composable-kernel/package.py +++ b/var/spack/repos/builtin/packages/composable-kernel/package.py @@ -19,6 +19,7 @@ class ComposableKernel(CMakePackage): license("MIT") version("master", branch="develop") + version("6.2.4", sha256="5598aea4bce57dc95b60f2029831edfdade80b30a56e635412cc02b2a6729aa6") version("6.2.1", sha256="708ff25218dc5fa977af4a37105b380d7612a70c830fa7977b40b3df8b8d3162") version("6.2.0", sha256="4a3024f4f93c080db99d560a607ad758745cd2362a90d0e8f215331686a6bc64") version("6.1.2", sha256="54db801e1c14239f574cf94dd764a2f986b4abcc223393d55c49e4b276e738c9") @@ -58,6 +59,7 @@ class ComposableKernel(CMakePackage): for ver in [ "master", + "6.2.4", "6.2.1", "6.2.0", "6.1.2", diff --git a/var/spack/repos/builtin/packages/hip-tensor/package.py b/var/spack/repos/builtin/packages/hip-tensor/package.py index 697a73f78f075c..c4f9219ad9d640 100644 --- a/var/spack/repos/builtin/packages/hip-tensor/package.py +++ b/var/spack/repos/builtin/packages/hip-tensor/package.py @@ -17,6 +17,7 @@ class HipTensor(CMakePackage, ROCmPackage): maintainers("srekolam", "afzpatel") version("master", branch="master") + version("6.2.4", sha256="54c378b440ede7a07c93b5ed8d16989cc56283a56ea35e41f3666bb05b6bc984") version("6.2.1", sha256="592dbe73f5f95ba512f7fbe9975a68dbea85846be74da15344d74952b286f243") version("6.2.0", sha256="adb7459416864fb2664064f5bea5fb669839247b702209a6415b396813626b31") version("6.1.2", sha256="ac0e07a3019bcce4a0a98aafa4922d5fc9e953bed07084abef5306c851717783") @@ -40,12 +41,13 @@ class HipTensor(CMakePackage, ROCmPackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", "master", ]: depends_on(f"composable-kernel@{ver}", when=f"@{ver}") depends_on(f"rocm-cmake@{ver}", when=f"@{ver}") - for ver in ["6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1"]: + for ver in ["6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]: depends_on(f"hipcc@{ver}", when=f"@{ver}") def setup_build_environment(self, env): diff --git a/var/spack/repos/builtin/packages/hip/package.py b/var/spack/repos/builtin/packages/hip/package.py index 19e66d4fad518a..8a65beeba193d4 100644 --- a/var/spack/repos/builtin/packages/hip/package.py +++ b/var/spack/repos/builtin/packages/hip/package.py @@ -19,7 +19,7 @@ class Hip(CMakePackage): homepage = "https://github.com/ROCm/HIP" git = "https://github.com/ROCm/HIP.git" - url = "https://github.com/ROCm/HIP/archive/rocm-6.1.2.tar.gz" + url = "https://github.com/ROCm/HIP/archive/rocm-6.2.4.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath", "haampie") @@ -28,6 +28,7 @@ class Hip(CMakePackage): license("MIT") version("master", branch="master") + version("6.2.4", sha256="76e4583ae3d31786270fd92abbb2e3dc5e665b22fdedb5ceff0093131d4dc0ca") version("6.2.1", sha256="a8b86666a59867cae67409c4a45e0b8f29a6328c9739e6512c2b5612376f30cf") version("6.2.0", sha256="7ca261eba79793427674bf2372c92ac5483cc0fac5278f8ad611de396fad8bee") version("6.1.2", sha256="9ba5f70a553b48b2cea25c7e16b97ad49320750c0152763b173b63b9f151e783") @@ -92,6 +93,7 @@ class Hip(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}") depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}") @@ -116,6 +118,7 @@ class Hip(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"hipify-clang@{ver}", when=f"@{ver}") @@ -133,6 +136,7 @@ class Hip(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-core@{ver}", when=f"@{ver}") @@ -140,10 +144,10 @@ class Hip(CMakePackage): # ref https://github.com/ROCm/HIP/pull/2202 depends_on("numactl", when="@3.7.0:") - for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1"]: + for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]: depends_on(f"hipcc@{ver}", when=f"@{ver}") - for ver in ["6.2.0", "6.2.1"]: + for ver in ["6.2.0", "6.2.1", "6.2.4"]: depends_on(f"rocprofiler-register@{ver}", when=f"@{ver}") # roc-obj-ls requirements @@ -205,6 +209,7 @@ class Hip(CMakePackage): ) # Add hip-clr sources thru the below for d_version, d_shasum in [ + ("6.2.4", "0a3164af7f997a4111ade634152957378861b95ee72d7060eb01c86c87208c54"), ("6.2.1", "e9cff3a8663defdbda833d49c9e7160171eca14dc285ffe4061378607d6c890d"), ("6.2.0", "620e4c6a7f05651cc7a170bc4700fef8cae002420307a667c638b981d00b25e8"), ("6.1.2", "1a1e21640035d957991559723cd093f0c7e202874423667d2ba0c7662b01fea4"), @@ -260,6 +265,7 @@ class Hip(CMakePackage): ) # Add hipother sources thru the below for d_version, d_shasum in [ + ("6.2.4", "b7ebcf8a2679e50d27c49ebec0dbea5a67573f8b8c3f4a29108c84b28b5bedee"), ("6.2.1", "5d99e498c1fece44a421574282fc89c6a2499979eaa9f850e5caa7fa3a8938b8"), ("6.2.0", "1f854b0c07d71b10450080e3bbffe47adaf10a9745a9212797d991756a100174"), ("6.1.2", "2740d1e3dcf1f2d07d2a8db6acf4c972941ae392172b83fd8ddcfe8706a40d0b"), @@ -280,6 +286,7 @@ class Hip(CMakePackage): # Add hiptests sources thru the below for d_version, d_shasum in [ + ("6.2.4", "1478b49583d09cb3a96e26ec3bf8dc5ff3e3ec72fa133bb6d7768595d825051e"), ("6.2.1", "90fcf0169889533b882d289f9cb8a7baf9bd46a3ce36752b915083931dc839f1"), ("6.2.0", "314837dbac78be71844ceb959476470c484fdcd4fb622ff8de9277783e0fcf1c"), ("6.1.2", "5b14e4a30d8d8fb56c43e262009646ba9188eac1c8ff882d9a606a4bec69b56b"), diff --git a/var/spack/repos/builtin/packages/hipblas/package.py b/var/spack/repos/builtin/packages/hipblas/package.py index 91bbe38c6208b4..fbbf3d4c99f62e 100644 --- a/var/spack/repos/builtin/packages/hipblas/package.py +++ b/var/spack/repos/builtin/packages/hipblas/package.py @@ -25,6 +25,7 @@ class Hipblas(CMakePackage, CudaPackage, ROCmPackage): version("develop", branch="develop") version("master", branch="master") + version("6.2.4", sha256="3137ba35e0663d6cceed70086fc6397d9e74803e1711382be62809b91beb2f32") version("6.2.1", sha256="b770b6ebd27d5c12ad01827195e996469bfc826e8a2531831df475fc8d7f6b2e") version("6.2.0", sha256="33688a4d929b13e1fd800aff7e0833a9f7abf3913754b6b15995595e0d434e94") version("6.1.2", sha256="73699892855775a67f48c38beae78169a516078c17f1ed5d67c80abe5d308502") @@ -78,7 +79,7 @@ class Hipblas(CMakePackage, CudaPackage, ROCmPackage): depends_on("rocm-cmake@5.2.0:", type="build", when="@5.2.0:5.7") depends_on("rocm-cmake@4.5.0:", type="build") - for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0"]: + for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]: depends_on(f"rocm-cmake@{ver}", when=f"+rocm @{ver}") depends_on(f"rocm-openmp-extras@{ver}", type="test", when=f"+rocm @{ver}") @@ -102,6 +103,7 @@ class Hipblas(CMakePackage, CudaPackage, ROCmPackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", "master", "develop", ]: diff --git a/var/spack/repos/builtin/packages/hipblaslt/package.py b/var/spack/repos/builtin/packages/hipblaslt/package.py index c70d6a001bbfe6..31938b82d0c381 100644 --- a/var/spack/repos/builtin/packages/hipblaslt/package.py +++ b/var/spack/repos/builtin/packages/hipblaslt/package.py @@ -17,6 +17,7 @@ class Hipblaslt(CMakePackage): maintainers("srekolam", "afzpatel", "renjithravindrankannath") license("MIT") + version("6.2.4", sha256="b8a72cb1ed4988b0569817c6387fb2faee4782795a0d8f49b827b32b52572cfd") version("6.2.1", sha256="9b062b1d6d945349c31828030c8c1d99fe57d14a1837196ff9aa67bf10ef43f1") version("6.2.0", sha256="aec9edc75ae4438aa712192c784e2bed683d2839b502b6aadb18f6012306749b") version("6.1.2", sha256="fcfe950f7b87c421565abe090b2de6f463afc1549841002f105ecca7bbbf59e5") @@ -37,7 +38,7 @@ class Hipblaslt(CMakePackage): ) variant("asan", default=False, description="Build with address-sanitizer enabled or disabled") - for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1"]: + for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]: depends_on(f"hip@{ver}", when=f"@{ver}") depends_on(f"hipblas@{ver}", when=f"@{ver}") depends_on(f"rocm-openmp-extras@{ver}", type="test", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/hipcc/package.py b/var/spack/repos/builtin/packages/hipcc/package.py index d793d39af6a413..a01c8ac078457c 100644 --- a/var/spack/repos/builtin/packages/hipcc/package.py +++ b/var/spack/repos/builtin/packages/hipcc/package.py @@ -24,6 +24,7 @@ def url_for_version(self, version): maintainers("srekolam", "renjithravindrankannath", "afzpatel") license("MIT") + version("6.2.4", sha256="7af782bf5835fcd0928047dbf558f5000e7f0207ca39cf04570969343e789528") version("6.2.1", sha256="4840f109d8f267c28597e936c869c358de56b8ad6c3ed4881387cf531846e5a7") version("6.2.0", sha256="12ce17dc920ec6dac0c5484159b3eec00276e4a5b301ab1250488db3b2852200") version("6.1.2", sha256="300e9d6a137dcd91b18d5809a316fddb615e0e7f982dc7ef1bb56876dff6e097") diff --git a/var/spack/repos/builtin/packages/hipcub/package.py b/var/spack/repos/builtin/packages/hipcub/package.py index 06030e38a1c65b..2a71711b47635d 100644 --- a/var/spack/repos/builtin/packages/hipcub/package.py +++ b/var/spack/repos/builtin/packages/hipcub/package.py @@ -18,6 +18,7 @@ class Hipcub(CMakePackage, CudaPackage, ROCmPackage): license("BSD-3-Clause") maintainers("srekolam", "renjithravindrankannath") + version("6.2.4", sha256="06f3655b110d3d2e2ecf0aca052d3ba3f2ef012c069e5d2d82f2b75d50555f46") version("6.2.1", sha256="e0203e72afac4da19cb1d62896fff404ec44517141b420bd38f6e962e52ef6fd") version("6.2.0", sha256="8dda8b77740e722fd4cf7223476313fc873bad75d50e6cb86ff284a91d76752d") version("6.1.2", sha256="830a0f3231e07fcc6cd6261c4e1af2d7d0ac4862c606ecdc80c2635557ca3d9f") @@ -79,6 +80,7 @@ class Hipcub(CMakePackage, CudaPackage, ROCmPackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocprim@{ver}", when=f"+rocm @{ver}") depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/hipfft/package.py b/var/spack/repos/builtin/packages/hipfft/package.py index ae07ec26704067..25d640fc227302 100644 --- a/var/spack/repos/builtin/packages/hipfft/package.py +++ b/var/spack/repos/builtin/packages/hipfft/package.py @@ -25,6 +25,7 @@ class Hipfft(CMakePackage, CudaPackage, ROCmPackage): license("MIT") version("master", branch="master") + version("6.2.4", sha256="308b81230498b01046f7fc3299a9e9c2c5456d80fd71a94f490ad97f51ed9de8") version("6.2.1", sha256="5f668fa8b5ed10d47d164d887699d3c14d900d78f6a31bf953f8fbbc08bc5fd1") version("6.2.0", sha256="8d19aebb1bbfea1f235ca08d34393ce39bea35dc9cbfa72a3cf7cdf1c56410e7") version("6.1.2", sha256="6753e45d9c671d58e68bed2b0c1bfcd40fad9d690dba3fe6011e67e51dbe3cc6") @@ -86,6 +87,7 @@ class Hipfft(CMakePackage, CudaPackage, ROCmPackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", "master", ]: depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/hipfort/package.py b/var/spack/repos/builtin/packages/hipfort/package.py index 5158908b35e731..66d28801e064db 100644 --- a/var/spack/repos/builtin/packages/hipfort/package.py +++ b/var/spack/repos/builtin/packages/hipfort/package.py @@ -17,6 +17,7 @@ class Hipfort(CMakePackage): license("MIT") maintainers("cgmb", "srekolam", "renjithravindrankannath") + version("6.2.4", sha256="32daa4ee52c2d44790bff7a7ddde9d572e4785b2f54766a5e45d10228da0534b") version("6.2.1", sha256="5258f2dd63aeebe29ce566e654c47b8e2e1f5eb8ca3da92af09c54517b259f32") version("6.2.0", sha256="7f6db61a0ac7771e5c4604a6113b36736f6c7f05cabd7e1df8e832c98b87311d") version("6.1.2", sha256="f60d07fa3e5b09246c8908b2876addf175a91e91c8b0fac85b000f88b6743c7c") @@ -63,6 +64,7 @@ class Hipfort(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"hip@{ver}", type="build", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/hipify-clang/package.py b/var/spack/repos/builtin/packages/hipify-clang/package.py index d8fcc5494d548e..ab254322b4d2ca 100644 --- a/var/spack/repos/builtin/packages/hipify-clang/package.py +++ b/var/spack/repos/builtin/packages/hipify-clang/package.py @@ -12,7 +12,7 @@ class HipifyClang(CMakePackage): homepage = "https://github.com/ROCm/HIPIFY" git = "https://github.com/ROCm/HIPIFY.git" - url = "https://github.com/ROCm/HIPIFY/archive/rocm-6.1.2.tar.gz" + url = "https://github.com/ROCm/HIPIFY/archive/rocm-6.2.4.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") @@ -20,6 +20,7 @@ class HipifyClang(CMakePackage): license("MIT") version("master", branch="master") + version("6.2.4", sha256="981af55ab4243f084b3e75007e827f7c94ac317fa84fe08d59c5872124a7d3c7") version("6.2.1", sha256="db5680d677222596cf9edfb84ae96b37db829a40a2e0243d26ff24a16e03ff74") version("6.2.0", sha256="11bfbde7c40e5cd5de02a47ec30dc6df4b233a12126bf7ee449432a30a3e6e1e") version("6.1.2", sha256="7cc1e3fd7690a3e1d99cd07f2bd62ee73682cceeb4a46918226fc70f8092eb68") @@ -71,6 +72,7 @@ class HipifyClang(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", "master", ]: depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}") @@ -89,6 +91,7 @@ class HipifyClang(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-core@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/hiprand/package.py b/var/spack/repos/builtin/packages/hiprand/package.py index d78282fcfc8a3e..5dc0d429c25d29 100644 --- a/var/spack/repos/builtin/packages/hiprand/package.py +++ b/var/spack/repos/builtin/packages/hiprand/package.py @@ -25,6 +25,7 @@ class Hiprand(CMakePackage, CudaPackage, ROCmPackage): version("develop", branch="develop") version("master", branch="master") + version("6.2.4", sha256="b6010f5e0c63a139acd92197cc1c0d64a428f7a0ad661bce0cd1e553ad6fd6eb") version("6.2.1", sha256="0d4585b8adbc299f3fdc2c74bb20ffd4285027b861a759c3e62ce564589465da") version("6.2.0", sha256="daaf32506eaaf3c3b715ed631387c27992cfe0d938353a88ad6acedc735eb54b") version("6.1.2", sha256="f0f129811c144dd711e967305c7af283cefb94bfdbcd2a11296b92a9e966be2c") @@ -98,6 +99,7 @@ class Hiprand(CMakePackage, CudaPackage, ROCmPackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", "master", "develop", ]: diff --git a/var/spack/repos/builtin/packages/hipsolver/package.py b/var/spack/repos/builtin/packages/hipsolver/package.py index 4470f7822687a2..7aab4e720d1642 100644 --- a/var/spack/repos/builtin/packages/hipsolver/package.py +++ b/var/spack/repos/builtin/packages/hipsolver/package.py @@ -30,6 +30,7 @@ class Hipsolver(CMakePackage, CudaPackage, ROCmPackage): version("develop", branch="develop") version("master", branch="master") + version("6.2.4", sha256="4dc564498361cb1bac17dcfeaf0f2b9c85320797c75b05ee33160a133f5f4a15") version("6.2.1", sha256="614e3c0bc11bfa84acd81d46db63f3852a750adaaec094b7701ab7b996cc8e93") version("6.2.0", sha256="637577a9cc38e4865894dbcd7eb35050e3de5d45e6db03472e836b318602a84d") version("6.1.2", sha256="406a8e5b82daae2fc03e0a738b5a054ade01bb41785cee4afb9e21c7ec91d492") @@ -104,6 +105,7 @@ class Hipsolver(CMakePackage, CudaPackage, ROCmPackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", "master", "develop", ]: diff --git a/var/spack/repos/builtin/packages/hipsparse/package.py b/var/spack/repos/builtin/packages/hipsparse/package.py index 0aa54869df2616..b43712ed7f68e4 100644 --- a/var/spack/repos/builtin/packages/hipsparse/package.py +++ b/var/spack/repos/builtin/packages/hipsparse/package.py @@ -15,13 +15,14 @@ class Hipsparse(CMakePackage, CudaPackage, ROCmPackage): homepage = "https://github.com/ROCm/hipSPARSE" git = "https://github.com/ROCm/hipSPARSE.git" - url = "https://github.com/ROCm/hipSPARSE/archive/rocm-6.1.1.tar.gz" + url = "https://github.com/ROCm/hipSPARSE/archive/rocm-6.2.4.tar.gz" tags = ["rocm"] maintainers("cgmb", "srekolam", "renjithravindrankannath", "haampie") libraries = ["libhipsparse"] license("MIT") + version("6.2.4", sha256="0ecc0ff1eeb99e9a9ac419e49e9be9ec4cd23a117d819710114ee2f35aefe88b") version("6.2.1", sha256="5a3241c857f705b1e5c64b3f5163575726e64a8d19f3957f7326622fda277710") version("6.2.0", sha256="e51b9871d764763519c14be2ec52c1e1ae3959b439afb4be6518b9f9a6f0ebaf") version("6.1.2", sha256="dd44f9b6000b3b0ac0fa238037a80f79d6745a689d4a6755f2d595643be1ef6d") @@ -85,6 +86,7 @@ class Hipsparse(CMakePackage, CudaPackage, ROCmPackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}") depends_on(f"rocsparse@{ver}", when=f"+rocm @{ver}") diff --git a/var/spack/repos/builtin/packages/hipsparselt/package.py b/var/spack/repos/builtin/packages/hipsparselt/package.py index 4c882cc264190a..4d97f93b60ddb4 100644 --- a/var/spack/repos/builtin/packages/hipsparselt/package.py +++ b/var/spack/repos/builtin/packages/hipsparselt/package.py @@ -22,6 +22,7 @@ class Hipsparselt(CMakePackage, ROCmPackage): maintainers("srekolam", "afzpatel", "renjithravindrankannath") license("MIT") + version("6.2.4", sha256="7b007b346f89fac9214ad8541b3276105ce1cac14d6f95a8a504b5a5381c8184") version("6.2.1", sha256="a23287bc759442aebaccce0306f5e3938865240e13553847356c25c54214a0d4") version("6.2.0", sha256="a25a3ce0ed3cc616b1a4e38bfdd5e68463bb9fe791a56d1367b8a6373bb63d12") version("6.1.2", sha256="a5a01fec7bc6e1f4792ccd5c8eaee7b42deac315c54298a7ce5265e5551e8640") @@ -46,7 +47,7 @@ class Hipsparselt(CMakePackage, ROCmPackage): ) variant("asan", default=False, description="Build with address-sanitizer enabled or disabled") - for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1"]: + for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]: depends_on(f"hip@{ver}", when=f"@{ver}") depends_on(f"hipsparse@{ver}", when=f"@{ver}") depends_on(f"rocm-openmp-extras@{ver}", when=f"@{ver}", type="test") diff --git a/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py b/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py index 41dd80a081d711..d647a6aa96eebc 100644 --- a/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py +++ b/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py @@ -17,13 +17,14 @@ class HsaRocrDev(CMakePackage): homepage = "https://github.com/ROCm/ROCR-Runtime" git = "https://github.com/ROCm/ROCR-Runtime.git" - url = "https://github.com/ROCm/ROCR-Runtime/archive/rocm-6.2.1.tar.gz" + url = "https://github.com/ROCm/ROCR-Runtime/archive/rocm-6.2.4.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath", "haampie") libraries = ["libhsa-runtime64"] version("master", branch="master") + version("6.2.4", sha256="b7aa0055855398d1228c39a6f4feb7d7be921af4f43d82855faf0b531394bb9b") version("6.2.1", sha256="dbe477b323df636f5e3221471780da156c938ec00dda4b50639aa8d7fb9248f4") version("6.2.0", sha256="c98090041fa56ca4a260709876e2666f85ab7464db9454b177a189e1f52e0b1a") version("6.1.2", sha256="6eb7a02e5f1e5e3499206b9e74c9ccdd644abaafa2609dea0993124637617866") @@ -78,6 +79,7 @@ class HsaRocrDev(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", "master", ]: depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}") @@ -99,6 +101,7 @@ class HsaRocrDev(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-core@{ver}", when=f"@{ver}") @@ -146,6 +149,8 @@ def cmake_args(self): args.append(self.define("ROCM_PATCH_VERSION", "60000")) if self.spec.satisfies("@6.1"): args.append(self.define("ROCM_PATCH_VERSION", "60100")) + if self.spec.satisfies("@6.2"): + args.append(self.define("ROCM_PATCH_VERSION", "60200")) if self.spec.satisfies("@5.7.0:"): args.append(self.define_from_variant("ADDRESS_SANITIZER", "asan")) diff --git a/var/spack/repos/builtin/packages/hsakmt-roct/package.py b/var/spack/repos/builtin/packages/hsakmt-roct/package.py index 75ca27d1f6b7b0..0b980cf83ce4f3 100644 --- a/var/spack/repos/builtin/packages/hsakmt-roct/package.py +++ b/var/spack/repos/builtin/packages/hsakmt-roct/package.py @@ -16,12 +16,13 @@ class HsakmtRoct(CMakePackage): homepage = "https://github.com/ROCm/ROCT-Thunk-Interface" git = "https://github.com/ROCm/ROCT-Thunk-Interface.git" - url = "https://github.com/ROCm/ROCT-Thunk-Interface/archive/rocm-6.1.0.tar.gz" + url = "https://github.com/ROCm/ROCT-Thunk-Interface/archive/rocm-6.2.4.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") version("master", branch="master") + version("6.2.4", sha256="5c71655e3a1b9d1404dc8cb64b9d2fadd27e67606aaa8aec0c325768d8c483c0") version("6.2.1", sha256="bba5dd8cce595d94d6a8e467dbd6de9e921f81e665ca8aac1e346e0ade7620f0") version("6.2.0", sha256="73df98ca2be8a887cb76554c23f148ef6556bdbccfac99f34111fa1f87fd7c5d") version("6.1.2", sha256="097a5b7eb136300667b36bd35bf55e4a283a1ed04e614cf24dddca0a65c86389") @@ -69,6 +70,7 @@ class HsakmtRoct(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-core@{ver}", when=f"@{ver}") depends_on(f"llvm-amdgpu@{ver}", type="test", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/llvm-amdgpu/package.py b/var/spack/repos/builtin/packages/llvm-amdgpu/package.py index 6c98043a3add54..ee9d5699ecc8d4 100644 --- a/var/spack/repos/builtin/packages/llvm-amdgpu/package.py +++ b/var/spack/repos/builtin/packages/llvm-amdgpu/package.py @@ -15,7 +15,7 @@ class LlvmAmdgpu(CMakePackage, CompilerPackage): homepage = "https://github.com/ROCm/llvm-project" git = "https://github.com/ROCm/llvm-project.git" - url = "https://github.com/ROCm/llvm-project/archive/rocm-6.2.0.tar.gz" + url = "https://github.com/ROCm/llvm-project/archive/rocm-6.2.4.tar.gz" tags = ["rocm"] executables = [r"amdclang", r"amdclang\+\+", r"amdflang", r"clang.*", r"flang.*", "llvm-.*"] generator("ninja") @@ -25,6 +25,7 @@ class LlvmAmdgpu(CMakePackage, CompilerPackage): license("Apache-2.0") version("master", branch="amd-stg-open") + version("6.2.4", sha256="7af782bf5835fcd0928047dbf558f5000e7f0207ca39cf04570969343e789528") version("6.2.1", sha256="4840f109d8f267c28597e936c869c358de56b8ad6c3ed4881387cf531846e5a7") version("6.2.0", sha256="12ce17dc920ec6dac0c5484159b3eec00276e4a5b301ab1250488db3b2852200") version("6.1.2", sha256="300e9d6a137dcd91b18d5809a316fddb615e0e7f982dc7ef1bb56876dff6e097") @@ -158,6 +159,7 @@ class LlvmAmdgpu(CMakePackage, CompilerPackage): when="@master +rocm-device-libs", ) for d_version, d_shasum in [ + ("6.2.4", "b7aa0055855398d1228c39a6f4feb7d7be921af4f43d82855faf0b531394bb9b"), ("6.2.1", "dbe477b323df636f5e3221471780da156c938ec00dda4b50639aa8d7fb9248f4"), ("6.2.0", "c98090041fa56ca4a260709876e2666f85ab7464db9454b177a189e1f52e0b1a"), ("6.1.2", "6eb7a02e5f1e5e3499206b9e74c9ccdd644abaafa2609dea0993124637617866"), diff --git a/var/spack/repos/builtin/packages/migraphx/package.py b/var/spack/repos/builtin/packages/migraphx/package.py index dfe5d462b9bc1c..1d2c465c269eed 100644 --- a/var/spack/repos/builtin/packages/migraphx/package.py +++ b/var/spack/repos/builtin/packages/migraphx/package.py @@ -20,6 +20,7 @@ class Migraphx(CMakePackage): libraries = ["libmigraphx"] license("MIT") + version("6.2.4", sha256="849cca3c7c98dc437e42ac17013f86ef0a5fd202cb87b7822778bd9a8f93d293") version("6.2.1", sha256="a9479fd6846bae4a888f712c2fecee6a252951ae8979d9990b100450e4cd6c30") version("6.2.0", sha256="7b36c1a0c44dd21f31ce6c9c4e7472923281aa7fdc693e75edd2670b101a6d48") version("6.1.2", sha256="829f4a2bd9fe3dee130dfcca103ddc7691da18382f5b683aaca8f3ceceaef355") @@ -98,6 +99,7 @@ class Migraphx(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}") depends_on(f"hip@{ver}", when=f"@{ver}") @@ -105,7 +107,7 @@ class Migraphx(CMakePackage): depends_on(f"rocblas@{ver}", when=f"@{ver}") depends_on(f"miopen-hip@{ver}", when=f"@{ver}") - for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1"]: + for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]: depends_on(f"rocmlir@{ver}", when=f"@{ver}") @property diff --git a/var/spack/repos/builtin/packages/miopen-hip/package.py b/var/spack/repos/builtin/packages/miopen-hip/package.py index 20253e16a2fc30..d902c2529e182e 100644 --- a/var/spack/repos/builtin/packages/miopen-hip/package.py +++ b/var/spack/repos/builtin/packages/miopen-hip/package.py @@ -21,6 +21,8 @@ class MiopenHip(CMakePackage): libraries = ["libMIOpen"] license("MIT") + + version("6.2.4", sha256="8e4836e007e5e66fa487288887a098aaeeb95f3c63a19c2b91f6e848c023a040") version("6.2.1", sha256="c7abe5ae7a332813a3c3da849e9a50b91221fe05c6bb622413e5b048b1f15982") version("6.2.0", sha256="f4473f724362732019d505a0e01c17b060b542350859cb1e4bd4e3898b609276") version("6.1.2", sha256="c8ff4af72264b2049bfe2685d581ea0f3e43319db7bd00dc347159bcf2731614") @@ -90,6 +92,7 @@ class MiopenHip(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}") depends_on(f"hip@{ver}", when=f"@{ver}") @@ -130,17 +133,18 @@ class MiopenHip(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on("nlohmann-json", type="link") depends_on(f"composable-kernel@{ver}", when=f"@{ver}") for ver in ["5.4.0", "5.4.3", "5.5.0"]: depends_on("nlohmann-json", type="link") depends_on(f"rocmlir@{ver}", when=f"@{ver}") - for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1"]: + for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]: depends_on(f"roctracer-dev@{ver}", when=f"@{ver}") for ver in ["6.1.0", "6.1.1", "6.1.2"]: depends_on("googletest") - for ver in ["6.2.0", "6.2.1"]: + for ver in ["6.2.0", "6.2.1", "6.2.4"]: depends_on(f"rocrand@{ver}", when=f"@{ver}") def setup_build_environment(self, env): diff --git a/var/spack/repos/builtin/packages/mivisionx/package.py b/var/spack/repos/builtin/packages/mivisionx/package.py index a69f886f532213..2737c0ca7ec953 100644 --- a/var/spack/repos/builtin/packages/mivisionx/package.py +++ b/var/spack/repos/builtin/packages/mivisionx/package.py @@ -26,6 +26,8 @@ def url_for_version(self, version): return url.format(version) license("MIT") + + version("6.2.4", sha256="7e65dc83f1b85e089c1218dff57211e64f3586bcb4415bda4798e4a434cba216") version("6.2.1", sha256="591fe23ee1e2ab49f29aeeb835b5045e4ba00165c604ddfaa26bd8eb56cb367d") version("6.2.0", sha256="ce28ac3aef76f28869c4dad9ffd9ef090e0b54ac58088f1f1eef803641125b51") version("6.1.2", sha256="0afa664931f566b7f5a3abd474dd641e56077529a2a5d7c788f5e6700e957ed6") @@ -225,6 +227,7 @@ def patch(self): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"miopen-hip@{ver}", when=f"@{ver}") for ver in [ @@ -244,6 +247,7 @@ def patch(self): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"migraphx@{ver}", when=f"@{ver}") depends_on(f"hip@{ver}", when=f"@{ver}") @@ -262,10 +266,23 @@ def patch(self): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-core@{ver}", when=f"@{ver}") depends_on("python@3.5:", type="build") - for ver in ["5.7.0", "5.7.1", "6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1"]: + + for ver in [ + "5.7.0", + "5.7.1", + "6.0.0", + "6.0.2", + "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", + "6.2.4", + ]: depends_on(f"rpp@{ver}", when=f"@{ver}") def setup_run_environment(self, env): diff --git a/var/spack/repos/builtin/packages/omniperf/package.py b/var/spack/repos/builtin/packages/omniperf/package.py index 436ec037d0b2c9..e4bfa1120b7830 100644 --- a/var/spack/repos/builtin/packages/omniperf/package.py +++ b/var/spack/repos/builtin/packages/omniperf/package.py @@ -19,8 +19,9 @@ class Omniperf(CMakePackage): license("MIT") - version("6.2.1", sha256="c14cb73b9fe17a3cca31489a73e8ea49cb278093f8d64c433b1bac387445074a") - version("6.2.0", sha256="b2ad49324a07aef977833d62741509a5d799b92758db56a16b4ab5636b6e231e") + version("6.2.4", sha256="2230260fce0838583899f4969b936ca047b30985a0fffad276ea353232538770") + version("6.2.1", sha256="56b795d471adad8ee9d7025544269e23929da31524d73db6f54396d3aca1445a") + version("6.2.0", sha256="febe9011e0628ad62367fdc6c81bdb0ad4ed45803f79c794757ecea8bcfab58c") depends_on("python@3.8:") depends_on("py-pip", type="run") diff --git a/var/spack/repos/builtin/packages/omnitrace/package.py b/var/spack/repos/builtin/packages/omnitrace/package.py index 3b558925aa7145..48403d56ddad84 100644 --- a/var/spack/repos/builtin/packages/omnitrace/package.py +++ b/var/spack/repos/builtin/packages/omnitrace/package.py @@ -23,6 +23,12 @@ class Omnitrace(CMakePackage): version( "1.12.0", tag="v1.12.0", commit="abff23ac4238da6d7891d9ac9f36a919e30bf759", submodules=True ) + version( + "rocm-6.2.4", + tag="rocm-6.2.4", + commit="47597c1be3699c5aaaf6164061ee4189c6b32445", + submodules=True, + ) version( "rocm-6.2.1", tag="rocm-6.2.1", @@ -127,7 +133,7 @@ class Omnitrace(CMakePackage): depends_on("roctracer-dev@5", when="@1:1.10 +rocm") depends_on("rocprofiler-dev@5", when="@1.3.0:1.10 +rocm") - for ver in ["6.2.0", "6.2.1"]: + for ver in ["6.2.0", "6.2.1", "6.2.4"]: depends_on(f"rocm-smi-lib@{ver}", when=f"@rocm-{ver} +rocm") depends_on(f"hip@{ver}", when=f"@rocm-{ver} +rocm") depends_on(f"roctracer-dev@{ver}", when=f"@rocm-{ver} +rocm") diff --git a/var/spack/repos/builtin/packages/rccl/package.py b/var/spack/repos/builtin/packages/rccl/package.py index c8f973237950d7..03e80897383472 100644 --- a/var/spack/repos/builtin/packages/rccl/package.py +++ b/var/spack/repos/builtin/packages/rccl/package.py @@ -16,11 +16,12 @@ class Rccl(CMakePackage): homepage = "https://github.com/ROCm/rccl" git = "https://github.com/ROCm/rccl.git" - url = "https://github.com/ROCm/rccl/archive/rocm-6.1.2.tar.gz" + url = "https://github.com/ROCm/rccl/archive/rocm-6.2.4.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") libraries = ["librccl"] + version("6.2.4", sha256="12a04743ed89a74b4a08aa046b6a549d385e15d6866042fd41eac8f085f50eea") version("6.2.1", sha256="0f5e35c7afbb21c1d49ff201b7d1ddf163d853c27c75c3eaf7b449f4dc1e2188") version("6.2.0", sha256="a29c94ea3b9c1a0121d7b1450cb01a697f9f9132169632312b9b0bf744d3c0e3") version("6.1.2", sha256="98af99c12d800f5439c7740d797162c35810a25e08e3b11b397d3300d3c0148e") @@ -77,6 +78,7 @@ class Rccl(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}") depends_on(f"hip@{ver}", when=f"@{ver}") @@ -97,6 +99,7 @@ class Rccl(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-core@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/rdc/package.py b/var/spack/repos/builtin/packages/rdc/package.py index 0d97a02de13297..7320dabd9e149d 100644 --- a/var/spack/repos/builtin/packages/rdc/package.py +++ b/var/spack/repos/builtin/packages/rdc/package.py @@ -27,6 +27,7 @@ def url_for_version(self, version): return url.format(version) license("MIT") + version("6.2.4", sha256="cdebbc0c1a49f067fb8ff17bd91cd92f6f83b2aee142e5b576e5eb1742983a7f") version("6.2.1", sha256="63c0cffd772a43d0984505646023485ca2bc8512f5a87ece016f1d381cded075") version("6.2.0", sha256="dd12428426a4963d6eb3cfdd818acef7a3c4cddf32504df17f4c1004fa902bef") version("6.1.2", sha256="5553b76d4c8b6381d236197613720587377d03d4fd43a5a20bb6a716d49f7dfc") @@ -75,6 +76,7 @@ def url_for_version(self, version): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-smi-lib@{ver}", type=("build", "link"), when=f"@{ver}") depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}") @@ -93,9 +95,10 @@ def url_for_version(self, version): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-core@{ver}", when=f"@{ver}") - for ver in ["6.2.0", "6.2.1"]: + for ver in ["6.2.0", "6.2.1", "6.2.4"]: depends_on(f"amdsmi@{ver}", when=f"@{ver}") def patch(self): diff --git a/var/spack/repos/builtin/packages/rocal/package.py b/var/spack/repos/builtin/packages/rocal/package.py index 30902117ed0747..5ceeef3cc97211 100644 --- a/var/spack/repos/builtin/packages/rocal/package.py +++ b/var/spack/repos/builtin/packages/rocal/package.py @@ -17,6 +17,7 @@ class Rocal(CMakePackage): license("MIT") + version("6.2.4", sha256="630813669e75a8ee179b89f489101931a26f7a7ee486fcbe1b0e3cb1803c582c") version("6.2.1", sha256="77d3e63e02afaee6f1ee1d877d88b48c6ea66a0afca96a1313d0f1c4f8e86b2a") version("6.2.0", sha256="c7c265375a40d4478a628258378726c252caac424f974456d488fce43890e157") @@ -25,7 +26,7 @@ class Rocal(CMakePackage): depends_on("rapidjson") depends_on("ffmpeg@4.4:") - for ver in ["6.2.0", "6.2.1"]: + for ver in ["6.2.0", "6.2.1", "6.2.4"]: depends_on(f"mivisionx@{ver}", when=f"@{ver}") depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}") depends_on(f"rpp@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/rocalution/package.py b/var/spack/repos/builtin/packages/rocalution/package.py index 229cc402c1d49c..0f7a517aec3b7b 100644 --- a/var/spack/repos/builtin/packages/rocalution/package.py +++ b/var/spack/repos/builtin/packages/rocalution/package.py @@ -26,6 +26,7 @@ class Rocalution(CMakePackage): libraries = ["librocalution_hip"] license("MIT") + version("6.2.4", sha256="993c55e732d0ee390746890639486649f36ae806110cf7490b9bb5d49b0663c0") version("6.2.1", sha256="94f15add5316c81529ce84ae8bf2701e9a4df57d08eda04a2f70147d31b12632") version("6.2.0", sha256="fd9ad0aae5524d3995343d4d7c1948e7b21f0bdf5b1203d1de58548a814a9c39") version("6.1.2", sha256="5f9fb302ab1951a1caf54ed31b41d6f41a353dd4b5ee32bc3de2e9f9244dd4ef") @@ -81,6 +82,7 @@ class Rocalution(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"hip@{ver}", when=f"@{ver}") depends_on(f"rocprim@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/rocblas/package.py b/var/spack/repos/builtin/packages/rocblas/package.py index 066230a5fe7eeb..e75274282fac10 100644 --- a/var/spack/repos/builtin/packages/rocblas/package.py +++ b/var/spack/repos/builtin/packages/rocblas/package.py @@ -13,7 +13,7 @@ class Rocblas(CMakePackage): homepage = "https://github.com/ROCm/rocBLAS/" git = "https://github.com/ROCm/rocBLAS.git" - url = "https://github.com/ROCm/rocBLAS/archive/rocm-6.1.1.tar.gz" + url = "https://github.com/ROCm/rocBLAS/archive/rocm-6.2.4.tar.gz" tags = ["rocm"] maintainers("cgmb", "srekolam", "renjithravindrankannath", "haampie") @@ -23,6 +23,7 @@ class Rocblas(CMakePackage): version("develop", branch="develop") version("master", branch="master") + version("6.2.4", sha256="8bacf74e3499c445f1bb0a8048df1ef3ce6f72388739b1823b5784fd1e8aa22a") version("6.2.1", sha256="cf3bd7b47694f95f387803191615e2ff5c1106175473be7a5b2e8eb6fb99179f") version("6.2.0", sha256="184e9b39dcbed57c25f351b047d44c613f8a2bbab3314a20c335f024a12ad4e5") version("6.1.2", sha256="1e83918bd7b28ec9ee292c6fb7eb0fc5f4db2d5d831a9a3db541f14a90c20a1a") @@ -83,10 +84,11 @@ class Rocblas(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-openmp-extras@{ver}", type="test", when=f"@{ver}") - for ver in ["6.2.0", "6.2.1"]: + for ver in ["6.2.0", "6.2.1", "6.2.4"]: depends_on(f"rocm-smi-lib@{ver}", type="test", when=f"@{ver}") depends_on("rocm-cmake@master", type="build", when="@master:") @@ -109,6 +111,7 @@ class Rocblas(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"hip@{ver}", when=f"@{ver}") depends_on(f"llvm-amdgpu@{ver}", type="build", when=f"@{ver}") @@ -147,6 +150,7 @@ class Rocblas(CMakePackage): ("@6.1.2", "2b55ccf58712f67b3df0ca53b0445f094fcb96b2"), ("@6.2.0", "dbc2062dced66e4cbee8e0591d76e0a1588a4c70"), ("@6.2.1", "dbc2062dced66e4cbee8e0591d76e0a1588a4c70"), + ("@6.2.4", "81ae9537671627fe541332c0a5d953bfd6af71d6"), ]: resource( name="Tensile", diff --git a/var/spack/repos/builtin/packages/rocdecode/package.py b/var/spack/repos/builtin/packages/rocdecode/package.py index bac7679a15b5b4..6a48c8a7c777f1 100644 --- a/var/spack/repos/builtin/packages/rocdecode/package.py +++ b/var/spack/repos/builtin/packages/rocdecode/package.py @@ -18,6 +18,7 @@ class Rocdecode(CMakePackage): maintainers("afzpatel", "srekolam", "renjithravindrankannath") license("MIT") + version("6.2.4", sha256="37aaa1299cfc517ddaf60b0e8a5cf06d672f59e8acc0da3862b40b810d4931cb") version("6.2.1", sha256="d4a636415d61fef94f97197cb9ebbff59e3a18dc4850612ee142e3e14a35e6d4") version("6.2.0", sha256="fe0d7c19a4e65b93405566511880b94f25ef68c830d0088f9458da9baea1d4f9") version("6.1.2", sha256="67a13aeaa495e06683124de5908e61cf2be3beff79b13d858897344aa809775e") @@ -35,7 +36,7 @@ class Rocdecode(CMakePackage): depends_on("libva", type="build", when="@6.2:") - for ver in ["6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1"]: + for ver in ["6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]: depends_on(f"hip@{ver}", when=f"@{ver}") def patch(self): diff --git a/var/spack/repos/builtin/packages/rocfft/package.py b/var/spack/repos/builtin/packages/rocfft/package.py index a93af207f56b7d..65381c97561718 100644 --- a/var/spack/repos/builtin/packages/rocfft/package.py +++ b/var/spack/repos/builtin/packages/rocfft/package.py @@ -21,6 +21,7 @@ class Rocfft(CMakePackage): license("MIT") version("master", branch="master") + version("6.2.4", sha256="8ddc4e779a84b73c21b054ae37fec69e5c2f248589c7fb1b84a2197baf6ce995") version("6.2.1", sha256="662d56cbc4c40a82e2f320bfc8e48a571a448e19c04a9ce30d3419b47fcf3574") version("6.2.0", sha256="c9886ec2c713c502dcde4f5fed3d6e1a7dd019023fb07e82d3b622e66c6f2c36") version("6.1.2", sha256="6f54609b0ecb8ceae8b7acd4c8692514c2c2dbaf0f8b199fe990fd4711428193") @@ -92,6 +93,7 @@ class Rocfft(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", "master", ]: depends_on(f"hip@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/rocm-bandwidth-test/package.py b/var/spack/repos/builtin/packages/rocm-bandwidth-test/package.py index 6f5a845b0a7145..cdb37eb391f58d 100644 --- a/var/spack/repos/builtin/packages/rocm-bandwidth-test/package.py +++ b/var/spack/repos/builtin/packages/rocm-bandwidth-test/package.py @@ -12,12 +12,13 @@ class RocmBandwidthTest(CMakePackage): homepage = "https://github.com/ROCm/rocm_bandwidth_test" git = "https://github.com/ROCm/rocm_bandwidth_test.git" - url = "https://github.com/ROCm/rocm_bandwidth_test/archive/rocm-6.1.2.tar.gz" + url = "https://github.com/ROCm/rocm_bandwidth_test/archive/rocm-6.2.4.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") version("master", branch="master") + version("6.2.4", sha256="4d25c62d81f60eba8042f57ca0905adc853a214333ffc70238d91e2f53606a79") version("6.2.1", sha256="042cfe3adc0f0ad0b8620e361b2846eb57c7b54837ed7a8c3a773e6fdc4e1af4") version("6.2.0", sha256="ca4caa4470c7ad0f1a4963072c1a25b0fd243844a72b26c83fcbca1e82091a41") version("6.1.2", sha256="4259d53350d6731613d36c03593750547f84f084569f8017783947486b8189da") @@ -59,6 +60,7 @@ class RocmBandwidthTest(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", "master", ]: depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}") @@ -78,6 +80,7 @@ class RocmBandwidthTest(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-core@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/rocm-cmake/package.py b/var/spack/repos/builtin/packages/rocm-cmake/package.py index a540d2c7265797..b4c97fbdfefefc 100644 --- a/var/spack/repos/builtin/packages/rocm-cmake/package.py +++ b/var/spack/repos/builtin/packages/rocm-cmake/package.py @@ -13,7 +13,7 @@ class RocmCmake(CMakePackage): homepage = "https://github.com/ROCm/rocm-cmake" git = "https://github.com/ROCm/rocm-cmake.git" - url = "https://github.com/ROCm/rocm-cmake/archive/rocm-6.1.2.tar.gz" + url = "https://github.com/ROCm/rocm-cmake/archive/rocm-6.2.4.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") @@ -21,6 +21,7 @@ class RocmCmake(CMakePackage): license("MIT") version("master", branch="master") + version("6.2.4", sha256="76bfac6fba31a9c4ec196d9b9b2d5ec51b8b68840b3fba8686aa42323d76a425") version("6.2.1", sha256="5ea05ad58186ac9bac40ab083c1e769a36ecaed950f82e88863169a25bc6ac8f") version("6.2.0", sha256="7b6aaa1bb616669636aa2cd5dbc7fdb7cd05642a8dcc61138e0efb7d0dc7e1a3") version("6.1.2", sha256="0757bb90f25d6f1e6bc93bdd1e238f76bbaddf154d66f94f37e40c425dc6d259") @@ -58,6 +59,7 @@ class RocmCmake(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-core@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/rocm-core/package.py b/var/spack/repos/builtin/packages/rocm-core/package.py index a05f5f8bc12626..318fb7fb32b264 100644 --- a/var/spack/repos/builtin/packages/rocm-core/package.py +++ b/var/spack/repos/builtin/packages/rocm-core/package.py @@ -13,13 +13,14 @@ class RocmCore(CMakePackage): getROCmVersion function provides the ROCm version.""" homepage = "https://github.com/ROCm/rocm-core" - url = "https://github.com/ROCm/rocm-core/archive/refs/tags/rocm-6.0.0.tar.gz" + url = "https://github.com/ROCm/rocm-core/archive/refs/tags/rocm-6.2.4.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") libraries = ["librocm-core"] license("MIT") + version("6.2.4", sha256="46dcfb5d20d242cd0ce6d02ba64d92bdd3ea59c103cf47b665c7d7a4ea7dc7f1") version("6.2.1", sha256="35cb5f6dfb1847469930bf0fa0913499b6c3f59b2b573a9f598b0956104ba5e2") version("6.2.0", sha256="9bafaf801721e98b398624c8d2fa78618d297d6800f96113e26c275889205526") version("6.1.2", sha256="ce9cbe12977f2058564ecb4cdcef4fd0d7880f6eff8591630f542441092f4fa3") @@ -42,7 +43,7 @@ class RocmCore(CMakePackage): depends_on("cxx", type="build") # generated - for ver in ["6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1"]: + for ver in ["6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]: depends_on("llvm-amdgpu", when=f"@{ver}+asan") def setup_build_environment(self, env): diff --git a/var/spack/repos/builtin/packages/rocm-dbgapi/package.py b/var/spack/repos/builtin/packages/rocm-dbgapi/package.py index 2887b61fc751a2..f146a614e4ae41 100644 --- a/var/spack/repos/builtin/packages/rocm-dbgapi/package.py +++ b/var/spack/repos/builtin/packages/rocm-dbgapi/package.py @@ -16,7 +16,7 @@ class RocmDbgapi(CMakePackage): homepage = "https://github.com/ROCm/ROCdbgapi" git = "https://github.com/ROCm/ROCdbgapi.git" - url = "https://github.com/ROCm/ROCdbgapi/archive/rocm-6.1.2.tar.gz" + url = "https://github.com/ROCm/ROCdbgapi/archive/rocm-6.2.1.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath", "afzpatel") @@ -25,6 +25,7 @@ class RocmDbgapi(CMakePackage): license("MIT") version("master", branch="amd-master") + version("6.2.4", sha256="004e9ace3ead840e44f98fc033b621d5489a554965deecfdb7df768482068282") version("6.2.1", sha256="40064ca031e41ff3c87bfa31406b7192fa65709ab36734eddad87e0ecc01bb80") version("6.2.0", sha256="311811ce0970ee83206791c21d539f351ddeac56ce3ff7efbefc830038748c0c") version("6.1.2", sha256="6e55839e3d95c2cfe3ff89e3e31da77aeecc74012a17f5308589e8808df78026") @@ -73,6 +74,7 @@ class RocmDbgapi(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", "master", ]: depends_on(f"hsa-rocr-dev@{ver}", type="build", when=f"@{ver}") @@ -92,6 +94,7 @@ class RocmDbgapi(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-core@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/rocm-debug-agent/package.py b/var/spack/repos/builtin/packages/rocm-debug-agent/package.py index 9eb080920a8402..4febed99a9c139 100644 --- a/var/spack/repos/builtin/packages/rocm-debug-agent/package.py +++ b/var/spack/repos/builtin/packages/rocm-debug-agent/package.py @@ -13,11 +13,12 @@ class RocmDebugAgent(CMakePackage): homepage = "https://github.com/ROCm/rocr_debug_agent" git = "https://github.com/ROCm/rocr_debug_agent.git" - url = "https://github.com/ROCm/rocr_debug_agent/archive/rocm-6.1.2.tar.gz" + url = "https://github.com/ROCm/rocr_debug_agent/archive/rocm-6.2.4.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") libraries = ["librocm-debug-agent"] + version("6.2.4", sha256="a4f213a9e28a1e82543135c0b6d16c5a252186f83fc842f980631943f7e11398") version("6.2.1", sha256="933223ff6e0aefb54917f4102ac6679dcd67e25ade4bce5e49f5212f45e3bae5") version("6.2.0", sha256="a4b839c47b8a1cd8d00c3577eeeea04d3661210eb8124e221d88bcbedc742363") version("6.1.2", sha256="c7cb779915a3d61e39d92cef172997bcf5eae720308f6d9c363a2cbc71b5621c") @@ -66,6 +67,7 @@ class RocmDebugAgent(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}") depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}") @@ -85,6 +87,7 @@ class RocmDebugAgent(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-core@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/rocm-device-libs/package.py b/var/spack/repos/builtin/packages/rocm-device-libs/package.py index 50923445e6b515..7a81736be43bdb 100644 --- a/var/spack/repos/builtin/packages/rocm-device-libs/package.py +++ b/var/spack/repos/builtin/packages/rocm-device-libs/package.py @@ -25,6 +25,7 @@ def url_for_version(self, version): maintainers("srekolam", "renjithravindrankannath", "haampie") version("master", branch="amd-stg-open") + version("6.2.4", sha256="7af782bf5835fcd0928047dbf558f5000e7f0207ca39cf04570969343e789528") version("6.2.1", sha256="4840f109d8f267c28597e936c869c358de56b8ad6c3ed4881387cf531846e5a7") version("6.2.0", sha256="12ce17dc920ec6dac0c5484159b3eec00276e4a5b301ab1250488db3b2852200") version("6.1.2", sha256="300e9d6a137dcd91b18d5809a316fddb615e0e7f982dc7ef1bb56876dff6e097") @@ -77,6 +78,7 @@ def url_for_version(self, version): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", "master", ]: depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}") @@ -95,6 +97,7 @@ def url_for_version(self, version): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-core@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/rocm-gdb/package.py b/var/spack/repos/builtin/packages/rocm-gdb/package.py index c9ef9eb0ed4699..65ab1b77f8145e 100644 --- a/var/spack/repos/builtin/packages/rocm-gdb/package.py +++ b/var/spack/repos/builtin/packages/rocm-gdb/package.py @@ -12,12 +12,13 @@ class RocmGdb(AutotoolsPackage): based on GDB, the GNU source-level debugger.""" homepage = "https://github.com/ROCm/ROCgdb" - url = "https://github.com/ROCm/ROCgdb/archive/rocm-6.1.2.tar.gz" + url = "https://github.com/ROCm/ROCgdb/archive/rocm-6.2.4.tar.gz" tags = ["rocm"] license("LGPL-2.0-or-later") maintainers("srekolam", "renjithravindrankannath") + version("6.2.4", sha256="061d00f3d02ca64094008c5da185712712ccd3a922f6e126d5f203cdae2b9e04") version("6.2.1", sha256="bed312c3fbb9982166538036bb9fd4a75053117c65ba80e34dbdae629a8fe6e4") version("6.2.0", sha256="753fd4f34d49fb0297b01dca2dd7cdf12cd039caa622a5f2d153362d27a8659c") version("6.1.2", sha256="19208de18d503e1da79dc0c9085221072a68e299f110dc836204364fa1b532cc") @@ -52,6 +53,7 @@ class RocmGdb(AutotoolsPackage): depends_on("babeltrace@1.2.4", type="link") depends_on("gmp", type=("build", "link")) depends_on("mpfr", type=("build", "link")) + depends_on("pkgconfig", type="build") for ver in [ "5.3.0", @@ -71,6 +73,7 @@ class RocmGdb(AutotoolsPackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-dbgapi@{ver}", type="link", when=f"@{ver}") depends_on(f"comgr@{ver}", type="link", when=f"@{ver}") @@ -89,6 +92,7 @@ class RocmGdb(AutotoolsPackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-core@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/rocm-opencl/package.py b/var/spack/repos/builtin/packages/rocm-opencl/package.py index 44e96863f47797..29bb97ca009805 100644 --- a/var/spack/repos/builtin/packages/rocm-opencl/package.py +++ b/var/spack/repos/builtin/packages/rocm-opencl/package.py @@ -36,6 +36,7 @@ def url_for_version(self, version): license("MIT") version("master", branch="main") + version("6.2.4", sha256="0a3164af7f997a4111ade634152957378861b95ee72d7060eb01c86c87208c54") version("6.2.1", sha256="e9cff3a8663defdbda833d49c9e7160171eca14dc285ffe4061378607d6c890d") version("6.2.0", sha256="620e4c6a7f05651cc7a170bc4700fef8cae002420307a667c638b981d00b25e8") version("6.1.2", sha256="1a1e21640035d957991559723cd093f0c7e202874423667d2ba0c7662b01fea4") @@ -124,12 +125,13 @@ def url_for_version(self, version): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", "master", ]: depends_on(f"comgr@{ver}", type="build", when=f"@{ver}") depends_on(f"hsa-rocr-dev@{ver}", type="link", when=f"@{ver}") - for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1"]: + for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]: depends_on(f"aqlprofile@{ver}", type="link", when=f"@{ver}") for ver in [ @@ -146,6 +148,7 @@ def url_for_version(self, version): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-core@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/rocm-openmp-extras/package.py b/var/spack/repos/builtin/packages/rocm-openmp-extras/package.py index 471b662d4b207e..60c38610f599d0 100644 --- a/var/spack/repos/builtin/packages/rocm-openmp-extras/package.py +++ b/var/spack/repos/builtin/packages/rocm-openmp-extras/package.py @@ -33,6 +33,7 @@ "3de1c7a31a88c3f05a6a66ba6854ac8fdad1ce44462e561cb1e6ad59629029ce", "5f54d7c7c798bcf1cd47d3a7f17ceaf79991bf166cc5e47e5372a68e7cf7d520", "ac82e8da0c210ee14b911c833ae09a029a41541689930759737c135db52464a3", + "ad5674b5626ed6720ca5f8772542e8ed3fb7a9150ed7a86a1adbcd70a2074e8e", ] devlib = [ @@ -53,6 +54,7 @@ "300e9d6a137dcd91b18d5809a316fddb615e0e7f982dc7ef1bb56876dff6e097", "12ce17dc920ec6dac0c5484159b3eec00276e4a5b301ab1250488db3b2852200", "4840f109d8f267c28597e936c869c358de56b8ad6c3ed4881387cf531846e5a7", + "7af782bf5835fcd0928047dbf558f5000e7f0207ca39cf04570969343e789528", ] llvm = [ @@ -73,6 +75,7 @@ "300e9d6a137dcd91b18d5809a316fddb615e0e7f982dc7ef1bb56876dff6e097", "12ce17dc920ec6dac0c5484159b3eec00276e4a5b301ab1250488db3b2852200", "4840f109d8f267c28597e936c869c358de56b8ad6c3ed4881387cf531846e5a7", + "7af782bf5835fcd0928047dbf558f5000e7f0207ca39cf04570969343e789528", ] flang = [ @@ -93,6 +96,7 @@ "12418ea61cca58811b7e75fd9df48be568b406f84a489a41ba5a1fd70c47f7ba", "6af7785b1776aeb9229ce4e5083dcfd451e8450f6e5ebe34214560b13f679d96", "409ee98bf15e51ac68b7ed351f4582930dfa0288de042006e17eea6b64df5ad6", + "51c1308f324101e4b637e78cd2eb652e22f68f6d820991a76189c15131f971dc", ] extras = [ @@ -113,6 +117,7 @@ "2b9351fdb1cba229669233919464ae906ca8f70910c6fa508a2812b7c3bed123", "7cef51c980f29d8b46d8d4b110e4f2f75d93544cf7d63c5e5d158cf531aeec7d", "4b0d250b5ebd997ed6d5d057689c3f67dfb4d82f09f582ebb439ca9134fae48d", + "34c3506b0f6aefbf0bc7981ff2901b7a2df975a5b40c5eb078522499d81057f0", ] versions = [ @@ -133,6 +138,7 @@ "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ] versions_dict = dict() # type: Dict[str,Dict[str,str]] components = ["aomp", "devlib", "llvm", "flang", "extras"] @@ -150,12 +156,13 @@ class RocmOpenmpExtras(Package): """OpenMP support for ROCm LLVM.""" homepage = tools_url + "/aomp" - url = tools_url + "/aomp/archive/rocm-6.1.2.tar.gz" + url = tools_url + "/aomp/archive/rocm-6.2.4.tar.gz" tags = ["rocm"] license("Apache-2.0") maintainers("srekolam", "renjithravindrankannath", "estewart08", "afzpatel") + version("6.2.4", sha256=versions_dict["6.2.4"]["aomp"]) version("6.2.1", sha256=versions_dict["6.2.1"]["aomp"]) version("6.2.0", sha256=versions_dict["6.2.0"]["aomp"]) version("6.1.2", sha256=versions_dict["6.1.2"]["aomp"]) @@ -205,6 +212,7 @@ class RocmOpenmpExtras(Package): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-core@{ver}", when=f"@{ver}") @@ -265,7 +273,7 @@ class RocmOpenmpExtras(Package): placement="llvm-project", when=f"@{ver}", ) - for ver in ["6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1"]: + for ver in ["6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1", "6.2.4"]: depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}") depends_on(f"comgr@{ver}", when=f"@{ver}") depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/rocm-smi-lib/package.py b/var/spack/repos/builtin/packages/rocm-smi-lib/package.py index 9521ab6c5139f2..9b1b3a6d427a09 100644 --- a/var/spack/repos/builtin/packages/rocm-smi-lib/package.py +++ b/var/spack/repos/builtin/packages/rocm-smi-lib/package.py @@ -17,13 +17,14 @@ class RocmSmiLib(CMakePackage): homepage = "https://github.com/ROCm/rocm_smi_lib" git = "https://github.com/ROCm/rocm_smi_lib.git" - url = "https://github.com/ROCm/rocm_smi_lib/archive/rocm-6.1.2.tar.gz" + url = "https://github.com/ROCm/rocm_smi_lib/archive/rocm-6.2.4.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") libraries = ["librocm_smi64"] version("master", branch="master") + version("6.2.4", sha256="eb8986dd571f5862c2db693398c0dbec28e2754f764f6bd3cfb21be7699e4452") version("6.2.1", sha256="28543d099fa44b4b79644533644aba4b67fa48d477628dd5802c3b50cc78583a") version("6.2.0", sha256="95010dfc9de9c608b9ce159107585ff4adce82a52a38daab2a37870aca2428bf") version("6.1.2", sha256="01f46fb1cb8c7a16a4c4db61871ee710ed37c0f8bd3a2dbe3415d3de2dffb4ef") @@ -66,6 +67,7 @@ class RocmSmiLib(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-core@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/rocm-tensile/package.py b/var/spack/repos/builtin/packages/rocm-tensile/package.py index 8cd72abd51532e..e825788976f7eb 100644 --- a/var/spack/repos/builtin/packages/rocm-tensile/package.py +++ b/var/spack/repos/builtin/packages/rocm-tensile/package.py @@ -19,6 +19,7 @@ class RocmTensile(CMakePackage): license("MIT") maintainers("srekolam", "renjithravindrankannath", "haampie") + version("6.2.4", sha256="dd0721e4371c8752aa4b14362f75d7ebb7805f57dcb990e03ae08cef4a291383") version("6.2.1", sha256="29802dc65a7cea29f0e2608782c75db87e9c71eea8aeb485e856cf2861d83098") version("6.2.0", sha256="6f7d679bfffd1f723f2788b00fdcb1b4673b597f9f85c2cdaab3c2aa17afb33d") version("6.1.2", sha256="6a08190f6d9c8cc76764a68e2dd3e7af4759d4146ddc1c4b3370c7762a6f6d83") @@ -82,6 +83,7 @@ class RocmTensile(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-cmake@{ver}", type="build", when=f"@{ver}") depends_on(f"hip@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/rocm-validation-suite/package.py b/var/spack/repos/builtin/packages/rocm-validation-suite/package.py index 7cdce00f34af96..135f5405cb81b0 100644 --- a/var/spack/repos/builtin/packages/rocm-validation-suite/package.py +++ b/var/spack/repos/builtin/packages/rocm-validation-suite/package.py @@ -22,6 +22,7 @@ class RocmValidationSuite(CMakePackage): license("MIT") maintainers("srekolam", "renjithravindrankannath") + version("6.2.4", sha256="ccdea6e955ca145a29d47da74d77b14196c935b57502edaed37fd18029b5220c") version("6.2.1", sha256="7e1f4f391a5b31087585b250136f3a8c1fdf4c609880499575291c61b3ebbc15") version("6.2.0", sha256="03913a1aae426b9fbb7a4870f408a3af1b8b7d32766515eaccb43107673fe631") version("6.1.2", sha256="8ff0c4ec538841d6b8d008d3849a99173cc5a02df5cf4a11dc1d52f630e079c5") @@ -59,7 +60,7 @@ class RocmValidationSuite(CMakePackage): # It doesn't find package to include the library and include path without this patch. patch("009-replacing-rocm-path-with-package-path.patch", when="@6.0") patch("009-replacing-rocm-path-with-package-path-6.1.patch", when="@6.1:6.2.0") - patch("009-replacing-rocm-path-with-package-path-6.2.1.patch", when="@6.2.1") + patch("009-replacing-rocm-path-with-package-path-6.2.1.patch", when="@6.2.1:6.2.4") depends_on("cmake@3.5:", type="build") depends_on("zlib-api", type="link") depends_on("yaml-cpp~shared") @@ -88,6 +89,7 @@ def setup_build_environment(self, build_env): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"hip@{ver}", when=f"@{ver}") depends_on(f"rocminfo@{ver}", when=f"@{ver}") @@ -95,7 +97,7 @@ def setup_build_environment(self, build_env): depends_on(f"rocm-smi-lib@{ver}", when=f"@{ver}") depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}") depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}") - for ver in ["6.2.1"]: + for ver in ["6.2.1", "6.2.4"]: depends_on(f"hiprand@{ver}", when=f"@{ver}") depends_on(f"rocrand@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/rocminfo/package.py b/var/spack/repos/builtin/packages/rocminfo/package.py index 96c9e6c603a998..1d6199a2db3dec 100644 --- a/var/spack/repos/builtin/packages/rocminfo/package.py +++ b/var/spack/repos/builtin/packages/rocminfo/package.py @@ -12,12 +12,13 @@ class Rocminfo(CMakePackage): homepage = "https://github.com/ROCm/rocminfo" git = "https://github.com/ROCm/rocminfo.git" - url = "https://github.com/ROCm/rocminfo/archive/rocm-6.1.2.tar.gz" + url = "https://github.com/ROCm/rocminfo/archive/rocm-6.2.4.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath", "haampie") version("master", branch="master") + version("6.2.4", sha256="14d4b0e22e2314156091ac9ad1646dd20909dba3a43e037584a503a6754e7f9e") version("6.2.1", sha256="ae6e08962535e76a81ed872cbd6bf6860c46fa6e4e4bc8f7849c8781359798d8") version("6.2.0", sha256="4d9a9051bda3355f8d2050e981435cd02528a04264a7f61162d685e7e1629f73") version("6.1.2", sha256="882ebe3db60b6290a81a98e0bac9b8923fbf83966f1706fd24484700b8213bcc") @@ -60,6 +61,7 @@ class Rocminfo(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", "master", ]: depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}") @@ -79,6 +81,7 @@ class Rocminfo(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-core@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/rocmlir/package.py b/var/spack/repos/builtin/packages/rocmlir/package.py index 9167e316c88422..e450e941ec1394 100644 --- a/var/spack/repos/builtin/packages/rocmlir/package.py +++ b/var/spack/repos/builtin/packages/rocmlir/package.py @@ -18,6 +18,7 @@ class Rocmlir(CMakePackage): maintainers("srekolam", "afzpatel", "renjithravindrankannath") + version("6.2.4", sha256="3283685431fd59e20a6ac5737df22c7c7421901779a2a0b6dbd6c1ab1f1b5adb") version("6.2.1", sha256="eff594c6b6b97ac21bf268da49fcd016584cfe28c8ff64b0a20b8a9144dca683") version("6.2.0", sha256="889e021edab19657947716e0056176ca0298602a21c4b77e7e7b00467fdaa175") version("6.1.2", sha256="9bde02b898896301a30e7007e384b9de9cf8feac04f44c91a3b625e74788fda6") @@ -73,6 +74,7 @@ def patch(self): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"hip@{ver}", when=f"@{ver}") depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/rocprim/package.py b/var/spack/repos/builtin/packages/rocprim/package.py index 50241aac483848..9a5a96a8a3ce4d 100644 --- a/var/spack/repos/builtin/packages/rocprim/package.py +++ b/var/spack/repos/builtin/packages/rocprim/package.py @@ -17,6 +17,7 @@ class Rocprim(CMakePackage): license("MIT") maintainers("cgmb", "srekolam", "renjithravindrankannath") + version("6.2.4", sha256="c567aa5e3209dd00aefe5052dde8ceb5bcc3a4aeeeb3ad8dc322f8d0791fc07f") version("6.2.1", sha256="55cfa8a4224bcd2dcf2298e7938c983a8bb0c1c072fc8295c198e53785b521ac") version("6.2.0", sha256="cd9be3a030830c96c940dc69e4a00f2701539a7e10b62ab1181ab83eeef31e57") version("6.1.2", sha256="560b65fffb103c11bee710e4eb871fd47dd84dfe99f5762a19c5650e490fd85d") @@ -74,6 +75,7 @@ class Rocprim(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"hip@{ver}", when=f"@{ver}") depends_on(f"comgr@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/rocprofiler-dev/package.py b/var/spack/repos/builtin/packages/rocprofiler-dev/package.py index 590c34adf64fc2..e6b854148fa759 100644 --- a/var/spack/repos/builtin/packages/rocprofiler-dev/package.py +++ b/var/spack/repos/builtin/packages/rocprofiler-dev/package.py @@ -13,12 +13,13 @@ class RocprofilerDev(CMakePackage): homepage = "https://github.com/ROCm/rocprofiler" git = "https://github.com/ROCm/rocprofiler.git" - url = "https://github.com/ROCm/rocprofiler/archive/refs/tags/rocm-6.1.2.tar.gz" + url = "https://github.com/ROCm/rocprofiler/archive/refs/tags/rocm-6.2.4.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") libraries = ["librocprofiler64"] license("MIT") + version("6.2.4", sha256="898eae91938c2d08207b615db03a784c7f3090989bcf09260635d18aa5930a2c") version("6.2.1", sha256="6eb36dad67e3b294f210e21987c52aec666652cffa87b8af1f8077d5b7812245") version("6.2.0", sha256="79b4f29d051e62639b4bf2ca288035514d32e055fc759ff4a82d377bf7ca97ea") version("6.1.2", sha256="e6e8771b8c933c16a99192cc215fe964a95e1718ad286520c8272150e184bc06") @@ -61,13 +62,25 @@ class RocprofilerDev(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}") depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}") depends_on(f"rocminfo@{ver}", when=f"@{ver}") depends_on(f"roctracer-dev-api@{ver}", when=f"@{ver}") - for ver in ["5.7.0", "5.7.1", "6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1"]: + for ver in [ + "5.7.0", + "5.7.1", + "6.0.0", + "6.0.2", + "6.1.0", + "6.1.1", + "6.1.2", + "6.2.0", + "6.2.1", + "6.2.4", + ]: depends_on(f"hip@{ver}", when=f"@{ver}") depends_on(f"rocm-smi-lib@{ver}", when=f"@{ver}") @@ -85,6 +98,7 @@ class RocprofilerDev(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"aqlprofile@{ver}", when=f"@{ver}") depends_on(f"comgr@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/rocprofiler-register/package.py b/var/spack/repos/builtin/packages/rocprofiler-register/package.py index 2dab5a0d0a4f63..7192207872a24b 100644 --- a/var/spack/repos/builtin/packages/rocprofiler-register/package.py +++ b/var/spack/repos/builtin/packages/rocprofiler-register/package.py @@ -13,13 +13,14 @@ class RocprofilerRegister(CMakePackage): homepage = "https://github.com/ROCm/rocprofiler-register" git = "https://github.com/ROCm/rocprofiler-register.git" - url = "https://github.com/ROCm/rocprofiler-register/archive/refs/tags/rocm-6.2.0.tar.gz" + url = "https://github.com/ROCm/rocprofiler-register/archive/refs/tags/rocm-6.2.4.tar.gz" tags = ["rocm"] maintainers("afzpatel", "srekolam", "renjithravindrankannath") license("MIT") + version("6.2.4", sha256="e7c31d5e1100c1e8ae0a2c6de3bfea75341abc4a68d02b58089421e2a54bba54") version("6.2.1", sha256="161d3502863147df4daeadc538d0eb156c314c94634f8c34ee5994f046f8753f") version("6.2.0", sha256="5cdfdfc621da9ef5a6b828d1a3a342db222b648c91359f71651b9404bf7ba62c") version("6.1.2", sha256="aa57b234cc1db5ae32c7494f4a9120b95a1845b95469dad447f470a6aa5e3cc9") diff --git a/var/spack/repos/builtin/packages/rocpydecode/package.py b/var/spack/repos/builtin/packages/rocpydecode/package.py index c8bff2f24d4f7f..d4356625e20ac8 100644 --- a/var/spack/repos/builtin/packages/rocpydecode/package.py +++ b/var/spack/repos/builtin/packages/rocpydecode/package.py @@ -15,14 +15,15 @@ class Rocpydecode(CMakePackage): maintainers("afzpatel", "srekolam", "renjithravindrankannath") + version("6.2.4", sha256="9cdb8bdc65b54b2c02d6c950dd34cd702ec50d903aa4d252d1eb1f8cae8c0afb") version("6.2.1", sha256="34c595cfe40ad74fcec2f52e7cc7be3ad8c8334030b0e98eb36305b6f63edc0d") version("6.2.0", sha256="e465254cd3e96bbb59208e90293d7c6b7744b0fbcd928ef278ec568c83e63ff3") depends_on("py-pybind11") - depends_on("ffmpeg@4.4:5") + depends_on("ffmpeg@4.4:6") depends_on("dlpack") - for ver in ["6.2.0", "6.2.1"]: + for ver in ["6.2.0", "6.2.1", "6.2.4"]: depends_on(f"rocdecode@{ver}", when=f"@{ver}") def patch(self): @@ -45,5 +46,11 @@ def cmake_args(self): self.define("FFMPEG_INCLUDE_DIR", self.spec["ffmpeg"].prefix.include), self.define("CMAKE_INSTALL_PREFIX_PYTHON", self.spec.prefix), self.define("CMAKE_CXX_FLAGS", "-I{0}".format(self.spec["dlpack"].prefix.include)), + self.define( + "CMAKE_CXX_FLAGS", + "-DUSE_AVCODEC_GREATER_THAN_58_134 -I{0}".format( + self.spec["dlpack"].prefix.include + ), + ), ] return args diff --git a/var/spack/repos/builtin/packages/rocrand/package.py b/var/spack/repos/builtin/packages/rocrand/package.py index 7f99844408e122..a07c2a9c32ba1b 100644 --- a/var/spack/repos/builtin/packages/rocrand/package.py +++ b/var/spack/repos/builtin/packages/rocrand/package.py @@ -25,6 +25,7 @@ class Rocrand(CMakePackage): version("develop", branch="develop") version("master", branch="master") + version("6.2.4", sha256="94a2ea2413623b427ddf69365b3996c18721456965024c0dfac506a13c8dc547") version("6.2.1", sha256="ed07f638b5e30199251ddda6dd9ee53ee0ec49bcf37cc571a3de85c3a9833248") version("6.2.0", sha256="7f5318e9c9eb36fb3660392e97520268920c59af3a51af19633aabe5046ef1af") version("6.1.2", sha256="ac3c858c0f76188ac50574591aa6b41b27bda2af5925314451a44242319f28c8") @@ -124,6 +125,7 @@ class Rocrand(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"hip@{ver}", when=f"@{ver}") depends_on(f"rocm-cmake@{ver}:", type="build", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/rocsolver/package.py b/var/spack/repos/builtin/packages/rocsolver/package.py index f2043b98dbe39e..6f9ddb015d580e 100644 --- a/var/spack/repos/builtin/packages/rocsolver/package.py +++ b/var/spack/repos/builtin/packages/rocsolver/package.py @@ -15,7 +15,7 @@ class Rocsolver(CMakePackage): homepage = "https://github.com/ROCm/rocSOLVER" git = "https://github.com/ROCm/rocSOLVER.git" - url = "https://github.com/ROCm/rocSOLVER/archive/rocm-6.1.2.tar.gz" + url = "https://github.com/ROCm/rocSOLVER/archive/rocm-6.2.4.tar.gz" tags = ["rocm"] maintainers("cgmb", "srekolam", "renjithravindrankannath", "haampie") @@ -46,6 +46,7 @@ class Rocsolver(CMakePackage): version("develop", branch="develop") version("master", branch="master") + version("6.2.4", sha256="022863df6a9d51bd216e56dd4dc7d437584e48304cfdbc9c5751be1abfd7c73f") version("6.2.1", sha256="e1c19cd25f7119c116d1c63e2384e9c47a4ff7ae14bb42dfcef766a4d3a011d5") version("6.2.0", sha256="74cb799dcddfcbd6ee05398003416dbccd3d06d7f4b23e4324baac3f15440162") version("6.1.2", sha256="8cb45b6a4ed819b8e952c0bfdd8bf7dd941478ac656bea42a6d6751f459e66ea") @@ -106,6 +107,7 @@ class Rocsolver(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"hip@{ver}", when=f"@{ver}") depends_on(f"rocblas@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/rocsparse/package.py b/var/spack/repos/builtin/packages/rocsparse/package.py index 5e9b1c86dc15fc..aa52f5ed93584f 100644 --- a/var/spack/repos/builtin/packages/rocsparse/package.py +++ b/var/spack/repos/builtin/packages/rocsparse/package.py @@ -17,7 +17,7 @@ class Rocsparse(CMakePackage): homepage = "https://github.com/ROCm/rocSPARSE" git = "https://github.com/ROCm/rocSPARSE.git" - url = "https://github.com/ROCm/rocSPARSE/archive/rocm-6.1.1.tar.gz" + url = "https://github.com/ROCm/rocSPARSE/archive/rocm-6.2.4.tar.gz" tags = ["rocm"] maintainers("cgmb", "srekolam", "renjithravindrankannath") @@ -39,6 +39,7 @@ class Rocsparse(CMakePackage): conflicts("+asan", when="os=centos8") license("MIT") + version("6.2.4", sha256="1f86c2d439e777cd17724269da66997d351b3a1b83f44143361e9c77d80e2370") version("6.2.1", sha256="4691d689db0a03fc950dbc9d88471752f6d17f5382a4bd2f7e23dfb43fc7074c") version("6.2.0", sha256="d07357d180423cedbabc849983a2d4d79b0e9f4c9b5e07d4993043e646fe6df9") version("6.1.2", sha256="e8989c28085275e7c044b19fd2bc86d8493ce6a1b8545126f787722c535fe6eb") @@ -82,6 +83,7 @@ class Rocsparse(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"hip@{ver}", when=f"@{ver}") depends_on(f"rocprim@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/rocthrust/package.py b/var/spack/repos/builtin/packages/rocthrust/package.py index 29029e992a9bbb..37704c7daca1c0 100644 --- a/var/spack/repos/builtin/packages/rocthrust/package.py +++ b/var/spack/repos/builtin/packages/rocthrust/package.py @@ -18,6 +18,7 @@ class Rocthrust(CMakePackage): tags = ["rocm"] maintainers("cgmb", "srekolam", "renjithravindrankannath") + version("6.2.4", sha256="ec212f3f5ff1ff3c71b85dae50d19c1faa344d400b5d1fa376471c2390361dc8") version("6.2.1", sha256="de6121e354e4d2d5f90243acc1071e9afb2a335e17570d293b590b85f3f58fa2") version("6.2.0", sha256="8037aadf7ec3d548aa17944e0a47465d608dc6eb7347173a6d76cbf5342e4ab6") version("6.1.2", sha256="149ca325fb8a8527781ec2853282a73bf66f60366652c19e8583afc3f1a9c4b6") @@ -71,6 +72,7 @@ class Rocthrust(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"hip@{ver}", when=f"@{ver}") depends_on(f"rocprim@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/roctracer-dev-api/package.py b/var/spack/repos/builtin/packages/roctracer-dev-api/package.py index 5491e5d8fcd115..5363bad9e3aa9a 100644 --- a/var/spack/repos/builtin/packages/roctracer-dev-api/package.py +++ b/var/spack/repos/builtin/packages/roctracer-dev-api/package.py @@ -13,12 +13,13 @@ class RoctracerDevApi(Package): homepage = "https://github.com/ROCm/roctracer" git = "https://github.com/ROCm/roctracer.git" - url = "https://github.com/ROCm/roctracer/archive/refs/tags/rocm-6.1.2.tar.gz" + url = "https://github.com/ROCm/roctracer/archive/refs/tags/rocm-6.2.4.tar.gz" tags = ["rocm"] license("MIT") maintainers("srekolam", "renjithravindrankannath") + version("6.2.4", sha256="b94c7db8ac57a4a1d7f8115020c36551220c20f33289fd06830495b4914a7d7b") version("6.2.1", sha256="9e69c90b9dc650e0d8642ec675082c9566e576285a725c3a5d07a37cebb18810") version("6.2.0", sha256="2fc39f47161f41cc041cd5ee4b1bb0e9832508650e832434056423fec3739735") version("6.1.2", sha256="073e67e728d5eda16d7944f3abd96348b3f278e9f36cab3ac22773ebaad0d2d6") diff --git a/var/spack/repos/builtin/packages/roctracer-dev/package.py b/var/spack/repos/builtin/packages/roctracer-dev/package.py index 8f861b332df70c..90902a8707336a 100644 --- a/var/spack/repos/builtin/packages/roctracer-dev/package.py +++ b/var/spack/repos/builtin/packages/roctracer-dev/package.py @@ -22,6 +22,7 @@ class RoctracerDev(CMakePackage, ROCmPackage): libraries = ["libroctracer64"] license("MIT") + version("6.2.4", sha256="b94c7db8ac57a4a1d7f8115020c36551220c20f33289fd06830495b4914a7d7b") version("6.2.1", sha256="9e69c90b9dc650e0d8642ec675082c9566e576285a725c3a5d07a37cebb18810") version("6.2.0", sha256="2fc39f47161f41cc041cd5ee4b1bb0e9832508650e832434056423fec3739735") version("6.1.2", sha256="073e67e728d5eda16d7944f3abd96348b3f278e9f36cab3ac22773ebaad0d2d6") @@ -68,6 +69,7 @@ class RoctracerDev(CMakePackage, ROCmPackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}") depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}") @@ -91,6 +93,7 @@ class RoctracerDev(CMakePackage, ROCmPackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on(f"rocm-core@{ver}", when=f"@{ver}") diff --git a/var/spack/repos/builtin/packages/rocwmma/package.py b/var/spack/repos/builtin/packages/rocwmma/package.py index 5fa810eb353b09..3d528cf70bfe7a 100644 --- a/var/spack/repos/builtin/packages/rocwmma/package.py +++ b/var/spack/repos/builtin/packages/rocwmma/package.py @@ -27,6 +27,7 @@ class Rocwmma(CMakePackage): license("MIT") maintainers("srekolam", "renjithravindrankannath") + version("6.2.4", sha256="eaa2f313a1bfe455d9641df44d7b890ea7334b58a643c75f0b7f108cae5f777c") version("6.2.1", sha256="f05fcb3612827502d2a15b30f0e46228625027145013652b8f591ad403fa9ddc") version("6.2.0", sha256="08c5d19f0417ee9ba0e37055152b22f64ed0eab1d9ab9a7d13d46bf8d3b255dc") version("6.1.2", sha256="7f6171bea5c8b7cdaf5c64dbfb76eecf606f2d34e8409153a74b56027c5e92a7") @@ -89,6 +90,7 @@ class Rocwmma(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver) depends_on("llvm-amdgpu@" + ver, type="build", when="@" + ver) @@ -108,6 +110,7 @@ class Rocwmma(CMakePackage): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on("rocm-smi-lib@" + ver, when="@" + ver) diff --git a/var/spack/repos/builtin/packages/rpp/package.py b/var/spack/repos/builtin/packages/rpp/package.py index c5547f80e0fd2a..fdb6e84ad01ae8 100644 --- a/var/spack/repos/builtin/packages/rpp/package.py +++ b/var/spack/repos/builtin/packages/rpp/package.py @@ -28,6 +28,7 @@ def url_for_version(self, version): maintainers("srekolam", "afzpatel") license("MIT") + version("6.2.4", sha256="e733350e938ce8d2f7d6d43d2bfd0febd270d52673bafa0265ed97bb850289de") version("6.2.1", sha256="5ae9d0c6733ba0e00be1cda13003e98acebd3f86de59e6f1969e297d673f124e") version("6.2.0", sha256="69fbebf50b734e055258ea3c5b0399a51babab8f66074166d2b0fc4f1904c09c") version("6.1.2", sha256="3a529bdd17b448a9e05a6aac1b5e173a077f4a4a1fd2ed759bcea331acd2829f") @@ -164,6 +165,7 @@ def patch(self): "6.1.2", "6.2.0", "6.2.1", + "6.2.4", ]: depends_on("hip@" + ver, when="@" + ver) with when("@:1.2"): From f181ac199a6723165b71b7210e990002fc32d71f Mon Sep 17 00:00:00 2001 From: Stephen Herbener <32968781+srherbener@users.noreply.github.com> Date: Thu, 5 Dec 2024 19:46:56 -0700 Subject: [PATCH 16/69] Upgraded version specs for ECMWF packages: eckit, atlas, ectrans, fckit, fiat (#47749) --- var/spack/repos/builtin/packages/eckit/package.py | 2 ++ var/spack/repos/builtin/packages/ecmwf-atlas/package.py | 2 ++ var/spack/repos/builtin/packages/ectrans/package.py | 2 ++ var/spack/repos/builtin/packages/fckit/package.py | 2 ++ var/spack/repos/builtin/packages/fiat/package.py | 2 ++ 5 files changed, 10 insertions(+) diff --git a/var/spack/repos/builtin/packages/eckit/package.py b/var/spack/repos/builtin/packages/eckit/package.py index 25789ba3f0368b..fdfe2eab6961d5 100644 --- a/var/spack/repos/builtin/packages/eckit/package.py +++ b/var/spack/repos/builtin/packages/eckit/package.py @@ -20,6 +20,8 @@ class Eckit(CMakePackage): license("Apache-2.0") + version("1.28.3", sha256="24b2b8d9869849a646aa3fd9d95e4181a92358cd837d95b22e25d718a6ad7738") + version("1.28.2", sha256="d122db8bb5bcaadf3256a24f0f90d9bcedad35ef8f25e7eccd8c93c506dbdd24") version("1.27.0", sha256="499f3f8c9aec8d3f42369e3ceedc98b2b09ac04993cfd38dfdf7d38931703fe7") version("1.25.2", sha256="a611d26d50a9f2133b75100567a890eb0e0a48a96669b8c8475baf9d6f359397") version("1.24.5", sha256="2fd74e04c20a59f9e13635828d9da880e18f8a2cb7fd3bfd0201e07071d6ec41") diff --git a/var/spack/repos/builtin/packages/ecmwf-atlas/package.py b/var/spack/repos/builtin/packages/ecmwf-atlas/package.py index 9a4d7b874b6f05..1e6546904c0067 100644 --- a/var/spack/repos/builtin/packages/ecmwf-atlas/package.py +++ b/var/spack/repos/builtin/packages/ecmwf-atlas/package.py @@ -22,6 +22,8 @@ class EcmwfAtlas(CMakePackage): version("master", branch="master") version("develop", branch="develop") + version("0.40.0", sha256="9aa2c8945a04aff3d50f752147e2b7cf0992c33e7e5a0e7bcd6fe575b0f853b0") + version("0.39.0", sha256="bdfc37b5f3f871651b1bb47ae4742988b03858037e36fdca775e220e3abe3bd6") version("0.38.1", sha256="c6868deb483c1d6c241aae92f8af63f3351062c2611c9163e8a9bbf6c97a9798") version("0.38.0", sha256="befe3bfc045bc0783126efb72ed55db9f205eaf176e1b8a2059eaaaaacc4880a") version("0.36.0", sha256="39bf748aa7b22df80b9791fbb6b4351ed9a9f85587b58fc3225314278a2a68f8") diff --git a/var/spack/repos/builtin/packages/ectrans/package.py b/var/spack/repos/builtin/packages/ectrans/package.py index 0199acb8b836ca..b8acf4da02be73 100644 --- a/var/spack/repos/builtin/packages/ectrans/package.py +++ b/var/spack/repos/builtin/packages/ectrans/package.py @@ -23,6 +23,8 @@ class Ectrans(CMakePackage): version("develop", branch="develop", no_cache=True) version("main", branch="main", no_cache=True) + version("1.5.0", sha256="8b2b24d1988b92dc3793b29142946614fca9e9c70163ee207d2a123494430fde") + version("1.4.0", sha256="1364827511a2eb11716aaee85062c3ab0e6b5d5dca7a7b9c364e1c43482b8691") version("1.2.0", sha256="2ee6dccc8bbfcc23faada1d957d141f24e41bb077c1821a7bc2b812148dd336c") version("1.1.0", sha256="3c9848bb65033fbe6d791084ee347b3adf71d5dfe6d3c11385000017b6469a3e") diff --git a/var/spack/repos/builtin/packages/fckit/package.py b/var/spack/repos/builtin/packages/fckit/package.py index 89b1e3105e95b6..c17f23f2931de6 100644 --- a/var/spack/repos/builtin/packages/fckit/package.py +++ b/var/spack/repos/builtin/packages/fckit/package.py @@ -22,6 +22,8 @@ class Fckit(CMakePackage): version("master", branch="master") version("develop", branch="develop") + version("0.13.2", sha256="990623eb4eb999145f2d852da9fbd71a69e2e0be601c655c274e8382750dfda2") + version("0.13.1", sha256="89a067a7b5b1f2c7909739b567bd43b69f8a2d91e8cbcbac58655fb2d861db51") version("0.11.0", sha256="846f5c369940c0a3d42cd12932f7d6155339e79218d149ebbfdd02e759dc86c5") version("0.10.1", sha256="9cde04fefa50624bf89068ab793cc2e9437c0cd1c271a41af7d54dbd37c306be") version("0.10.0", sha256="f16829f63a01cdef5e158ed2a51f6d4200b3fe6dce8f251af158141a1afe482b") diff --git a/var/spack/repos/builtin/packages/fiat/package.py b/var/spack/repos/builtin/packages/fiat/package.py index e84b06000cf319..69bc44c3241bc5 100644 --- a/var/spack/repos/builtin/packages/fiat/package.py +++ b/var/spack/repos/builtin/packages/fiat/package.py @@ -19,6 +19,8 @@ class Fiat(CMakePackage): license("Apache-2.0") version("main", branch="main", no_cache=True) + version("1.4.1", sha256="7d49316150e59afabd853df0066b457a268731633898ab51f6f244569679c84a") + version("1.4.0", sha256="5dc5a8bcac5463690529d0d96d2c805cf9c0214d125cd483ee69d36995ff15d3") version("1.2.0", sha256="758147410a4a3c493290b87443b4091660b915fcf29f7c4d565c5168ac67745f") version("1.1.0", sha256="58354e60d29a1b710bfcea9b87a72c0d89c39182cb2c9523ead76a142c695f82") version("1.0.0", sha256="45afe86117142831fdd61771cf59f31131f2b97f52a2bd04ac5eae9b2ab746b8") From 94bd7b9afb8f905a443644c55b1cea2f786d7077 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 6 Dec 2024 17:01:46 +0100 Subject: [PATCH 17/69] build_environment: drop off by one fix (#47960) --- lib/spack/spack/build_environment.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index c46db63c83b3f6..337ec98eb10d4a 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -1426,27 +1426,20 @@ def make_stack(tb, stack=None): # We found obj, the Package implementation we care about. # Point out the location in the install method where we failed. filename = inspect.getfile(frame.f_code) - lineno = frame.f_lineno - if os.path.basename(filename) == "package.py": - # subtract 1 because we inject a magic import at the top of package files. - # TODO: get rid of the magic import. - lineno -= 1 - - lines = ["{0}:{1:d}, in {2}:".format(filename, lineno, frame.f_code.co_name)] + lines = [f"{filename}:{frame.f_lineno}, in {frame.f_code.co_name}:"] # Build a message showing context in the install method. sourcelines, start = inspect.getsourcelines(frame) # Calculate lineno of the error relative to the start of the function. - fun_lineno = lineno - start + fun_lineno = frame.f_lineno - start start_ctx = max(0, fun_lineno - context) sourcelines = sourcelines[start_ctx : fun_lineno + context + 1] for i, line in enumerate(sourcelines): is_error = start_ctx + i == fun_lineno - mark = ">> " if is_error else " " # Add start to get lineno relative to start of file, not function. - marked = " {0}{1:-6d}{2}".format(mark, start + start_ctx + i, line.rstrip()) + marked = f" {'>> ' if is_error else ' '}{start + start_ctx + i:-6d}{line.rstrip()}" if is_error: marked = colorize("@R{%s}" % cescape(marked)) lines.append(marked) From 5c88e035f2d74905ad63309f46535792716df740 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 6 Dec 2024 19:18:12 +0100 Subject: [PATCH 18/69] directives.py: remove redundant import (#47965) --- lib/spack/spack/directives.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/spack/spack/directives.py b/lib/spack/spack/directives.py index 2f152f813d9c59..08f6ec9ba95e3d 100644 --- a/lib/spack/spack/directives.py +++ b/lib/spack/spack/directives.py @@ -475,8 +475,6 @@ def provides(*specs: SpecType, when: WhenType = None): """ def _execute_provides(pkg: Type[spack.package_base.PackageBase]): - import spack.parser # Avoid circular dependency - when_spec = _make_when_spec(when) if not when_spec: return From 77e2187e133579691df67ec88d431bc518395621 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Fri, 6 Dec 2024 13:01:10 -0600 Subject: [PATCH 19/69] coverage.yml: fail_ci_if_error = true (#47731) --- .github/workflows/coverage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 600c06dc692680..be4302bfbc7464 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -32,3 +32,4 @@ jobs: uses: codecov/codecov-action@05f5a9cfad807516dbbef9929c4a42df3eb78766 with: verbose: true + fail_ci_if_error: true From 05acd29f384abf357f93fa760cfece736bd734cd Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Sat, 7 Dec 2024 10:08:04 +0100 Subject: [PATCH 20/69] extensions.py: remove import of spack.cmd (#47963) --- lib/spack/spack/cmd/__init__.py | 24 +++++++++++++++++++++ lib/spack/spack/extensions.py | 29 +------------------------- lib/spack/spack/repo.py | 3 +-- lib/spack/spack/test/cmd_extensions.py | 8 +++---- 4 files changed, 30 insertions(+), 34 deletions(-) diff --git a/lib/spack/spack/cmd/__init__.py b/lib/spack/spack/cmd/__init__.py index e0bcf6da8d0311..4b64a2529ac3e4 100644 --- a/lib/spack/spack/cmd/__init__.py +++ b/lib/spack/spack/cmd/__init__.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import argparse +import difflib import importlib import os import re @@ -125,6 +126,8 @@ def get_module(cmd_name): tty.debug("Imported {0} from built-in commands".format(pname)) except ImportError: module = spack.extensions.get_module(cmd_name) + if not module: + raise CommandNotFoundError(cmd_name) attr_setdefault(module, SETUP_PARSER, lambda *args: None) # null-op attr_setdefault(module, DESCRIPTION, "") @@ -691,3 +694,24 @@ def find_environment(args): def first_line(docstring): """Return the first line of the docstring.""" return docstring.split("\n")[0] + + +class CommandNotFoundError(spack.error.SpackError): + """Exception class thrown when a requested command is not recognized as + such. + """ + + def __init__(self, cmd_name): + msg = ( + f"{cmd_name} is not a recognized Spack command or extension command; " + "check with `spack commands`." + ) + long_msg = None + + similar = difflib.get_close_matches(cmd_name, all_commands()) + + if 1 <= len(similar) <= 5: + long_msg = "\nDid you mean one of the following commands?\n " + long_msg += "\n ".join(similar) + + super().__init__(msg, long_msg) diff --git a/lib/spack/spack/extensions.py b/lib/spack/spack/extensions.py index e13e3f17d42a0a..af7766f098caa7 100644 --- a/lib/spack/spack/extensions.py +++ b/lib/spack/spack/extensions.py @@ -5,7 +5,6 @@ """Service functions and classes to implement the hooks for Spack's command extensions. """ -import difflib import glob import importlib import os @@ -17,7 +16,6 @@ import llnl.util.lang -import spack.cmd import spack.config import spack.error import spack.util.path @@ -25,9 +23,6 @@ _extension_regexp = re.compile(r"spack-(\w[-\w]*)$") -# TODO: For consistency we should use spack.cmd.python_name(), but -# currently this would create a circular relationship between -# spack.cmd and spack.extensions. def _python_name(cmd_name): return cmd_name.replace("-", "_") @@ -211,8 +206,7 @@ def get_module(cmd_name): module = load_command_extension(cmd_name, folder) if module: return module - else: - raise CommandNotFoundError(cmd_name) + return None def get_template_dirs(): @@ -224,27 +218,6 @@ def get_template_dirs(): return extensions -class CommandNotFoundError(spack.error.SpackError): - """Exception class thrown when a requested command is not recognized as - such. - """ - - def __init__(self, cmd_name): - msg = ( - "{0} is not a recognized Spack command or extension command;" - " check with `spack commands`.".format(cmd_name) - ) - long_msg = None - - similar = difflib.get_close_matches(cmd_name, spack.cmd.all_commands()) - - if 1 <= len(similar) <= 5: - long_msg = "\nDid you mean one of the following commands?\n " - long_msg += "\n ".join(similar) - - super().__init__(msg, long_msg) - - class ExtensionNamingError(spack.error.SpackError): """Exception class thrown when a configured extension does not follow the expected naming convention. diff --git a/lib/spack/spack/repo.py b/lib/spack/spack/repo.py index c4a104c6b98008..502aa4734b6d1b 100644 --- a/lib/spack/spack/repo.py +++ b/lib/spack/spack/repo.py @@ -41,6 +41,7 @@ import spack.provider_index import spack.spec import spack.tag +import spack.tengine import spack.util.file_cache import spack.util.git import spack.util.naming as nm @@ -1485,8 +1486,6 @@ def add_package(self, name, dependencies=None): Both "dep_type" and "condition" can default to ``None`` in which case ``spack.dependency.default_deptype`` and ``spack.spec.Spec()`` are used. """ - import spack.tengine # avoid circular import - dependencies = dependencies or [] context = {"cls_name": nm.mod_to_class(name), "dependencies": dependencies} template = spack.tengine.make_environment().get_template("mock-repository/package.pyt") diff --git a/lib/spack/spack/test/cmd_extensions.py b/lib/spack/spack/test/cmd_extensions.py index 6a4fcc0fadd339..fe2ab2c70b780e 100644 --- a/lib/spack/spack/test/cmd_extensions.py +++ b/lib/spack/spack/test/cmd_extensions.py @@ -210,7 +210,7 @@ def test_missing_command(): """Ensure that we raise the expected exception if the desired command is not present. """ - with pytest.raises(spack.extensions.CommandNotFoundError): + with pytest.raises(spack.cmd.CommandNotFoundError): spack.cmd.get_module("no-such-command") @@ -220,9 +220,9 @@ def test_missing_command(): ("/my/bad/extension", spack.extensions.ExtensionNamingError), ("", spack.extensions.ExtensionNamingError), ("/my/bad/spack--extra-hyphen", spack.extensions.ExtensionNamingError), - ("/my/good/spack-extension", spack.extensions.CommandNotFoundError), - ("/my/still/good/spack-extension/", spack.extensions.CommandNotFoundError), - ("/my/spack-hyphenated-extension", spack.extensions.CommandNotFoundError), + ("/my/good/spack-extension", spack.cmd.CommandNotFoundError), + ("/my/still/good/spack-extension/", spack.cmd.CommandNotFoundError), + ("/my/spack-hyphenated-extension", spack.cmd.CommandNotFoundError), ], ids=["no_stem", "vacuous", "leading_hyphen", "basic_good", "trailing_slash", "hyphenated"], ) From f54c101b44ab3425a6d8a66b013551db715110b1 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Sat, 7 Dec 2024 07:26:31 -0800 Subject: [PATCH 21/69] py-jedi: add v0.19.2 (#47569) --- .../builtin/packages/py-ipykernel/package.py | 78 ++++++++++--- .../builtin/packages/py-ipython/package.py | 3 +- .../repos/builtin/packages/py-jedi/package.py | 104 ++++++++++++++---- .../builtin/packages/py-parso/package.py | 1 + 4 files changed, 149 insertions(+), 37 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-ipykernel/package.py b/var/spack/repos/builtin/packages/py-ipykernel/package.py index baeefe19d785d8..b46ac89868b0d0 100644 --- a/var/spack/repos/builtin/packages/py-ipykernel/package.py +++ b/var/spack/repos/builtin/packages/py-ipykernel/package.py @@ -38,24 +38,71 @@ class PyIpykernel(PythonPackage): version("5.3.4", sha256="9b2652af1607986a1b231c62302d070bc0534f564c393a5d9d130db9abbbe89d") version("5.1.1", sha256="f0e962052718068ad3b1d8bcc703794660858f58803c3798628817f492a8769c") version("5.1.0", sha256="0fc0bf97920d454102168ec2008620066878848fcfca06c22b669696212e292f") - version("4.10.0", sha256="699103c8e64886e3ec7053f2a6aa83bb90426063526f63a818732ff385202bad") - version("4.5.0", sha256="245a798edb8fd751b95750d8645d736dd739a020e7fc7d5627dac4d1c35d8295") - version("4.4.1", sha256="6d48398b3112efb733b254edede4b7f3262c28bd19f665b64ef1acf6ec5cd74f") - version("4.4.0", sha256="d516427c3bd689205e6693c9616302ef34017b91ada3c9ea3fca6e90702b7ffe") - version("4.3.1", sha256="8219d3eaa3e4d4efc5f349114e41a40f0986c91a960846bb81d5da817fb7cc3f") - version("4.3.0", sha256="f214c661328c836e02b6f185f98f3eccd7ce396791937493ffa1babf5e3267ab") - version("4.2.2", sha256="a876da43e01acec2c305abdd8e6aa55f052bab1196171ccf1cb9a6aa230298b0") - version("4.2.1", sha256="081a5d4db33db58697be2d682b92f79b2c239493445f13dd457c15bc3e52c874") - version("4.2.0", sha256="723b3d4baac20f0c9cd91fc75c3e813636ecb6c6e303fb34d628c3df078985a7") - version("4.1.1", sha256="d8c5555386d0f18f1336dea9800f9f0fe96dcecc9757c0f980e11fdfadb661ff") - version("4.1.0", sha256="e0e150ad55e487e49054efc9a4b0e2e17f27e1de77444b26760789077b146d86") + version( + "4.10.0", + sha256="699103c8e64886e3ec7053f2a6aa83bb90426063526f63a818732ff385202bad", + deprecated=True, + ) + version( + "4.5.0", + sha256="245a798edb8fd751b95750d8645d736dd739a020e7fc7d5627dac4d1c35d8295", + deprecated=True, + ) + version( + "4.4.1", + sha256="6d48398b3112efb733b254edede4b7f3262c28bd19f665b64ef1acf6ec5cd74f", + deprecated=True, + ) + version( + "4.4.0", + sha256="d516427c3bd689205e6693c9616302ef34017b91ada3c9ea3fca6e90702b7ffe", + deprecated=True, + ) + version( + "4.3.1", + sha256="8219d3eaa3e4d4efc5f349114e41a40f0986c91a960846bb81d5da817fb7cc3f", + deprecated=True, + ) + version( + "4.3.0", + sha256="f214c661328c836e02b6f185f98f3eccd7ce396791937493ffa1babf5e3267ab", + deprecated=True, + ) + version( + "4.2.2", + sha256="a876da43e01acec2c305abdd8e6aa55f052bab1196171ccf1cb9a6aa230298b0", + deprecated=True, + ) + version( + "4.2.1", + sha256="081a5d4db33db58697be2d682b92f79b2c239493445f13dd457c15bc3e52c874", + deprecated=True, + ) + version( + "4.2.0", + sha256="723b3d4baac20f0c9cd91fc75c3e813636ecb6c6e303fb34d628c3df078985a7", + deprecated=True, + ) + version( + "4.1.1", + sha256="d8c5555386d0f18f1336dea9800f9f0fe96dcecc9757c0f980e11fdfadb661ff", + deprecated=True, + ) + version( + "4.1.0", + sha256="e0e150ad55e487e49054efc9a4b0e2e17f27e1de77444b26760789077b146d86", + deprecated=True, + ) depends_on("py-hatchling@1.4:", when="@6.13.1:", type="build") with default_args(type=("build", "run")): - depends_on("python@3.8:", when="@6.22:") - # use of `imp` module - depends_on("python@:3.11", when="@:6.10") + depends_on("python@3.8:", when="@6.11:") + depends_on("python@3.8:3.11", when="@6:6.10") + depends_on("python@3.6:3.9", when="@5.5:5") + depends_on("python@3.5:3.8", when="@5.4") + depends_on("python@3.5:3.7", when="@5:5.3") + # depends_on("python@3.4:3.5", when="@4") with when("@6:"): depends_on("py-debugpy@1.6.5:", when="@6.22:") @@ -65,7 +112,8 @@ class PyIpykernel(PythonPackage): depends_on("py-matplotlib-inline@0.1:") depends_on("py-matplotlib-inline@:0.1", when="@:6.10") - depends_on("py-ipython@7.23.1:", when="@6:") + depends_on("py-ipython@7.23.1:", when="@6.5.1:") + depends_on("py-ipython@7.23.1:7", when="@6:6.5.0") depends_on("py-ipython@5:", when="@5:") depends_on("py-ipython@4:") depends_on("py-ipython@:7", when="@:6.5") diff --git a/var/spack/repos/builtin/packages/py-ipython/package.py b/var/spack/repos/builtin/packages/py-ipython/package.py index 25eafc5c6e41e0..7ce1a3b013088a 100644 --- a/var/spack/repos/builtin/packages/py-ipython/package.py +++ b/var/spack/repos/builtin/packages/py-ipython/package.py @@ -51,6 +51,7 @@ class PyIpython(PythonPackage): version("5.8.0", sha256="4bac649857611baaaf76bc82c173aa542f7486446c335fe1a6c05d0d491c8906") version("5.1.0", sha256="7ef4694e1345913182126b219aaa4a0047e191af414256da6772cf249571b961") + depends_on("python@3.10:", when="@8.19:", type=("build", "run")) depends_on("python@3.9:", when="@8.13.1:", type=("build", "run")) depends_on("python@3.8: +sqlite3", when="@8:", type=("build", "run")) depends_on("py-setuptools@61.2:", when="@8.22:", type="build") @@ -61,7 +62,7 @@ class PyIpython(PythonPackage): depends_on("py-colorama", when="platform=windows", type=("build", "run")) depends_on("py-decorator", type=("build", "run")) depends_on("py-exceptiongroup", when="@8.15: ^python@:3.10", type=("build", "run")) - depends_on("py-jedi@0.16:", when="@7.18,7.20:", type=("build", "run")) + depends_on("py-jedi@0.16:0.18", when="@7.18,7.20:", type=("build", "run")) depends_on("py-jedi@0.10:", when="@7.5:7.17,7.19", type=("build", "run")) depends_on("py-matplotlib-inline", when="@7.23:", type=("build", "run")) depends_on("py-pexpect@4.4:", when="@7.18: platform=linux", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-jedi/package.py b/var/spack/repos/builtin/packages/py-jedi/package.py index 7074588beef056..672714b1df9fe9 100644 --- a/var/spack/repos/builtin/packages/py-jedi/package.py +++ b/var/spack/repos/builtin/packages/py-jedi/package.py @@ -12,40 +12,102 @@ class PyJedi(PythonPackage): homepage = "https://github.com/davidhalter/jedi" pypi = "jedi/jedi-0.9.0.tar.gz" + maintainers("alecbcs") + license("MIT") + version("0.19.2", sha256="4770dc3de41bde3966b02eb84fbcf557fb33cce26ad23da12c742fb50ecb11f0") version("0.18.2", sha256="bae794c30d07f6d910d32a7048af09b5a39ed740918da923c6b780790ebac612") version("0.18.1", sha256="74137626a64a99c8eb6ae5832d99b3bdd7d29a3850fe2aa80a4126b2a7d949ab") version("0.18.0", sha256="92550a404bad8afed881a137ec9a461fed49eca661414be45059329614ed0707") version("0.17.2", sha256="86ed7d9b750603e4ba582ea8edc678657fb4007894a12bcf6f4bb97892f31d20") version("0.17.1", sha256="807d5d4f96711a2bcfdd5dfa3b1ae6d09aa53832b182090b222b5efb81f52f63") - version("0.15.1", sha256="ba859c74fa3c966a22f2aeebe1b74ee27e2a462f56d3f5f7ca4a59af61bfe42e") - version("0.15.0", sha256="9f16cb00b2aee940df2efc1d7d7c848281fd16391536a3d4561f5aea49db1ee6") - version("0.14.1", sha256="53c850f1a7d3cfcd306cc513e2450a54bdf5cacd7604b74e42dd1f0758eaaf36") - version("0.14.0", sha256="49ccb782651bb6f7009810d17a3316f8867dde31654c750506970742e18b553d") - version("0.13.3", sha256="2bb0603e3506f708e792c7f4ad8fc2a7a9d9c2d292a358fbbd58da531695595b") - version("0.13.2", sha256="571702b5bd167911fe9036e5039ba67f820d6502832285cde8c881ab2b2149fd") - version("0.13.1", sha256="b7493f73a2febe0dc33d51c99b474547f7f6c0b2c8fb2b21f453eef204c12148") - version("0.13.0", sha256="e4db7a2e08980e48c6aec6588483629c81fdcf9b6d9e6a372b40ed7fec91f310") - version("0.12.1", sha256="b409ed0f6913a701ed474a614a3bb46e6953639033e31f769ca7581da5bd1ec1") - version("0.12.0", sha256="1972f694c6bc66a2fac8718299e2ab73011d653a6d8059790c3476d2353b99ad") - version("0.10.2", sha256="7abb618cac6470ebbd142e59c23daec5e6e063bfcecc8a43a037d2ab57276f4e") - version("0.10.1", sha256="2420daf6fd00e80caf1bc22903598b5bf5560c900113dcc120eaefc7b4d50e06") + version( + "0.15.1", + sha256="ba859c74fa3c966a22f2aeebe1b74ee27e2a462f56d3f5f7ca4a59af61bfe42e", + deprecated=True, + ) + version( + "0.15.0", + sha256="9f16cb00b2aee940df2efc1d7d7c848281fd16391536a3d4561f5aea49db1ee6", + deprecated=True, + ) + version( + "0.14.1", + sha256="53c850f1a7d3cfcd306cc513e2450a54bdf5cacd7604b74e42dd1f0758eaaf36", + deprecated=True, + ) + version( + "0.14.0", + sha256="49ccb782651bb6f7009810d17a3316f8867dde31654c750506970742e18b553d", + deprecated=True, + ) + version( + "0.13.3", + sha256="2bb0603e3506f708e792c7f4ad8fc2a7a9d9c2d292a358fbbd58da531695595b", + deprecated=True, + ) + version( + "0.13.2", + sha256="571702b5bd167911fe9036e5039ba67f820d6502832285cde8c881ab2b2149fd", + deprecated=True, + ) + version( + "0.13.1", + sha256="b7493f73a2febe0dc33d51c99b474547f7f6c0b2c8fb2b21f453eef204c12148", + deprecated=True, + ) + version( + "0.13.0", + sha256="e4db7a2e08980e48c6aec6588483629c81fdcf9b6d9e6a372b40ed7fec91f310", + deprecated=True, + ) + version( + "0.12.1", + sha256="b409ed0f6913a701ed474a614a3bb46e6953639033e31f769ca7581da5bd1ec1", + deprecated=True, + ) + version( + "0.12.0", + sha256="1972f694c6bc66a2fac8718299e2ab73011d653a6d8059790c3476d2353b99ad", + deprecated=True, + ) + version( + "0.10.2", + sha256="7abb618cac6470ebbd142e59c23daec5e6e063bfcecc8a43a037d2ab57276f4e", + deprecated=True, + ) + version( + "0.10.1", + sha256="2420daf6fd00e80caf1bc22903598b5bf5560c900113dcc120eaefc7b4d50e06", + deprecated=True, + ) # unfortunately pypi.io only offers a .whl for 0.10.0 version( "0.10.0", sha256="d6a7344df9c80562c3f62199278004ccc7c5889be9f1a6aa5abde117ec085123", url="https://github.com/davidhalter/jedi/archive/v0.10.0.tar.gz", + deprecated=True, + ) + version( + "0.9.0", + sha256="3b4c19fba31bdead9ab7350fb9fa7c914c59b0a807dcdd5c00a05feb85491d31", + deprecated=True, ) - version("0.9.0", sha256="3b4c19fba31bdead9ab7350fb9fa7c914c59b0a807dcdd5c00a05feb85491d31") - depends_on("c", type="build") # generated + with default_args(type=("build", "run")): + depends_on("python@3.5:3.9", when="@0.17.1:") + depends_on("python@3.6:3.10", when="@0.18.1:") + depends_on("python@3.6:3.11", when="@0.19.0:") + depends_on("python@3.6:3.12", when="@0.19.1:") + depends_on("python@3.6:3.13", when="@0.19.2:") - depends_on("py-setuptools", type=("build", "run")) + depends_on("py-setuptools") - depends_on("py-parso@0.8", when="@0.18.0:", type=("build", "run")) - depends_on("py-parso@0.7", when="@0.17", type=("build", "run")) - depends_on("py-parso@0.5.2:", when="@0.15.2:0.16", type=("build", "run")) - depends_on("py-parso@0.5.0:", when="@0.14.1:0.15.1", type=("build", "run")) - depends_on("py-parso@0.3.0:", when="@0.12.1:0.14.0", type=("build", "run")) - depends_on("py-parso@0.2.0:", when="@0.12.0", type=("build", "run")) + depends_on("py-parso@0.2.0:", when="@0.12.0") + depends_on("py-parso@0.3.0:", when="@0.12.1:0.14.0") + depends_on("py-parso@0.5.0:", when="@0.14.1:0.15.1") + depends_on("py-parso@0.5.2:", when="@0.15.2:0.16") + depends_on("py-parso@0.7", when="@0.17") + depends_on("py-parso@0.8", when="@0.18.0:") + depends_on("py-parso@0.8.4:0.8", when="@0.19.2:") diff --git a/var/spack/repos/builtin/packages/py-parso/package.py b/var/spack/repos/builtin/packages/py-parso/package.py index ec01736ad67697..abcd9771fe6fd0 100644 --- a/var/spack/repos/builtin/packages/py-parso/package.py +++ b/var/spack/repos/builtin/packages/py-parso/package.py @@ -30,4 +30,5 @@ class PyParso(PythonPackage): depends_on("python@:3.12", when="@:0.8.3") # https://github.com/davidhalter/parso/commit/285492f4ed25f145859630ee6c5625e60aff6e2e depends_on("python@:3.11", when="@:0.8.2") + depends_on("py-setuptools", type="build") From 422f829e4e0e76a1906391174d69d3b01bcd6077 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Sun, 8 Dec 2024 09:31:22 +0100 Subject: [PATCH 22/69] mirrors: add missing init file (#47977) --- lib/spack/docs/conf.py | 3 --- lib/spack/spack/mirrors/__init__.py | 4 ++++ lib/spack/spack/mirrors/utils.py | 36 +++++++++++++---------------- 3 files changed, 20 insertions(+), 23 deletions(-) create mode 100644 lib/spack/spack/mirrors/__init__.py diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py index c73bf7c19636c2..688554fac6da13 100644 --- a/lib/spack/docs/conf.py +++ b/lib/spack/docs/conf.py @@ -222,9 +222,6 @@ def setup(sphinx): ("py:class", "spack.traverse.EdgeAndDepth"), ("py:class", "archspec.cpu.microarchitecture.Microarchitecture"), ("py:class", "spack.compiler.CompilerCache"), - ("py:class", "spack.mirrors.mirror.Mirror"), - ("py:class", "spack.mirrors.layout.MirrorLayout"), - ("py:class", "spack.mirrors.utils.MirrorStats"), # TypeVar that is not handled correctly ("py:class", "llnl.util.lang.T"), ] diff --git a/lib/spack/spack/mirrors/__init__.py b/lib/spack/spack/mirrors/__init__.py new file mode 100644 index 00000000000000..64a29a769cea89 --- /dev/null +++ b/lib/spack/spack/mirrors/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) diff --git a/lib/spack/spack/mirrors/utils.py b/lib/spack/spack/mirrors/utils.py index ba5aba37741c19..88e943bd2dc3b6 100644 --- a/lib/spack/spack/mirrors/utils.py +++ b/lib/spack/spack/mirrors/utils.py @@ -4,7 +4,6 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os import os.path -import sys import traceback import llnl.util.tty as tty @@ -214,7 +213,9 @@ def error(self): self.errors.add(self.current_spec) -def create_mirror_from_package_object(pkg_obj, mirror_cache, mirror_stats): +def create_mirror_from_package_object( + pkg_obj, mirror_cache: "spack.caches.MirrorCache", mirror_stats: MirrorStats +) -> bool: """Add a single package object to a mirror. The package object is only required to have an associated spec @@ -222,35 +223,30 @@ def create_mirror_from_package_object(pkg_obj, mirror_cache, mirror_stats): Args: pkg_obj (spack.package_base.PackageBase): package object with to be added. - mirror_cache (spack.caches.MirrorCache): mirror where to add the spec. - mirror_stats (spack.mirror.MirrorStats): statistics on the current mirror + mirror_cache: mirror where to add the spec. + mirror_stats: statistics on the current mirror Return: True if the spec was added successfully, False otherwise """ tty.msg("Adding package {} to mirror".format(pkg_obj.spec.format("{name}{@version}"))) - num_retries = 3 - while num_retries > 0: + max_retries = 3 + for num_retries in range(max_retries): try: # Includes patches and resources with pkg_obj.stage as pkg_stage: pkg_stage.cache_mirror(mirror_cache, mirror_stats) - exception = None break except Exception as e: - exc_tuple = sys.exc_info() - exception = e - num_retries -= 1 - if exception: - if spack.config.get("config:debug"): - traceback.print_exception(file=sys.stderr, *exc_tuple) - else: - tty.warn( - "Error while fetching %s" % pkg_obj.spec.cformat("{name}{@version}"), - getattr(exception, "message", exception), - ) - mirror_stats.error() - return False + if num_retries + 1 == max_retries: + if spack.config.get("config:debug"): + traceback.print_exc() + else: + tty.warn( + "Error while fetching %s" % pkg_obj.spec.format("{name}{@version}"), str(e) + ) + mirror_stats.error() + return False return True From 79d79969bb4a5b80433dc3b73f471052a6281dc7 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sun, 8 Dec 2024 08:12:14 -0600 Subject: [PATCH 23/69] celeritas: patch 0.5.0 for geant4@11.3.0: (#47976) --- var/spack/repos/builtin/packages/celeritas/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/var/spack/repos/builtin/packages/celeritas/package.py b/var/spack/repos/builtin/packages/celeritas/package.py index b0e605ffc3caf5..a88df0ed6a873b 100644 --- a/var/spack/repos/builtin/packages/celeritas/package.py +++ b/var/spack/repos/builtin/packages/celeritas/package.py @@ -96,6 +96,16 @@ class Celeritas(CMakePackage, CudaPackage, ROCmPackage): conflicts("+rocm", when="+cuda", msg="AMD and NVIDIA accelerators are incompatible") conflicts("+rocm", when="+vecgeom", msg="HIP support is only available with ORANGE") + # geant4@11.3.0 now returns const G4Element::GetElementTable() + patch( + "https://github.com/celeritas-project/celeritas/commit/3c8ed9614fc695fba35e8a058bedb7bc1556f71c.patch?full_index=1", + sha256="1161c4f1166860d35d2a3f103236a63acd6a35aee2d2c27561cb929941d1c170", + when="@0.5.0 +geant4 ^geant4@11.3.0:", + ) + conflicts( + "^geant4@11.3.0:", when="@:0.4 +geant4", msg="geant4@11.3.0: requires at least 0.5.0" + ) + def cmake_args(self): define = self.define from_variant = self.define_from_variant From 0b7fc360fa5bbeb72ae785b45a8c779ad696d7f7 Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Sun, 8 Dec 2024 10:21:28 -0800 Subject: [PATCH 24/69] e4s ci: add lammps +rocm (#47929) * e4s ci: add lammps +rocm * e4s rocm external stack: add def for rocm-openmp-extras external * lammps +rocm external rocm has errors, comment out --- .../cloud_pipelines/stacks/e4s-rocm-external/spack.yaml | 7 +++++++ share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml | 1 + 2 files changed, 8 insertions(+) diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml index 2098645d1b1291..d83646f32a44b0 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml @@ -207,6 +207,11 @@ spack: externals: - spec: rocm-core@6.2.1 prefix: /opt/rocm-6.2.1 + rocm-openmp-extras: + buildable: false + externals: + - spec: rocm-openmp-extras@6.2.1 + prefix: /opt/rocm-6.2.1 specs: # ROCM NOARCH @@ -250,6 +255,7 @@ spack: # - chapel +rocm amdgpu_target=gfx908 # chapel: need chapel >= 2.2 to support ROCm >5.4 # - cp2k +mpi +rocm amdgpu_target=gfx908 # cp2k: Error: KeyError: 'No spec with name rocm in... "-L{}".format(spec["rocm"].libs.directories[0]), # - exago +mpi +python +raja +hiop +rocm amdgpu_target=gfx908 ~ipopt cxxflags="-Wno-error=non-pod-varargs" ^hiop@1.0.0 ~sparse +mpi +raja +rocm amdgpu_target=gfx908 # raja: https://github.com/spack/spack/issues/44593 + # - lammps +rocm amdgpu_target=gfx908 # lammps: KeyError: 'No spec with name llvm-amdgpu in rocm-openmp-extras@6.2.1/xafvl6rnd3tjagjvezszdz6itqzcl3zj' # - lbann ~cuda +rocm amdgpu_target=gfx908 # aluminum: https://github.com/spack/spack/issues/38807 # - papi +rocm amdgpu_target=gfx908 # papi: https://github.com/spack/spack/issues/27898 # - petsc +rocm amdgpu_target=gfx908 # petsc: https://github.com/spack/spack/issues/44600 @@ -294,6 +300,7 @@ spack: # - chapel +rocm amdgpu_target=gfx9a # chapel: need chapel >= 2.2 to support ROCm >5.4 # - cp2k +mpi +rocm amdgpu_target=gfx90a # cp2k: Error: KeyError: 'No spec with name rocm in... "-L{}".format(spec["rocm"].libs.directories[0]), # - exago +mpi +python +raja +hiop +rocm amdgpu_target=gfx90a ~ipopt cxxflags="-Wno-error=non-pod-varargs" ^hiop@1.0.0 ~sparse +mpi +raja +rocm amdgpu_target=gfx90a # raja: https://github.com/spack/spack/issues/44593 + # - lammps +rocm amdgpu_target=gfx90a # lammps: KeyError: 'No spec with name llvm-amdgpu in rocm-openmp-extras@6.2.1/xafvl6rnd3tjagjvezszdz6itqzcl3zj' # - lbann ~cuda +rocm amdgpu_target=gfx90a # aluminum: https://github.com/spack/spack/issues/38807 # - papi +rocm amdgpu_target=gfx90a # papi: https://github.com/spack/spack/issues/27898 # - petsc +rocm amdgpu_target=gfx90a # petsc: https://github.com/spack/spack/issues/44600 diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml index 29d5f63a16738c..c96e355097d02d 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml @@ -327,6 +327,7 @@ spack: - heffte +rocm amdgpu_target=gfx90a - hpx +rocm amdgpu_target=gfx90a - hypre +rocm amdgpu_target=gfx90a + - lammps +rocm amdgpu_target=gfx90a - magma ~cuda +rocm amdgpu_target=gfx90a - mfem +rocm amdgpu_target=gfx90a - raja ~openmp +rocm amdgpu_target=gfx90a From 8a9e16dc3b4e35461048a7f70993f061af4017cf Mon Sep 17 00:00:00 2001 From: Stephen Sachs Date: Sun, 8 Dec 2024 20:26:08 +0100 Subject: [PATCH 25/69] aws-pcluster stacks: static spack.yaml (#47918) --- .../gitlab/cloud_pipelines/.gitlab-ci.yml | 16 +- .../scripts/pcluster/setup-pcluster.sh | 112 ----------- .../aws-pcluster-neoverse_v1/packages.yaml | 67 ------- .../aws-pcluster-neoverse_v1/spack.yaml | 100 +++++++++- .../aws-pcluster-x86_64_v4/packages.yaml | 143 -------------- .../stacks/aws-pcluster-x86_64_v4/spack.yaml | 174 +++++++++++++++++- 6 files changed, 274 insertions(+), 338 deletions(-) delete mode 100755 share/spack/gitlab/cloud_pipelines/scripts/pcluster/setup-pcluster.sh delete mode 100644 share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/packages.yaml delete mode 100644 share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-x86_64_v4/packages.yaml diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index 07fd16c88bcff7..95f98840f07719 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -810,14 +810,6 @@ ml-darwin-aarch64-mps-build: .aws-pcluster-generate: image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:v2024-10-07", "entrypoint": [""] } - before_script: - # Use gcc from pre-installed spack store - - - . "./share/spack/setup-env.sh" - - . "/etc/profile.d/modules.sh" - - diff -q "/bootstrap/cloud_pipelines-config.yaml" "share/spack/gitlab/cloud_pipelines/configs/config.yaml" || echo "WARNING Install tree might have changed. You need to rebuild the pcluster-amazonlinux-2 container in spack/gitlab-runners." - - cp "share/spack/gitlab/cloud_pipelines/configs/config.yaml" "etc/spack/" - - /bin/bash "${SPACK_ROOT}/share/spack/gitlab/cloud_pipelines/scripts/pcluster/setup-pcluster.sh" - - rm "etc/spack/config.yaml" # X86_64_V4 (one pipeline per target) .aws-pcluster-x86_64_v4: @@ -826,6 +818,10 @@ ml-darwin-aarch64-mps-build: aws-pcluster-generate-x86_64_v4: extends: [ ".linux_x86_64_v4", ".aws-pcluster-x86_64_v4", ".generate-base", ".tags-x86_64_v4", ".aws-pcluster-generate"] + before_script: + - - . "./share/spack/setup-env.sh" + # TODO: Move this to the container next time it is rebuilt + - export PATH=/home/software/spack/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeh/linux-amzn2-x86_64_v3/gcc-7.3.1/binutils-2.37-qvccg7zpskturysmr4bzbsfrx34kvazo/bin:$PATH aws-pcluster-build-x86_64_v4: extends: [ ".linux_x86_64_v4", ".aws-pcluster-x86_64_v4", ".build" ] @@ -846,6 +842,10 @@ aws-pcluster-build-x86_64_v4: aws-pcluster-generate-neoverse_v1: # TODO: Use updated runner tags: https://github.com/spack/spack-infrastructure/pull/694/files extends: [ ".linux_neoverse_v1", ".aws-pcluster-neoverse_v1", ".generate-neoverse_v1", ".aws-pcluster-generate"] + before_script: + - - . "./share/spack/setup-env.sh" + # TODO: Move this to the container next time it is rebuilt + - export PATH=/home/software/spack/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeh/linux-amzn2-aarch64/gcc-7.3.1/binutils-2.37-2yxz3xsjfmesxujxtlrgcctxlyilynmp/bin:$PATH aws-pcluster-build-neoverse_v1: extends: [ ".linux_neoverse_v1", ".aws-pcluster-neoverse_v1", ".build" ] diff --git a/share/spack/gitlab/cloud_pipelines/scripts/pcluster/setup-pcluster.sh b/share/spack/gitlab/cloud_pipelines/scripts/pcluster/setup-pcluster.sh deleted file mode 100755 index fc77f56e769459..00000000000000 --- a/share/spack/gitlab/cloud_pipelines/scripts/pcluster/setup-pcluster.sh +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) -set -e - -set_pcluster_defaults() { - # Set versions of pre-installed software in packages.yaml - [ -z "${SLURM_ROOT}" ] && ls /etc/systemd/system/slurm* &>/dev/null && \ - SLURM_ROOT=$(dirname $(dirname "$(awk '/ExecStart=/ {print $1}' /etc/systemd/system/slurm* | sed -e 's?^.*=??1' | head -n1)")) - # Fallback to default location if SLURM not in systemd - [ -z "${SLURM_ROOT}" ] && [ -d "/opt/slurm" ] && SLURM_ROOT=/opt/slurm - [ -z "${SLURM_VERSION}" ] && SLURM_VERSION=$(strings "${SLURM_ROOT}"/lib/libslurm.so | grep -e '^VERSION' | awk '{print $2}' | sed -e 's?"??g') - [ -z "${LIBFABRIC_VERSION}" ] && LIBFABRIC_VERSION=$(awk '/Version:/{print $2}' "$(find /opt/amazon/efa/ -name libfabric.pc | head -n1)" | sed -e 's?~??g' -e 's?amzn.*??g') - export SLURM_ROOT SLURM_VERSION LIBFABRIC_VERSION - - envsubst < "${SPACK_ROOT}/share/spack/gitlab/cloud_pipelines/stacks/${SPACK_CI_STACK_NAME}/packages.yaml" > "${SPACK_ROOT}"/etc/spack/packages.yaml -} - -patch_compilers_yaml() { - # Graceful exit if package not found by spack - set -o pipefail - compilers_yaml="${SPACK_ROOT}/etc/spack/compilers.yaml" - [ -f "${compilers_yaml}" ] || { - echo "Cannot find ${compilers_yaml}, compiler setup might now be optimal." - return - } - - # System ld is too old for amzn linux2 - spack_gcc_version=$(spack find --format '{version}' gcc) - binutils_path=$(spack find -p binutils | awk '/binutils/ {print $2}' | head -n1) - if [ -d "${binutils_path}" ] && [ -n "${spack_gcc_version}" ]; then python3 < Date: Sun, 8 Dec 2024 19:34:20 -0600 Subject: [PATCH 26/69] build(deps): bump types-six in /.github/workflows/requirements/style (#47954) Bumps [types-six](https://github.com/python/typeshed) from 1.16.21.20241105 to 1.17.0.20241205. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-six dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/requirements/style/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/requirements/style/requirements.txt b/.github/workflows/requirements/style/requirements.txt index 93ab7eaa7f78cf..25a9cdc05d568d 100644 --- a/.github/workflows/requirements/style/requirements.txt +++ b/.github/workflows/requirements/style/requirements.txt @@ -3,5 +3,5 @@ clingo==5.7.1 flake8==7.1.1 isort==5.13.2 mypy==1.8.0 -types-six==1.16.21.20241105 +types-six==1.17.0.20241205 vermin==1.6.0 From f15e5f7163966984565c8f4fe59a9e294e9dae5f Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Mon, 9 Dec 2024 12:02:51 +0100 Subject: [PATCH 27/69] mold: Add 2.35.0 (#47984) --- var/spack/repos/builtin/packages/mold/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/mold/package.py b/var/spack/repos/builtin/packages/mold/package.py index 00b02c8ae9cf87..4009a0aa393de1 100644 --- a/var/spack/repos/builtin/packages/mold/package.py +++ b/var/spack/repos/builtin/packages/mold/package.py @@ -16,6 +16,7 @@ class Mold(CMakePackage): license("MIT") + version("2.35.0", sha256="2703f1c88c588523815886478950bcae1ef02190dc4787e0d120a293b1a46e3b") version("2.34.1", sha256="a8cf638045b4a4b2697d0bcc77fd96eae93d54d57ad3021bf03b0333a727a59d") version("2.34.0", sha256="6067f41f624c32cb0f4e959ae7fabee5dd71dd06771e2c069c2b3a6a8eca3c8c") version("2.33.0", sha256="37b3aacbd9b6accf581b92ba1a98ca418672ae330b78fe56ae542c2dcb10a155") From a72490fc910ede3d3568c41bf1d11f769de93357 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 9 Dec 2024 09:59:44 -0600 Subject: [PATCH 28/69] coverage.yml: set fail_ci_if_error = false again (#47986) --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index be4302bfbc7464..bf77439e84f0bb 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -32,4 +32,4 @@ jobs: uses: codecov/codecov-action@05f5a9cfad807516dbbef9929c4a42df3eb78766 with: verbose: true - fail_ci_if_error: true + fail_ci_if_error: false From 9cb2070eebc07038b0414eef566f2690a7080121 Mon Sep 17 00:00:00 2001 From: Alberto Invernizzi <9337627+albestro@users.noreply.github.com> Date: Mon, 9 Dec 2024 18:43:10 +0100 Subject: [PATCH 29/69] gh: add v2.59.0 -> v2.63.2 (#47958) * gh: bump versions * update go requirement (good catch @alecbcs!) see https://github.com/cli/cli/commit/84460796563adbc0a71e3c1a9d4e3649729489e9 --- var/spack/repos/builtin/packages/gh/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/gh/package.py b/var/spack/repos/builtin/packages/gh/package.py index fddbc6311b7337..0f804b9367bac1 100644 --- a/var/spack/repos/builtin/packages/gh/package.py +++ b/var/spack/repos/builtin/packages/gh/package.py @@ -16,6 +16,14 @@ class Gh(GoPackage): license("MIT") + version("2.63.2", sha256="2578a8b1f00cb292a8094793515743f2a86e02b8d0b18d6b95959ddbeebd6b8d") + version("2.63.1", sha256="b9a90118dfb46204dbcc0d09c2073d48f35b6f640b4db33fbaa24892fed56c8d") + version("2.63.0", sha256="c5309db9707c9e64ebe264e1e2d0f893ecead9056d680b39a565aaa5513d2947") + version("2.62.0", sha256="8b0d44a7fccd0c768d5ef7c3fbd274851b5752084e47761f146852de6539193e") + version("2.61.0", sha256="bf134281db2b65827426e3ad186de55cb04d0f92051ca2e6bd8a7d47aabe5b18") + version("2.60.1", sha256="9e9337c2564894c4cd32b2ac419611263c3e870e95567811365aacd4be5dd51d") + version("2.60.0", sha256="1936a80a668caef437b2f409eaa10e48613a3502db7da9eea011b163769218a7") + version("2.59.0", sha256="d24ed01e5aa1e8f42b397333462f9cd5c54e4845a5142044381fc8eb713fa001") version("2.58.0", sha256="90894536c797147586db775d06ec2040c45cd7eef941f7ccbea46f4e5997c81c") version("2.50.0", sha256="683d0dee90e1d24a6673d13680e0d41963ddc6dd88580ab5119acec790d1b4d7") version("2.49.2", sha256="e839ea302ad99b70ce3efcb903f938ecbbb919798e49bc2f2034ad506ae0b0f5") @@ -43,6 +51,7 @@ class Gh(GoPackage): depends_on("go@1.19:", type="build", when="@2.21.0:") depends_on("go@1.21:", type="build", when="@2.33.0:") depends_on("go@1.22:", type="build", when="@2.47.0:") + depends_on("go@1.22.5:", type="build", when="@2.56.0:") @property def build_args(self): From da83ab35e8ac5185866797be531bc1dfbed75382 Mon Sep 17 00:00:00 2001 From: Kin Fai Tse Date: Tue, 10 Dec 2024 03:17:36 +0800 Subject: [PATCH 30/69] add soci 4.0.3 (#47983) --- var/spack/repos/builtin/packages/soci/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/soci/package.py b/var/spack/repos/builtin/packages/soci/package.py index a6506b78d2453a..7f0f8a985ad942 100644 --- a/var/spack/repos/builtin/packages/soci/package.py +++ b/var/spack/repos/builtin/packages/soci/package.py @@ -10,10 +10,11 @@ class Soci(CMakePackage): """Official repository of the SOCI - The C++ Database Access Library""" homepage = "https://github.com/SOCI/soci" - url = "https://github.com/SOCI/soci/archive/v4.0.2.tar.gz" + url = "https://github.com/SOCI/soci/archive/v4.0.3.tar.gz" license("BSL-1.0") + version("4.0.3", sha256="4b1ff9c8545c5d802fbe06ee6cd2886630e5c03bf740e269bb625b45cf934928") version("4.0.2", sha256="f293192a412ed82693d17dfe46e2734b140bff835bc3259e3cbd7c315e5e2d74") version("4.0.0", sha256="359b988d8cbe81357835317821919f7e270c0705e41951a92ac1627cb9fe8faf") version( From b2a86fcaba3397e912eec32a7059e26ab234cef7 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 9 Dec 2024 13:24:51 -0600 Subject: [PATCH 31/69] py-plac: add v1.4.3; restrict to python@:3.11 for older (#47982) --- var/spack/repos/builtin/packages/py-plac/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-plac/package.py b/var/spack/repos/builtin/packages/py-plac/package.py index 7b0c7957b2ab96..2487f3ef729a95 100644 --- a/var/spack/repos/builtin/packages/py-plac/package.py +++ b/var/spack/repos/builtin/packages/py-plac/package.py @@ -18,8 +18,10 @@ class PyPlac(PythonPackage): license("BSD-2-Clause") + version("1.4.3", sha256="d4cb3387b2113a28aebd509433d0264a4e5d9bb7c1a86db4fbd0a8f11af74eb3") version("1.3.5", sha256="38bdd864d0450fb748193aa817b9c458a8f5319fbf97b2261151cfc0a5812090") version("1.3.3", sha256="51e332dabc2aed2cd1f038be637d557d116175101535f53eaa7ae854a00f2a74") version("1.1.3", sha256="398cb947c60c4c25e275e1f1dadf027e7096858fb260b8ece3b33bcff90d985f") + depends_on("python@:3.11", type=("build", "run"), when="@:1.3") depends_on("py-setuptools", type="build") From 4d6347c99c5fb76d374baa5f933ab5bbae32793a Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 9 Dec 2024 14:19:09 -0600 Subject: [PATCH 32/69] node-js: patch for %gcc@12.[1-2] when @22.2:22.5 (#47979) * node-js: patch for %gcc@12.[1-2] when @22.2:22 * node-js: avoid url patch (serial in common.gypi) --- .../node-js/fix-broken-gcc12-pr53728.patch | 25 +++++++++++++++++++ .../repos/builtin/packages/node-js/package.py | 5 ++++ 2 files changed, 30 insertions(+) create mode 100644 var/spack/repos/builtin/packages/node-js/fix-broken-gcc12-pr53728.patch diff --git a/var/spack/repos/builtin/packages/node-js/fix-broken-gcc12-pr53728.patch b/var/spack/repos/builtin/packages/node-js/fix-broken-gcc12-pr53728.patch new file mode 100644 index 00000000000000..29de3b241c2e9d --- /dev/null +++ b/var/spack/repos/builtin/packages/node-js/fix-broken-gcc12-pr53728.patch @@ -0,0 +1,25 @@ +diff --git a/deps/v8/src/base/macros.h b/deps/v8/src/base/macros.h +index 210885af3c3c0a35111d9fcbbcce95e1570c7a23..d404b6120ab86ff598def668442b444afeb88ebd 100644 +--- a/deps/v8/src/base/macros.h ++++ b/deps/v8/src/base/macros.h +@@ -173,7 +173,7 @@ namespace base { + // base::is_trivially_copyable will differ for these cases. + template + struct is_trivially_copyable { +-#if V8_CC_MSVC ++#if V8_CC_MSVC || (__GNUC__ == 12 && __GNUC_MINOR__ <= 2) + // Unfortunately, MSVC 2015 is broken in that std::is_trivially_copyable can + // be false even though it should be true according to the standard. + // (status at 2018-02-26, observed on the msvc waterfall bot). +@@ -181,6 +181,11 @@ struct is_trivially_copyable { + // intended, so we reimplement this according to the standard. + // See also https://developercommunity.visualstudio.com/content/problem/ + // 170883/msvc-type-traits-stdis-trivial-is-bugged.html. ++ // ++ // GCC 12.1 and 12.2 are broken too, they are shipped by some stable Linux ++ // distributions, so the same polyfill is also used. ++ // See ++ // https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=aeba3e009b0abfccaf01797556445dbf891cc8dc + static constexpr bool value = + // Copy constructor is trivial or deleted. + (std::is_trivially_copy_constructible::value || \ No newline at end of file diff --git a/var/spack/repos/builtin/packages/node-js/package.py b/var/spack/repos/builtin/packages/node-js/package.py index 8850255deba572..bc4944d31d687d 100644 --- a/var/spack/repos/builtin/packages/node-js/package.py +++ b/var/spack/repos/builtin/packages/node-js/package.py @@ -103,6 +103,11 @@ class NodeJs(Package): # See https://github.com/nodejs/node/issues/52223 patch("fix-old-glibc-random-headers.patch", when="^glibc@:2.24") + # Work around gcc-12.[1-2] compiler bug + # See https://github.com/nodejs/node/pull/53728 + # and https://github.com/nodejs/node/issues/53633 + patch("fix-broken-gcc12-pr53728.patch", when="@22.2:22.5") + def setup_build_environment(self, env): # Force use of experimental Python 3 support env.set("PYTHON", self.spec["python"].command.path) From 728f13d4b2132185c37d6e4289a3356b8382d3e7 Mon Sep 17 00:00:00 2001 From: Matt Thompson Date: Mon, 9 Dec 2024 15:21:05 -0500 Subject: [PATCH 33/69] mapl: add v2.51.0 (#47968) --- .../repos/builtin/packages/mapl/package.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/mapl/package.py b/var/spack/repos/builtin/packages/mapl/package.py index 831fcb675005ba..126b4f94110dc4 100644 --- a/var/spack/repos/builtin/packages/mapl/package.py +++ b/var/spack/repos/builtin/packages/mapl/package.py @@ -39,6 +39,8 @@ class Mapl(CMakePackage): version("develop", branch="develop") version("main", branch="main") + version("2.51.0", sha256="56213d845f5287e599213aab1dea60bf6b64c29cd8093313639304b270c45676") + version("2.50.3", sha256="506f73d511b6a63645bbf953bf04f663da06f5069cb559340786e9fe8eeb170f") version("2.50.2", sha256="1c72f8598cf01bab6ef30c1f461444ba5a13f55c61164b7b3c15efb0cd1096c0") version("2.50.1", sha256="26dd7a3ec82d484d60a559bb90a20ad9a2a717af52c25b6a752dd971aeeb5075") version("2.50.0", sha256="12282e547936f667f85c95d466273dcbaccbd600add72fa5981c0c734ccb1f7d") @@ -157,11 +159,17 @@ class Mapl(CMakePackage): # Versions later than 3.14 remove FindESMF.cmake # from ESMA_CMake. + resource( + name="esma_cmake", + git="https://github.com/GEOS-ESM/ESMA_cmake.git", + tag="v3.55.0", + when="@2.51:", + ) resource( name="esma_cmake", git="https://github.com/GEOS-ESM/ESMA_cmake.git", tag="v3.51.0", - when="@2.48:", + when="@2.48:2.50", ) resource( name="esma_cmake", @@ -240,6 +248,11 @@ class Mapl(CMakePackage): # builds with gcc 13 from that version onwards conflicts("%gcc@13:", when="@:2.44") + # MAPL can use ifx only from MAPL 2.51 onwards and only supports + # ifx 2025.0 and newer due to bugs in ifx + conflicts("%oneapi@:2024") + conflicts("%oneapi", when="@:2.50") + variant("flap", default=False, description="Build with FLAP support", when="@:2.39") variant("pflogger", default=True, description="Build with pFlogger support") variant("fargparse", default=True, description="Build with fArgParse support") @@ -261,7 +274,8 @@ class Mapl(CMakePackage): conflicts("+pflogger", when="@:2.40.3 %intel@2021.7:") conflicts("+extdata2g", when="@:2.40.3 %intel@2021.7:") - depends_on("cmake@3.23:", type="build", when="@2.50:") + depends_on("cmake@3.24:", type="build", when="@2.51:") + depends_on("cmake@3.23:", type="build", when="@2.50") depends_on("cmake@3.17:", type="build", when="@:2.49") depends_on("mpi") depends_on("hdf5") From 7c74247f232a4741a2ea18d8c77afa85dd0193df Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 9 Dec 2024 14:26:16 -0600 Subject: [PATCH 34/69] py-greenlet: remove preference for v2.0.2 (#47962) * py-greenlet: remove preference for 2.0.2 * py-greenlet: conflicts with gcc@:7 when @3.1.1: --- var/spack/repos/builtin/packages/py-greenlet/package.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-greenlet/package.py b/var/spack/repos/builtin/packages/py-greenlet/package.py index 7d5474da3bb98b..ebbb7029387e26 100644 --- a/var/spack/repos/builtin/packages/py-greenlet/package.py +++ b/var/spack/repos/builtin/packages/py-greenlet/package.py @@ -20,11 +20,7 @@ class PyGreenlet(PythonPackage): version("3.1.1", sha256="4ce3ac6cdb6adf7946475d7ef31777c26d94bccc377e070a7986bd2d5c515467") version("3.0.3", sha256="43374442353259554ce33599da8b692d5aa96f8976d567d4badf263371fbe491") version("3.0.0a1", sha256="1bd4ea36f0aeb14ca335e0c9594a5aaefa1ac4e2db7d86ba38f0be96166b3102") - version( - "2.0.2", - sha256="e7c8dc13af7db097bed64a051d2dd49e9f0af495c26995c00a9ee842690d34c0", - preferred=True, - ) + version("2.0.2", sha256="e7c8dc13af7db097bed64a051d2dd49e9f0af495c26995c00a9ee842690d34c0") version("1.1.3", sha256="bcb6c6dd1d6be6d38d6db283747d07fda089ff8c559a835236560a4410340455") version("1.1.2", sha256="e30f5ea4ae2346e62cedde8794a56858a67b878dd79f7df76a0767e356b1744a") version("1.1.0", sha256="c87df8ae3f01ffb4483c796fe1b15232ce2b219f0b18126948616224d3f658ee") @@ -41,3 +37,5 @@ class PyGreenlet(PythonPackage): depends_on("py-setuptools", type="build") depends_on("py-setuptools@40.8.0:", type="build", when="@3.0.2:") + + conflicts("%gcc@:7", when="@3.1.1:", msg="GCC-8 required as of 3.1.1") From ab4a645cbe67cc447adace808d4f3197c6d94304 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 9 Dec 2024 15:48:33 -0600 Subject: [PATCH 35/69] various pkgs: use https homepage when http redirects (github.io) (#47974) * various pkgs: use https homepage when http redirects (github.io) * py-owslib: fix homepage * py-owslib: fix homepage to rtd * h5io: fix homepage --- var/spack/repos/builtin/packages/freesasa/package.py | 2 +- var/spack/repos/builtin/packages/hypar/package.py | 2 +- var/spack/repos/builtin/packages/pblat/package.py | 2 +- var/spack/repos/builtin/packages/py-gpyopt/package.py | 2 +- var/spack/repos/builtin/packages/py-h5io/package.py | 2 +- var/spack/repos/builtin/packages/py-owslib/package.py | 2 +- var/spack/repos/builtin/packages/py-phydms/package.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/freesasa/package.py b/var/spack/repos/builtin/packages/freesasa/package.py index 65e50b4d7e36b0..8814e4a95f4750 100644 --- a/var/spack/repos/builtin/packages/freesasa/package.py +++ b/var/spack/repos/builtin/packages/freesasa/package.py @@ -9,7 +9,7 @@ class Freesasa(AutotoolsPackage): """C-library for calculating Solvent Accessible Surface Areas""" - homepage = "http://freesasa.github.io" + homepage = "https://freesasa.github.io" url = "https://github.com/mittinatten/freesasa/releases/download/2.1.2/freesasa-2.1.2.zip" git = "https://github.com/mittinatten/freesasa.git" maintainers("RMeli") diff --git a/var/spack/repos/builtin/packages/hypar/package.py b/var/spack/repos/builtin/packages/hypar/package.py index 6236b1b1bac65a..46c5c455d70ba7 100644 --- a/var/spack/repos/builtin/packages/hypar/package.py +++ b/var/spack/repos/builtin/packages/hypar/package.py @@ -17,7 +17,7 @@ class Hypar(AutotoolsPackage): forms of the hyperbolic flux, parabolic flux, source terms, upwinding functions, etc. """ - homepage = "http://hypar.github.io/" + homepage = "https://hypar.github.io/" url = "https://github.com/debog/hypar/archive/refs/tags/v4.1.tar.gz" git = "https://github.com/debog/hypar.git" diff --git a/var/spack/repos/builtin/packages/pblat/package.py b/var/spack/repos/builtin/packages/pblat/package.py index 3c82805097c716..7484c4e2af2f5d 100644 --- a/var/spack/repos/builtin/packages/pblat/package.py +++ b/var/spack/repos/builtin/packages/pblat/package.py @@ -9,7 +9,7 @@ class Pblat(MakefilePackage): """Parallelized blat with multi-threads support""" - homepage = "http://icebert.github.io/pblat/" + homepage = "https://icebert.github.io/pblat/" url = "https://github.com/icebert/pblat/archive/refs/tags/2.5.1.tar.gz" # `pblat` shares the license for Jim Kent's `blat`. For-profit users must visit: diff --git a/var/spack/repos/builtin/packages/py-gpyopt/package.py b/var/spack/repos/builtin/packages/py-gpyopt/package.py index c2722daaba789e..09799738fd0c15 100644 --- a/var/spack/repos/builtin/packages/py-gpyopt/package.py +++ b/var/spack/repos/builtin/packages/py-gpyopt/package.py @@ -13,7 +13,7 @@ class PyGpyopt(PythonPackage): Learning algorithms. It is able to handle large data sets via sparse Gaussian process models.""" - homepage = "http://sheffieldml.github.io/GPyOpt/" + homepage = "https://sheffieldml.github.io/GPyOpt/" pypi = "GPyOpt/GPyOpt-1.2.6.tar.gz" license("BSD-3-Clause") diff --git a/var/spack/repos/builtin/packages/py-h5io/package.py b/var/spack/repos/builtin/packages/py-h5io/package.py index 7fba3793157f0e..f96215d49a787a 100644 --- a/var/spack/repos/builtin/packages/py-h5io/package.py +++ b/var/spack/repos/builtin/packages/py-h5io/package.py @@ -9,7 +9,7 @@ class PyH5io(PythonPackage): """Python Objects Onto HDF5.""" - homepage = "http://h5io.github.io" + homepage = "https://github.com/h5io/h5io" pypi = "h5io/h5io-0.1.7.tar.gz" git = "https://github.com/h5io/h5io.git" diff --git a/var/spack/repos/builtin/packages/py-owslib/package.py b/var/spack/repos/builtin/packages/py-owslib/package.py index 9cd6265bbe2618..cbdadcf85f75d1 100644 --- a/var/spack/repos/builtin/packages/py-owslib/package.py +++ b/var/spack/repos/builtin/packages/py-owslib/package.py @@ -11,7 +11,7 @@ class PyOwslib(PythonPackage): Consortium (OGC) web service (hence OWS) interface standards, and their related content models.""" - homepage = "http://http://geopython.github.io/OWSLib/#installation" + homepage = "https://owslib.readthedocs.io/en/latest/" pypi = "OWSLib/OWSLib-0.16.0.tar.gz" license("BSD-3-Clause") diff --git a/var/spack/repos/builtin/packages/py-phydms/package.py b/var/spack/repos/builtin/packages/py-phydms/package.py index 3fafdb822a16a8..4b2670511f4829 100644 --- a/var/spack/repos/builtin/packages/py-phydms/package.py +++ b/var/spack/repos/builtin/packages/py-phydms/package.py @@ -13,7 +13,7 @@ class PyPhydms(PythonPackage): codon models (ExpCM) for phylogenetic inference and the detection of biologically interesting selection.""" - homepage = "http://jbloomlab.github.io/phydms" + homepage = "https://jbloomlab.github.io/phydms" pypi = "phydms/phydms-2.4.1.tar.gz" license("GPL-3.0-or-later") From 49efa711d04049d48690231ac9b1ccb81cc4d448 Mon Sep 17 00:00:00 2001 From: Stephen Nicholas Swatman Date: Mon, 9 Dec 2024 23:08:47 +0100 Subject: [PATCH 36/69] acts dependencies: new versions as of 2024/12/08 (#47981) * acts dependencies: new versions as of 2024/12/08 This commit includes a new version of ACTS, as well as new versions of the ACTS algebra plugins, covfie, detray, and geomodel. * Fixes * covfie: depends_on cmake@3.21: when @0.11: --------- Co-authored-by: Wouter Deconinck --- .../packages/acts-algebra-plugins/package.py | 14 ++++++++------ var/spack/repos/builtin/packages/acts/package.py | 3 +++ var/spack/repos/builtin/packages/covfie/package.py | 5 ++--- var/spack/repos/builtin/packages/detray/package.py | 2 ++ .../repos/builtin/packages/geomodel/package.py | 1 + 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/acts-algebra-plugins/package.py b/var/spack/repos/builtin/packages/acts-algebra-plugins/package.py index 6de001e545bd8e..fe0145afe9fcc8 100644 --- a/var/spack/repos/builtin/packages/acts-algebra-plugins/package.py +++ b/var/spack/repos/builtin/packages/acts-algebra-plugins/package.py @@ -17,18 +17,20 @@ class ActsAlgebraPlugins(CMakePackage): license("MPL-2.0", checked_by="stephenswat") + version("0.26.0", sha256="301702e3d0a3d12e46ae6d949f3027ddebd0b1167cbb3004d9a4a5697d3adc7f") version("0.25.0", sha256="bb0cba6e37558689d780a6de8f749abb3b96f8cd9e0c8851474eb4532e1e98b8") version("0.24.0", sha256="f44753e62b1ba29c28ab86b282ab67ac6028a0f9fe41e599b7fc6fc50b586b62") depends_on("cxx", type="build") # generated - variant( - "cxxstd", - default="17", - values=("17", "20", "23"), - multi=False, - description="C++ standard used", + _cxxstd_values = ( + conditional("17", when="@:0.25"), + conditional("20", when="@0:"), + conditional("23", when="@0:"), ) + _cxxstd_common = {"values": _cxxstd_values, "multi": False, "description": "C++ standard used"} + variant("cxxstd", default="17", when="@:0.25", **_cxxstd_common) + variant("cxxstd", default="20", when="@0.26:", **_cxxstd_common) variant("eigen", default=False, description="Enables the Eigen plugin") variant("smatrix", default=False, description="Enables the SMatrix plugin") variant("vecmem", default=False, description="Enables the vecmem plugin") diff --git a/var/spack/repos/builtin/packages/acts/package.py b/var/spack/repos/builtin/packages/acts/package.py index f2784fb772a8be..dd4087fae11b4f 100644 --- a/var/spack/repos/builtin/packages/acts/package.py +++ b/var/spack/repos/builtin/packages/acts/package.py @@ -41,6 +41,7 @@ class Acts(CMakePackage, CudaPackage): # Supported Acts versions version("main", branch="main") version("master", branch="main", deprecated=True) # For compatibility + version("38.1.0", commit="8a20c88808f10bf4fcdfd7c6e077f23614c3ab90", submodules=True) version("38.0.0", commit="0a6b5155e29e3b755bf351b8a76067fff9b4214b", submodules=True) version("37.4.0", commit="4ae9a44f54c854599d1d753222ec36e0b5b4e9c7", submodules=True) version("37.3.0", commit="b3e856d4dadcda7d1a88a9b846ce5a7acd8410c4", submodules=True) @@ -429,6 +430,8 @@ class Acts(CMakePackage, CudaPackage): conflicts("%gcc@:9", when="cxxstd=20") # See https://github.com/acts-project/acts/pull/3512 conflicts("^boost@1.85.0") + # See https://github.com/acts-project/acts/pull/3921 + conflicts("^edm4hep@0.99:", when="@:37") def cmake_args(self): spec = self.spec diff --git a/var/spack/repos/builtin/packages/covfie/package.py b/var/spack/repos/builtin/packages/covfie/package.py index 2b88af03d117e7..ba3e03cb96cb00 100644 --- a/var/spack/repos/builtin/packages/covfie/package.py +++ b/var/spack/repos/builtin/packages/covfie/package.py @@ -20,19 +20,18 @@ class Covfie(CMakePackage, CudaPackage): maintainers("stephenswat") + version("0.11.0", sha256="39fcd0f218d3b4f3aacc6af497a8cda8767511efae7a72b47781f10fd4340f4f") version("0.10.0", sha256="d44142b302ffc193ad2229f1d2cc6d8d720dd9da8c37989ada4f23018f86c964") depends_on("cxx", type="build") # generated - variant("concepts", default=False, description="Enforce C++20 concepts") - + depends_on("cmake@3.21:", type="build", when="@0.11:") depends_on("cmake@3.18:", type="build") def cmake_args(self): args = [ self.define("COVFIE_PLATFORM_CPU", True), self.define_from_variant("COVFIE_PLATFORM_CUDA", "cuda"), - self.define_from_variant("COVFIE_REQUIRE_CXX20", "concepts"), self.define("COVFIE_QUIET", True), ] diff --git a/var/spack/repos/builtin/packages/detray/package.py b/var/spack/repos/builtin/packages/detray/package.py index 310772e79fee30..10628542228645 100644 --- a/var/spack/repos/builtin/packages/detray/package.py +++ b/var/spack/repos/builtin/packages/detray/package.py @@ -20,6 +20,8 @@ class Detray(CMakePackage): license("MPL-2.0", checked_by="stephenswat") + version("0.85.0", sha256="a0121a27fd08243d4a6aab060e8ab379ad5129e96775b45f6a683835767fa8e7") + version("0.84.0", sha256="b1d133a97dc90b1513f8c1ef235ceaa542d80243028a41f59a79300c7d71eb25") version("0.83.0", sha256="c870a0459d1f9284750f6afbb97c759392e636b56d107f32b9bc891df717a0fe") version("0.82.0", sha256="48794d37496dd5013b755d5d401da7b9d1023fadff86b2a454e5c21e2aaf8c60") version("0.81.0", sha256="821313a7e3ea90fcf5c92153d28bba1f85844e03d7c6b6b98d0b3407adb86357") diff --git a/var/spack/repos/builtin/packages/geomodel/package.py b/var/spack/repos/builtin/packages/geomodel/package.py index 9dd1b99a91092a..e2782ac4e6e230 100644 --- a/var/spack/repos/builtin/packages/geomodel/package.py +++ b/var/spack/repos/builtin/packages/geomodel/package.py @@ -18,6 +18,7 @@ class Geomodel(CMakePackage): license("Apache-2.0", checked_by="wdconinc") + version("6.7.0", sha256="bfa69062ba191d0844d7099b28c0d6c3c0f87e726dacfaa21dba7a6f593d34bf") version("6.6.0", sha256="3cefeaa409177d45d3fa63e069b6496ca062991b0d7d71275b1748487659e91b") version("6.5.0", sha256="8a2f71493e54ea4d393f4c0075f3ca13df132f172c891825f3ab949cda052c5f") version("6.4.0", sha256="369f91f021be83d294ba6a9bdbe00077625e9fe798a396aceece8970e7dd5838") From c3e92a3d012d662f135dbf705f0c51348d5792b7 Mon Sep 17 00:00:00 2001 From: dmagdavector Date: Mon, 9 Dec 2024 17:44:29 -0500 Subject: [PATCH 37/69] py-httpx: add v0.28, v0.28.1 (#47970) * py-httpx: add v0.28, v0.28.1 * py-httpx: py-sniffio dependency only needed up to 0.27 --- var/spack/repos/builtin/packages/py-httpx/package.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-httpx/package.py b/var/spack/repos/builtin/packages/py-httpx/package.py index 37be8063c45923..1d999f6b4e7cfe 100644 --- a/var/spack/repos/builtin/packages/py-httpx/package.py +++ b/var/spack/repos/builtin/packages/py-httpx/package.py @@ -15,6 +15,8 @@ class PyHttpx(PythonPackage): license("BSD-3-Clause") + version("0.28.1", sha256="75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc") + version("0.28.0", sha256="0858d3bab51ba7e386637f22a61d8ccddaeec5f3fe4209da3a6168dbb91573e0") version("0.27.2", sha256="f7c2be1d2f3c3c3160d441802406b206c2b76f5947b11115e6df10c6c65e66c2") version("0.27.0", sha256="a0cb88a46f32dc874e04ee956e4c2764aba2aa228f650b06788ba6bda2962ab5") version("0.23.3", sha256="9818458eb565bb54898ccb9b8b251a28785dd4a55afbc23d0eb410754fe7d0f9") @@ -40,14 +42,13 @@ class PyHttpx(PythonPackage): depends_on("py-anyio", when="@0.27:") depends_on("py-idna", when="@0.27:") - depends_on("py-sniffio@1", when="@0.11.1") - depends_on("py-sniffio", when="@0.15.2:") - depends_on("py-h2@3", when="@0.11.1") depends_on("py-h2@3", when="@0.15.2+http2") depends_on("py-h2@3:4", when="@0.22.0:+http2") # Historical dependencies + depends_on("py-sniffio", when="@0.15.2:0.27") + depends_on("py-sniffio@1", when="@0.11.1") depends_on("py-hstspreload", when="@0.11.1") depends_on("py-chardet@3", when="@0.11.1") depends_on("py-h11@0.8:0.9", when="@0.11.1") From 728c5e0e9d7b7ec988aaf41de4d8277746a00026 Mon Sep 17 00:00:00 2001 From: David Gardner Date: Mon, 9 Dec 2024 14:54:38 -0800 Subject: [PATCH 38/69] add main branch (#47952) --- var/spack/repos/builtin/packages/silo/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/silo/package.py b/var/spack/repos/builtin/packages/silo/package.py index 3416a5c6108a23..f3c4c3f5d68105 100644 --- a/var/spack/repos/builtin/packages/silo/package.py +++ b/var/spack/repos/builtin/packages/silo/package.py @@ -16,6 +16,7 @@ class Silo(AutotoolsPackage): url = "https://wci.llnl.gov/sites/wci/files/2021-01/silo-4.10.2.tgz" maintainers("patrickb314") + version("main", branch="main") version( "4.11.1", preferred=True, From 12dd1208f3d8b6b1ea02e3e1ceeeaa8d778040d3 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 9 Dec 2024 17:01:45 -0600 Subject: [PATCH 39/69] geant4: add v11.3.0 (#47961) * geant4: add v11.3.0 * geant4: rm deprecated 11.3.0.beta * geant4: add 11.3.0 and associated data library versions - Data library versions taken from: - https://gitlab.cern.ch/geant4/geant4/-/blob/v11.3.0/cmake/Modules/G4DatasetDefinitions.cmake?ref_type=tags - Variants etc otherwise unchanged. - 11.3.0-beta version removed, release version marked as preffered. * g4channeling: f-strings --------- Co-authored-by: Ben Morgan Co-authored-by: Seth R. Johnson --- .../builtin/packages/g4channeling/package.py | 38 +++++++++++++++++++ .../repos/builtin/packages/g4emlow/package.py | 1 + .../builtin/packages/g4ensdfstate/package.py | 1 + .../packages/g4photonevaporation/package.py | 1 + .../packages/g4radioactivedecay/package.py | 1 + .../repos/builtin/packages/g4urrpt/package.py | 1 + .../builtin/packages/geant4-data/package.py | 11 +++--- .../repos/builtin/packages/geant4/package.py | 12 +----- 8 files changed, 51 insertions(+), 15 deletions(-) create mode 100644 var/spack/repos/builtin/packages/g4channeling/package.py diff --git a/var/spack/repos/builtin/packages/g4channeling/package.py b/var/spack/repos/builtin/packages/g4channeling/package.py new file mode 100644 index 00000000000000..389faa1a93263a --- /dev/null +++ b/var/spack/repos/builtin/packages/g4channeling/package.py @@ -0,0 +1,38 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +from spack.package import * + + +class G4channeling(Package): + """Geant4 data for solid state crystal channeling""" + + homepage = "https://geant4.web.cern.ch" + url = "https://geant4-data.web.cern.ch/geant4-data/datasets/G4CHANNELING.1.0.tar.gz" + + tags = ["hep"] + + maintainers("drbenmorgan") + + # Only versions relevant to Geant4 releases built by spack are added + version("1.0", sha256="203e3c69984ca09acd181a1d31a9b0efafad4bc12e6c608f0b05e695120d67f2") + + def install(self, spec, prefix): + mkdirp(join_path(prefix.share, "data")) + install_path = join_path(prefix.share, "data", self.g4datasetname) + install_tree(self.stage.source_path, install_path) + + def setup_dependent_run_environment(self, env, dependent_spec): + install_path = join_path(self.prefix.share, "data", self.g4datasetname) + env.set("G4CHANNELINGDATA", install_path) + + def url_for_version(self, version): + """Handle version string.""" + return f"http://geant4-data.web.cern.ch/geant4-data/datasets/G4CHANNELING.{version}.tar.gz" + + @property + def g4datasetname(self): + return f"G4CHANNELING{self.spec.version}" diff --git a/var/spack/repos/builtin/packages/g4emlow/package.py b/var/spack/repos/builtin/packages/g4emlow/package.py index 458f6da76bf99b..048b87a29b8890 100644 --- a/var/spack/repos/builtin/packages/g4emlow/package.py +++ b/var/spack/repos/builtin/packages/g4emlow/package.py @@ -18,6 +18,7 @@ class G4emlow(Package): maintainers("drbenmorgan") # Only versions relevant to Geant4 releases built by spack are added + version("8.6.1", sha256="4a93588d26080ce1d336b94f76fadabe4905fb8f1cba2415795023d6cd8f4a8a") version("8.6", sha256="fb7abed0d1db1d8b9ea364279b95e228d7bf3e3a5dc8d449b81665cada4a1a9e") version("8.5", sha256="66baca49ac5d45e2ac10c125b4fb266225e511803e66981909ce9cd3e9bcef73") version("8.4", sha256="d87de4d2a364cb0a1e1846560525ffc3f735ccdeea8bc426d61775179aebbe8e") diff --git a/var/spack/repos/builtin/packages/g4ensdfstate/package.py b/var/spack/repos/builtin/packages/g4ensdfstate/package.py index 6cb3904756d39d..b53fb251c0e5e5 100644 --- a/var/spack/repos/builtin/packages/g4ensdfstate/package.py +++ b/var/spack/repos/builtin/packages/g4ensdfstate/package.py @@ -18,6 +18,7 @@ class G4ensdfstate(Package): maintainers("drbenmorgan") # Only versions relevant to Geant4 releases built by spack are added + version("3.0", sha256="4bdc3bd40b31d43485bf4f87f055705e540a6557d64ed85c689c59c9a4eba7d6") version("2.3", sha256="9444c5e0820791abd3ccaace105b0e47790fadce286e11149834e79c4a8e9203") version("2.2", sha256="dd7e27ef62070734a4a709601f5b3bada6641b111eb7069344e4f99a01d6e0a6") version("2.1", sha256="933e7f99b1c70f24694d12d517dfca36d82f4e95b084c15d86756ace2a2790d9") diff --git a/var/spack/repos/builtin/packages/g4photonevaporation/package.py b/var/spack/repos/builtin/packages/g4photonevaporation/package.py index 099ded6a5f7044..811cbc93cdfe93 100644 --- a/var/spack/repos/builtin/packages/g4photonevaporation/package.py +++ b/var/spack/repos/builtin/packages/g4photonevaporation/package.py @@ -18,6 +18,7 @@ class G4photonevaporation(Package): maintainers("drbenmorgan") # Only versions relevant to Geant4 releases built by spack are added + version("6.1", sha256="5ffc1f99a81d50c9020186d59874af73c53ba24c1842b3b82b3188223bb246f2") version("5.7", sha256="761e42e56ffdde3d9839f9f9d8102607c6b4c0329151ee518206f4ee9e77e7e5") version("5.5", sha256="5995dda126c18bd7f68861efde87b4af438c329ecbe849572031ceed8f5e76d7") version("5.3", sha256="d47ababc8cbe548065ef644e9bd88266869e75e2f9e577ebc36bc55bf7a92ec8") diff --git a/var/spack/repos/builtin/packages/g4radioactivedecay/package.py b/var/spack/repos/builtin/packages/g4radioactivedecay/package.py index 33a75291ffa24d..9bd7e651650d91 100644 --- a/var/spack/repos/builtin/packages/g4radioactivedecay/package.py +++ b/var/spack/repos/builtin/packages/g4radioactivedecay/package.py @@ -18,6 +18,7 @@ class G4radioactivedecay(Package): maintainers("drbenmorgan") # Only versions relevant to Geant4 releases built by spack are added + version("6.1.2", sha256="a40d7e3ebc64d35555c4a49d0ff1e0945cd605d84354d053121293914caea13a") version("5.6", sha256="3886077c9c8e5a98783e6718e1c32567899eeb2dbb33e402d4476bc2fe4f0df1") version("5.4", sha256="240779da7d13f5bf0db250f472298c3804513e8aca6cae301db97f5ccdcc4a61") version("5.3", sha256="5c8992ac57ae56e66b064d3f5cdfe7c2fee76567520ad34a625bfb187119f8c1") diff --git a/var/spack/repos/builtin/packages/g4urrpt/package.py b/var/spack/repos/builtin/packages/g4urrpt/package.py index a04e6d5d1addc7..060beb5f9ec7df 100644 --- a/var/spack/repos/builtin/packages/g4urrpt/package.py +++ b/var/spack/repos/builtin/packages/g4urrpt/package.py @@ -19,6 +19,7 @@ class G4urrpt(Package): maintainers("drbenmorgan") # Only versions relevant to Geant4 releases built by spack are added + version("1.1", sha256="6a3432db80bc088aee19c504b9c0124913005d6357ea14870451400ab20d9c11") version("1.0", sha256="278eb6c4086e919d2c2a718eb44d4897b7e06d2a32909f6ed48eb8590b3f9977") def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/geant4-data/package.py b/var/spack/repos/builtin/packages/geant4-data/package.py index 3b934da3922bcb..286c6822f88569 100644 --- a/var/spack/repos/builtin/packages/geant4-data/package.py +++ b/var/spack/repos/builtin/packages/geant4-data/package.py @@ -46,18 +46,19 @@ class Geant4Data(BundlePackage): _datasets = { "11.3.0:11.3": [ "g4ndl@4.7.1", - "g4emlow@8.6", - "g4photonevaporation@5.7", - "g4radioactivedecay@5.6", + "g4emlow@8.6.1", + "g4photonevaporation@6.1", + "g4radioactivedecay@6.1.2", "g4particlexs@4.1", "g4pii@1.3", "g4realsurface@2.2", "g4saiddata@2.0", "g4abla@3.3", "g4incl@1.2", - "g4ensdfstate@2.3", + "g4ensdfstate@3.0", + "g4channeling@1.0", "g4nudexlib@1.0", - "g4urrpt@1.0", + "g4urrpt@1.1", ], "11.2.2:11.2": [ "g4ndl@4.7.1", diff --git a/var/spack/repos/builtin/packages/geant4/package.py b/var/spack/repos/builtin/packages/geant4/package.py index 38ebb060fb6340..b93889a1c43c79 100644 --- a/var/spack/repos/builtin/packages/geant4/package.py +++ b/var/spack/repos/builtin/packages/geant4/package.py @@ -21,16 +21,8 @@ class Geant4(CMakePackage): executables = ["^geant4-config$"] maintainers("drbenmorgan", "sethrj") - version( - "11.3.0.beta", - sha256="572ba1570ca3b5b6f2a28ccbffa459901f6a986b79da1ebfdbf2f6f3dc5e14bf", - deprecated=True, - ) - version( - "11.2.2", - sha256="3a8d98c63fc52578f6ebf166d7dffaec36256a186d57f2520c39790367700c8d", - preferred=True, - ) + version("11.3.0", sha256="d9d71daff8890a7b5e0e33ea9a65fe6308ad6713000b43ba6705af77078e7ead") + version("11.2.2", sha256="3a8d98c63fc52578f6ebf166d7dffaec36256a186d57f2520c39790367700c8d") version("11.2.1", sha256="76c9093b01128ee2b45a6f4020a1bcb64d2a8141386dea4674b5ae28bcd23293") version("11.2.0", sha256="9ff544739b243a24dac8f29a4e7aab4274fc0124fd4e1c4972018213dc6991ee") version("11.1.3", sha256="5d9a05d4ccf8b975649eab1d615fc1b8dce5937e01ab9e795bffd04149240db6") From 8d83baa35e46e03d433fd9f28ae394a9bb9dd2a0 Mon Sep 17 00:00:00 2001 From: Mark Abraham Date: Tue, 10 Dec 2024 02:39:32 +0100 Subject: [PATCH 40/69] gromacs: conflict %apple-clang and +openmp (#47935) --- var/spack/repos/builtin/packages/gromacs/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py index 0caecfe31945d3..1b7170ae151234 100644 --- a/var/spack/repos/builtin/packages/gromacs/package.py +++ b/var/spack/repos/builtin/packages/gromacs/package.py @@ -357,6 +357,9 @@ class Gromacs(CMakePackage, CudaPackage): ) variant("openmp", default=True, description="Enables OpenMP at configure time") + conflicts( + "+openmp", when="%apple-clang", msg="OpenMP not available for the Apple clang compiler" + ) variant("openmp_max_threads", default="none", description="Max number of OpenMP threads") conflicts( "+openmp_max_threads", when="~openmp", msg="OpenMP is off but OpenMP Max threads is set" From 0189e92329b884ed9e898efad65d1727445b7002 Mon Sep 17 00:00:00 2001 From: Victor Lopez Herrero Date: Tue, 10 Dec 2024 03:06:58 +0100 Subject: [PATCH 41/69] dlb: add v3.5.0 (#47916) --- var/spack/repos/builtin/packages/dlb/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/dlb/package.py b/var/spack/repos/builtin/packages/dlb/package.py index 988d4061f04e2c..ab51efdc151b37 100644 --- a/var/spack/repos/builtin/packages/dlb/package.py +++ b/var/spack/repos/builtin/packages/dlb/package.py @@ -22,6 +22,7 @@ class Dlb(AutotoolsPackage): license("LGPL-3.0-or-later") version("main", branch="main") + version("3.5.0", sha256="df7fe979059998c2199dc4ee3775d623287fcce728be07e2f6657da2314daf6b") version("3.4.1", sha256="7c071b75c126f8e77c1a30369348751624d5636edcbd663bf3d41fa04733c894") version("3.4", sha256="6091d032c11a094a3ce0bec11c0a164783fdff83cb4ec870c9d8e192410c353a") version("3.3.1", sha256="1b245acad80b03eb83e815fd59dcfc598cfddd899de4504cf6a9572fe5359f40") From d68462ae8e1a36440e76f50efbe2dca8c7c01cd3 Mon Sep 17 00:00:00 2001 From: Alberto Sartori Date: Tue, 10 Dec 2024 03:15:06 +0100 Subject: [PATCH 42/69] justbuild: add version 1.4.1 (#47902) --- var/spack/repos/builtin/packages/justbuild/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/justbuild/package.py b/var/spack/repos/builtin/packages/justbuild/package.py index 1cf96c1bbb09ca..285a3f193c05dc 100644 --- a/var/spack/repos/builtin/packages/justbuild/package.py +++ b/var/spack/repos/builtin/packages/justbuild/package.py @@ -24,6 +24,7 @@ class Justbuild(Package): license("Apache-2.0") version("master", branch="master") + version("1.4.1", tag="v1.4.1", commit="2dc306f510c7ba0661d95bd75305f7deb5eb54b2") version("1.4.0", tag="v1.4.0", commit="562bddf70175a602f896397f41ee5f5e07e834eb") version("1.3.2", tag="v1.3.2", commit="27a56845398b07471f8185648a79a63f97851659") version("1.3.1", tag="v1.3.1", commit="b248838ed0f01bc5824caee3a555e7fd22d5ad10") From fe0f4c18152f3e69d4cf4a6fe57db7dfd851f90d Mon Sep 17 00:00:00 2001 From: Andrey Alekseenko Date: Tue, 10 Dec 2024 02:16:42 +0000 Subject: [PATCH 43/69] gromacs: support version 2024.4 (#47900) And fix help formatting --- var/spack/repos/builtin/packages/gromacs/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py index 1b7170ae151234..84e89a0530e964 100644 --- a/var/spack/repos/builtin/packages/gromacs/package.py +++ b/var/spack/repos/builtin/packages/gromacs/package.py @@ -52,6 +52,7 @@ class Gromacs(CMakePackage, CudaPackage): # 2025 is supported. version("main", branch="main") version("master", branch="main", deprecated=True) + version("2024.4", sha256="ac618ece2e58afa86b536c5a2c4fcb937f0760318f12d18f10346b6bdebd86a8") version("2024.3", sha256="bbda056ee59390be7d58d84c13a9ec0d4e3635617adf2eb747034922cba1f029") version("2024.2", sha256="802a7e335f2e895770f57b159e4ec368ebb0ff2ce6daccf706c6e8025c36852b") version("2024.1", sha256="937d8f12a36fffbf2af7add71adbb5aa5c5537892d46c9a76afbecab1aa0aac7") @@ -476,7 +477,7 @@ class Gromacs(CMakePackage, CudaPackage): variant( "intel_provided_gcc", default=False, - description="Use this if Intel compiler is installed through spack." + description="Use this if Intel compiler is installed through spack. " + "The g++ location is written to icp{c,x}.cfg", ) From 24fc720c0beca2602775c75eac95d2445ac3e237 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 10 Dec 2024 03:18:19 +0100 Subject: [PATCH 44/69] py-twine: add v6.0.1 (#47899) --- .../builtin/packages/py-twine/package.py | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-twine/package.py b/var/spack/repos/builtin/packages/py-twine/package.py index 974dc34d269d71..c238a9512e1169 100644 --- a/var/spack/repos/builtin/packages/py-twine/package.py +++ b/var/spack/repos/builtin/packages/py-twine/package.py @@ -13,25 +13,31 @@ class PyTwine(PythonPackage): pypi = "twine/twine-2.0.0.tar.gz" git = "https://github.com/pypa/twine.git" + version("6.0.1", sha256="36158b09df5406e1c9c1fb8edb24fc2be387709443e7376689b938531582ee27") version("4.0.2", sha256="9e102ef5fdd5a20661eb88fad46338806c3bd32cf1db729603fe3697b1bc83c8") version("4.0.1", sha256="96b1cf12f7ae611a4a40b6ae8e9570215daff0611828f5fe1f37a16255ab24a0") version("2.0.0", sha256="9fe7091715c7576df166df8ef6654e61bada39571783f2fd415bdcba867c6993") - depends_on("py-setuptools@45:", when="@3.4.1:", type="build") - depends_on("py-setuptools@0.7.0:", type="build") - depends_on("py-setuptools-scm+toml@6:", when="@3.4.2:", type="build") - - depends_on("py-pkginfo@1.8.1:", when="@3.7:", type=("build", "run")) - depends_on("py-pkginfo@1.4.2:", type=("build", "run")) - depends_on("py-readme-renderer@35:", when="@4.0.1:", type=("build", "run")) - depends_on("py-readme-renderer@21.0:", type=("build", "run")) - depends_on("py-requests@2.20:", type=("build", "run")) - depends_on("py-requests-toolbelt@0.8.0:0.8,0.9.1:", type=("build", "run")) - depends_on("py-urllib3@1.26:", when="@3.8:", type=("build", "run")) - depends_on("py-importlib-metadata@3.6:", when="@3.4:", type=("build", "run")) - depends_on("py-keyring@15.1:", when="@3:", type=("build", "run")) - depends_on("py-rfc3986@1.4:", when="@3.2:", type=("build", "run")) - depends_on("py-rich@12:", when="@4:", type=("build", "run")) - - # Historical Dependencies - depends_on("py-tqdm@4.14:", when="@:3", type=("build", "run")) + with default_args(type="build"): + depends_on("py-setuptools@61.2:", when="@6:") + depends_on("py-setuptools@45:", when="@3.4.1:") + depends_on("py-setuptools@0.7.0:") + depends_on("py-setuptools-scm+toml@6:", when="@3.4.2:") + + with default_args(type=("build", "run")): + depends_on("py-pkginfo@1.8.1:", when="@3.7:") + depends_on("py-pkginfo@1.4.2:") + depends_on("py-readme-renderer@35:", when="@4.0.1:") + depends_on("py-readme-renderer@21.0:") + depends_on("py-requests@2.20:") + depends_on("py-requests-toolbelt@0.8,0.9.1:") + depends_on("py-urllib3@1.26:", when="@3.8:") + depends_on("py-importlib-metadata@3.6:", when="@6:^python@:3.9") + depends_on("py-importlib-metadata@3.6:", when="@3.4:4") + depends_on("py-keyring@15.1:", when="@3:") + depends_on("py-rfc3986@1.4:", when="@3.2:") + depends_on("py-rich@12:", when="@4:") + depends_on("py-packaging", when="@6:") + + # Historical Dependencies + depends_on("py-tqdm@4.14:", when="@:3") From 36f3566257527731162ee75807dd4bcfd3991ad0 Mon Sep 17 00:00:00 2001 From: Luc Grosheintz Date: Tue, 10 Dec 2024 03:22:10 +0100 Subject: [PATCH 45/69] highfive: update maintainers. (#47896) * highfive: update maintainers. * switch maintainers. --------- Co-authored-by: Nicolas Cornu --- var/spack/repos/builtin/packages/highfive/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/highfive/package.py b/var/spack/repos/builtin/packages/highfive/package.py index 34266ca7d9c34a..b487599e46735e 100644 --- a/var/spack/repos/builtin/packages/highfive/package.py +++ b/var/spack/repos/builtin/packages/highfive/package.py @@ -14,7 +14,7 @@ class Highfive(CMakePackage): homepage = "https://github.com/BlueBrain/HighFive" url = "https://github.com/BlueBrain/HighFive/archive/v1.2.tar.gz" git = "https://github.com/BlueBrain/HighFive.git" - maintainers("alkino") + maintainers("1uc") license("BSL-1.0") From 42333ad66ef58b6182bd4a41baf1c1e13b13fe18 Mon Sep 17 00:00:00 2001 From: jgraciahlrs Date: Tue, 10 Dec 2024 03:24:15 +0100 Subject: [PATCH 46/69] extrae: relax requirements on binutils (#47893) --- var/spack/repos/builtin/packages/extrae/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/extrae/package.py b/var/spack/repos/builtin/packages/extrae/package.py index ee36e88b05ea5f..6e8cd25623603b 100644 --- a/var/spack/repos/builtin/packages/extrae/package.py +++ b/var/spack/repos/builtin/packages/extrae/package.py @@ -82,7 +82,8 @@ class Extrae(AutotoolsPackage): depends_on("elf", type="link") depends_on("libxml2") depends_on("numactl") - depends_on("binutils+libiberty@:2.33") + depends_on("binutils+libiberty@:2.33", when="@:4.0.1") + depends_on("binutils+libiberty", when="@4.0.2:") depends_on("gettext") # gettext dependency added to find -lintl # https://www.gnu.org/software/gettext/FAQ.html#integrating_undefined From f3c6f00cc1a6d6c626f84aa193847ceafc7fd15f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Trahay?= Date: Tue, 10 Dec 2024 03:25:54 +0100 Subject: [PATCH 47/69] eztrace: new version for building from the dev branch of the git repository (#47891) --- var/spack/repos/builtin/packages/eztrace/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/eztrace/package.py b/var/spack/repos/builtin/packages/eztrace/package.py index 7648bbb26aa9ff..601fb11b409373 100644 --- a/var/spack/repos/builtin/packages/eztrace/package.py +++ b/var/spack/repos/builtin/packages/eztrace/package.py @@ -17,6 +17,7 @@ class Eztrace(CMakePackage, AutotoolsPackage, CudaPackage): license("CECILL-B") version("master", branch="master") + version("develop", branch="dev") version("2.1", sha256="ab5076086eced78e4c6cf7736e7765ca1337dec95a881c9270a42b3251aeea19") version("2.0", sha256="67bd296f059cdfab303c62f674af3e1e858213d6945bd79cb8ede4a035c0c2d6") version("1.1-13", sha256="6144d04fb62b3ccad41af0268cd921161f168d0cca3f6c210c448bb0b07be7e0") From 449a462cdef4ffc85bd68a99dc8f1be363b15329 Mon Sep 17 00:00:00 2001 From: Tobias Ribizel Date: Tue, 10 Dec 2024 03:27:30 +0100 Subject: [PATCH 48/69] gurobi: add versions 11 and 12 (#47889) This also means removing the Python support for these versions, as the installation method was deprecated in favor of pip/conda --- var/spack/repos/builtin/packages/gurobi/package.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/gurobi/package.py b/var/spack/repos/builtin/packages/gurobi/package.py index d9dd35c2ed75ed..685c790a8b52e3 100644 --- a/var/spack/repos/builtin/packages/gurobi/package.py +++ b/var/spack/repos/builtin/packages/gurobi/package.py @@ -23,6 +23,8 @@ class Gurobi(Package): homepage = "https://www.gurobi.com" manual_download = True + version("12.0.0", sha256="a2bdc9c1d6bf8eb4e551a184af1ce8d7b0435ea8e7d19a017cc7d53fd5efda12") + version("11.0.3", sha256="82a2c8671c234bbaa9dc64da22b1951abf41c62047fdf77004e65f24a91dfd13") version("10.0.0", sha256="91a9ce1464f5f948809fcdfbdeb55f77698ed8a6d6cfa6985295424b6ece2bd4") version("9.5.2", sha256="95d8ca18b7f86116ba834a27fd6228c5b1708ae67927e7ea0e954c09374a2d0f") version("9.5.1", sha256="fa82859d33f08fb8aeb9da66b0fbd91718ed573c534f571aa52372c9deb891da") @@ -36,7 +38,9 @@ class Gurobi(Package): license_url = "http://www.gurobi.com/downloads/download-center" extends("python") - depends_on("python@2.7,3.6:") + depends_on("python@2.7,3.6:", when="@:10") + depends_on("python@3.8:", when="@11") + depends_on("python@3.9:", when="@12") def url_for_version(self, version): return "file://{0}/gurobi{1}_linux64.tar.gz".format(os.getcwd(), version) @@ -50,10 +54,14 @@ def patch(self): def setup_run_environment(self, env): env.set("GUROBI_HOME", self.prefix) env.set("GRB_LICENSE_FILE", join_path(self.prefix, "gurobi.lic")) + env.prepend_path("LD_LIBRARY_PATH", self.prefix.lib), def install(self, spec, prefix): install_tree("linux64", prefix) + # the Python package installation was deprecated after version 10, + # to be superseded by pip/conda installs + @when("@:10") @run_after("install") def gurobipy(self): with working_dir("linux64"): From 855943ff2928dc748789a25e50770667ada4aa2a Mon Sep 17 00:00:00 2001 From: teddy Date: Tue, 10 Dec 2024 03:29:59 +0100 Subject: [PATCH 49/69] py-mgmetis: remove constrains 3.X for mpi4py & 1.X for numpy depandancies (#47890) Co-authored-by: t. chantrait --- var/spack/repos/builtin/packages/py-mgmetis/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-mgmetis/package.py b/var/spack/repos/builtin/packages/py-mgmetis/package.py index 2d673853116506..72fbb800b93352 100644 --- a/var/spack/repos/builtin/packages/py-mgmetis/package.py +++ b/var/spack/repos/builtin/packages/py-mgmetis/package.py @@ -19,8 +19,8 @@ class PyMgmetis(PythonPackage): depends_on("python@3.7:", type=("build", "run")) depends_on("py-setuptools", type="build") - depends_on("py-numpy@1.20.0:1.26.4", type=("build", "run")) + depends_on("py-numpy@1.20.0:", type=("build", "run")) depends_on("py-cython", type=("build")) - depends_on("py-mpi4py@3.0.3:3", type=("build", "run")) + depends_on("py-mpi4py@3.0.3:", type=("build", "run")) depends_on("py-pytest") depends_on("metis+shared", type="all") From 5232ee1ed18e7fa6556e9599fd9a7ec2e7a6ad22 Mon Sep 17 00:00:00 2001 From: Laura Weber Date: Mon, 9 Dec 2024 18:31:35 -0800 Subject: [PATCH 50/69] tecplot: updated hash for 2024r1m1 (#47886) --- var/spack/repos/builtin/packages/tecplot/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/tecplot/package.py b/var/spack/repos/builtin/packages/tecplot/package.py index ba5e2745bcdc9b..ffcdc4c9e1725e 100644 --- a/var/spack/repos/builtin/packages/tecplot/package.py +++ b/var/spack/repos/builtin/packages/tecplot/package.py @@ -21,7 +21,7 @@ class Tecplot(Package): version( "2024r1", - sha256="709022a5d5532d46a47cfa3bf0698a4ea8428c7a0dea2feb708a5add8091a8f0", + sha256="46012aab7e3f18d77344448d1e1a8d43a58f5e35fb0a296c593199810df4bc8e", expand=False, ) version( From 15f3851a92b79bf50a97c508be4c726297465c11 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 10 Dec 2024 06:59:24 +0100 Subject: [PATCH 51/69] py-scikit-learn: add v1.6.0 (#47998) --- var/spack/repos/builtin/packages/py-scikit-learn/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-scikit-learn/package.py b/var/spack/repos/builtin/packages/py-scikit-learn/package.py index 372c50624ad994..d40bad8e41bf0f 100644 --- a/var/spack/repos/builtin/packages/py-scikit-learn/package.py +++ b/var/spack/repos/builtin/packages/py-scikit-learn/package.py @@ -19,6 +19,7 @@ class PyScikitLearn(PythonPackage): version("main", branch="main") version("master", branch="main", deprecated=True) + version("1.6.0", sha256="9d58481f9f7499dff4196927aedd4285a0baec8caa3790efbe205f13de37dd6e") version("1.5.2", sha256="b4237ed7b3fdd0a4882792e68ef2545d5baa50aca3bb45aa7df468138ad8f94d") version("1.5.1", sha256="0ea5d40c0e3951df445721927448755d3fe1d80833b0b7308ebff5d2a45e6414") version("1.5.0", sha256="789e3db01c750ed6d496fa2db7d50637857b451e57bcae863bff707c1247bef7") From 478647f873580019199374dc4e91893bb1aa0561 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 10 Dec 2024 07:39:00 +0100 Subject: [PATCH 52/69] py-numpy: add v2.2.0 (#47999) --- var/spack/repos/builtin/packages/py-numpy/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py index b90e044306961c..f3b51631ff8c2a 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -22,6 +22,7 @@ class PyNumpy(PythonPackage): license("BSD-3-Clause") version("main", branch="main") + version("2.2.0", sha256="140dd80ff8981a583a60980be1a655068f8adebf7a45a06a6858c873fcdcd4a0") version("2.1.2", sha256="13532a088217fa624c99b843eeb54640de23b3414b14aa66d023805eb731066c") version("2.1.1", sha256="d0cf7d55b1051387807405b3898efafa862997b4cba8aa5dbe657be794afeafd") version("2.1.0", sha256="7dc90da0081f7e1da49ec4e398ede6a8e9cc4f5ebe5f9e06b443ed889ee9aaa2") From 466c3abaeb9dfcb95deb537fb8ab39b9b527e1ea Mon Sep 17 00:00:00 2001 From: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> Date: Mon, 9 Dec 2024 23:19:56 -0800 Subject: [PATCH 53/69] Remove remaining use of deprecated test callback (#47995) --- lib/spack/docs/packaging_guide.rst | 4 ++-- var/spack/repos/builtin/packages/py-anuga/package.py | 2 +- var/spack/repos/builtin/packages/py-datalad/package.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index a7564c2b039db4..b44bded2ba9151 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -5137,7 +5137,7 @@ other checks. - Not applicable * - :ref:`PythonPackage ` - Not applicable - - ``test`` (module imports) + - ``test_imports`` (module imports) * - :ref:`QMakePackage ` - ``check`` (``make check``) - Not applicable @@ -5146,7 +5146,7 @@ other checks. - Not applicable * - :ref:`SIPPackage ` - Not applicable - - ``test`` (module imports) + - ``test_imports`` (module imports) * - :ref:`WafPackage ` - ``build_test`` (must be overridden) - ``install_test`` (must be overridden) diff --git a/var/spack/repos/builtin/packages/py-anuga/package.py b/var/spack/repos/builtin/packages/py-anuga/package.py index 97e83db416f160..69402d06830ef6 100644 --- a/var/spack/repos/builtin/packages/py-anuga/package.py +++ b/var/spack/repos/builtin/packages/py-anuga/package.py @@ -50,7 +50,7 @@ def setup_run_environment(self, env): if self.run_tests: env.prepend_path("PATH", self.spec["mpi"].prefix.bin) - install_time_test_callbacks = ["test", "installtest"] + install_time_test_callbacks = ["test_imports", "installtest"] def installtest(self): python("runtests.py", "--no-build") diff --git a/var/spack/repos/builtin/packages/py-datalad/package.py b/var/spack/repos/builtin/packages/py-datalad/package.py index 904c2024d9a0bb..a77b0c2c9b482b 100644 --- a/var/spack/repos/builtin/packages/py-datalad/package.py +++ b/var/spack/repos/builtin/packages/py-datalad/package.py @@ -133,7 +133,7 @@ class PyDatalad(PythonPackage): # for version @:0.17 conflicts("~metadata-extra", when="+full") - install_time_test_callbacks = ["test", "installtest"] + install_time_test_callbacks = ["test_imports", "installtest"] def installtest(self): datalad = Executable(self.prefix.bin.datalad) From 30c00353d44dad64d38beb60d039adda78c31b68 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 10 Dec 2024 09:25:30 +0100 Subject: [PATCH 54/69] make level_zero variant consistent, add missing instances (#47985) --- .../stacks/e4s-oneapi/spack.yaml | 2 +- .../repos/builtin/packages/aml/package.py | 24 ++++++---- .../double-batched-fft-library/package.py | 6 +-- .../builtin/packages/geopm-service/package.py | 34 +++++++------- .../repos/builtin/packages/hwloc/package.py | 44 ++++++++----------- .../builtin/packages/libfabric/package.py | 31 +++++-------- .../repos/builtin/packages/libquo/package.py | 11 +++-- .../repos/builtin/packages/mpich/package.py | 28 +++++++----- .../packages/tiny-tensor-compiler/package.py | 10 ++--- .../repos/builtin/packages/yaksa/package.py | 10 +++-- 10 files changed, 105 insertions(+), 95 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml index 0095fd3ec1ab01..66214ecff9541e 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml @@ -223,7 +223,7 @@ spack: # - py-torch # error # GPU - - aml +ze + - aml +level_zero - amrex +sycl - arborx +sycl ^kokkos +sycl +openmp cxxstd=17 +examples - cabana +sycl ^kokkos +sycl +openmp cxxstd=17 +examples diff --git a/var/spack/repos/builtin/packages/aml/package.py b/var/spack/repos/builtin/packages/aml/package.py index cdf45388e6322a..8ce1998d0ad142 100644 --- a/var/spack/repos/builtin/packages/aml/package.py +++ b/var/spack/repos/builtin/packages/aml/package.py @@ -47,7 +47,11 @@ class Aml(AutotoolsPackage): ############################# variant("opencl", default=False, description="Support for memory operations on top of OpenCL.") - variant("ze", default=False, description="Support for memory operations on top of Level Zero.") + variant( + "level_zero", + default=False, + description="Support for memory operations on top of Level Zero.", + ) variant("hip", default=False, description="Support for memory operations on top of HIP.") variant("cuda", default=False, description="Support for memory operations on top of CUDA.") variant("hwloc", default=True, description="Enable feature related to topology management") @@ -70,7 +74,7 @@ class Aml(AutotoolsPackage): # - hip dependency. We use the environment variable HIP_PATH in the configure. depends_on("hip", when="+hip") # - level_zero loader is the dependency for the oneAPI variant - depends_on("oneapi-level-zero", when="+ze") + depends_on("oneapi-level-zero", when="+level_zero") # - hwloc >= 2.1 becomes a dependency when +hwloc variant is used. depends_on("hwloc@2.1:", when="+hwloc") # - ocl-icd >= 2.1 becomes a dependency when +opencl variant is used. @@ -94,15 +98,19 @@ class Aml(AutotoolsPackage): # This is the function to overload to pass all hwloc flag. def configure_args(self): - config_args = [] - for b in ["opencl", "hwloc", "ze", "hip", "cuda"]: - config_args.extend(self.with_or_without(b)) + config_args = [ + *self.with_or_without("opencl"), + *self.with_or_without("hwloc"), + *self.with_or_without("hip"), + *self.with_or_without("cuda"), + *self.with_or_without("ze", variant="level_zero"), + ] if self.spec.satisfies("%oneapi"): - config_args += ["--with-openmp-flags=-fiopenmp -fopenmp-targets=spir64"] + config_args.append("--with-openmp-flags=-fiopenmp -fopenmp-targets=spir64") if self.spec.variants["hip-platform"].value == "amd": - config_args += ["--with-hip-platform=amd"] + config_args.append("--with-hip-platform=amd") if self.spec.variants["hip-platform"].value == "nvidia": - config_args += ["--with-hip-platform=nvidia"] + config_args.append("--with-hip-platform=nvidia") return config_args # Tests diff --git a/var/spack/repos/builtin/packages/double-batched-fft-library/package.py b/var/spack/repos/builtin/packages/double-batched-fft-library/package.py index 168e51eb91aeeb..848e1fe28f5e23 100644 --- a/var/spack/repos/builtin/packages/double-batched-fft-library/package.py +++ b/var/spack/repos/builtin/packages/double-batched-fft-library/package.py @@ -32,12 +32,12 @@ class DoubleBatchedFftLibrary(CMakePackage): variant("shared", default=True, description="Shared library") variant("sycl", default=True, description="Build bbfft-sycl") - variant("level-zero", default=True, when="~sycl", description="Build bbfft-level-zero") + variant("level_zero", default=True, when="~sycl", description="Build bbfft-level-zero") variant("opencl", default=True, when="~sycl", description="Build bbfft-opencl") depends_on("cmake@3.23.0:", type="build") depends_on("oneapi-level-zero", when="+sycl") - depends_on("oneapi-level-zero", when="+level-zero") + depends_on("oneapi-level-zero", when="+level_zero") depends_on("opencl", when="+opencl") patch("0001-Add-CPATH-and-LIBRARY_PATHs-to-OpenCL-search-paths.patch", when="@:0.3.6") @@ -50,7 +50,7 @@ def cmake_args(self): return [ self.define_from_variant("BUILD_SHARED_LIBS", "shared"), self.define_from_variant("BUILD_SYCL", "sycl"), - self.define_from_variant("BUILD_LEVEL_ZERO", "level-zero"), + self.define_from_variant("BUILD_LEVEL_ZERO", "level_zero"), self.define_from_variant("BUILD_OPENCL", "opencl"), self.define("BUILD_BENCHMARK", False), self.define("BUILD_EXAMPLE", False), diff --git a/var/spack/repos/builtin/packages/geopm-service/package.py b/var/spack/repos/builtin/packages/geopm-service/package.py index 2bfaa68a0026e6..be9cb065ad7135 100644 --- a/var/spack/repos/builtin/packages/geopm-service/package.py +++ b/var/spack/repos/builtin/packages/geopm-service/package.py @@ -41,7 +41,7 @@ class GeopmService(AutotoolsPackage): ) variant("gnu-ld", default=False, description="Assume C compiler uses gnu-ld") - variant("levelzero", default=False, description="Enables the use of oneAPI Level Zero loader") + variant("level_zero", default=False, description="Enables the use of oneAPI Level Zero loader") variant("nvml", default=False, description="Enable NVML support") variant( @@ -51,7 +51,7 @@ class GeopmService(AutotoolsPackage): when="@develop", ) - conflicts("+nvml", when="+levelzero", msg="LevelZero and NVML support are mutually exclusive") + conflicts("+nvml", when="+level_zero", msg="LevelZero and NVML support are mutually exclusive") conflicts("%gcc@:7.2", msg="Requires C++17 support") conflicts("%clang@:4", msg="Requires C++17 support") @@ -100,7 +100,7 @@ class GeopmService(AutotoolsPackage): depends_on("systemd", when="+systemd") depends_on("libcap", when="+libcap") depends_on("liburing", when="+liburing") - depends_on("oneapi-level-zero", when="+levelzero") + depends_on("oneapi-level-zero", when="+level_zero") depends_on("cuda", when="+nvml") extends("python") @@ -129,19 +129,19 @@ def autoreconf(self, spec, prefix): def configure_args(self): args = [ "--with-bash-completion-dir=" - + join_path(self.spec.prefix, "share", "bash-completion", "completions") + + join_path(self.spec.prefix, "share", "bash-completion", "completions"), + *self.enable_or_disable("debug"), + *self.enable_or_disable("docs"), + *self.enable_or_disable("systemd"), + *self.enable_or_disable("liburing"), + *self.with_or_without("liburing", activation_value="prefix"), + *self.enable_or_disable("libcap"), + *self.with_or_without("gnu-ld"), + *self.enable_or_disable("levelzero", variant="level_zero"), + *self.enable_or_disable("nvml"), + *self.enable_or_disable("rawmsr"), ] - args += self.enable_or_disable("debug") - args += self.enable_or_disable("docs") - args += self.enable_or_disable("systemd") - args += self.enable_or_disable("liburing") - args += self.with_or_without("liburing", activation_value="prefix") - args += self.enable_or_disable("libcap") - args += self.with_or_without("gnu-ld") - - args += self.enable_or_disable("levelzero") - args += self.enable_or_disable("nvml") if self.spec.satisfies("+nvml"): args += [ "--with-nvml=" @@ -150,10 +150,8 @@ def configure_args(self): ) ] - args += self.enable_or_disable("rawmsr") - with when("@develop"): - if self.spec.target.family != "x86_64": - args += ["--disable-cpuid"] + if self.spec.satisfies("@develop") and self.spec.target.family != "x86_64": + args.append("--disable-cpuid") return args def setup_run_environment(self, env): diff --git a/var/spack/repos/builtin/packages/hwloc/package.py b/var/spack/repos/builtin/packages/hwloc/package.py index 4ef81adee39f7c..ef7adc7566466a 100644 --- a/var/spack/repos/builtin/packages/hwloc/package.py +++ b/var/spack/repos/builtin/packages/hwloc/package.py @@ -96,9 +96,7 @@ class Hwloc(AutotoolsPackage, CudaPackage, ROCmPackage): ) variant("opencl", default=False, description="Support an OpenCL library at run time") variant("rocm", default=False, description="Support ROCm devices") - variant( - "oneapi-level-zero", default=False, description="Support Intel OneAPI Level Zero devices" - ) + variant("level_zero", default=False, description="Support Intel OneAPI Level Zero devices") depends_on("c", type="build") depends_on("cxx", type="build") @@ -139,10 +137,10 @@ class Hwloc(AutotoolsPackage, CudaPackage, ROCmPackage): # variant of llvm-amdgpu depends on hwloc. depends_on("llvm-amdgpu", when="+opencl") - with when("+oneapi-level-zero"): + with when("+level_zero"): depends_on("oneapi-level-zero") # LevelZero support isn't available until hwloc version 2.5.0 - conflicts("@:2.4.99", msg="hwloc supports Intel OneAPI Level Zero only since 2.5.0") + conflicts("@:2.4", msg="hwloc supports Intel OneAPI Level Zero only since 2.5.0") @classmethod def determine_version(cls, exe): @@ -160,7 +158,18 @@ def libs(self): return LibraryList(libs) def configure_args(self): - args = [] + args = [ + *self.enable_or_disable("netloc"), + *self.enable_or_disable("cairo"), + *self.enable_or_disable("nvml"), + *self.enable_or_disable("gl"), + *self.enable_or_disable("cuda"), + *self.enable_or_disable("libxml2"), + *self.enable_or_disable("libudev"), + *self.enable_or_disable("pci"), + *self.enable_or_disable("libs"), + *self.enable_or_disable("levelzero", variant="level_zero"), + ] # If OpenCL is not enabled, disable it since hwloc might # pick up an OpenCL library at build time that is then @@ -179,26 +188,11 @@ def configure_args(self): args.append("--disable-rsmi") if self.spec.satisfies("+rocm"): - args.append("--with-rocm={0}".format(self.spec["hip"].prefix)) - args.append("--with-rocm-version={0}".format(self.spec["hip"].version)) - - args.extend(self.enable_or_disable("netloc")) - args.extend(self.enable_or_disable("cairo")) - args.extend(self.enable_or_disable("nvml")) - args.extend(self.enable_or_disable("gl")) - args.extend(self.enable_or_disable("cuda")) - args.extend(self.enable_or_disable("libxml2")) - args.extend(self.enable_or_disable("libudev")) - args.extend(self.enable_or_disable("pci")) - args.extend(self.enable_or_disable("libs")) + args.append(f'--with-rocm={self.spec["hip"].prefix}') + args.append(f'--with-rocm-version={self.spec["hip"].version}') if self.spec.satisfies("+cuda"): - args.append("--with-cuda={0}".format(self.spec["cuda"].prefix)) - args.append("--with-cuda-version={0}".format(self.spec["cuda"].version)) - - if self.spec.satisfies("+oneapi-level-zero"): - args.append("--enable-levelzero") - else: - args.append("--disable-levelzero") + args.append(f'--with-cuda={self.spec["cuda"].prefix}') + args.append(f'--with-cuda-version={self.spec["cuda"].version}') return args diff --git a/var/spack/repos/builtin/packages/libfabric/package.py b/var/spack/repos/builtin/packages/libfabric/package.py index 7aaa7dd73f2b0a..eef6a4d54f974a 100644 --- a/var/spack/repos/builtin/packages/libfabric/package.py +++ b/var/spack/repos/builtin/packages/libfabric/package.py @@ -106,10 +106,9 @@ class Libfabric(AutotoolsPackage, CudaPackage): # device file can only be opened once per process, however, and thus it # frequently conflicts with MPI. variant("kdreg", default=False, description="Enable kdreg on supported Cray platforms") - variant("debug", default=False, description="Enable debugging") - variant("uring", default=False, when="@1.17.0:", description="Enable uring support") + variant("level_zero", default=False, description="Enable Level Zero support") # For version 1.9.0: # headers: fix forward-declaration of enum fi_collective_op with C++ @@ -132,6 +131,7 @@ class Libfabric(AutotoolsPackage, CudaPackage): depends_on("uuid", when="fabrics=opx") depends_on("numactl", when="fabrics=opx") depends_on("liburing@2.1:", when="+uring") + depends_on("oneapi-level-zero", when="+level_zero") depends_on("m4", when="@main", type="build") depends_on("autoconf", when="@main", type="build") @@ -195,26 +195,19 @@ def autoreconf(self, spec, prefix): bash("./autogen.sh") def configure_args(self): - args = [] - - args.extend(self.enable_or_disable("debug")) - - if self.spec.satisfies("+kdreg"): - args.append("--with-kdreg=yes") - else: - args.append("--with-kdreg=no") - - if self.spec.satisfies("+uring"): - args.append("--with-uring=yes") + args = [ + *self.enable_or_disable("debug"), + *self.with_or_without("kdreg"), + *self.with_or_without("uring"), + *self.with_or_without("cuda", activation_value="prefix"), + *self.with_or_without("ze", variant="level_zero"), + ] for fabric in [f if isinstance(f, str) else f[0].value for f in self.fabrics]: - if "fabrics=" + fabric in self.spec: - args.append("--enable-{0}=yes".format(fabric)) + if f"fabrics={fabric}" in self.spec: + args.append(f"--enable-{fabric}") else: - args.append("--enable-{0}=no".format(fabric)) - - if self.spec.satisfies("+cuda"): - args.append(f"--with-cuda={self.spec['cuda'].prefix}") + args.append(f"--disable-{fabric}") return args diff --git a/var/spack/repos/builtin/packages/libquo/package.py b/var/spack/repos/builtin/packages/libquo/package.py index efaa0da76fb34d..a11c310e3236a9 100644 --- a/var/spack/repos/builtin/packages/libquo/package.py +++ b/var/spack/repos/builtin/packages/libquo/package.py @@ -27,8 +27,8 @@ class Libquo(AutotoolsPackage): version("1.3", sha256="61b0beff15eae4be94b5d3cbcbf7bf757659604465709ed01827cbba45efcf90") version("1.2.9", sha256="0a64bea8f52f9eecd89e4ab82fde1c5bd271f3866c612da0ce7f38049409429b") - depends_on("c", type="build") # generated - depends_on("fortran", type="build") # generated + depends_on("c", type="build") + depends_on("fortran", type="build") depends_on("mpi") @@ -43,4 +43,9 @@ def autoreconf(self, spec, prefix): bash("./autogen") def configure_args(self): - return [f"CC={self.spec['mpi'].mpicc}", f"FC={self.spec['mpi'].mpifc}"] + return [ + f"CC={self.spec['mpi'].mpicc}", + f"FC={self.spec['mpi'].mpifc}", + # hwloc is vendored + "--disable-levelzero", + ] diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index a1816d401af7d1..4683e2e6a64bc3 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -58,10 +58,6 @@ class Mpich(AutotoolsPackage, CudaPackage, ROCmPackage): version("3.1", sha256="fcf96dbddb504a64d33833dc455be3dda1e71c7b3df411dfcf9df066d7c32c39") version("3.0.4", sha256="cf638c85660300af48b6f776e5ecd35b5378d5905ec5d34c3da7a27da0acf0b3") - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated - depends_on("fortran", type="build", when="+fortran") - variant("hwloc", default=True, description="Use external hwloc package") variant("hydra", default=True, description="Build the hydra process manager") variant("romio", default=True, description="Enable ROMIO MPI I/O implementation") @@ -134,11 +130,6 @@ class Mpich(AutotoolsPackage, CudaPackage, ROCmPackage): depends_on("yaksa+cuda", when="+cuda") depends_on("yaksa+rocm", when="+rocm") - conflicts("datatype-engine=yaksa", when="device=ch3") - conflicts("datatype-engine=yaksa", when="device=ch3:sock") - conflicts("datatype-engine=dataloop", when="+cuda") - conflicts("datatype-engine=dataloop", when="+rocm") - variant( "hcoll", default=False, @@ -146,9 +137,20 @@ class Mpich(AutotoolsPackage, CudaPackage, ROCmPackage): "collective operations library", when="@3.3: device=ch4 netmod=ucx", ) - depends_on("hcoll", when="+hcoll") variant("xpmem", default=False, when="@3.4:", description="Enable XPMEM support") + variant("level_zero", default=False, description="Enable level zero support") + + conflicts("datatype-engine=yaksa", when="device=ch3") + conflicts("datatype-engine=yaksa", when="device=ch3:sock") + conflicts("datatype-engine=dataloop", when="+cuda") + conflicts("datatype-engine=dataloop", when="+rocm") + + depends_on("c", type="build") + depends_on("cxx", type="build") + depends_on("fortran", type="build", when="+fortran") + + depends_on("hcoll", when="+hcoll") depends_on("xpmem", when="+xpmem") # Todo: cuda can be a conditional variant, but it does not seem to work when @@ -303,6 +305,7 @@ class Mpich(AutotoolsPackage, CudaPackage, ROCmPackage): depends_on("python@3.0:", when="@develop", type="build") depends_on("cray-pmi", when="pmi=cray") + depends_on("oneapi-level-zero", when="+level_zero") conflicts("device=ch4", when="@:3.2") conflicts("netmod=ofi", when="@:3.1.4") @@ -523,8 +526,13 @@ def configure_args(self): "--{0}-ibverbs".format("with" if "+verbs" in spec else "without"), "--enable-wrapper-rpath={0}".format("no" if "~wrapperrpath" in spec else "yes"), "--with-yaksa={0}".format(spec["yaksa"].prefix if "^yaksa" in spec else "embedded"), + *self.with_or_without("ze", variant="level_zero"), ] + # https://github.com/pmodels/mpich/commit/bbfc4cab6ade0b75ef3803a83af1cad4a262a564 + if self.spec.satisfies("@:4.2 ~hwloc"): + config_args += self.enable_or_disable("levelzero", variant="level_zero") + # see https://github.com/pmodels/mpich/issues/5530 if spec.platform == "darwin": config_args.append("--enable-two-level-namespace") diff --git a/var/spack/repos/builtin/packages/tiny-tensor-compiler/package.py b/var/spack/repos/builtin/packages/tiny-tensor-compiler/package.py index cba0e2cb8b4df8..071c3658e244dd 100644 --- a/var/spack/repos/builtin/packages/tiny-tensor-compiler/package.py +++ b/var/spack/repos/builtin/packages/tiny-tensor-compiler/package.py @@ -25,15 +25,15 @@ class TinyTensorCompiler(CMakePackage): depends_on("cxx", type="build") # generated variant("shared", default=True, description="Shared library") - variant("level-zero", default=False, description="Build tinytc_ze (Level Zero runtime)") + variant("level_zero", default=False, description="Build tinytc_ze (Level Zero runtime)") variant("opencl", default=True, description="Build tintc_cl (OpenCL runtime)") variant("sycl", default=False, description="Build tinytc_sycl (SYCL runtime)") - requires("+opencl +level-zero", when="+sycl") + requires("+opencl +level_zero", when="+sycl") depends_on("cmake@3.23.0:", type="build") - depends_on("double-batched-fft-library ~sycl ~level-zero ~opencl@0.5.1:", type="link") - depends_on("oneapi-level-zero@1.13:", when="+level-zero") + depends_on("double-batched-fft-library ~sycl ~level_zero ~opencl@0.5.1:", type="link") + depends_on("oneapi-level-zero@1.13:", when="+level_zero") depends_on("opencl-c-headers@2022.01.04:", when="+opencl") depends_on("opencl-icd-loader@2022.01.04:", when="+opencl", type="link") depends_on("re2c@3.0:", type="build") @@ -47,6 +47,6 @@ def cmake_args(self): return [ self.define_from_variant("BUILD_SHARED_LIBS", "shared"), self.define_from_variant("BUILD_SYCL", "sycl"), - self.define_from_variant("BUILD_LEVEL_ZERO", "level-zero"), + self.define_from_variant("BUILD_LEVEL_ZERO", "level_zero"), self.define_from_variant("BUILD_OPENCL", "opencl"), ] diff --git a/var/spack/repos/builtin/packages/yaksa/package.py b/var/spack/repos/builtin/packages/yaksa/package.py index 7a3c16d023d5d9..1d0931949db389 100644 --- a/var/spack/repos/builtin/packages/yaksa/package.py +++ b/var/spack/repos/builtin/packages/yaksa/package.py @@ -29,7 +29,9 @@ class Yaksa(AutotoolsPackage, CudaPackage, ROCmPackage): version("0.3", sha256="c9e5291211bee8852831bb464f430ad5ba1541e31db5718a6fa2f2d3329fc2d9") version("0.2", sha256="9401cb6153dc8c34ddb9781bbabd418fd26b0a27b5da3294ecc21af7be9c86f2") - depends_on("c", type="build") # generated + variant("level_zero", default=False, description="Enable Level Zero support") + + depends_on("c", type="build") depends_on("autoconf", type="build") depends_on("automake", type="build") @@ -43,9 +45,11 @@ def autoreconf(self, spec, prefix): def configure_args(self): spec = self.spec - config_args = [] + config_args = [ + *self.with_or_without("cuda", activation_value="prefix"), + *self.with_or_without("ze", variant="level_zero"), + ] - config_args += self.with_or_without("cuda", activation_value="prefix") if "+cuda" in spec: cuda_archs = spec.variants["cuda_arch"].value if "none" not in cuda_archs: From b50dbb86045a88bfb65d9441a6c701bb6ac04a63 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 10 Dec 2024 12:16:51 +0100 Subject: [PATCH 55/69] pipelines: simplify and lint aws-pcluster-* (#47989) --- lib/spack/spack/util/spack_yaml.py | 2 + .../aws-pcluster-neoverse_v1/spack.yaml | 81 ++++------ .../stacks/aws-pcluster-x86_64_v4/spack.yaml | 139 ++++-------------- 3 files changed, 59 insertions(+), 163 deletions(-) diff --git a/lib/spack/spack/util/spack_yaml.py b/lib/spack/spack/util/spack_yaml.py index d53f26350e0cd6..05123c4d0bc879 100644 --- a/lib/spack/spack/util/spack_yaml.py +++ b/lib/spack/spack/util/spack_yaml.py @@ -416,10 +416,12 @@ def dump_config(data, stream, *, default_flow_style=False, blame=False): if blame: handler = ConfigYAML(yaml_type=YAMLType.ANNOTATED_SPACK_CONFIG_FILE) handler.yaml.default_flow_style = default_flow_style + handler.yaml.width = maxint return _dump_annotated(handler, data, stream) handler = ConfigYAML(yaml_type=YAMLType.SPACK_CONFIG_FILE) handler.yaml.default_flow_style = default_flow_style + handler.yaml.width = maxint return handler.dump(data, stream) diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/spack.yaml index b9bf51fe031c4a..da3bf504240c77 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/spack.yaml @@ -1,6 +1,5 @@ spack: view: false - definitions: - apps: - gromacs @@ -9,20 +8,18 @@ spack: - openfoam - quantum-espresso - wrf - - targets: - - 'target=neoverse_v1' - - 'target=neoverse_n1' - + - target=neoverse_v1 + - target=neoverse_n1 specs: - matrix: - - [$apps] - - [$targets] + - [$apps] + - [$targets] ci: pipeline-gen: - build-job: - image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:v2024-10-07", "entrypoint": [""] } - tags: ["aarch64"] + image: {name: ghcr.io/spack/pcluster-amazonlinux-2:v2024-10-07, entrypoint: ['']} + tags: [aarch64] before_script: - - . "./share/spack/setup-env.sh" - . /etc/profile.d/modules.sh @@ -31,27 +28,12 @@ spack: - export PATH=/home/software/spack/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeh/linux-amzn2-aarch64/gcc-7.3.1/binutils-2.37-2yxz3xsjfmesxujxtlrgcctxlyilynmp/bin:$PATH - signing-job: before_script: - # Do not distribute Intel & ARM binaries - - - for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep intel-oneapi | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done - - for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep armpl | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done - + # Do not distribute Intel & ARM binaries + - - for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep intel-oneapi | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done + - for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep armpl | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done cdash: build-group: AWS Packages - compilers: - - compiler: - environment: {} - extra_rpaths: [] - flags: {} - modules: [] - operating_system: amzn2 - paths: - cc: /usr/bin/gcc - cxx: /usr/bin/g++ - f77: /usr/bin/gfortran - fc: /usr/bin/gfortran - spec: gcc@=7.3.1 - target: aarch64 - compiler: environment: {} extra_rpaths: [] @@ -65,41 +47,34 @@ spack: fc: /home/software/spack/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeh/linux-amzn2-aarch64/gcc-7.3.1/gcc-12.4.0-v6wxye6ijzrxnzxftcwnpu3psohsjl2b/bin/gfortran spec: gcc@=12.4.0 target: aarch64 - packages: acfl: require: - - one_of: ["%gcc target=aarch64"] - message: "Clang based compilers need GCC libraries and they should be made available for the wide range of CPUs they actually support. - Edit $SPACK_ROOT/etc/spack/packages.yaml to change this default." + - '%gcc target=aarch64' gromacs: require: - - one_of: - - "gromacs@2024.3 %arm ^fftw ^openmpi" - - "gromacs@2024.3 %gcc ^armpl-gcc ^openmpi" + - gromacs@2024.3 %gcc ^armpl-gcc ^openmpi libfabric: buildable: true externals: - - prefix: /opt/amazon/efa/ - spec: libfabric@1.17.0 - require: ['fabrics=shm,efa'] + - prefix: /opt/amazon/efa/ + spec: libfabric@1.17.0 + require: + - fabrics=shm,efa llvm: variants: ~lldb mpas-model: require: - - one_of: - - "precision=single make_target=llvm %arm ^parallelio+pnetcdf" - - "precision=single %gcc ^parallelio+pnetcdf" + - precision=single %gcc ^parallelio+pnetcdf mpich: - require: "mpich pmi=pmi2 device=ch4 netmod=ofi +slurm" + require: + - mpich pmi=pmi2 device=ch4 netmod=ofi +slurm nvhpc: require: - - one_of: - - "nvhpc %gcc target=aarch64" - message: "NVHPC should be built with GCC and should be made available for the wide range of CPUs they actually support. - Edit $SPACK_ROOT/etc/spack/packages.yaml to change this default." + - nvhpc %gcc target=aarch64 openfoam: - require: "openfoam %gcc ^scotch@6.0.9" + require: + - openfoam ^scotch@6.0.9 openmpi: variants: ~atomics ~cuda ~cxx ~cxx_exceptions ~internal-hwloc ~java +legacylaunchers ~lustre ~memchecker +pmi +romio ~singularity +vt +wrapper-rpath fabrics=ofi schedulers=slurm require: '@4:' @@ -108,19 +83,15 @@ spack: # require: # - one_of: ["palace cxxflags=\"-include cstdint\" ^fmt@9.1.0"] pmix: - require: "pmix@3:" + require: 'pmix@3:' quantum-espresso: - require: "quantum-espresso@6.6 %gcc ^armpl-gcc" + require: + - quantum-espresso@6.6 %gcc ^armpl-gcc slurm: buildable: false externals: - - prefix: /opt/slurm - spec: slurm@22.05.8 +pmix - wrf: - require: - - one_of: - - "wrf%arm" - - "wrf%gcc" + - prefix: /opt/slurm + spec: slurm@22.05.8 +pmix all: compiler: [gcc, arm, nvhpc, clang] providers: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-x86_64_v4/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-x86_64_v4/spack.yaml index f022dee4dc16c6..c37b72ae31b6ec 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-x86_64_v4/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-x86_64_v4/spack.yaml @@ -1,31 +1,28 @@ spack: view: false - definitions: - apps: - gromacs %oneapi - lammps %oneapi - # earliest oneapi version with fix does not run on AmazonLinux2, see https://github.com/spack/spack/pull/46457 - # - mpas-model %oneapi + # earliest oneapi version with fix does not run on AmazonLinux2, see https://github.com/spack/spack/pull/46457 + # - mpas-model %oneapi - openfoam %gcc - - palace %oneapi ^superlu-dist%oneapi # hack: force fortran-rt provider through superlu-dist - # TODO: Find out how to make +ipo cmake flag work. - # - quantum-espresso %oneapi + - palace %oneapi ^superlu-dist%oneapi # hack: force fortran-rt provider through superlu-dist + # TODO: Find out how to make +ipo cmake flag work. + # - quantum-espresso %oneapi - openmpi %oneapi - wrf %oneapi - - targets: - - 'target=x86_64_v4' - - 'target=x86_64_v3' - + - target=x86_64_v4 + - target=x86_64_v3 specs: - matrix: - - [$apps] - - [$targets] + - [$apps] + - [$targets] ci: pipeline-gen: - build-job: - image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:v2024-10-07", "entrypoint": [""] } + image: {name: ghcr.io/spack/pcluster-amazonlinux-2:v2024-10-07, entrypoint: ['']} before_script: - - . "./share/spack/setup-env.sh" - . /etc/profile.d/modules.sh @@ -34,13 +31,11 @@ spack: - export PATH=/home/software/spack/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeh/linux-amzn2-x86_64_v3/gcc-7.3.1/binutils-2.37-qvccg7zpskturysmr4bzbsfrx34kvazo/bin:$PATH - signing-job: before_script: - # Do not distribute Intel & ARM binaries - - - for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep intel-oneapi | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done - - for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep armpl | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done - + # Do not distribute Intel & ARM binaries + - - for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep intel-oneapi | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done + - for i in $(aws s3 ls --recursive ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/ | grep armpl | awk '{print $4}' | sed -e 's?^.*build_cache/??g'); do aws s3 rm ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/$i; done cdash: build-group: AWS Packages - compilers: - compiler: environment: {} @@ -69,131 +64,59 @@ spack: fc: /home/software/spack/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeh/linux-amzn2-x86_64_v3/gcc-12.4.0/intel-oneapi-compilers-2024.1.0-f5u3psfhbwscasajkn324igtupn3blop/compiler/2024.1/bin/ifx spec: oneapi@=2024.1.0 target: x86_64 - packages: - cpio: - require: - - one_of: - - "cflags=-std=c18 target=x86_64_v4" - - "cflags=-std=c18 target=x86_64_v3" - when: "%intel" gettext: # Newer gettext cannot build with gcc@12 and old AL2 glibc headers # Older gettext versions do not build correctly with oneapi. require: - - one_of: - - '@:0.20' - - '%oneapi' + - one_of: ['@:0.20 %gcc', '%oneapi'] gromacs: require: - - one_of: - - "+intel_provided_gcc ^intel-oneapi-mkl target=x86_64_v4" - - "+intel_provided_gcc ^intel-oneapi-mkl target=x86_64_v3" - when: "%intel" - - one_of: - - "+intel_provided_gcc target=x86_64_v4 ^intel-oneapi-mkl" - - "+intel_provided_gcc target=x86_64_v3 ^intel-oneapi-mkl" - when: "%oneapi" - intel-oneapi-compilers: - require: "intel-oneapi-compilers %gcc target=x86_64_v3" + - +intel_provided_gcc ^intel-oneapi-mkl intel-oneapi-mpi: variants: +external-libfabric generic-names=True lammps: require: - - one_of: - - "lammps_sizes=bigbig +molecule +kspace +rigid +asphere +opt +openmp +openmp-package +intel fft=mkl ^intel-oneapi-mkl target=x86_64_v4" - - "lammps_sizes=bigbig +molecule +kspace +rigid +asphere +opt +openmp +openmp-package fft=mkl ^intel-oneapi-mkl target=x86_64_v3" - when: "%intel" - - one_of: - - "lammps_sizes=bigbig +molecule +kspace +rigid +asphere +opt +openmp +openmp-package +intel fft=mkl ^intel-oneapi-mkl target=x86_64_v4" - - "lammps_sizes=bigbig +molecule +kspace +rigid +asphere +opt +openmp +openmp-package fft=mkl ^intel-oneapi-mkl target=x86_64_v3" - when: "%oneapi" - libidn2: - require: - - one_of: - - "cflags=-std=c18 target=x86_64_v4" - - "cflags=-std=c18 target=x86_64_v3" - when: "%intel" + - lammps_sizes=bigbig +molecule +kspace +rigid +asphere +opt +openmp +openmp-package fft=mkl ^intel-oneapi-mkl + - one_of: [+intel target=x86_64_v4, target=x86_64_v3] libfabric: buildable: true externals: - - prefix: /opt/amazon/efa/ - spec: libfabric@1.17.0 - require: ['fabrics=shm,efa'] - libunistring: + - prefix: /opt/amazon/efa/ + spec: libfabric@1.17.0 require: - - one_of: - - "cflags=-std=c18 target=x86_64_v4" - - "cflags=-std=c18 target=x86_64_v3" - when: "%intel" + - fabrics=shm,efa mpas-model: require: - - one_of: - - "precision=single ^parallelio+pnetcdf target=x86_64_v4" - - "precision=single ^parallelio+pnetcdf target=x86_64_v3" - when: "%intel" - - one_of: - - "precision=single ^parallelio+pnetcdf target=x86_64_v4" - - "precision=single ^parallelio+pnetcdf target=x86_64_v3" - when: "%oneapi" + - spec: precision=single ^parallelio+pnetcdf + when: '%oneapi' mpich: require: - - one_of: - - "mpich pmi=pmi2 device=ch4 netmod=ofi +slurm target=x86_64_v4" - - "mpich pmi=pmi2 device=ch4 netmod=ofi +slurm target=x86_64_v3" + - mpich pmi=pmi2 device=ch4 netmod=ofi +slurm openfoam: require: - - one_of: - - "openfoam %gcc ^scotch@6.0.9 target=x86_64_v4" - - "openfoam %gcc ^scotch@6.0.9 target=x86_64_v3" + - openfoam %gcc ^scotch@6.0.9 openmpi: variants: ~atomics ~cuda ~cxx ~cxx_exceptions ~internal-hwloc ~java +legacylaunchers ~lustre ~memchecker +pmi +romio ~singularity +vt +wrapper-rpath fabrics=ofi schedulers=slurm require: - - one_of: - - "openmpi @4: target=x86_64_v4" - - "openmpi @4: target=x86_64_v3" + - 'openmpi @4:' palace: require: - - one_of: - - "palace ^fmt@9.1.0 target=x86_64_v4" - - "palace ^fmt@9.1.0 target=x86_64_v3" - when: "%oneapi" - - one_of: - - "palace ^fmt@9.1.0" - when: "%gcc" + - palace ^fmt@9.1.0 pmix: require: - - one_of: - - "pmix@3: target=x86_64_v4" - - "pmix@3: target=x86_64_v3" + - 'pmix@3:' quantum-espresso: require: - - one_of: - - "quantum-espresso@6.6 ^intel-oneapi-mkl+cluster target=x86_64_v4" - - "quantum-espresso@6.6 ^intel-oneapi-mkl+cluster target=x86_64_v3" - when: "%intel" - - one_of: - - "quantum-espresso@6.6 ^intel-oneapi-mkl+cluster target=x86_64_v4" - - "quantum-espresso@6.6 ^intel-oneapi-mkl+cluster target=x86_64_v3" - when: "%oneapi" + - quantum-espresso@6.6 ^intel-oneapi-mkl+cluster slurm: buildable: false externals: - - prefix: /opt/slurm - spec: slurm@22.05.8 +pmix + - prefix: /opt/slurm + spec: slurm@22.05.8 +pmix wrf: require: - - one_of: - - "wrf@4 build_type=dm+sm target=x86_64_v4" - - "wrf@4 build_type=dm+sm target=x86_64_v3" - - "wrf@4.2.2 +netcdf_classic fflags=\"-fp-model fast=2 -no-heap-arrays -no-prec-div -no-prec-sqrt -fno-common\" build_type=dm+sm target=x86_64_v3" - when: "%intel" - - one_of: - - "wrf@4 build_type=dm+sm target=x86_64_v4" - - "wrf@4 build_type=dm+sm target=x86_64_v3" - - "wrf@4.2.2 +netcdf_classic fflags=\"-fp-model fast=2 -no-heap-arrays -no-prec-div -no-prec-sqrt -fno-common\" build_type=dm+sm target=x86_64_v3" - when: "%oneapi" - + - wrf@4 build_type=dm+sm all: compiler: [oneapi, gcc] permissions: From 3a1c0f5c5f7998db9d9494be5a62d68a5c7152b8 Mon Sep 17 00:00:00 2001 From: "Paul R. C. Kent" Date: Tue, 10 Dec 2024 09:19:10 -0500 Subject: [PATCH 56/69] llvm: add v19.1.5 (#47897) --- var/spack/repos/builtin/packages/llvm/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index d5abd0cb6fe12b..4aaac3446fc9c8 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -57,6 +57,7 @@ class Llvm(CMakePackage, CudaPackage, LlvmDetection, CompilerPackage): license("Apache-2.0") version("main", branch="main") + version("19.1.5", sha256="e2204b9903cd9d7ee833a2f56a18bef40a33df4793e31cc090906b32cbd8a1f5") version("19.1.4", sha256="010e1fd3cabee8799bd2f8a6fbc68f28207494f315cf9da7057a2820f79fd531") version("19.1.3", sha256="e5106e2bef341b3f5e41340e4b6c6a58259f4021ad801acf14e88f1a84567b05") version("19.1.2", sha256="622cb6c5e95a3bb7e9876c4696a65671f235bd836cfd0c096b272f6c2ada41e7") From 7e5b5f8c578bd59708ee0becb882fdb57d95bade Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Tue, 10 Dec 2024 09:38:43 -0600 Subject: [PATCH 57/69] veccore: add v0.8.2 (#47855) * veccore: add v8.2.0 * Update cmake requirement --------- Co-authored-by: Seth R Johnson --- var/spack/repos/builtin/packages/veccore/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/veccore/package.py b/var/spack/repos/builtin/packages/veccore/package.py index 38f714e2fa422f..606afbd62333cc 100644 --- a/var/spack/repos/builtin/packages/veccore/package.py +++ b/var/spack/repos/builtin/packages/veccore/package.py @@ -22,6 +22,7 @@ class Veccore(CMakePackage): license("Apache-2.0") version("master", branch="master") + version("0.8.2", sha256="1268bca92acf00acd9775f1e79a2da7b1d902733d17e283e0dd5e02c41ac9666") version("0.8.1", sha256="7d7983947c2c6faa55c908b3a968f19f96f4d5c909447c536de30c34b439e008") version("0.8.0", sha256="2f8e49f2b609bf15a776026fbec899b3d5d4ba30f033d4fdac4b07a5220a4fd3") version("0.7.0", sha256="61d9fc4be815c5c98088c2796763d3ed82ba4bad5a69b7892c1c2e7e1e53d311") @@ -38,6 +39,7 @@ class Veccore(CMakePackage): variant("vc", default=False, description="Enable Vc backend") + depends_on("cmake@3.16:", type="build", when="@0.8.1:") depends_on("vc@1.2.0:", when="@0.2.0: +vc") depends_on("vc@1.3.3:", when="@0.6.0: +vc") From 7bb6c9b828915051b62ca0338f0d0aa432cd1d6b Mon Sep 17 00:00:00 2001 From: Lehman Garrison Date: Tue, 10 Dec 2024 13:13:56 -0500 Subject: [PATCH 58/69] py-disbatch: add new package at version 3.0 (#47988) --- .../builtin/packages/py-disbatch/package.py | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-disbatch/package.py diff --git a/var/spack/repos/builtin/packages/py-disbatch/package.py b/var/spack/repos/builtin/packages/py-disbatch/package.py new file mode 100644 index 00000000000000..28b633cd415d9c --- /dev/null +++ b/var/spack/repos/builtin/packages/py-disbatch/package.py @@ -0,0 +1,24 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PyDisbatch(PythonPackage): + """Dynamically distribute a list of tasks over a pool of compute resources.""" + + homepage = "https://github.com/flatironinstitute/disBatch" + pypi = "disbatch/disbatch-3.0.tar.gz" + + maintainers("lgarrison") + + license("Apache-2.0", checked_by="lgarrison") + + version("3.0", sha256="c7396319bfadfcc11dca578386725373e16acb653c76042d1ceb304255efa5ef") + + depends_on("python@3.9:", type=("build", "run")) + + depends_on("py-hatchling", type="build") + depends_on("py-hatch-vcs", type="build") From d47629a5210cca1f227b97058f4847aaf8738d73 Mon Sep 17 00:00:00 2001 From: dmagdavector Date: Tue, 10 Dec 2024 15:06:25 -0500 Subject: [PATCH 59/69] py-jupyterlab-server: add v2.23 to 2.27 (#47969) * py-jupyterlab-server: add v2.23 to 2.27 * py-jupyterlab-server: style fixes --- .../packages/py-jupyterlab-server/package.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-jupyterlab-server/package.py b/var/spack/repos/builtin/packages/py-jupyterlab-server/package.py index 5f7b07f9ca3c18..65b8b3a90f5cf9 100644 --- a/var/spack/repos/builtin/packages/py-jupyterlab-server/package.py +++ b/var/spack/repos/builtin/packages/py-jupyterlab-server/package.py @@ -16,12 +16,24 @@ class PyJupyterlabServer(PythonPackage): license("BSD-3-Clause") + version("2.27.3", sha256="eb36caca59e74471988f0ae25c77945610b887f777255aa21f8065def9e51ed4") + version("2.27.2", sha256="15cbb349dc45e954e09bacf81b9f9bcb10815ff660fb2034ecd7417db3a7ea27") + version("2.27.1", sha256="097b5ac709b676c7284ac9c5e373f11930a561f52cd5a86e4fc7e5a9c8a8631d") + version("2.27.0", sha256="b03382075545981dd0ab7a9e4ffff74b6ed2b424c92e32fcc1c0bd65dafcb56d") + version("2.26.0", sha256="9b3ba91cf2837f7f124fca36d63f3ca80ace2bed4898a63dd47e6598c1ab006f") + version("2.25.4", sha256="2098198e1e82e0db982440f9b5136175d73bea2cd42a6480aa6fd502cb23c4f9") + version("2.25.0", sha256="77c2f1f282d610f95e496e20d5bf1d2a7706826dfb7b18f3378ae2870d272fb7") + version("2.24.0", sha256="4e6f99e0a5579bbbc32e449c4dbb039561d4f1a7827d5733273ed56738f21f07") + version("2.23.0", sha256="83c01aa4ad9451cd61b383e634d939ff713850f4640c0056b2cdb2b6211a74c7") version("2.22.1", sha256="dfaaf898af84b9d01ae9583b813f378b96ee90c3a66f24c5186ea5d1bbdb2089") version("2.10.3", sha256="3fb84a5813d6d836ceda773fb2d4e9ef3c7944dbc1b45a8d59d98641a80de80a") version("2.6.0", sha256="f300adf6bb0a952bebe9c807a3b2a345d62da39b476b4f69ea0dc6b5f3f6b97d") version("1.2.0", sha256="5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c") version("1.1.0", sha256="bac27e2ea40f686e592d6429877e7d46947ea76c08c878081b028c2c89f71733") + depends_on("python@3.8:", when="@2.25:") + depends_on("python@3.7:", when="@2.22:") + depends_on("py-hatchling@1.7:", when="@2.25:", type="build") depends_on("py-hatchling@1.5:", when="@2.16:", type="build") with when("@:2.14"): @@ -36,12 +48,14 @@ class PyJupyterlabServer(PythonPackage): depends_on("py-jinja2@2.10:", type=("build", "run")) depends_on("py-json5@0.9.0:", when="@2.16.4:", type=("build", "run")) depends_on("py-json5", type=("build", "run")) + depends_on("py-jsonschema@4.18:", when="@2.25:", type=("build", "run")) depends_on("py-jsonschema@4.17.3:", when="@2.17:", type=("build", "run")) depends_on("py-jsonschema@3.0.1:", type=("build", "run")) depends_on("py-jupyter-server@1.21:2", when="@2.16.4:", type=("build", "run")) depends_on("py-jupyter-server@1.4:1", when="@2.5.1:2.10", type=("build", "run")) depends_on("py-packaging@21.3:", when="@2.16.4:", type=("build", "run")) depends_on("py-packaging", when="@2.5.1:", type=("build", "run")) + depends_on("py-requests@2.31:", when="@2.25:", type=("build", "run")) depends_on("py-requests@2.28:", when="@2.16.4:", type=("build", "run")) depends_on("py-requests", type=("build", "run")) From accd3ca860b79073e60a55cb8ac87afac57c9d7b Mon Sep 17 00:00:00 2001 From: Luc Grosheintz Date: Tue, 10 Dec 2024 21:29:17 +0100 Subject: [PATCH 60/69] highfive: add v2.10.1 (#47914) * highfive: release 2.10.1 * Use sha256 of '.tar.gz'. --------- Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --- var/spack/repos/builtin/packages/highfive/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/highfive/package.py b/var/spack/repos/builtin/packages/highfive/package.py index b487599e46735e..5968b119e87616 100644 --- a/var/spack/repos/builtin/packages/highfive/package.py +++ b/var/spack/repos/builtin/packages/highfive/package.py @@ -19,6 +19,7 @@ class Highfive(CMakePackage): license("BSL-1.0") version("develop", branch="master") + version("2.10.1", sha256="60d66ba1315730494470afaf402bb40300a39eb6ef3b9d67263335a236069cce") version("2.10.0", sha256="c29e8e1520e7298fabb26545f804e35bb3af257005c1c2df62e39986458d7c38") version("2.9.0", sha256="6301def8ceb9f4d7a595988612db288b448a3c0546f6c83417dab38c64994d7e") version("2.8.0", sha256="cd2502cae61bfb00e32dd18c9dc75289e09ad1db5c2a46d3b0eefd32e0df983b") From c23ffbbd7a459808d4b67645096743136797dd8d Mon Sep 17 00:00:00 2001 From: Xuefeng Ding Date: Wed, 11 Dec 2024 04:36:01 +0800 Subject: [PATCH 61/69] geant4: patch typo in wroot (#47955) * bug fix * not just 10.4, all versions * geant4: comment; close patch when range --------- Co-authored-by: Wouter Deconinck --- .../repos/builtin/packages/geant4/columns.patch | 13 +++++++++++++ var/spack/repos/builtin/packages/geant4/package.py | 3 +++ 2 files changed, 16 insertions(+) create mode 100644 var/spack/repos/builtin/packages/geant4/columns.patch diff --git a/var/spack/repos/builtin/packages/geant4/columns.patch b/var/spack/repos/builtin/packages/geant4/columns.patch new file mode 100644 index 00000000000000..348e1826c43270 --- /dev/null +++ b/var/spack/repos/builtin/packages/geant4/columns.patch @@ -0,0 +1,13 @@ +diff --git a/source/externals/g4tools/include/tools/wroot/columns.icc b/source/externals/g4tools/include/tools/wroot/columns.icc +index 0df2c16620..af9b15e0ab 100644 +--- a/source/externals/g4tools/include/tools/wroot/columns.icc ++++ b/source/externals/g4tools/include/tools/wroot/columns.icc +@@ -399,7 +399,7 @@ + protected: + std_vector_column_ref(const std_vector_column_ref& a_from) + :icol(a_from) +- ,m_branch(a_from.m_barnch) ++ ,m_branch(a_from.m_branch) + ,m_ref(a_from.m_ref) + ,m_leaf(0) + ,m_leaf_count(0) diff --git a/var/spack/repos/builtin/packages/geant4/package.py b/var/spack/repos/builtin/packages/geant4/package.py index b93889a1c43c79..829d8d45b88783 100644 --- a/var/spack/repos/builtin/packages/geant4/package.py +++ b/var/spack/repos/builtin/packages/geant4/package.py @@ -207,6 +207,9 @@ def std_when(values): # As released, 10.0.4 has inconsistently capitalised filenames # in the cmake files; this patch also enables cxxstd 14 patch("geant4-10.0.4.patch", when="@10.0.4") + # Fix member field typo in g4tools wroot + # See https://bugzilla-geant4.kek.jp/show_bug.cgi?id=2640 + patch("columns.patch", when="@10.4:11.2.2") # As released, 10.03.03 has issues with respect to using external # CLHEP. patch("CLHEP-10.03.03.patch", level=1, when="@10.3") From b6e4ff024262b7087d4f0b27804acf0e63a9e29a Mon Sep 17 00:00:00 2001 From: dmagdavector Date: Tue, 10 Dec 2024 15:45:44 -0500 Subject: [PATCH 62/69] py-nbclassic: add v1.1.0 (#47946) * py-nbclassic: add v1.1 * py-nbclassic: reduce explicit dependencies for v1.1.0 Having all the 'excess' packages listed did not break anything, as they were needed for `py-jupyter-server` (pulled in via `py-notebook-shim`) anyway, but the change makes it more clear on why things are being pulled in. --- .../builtin/packages/py-nbclassic/package.py | 37 +++++++++++-------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-nbclassic/package.py b/var/spack/repos/builtin/packages/py-nbclassic/package.py index 0a0e1e0207d496..bf31f0a5645509 100644 --- a/var/spack/repos/builtin/packages/py-nbclassic/package.py +++ b/var/spack/repos/builtin/packages/py-nbclassic/package.py @@ -14,36 +14,41 @@ class PyNbclassic(PythonPackage): license("BSD-3-Clause") + version("1.1.0", sha256="77b77ba85f9e988f9bad85df345b514e9e64c7f0e822992ab1df4a78ac64fc1e") version("1.0.0", sha256="0ae11eb2319455d805596bf320336cda9554b41d99ab9a3c31bf8180bffa30e3") version("0.4.8", sha256="c74d8a500f8e058d46b576a41e5bc640711e1032cf7541dde5f73ea49497e283") version("0.3.5", sha256="99444dd63103af23c788d9b5172992f12caf8c3098dd5a35c787f0df31490c29") version("0.3.1", sha256="f920f8d09849bea7950e1017ff3bd101763a8d68f565a51ce053572e65aa7947") + depends_on("python@3.7:", type=("build", "run")) depends_on("py-setuptools", type="build") depends_on("py-jupyter-packaging@0.9:0", when="@0.3.3:", type="build") depends_on("py-babel", when="@0.4:", type="build") - depends_on("py-jinja2", when="@0.4:", type=("build", "run")) - depends_on("py-tornado@6.1:", when="@0.4:", type=("build", "run")) - depends_on("py-pyzmq@17:", when="@0.4:", type=("build", "run")) - depends_on("py-argon2-cffi", when="@0.4:", type=("build", "run")) - depends_on("py-traitlets@4.2.1:", when="@0.4:", type=("build", "run")) - depends_on("py-jupyter-core@4.6.1:", when="@0.4:", type=("build", "run")) - depends_on("py-jupyter-client@6.1.1:", when="@0.4:", type=("build", "run")) depends_on("py-ipython-genutils", when="@0.4:", type=("build", "run")) - # version requirement for py-jupyter-server comes from pyproject.toml - depends_on("py-jupyter-server@1.17:", when="@0.4:", type=("build", "run")) - depends_on("py-jupyter-server@1.8:", when="@0.3.7", type=("build", "run")) - depends_on("py-jupyter-server@1.8:1", when="@:0.3.6", type=("build", "run")) - depends_on("py-nbformat", when="@0.4:", type=("build", "run")) depends_on("py-notebook-shim@0.2.3:", when="@0.5.6:", type=("build", "run")) depends_on("py-notebook-shim@0.1:", when="@0.3.6:", type=("build", "run")) - depends_on("py-nbconvert@5:", when="@0.4:", type=("build", "run")) depends_on("py-nest-asyncio@1.5:", when="@0.4:", type=("build", "run")) depends_on("py-ipykernel", when="@0.4:", type=("build", "run")) - depends_on("py-send2trash@1.8:", when="@0.4:", type=("build", "run")) - depends_on("py-terminado@0.8.3:", when="@0.4:", type=("build", "run")) - depends_on("py-prometheus-client", when="@0.4:", type=("build", "run")) + + # Dependencies reduced after 1.0 + # https://github.com/jupyter/nbclassic/issues/252 + depends_on("py-jinja2", when="@0.4:1.0", type=("build", "run")) + depends_on("py-tornado@6.1:", when="@0.4:1.0", type=("build", "run")) + depends_on("py-pyzmq@17:", when="@0.4:1.0", type=("build", "run")) + depends_on("py-argon2-cffi", when="@0.4:1.0", type=("build", "run")) + depends_on("py-traitlets@4.2.1:", when="@0.4:1.0", type=("build", "run")) + depends_on("py-jupyter-core@4.6.1:", when="@0.4:1.0", type=("build", "run")) + depends_on("py-jupyter-client@6.1.1:", when="@0.4:1.0", type=("build", "run")) + # version requirement for py-jupyter-server comes from pyproject.toml + depends_on("py-jupyter-server@1.17:", when="@0.4:1.0", type=("build", "run")) + depends_on("py-jupyter-server@1.8:", when="@0.3.7", type=("build", "run")) + depends_on("py-jupyter-server@1.8:1", when="@:0.3.6", type=("build", "run")) + depends_on("py-nbformat", when="@0.4:1.0", type=("build", "run")) + depends_on("py-nbconvert@5:", when="@0.4:1.0", type=("build", "run")) + depends_on("py-send2trash@1.8:", when="@0.4:1.0", type=("build", "run")) + depends_on("py-terminado@0.8.3:", when="@0.4:1.0", type=("build", "run")) + depends_on("py-prometheus-client", when="@0.4:1.0", type=("build", "run")) # Historical dependencies depends_on("py-notebook@:6", when="@:0.3.7", type=("build", "run")) From 84ea7dbddf1b3d2d6419f52a7d0c3f8e7129ada7 Mon Sep 17 00:00:00 2001 From: rfbgo <109985755+rfbgo@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:03:54 -0700 Subject: [PATCH 63/69] hp2p: new package (#47950) * Add hp2p app definition * update homepage Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> * update to fstring --------- Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --- .../repos/builtin/packages/hp2p/package.py | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 var/spack/repos/builtin/packages/hp2p/package.py diff --git a/var/spack/repos/builtin/packages/hp2p/package.py b/var/spack/repos/builtin/packages/hp2p/package.py new file mode 100644 index 00000000000000..6bc499bf4389be --- /dev/null +++ b/var/spack/repos/builtin/packages/hp2p/package.py @@ -0,0 +1,28 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class Hp2p(AutotoolsPackage): + """HP2P (Heavy Peer To Peer) benchmark is a test which performs MPI + Point-to-Point non-blocking communications between all MPI processes. Its + goal is to measure the bandwidths and the latencies in a situation where + the network is busy. This benchmark can help to detect network problems + like congestions or problems with switches or links. + """ + + homepage = "https://github.com/cea-hpc/hp2p" + url = "https://github.com/cea-hpc/hp2p/releases/download/4.1/hp2p-4.1.tar.gz" + git = "https://github.com/cea-hpc/hp2p.git" + + version("4.1", sha256="e74fa1d442f4378a31f4b875760aaad98e23f6942f7de4cc1702ed9e95585c5e") + + depends_on("mpi", type=("build", "link", "run")) + + def configure_args(self): + mpi = self.spec["mpi"] + args = [f"CC={mpi.mpicc}", f"CXX={mpi.mpicxx}"] + return args From 316dcc1609ca7c5ae7c3206b04baaa1cc8c9633d Mon Sep 17 00:00:00 2001 From: kwryankrattiger <80296582+kwryankrattiger@users.noreply.github.com> Date: Tue, 10 Dec 2024 15:13:23 -0600 Subject: [PATCH 64/69] Set the "build_jobs" on concretization/generate for CI (#47660) * Set the "build_jobs" on concretization/generate for CI build_jobs also controls the concretization pool size. Set this in the config section for CI generate. This config is overwritten by build_job CI using the SPACK_BUILD_JOBS environment variable. This implicitly will drop the default build CPU request on all "default" grouped build jobs from (max) 16 to 8. * Add default allocations for build jobs * Add common jobs and concretize args to ci generate and rebuild * CI: Specify parallel concretize and build jobs via argument * Increase power and cray concretization limits Lowering limits for these stacks creates timeout --- lib/spack/spack/cmd/ci.py | 8 ++++++++ .../spack/gitlab/cloud_pipelines/.gitlab-ci.yml | 9 ++++++++- .../spack/gitlab/cloud_pipelines/configs/ci.yaml | 6 ++++-- share/spack/spack-completion.bash | 4 ++-- share/spack/spack-completion.fish | 16 ++++++++++++++-- 5 files changed, 36 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/cmd/ci.py b/lib/spack/spack/cmd/ci.py index a7d4f097584d5d..e532ab429e7339 100644 --- a/lib/spack/spack/cmd/ci.py +++ b/lib/spack/spack/cmd/ci.py @@ -17,6 +17,7 @@ import spack.ci as spack_ci import spack.cmd import spack.cmd.buildcache as buildcache +import spack.cmd.common.arguments import spack.config as cfg import spack.environment as ev import spack.hash_types as ht @@ -116,6 +117,9 @@ def setup_parser(subparser): ) generate.set_defaults(func=ci_generate) + spack.cmd.common.arguments.add_concretizer_args(generate) + spack.cmd.common.arguments.add_common_arguments(generate, ["jobs"]) + # Rebuild the buildcache index associated with the mirror in the # active, gitlab-enabled environment. index = subparsers.add_parser( @@ -145,6 +149,7 @@ def setup_parser(subparser): help="stop stand-alone tests after the first failure", ) rebuild.set_defaults(func=ci_rebuild) + spack.cmd.common.arguments.add_common_arguments(rebuild, ["jobs"]) # Facilitate reproduction of a failed CI build job reproduce = subparsers.add_parser( @@ -440,6 +445,9 @@ def ci_rebuild(args): if not verify_binaries: install_args.append("--no-check-signature") + if args.jobs: + install_args.append("-j{args.jobs}") + slash_hash = spack_ci.win_quote("/" + job_spec.dag_hash()) # Arguments when installing the root from sources diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index 95f98840f07719..618585a5c9b74d 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -145,7 +145,7 @@ default: --config-scope "${SPACK_CI_CONFIG_ROOT}" --config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}" --config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}/${SPACK_TARGET_ARCH}" - ci generate --check-index-only + ci generate --check-index-only -j ${SPACK_CONCRETIZE_JOBS} --artifacts-root "${CI_PROJECT_DIR}/jobs_scratch_dir" --output-file "${CI_PROJECT_DIR}/jobs_scratch_dir/cloud-ci-pipeline.yml" artifacts: @@ -155,6 +155,7 @@ default: - "${CI_PROJECT_DIR}/tmp/_user_cache/cache/providers" - "${CI_PROJECT_DIR}/tmp/_user_cache/cache/tags" variables: + SPACK_CONCRETIZE_JOBS: 4 KUBERNETES_CPU_REQUEST: 4000m KUBERNETES_MEMORY_REQUEST: 16G # avoid moving targets like branches and tags @@ -408,6 +409,8 @@ e4s-oneapi-build: extends: [".linux_power"] variables: SPACK_CI_STACK_NAME: e4s-power + # Override concretization pool for metal runners + SPACK_CONCRETIZE_JOBS: 16 e4s-power-generate: extends: [ ".e4s-power", ".generate-x86_64", ".e4s-power-generate-tags-and-image"] @@ -861,6 +864,10 @@ aws-pcluster-build-neoverse_v1: # Cray definitions .generate-cray: extends: [ ".generate-common", ".base-job" ] + variables: + # Override concretization pool for metal runners + SPACK_CONCRETIZE_JOBS: 16 + before_script: - echo $PATH - module avail diff --git a/share/spack/gitlab/cloud_pipelines/configs/ci.yaml b/share/spack/gitlab/cloud_pipelines/configs/ci.yaml index 10eb7459a71b00..b3e151e5bd92f7 100644 --- a/share/spack/gitlab/cloud_pipelines/configs/ci.yaml +++ b/share/spack/gitlab/cloud_pipelines/configs/ci.yaml @@ -15,7 +15,6 @@ ci: - - touch ${SPACK_USER_CACHE_PATH}/cache/*/* # bump mtime of cache so it is not invalidated - - spack env activate --without-view ${SPACK_CONCRETE_ENV_DIR} - spack compiler list - - if [ -n "$SPACK_BUILD_JOBS" ]; then spack config add "config:build_jobs:$SPACK_BUILD_JOBS"; fi - - mkdir -p ${SPACK_ARTIFACTS_ROOT}/user_data # AWS runners mount E4S public key (verification), UO runners mount public/private (signing/verification) - - k=$CI_GPG_KEY_ROOT/e4s.gpg; [[ -r $k ]] && spack gpg trust $k @@ -24,7 +23,7 @@ ci: - k=$CI_GPG_KEY_ROOT/spack_public_key.gpg; [[ -r $k ]] && spack gpg trust $k script:: - - spack config blame mirrors - - spack --color=always --backtrace ci rebuild --tests > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2) + - spack --color=always --backtrace ci rebuild -j ${SPACK_BUILD_JOBS} --tests > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2) after_script: - - cat /proc/loadavg || true - cat /proc/meminfo | grep 'MemTotal\|MemFree' || true @@ -34,6 +33,9 @@ ci: ${SPACK_ARTIFACTS_ROOT}/user_data/install_times.json || true variables: CI_JOB_SIZE: "default" + SPACK_BUILD_JOBS: "4" + KUBERNETES_CPU_REQUEST: "4000m" + KUBERNETES_MEMORY_REQUEST: "16G" CI_GPG_KEY_ROOT: /mnt/key # SPACK_VERBOSE_SCRIPT: "1" id_tokens: diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index b9b4fd2d7a4360..fd5812bac3dc9d 100644 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -693,7 +693,7 @@ _spack_ci() { } _spack_ci_generate() { - SPACK_COMPREPLY="-h --help --output-file --optimize --dependencies --prune-dag --no-prune-dag --check-index-only --artifacts-root" + SPACK_COMPREPLY="-h --help --output-file --optimize --dependencies --prune-dag --no-prune-dag --check-index-only --artifacts-root -U --fresh --reuse --fresh-roots --reuse-deps --deprecated -j --jobs" } _spack_ci_rebuild_index() { @@ -701,7 +701,7 @@ _spack_ci_rebuild_index() { } _spack_ci_rebuild() { - SPACK_COMPREPLY="-h --help -t --tests --fail-fast" + SPACK_COMPREPLY="-h --help -t --tests --fail-fast -j --jobs" } _spack_ci_reproduce_build() { diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish index 7d1e996c3f0b4d..18e317f0273df0 100644 --- a/share/spack/spack-completion.fish +++ b/share/spack/spack-completion.fish @@ -955,7 +955,7 @@ complete -c spack -n '__fish_spack_using_command ci' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command ci' -s h -l help -d 'show this help message and exit' # spack ci generate -set -g __fish_spack_optspecs_spack_ci_generate h/help output-file= optimize dependencies prune-dag no-prune-dag check-index-only artifacts-root= +set -g __fish_spack_optspecs_spack_ci_generate h/help output-file= optimize dependencies prune-dag no-prune-dag check-index-only artifacts-root= U/fresh reuse fresh-roots deprecated j/jobs= complete -c spack -n '__fish_spack_using_command ci generate' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command ci generate' -s h -l help -d 'show this help message and exit' complete -c spack -n '__fish_spack_using_command ci generate' -l output-file -r -f -a output_file @@ -972,6 +972,16 @@ complete -c spack -n '__fish_spack_using_command ci generate' -l check-index-onl complete -c spack -n '__fish_spack_using_command ci generate' -l check-index-only -d 'only check spec state from buildcache indices' complete -c spack -n '__fish_spack_using_command ci generate' -l artifacts-root -r -f -a artifacts_root complete -c spack -n '__fish_spack_using_command ci generate' -l artifacts-root -r -d 'path to the root of the artifacts directory' +complete -c spack -n '__fish_spack_using_command ci generate' -s U -l fresh -f -a concretizer_reuse +complete -c spack -n '__fish_spack_using_command ci generate' -s U -l fresh -d 'do not reuse installed deps; build newest configuration' +complete -c spack -n '__fish_spack_using_command ci generate' -l reuse -f -a concretizer_reuse +complete -c spack -n '__fish_spack_using_command ci generate' -l reuse -d 'reuse installed packages/buildcaches when possible' +complete -c spack -n '__fish_spack_using_command ci generate' -l fresh-roots -l reuse-deps -f -a concretizer_reuse +complete -c spack -n '__fish_spack_using_command ci generate' -l fresh-roots -l reuse-deps -d 'concretize with fresh roots and reused dependencies' +complete -c spack -n '__fish_spack_using_command ci generate' -l deprecated -f -a config_deprecated +complete -c spack -n '__fish_spack_using_command ci generate' -l deprecated -d 'allow concretizer to select deprecated versions' +complete -c spack -n '__fish_spack_using_command ci generate' -s j -l jobs -r -f -a jobs +complete -c spack -n '__fish_spack_using_command ci generate' -s j -l jobs -r -d 'explicitly set number of parallel jobs' # spack ci rebuild-index set -g __fish_spack_optspecs_spack_ci_rebuild_index h/help @@ -979,13 +989,15 @@ complete -c spack -n '__fish_spack_using_command ci rebuild-index' -s h -l help complete -c spack -n '__fish_spack_using_command ci rebuild-index' -s h -l help -d 'show this help message and exit' # spack ci rebuild -set -g __fish_spack_optspecs_spack_ci_rebuild h/help t/tests fail-fast +set -g __fish_spack_optspecs_spack_ci_rebuild h/help t/tests fail-fast j/jobs= complete -c spack -n '__fish_spack_using_command ci rebuild' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command ci rebuild' -s h -l help -d 'show this help message and exit' complete -c spack -n '__fish_spack_using_command ci rebuild' -s t -l tests -f -a tests complete -c spack -n '__fish_spack_using_command ci rebuild' -s t -l tests -d 'run stand-alone tests after the build' complete -c spack -n '__fish_spack_using_command ci rebuild' -l fail-fast -f -a fail_fast complete -c spack -n '__fish_spack_using_command ci rebuild' -l fail-fast -d 'stop stand-alone tests after the first failure' +complete -c spack -n '__fish_spack_using_command ci rebuild' -s j -l jobs -r -f -a jobs +complete -c spack -n '__fish_spack_using_command ci rebuild' -s j -l jobs -r -d 'explicitly set number of parallel jobs' # spack ci reproduce-build set -g __fish_spack_optspecs_spack_ci_reproduce_build h/help runtime= working-dir= s/autostart gpg-file= gpg-url= From cb8880b3884435bdab8788943d9d9edc0482118b Mon Sep 17 00:00:00 2001 From: Paul Kuberry Date: Tue, 10 Dec 2024 16:29:31 -0500 Subject: [PATCH 65/69] Update compadre and py-pycompadre to v1.6.0 (#47948) * compadre: add version 1.6.0 * py-pycompadre: add version 1.6.0 --- .../builtin/packages/compadre/package.py | 32 +++++++++++++++- .../builtin/packages/py-pycompadre/package.py | 37 +++++++++++++------ 2 files changed, 56 insertions(+), 13 deletions(-) diff --git a/var/spack/repos/builtin/packages/compadre/package.py b/var/spack/repos/builtin/packages/compadre/package.py index 19c99e217bd5f0..10c6874d653df9 100644 --- a/var/spack/repos/builtin/packages/compadre/package.py +++ b/var/spack/repos/builtin/packages/compadre/package.py @@ -21,6 +21,7 @@ class Compadre(CMakePackage): maintainers("kuberry") version("master", branch="master") + version("1.6.0", sha256="5d937f85c2e64b50955beab1ac9f1083162f5239a5f13a40ef9a9c0e6ad216c9") version("1.5.0", sha256="b7dd6020cc5a7969de817d5c7f6c5acceaad0f08dcfd3d7cacfa9f42e4c8b335") version("1.4.1", sha256="2e1e7d8e30953f76b6dc3a4c86ec8103d4b29447194cb5d5abb74b8e4099bdd9") version("1.3.0", sha256="f711a840fd921e84660451ded408023ec3bcfc98fd0a7dc4a299bfae6ab489c2") @@ -29,8 +30,19 @@ class Compadre(CMakePackage): depends_on("cxx", type="build") # generated depends_on("fortran", type="build") # generated - depends_on("kokkos-kernels@3.3.01:4") - depends_on("cmake@3.13:", type="build") + variant( + "debug", + default="0", + values=["0", "1", "2"], + multi=False, + description="Debugging level 0) release 1) debug 2) extreme debugging", + ) + + depends_on("cmake@3.10:", type="build", when="@:1.4") + depends_on("cmake@3.16:", type="build", when="@1.5:") + + depends_on("kokkos-kernels@3.3.01:4", when="@:1.5") + depends_on("kokkos-kernels@4:", when="@1.6:") variant("mpi", default=False, description="Enable MPI support") depends_on("mpi", when="+mpi") @@ -56,9 +68,25 @@ def cmake_args(self): "-DKokkosCore_PREFIX={0}".format(kokkos.prefix), "-DKokkosKernels_PREFIX={0}".format(kokkos_kernels.prefix), "-DCMAKE_CXX_COMPILER:STRING={0}".format(spec["kokkos"].kokkos_cxx), + # Compadre_USE_PYTHON is OFF by default + "-DCompadre_USE_PYTHON=OFF", ] ) + if spec.variants["debug"].value == "0": + if spec.satisfies("^kokkos~cuda"): + options.append( + "-DCMAKE_CXX_FLAGS:STRING=%s" + % "' -Ofast -funroll-loops -march=native -mtune=native '" + ) + options.append("-DCompadre_DEBUG:BOOL=OFF") + else: + options.append("-DCMAKE_CXX_FLAGS:STRING='-g -O0'") + options.append("-DCMAKE_BUILD_TYPE:STRING=DEBUG") + options.append("-DCompadre_DEBUG:BOOL=ON") + if spec.variants["debug"].value == "2": + options.append("-DCompadre_EXTREME_DEBUG:BOOL=ON") + if spec.satisfies("+mpi"): options.append("-DCompadre_USE_MPI:BOOL=ON") diff --git a/var/spack/repos/builtin/packages/py-pycompadre/package.py b/var/spack/repos/builtin/packages/py-pycompadre/package.py index 559cb5f0e70147..3d919c724220ce 100644 --- a/var/spack/repos/builtin/packages/py-pycompadre/package.py +++ b/var/spack/repos/builtin/packages/py-pycompadre/package.py @@ -15,18 +15,21 @@ class PyPycompadre(PythonPackage): constitute the rows of some globally sparse matrix. """ - homepage = "https://github.com/SNLComputation/compadre" - git = "https://github.com/SNLComputation/compadre.git" - url = "https://github.com/SNLComputation/compadre/archive/v1.3.0.tar.gz" + homepage = "https://github.com/sandialabs/compadre" + git = "https://github.com/sandialabs/compadre.git" + url = "https://github.com/sandialabs/compadre/archive/v1.3.0.tar.gz" maintainers("kuberry") - version("master", branch="master", preferred=True) + version("master", branch="master") + version("1.6.0", sha256="5d937f85c2e64b50955beab1ac9f1083162f5239a5f13a40ef9a9c0e6ad216c9") + version("1.5.0", sha256="b7dd6020cc5a7969de817d5c7f6c5acceaad0f08dcfd3d7cacfa9f42e4c8b335") + version("1.4.1", sha256="2e1e7d8e30953f76b6dc3a4c86ec8103d4b29447194cb5d5abb74b8e4099bdd9") + version("1.3.0", sha256="f711a840fd921e84660451ded408023ec3bcfc98fd0a7dc4a299bfae6ab489c2") depends_on("c", type="build") # generated depends_on("cxx", type="build") # generated depends_on("fortran", type="build") # generated - variant("trilinos", default=False, description="Use Kokkos from Trilinos") variant( "debug", default="0", @@ -35,19 +38,31 @@ class PyPycompadre(PythonPackage): description="Debugging level 0) release 1) debug 2) extreme debugging", ) - depends_on("cmake@3.10.0:", type="build") - depends_on("python@3.4:", type=("build", "link", "run")) - depends_on("py-pip", type=("build", "link", "run")) + depends_on("cmake@3.10:", type="build", when="@:1.4") + depends_on("cmake@3.16:", type="build", when="@1.5:") + + depends_on("kokkos-kernels@3.3.01:4", when="@:1.5") + depends_on("kokkos-kernels@4:", when="@1.6:") + + depends_on("python@3.4:", type=("build", "link", "run"), when="@:1.5") + depends_on("python@3.6:", type=("build", "link", "run"), when="@1.6:") depends_on("py-setuptools", type="build") depends_on("py-cython@0.23:", type="build") - depends_on("trilinos@13.2:", when="+trilinos") + + # fixes duplicate symbol issue with static library build + patch( + "https://patch-diff.githubusercontent.com/raw/sandialabs/Compadre/pull/286.patch?full_index=1", + sha256="e267b74f8ecb8dd23970848ed919d29b7d442f619ce80983e02a19f1d9582c61", + when="@1.5.0", + ) @run_before("install") def set_cmake_from_variants(self): spec = self.spec with open("cmake_opts.txt", "w") as f: - if "+trilinos" in spec: - f.write("Trilinos_PREFIX:PATH=%s\n" % spec["trilinos"].prefix) + f.write("KokkosCore_PREFIX:PATH=%s\n" % spec["kokkos"].prefix) + f.write("KokkosKernels_PREFIX:PATH=%s\n" % spec["kokkos-kernels"].prefix) + f.write("CMAKE_CXX_COMPILER:STRING={0}\n".format(spec["kokkos"].kokkos_cxx)) if spec.variants["debug"].value == "0": f.write( "CMAKE_CXX_FLAGS:STRING=%s\n" From ae28528ec7181e317db57ec4be852f53491a9006 Mon Sep 17 00:00:00 2001 From: Robert Cohn Date: Tue, 10 Dec 2024 17:34:35 -0500 Subject: [PATCH 66/69] sycl runtime needs umf (#48011) --- .../builtin/packages/intel-oneapi-compilers/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py index e3ec31d4b01980..d4b54d7343fe23 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py @@ -8,6 +8,7 @@ from spack.build_environment import dso_suffix from spack.package import * +from spack.util.environment import EnvironmentModifications versions = [ { @@ -396,6 +397,14 @@ def setup_run_environment(self, env): """ super().setup_run_environment(env) + # umf is packaged with compiler and not available as a standalone + if "~envmods" not in self.spec: + env.extend( + EnvironmentModifications.from_sourcing_file( + self.prefix.umf.latest.env.join("vars.sh"), *self.env_script_args + ) + ) + env.set("CC", self._llvm_bin.icx) env.set("CXX", self._llvm_bin.icpx) env.set("F77", self._llvm_bin.ifx) From a3985e75381d15e88862173fc5a93c0bf082a3c2 Mon Sep 17 00:00:00 2001 From: Scott Wittenburg Date: Tue, 10 Dec 2024 23:56:36 -0700 Subject: [PATCH 67/69] Revert "Set the "build_jobs" on concretization/generate for CI (#47660)" (#48028) This reverts commit 316dcc1609ca7c5ae7c3206b04baaa1cc8c9633d. --- lib/spack/spack/cmd/ci.py | 8 -------- .../spack/gitlab/cloud_pipelines/.gitlab-ci.yml | 9 +-------- .../spack/gitlab/cloud_pipelines/configs/ci.yaml | 6 ++---- share/spack/spack-completion.bash | 4 ++-- share/spack/spack-completion.fish | 16 ++-------------- 5 files changed, 7 insertions(+), 36 deletions(-) diff --git a/lib/spack/spack/cmd/ci.py b/lib/spack/spack/cmd/ci.py index e532ab429e7339..a7d4f097584d5d 100644 --- a/lib/spack/spack/cmd/ci.py +++ b/lib/spack/spack/cmd/ci.py @@ -17,7 +17,6 @@ import spack.ci as spack_ci import spack.cmd import spack.cmd.buildcache as buildcache -import spack.cmd.common.arguments import spack.config as cfg import spack.environment as ev import spack.hash_types as ht @@ -117,9 +116,6 @@ def setup_parser(subparser): ) generate.set_defaults(func=ci_generate) - spack.cmd.common.arguments.add_concretizer_args(generate) - spack.cmd.common.arguments.add_common_arguments(generate, ["jobs"]) - # Rebuild the buildcache index associated with the mirror in the # active, gitlab-enabled environment. index = subparsers.add_parser( @@ -149,7 +145,6 @@ def setup_parser(subparser): help="stop stand-alone tests after the first failure", ) rebuild.set_defaults(func=ci_rebuild) - spack.cmd.common.arguments.add_common_arguments(rebuild, ["jobs"]) # Facilitate reproduction of a failed CI build job reproduce = subparsers.add_parser( @@ -445,9 +440,6 @@ def ci_rebuild(args): if not verify_binaries: install_args.append("--no-check-signature") - if args.jobs: - install_args.append("-j{args.jobs}") - slash_hash = spack_ci.win_quote("/" + job_spec.dag_hash()) # Arguments when installing the root from sources diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index 618585a5c9b74d..95f98840f07719 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -145,7 +145,7 @@ default: --config-scope "${SPACK_CI_CONFIG_ROOT}" --config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}" --config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}/${SPACK_TARGET_ARCH}" - ci generate --check-index-only -j ${SPACK_CONCRETIZE_JOBS} + ci generate --check-index-only --artifacts-root "${CI_PROJECT_DIR}/jobs_scratch_dir" --output-file "${CI_PROJECT_DIR}/jobs_scratch_dir/cloud-ci-pipeline.yml" artifacts: @@ -155,7 +155,6 @@ default: - "${CI_PROJECT_DIR}/tmp/_user_cache/cache/providers" - "${CI_PROJECT_DIR}/tmp/_user_cache/cache/tags" variables: - SPACK_CONCRETIZE_JOBS: 4 KUBERNETES_CPU_REQUEST: 4000m KUBERNETES_MEMORY_REQUEST: 16G # avoid moving targets like branches and tags @@ -409,8 +408,6 @@ e4s-oneapi-build: extends: [".linux_power"] variables: SPACK_CI_STACK_NAME: e4s-power - # Override concretization pool for metal runners - SPACK_CONCRETIZE_JOBS: 16 e4s-power-generate: extends: [ ".e4s-power", ".generate-x86_64", ".e4s-power-generate-tags-and-image"] @@ -864,10 +861,6 @@ aws-pcluster-build-neoverse_v1: # Cray definitions .generate-cray: extends: [ ".generate-common", ".base-job" ] - variables: - # Override concretization pool for metal runners - SPACK_CONCRETIZE_JOBS: 16 - before_script: - echo $PATH - module avail diff --git a/share/spack/gitlab/cloud_pipelines/configs/ci.yaml b/share/spack/gitlab/cloud_pipelines/configs/ci.yaml index b3e151e5bd92f7..10eb7459a71b00 100644 --- a/share/spack/gitlab/cloud_pipelines/configs/ci.yaml +++ b/share/spack/gitlab/cloud_pipelines/configs/ci.yaml @@ -15,6 +15,7 @@ ci: - - touch ${SPACK_USER_CACHE_PATH}/cache/*/* # bump mtime of cache so it is not invalidated - - spack env activate --without-view ${SPACK_CONCRETE_ENV_DIR} - spack compiler list + - if [ -n "$SPACK_BUILD_JOBS" ]; then spack config add "config:build_jobs:$SPACK_BUILD_JOBS"; fi - - mkdir -p ${SPACK_ARTIFACTS_ROOT}/user_data # AWS runners mount E4S public key (verification), UO runners mount public/private (signing/verification) - - k=$CI_GPG_KEY_ROOT/e4s.gpg; [[ -r $k ]] && spack gpg trust $k @@ -23,7 +24,7 @@ ci: - k=$CI_GPG_KEY_ROOT/spack_public_key.gpg; [[ -r $k ]] && spack gpg trust $k script:: - - spack config blame mirrors - - spack --color=always --backtrace ci rebuild -j ${SPACK_BUILD_JOBS} --tests > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2) + - spack --color=always --backtrace ci rebuild --tests > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2) after_script: - - cat /proc/loadavg || true - cat /proc/meminfo | grep 'MemTotal\|MemFree' || true @@ -33,9 +34,6 @@ ci: ${SPACK_ARTIFACTS_ROOT}/user_data/install_times.json || true variables: CI_JOB_SIZE: "default" - SPACK_BUILD_JOBS: "4" - KUBERNETES_CPU_REQUEST: "4000m" - KUBERNETES_MEMORY_REQUEST: "16G" CI_GPG_KEY_ROOT: /mnt/key # SPACK_VERBOSE_SCRIPT: "1" id_tokens: diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index fd5812bac3dc9d..b9b4fd2d7a4360 100644 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -693,7 +693,7 @@ _spack_ci() { } _spack_ci_generate() { - SPACK_COMPREPLY="-h --help --output-file --optimize --dependencies --prune-dag --no-prune-dag --check-index-only --artifacts-root -U --fresh --reuse --fresh-roots --reuse-deps --deprecated -j --jobs" + SPACK_COMPREPLY="-h --help --output-file --optimize --dependencies --prune-dag --no-prune-dag --check-index-only --artifacts-root" } _spack_ci_rebuild_index() { @@ -701,7 +701,7 @@ _spack_ci_rebuild_index() { } _spack_ci_rebuild() { - SPACK_COMPREPLY="-h --help -t --tests --fail-fast -j --jobs" + SPACK_COMPREPLY="-h --help -t --tests --fail-fast" } _spack_ci_reproduce_build() { diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish index 18e317f0273df0..7d1e996c3f0b4d 100644 --- a/share/spack/spack-completion.fish +++ b/share/spack/spack-completion.fish @@ -955,7 +955,7 @@ complete -c spack -n '__fish_spack_using_command ci' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command ci' -s h -l help -d 'show this help message and exit' # spack ci generate -set -g __fish_spack_optspecs_spack_ci_generate h/help output-file= optimize dependencies prune-dag no-prune-dag check-index-only artifacts-root= U/fresh reuse fresh-roots deprecated j/jobs= +set -g __fish_spack_optspecs_spack_ci_generate h/help output-file= optimize dependencies prune-dag no-prune-dag check-index-only artifacts-root= complete -c spack -n '__fish_spack_using_command ci generate' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command ci generate' -s h -l help -d 'show this help message and exit' complete -c spack -n '__fish_spack_using_command ci generate' -l output-file -r -f -a output_file @@ -972,16 +972,6 @@ complete -c spack -n '__fish_spack_using_command ci generate' -l check-index-onl complete -c spack -n '__fish_spack_using_command ci generate' -l check-index-only -d 'only check spec state from buildcache indices' complete -c spack -n '__fish_spack_using_command ci generate' -l artifacts-root -r -f -a artifacts_root complete -c spack -n '__fish_spack_using_command ci generate' -l artifacts-root -r -d 'path to the root of the artifacts directory' -complete -c spack -n '__fish_spack_using_command ci generate' -s U -l fresh -f -a concretizer_reuse -complete -c spack -n '__fish_spack_using_command ci generate' -s U -l fresh -d 'do not reuse installed deps; build newest configuration' -complete -c spack -n '__fish_spack_using_command ci generate' -l reuse -f -a concretizer_reuse -complete -c spack -n '__fish_spack_using_command ci generate' -l reuse -d 'reuse installed packages/buildcaches when possible' -complete -c spack -n '__fish_spack_using_command ci generate' -l fresh-roots -l reuse-deps -f -a concretizer_reuse -complete -c spack -n '__fish_spack_using_command ci generate' -l fresh-roots -l reuse-deps -d 'concretize with fresh roots and reused dependencies' -complete -c spack -n '__fish_spack_using_command ci generate' -l deprecated -f -a config_deprecated -complete -c spack -n '__fish_spack_using_command ci generate' -l deprecated -d 'allow concretizer to select deprecated versions' -complete -c spack -n '__fish_spack_using_command ci generate' -s j -l jobs -r -f -a jobs -complete -c spack -n '__fish_spack_using_command ci generate' -s j -l jobs -r -d 'explicitly set number of parallel jobs' # spack ci rebuild-index set -g __fish_spack_optspecs_spack_ci_rebuild_index h/help @@ -989,15 +979,13 @@ complete -c spack -n '__fish_spack_using_command ci rebuild-index' -s h -l help complete -c spack -n '__fish_spack_using_command ci rebuild-index' -s h -l help -d 'show this help message and exit' # spack ci rebuild -set -g __fish_spack_optspecs_spack_ci_rebuild h/help t/tests fail-fast j/jobs= +set -g __fish_spack_optspecs_spack_ci_rebuild h/help t/tests fail-fast complete -c spack -n '__fish_spack_using_command ci rebuild' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command ci rebuild' -s h -l help -d 'show this help message and exit' complete -c spack -n '__fish_spack_using_command ci rebuild' -s t -l tests -f -a tests complete -c spack -n '__fish_spack_using_command ci rebuild' -s t -l tests -d 'run stand-alone tests after the build' complete -c spack -n '__fish_spack_using_command ci rebuild' -l fail-fast -f -a fail_fast complete -c spack -n '__fish_spack_using_command ci rebuild' -l fail-fast -d 'stop stand-alone tests after the first failure' -complete -c spack -n '__fish_spack_using_command ci rebuild' -s j -l jobs -r -f -a jobs -complete -c spack -n '__fish_spack_using_command ci rebuild' -s j -l jobs -r -d 'explicitly set number of parallel jobs' # spack ci reproduce-build set -g __fish_spack_optspecs_spack_ci_reproduce_build h/help runtime= working-dir= s/autostart gpg-file= gpg-url= From 03525528d6875e023a6d0f93e7486cb676c03cfc Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 11 Dec 2024 10:51:06 +0100 Subject: [PATCH 68/69] llnl.path: make system_path_filter a noop on non-win32 (#48032) --- lib/spack/llnl/path.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/spack/llnl/path.py b/lib/spack/llnl/path.py index 4c5da8472d2710..9a8d3432d713e7 100644 --- a/lib/spack/llnl/path.py +++ b/lib/spack/llnl/path.py @@ -66,7 +66,7 @@ def _is_url(path_or_url: str) -> bool: return result -def system_path_filter(_func=None, arg_slice: Optional[slice] = None): +def _system_path_filter(_func=None, arg_slice: Optional[slice] = None): """Filters function arguments to account for platform path separators. Optional slicing range can be specified to select specific arguments @@ -100,6 +100,16 @@ def path_filter_caller(*args, **kwargs): return holder_func +def _noop_decorator(_func=None, arg_slice: Optional[slice] = None): + return _func if _func else lambda x: x + + +if sys.platform == "win32": + system_path_filter = _system_path_filter +else: + system_path_filter = _noop_decorator + + def sanitize_win_longpath(path: str) -> str: """Strip Windows extended path prefix from strings Returns sanitized string. From e9d2732e0072d992736403f61d1f3fc8a09905f8 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 11 Dec 2024 10:54:17 +0100 Subject: [PATCH 69/69] log.py: improve utf-8 handling, and non-utf-8 output (#48005) --- lib/spack/llnl/util/tty/log.py | 22 ++++++++++++++-------- lib/spack/spack/test/llnl/util/tty/log.py | 18 ++++++++---------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/lib/spack/llnl/util/tty/log.py b/lib/spack/llnl/util/tty/log.py index 534472dbecdf3e..612d9ff380e519 100644 --- a/lib/spack/llnl/util/tty/log.py +++ b/lib/spack/llnl/util/tty/log.py @@ -879,10 +879,13 @@ def _writer_daemon( write_fd.close() # 1. Use line buffering (3rd param = 1) since Python 3 has a bug - # that prevents unbuffered text I/O. - # 2. Python 3.x before 3.7 does not open with UTF-8 encoding by default + # that prevents unbuffered text I/O. [needs citation] + # 2. Enforce a UTF-8 interpretation of build process output with errors replaced by '?'. + # The downside is that the log file will not contain the exact output of the build process. # 3. closefd=False because Connection has "ownership" - read_file = os.fdopen(read_fd.fileno(), "r", 1, encoding="utf-8", closefd=False) + read_file = os.fdopen( + read_fd.fileno(), "r", 1, encoding="utf-8", errors="replace", closefd=False + ) if stdin_fd: stdin_file = os.fdopen(stdin_fd.fileno(), closefd=False) @@ -928,11 +931,7 @@ def _writer_daemon( try: while line_count < 100: # Handle output from the calling process. - try: - line = _retry(read_file.readline)() - except UnicodeDecodeError: - # installs like --test=root gpgme produce non-UTF8 logs - line = "\n" + line = _retry(read_file.readline)() if not line: return @@ -946,6 +945,13 @@ def _writer_daemon( output_line = clean_line if filter_fn: output_line = filter_fn(clean_line) + enc = sys.stdout.encoding + if enc != "utf-8": + # On Python 3.6 and 3.7-3.14 with non-{utf-8,C} locale stdout + # may not be able to handle utf-8 output. We do an inefficient + # dance of re-encoding with errors replaced, so stdout.write + # does not raise. + output_line = output_line.encode(enc, "replace").decode(enc) sys.stdout.write(output_line) # Stripped output to log file. diff --git a/lib/spack/spack/test/llnl/util/tty/log.py b/lib/spack/spack/test/llnl/util/tty/log.py index 61879fc4108167..1ffcf22453fb59 100644 --- a/lib/spack/spack/test/llnl/util/tty/log.py +++ b/lib/spack/spack/test/llnl/util/tty/log.py @@ -57,18 +57,16 @@ def test_log_python_output_without_echo(capfd, tmpdir): assert capfd.readouterr()[0] == "" -def test_log_python_output_with_invalid_utf8(capfd, tmpdir): - with tmpdir.as_cwd(): - with log.log_output("foo.txt"): - sys.stdout.buffer.write(b"\xc3\x28\n") +def test_log_python_output_with_invalid_utf8(capfd, tmp_path): + tmp_file = str(tmp_path / "foo.txt") + with log.log_output(tmp_file, echo=True): + sys.stdout.buffer.write(b"\xc3helloworld\n") - expected = b"\n" - with open("foo.txt", "rb") as f: - written = f.read() - assert written == expected + # we should be able to read this as valid utf-8 + with open(tmp_file, "r", encoding="utf-8") as f: + assert f.read() == "�helloworld\n" - # nothing on stdout or stderr - assert capfd.readouterr()[0] == "" + assert capfd.readouterr().out == "�helloworld\n" def test_log_python_output_and_echo_output(capfd, tmpdir):