Compare commits

..

1 Commits

Author SHA1 Message Date
Todd Gamblin
111501b583 concretizer: move remove_node transform into spec_clauses
The `remove_node` transformation is used in almost all calls to `condition()`,
but it's removing `attr("node", ...)` and `attr("virtual_node", ...)` attributes
that we could avoid adding in the first place. Some uses cases need the `node()`
clause, others do not.

- [x] Add a `node` argument to `spec_clauses` that defaults to `True`.
- [x] Remove `remove_node` transform.
- [x] Update calls to `spec_clauses` to use `node=False` where we would have
      used `remove_node`.
- [x] Remove the now unused `impose()` function (missed in #46729)

This is part of a larger effort to simplify the use of transformations
in the concretizer, but it's an easy first step.

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2025-01-04 16:11:41 -08:00
65 changed files with 371 additions and 761 deletions

View File

@@ -25,23 +25,14 @@ These settings can be overridden in ``etc/spack/config.yaml`` or
The location where Spack will install packages and their dependencies.
Default is ``$spack/opt/spack``.
---------------
``projections``
---------------
---------------------------------------------------
``install_hash_length`` and ``install_path_scheme``
---------------------------------------------------
.. warning::
Modifying projections of the install tree is strongly discouraged.
By default Spack installs all packages into a unique directory relative to the install
tree root with the following layout:
.. code-block::
{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}
In very rare cases, it may be necessary to reduce the length of this path. For example,
very old versions of the Intel compiler are known to segfault when input paths are too long:
The default Spack installation path can be very long and can create problems
for scripts with hardcoded shebangs. Additionally, when using the Intel
compiler, and if there is also a long list of dependencies, the compiler may
segfault. If you see the following:
.. code-block:: console
@@ -49,25 +40,36 @@ very old versions of the Intel compiler are known to segfault when input paths a
** Segmentation violation signal raised. **
Access violation or stack overflow. Please contact Intel Support for assistance.
Another case is Python and R packages with many runtime dependencies, which can result
in very large ``PYTHONPATH`` and ``R_LIBS`` environment variables. This can cause the
``execve`` system call to fail with ``E2BIG``, preventing processes from starting.
it may be because variables containing dependency specs may be too long. There
are two parameters to help with long path names. Firstly, the
``install_hash_length`` parameter can set the length of the hash in the
installation path from 1 to 32. The default path uses the full 32 characters.
For this reason, Spack allows users to modify the installation layout through custom
projections. For example
Secondly, it is also possible to modify the entire installation
scheme. By default Spack uses
``{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}``
where the tokens that are available for use in this directive are the
same as those understood by the :meth:`~spack.spec.Spec.format`
method. Using this parameter it is possible to use a different package
layout or reduce the depth of the installation paths. For example
.. code-block:: yaml
config:
install_tree:
root: $spack/opt/spack
projections:
all: "{name}/{version}/{hash:16}"
install_path_scheme: '{name}/{version}/{hash:7}'
would install packages into sub-directories using only the package name, version and a
hash length of 16 characters.
would install packages into sub-directories using only the package
name, version and a hash length of 7 characters.
Notice that reducing the hash length increases the likelihood of hash collisions.
When using either parameter to set the hash length it only affects the
representation of the hash in the installation directory. You
should be aware that the smaller the hash length the more likely
naming conflicts will occur. These parameters are independent of those
used to configure module names.
.. warning:: Modifying the installation hash length or path scheme after
packages have been installed will prevent Spack from being
able to find the old installation directories.
--------------------
``build_stage``

View File

@@ -298,14 +298,7 @@ def initconfig_hardware_entries(self):
def std_initconfig_entries(self):
cmake_prefix_path_env = os.environ["CMAKE_PREFIX_PATH"]
cmake_prefix_path = cmake_prefix_path_env.replace(os.pathsep, ";")
complete_rpath_list = ";".join(
[
self.pkg.spec.prefix.lib,
self.pkg.spec.prefix.lib64,
*os.environ.get("SPACK_COMPILER_EXTRA_RPATHS", "").split(":"),
*os.environ.get("SPACK_COMPILER_IMPLICIT_RPATHS", "").split(":"),
]
)
return [
"#------------------{0}".format("-" * 60),
"# !!!! This is a generated file, edit at own risk !!!!",
@@ -314,8 +307,6 @@ def std_initconfig_entries(self):
"#------------------{0}\n".format("-" * 60),
cmake_cache_string("CMAKE_PREFIX_PATH", cmake_prefix_path),
cmake_cache_string("CMAKE_INSTALL_RPATH_USE_LINK_PATH", "ON"),
cmake_cache_string("CMAKE_BUILD_RPATH", complete_rpath_list),
cmake_cache_string("CMAKE_INSTALL_RPATH", complete_rpath_list),
self.define_cmake_cache_from_variant("CMAKE_BUILD_TYPE", "build_type"),
]

View File

@@ -71,16 +71,13 @@ def build_directory(self):
@property
def build_args(self):
"""Arguments for ``cargo build``."""
return ["-j", str(self.pkg.module.make_jobs)]
return []
@property
def check_args(self):
"""Argument for ``cargo test`` during check phase"""
return []
def setup_build_environment(self, env):
env.set("CARGO_HOME", self.stage.path)
def build(self, pkg, spec, prefix):
"""Runs ``cargo install`` in the source directory"""
with fs.working_dir(self.build_directory):

View File

@@ -10,9 +10,8 @@
import spack.builder
import spack.package_base
import spack.phase_callbacks
from spack.directives import build_system, depends_on, extends
from spack.directives import build_system, extends
from spack.install_test import SkipTest, test_part
from spack.multimethod import when
from spack.util.executable import Executable
from ._checks import BuilderWithDefaults, execute_build_time_tests
@@ -29,9 +28,7 @@ class PerlPackage(spack.package_base.PackageBase):
build_system("perl")
with when("build_system=perl"):
extends("perl")
depends_on("gmake", type="build")
extends("perl", when="build_system=perl")
@property
@memoized

View File

@@ -171,9 +171,7 @@ def quote_kvp(string: str) -> str:
def parse_specs(
args: Union[str, List[str]],
concretize: bool = False,
tests: spack.concretize.TestsType = False,
args: Union[str, List[str]], concretize: bool = False, tests: bool = False
) -> List[spack.spec.Spec]:
"""Convenience function for parsing arguments from specs. Handles common
exceptions and dies if there are errors.
@@ -185,13 +183,11 @@ def parse_specs(
if not concretize:
return specs
to_concretize: List[spack.concretize.SpecPairInput] = [(s, None) for s in specs]
to_concretize = [(s, None) for s in specs]
return _concretize_spec_pairs(to_concretize, tests=tests)
def _concretize_spec_pairs(
to_concretize: List[spack.concretize.SpecPairInput], tests: spack.concretize.TestsType = False
) -> List[spack.spec.Spec]:
def _concretize_spec_pairs(to_concretize, tests=False):
"""Helper method that concretizes abstract specs from a list of abstract,concrete pairs.
Any spec with a concrete spec associated with it will concretize to that spec. Any spec
@@ -202,7 +198,7 @@ def _concretize_spec_pairs(
# Special case for concretizing a single spec
if len(to_concretize) == 1:
abstract, concrete = to_concretize[0]
return [concrete or abstract.concretized(tests=tests)]
return [concrete or abstract.concretized()]
# Special case if every spec is either concrete or has an abstract hash
if all(

View File

@@ -749,18 +749,12 @@ def __init__(self, compiler, feature, flag_name, ver_string=None):
class CompilerCacheEntry:
"""Deserialized cache entry for a compiler"""
__slots__ = ("c_compiler_output", "real_version")
__slots__ = ["c_compiler_output", "real_version"]
def __init__(self, c_compiler_output: Optional[str], real_version: str):
self.c_compiler_output = c_compiler_output
self.real_version = real_version
@property
def empty(self) -> bool:
"""Sometimes the compiler is temporarily broken, preventing us from getting output. The
call site determines if that is a problem."""
return self.c_compiler_output is None
@classmethod
def from_dict(cls, data: Dict[str, Optional[str]]):
if not isinstance(data, dict):
@@ -798,10 +792,9 @@ def __init__(self, cache: "FileCache") -> None:
self.cache.init_entry(self.name)
self._data: Dict[str, Dict[str, Optional[str]]] = {}
def _get_entry(self, key: str, *, allow_empty: bool) -> Optional[CompilerCacheEntry]:
def _get_entry(self, key: str) -> Optional[CompilerCacheEntry]:
try:
entry = CompilerCacheEntry.from_dict(self._data[key])
return entry if allow_empty or not entry.empty else None
return CompilerCacheEntry.from_dict(self._data[key])
except ValueError:
del self._data[key]
except KeyError:
@@ -819,7 +812,7 @@ def get(self, compiler: Compiler) -> CompilerCacheEntry:
self._data = {}
key = self._key(compiler)
value = self._get_entry(key, allow_empty=False)
value = self._get_entry(key)
if value is not None:
return value
@@ -833,7 +826,7 @@ def get(self, compiler: Compiler) -> CompilerCacheEntry:
self._data = {}
# Use cache entry that may have been created by another process in the meantime.
entry = self._get_entry(key, allow_empty=True)
entry = self._get_entry(key)
# Finally compute the cache entry
if entry is None:

View File

@@ -5,7 +5,7 @@
import sys
import time
from contextlib import contextmanager
from typing import Iterable, List, Optional, Sequence, Tuple, Union
from typing import Iterable, Optional, Sequence, Tuple, Union
import llnl.util.tty as tty
@@ -35,7 +35,6 @@ def enable_compiler_existence_check():
CHECK_COMPILER_EXISTENCE = saved
SpecPairInput = Tuple[Spec, Optional[Spec]]
SpecPair = Tuple[Spec, Spec]
SpecLike = Union[Spec, str]
TestsType = Union[bool, Iterable[str]]
@@ -60,8 +59,8 @@ def concretize_specs_together(
def concretize_together(
spec_list: Sequence[SpecPairInput], tests: TestsType = False
) -> List[SpecPair]:
spec_list: Sequence[SpecPair], tests: TestsType = False
) -> Sequence[SpecPair]:
"""Given a number of specs as input, tries to concretize them together.
Args:
@@ -77,8 +76,8 @@ def concretize_together(
def concretize_together_when_possible(
spec_list: Sequence[SpecPairInput], tests: TestsType = False
) -> List[SpecPair]:
spec_list: Sequence[SpecPair], tests: TestsType = False
) -> Sequence[SpecPair]:
"""Given a number of specs as input, tries to concretize them together to the extent possible.
See documentation for ``unify: when_possible`` concretization for the precise definition of
@@ -114,8 +113,8 @@ def concretize_together_when_possible(
def concretize_separately(
spec_list: Sequence[SpecPairInput], tests: TestsType = False
) -> List[SpecPair]:
spec_list: Sequence[SpecPair], tests: TestsType = False
) -> Sequence[SpecPair]:
"""Concretizes the input specs separately from each other.
Args:

View File

@@ -951,6 +951,12 @@ def set(path: str, value: Any, scope: Optional[str] = None) -> None:
return CONFIG.set(path, value, scope)
def add_default_platform_scope(platform: str) -> None:
plat_name = os.path.join("defaults", platform)
plat_path = os.path.join(CONFIGURATION_DEFAULTS_PATH[1], platform)
CONFIG.push_scope(DirectoryConfigScope(plat_name, plat_path))
def scopes() -> Dict[str, ConfigScope]:
"""Convenience function to get list of configuration scopes."""
return CONFIG.scopes

View File

@@ -8,7 +8,7 @@
import shutil
import sys
from pathlib import Path
from typing import Dict, List, Optional, Tuple
from typing import List, Optional, Tuple
import llnl.util.filesystem as fs
from llnl.util.symlink import readlink
@@ -17,6 +17,7 @@
import spack.hash_types as ht
import spack.projections
import spack.spec
import spack.store
import spack.util.spack_json as sjson
from spack.error import SpackError
@@ -68,9 +69,10 @@ def specs_from_metadata_dirs(root: str) -> List["spack.spec.Spec"]:
class DirectoryLayout:
"""A directory layout is used to associate unique paths with specs. Different installations are
going to want different layouts for their install, and they can use this to customize the
nesting structure of spack installs. The default layout is:
"""A directory layout is used to associate unique paths with specs.
Different installations are going to want different layouts for their
install, and they can use this to customize the nesting structure of
spack installs. The default layout is:
* <install root>/
@@ -80,30 +82,35 @@ class DirectoryLayout:
* <name>-<version>-<hash>
The installation directory projections can be modified with the projections argument."""
The hash here is a SHA-1 hash for the full DAG plus the build
spec.
def __init__(
self,
root,
*,
projections: Optional[Dict[str, str]] = None,
hash_length: Optional[int] = None,
) -> None:
The installation directory projections can be modified with the
projections argument.
"""
def __init__(self, root, **kwargs):
self.root = root
projections = projections or default_projections
self.projections = {key: projection.lower() for key, projection in projections.items()}
self.check_upstream = True
projections = kwargs.get("projections") or default_projections
self.projections = dict(
(key, projection.lower()) for key, projection in projections.items()
)
# apply hash length as appropriate
self.hash_length = hash_length
self.hash_length = kwargs.get("hash_length", None)
if self.hash_length is not None:
for when_spec, projection in self.projections.items():
if "{hash}" not in projection:
raise InvalidDirectoryLayoutParametersError(
"Conflicting options for installation layout hash length"
if "{hash" in projection
else "Cannot specify hash length when the hash is not part of all "
"install_tree projections"
)
if "{hash" in projection:
raise InvalidDirectoryLayoutParametersError(
"Conflicting options for installation layout hash" " length"
)
else:
raise InvalidDirectoryLayoutParametersError(
"Cannot specify hash length when the hash is not"
" part of all install_tree projections"
)
self.projections[when_spec] = projection.replace(
"{hash}", "{hash:%d}" % self.hash_length
)
@@ -272,6 +279,13 @@ def path_for_spec(self, spec):
if spec.external:
return spec.external_path
if self.check_upstream:
upstream, record = spack.store.STORE.db.query_by_spec_hash(spec.dag_hash())
if upstream:
raise SpackError(
"Internal error: attempted to call path_for_spec on"
" upstream-installed package."
)
path = self.relative_path_for_spec(spec)
assert not path.startswith(self.root)

View File

@@ -15,10 +15,6 @@
SHOW_BACKTRACE = False
class SpackAPIWarning(UserWarning):
"""Warning that formats with file and line number."""
class SpackError(Exception):
"""This is the superclass for all Spack errors.
Subclasses can be found in the modules they have to do with.

View File

@@ -503,16 +503,16 @@ def make_argument_parser(**kwargs):
return parser
def showwarning(message, category, filename, lineno, file=None, line=None):
def send_warning_to_tty(message, *args):
"""Redirects messages to tty.warn."""
if category is spack.error.SpackAPIWarning:
tty.warn(f"{filename}:{lineno}: {message}")
else:
tty.warn(message)
tty.warn(message)
def setup_main_options(args):
"""Configure spack globals based on the basic options."""
# Assign a custom function to show warnings
warnings.showwarning = send_warning_to_tty
# Set up environment based on args.
tty.set_verbose(args.verbose)
tty.set_debug(args.debug)
@@ -903,10 +903,9 @@ def _main(argv=None):
# main() is tricky to get right, so be careful where you put things.
#
# Things in this first part of `main()` should *not* require any
# configuration. This doesn't include much -- setting up the parser,
# configuration. This doesn't include much -- setting up th parser,
# restoring some key environment variables, very simple CLI options, etc.
# ------------------------------------------------------------------------
warnings.showwarning = showwarning
# Create a parser with a simple positional argument first. We'll
# lazily load the subcommand(s) we need later. This allows us to

View File

@@ -106,17 +106,10 @@
{
"names": ["install_missing_compilers"],
"message": "The config:install_missing_compilers option has been deprecated in "
"Spack v0.23, and is currently ignored. It will be removed from config in "
"Spack v0.23, and is currently ignored. It will be removed from config after "
"Spack v1.0.",
"error": False,
},
{
"names": ["install_path_scheme"],
"message": "The config:install_path_scheme option was deprecated in Spack v0.16 "
"in favor of config:install_tree:projections:all. It will be removed in Spack "
"v1.0.",
"error": False,
},
],
}
}

View File

@@ -265,11 +265,6 @@ def specify(spec):
return spack.spec.Spec(spec)
def remove_node(spec: spack.spec.Spec, facts: List[AspFunction]) -> List[AspFunction]:
"""Transformation that removes all "node" and "virtual_node" from the input list of facts."""
return list(filter(lambda x: x.args[0] not in ("node", "virtual_node"), facts))
def _create_counter(specs: List[spack.spec.Spec], tests: bool):
strategy = spack.config.CONFIG.get("concretizer:duplicates:strategy", "none")
if strategy == "full":
@@ -1521,6 +1516,7 @@ def _get_condition_id(
return result[0]
cond_id = next(self._id_counter)
requirements = self.spec_clauses(named_cond, body=body, context=context)
if context.transform:
requirements = context.transform(named_cond, requirements)
@@ -1559,7 +1555,6 @@ def condition(
if not context:
context = ConditionContext()
context.transform_imposed = remove_node
if imposed_spec:
imposed_name = imposed_spec.name or imposed_name
@@ -1594,14 +1589,6 @@ def condition(
return condition_id
def impose(self, condition_id, imposed_spec, node=True, body=False):
imposed_constraints = self.spec_clauses(imposed_spec, body=body)
for pred in imposed_constraints:
# imposed "node"-like conditions are no-ops
if not node and pred.args[0] in ("node", "virtual_node"):
continue
self.gen.fact(fn.imposed_constraint(condition_id, *pred.args))
def package_provider_rules(self, pkg):
for vpkg_name in pkg.provided_virtual_names():
if vpkg_name not in self.possible_virtuals:
@@ -1659,7 +1646,7 @@ def track_dependencies(input_spec, requirements):
return requirements + [fn.attr("track_dependencies", input_spec.name)]
def dependency_holds(input_spec, requirements):
return remove_node(input_spec, requirements) + [
return requirements + [
fn.attr(
"dependency_holds", pkg.name, input_spec.name, dt.flag_to_string(t)
)
@@ -1717,13 +1704,13 @@ def package_splice_rules(self, pkg):
splice_node = fn.node(AspVar("NID"), cond.name)
when_spec_attrs = [
fn.attr(c.args[0], splice_node, *(c.args[2:]))
for c in self.spec_clauses(cond, body=True, required_from=None)
if c.args[0] != "node"
for c in self.spec_clauses(cond, body=True, required_from=None, node=False)
]
splice_spec_hash_attrs = [
fn.hash_attr(hash_var, *(c.args))
for c in self.spec_clauses(spec_to_splice, body=True, required_from=None)
if c.args[0] != "node"
for c in self.spec_clauses(
spec_to_splice, body=True, required_from=None, node=False
)
]
if match_variants is None:
variant_constraints = []
@@ -1845,10 +1832,6 @@ def emit_facts_from_requirement_rules(self, rules: List[RequirementRule]):
context.source = ConstraintOrigin.append_type_suffix(
pkg_name, ConstraintOrigin.REQUIRE
)
if not virtual:
context.transform_imposed = remove_node
# else: for virtuals we want to emit "node" and
# "virtual_node" in imposed specs
member_id = self.condition(
required_spec=when_spec,
@@ -2022,6 +2005,7 @@ def spec_clauses(
self,
spec: spack.spec.Spec,
*,
node: bool = True,
body: bool = False,
transitive: bool = True,
expand_hashes: bool = False,
@@ -2039,6 +2023,7 @@ def spec_clauses(
try:
clauses = self._spec_clauses(
spec,
node=node,
body=body,
transitive=transitive,
expand_hashes=expand_hashes,
@@ -2056,6 +2041,7 @@ def _spec_clauses(
self,
spec: spack.spec.Spec,
*,
node: bool = True,
body: bool = False,
transitive: bool = True,
expand_hashes: bool = False,
@@ -2066,6 +2052,7 @@ def _spec_clauses(
Arguments:
spec: the spec to analyze
node: if True, emit node(PackageName, ...) and virtual_node(PackageaName, ...) facts
body: if True, generate clauses to be used in rule bodies (final values) instead
of rule heads (setters).
transitive: if False, don't generate clauses from dependencies (default True)
@@ -2085,8 +2072,10 @@ def _spec_clauses(
f: Union[Type[_Head], Type[_Body]] = _Body if body else _Head
if spec.name:
# only generate this if caller asked for node facts -- not needed for most conditions
if node and spec.name:
clauses.append(f.node(spec.name) if not spec.virtual else f.virtual_node(spec.name))
if spec.namespace:
clauses.append(f.namespace(spec.name, spec.namespace))
@@ -2244,6 +2233,7 @@ def _spec_clauses(
clauses.extend(
self._spec_clauses(
dep,
node=node,
body=body,
expand_hashes=expand_hashes,
concrete_build_deps=concrete_build_deps,
@@ -2628,7 +2618,7 @@ def concrete_specs(self):
# this indicates that there is a spec like this installed
self.gen.fact(fn.installed_hash(spec.name, h))
# indirection layer between hash constraints and imposition to allow for splicing
for pred in self.spec_clauses(spec, body=True, required_from=None):
for pred in self.spec_clauses(spec, body=True, required_from=None, node=False):
self.gen.fact(fn.hash_attr(h, *pred.args))
self.gen.newline()
# Declare as possible parts of specs that are not in package.py
@@ -3238,7 +3228,7 @@ def depends_on(
node_variable = "node(ID, Package)"
when_spec.name = placeholder
body_clauses = self._setup.spec_clauses(when_spec, body=True)
body_clauses = self._setup.spec_clauses(when_spec, body=True, node=False)
body_str = (
f" {f',{os.linesep} '.join(str(x) for x in body_clauses)},\n"
f" not external({node_variable}),\n"
@@ -3326,7 +3316,7 @@ def propagate(self, constraint_str: str, *, when: str):
node_variable = "node(ID, Package)"
when_spec.name = placeholder
body_clauses = self._setup.spec_clauses(when_spec, body=True)
body_clauses = self._setup.spec_clauses(when_spec, body=True, node=False)
body_str = (
f" {f',{os.linesep} '.join(str(x) for x in body_clauses)},\n"
f" not external({node_variable}),\n"
@@ -3337,7 +3327,7 @@ def propagate(self, constraint_str: str, *, when: str):
assert constraint_spec.name is None, "only anonymous constraint specs are accepted"
constraint_spec.name = placeholder
constraint_clauses = self._setup.spec_clauses(constraint_spec, body=False)
constraint_clauses = self._setup.spec_clauses(constraint_spec, body=False, node=False)
for clause in constraint_clauses:
if clause.args[0] == "node_compiler_version_satisfies":
self._setup.compiler_version_constraints.add(constraint_spec.compiler)

View File

@@ -43,6 +43,7 @@
import spack.util.url as url_util
import spack.util.web as web_util
from spack.binary_distribution import CannotListKeys, GenerateIndexError
from spack.directory_layout import DirectoryLayout
from spack.paths import test_path
from spack.spec import Spec
@@ -135,28 +136,35 @@ def default_config(tmp_path, config_directory, monkeypatch, install_mockery):
@pytest.fixture(scope="function")
def install_dir_default_layout(tmpdir):
"""Hooks a fake install directory with a default layout"""
scheme = os.path.join(
"${architecture}", "${compiler.name}-${compiler.version}", "${name}-${version}-${hash}"
)
real_store, real_layout = spack.store.STORE, spack.store.STORE.layout
opt_dir = tmpdir.join("opt")
original_store, spack.store.STORE = spack.store.STORE, spack.store.Store(str(opt_dir))
spack.store.STORE = spack.store.Store(str(opt_dir))
spack.store.STORE.layout = DirectoryLayout(str(opt_dir), path_scheme=scheme)
try:
yield spack.store
finally:
spack.store.STORE = original_store
spack.store.STORE = real_store
spack.store.STORE.layout = real_layout
@pytest.fixture(scope="function")
def install_dir_non_default_layout(tmpdir):
"""Hooks a fake install directory with a non-default layout"""
opt_dir = tmpdir.join("opt")
original_store, spack.store.STORE = spack.store.STORE, spack.store.Store(
str(opt_dir),
projections={
"all": "{name}/{version}/{architecture}-{compiler.name}-{compiler.version}-{hash}"
},
scheme = os.path.join(
"${name}", "${version}", "${architecture}-${compiler.name}-${compiler.version}-${hash}"
)
real_store, real_layout = spack.store.STORE, spack.store.STORE.layout
opt_dir = tmpdir.join("opt")
spack.store.STORE = spack.store.Store(str(opt_dir))
spack.store.STORE.layout = DirectoryLayout(str(opt_dir), path_scheme=scheme)
try:
yield spack.store
finally:
spack.store.STORE = original_store
spack.store.STORE = real_store
spack.store.STORE.layout = real_layout
@pytest.fixture(scope="function")

View File

@@ -635,6 +635,11 @@ def ensure_debug(monkeypatch):
tty.set_debug(current_debug_level)
@pytest.fixture(autouse=sys.platform == "win32", scope="session")
def platform_config():
spack.config.add_default_platform_scope(spack.platforms.real_host().name)
@pytest.fixture
def default_config():
"""Isolates the default configuration from the user configs.

View File

@@ -14,10 +14,10 @@ default:
image: { "name": "ghcr.io/spack/e4s-ubuntu-18.04:v2021-10-18", "entrypoint": [""] }
# CI Platform-Arch
.cray_rhel_x86_64_v3:
.cray_rhel_zen4:
variables:
SPACK_TARGET_PLATFORM: "cray-rhel"
SPACK_TARGET_ARCH: "x86_64_v3"
SPACK_TARGET_ARCH: "zen4"
.cray_sles_zen4:
variables:
@@ -884,7 +884,7 @@ aws-pcluster-build-neoverse_v1:
- cat /proc/meminfo | grep 'MemTotal\|MemFree' || true
.generate-cray-rhel:
tags: [ "cray-rhel-x86_64_v3", "public" ]
tags: [ "cray-rhel-zen4", "public" ]
extends: [ ".generate-cray" ]
.generate-cray-sles:
@@ -896,7 +896,7 @@ aws-pcluster-build-neoverse_v1:
# E4S - Cray RHEL
#######################################
.e4s-cray-rhel:
extends: [ ".cray_rhel_x86_64_v3" ]
extends: [ ".cray_rhel_zen4" ]
variables:
SPACK_CI_STACK_NAME: e4s-cray-rhel
@@ -904,6 +904,7 @@ e4s-cray-rhel-generate:
extends: [ ".generate-cray-rhel", ".e4s-cray-rhel" ]
e4s-cray-rhel-build:
allow_failure: true # libsci_cray.so broken, misses DT_NEEDED for libdl.so
extends: [ ".build", ".e4s-cray-rhel" ]
trigger:
include:
@@ -922,10 +923,10 @@ e4s-cray-rhel-build:
variables:
SPACK_CI_STACK_NAME: e4s-cray-sles
.e4s-cray-sles-generate:
e4s-cray-sles-generate:
extends: [ ".generate-cray-sles", ".e4s-cray-sles" ]
.e4s-cray-sles-build:
e4s-cray-sles-build:
allow_failure: true # libsci_cray.so broken, misses DT_NEEDED for libdl.so
extends: [ ".build", ".e4s-cray-sles" ]
trigger:

View File

@@ -1,27 +1,31 @@
compilers:
- compiler:
spec: cce@=18.0.0
spec: cce@15.0.1
paths:
cc: /opt/cray/pe/cce/18.0.0/bin/craycc
cxx: /opt/cray/pe/cce/18.0.0/bin/crayCC
f77: /opt/cray/pe/cce/18.0.0/bin/crayftn
fc: /opt/cray/pe/cce/18.0.0/bin/crayftn
cc: cc
cxx: CC
f77: ftn
fc: ftn
flags: {}
operating_system: rhel8
target: x86_64
modules: []
environment: {}
extra_rpaths: []
target: any
modules:
- PrgEnv-cray/8.3.3
- cce/15.0.1
environment:
set:
MACHTYPE: x86_64
- compiler:
spec: gcc@=8.5.0
spec: gcc@11.2.0
paths:
cc: /usr/bin/gcc
cxx: /usr/bin/g++
f77: /usr/bin/gfortran
fc: /usr/bin/gfortran
cc: gcc
cxx: g++
f77: gfortran
fc: gfortran
flags: {}
operating_system: rhel8
target: x86_64
modules: []
environment: {}
extra_rpaths: []
target: any
modules:
- PrgEnv-gnu
- gcc/11.2.0
environment: {}

View File

@@ -1,15 +1,16 @@
packages:
# EXTERNALS
cray-mpich:
buildable: false
externals:
- spec: cray-mpich@8.1.30 %cce
prefix: /opt/cray/pe/mpich/8.1.30/ofi/cray/18.0
- spec: cray-mpich@8.1.25 %cce@15.0.1
prefix: /opt/cray/pe/mpich/8.1.25/ofi/cray/10.0
modules:
- cray-mpich/8.1.30
- cray-mpich/8.1.25
cray-libsci:
buildable: false
externals:
- spec: cray-libsci@24.07.0 %cce
prefix: /opt/cray/pe/libsci/24.07.0/CRAY/18.0/x86_64/
- spec: cray-libsci@23.02.1.1 %cce@15.0.1
prefix: /opt/cray/pe/libsci/23.02.1.1/CRAY/9.0/x86_64/
modules:
- cray-libsci/24.07.0
- cray-libsci/23.02.1.1

View File

@@ -1,4 +0,0 @@
ci:
pipeline-gen:
- build-job:
tags: ["cray-rhel-x86_64_v3"]

View File

@@ -0,0 +1,4 @@
ci:
pipeline-gen:
- build-job:
tags: ["cray-rhel-zen4"]

View File

@@ -13,7 +13,6 @@ spack:
- openjpeg # CMakePackage
- r-rcpp # RPackage
- ruby-rake # RubyPackage
- perl-data-dumper # PerlPackage
- arch:
- '%gcc'

View File

@@ -14,7 +14,8 @@ spack:
packages:
all:
require: "%cce@18.0.0 target=x86_64_v3"
prefer:
- "%cce"
compiler: [cce]
providers:
blas: [cray-libsci]
@@ -22,15 +23,17 @@ spack:
mpi: [cray-mpich]
tbb: [intel-tbb]
scalapack: [netlib-scalapack]
target: [zen4]
variants: +mpi
ncurses:
require: +termlib ldflags=-Wl,--undefined-version
tbb:
require: "intel-tbb"
binutils:
variants: +ld +gold +headers +libiberty ~nls
boost:
variants: +python +filesystem +iostreams +system
cuda:
version: [11.7.0]
elfutils:
variants: ~nls
require: "%gcc"
@@ -40,14 +43,18 @@ spack:
variants: +fortran +hl +shared
libfabric:
variants: fabrics=sockets,tcp,udp,rxm
libunwind:
variants: +pic +xz
mgard:
require:
- "@2023-01-10:"
mpich:
variants: ~wrapperrpath
ncurses:
variants: +termlib
paraview:
# Don't build GUI support or GLX rendering for HPC/container deployments
require: "~qt ^[virtuals=gl] osmesa"
require: "@5.11 ~qt ^[virtuals=gl] osmesa"
trilinos:
require:
- one_of: [+amesos +amesos2 +anasazi +aztec +boost +epetra +epetraext +ifpack
@@ -58,6 +65,12 @@ spack:
- one_of: [~ml ~muelu ~zoltan2 ~teko, +ml +muelu +zoltan2 +teko]
- one_of: [+superlu-dist, ~superlu-dist]
- one_of: [+shylu, ~shylu]
xz:
variants: +pic
mesa:
version: [21.3.8]
unzip:
require: "%gcc"
specs:
# CPU
@@ -65,43 +78,62 @@ spack:
- aml
- arborx
- argobots
- bolt
- butterflypack
- boost +python +filesystem +iostreams +system
- cabana
- caliper
- chai
- charliecloud
- conduit
# - cp2k +mpi # libxsmm: ftn-78 ftn: ERROR in command linel; The -f option has an invalid argument, "tree-vectorize".
- datatransferkit
- flecsi
- flit
- flux-core
- fortrilinos
- ginkgo
- globalarrays
- gmp
- gotcha
- h5bench
- hdf5-vol-async
- hdf5-vol-cache cflags=-Wno-error=incompatible-function-pointer-types
- hdf5-vol-cache
- hdf5-vol-log
- heffte +fftw
- hpx max_cpu_count=512 networking=mpi
- hypre
- kokkos +openmp
- kokkos-kernels +openmp
- lammps
- legion
- libnrm
#- libpressio +bitgrooming +bzip2 ~cuda ~cusz +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf +mgard # mgard:
- libquo
- libunwind
- mercury
- metall
- mfem
# - mgard +serial +openmp +timing +unstructured ~cuda # mgard
- mpark-variant
- mpifileutils ~xattr cflags=-Wno-error=implicit-function-declaration
- mpifileutils ~xattr
- nccmp
- nco
- netlib-scalapack cflags=-Wno-error=implicit-function-declaration
- netlib-scalapack
- omega-h
- openmpi
- openpmd-api ^adios2~mgard
- papi
- papyrus
- pdt
- petsc
- plumed
- precice
- pumi
- py-h5py +mpi
- py-h5py ~mpi
- py-libensemble +mpi +nlopt
- py-petsc4py
- qthreads scheduler=distrib
- raja
- slate ~cuda
@@ -114,7 +146,8 @@ spack:
- swig@4.0.2-fortran
- sz3
- tasmanian
- trilinos +belos +ifpack2 +stokhos
- tau +mpi +python
- trilinos@13.0.1 +belos +ifpack2 +stokhos
- turbine
- umap
- umpire
@@ -124,47 +157,27 @@ spack:
# - alquimia # pflotran: petsc-3.19.4-c6pmpdtpzarytxo434zf76jqdkhdyn37/lib/petsc/conf/rules:169: material_aux.o] Error 1: fortran errors
# - amrex # disabled temporarily pending resolution of unreproducible CI failure
# - axom # axom: CMake Error at axom/sidre/cmake_install.cmake:154 (file): file INSTALL cannot find "/tmp/gitlab-runner-2/spack-stage/spack-stage-axom-0.8.1-jvol6riu34vuyqvrd5ft2gyhrxdqvf63/spack-build-jvol6ri/lib/fortran/axom_spio.mod": No such file or directory.
# - bolt # ld.lld: error: CMakeFiles/bolt-omp.dir/kmp_gsupport.cpp.o: symbol GOMP_atomic_end@@GOMP_1.0 has undefined version GOMP_1.0
# - bricks # bricks: clang-15: error: clang frontend command failed with exit code 134 (use -v to see invocation)
# - butterflypack ^netlib-scalapack cflags=-Wno-error=implicit-function-declaration # ftn-2116 ftn: INTERNAL "driver" was terminated due to receipt of signal 01: Hangup.
# - caliper # papi: papi_internal.c:124:3: error: use of undeclared identifier '_papi_hwi_my_thread'; did you mean '_papi_hwi_read'?
# - charliecloud # libxcrypt-4.4.35: ld.lld: error: version script assignment of 'XCRYPT_2.0' to symbol 'xcrypt_r' failed: symbol not defined
# - cp2k +mpi # libxsmm: ftn-78 ftn: ERROR in command linel; The -f option has an invalid argument, "tree-vectorize".
# - dealii # llvm@14.0.6: ?; intel-tbb@2020.3: clang-15: error: unknown argument: '-flifetime-dse=1'; assimp@5.2.5: clang-15: error: clang frontend command failed with exit code 134 (use -v to see invocation)
# - dyninst # requires %gcc
# - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc ~visit +vtkm +zfp ^hdf5@1.14 # llvm@14.0.6: ?;
# - exaworks # rust: ld.lld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC'; defined in /opt/cray/pe/cce/15.0.1/cce/x86_64/lib/no_mmap.o, referenced by /opt/cray/pe/cce/15.0.1/cce/x86_64/lib/no_mmap.o:(__no_mmap_for_malloc)
# - flux-core # libxcrypt-4.4.35: ld.lld: error: version script assignment of 'XCRYPT_2.0' to symbol 'xcrypt_r' failed: symbol not defined
# - fortrilinos # trilinos-14.0.0: packages/teuchos/core/src/Teuchos_BigUIntDecl.hpp:67:8: error: no type named 'uint32_t' in namespace 'std'
# - gasnet # configure error: User requested --enable-ofi but I don't know how to build ofi programs for your system
# - gptune # py-scipy: meson.build:82:0: ERROR: Unknown compiler(s): [['/home/gitlab-runner-3/builds/dWfnZWPh/0/spack/spack/lib/spack/env/cce/ftn']]
# - hpctoolkit # dyninst requires %gcc
# - hpx max_cpu_count=512 networking=mpi # libxcrypt-4.4.35
# - lammps # lammps-20240829.1: Reversed (or previously applied) patch detected! Assume -R? [n]
# - libpressio +bitgrooming +bzip2 ~cuda ~cusz +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf +mgard # mgard:
# - mgard +serial +openmp +timing +unstructured ~cuda # mgard
# - nrm # py-scipy: meson.build:82:0: ERROR: Unknown compiler(s): [['/home/gitlab-runner-3/builds/dWfnZWPh/0/spack/spack/lib/spack/env/cce/ftn']]
# - nvhpc # requires %gcc
# - omega-h # trilinos-13.4.1: packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp:112:48: error: unknown type name 'uint32_t'
# - openmpi # libxcrypt-4.4.35: ld.lld: error: version script assignment of 'XCRYPT_2.0' to symbol 'xcrypt_r' failed: symbol not defined
# - papi # papi_internal.c:124:3: error: use of undeclared identifier '_papi_hwi_my_thread'; did you mean '_papi_hwi_read'?
# - parsec ~cuda # parsec: parsec/fortran/CMakeFiles/parsec_fortran.dir/parsecf.F90.o: ftn-2103 ftn: WARNING in command line. The -W extra option is not supported or invalid and will be ignored.
# - phist # fortran_bindings/CMakeFiles/phist_fort.dir/phist_testing.F90.o: ftn-78 ftn: ERROR in command line. The -f option has an invalid argument, "no-math-errno".
# - plasma # %cce conflict
# - plumed # libxcrypt-4.4.35: ld.lld: error: version script assignment of 'XCRYPT_2.0' to symbol 'xcrypt_r' failed: symbol not defined
# - py-h5py +mpi # libxcrypt-4.4.35: ld.lld: error: version script assignment of 'XCRYPT_2.0' to symbol 'xcrypt_r' failed: symbol not defined
# - py-h5py ~mpi # libxcrypt-4.4.35: ld.lld: error: version script assignment of 'XCRYPT_2.0' to symbol 'xcrypt_r' failed: symbol not defined
# - py-jupyterhub # rust: ld.lld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC'; defined in /opt/cray/pe/cce/15.0.1/cce/x86_64/lib/no_mmap.o, referenced by /opt/cray/pe/cce/15.0.1/cce/x86_64/lib/no_mmap.o:(__no_mmap_for_malloc)
# - py-libensemble +mpi +nlopt # libxcrypt-4.4.35: ld.lld: error: version script assignment of 'XCRYPT_2.0' to symbol 'xcrypt_r' failed: symbol not defined
# - py-petsc4py # libxcrypt-4.4.35: ld.lld: error: version script assignment of 'XCRYPT_2.0' to symbol 'xcrypt_r' failed: symbol not defined
# - quantum-espresso # quantum-espresso: CMake Error at cmake/FindSCALAPACK.cmake:503 (message): A required library with SCALAPACK API not found. Please specify library
# - scr # scr: make[2]: *** [examples/CMakeFiles/test_ckpt_F.dir/build.make:112: examples/test_ckpt_F] Error 1: /opt/cray/pe/cce/15.0.1/binutils/x86_64/x86_64-pc-linux-gnu/bin/ld: /opt/cray/pe/mpich/8.1.25/ofi/cray/10.0/lib/libmpi_cray.so: undefined reference to `PMI_Barrier'
# - strumpack ~slate # strumpack: [test/CMakeFiles/test_HSS_seq.dir/build.make:117: test/test_HSS_seq] Error 1: ld.lld: error: undefined reference due to --no-allow-shlib-undefined: mpi_abort_
# - tau +mpi +python # libelf: configure: error: installation or configuration problem: C compiler cannot create executables.; papi: papi_internal.c:124:3: error: use of undeclared identifier '_papi_hwi_my_thread'; did you mean '_papi_hwi_read'?
# - upcxx # upcxx: configure error: User requested --enable-ofi but I don't know how to build ofi programs for your system
# - variorum # variorum: /opt/cray/pe/cce/15.0.1/binutils/x86_64/x86_64-pc-linux-gnu/bin/ld: /opt/cray/pe/lib64/libpals.so.0: undefined reference to `json_array_append_new@@libjansson.so.4'
# - warpx +python # py-scipy: meson.build:82:0: ERROR: Unknown compiler(s): [['/home/gitlab-runner-3/builds/dWfnZWPh/0/spack/spack/lib/spack/env/cce/ftn']]
# - xyce +mpi +shared +pymi +pymi_static_tpls ^trilinos~shylu # openblas: ftn-2307 ftn: ERROR in command line: The "-m" option must be followed by 0, 1, 2, 3 or 4.; make[2]: *** [<builtin>: spotrf2.o] Error 1; make[1]: *** [Makefile:27: lapacklib] Error 2; make: *** [Makefile:250: netlib] Error 2
# - warpx +python # py-scipy: meson.build:82:0: ERROR: Unknown compiler(s): [['/home/gitlab-runner-3/builds/dWfnZWPh/0/spack/spack/lib/spack/env/cce/ftn']]
cdash:
build-group: E4S Cray

View File

@@ -31,7 +31,6 @@ spack:
specs:
# CPU
- acts +analysis +dd4hep +edm4hep +examples +fatras +geant4 +hepmc3 +podio +pythia8 +python +tgeo cxxstd=20
- celeritas +geant4 +hepmc3 +openmp +root +shared +vecgeom cxxstd=20
- dd4hep +ddalign +ddcad +ddcond +dddetectors +dddigi +ddeve +ddg4 +ddrec +edm4hep +hepmc3 +lcio +utilityapps +xercesc
- delphes +pythia8
- edm4hep

View File

@@ -1,4 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
applications/Allwmake $targetType $*

View File

@@ -1,9 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
wmake $targetType solvers/additiveFoam/functionObjects/ExaCA
wmake $targetType solvers/additiveFoam/movingHeatSource
wmake $targetType solvers/additiveFoam

View File

@@ -2,14 +2,10 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import inspect
import os
import llnl.util.tty as tty
import spack.pkg.builtin.openfoam as openfoam
from spack.package import *
from spack.version import Version
from spack.pkg.builtin.openfoam import add_extra_files
class Additivefoam(Package):
@@ -33,36 +29,14 @@ class Additivefoam(Package):
depends_on("openfoam-org@10")
common = ["spack-derived-Allwmake"]
assets = [join_path("applications", "Allwmake"), "Allwmake"]
assets = ["applications/Allwmake", "Allwmake"]
build_script = "./spack-derived-Allwmake"
phases = ["configure", "build", "install"]
def add_extra_files(self, common, local_prefix, local):
"""Copy additional common and local files into the stage.source_path
from the openfoam/common and the package/assets directories,
respectively. Modified from `spack.pkg.builtin.openfoam.add_extra_files()`.
"""
outdir = self.stage.source_path
indir = join_path(os.path.dirname(inspect.getfile(openfoam)), "common")
for f in common:
tty.info("Added file {0}".format(f))
openfoam.install(join_path(indir, f), join_path(outdir, f))
indir = join_path(self.package_dir, "assets", local_prefix)
for f in local:
tty.info("Added file {0}".format(f))
openfoam.install(join_path(indir, f), join_path(outdir, f))
def patch(self):
spec = self.spec
asset_dir = ""
if Version("main") in spec.versions:
asset_dir = "assets_main"
elif Version("1.0.0") in spec.versions:
asset_dir = "assets_1.0.0"
self.add_extra_files(self.common, asset_dir, self.assets)
add_extra_files(self, self.common, self.assets)
def configure(self, spec, prefix):
pass

View File

@@ -12,8 +12,8 @@ class Alpgen(CMakePackage, MakefilePackage):
in hadronic collisions.
"""
homepage = "https://alpgen.web.cern.ch/"
url = "https://alpgen.web.cern.ch/V2.1/v214.tgz"
homepage = "http://mlm.home.cern.ch/mlm/alpgen/"
url = "http://mlm.home.cern.ch/mlm/alpgen/V2.1/v214.tgz"
tags = ["hep"]

View File

@@ -2,47 +2,34 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import spack.build_systems.autotools
import spack.build_systems.meson
from spack.package import *
class Cairo(MesonPackage, AutotoolsPackage):
class Cairo(AutotoolsPackage):
"""Cairo is a 2D graphics library with support for multiple output
devices."""
homepage = "https://www.cairographics.org/"
url = "https://www.cairographics.org/releases/cairo-1.16.0.tar.xz"
git = "https://gitlab.freedesktop.org/cairo/cairo.git"
license("LGPL-2.1-or-later OR MPL-1.1", checked_by="tgamblin")
# Cairo has meson.build @1.17.4:, but we only support @1.17.8: here
build_system(
conditional("autotools", when="@:1.17.6"),
conditional("meson", when="@1.17.8:"),
default="meson",
)
version("1.18.2", sha256="a62b9bb42425e844cc3d6ddde043ff39dbabedd1542eba57a2eb79f85889d45a")
version("1.18.0", sha256="243a0736b978a33dee29f9cca7521733b78a65b5418206fef7bd1c3d4cf10b64")
# 1.17.8: https://gitlab.freedesktop.org/cairo/cairo/-/issues/646 (we enable tee by default)
version(
"1.17.6",
sha256="4eebc4c2bad0402bc3f501db184417094657d111fb6c06f076a82ea191fe1faf",
url="https://cairographics.org/snapshots/cairo-1.17.6.tar.xz",
)
version(
"1.17.4",
sha256="74b24c1ed436bbe87499179a3b27c43f4143b8676d8ad237a6fa787401959705",
url="https://cairographics.org/snapshots/cairo-1.17.4.tar.xz",
)
) # Snapshot
version(
"1.17.2",
sha256="6b70d4655e2a47a22b101c666f4b29ba746eda4aa8a0f7255b32b2e9408801df",
url="https://cairographics.org/snapshots/cairo-1.17.2.tar.xz",
) # Snapshot
version(
"1.16.0",
sha256="5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331",
preferred=True,
)
version("1.16.0", sha256="5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331")
version("1.14.12", sha256="8c90f00c500b2299c0a323dd9beead2a00353752b2092ead558139bd67f7bf16")
version("1.14.8", sha256="d1f2d98ae9a4111564f6de4e013d639cf77155baf2556582295a0f00a9bc5e20")
version("1.14.0", sha256="2cf5f81432e77ea4359af9dcd0f4faf37d015934501391c311bfd2d19a0134b7")
@@ -60,15 +47,6 @@ class Cairo(MesonPackage, AutotoolsPackage):
variant("shared", default=True, description="Build shared libraries")
variant("pic", default=True, description="Enable position-independent code (PIC)")
with when("build_system=autotools"):
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
with when("build_system=meson"):
depends_on("meson@0.59:")
depends_on("libx11", when="+X")
depends_on("libxext", when="+X")
depends_on("libxrender", when="+X")
@@ -76,21 +54,16 @@ class Cairo(MesonPackage, AutotoolsPackage):
depends_on("python", when="+X", type="build")
depends_on("libpng", when="+png")
depends_on("glib")
depends_on("pixman@0.40.0:", when="@1.18.2:")
depends_on("pixman@0.36.0:", when="@1.17.2:")
depends_on("pixman")
depends_on("automake", type="build")
depends_on("autoconf", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
depends_on("freetype build_system=autotools", when="+ft")
# Require freetype with FT_Color
# https://gitlab.freedesktop.org/cairo/cairo/-/issues/792
depends_on("freetype@2.10:", when="@1.18.0: +ft")
depends_on("pkgconfig", type="build")
depends_on("fontconfig@2.10.91:", when="+fc") # Require newer version of fontconfig.
depends_on("which", type="build")
depends_on("zlib", when="+pdf")
# lzo is not strictly required, but cannot be disabled and may be pulled in accidentally
# https://github.com/mesonbuild/meson/issues/8224
# https://github.com/microsoft/vcpkg/pull/38313
depends_on("lzo", when="@1.18: build_system=meson")
conflicts("+png", when="platform=darwin")
conflicts("+svg", when="platform=darwin")
@@ -98,37 +71,10 @@ class Cairo(MesonPackage, AutotoolsPackage):
# patch from https://gitlab.freedesktop.org/cairo/cairo/issues/346
patch("fontconfig.patch", when="@1.16.0:1.17.2")
# Patch autogen.sh to not regenerate docs to avoid a dependency on gtk-doc
patch("disable-gtk-docs.patch", when="build_system=autotools ^autoconf@2.70:")
# Don't regenerate docs to avoid a dependency on gtk-doc
patch("disable-gtk-docs.patch", when="^autoconf@2.70:")
def check(self):
"""The checks are only for the cairo devs: They write others shouldn't bother"""
pass
class MesonBuilder(spack.build_systems.meson.MesonBuilder):
def meson_args(self):
args = ["-Dtee=enabled"]
if "+X" in self.spec:
args.extend(["-Dxlib=enabled", "-Dxcb=enabled"])
else:
args.extend(["-Dxlib=disabled", "-Dxcb=disabled"])
args.append("-Dzlib=" + ("enabled" if "+pdf" in self.spec else "disabled"))
args.append(
"-Dpng=" + ("enabled" if ("+png" in self.spec or "+svg" in self.spec) else "disabled")
)
args.append("-Dfreetype=" + ("enabled" if "+ft" in self.spec else "disabled"))
args.append("-Dfontconfig=" + ("enabled" if "+fc" in self.spec else "disabled"))
args.append("-Ddefault_library=" + ("shared" if "+shared" in self.spec else "static"))
args.append("-Db_staticpic=" + ("true" if "+pic" in self.spec else "false"))
return args
class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
def autoreconf(self, pkg, spec, prefix):
def autoreconf(self, spec, prefix):
# Regenerate, directing the script *not* to call configure before Spack
# does
which("sh")("./autogen.sh", extra_env={"NOCONFIGURE": "1"})
@@ -156,3 +102,7 @@ def configure_args(self):
args.append(f"LIBS={libs}")
return args
def check(self):
"""The checks are only for the cairo devs: They write others shouldn't bother"""
pass

View File

@@ -90,8 +90,6 @@ class Edm4hep(CMakePackage):
# Corresponding changes in EDM4hep landed with https://github.com/key4hep/EDM4hep/pull/314
extends("python", when="@0.10.6:")
conflicts("%clang@:16", when="@0.99.1:", msg="Incomplete consteval support in clang")
def cmake_args(self):
args = [
self.define_from_variant("CMAKE_CXX_STANDARD", "cxxstd"),

View File

@@ -16,20 +16,24 @@ class Evtgen(CMakePackage):
maintainers("vvolkl")
version("02.02.03", sha256="b642700b703190e3304edb98ff464622db5d03c1cfc5d275ba4a628227d7d6d0")
version("02.02.02", sha256="e543d1213cd5003124139d0dc7eee9247b0b9d44154ff8a88bac52ba91c5dfc9")
version("02.02.01", sha256="1fcae56c6b27b89c4a2f4b224d27980607442185f5570e961f6334a3543c6e77")
version("02.02.00", sha256="0c626e51cb17e799ad0ffd0beea5cb94d7ac8a5f8777b746aa1944dd26071ecf")
version("02.00.00", sha256="02372308e1261b8369d10538a3aa65fe60728ab343fcb64b224dac7313deb719")
# switched to cmake in 02.00.00
version(
"01.07.00",
sha256="2648f1e2be5f11568d589d2079f22f589c283a2960390bbdb8d9d7f71bc9c014",
deprecated=True,
)
depends_on("cxx", type="build") # generated
variant("pythia8", default=True, description="Build with pythia8")
variant("tauola", default=False, description="Build with tauola")
variant("photos", default=False, description="Build with photos")
variant("sherpa", default=False, description="build with sherpa")
variant("hepmc3", default=False, description="Link with hepmc3 (instead of hepmc)")
patch("g2c.patch", when="@01.07.00")
patch("evtgen-2.0.0.patch", when="@02.00.00 ^pythia8@8.304:")
depends_on("hepmc", when="~hepmc3")
@@ -40,8 +44,6 @@ class Evtgen(CMakePackage):
depends_on("photos~hepmc3", when="+photos~hepmc3")
depends_on("tauola+hepmc3", when="+tauola+hepmc3")
depends_on("photos+hepmc3", when="+photos+hepmc3")
depends_on("sherpa@2:", when="@02.02.01: +sherpa")
depends_on("sherpa@:2", when="@:02 +sherpa")
conflicts(
"^pythia8+evtgen",
@@ -51,6 +53,7 @@ class Evtgen(CMakePackage):
"that cannot be resolved at the moment! "
"Use evtgen+pythia8^pythia8~evtgen.",
)
conflicts("+hepmc3", when="@:01", msg="hepmc3 support was added in 02.00.00")
@property
def root_cmakelists_dir(self):
@@ -68,7 +71,6 @@ def cmake_args(self):
args.append(self.define_from_variant("EVTGEN_PYTHIA", "pythia8"))
args.append(self.define_from_variant("EVTGEN_TAUOLA", "tauola"))
args.append(self.define_from_variant("EVTGEN_PHOTOS", "photos"))
args.append(self.define_from_variant("EVTGEN_SHERPA", "sherpa"))
args.append(self.define_from_variant("EVTGEN_HEPMC3", "hepmc3"))
return args
@@ -83,5 +85,50 @@ def patch(self):
filter_file("-shared", "-dynamiclib -undefined dynamic_lookup", "make.inc")
# Taken from AutotoolsPackage
def configure(self, spec, prefix):
"""Runs configure with the arguments specified in
:py:meth:`~.AutotoolsPackage.configure_args`
and an appropriately set prefix.
"""
options = getattr(self, "configure_flag_args", [])
options += ["--prefix={0}".format(prefix)]
options += self.configure_args()
with working_dir(self.build_directory, create=True):
configure(*options)
@when("@:01")
def configure_args(self):
args = []
args.append("--hepmcdir=%s" % self.spec["hepmc"].prefix)
if self.spec.satisfies("+pythia8"):
args.append("--pythiadir=%s" % self.spec["pythia8"].prefix)
if self.spec.satisfies("+photos"):
args.append("--photosdir=%s" % self.spec["photos"].prefix)
if self.spec.satisfies("+tauola"):
args.append("--tauoladir=%s" % self.spec["tauola"].prefix)
return args
@when("@:01")
def cmake(self, spec, prefix):
pass
@when("@:01")
def build(self, spec, prefix):
self.configure(spec, prefix)
# avoid parallel compilation errors
# due to libext_shared depending on lib_shared
with working_dir(self.build_directory):
make("lib_shared")
make("all")
@when("@:01")
def install(self, spec, prefix):
with working_dir(self.build_directory):
make("install")
def setup_run_environment(self, env):
env.set("EVTGEN", self.prefix.share)

View File

@@ -56,6 +56,8 @@ class Geant4Data(BundlePackage):
"g4incl@1.2",
"g4ensdfstate@3.0",
"g4channeling@1.0",
"g4nudexlib@1.0",
"g4urrpt@1.1",
],
"11.2.2:11.2": [
"g4ndl@4.7.1",
@@ -193,23 +195,6 @@ class Geant4Data(BundlePackage):
for _d in _dsets:
depends_on(_d, type=("build", "run"), when=_vers)
_datasets_tendl = {
"11.0:11.3": "g4tendl@1.4",
"10.4:10.7": "g4tendl@1.3.2",
"10.3:10.3": "g4tendl@1.3",
}
variant("tendl", default=True, when="@10.3:", description="Enable G4TENDL")
with when("+tendl"):
for _vers, _d in _datasets_tendl.items():
depends_on(_d, type=("build", "run"), when="@" + _vers)
variant("nudexlib", default=True, when="@11.3.0:11.3", description="Enable G4NUDEXLIB")
with when("+nudexlib"):
depends_on("g4nudexlib@1.0", type=("build", "run"))
variant("urrpt", default=True, when="@11.3.0:11.3", description="Enable G4URRPT")
with when("+urrpt"):
depends_on("g4urrpt@1.1", type=("build", "run"))
@property
def datadir(self):
spec = self.spec

View File

@@ -1,26 +0,0 @@
diff --git a/source/g3tog4/include/G3EleTable.hh b/source/g3tog4/include/G3EleTable.hh
index 0ab9c4fd566..18c6f73fde6 100644
--- a/source/g3tog4/include/G3EleTable.hh
+++ b/source/g3tog4/include/G3EleTable.hh
@@ -56,7 +56,7 @@ public: // with description
private:
void LoadUp();
- G4int parse(G4double& Z, char* name, char* sym, G4double& A);
+ G4int parse(G4double& Z, char (&name)[20], char (&sym)[3], G4double& A);
private:
diff --git a/source/g3tog4/src/G3EleTable.cc b/source/g3tog4/src/G3EleTable.cc
index cecc494b201..a2f3af3d6a2 100644
--- a/source/g3tog4/src/G3EleTable.cc
+++ b/source/g3tog4/src/G3EleTable.cc
@@ -64,7 +64,7 @@ G3EleTable::GetEle(G4double Z){
}
G4int
-G3EleTable::parse(G4double& Z, char* name, char* sym, G4double& A){
+G3EleTable::parse(G4double& Z, char (&name)[20], char (&sym)[3], G4double& A){
G4int rc = 0;
if (Z>0 && Z <=_MaxEle){
G4int z = (G4int) Z-1;

View File

@@ -20,7 +20,6 @@ class Geant4(CMakePackage):
executables = ["^geant4-config$"]
maintainers("drbenmorgan", "sethrj")
version("11.3.0", sha256="d9d71daff8890a7b5e0e33ea9a65fe6308ad6713000b43ba6705af77078e7ead")
version("11.2.2", sha256="3a8d98c63fc52578f6ebf166d7dffaec36256a186d57f2520c39790367700c8d")
version("11.2.1", sha256="76c9093b01128ee2b45a6f4020a1bcb64d2a8141386dea4674b5ae28bcd23293")
@@ -204,30 +203,29 @@ def std_when(values):
depends_on("qt@5.9:", when="@11.2:")
conflicts("@:11.1 ^[virtuals=qmake] qt-base", msg="Qt6 not supported before 11.2")
# CMAKE PROBLEMS #
# 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-11.patch", when="@11:11.2.2")
patch("columns-10.patch", when="@10.4:10")
# As released, 10.03.03 has issues with respect to using external
# CLHEP.
patch("CLHEP-10.03.03.patch", level=1, when="@10.3")
# Build failure on clang 15, ubuntu 22: see Geant4 problem report #2444
# fixed by ascii-V10-07-03
patch("geant4-10.6.patch", when="@10.0:10.6")
# Enable "17" cxxstd option in CMake (2 different filenames)
patch("geant4-10.3-cxx17-cmake.patch", when="@10.3 cxxstd=17")
patch("geant4-10.4-cxx17-cmake.patch", when="@10.4:10.4.2 cxxstd=17")
# Fix exported cmake: https://bugzilla-geant4.kek.jp/show_bug.cgi?id=2556
patch("package-cache.patch", when="@10.7.0:11.1.2^cmake@3.17:")
patch("geant4-10.6.patch", level=1, when="@10.0:10.6")
# These patches can be applied independent of the cxxstd value?
patch("cxx17.patch", when="@10.3 cxxstd=17")
patch("cxx17_geant4_10_0.patch", level=1, when="@10.4.0 cxxstd=17")
patch("geant4-10.4.3-cxx17-removed-features.patch", level=1, when="@10.4.3 cxxstd=17")
# BUILD ERRORS #
# Fix C++17: add -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES C++ flag
patch("geant4-10.4.3-cxx17-removed-features.patch", when="@10.4.3 cxxstd=17")
# Fix C++20: build error due to removed-in-C++20 `ostream::operator>>(char*)`
# (different, simpler approach than upstream Geant4 changes)
patch("geant4-10.7-cxx20-g3tog4.patch", when="@:10.7 cxxstd=20")
# Fix member field typo in g4tools wroot: https://bugzilla-geant4.kek.jp/show_bug.cgi?id=2640
patch("columns-10.patch", when="@10.4:10")
patch("columns-11.patch", when="@11:11.2.2")
# Fix navigation errors with twisted tubes: https://bugzilla-geant4.kek.jp/show_bug.cgi?id=2619
patch("twisted-tubes.patch", when="@11.2.0:11.2.2")
# See https://bugzilla-geant4.kek.jp/show_bug.cgi?id=2556
patch("package-cache.patch", level=1, when="@10.7.0:11.1.2^cmake@3.17:")
# Issue with Twisted tubes, see https://bugzilla-geant4.kek.jp/show_bug.cgi?id=2619
patch("twisted-tubes.patch", level=1, when="@11.2.0:11.2.2")
# NVHPC: "thread-local declaration follows non-thread-local declaration"
conflicts("%nvhpc", when="+threads")

View File

@@ -58,20 +58,6 @@ def build_args(self):
args.extend(["-trimpath", "./cmd/gh"])
return args
@property
def check_args(self):
args = super().check_args
skip_tests = (
"TestHasNoActiveToken|TestTokenStoredIn.*|"
"TestSwitchUser.*|TestSwitchClears.*|"
"TestTokenWorksRightAfterMigration|"
"Test_loginRun.*|Test_logoutRun.*|Test_refreshRun.*|"
"Test_setupGitRun.*|Test_CheckAuth|TestSwitchRun.*|"
"Test_statusRun.*|TestTokenRun.*"
)
args.extend([f"-skip={skip_tests}", "./..."])
return args
@run_after("install")
def install_completions(self):
gh = Executable(self.prefix.bin.gh)

View File

@@ -35,10 +35,6 @@ class Herwig3(AutotoolsPackage):
depends_on("thepeg@2.2.3", when="@7.2.3")
depends_on("thepeg@2.3.0", when="@7.3.0")
depends_on("evtgen")
conflicts(
"^evtgen ~photos ~pythia8 ~sherpa ~tauola",
msg="At least one external EvtGen component required",
)
depends_on("boost +math+test")
depends_on("python", type=("build", "run"))

View File

@@ -17,7 +17,6 @@ class Hevea(MakefilePackage):
license("LGPL-2.0-only")
version("develop", branch="master")
version("2.36", sha256="9848359f935af24b6f962b2ed5d5ac32614bffeb37da374b0960cc0f58e69f0c")
version("2.35", sha256="78f834cc7a8112ec59d0b8acdfbed0c8ac7dbb85f964d0be1f4eed04f25cdf54")
version("2.34", sha256="f505a2a5bafdc2ea389ec521876844e6fdcb5c1b656396b7e8421c1631469ea2")
version("2.33", sha256="122f9023f9cfe8b41dd8965b7d9669df21bf41e419bcf5e9de5314f428380d0f")
@@ -28,8 +27,6 @@ class Hevea(MakefilePackage):
# Dependency demands ocamlbuild
depends_on("ocaml")
depends_on("ocamlbuild")
depends_on("ocaml@4", when="@:2.35")
depends_on("ocaml@4.08.0:", when="@2.34:")
def edit(self, spec, prefix):
env["PREFIX"] = self.spec.prefix

View File

@@ -28,7 +28,6 @@ def url_for_version(self, version):
license("MIT")
version("2.13.5", sha256="74fc163217a3964257d3be39af943e08861263c4231f9ef5b496b6f6d4c7b2b6")
version("2.13.4", sha256="65d042e1c8010243e617efb02afda20b85c2160acdbfbcb5b26b80cec6515650")
version("2.12.9", sha256="59912db536ab56a3996489ea0299768c7bcffe57169f0235e7f962a91f483590")
version("2.11.9", sha256="780157a1efdb57188ec474dca87acaee67a3a839c2525b2214d318228451809f")
@@ -66,7 +65,6 @@ def url_for_version(self, version):
depends_on("c", type="build")
variant("http", default=False, description="Enable HTTP support")
variant("python", default=False, description="Enable Python support")
variant("shared", default=True, description="Build shared library")
variant("pic", default=True, description="Enable position-independent code (PIC)")
@@ -253,8 +251,6 @@ def configure_args(self):
else:
args.append("--without-python")
args.extend(self.with_or_without("http"))
args.extend(self.enable_or_disable("shared"))
# PIC setting is taken care of above by self.flag_handler()
args.append("--without-pic")
@@ -298,6 +294,4 @@ def configure(self, pkg, spec, prefix):
]
if spec.satisfies("+python"):
opts.append("python=yes")
if spec.satisfies("+http"):
opts.append("http=yes")
cscript("configure.js", *opts)

View File

@@ -10,30 +10,27 @@ class Neko(AutotoolsPackage, CudaPackage, ROCmPackage):
for high-fidelity computational fluid dynamics
"""
homepage = "https://neko.cfd"
homepage = "https://github.com/ExtremeFLOW/neko"
git = "https://github.com/ExtremeFLOW/neko.git"
url = "https://github.com/ExtremeFLOW/neko/releases/download/v0.3.2/neko-0.3.2.tar.gz"
maintainers("njansson")
version("develop", branch="develop")
version("0.9.1", sha256="098bee5cb807d10cdf2fb56111ba8cbc592882a87e4dae18caf9dbda894611ef")
version("0.9.0", sha256="3cffe629ada1631d8774fa51d8bb14b95dc0cea21578c0e07e70deb611a5091a")
version("0.8.1", sha256="ac8162bc18e7112fd21b49c5a9c36f45c7b84896e90738be36a182990798baec")
version("0.8.0", sha256="09d0b253c8abda9f384bf8f03b17b50d774cb0a1f7b72744a8e863acac516a51")
version("0.7.2", sha256="5dd17fbae83d0b26dc46fafce4e5444be679cdce9493cef4ff7d504e2f854254")
version("0.7.1", sha256="c935c3d93b0975db46448045f97aced6ac2cab31a2b8803047f8086f98dcb981")
version("0.7.0", sha256="fe871e0a79f388073e0b3dc191d1c0d5da3a53883f5b1951d88b9423fc79a53c")
with default_args(deprecated=True):
version("0.6.1", sha256="6282baaf9c8a201669e274cba23c37922f7ad701ba20ef086442e48f00dabf29")
version("0.6.0", sha256="ce37c7cea1a7bf1bf554c5717aa7fed35bbd079ff68c2fc9d3529facc717e31a")
version("0.5.2", sha256="8873f5ada106f92f21c9bb13ea8164550bccde9301589b9e7f1c1a82a2efe2b8")
version("0.5.1", sha256="8b176bcc9f2d4a6804b68dd93a2f5e02e2dfa986d5c88063bbc72d39e9659cc4")
version("0.5.0", sha256="01a745f2e19dd278330889a0dd6c5ab8af49da99c888d95c10adb5accc1cbfc4")
version("0.4.3", sha256="ba8fde09cbc052bb4791a03f69c880705615b572982cd3177ee31e4e14931da2")
version("0.4.2", sha256="927f926bdbf027c30e8e383e1790e84b60f5a9ed61e48a413092aac2ab24abcc")
version("0.3.2", sha256="0628910aa9838a414f2f27d09ea9474d1b3d7dcb5a7715556049a2fdf81a71ae")
version("0.3.0", sha256="e46bef72f694e59945514ab8b1ad7d74f87ec9dca2ba2b230e2148662baefdc8")
version("0.6.1", sha256="6282baaf9c8a201669e274cba23c37922f7ad701ba20ef086442e48f00dabf29")
version("0.6.0", sha256="ce37c7cea1a7bf1bf554c5717aa7fed35bbd079ff68c2fc9d3529facc717e31a")
version("0.5.2", sha256="8873f5ada106f92f21c9bb13ea8164550bccde9301589b9e7f1c1a82a2efe2b8")
version("0.5.1", sha256="8b176bcc9f2d4a6804b68dd93a2f5e02e2dfa986d5c88063bbc72d39e9659cc4")
version("0.5.0", sha256="01a745f2e19dd278330889a0dd6c5ab8af49da99c888d95c10adb5accc1cbfc4")
version("0.4.3", sha256="ba8fde09cbc052bb4791a03f69c880705615b572982cd3177ee31e4e14931da2")
version("0.4.2", sha256="927f926bdbf027c30e8e383e1790e84b60f5a9ed61e48a413092aac2ab24abcc")
version("0.3.2", sha256="0628910aa9838a414f2f27d09ea9474d1b3d7dcb5a7715556049a2fdf81a71ae")
version("0.3.0", sha256="e46bef72f694e59945514ab8b1ad7d74f87ec9dca2ba2b230e2148662baefdc8")
version("develop", branch="develop")
depends_on("c", type="build") # generated
depends_on("fortran", type="build") # generated

View File

@@ -36,27 +36,13 @@ class Ninja(Package):
version("1.7.2", sha256="2edda0a5421ace3cf428309211270772dd35a91af60c96f93f90df6bc41b16d9")
version("1.6.0", sha256="b43e88fb068fe4d92a3dfd9eb4d19755dae5c33415db2e9b7b61b4659009cde7")
# ninja@1.12: needs googletest source, but 1.12 itself needs a patch to use it
resource(
name="googletest",
url="https://github.com/google/googletest/archive/refs/tags/release-1.12.1.tar.gz",
sha256="81964fe578e9bd7c94dfdb09c8e4d6e6759e19967e397dbea48d1c10e45d0df2",
placement="gtest",
when="@1.12:",
)
patch(
"https://github.com/ninja-build/ninja/commit/f14a949534d673f847c407644441c8f37e130ce9.patch?full_index=1",
sha256="93f4bb3234c3af04e2454c6f0ef2eca3107edd4537a70151ea66f1a1d4c22dad",
when="@1.12",
)
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
variant(
"re2c", default=not sys.platform == "win32", description="Enable buidling Ninja with re2c"
)
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
depends_on("python", type="build")
depends_on("re2c@0.11.3:", type="build", when="+re2c")
@@ -68,10 +54,7 @@ def determine_version(cls, exe):
return output.strip()
def configure(self, spec, prefix):
if self.run_tests and spec.satisfies("@1.12:"):
python("configure.py", "--bootstrap", "--gtest-source-dir=gtest")
else:
python("configure.py", "--bootstrap")
python("configure.py", "--bootstrap")
@run_after("configure")
@on_package_attributes(run_tests=True)

View File

@@ -20,17 +20,11 @@ class Ocamlbuild(MakefilePackage):
# Add proper versions here.
version("master", branch="master")
version("0.15.0", sha256="d3f6ee73100b575d4810247d10ed8f53fccef4e90daf0e4a4c5f3e6a3030a9c9")
version("0.14.3", sha256="ce151bfd2141abc6ee0b3f25ba609e989ff564a48bf795d6fa7138a4db0fc2e1")
version("0.14.2", sha256="62d2dab6037794c702a83ac584a7066d018cf1645370d1f3d5764c2b458791b1")
version("0.14.1", sha256="4e1279ff0ef80c862eaa5207a77020d741e89ef94f0e4a92a37c4188dbf08256")
version("0.14.0", sha256="87b29ce96958096c0a1a8eeafeb6268077b2d11e1bf2b3de0f5ebc9cf8d42e78")
version("0.13.1", sha256="79839544bcaebc8f9f0d73d029e2b67e2c898bba046c559ea53de81ea763408c")
# Add dependencies if required.
depends_on("ocaml")
depends_on("ocaml@:5.0.0", when="@:0.14.1")
depends_on("ocaml@:5.1.1", when="@:0.14.2")
# Installation : https://github.com/ocaml/ocamlbuild/
def edit(self, spec, prefix):

View File

@@ -32,7 +32,6 @@ class Openmpi(AutotoolsPackage, CudaPackage):
url = "https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.0.tar.bz2"
list_url = "https://www.open-mpi.org/software/ompi/"
git = "https://github.com/open-mpi/ompi.git"
cxxname = "mpic++"
maintainers("hppritcha", "naughtont3")
@@ -886,7 +885,7 @@ def setup_run_environment(self, env):
# Because MPI is both a runtime and a compiler, we have to setup the
# compiler components as part of the run environment.
env.set("MPICC", join_path(self.prefix.bin, "mpicc"))
env.set("MPICXX", join_path(self.prefix.bin, self.cxxname))
env.set("MPICXX", join_path(self.prefix.bin, "mpic++"))
env.set("MPIF77", join_path(self.prefix.bin, "mpif77"))
env.set("MPIF90", join_path(self.prefix.bin, "mpif90"))
# Open MPI also has had mpifort since v1.7, so we can set MPIFC to that
@@ -928,7 +927,7 @@ def setup_dependent_build_environment(self, env, dependent_spec):
def setup_dependent_package(self, module, dependent_spec):
self.spec.mpicc = join_path(self.prefix.bin, "mpicc")
self.spec.mpicxx = join_path(self.prefix.bin, self.cxxname)
self.spec.mpicxx = join_path(self.prefix.bin, "mpic++")
self.spec.mpifc = join_path(self.prefix.bin, "mpif90")
self.spec.mpif77 = join_path(self.prefix.bin, "mpif77")

View File

@@ -14,10 +14,6 @@ class Podman(Package):
license("Apache-2.0")
version("4.9.3", sha256="37afc5bba2738c68dc24400893b99226c658cc9a2b22309f4d7abe7225d8c437")
version("4.8.3", sha256="3a99b6c82644fa52929cf4143943c63d6784c84094892bc0e14197fa38a1c7fa")
version("4.7.2", sha256="10346c5603546427bd809b4d855d1e39b660183232309128ad17a64969a0193d")
version("4.6.2", sha256="2d8e04f0c3819c3f0ed1ca5d01da87e6d911571b96ae690448f7f75df41f2ad1")
version("4.5.1", sha256="ee2c8b02b7fe301057f0382637b995a9c6c74e8d530692d6918e4c509ade6e39")
version("4.3.1", sha256="455c29c4ee78cd6365e5d46e20dd31a5ce4e6e1752db6774253d76bd3ca78813")
version("3.4.7", sha256="4af6606dd072fe946960680611ba65201be435b43edbfc5cc635b2a01a899e6e")

View File

@@ -14,7 +14,6 @@ class PyClick(PythonPackage):
license("BSD-3-Clause")
version("8.1.8", sha256="ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a")
version("8.1.7", sha256="ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de")
version("8.1.3", sha256="7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e")
version("8.0.3", sha256="410e932b050f5eed773c4cda94de75971c89cdb3155a72a0831139a79e5ecb5b")
@@ -29,10 +28,7 @@ class PyClick(PythonPackage):
# Needed to ensure that Spack can bootstrap black with Python 3.6
depends_on("python@3.7:", when="@8.1:", type=("build", "run"))
with when("@8.1.8:"):
depends_on("py-flit-core@:3", type="build")
with when("@:8.1.7"):
depends_on("py-setuptools", type="build")
depends_on("py-setuptools", type="build")
depends_on("py-importlib-metadata", when="@8: ^python@:3.7", type=("build", "run"))
depends_on("py-colorama", when="@8: platform=windows", type=("build", "run"))

View File

@@ -13,22 +13,9 @@ class PyDeepdiff(PythonPackage):
license("MIT")
version("8.1.1", sha256="dd7bc7d5c8b51b5b90f01b0e2fe23c801fd8b4c6a7ee7e31c5a3c3663fcc7ceb")
version("8.0.1", sha256="245599a4586ab59bb599ca3517a9c42f3318ff600ded5e80a3432693c8ec3c4b")
version("7.0.1", sha256="260c16f052d4badbf60351b4f77e8390bee03a0b516246f6839bc813fb429ddf")
version("6.7.1", sha256="b367e6fa6caac1c9f500adc79ada1b5b1242c50d5f716a1a4362030197847d30")
version("6.6.1", sha256="75c75b1511f0e48edef2b70d785a9c32b2631666b465fa8c32270a77a7b950b5")
version("6.5.0", sha256="080b1359d6128f3f5f1738c6be3064f0ad9b0cc41994aa90a028065f6ad11f25")
version("6.4.1", sha256="744c4e54ff83eaa77a995b3311dccdce6ee67773335a34a5ef269fa048005457")
version("6.3.1", sha256="e8c1bb409a2caf1d757799add53b3a490f707dd792ada0eca7cac1328055097a")
version("6.3.0", sha256="6a3bf1e7228ac5c71ca2ec43505ca0a743ff54ec77aa08d7db22de6bc7b2b644")
version("5.6.0", sha256="e3f1c3a375c7ea5ca69dba6f7920f9368658318ff1d8a496293c79481f48e649")
depends_on("py-setuptools", type="build")
depends_on("py-orderly-set@5.2.3:5", when="@8.1.0:", type=("build", "run"))
depends_on("py-orderly-set@5.2.2", when="@8.0.1", type=("build", "run"))
depends_on("py-orderly-set@5.2.1", when="@8.0.0", type=("build", "run"))
depends_on("py-ordered-set@4.1", when="@7.0.1:7", type=("build", "run"))
depends_on("py-ordered-set@4.0.2:4.1", when="@6:7.0.0", type=("build", "run"))
depends_on("py-ordered-set@4.0.2:4.1", when="@6:", type=("build", "run"))
depends_on("py-ordered-set@4.0.2", when="@:5", type=("build", "run"))

View File

@@ -26,28 +26,15 @@ class PyEspresso(CMakePackage):
license("GPL-3.0-only")
version("develop", branch="python")
version("4.2.2", sha256="2bc02f91632b0030f1203759768bd718bd8a0005f72696980b12331b4bfa0d76")
version("4.2.1", sha256="d74b46438b0d013cac35602e28f3530686446a3a307f6771baf15395066bdad5")
version("4.2.0", sha256="080bbf6bec5456192ce4e1bc0ddebb9e8735db723d3062ec87154f1ac411aaab")
version("4.1.4", sha256="c1b68de63755475c5eb3ae8117d8c6d96c8ac36cc0f46dd44417a8e7ebe9242c")
version("4.1.3", sha256="13dd998f71547c6c979a33d918b7f83e1a0e1c5f2bf2ddeeb0d1e99a3dcd6008")
version("4.1.2", sha256="00bc8e4cab8fc8f56d18978970b55f09168521ed5898a92769986f2157a81a2c")
version("4.1.1", sha256="61f19f17469522d4aa480ff5254217668ba713589c6b74576e6305920d688f90")
version("4.1.0", sha256="83cd5dd50c022d028697ff3e889005e4881100ed8cd56b558978f23d0b590c85")
version("4.0.2", sha256="89878ab44a58e90b69d56368e961b8ca13d9307f8d4b282967a1f3071a62c740")
version("4.0.1", sha256="17b7268eeba652a77f861bc534cdd05d206e7641d203a9dd5029b44bd422304b")
version("4.0.0", sha256="8e128847447eebd843de24be9b4ad14aa19c028ae48879a5a4535a9683836e6b")
depends_on("cxx", type="build") # generated
# espressomd/espresso#2244 merge upstream
patch("2244.patch", when="@4.0.0")
# Support for modern gcc was fixed in 4.2 (https://github.com/espressomd/espresso/pull/3990)
conflicts("%gcc@11:", when="@:4.1")
variant("hdf5", default=True, description="Enable HDF5 backend")
depends_on("cmake@3.0:", type="build")
depends_on("mpi")
depends_on("boost+serialization+filesystem+system+python+mpi")
@@ -60,16 +47,4 @@ class PyEspresso(CMakePackage):
depends_on("py-cython@0.23:", type="build")
depends_on("py-numpy", type=("build", "run"))
depends_on("fftw")
depends_on("hdf5+hl+mpi", when="+hdf5")
def cmake_args(self):
args = []
if self.spec.satisfies("@4.0:4.1"):
# 4.1 defaults CUDA options to ON, which this package does not currently support
# Ideally a future version of the package would add proper CUDA support.
args.append(self.define("WITH_CUDA", False))
args.append(self.define_from_variant("WITH_HDF5", "hdf5"))
return args
depends_on("hdf5+hl+mpi")

View File

@@ -1,22 +0,0 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PyOrderlySet(PythonPackage):
"""Orderly Set is a package containing multiple implementations of
Ordered Set."""
homepage = "https://github.com/seperman/orderly-set"
pypi = "orderly_set/orderly_set-5.2.3.tar.gz"
license("MIT", checked_by="wdconinc")
version("5.2.3", sha256="571ed97c5a5fca7ddeb6b2d26c19aca896b0ed91f334d9c109edd2f265fb3017")
version("5.2.2", sha256="52a18b86aaf3f5d5a498bbdb27bf3253a4e5c57ab38e5b7a56fa00115cd28448")
version("5.2.1", sha256="2adab28582db06f3fec29eaf1b31cc55358d2d9471a54e89a285cfa194258328")
depends_on("python@3.8:", type=("build", "run"))
depends_on("py-setuptools", type="build")

View File

@@ -5,20 +5,26 @@
from spack.package import *
class PyPySpy(CargoPackage):
class PyPySpy(Package):
"""A Sampling Profiler for Python."""
homepage = "https://github.com/benfred/py-spy"
url = "https://github.com/benfred/py-spy/archive/v0.3.8.tar.gz"
license("MIT", checked_by="lgarrison")
license("MIT")
version("0.4.0", sha256="13a5c4b949947425670eedac05b6dd27edbc736b75f1587899efca1a7ef79ac3")
version("0.3.8", sha256="9dbfd0ea79ef31a2966891e86cf6238ed3831938cf562e71848e07b7009cf57d")
version("0.3.3", sha256="41454d3d9132da45c72f7574faaff65f40c757720293a277ffa5ec5a4b44f902")
depends_on("c", type="build") # generated
# TODO: uses cargo to download and build dozens of dependencies.
# Need to figure out how to manage these with Spack once we have a
# CargoPackage base class.
depends_on("rust", type="build")
depends_on("unwind")
depends_on("libunwind components=ptrace", when="^[virtuals=unwind] libunwind")
def install(self, spec, prefix):
cargo = which("cargo")
cargo("install", "--root", prefix, "--path", ".")

View File

@@ -15,16 +15,6 @@ class PyRucioClients(PythonPackage):
license("Apache-2.0", checked_by="wdconinc")
version(
"36.0.0.post2", sha256="48ac2e3217aac9aaa70133cbfff991560bbeb162165bcf3dd3425967c8a2f816"
)
version(
"36.0.0.post1", sha256="141aafdde66080d36708dedc9f06a72c55918ee1d138b8cd2f5d2fe43cbc504f"
)
version("36.0.0", sha256="80fbf3b2ec63c13ac1ce430d769fcc526a5f742ba3960ecc64560e0d4cd465b5")
version("35.6.0", sha256="3c77dea0ce95b7649211da08cee7e93fa9ecb1a6c91bbe750b76b4c576a8b0dd")
version("35.5.0", sha256="bc79602193e271f66c3fdb43e7abda7903026795d6f3c5d71afb5e52250f8d92")
version("35.4.1", sha256="d87405785776d7522100cda2ebc16892f94cda94d3c257896ee4817c4e03c06b")
version("35.4.0", sha256="f8771ee39d0d496109586ddbb4000ce006a193fd33cdac8a654661ae0b7346c0")
variant("ssh", default=False, description="Enable SSH2 protocol library")
@@ -41,9 +31,6 @@ class PyRucioClients(PythonPackage):
depends_on("py-dogpile-cache@1.2.2:", type=("build", "run"))
depends_on("py-tabulate@0.9.0:", type=("build", "run"))
depends_on("py-jsonschema@4.20.0:", type=("build", "run"))
depends_on("py-packaging@24.1:", type=("build", "run"), when="@36:")
depends_on("py-rich@13.7.1:", type=("build", "run"), when="@36:")
depends_on("py-typing-extensions@4.12.2:", type=("build", "run"), when="@36:")
with when("+ssh"):
depends_on("py-paramiko@3.4.0:")

View File

@@ -12,7 +12,6 @@ class PySix(PythonPackage):
license("MIT")
version("1.17.0", sha256="ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81")
version("1.16.0", sha256="1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926")
version("1.15.0", sha256="30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259")
version("1.14.0", sha256="236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a")
@@ -23,5 +22,4 @@ class PySix(PythonPackage):
version("1.8.0", sha256="047bbbba41bac37c444c75ddfdf0573dd6e2f1fbd824e6247bb26fa7d8fa3830")
depends_on("python@2.7:2.8,3.3:", type=("build", "run"))
depends_on("python@:3.13", type=("build", "run"), when="@:1.16")
depends_on("py-setuptools", type="build")

View File

@@ -16,7 +16,6 @@ class PyTyper(PythonPackage):
version("0.15.1", sha256="a0588c0a7fa68a1978a069818657778f86abe6ff5ea6abf472f940a08bfe4f0a")
version("0.9.0", sha256="50922fd79aea2f4751a8e0408ff10d2662bd0c8bbfa84755a699f3bada2978b2")
version("0.7.0", sha256="ff797846578a9f2a201b53442aedeb543319466870fbe1c701eab66dd7681165")
version("0.5.0", sha256="4c285a5585c94d32c305444af934f0078b6a8ba91464f3f85807c91cd499d195")
with when("@0.15.1:"):
depends_on("python@3.7:", type=("build", "run"))

View File

@@ -21,7 +21,6 @@ class Rivet(AutotoolsPackage):
version("4.0.2", sha256="65a3b36f42bff782ed2767930e669e09b140899605d7972fc8f77785b4a882c0")
version("4.0.1", sha256="4e8692d6e8a53961c77983eb6ba4893c3765cf23f705789e4d865be4892eff79")
version("4.0.0", sha256="d3c42d9b83ede3e7f4b534535345c2e06e6dafb851454c2b0a5d2331ab0f04d0")
version("3.1.11", sha256="cc023712425ff15c55298cd6d6bb5d09116fe6616791b457de60888b75291465")
version("3.1.10", sha256="458b8e0df1de738e9972d24b260eaa087df12c99d4fe9dee5377d47ea6a49919")
version("3.1.9", sha256="f6532045da61eeb2adc20a9abc4166b4b2d41ab2c1ca5b500cd616bb1b92e7b1")
version("3.1.8", sha256="75b3f3d419ca6388d1fd2ec0eda7e1f90f324b996ccf0591f48a5d2e28dccc13")
@@ -39,12 +38,10 @@ class Rivet(AutotoolsPackage):
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
# The backported fix introduced an unguarded include of a HepMC3 header in
# 3.1.11 and as of version 4 HepMC2 is no longer supported
variant(
"hepmc",
default="2",
values=(conditional("2", when="@:3.1.10"), "3"),
values=(conditional("2", when="@:3"), "3"),
description="HepMC version to link against",
)
@@ -65,7 +62,6 @@ class Rivet(AutotoolsPackage):
depends_on("yoda@1.9.8:", when="@3.1.8:")
depends_on("yoda@1.9.9:", when="@3.1.9:")
depends_on("yoda@1.9.10:", when="@3.1.10:")
depends_on("yoda@1.9.11:", when="@3.1.11:")
depends_on("yoda@:1", when="@:3")
depends_on("yoda@2.0.1:", when="@4.0.0:")
@@ -75,15 +71,8 @@ class Rivet(AutotoolsPackage):
depends_on("hepmc", when="hepmc=2")
depends_on("hepmc3", when="hepmc=3")
# The fix for working around patch-level zero issues have landed in 4.0.1
# and have also been back-ported to 3.1.11. Hence we need to exclude 4.0.0
# explicitly and catch the rest with versions up to 3.1.10
# See: https://gitlab.com/hepcedar/rivet/-/merge_requests/904
# and: https://gitlab.com/hepcedar/rivet/-/merge_requests/912
conflicts(
"^hepmc@3.1.0,3.2.0,3.3.0",
when="@:3.1.10,4.0.0 hepmc=3",
msg="HepMC 3.x.0 requires at least 3.1.11 or 4.0.1",
"hepmc@3.3.0", when="@:4.0.0 hepmc=3", msg="patch-level zero requires at least 4.0.1"
)
depends_on("fastjet plugins=cxx")
depends_on("fastjet@3.4.0:", when="@3.1.7:")

View File

@@ -206,10 +206,10 @@ def configure(self, spec, prefix):
configure(*flags)
def build(self, spec, prefix):
python("./x.py", "build", "-j", str(make_jobs))
python("./x.py", "build")
def install(self, spec, prefix):
python("./x.py", "install", "-j", str(make_jobs))
python("./x.py", "install")
# known issue: https://github.com/rust-lang/rust/issues/132604
unresolved_libraries = ["libz.so.*"]

View File

@@ -6,10 +6,10 @@
class Slate(CMakePackage, CudaPackage, ROCmPackage):
"""The Software for Linear Algebra Targeting Exascale (SLATE) project
provides fundamental dense linear algebra capabilities to the US
"""The Software for Linear Algebra Targeting Exascale (SLATE) project is
to provide fundamental dense linear algebra capabilities to the US
Department of Energy and to the high-performance computing (HPC) community
at large. To this end, SLATE provides basic dense matrix operations
at large. To this end, SLATE will provide basic dense matrix operations
(e.g., matrix multiplication, rank-k update, triangular solve), linear
systems solvers, least square solvers, singular value and eigenvalue
solvers."""

View File

@@ -70,9 +70,8 @@ class Thepeg(AutotoolsPackage):
depends_on("hepmc3", when="hepmc=3")
conflicts("hepmc=3", when="@:2.1", msg="HepMC3 support was added in 2.2.0")
depends_on("fastjet", when="@2.0.0:")
depends_on("rivet hepmc=2", when="@2.0.3: +rivet hepmc=2")
depends_on("rivet hepmc=3", when="@2.0.3: +rivet hepmc=3")
depends_on("rivet@:3", when="@:2.2 +rivet")
depends_on("rivet@:3 hepmc=2", when="@2.0.3: +rivet hepmc=2")
depends_on("rivet@:3 hepmc=3", when="@2.0.3: +rivet hepmc=3")
depends_on("boost +test", when="@2.1.1:")
depends_on("autoconf", type="build")

View File

@@ -1,11 +0,0 @@
diff -ruN spack-src/misc-utils/lsfd.c spack-src-patched/misc-utils/lsfd.c
--- spack-src/misc-utils/lsfd.c 2024-07-04 07:54:41.236242042 +0000
+++ spack-src-patched/misc-utils/lsfd.c 2025-01-07 01:30:52.719740516 +0000
@@ -37,6 +37,7 @@
#include <sys/uio.h>
#include <linux/sched.h>
#include <sys/syscall.h>
+#include <errno.h>
#ifdef HAVE_LINUX_KCMP_H
# include <linux/kcmp.h>

View File

@@ -50,8 +50,6 @@ class UtilLinux(AutotoolsPackage):
depends_on("bash", when="+bash", type="run")
patch("missing-errno-header.patch", when="@2.40.2")
def url_for_version(self, version):
url = "https://www.kernel.org/pub/linux/utils/util-linux/v{0}/util-linux-{1}.tar.gz"
return url.format(version.up_to(2), version)

View File

@@ -10,8 +10,8 @@ class WaylandProtocols(MesonPackage, AutotoolsPackage):
"""wayland-protocols contains Wayland protocols that add functionality not
available in the Wayland core protocol. Such protocols either add
completely new functionality, or extend the functionality of some other
protocol either in Wayland core, or some other protocol in
wayland-protocols."""
protocol either in Wayland core, or some other protocol i
n wayland-protocols."""
homepage = "https://wayland.freedesktop.org/"
url = "https://gitlab.freedesktop.org/wayland/wayland-protocols/-/archive/1.20/wayland-protocols-1.20.tar.gz"
@@ -28,8 +28,6 @@ class WaylandProtocols(MesonPackage, AutotoolsPackage):
license("MIT")
version("1.39", sha256="42c16435dfc83f320ff727b6d446bb0d4feb361dc11796a2c5d3c0fb6532a517")
version("1.38", sha256="a6069948458a1d86cea2b33a9735e67d7524118c32c388d75efb881a9e9d2cd9")
version("1.37", sha256="c3b215084eb4cf318415533554c2c2714e58ed75847d7c3a8e50923215ffbbf3")
version("1.36", sha256="c839dd4325565fd59a93d6cde17335357328f66983c2e1fb03c33e92d6918b17")
version("1.35", sha256="6e62dfa92ce82487d107b76064cfe2d7ca107c87c239ea9036a763d79c09105a")
@@ -56,7 +54,6 @@ class WaylandProtocols(MesonPackage, AutotoolsPackage):
with when("build_system=meson"):
depends_on("meson@0.55:")
depends_on("meson@0.58:", when="@1.38:")
depends_on("pkgconfig", type="build")
depends_on("wayland")

View File

@@ -30,8 +30,6 @@ class Wayland(MesonPackage, AutotoolsPackage):
license("MIT")
version("1.23.1", sha256="158ec49af498f2558c7fbf7e8b070d010d4e270cc6076003a18a6c813f87e244")
version("1.23.0", sha256="7c5c28fa73f22d1c5021e17e1148f29ab17bf8b776a406f1c4489d3e2992ec3a")
version("1.22.0", sha256="bbca9c906a8fb8992409ebf51812f19e2a784b2c169d4b784cdd753b4bb448ef")
version("1.21.0", sha256="53b7fa67142e653820030ec049971bcb5e84ac99e05cba5bcb9cb55f43fae4b3")
version("1.20.0", sha256="20523cd6f2c18c3c86725467157c6221e19de76fbfad944042a2d494af3c7a92")
@@ -51,7 +49,6 @@ class Wayland(MesonPackage, AutotoolsPackage):
with when("build_system=meson"):
depends_on("meson@0.56.0:", type="build")
depends_on("meson@0.57.0:", type="build", when="@1.23:")
depends_on("pkgconfig", type="build")
depends_on("libxml2")

View File

@@ -14,63 +14,26 @@ class Xnnpack(CMakePackage):
license("BSD-3-Clause")
version("master", branch="master", deprecated=True)
version("2024-02-29", commit="fcbf55af6cf28a4627bcd1f703ab7ad843f0f3a2") # py-torch@2.3:
version("2022-12-22", commit="51a987591a6fc9f0fc0707077f53d763ac132cbf") # py-torch@2.0:2.2
version("2022-02-16", commit="ae108ef49aa5623b896fc93d4298c49d1750d9ba") # py-torch@1.12:1.13
version("master", branch="master")
version("2022-02-16", commit="ae108ef49aa5623b896fc93d4298c49d1750d9ba") # py-torch@1.12
version("2021-06-21", commit="79cd5f9e18ad0925ac9a050b00ea5a36230072db") # py-torch@1.10:1.11
version("2021-02-22", commit="55d53a4e7079d38e90acd75dd9e4f9e781d2da35") # py-torch@1.8:1.9
version("2020-03-23", commit="1b354636b5942826547055252f3b359b54acff95") # py-torch@1.6:1.7
version("2020-02-24", commit="7493bfb9d412e59529bcbced6a902d44cfa8ea1c") # py-torch@1.5
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
generator("ninja")
depends_on("cmake@3.5:", type="build")
depends_on("python", type="build")
depends_on("c", type="build")
depends_on("cxx", type="build")
with default_args(type="build"):
depends_on("cmake@3.15:", when="@2022-04-26:")
depends_on("cmake@3.12:", when="@2022-02-15:")
depends_on("cmake@3.5:")
depends_on("python")
# Resources must be exact commit
# https://github.com/google/XNNPACK/issues/4023
# cmake/DownloadCLog.cmake
resource(
name="clog",
url="https://github.com/pytorch/cpuinfo/archive/4b5a76c4de21265ddba98fc8f259e136ad11411b.zip",
sha256="6000cf2a0befe428d97ea921372397d049889cbd8a4cd5b93390c71415dd3b68",
destination="deps",
placement="clog",
when="@2022-12-22:2023-01-17",
)
resource(
name="clog",
url="https://github.com/pytorch/cpuinfo/archive/d5e37adf1406cf899d7d9ec1d317c47506ccb970.tar.gz",
sha256="3f2dc1970f397a0e59db72f9fca6ff144b216895c1d606f6c94a507c1e53a025",
destination="deps",
placement="clog",
when="@:2022-02-16",
)
# cmake/DownloadCpuinfo.cmake
resource(
name="cpuinfo",
url="https://github.com/pytorch/cpuinfo/archive/d6860c477c99f1fce9e28eb206891af3c0e1a1d7.zip",
sha256="a615cac78fad03952cc3e1fd231ce789a8df6e81a5957b64350cb8200364b385",
destination="deps",
placement="cpuinfo",
when="@2024-02-29:",
)
resource(
name="cpuinfo",
url="https://github.com/Maratyszcza/cpuinfo/archive/0a38bc5cf17837bf3b536b57b9d35a259b6b2283.zip",
sha256="fc79c33f10b7dcb710c5eb0fcd7fe4467bf98cdc6ff1925883b175fbb800c53e",
destination="deps",
placement="cpuinfo",
when="@2022-12-22",
)
resource(
name="cpuinfo",
@@ -78,33 +41,6 @@ class Xnnpack(CMakePackage):
sha256="2a160c527d3c58085ce260f34f9e2b161adc009b34186a2baf24e74376e89e6d",
destination="deps",
placement="cpuinfo",
when="@2021-02-22:2022-02-16",
)
resource(
name="cpuinfo",
url="https://github.com/pytorch/cpuinfo/archive/d6c0f915ee737f961915c9d17f1679b6777af207.tar.gz",
sha256="146fc61c3cf63d7d88db963876929a4d373f621fb65568b895efa0857f467770",
destination="deps",
placement="cpuinfo",
when="@2020-03-23",
)
resource(
name="cpuinfo",
url="https://github.com/pytorch/cpuinfo/archive/d5e37adf1406cf899d7d9ec1d317c47506ccb970.tar.gz",
sha256="3f2dc1970f397a0e59db72f9fca6ff144b216895c1d606f6c94a507c1e53a025",
destination="deps",
placement="cpuinfo",
when="@2020-02-24",
)
# cmake/DownloadFP16.cmake
resource(
name="fp16",
url="https://github.com/Maratyszcza/FP16/archive/0a92994d729ff76a58f692d3028ca1b64b145d91.zip",
sha256="e66e65515fa09927b348d3d584c68be4215cfe664100d01c9dbc7655a5716d70",
destination="deps",
placement="fp16",
when="@2024-02-29:",
)
resource(
name="fp16",
@@ -112,45 +48,21 @@ class Xnnpack(CMakePackage):
sha256="e66e65515fa09927b348d3d584c68be4215cfe664100d01c9dbc7655a5716d70",
destination="deps",
placement="fp16",
when="@2021-06-21:2022-12-22",
)
resource(
name="fp16",
url="https://github.com/Maratyszcza/FP16/archive/3c54eacb74f6f5e39077300c5564156c424d77ba.zip",
sha256="0d56bb92f649ec294dbccb13e04865e3c82933b6f6735d1d7145de45da700156",
destination="deps",
placement="fp16",
when="@2021-02-22",
)
resource(
name="fp16",
url="https://github.com/Maratyszcza/FP16/archive/ba1d31f5eed2eb4a69e4dea3870a68c7c95f998f.tar.gz",
sha256="9764297a339ad73b0717331a2c3e9c42a52105cd04cab62cb160e2b4598d2ea6",
destination="deps",
placement="fp16",
when="@:2020-03-23",
)
# cmake/DownloadFXdiv.cmake
resource(
name="fxdiv",
url="https://github.com/Maratyszcza/FXdiv/archive/b408327ac2a15ec3e43352421954f5b1967701d1.zip",
sha256="ab7dfb08829bee33dca38405d647868fb214ac685e379ec7ef2bebcd234cd44d",
destination="deps",
placement="fxdiv",
when="@2021-02-22:",
)
resource(
name="fxdiv",
url="https://github.com/Maratyszcza/FXdiv/archive/f8c5354679ec2597792bc70a9e06eff50c508b9a.tar.gz",
sha256="7d3215bea832fe77091ec5666200b91156df6724da1e348205078346325fc45e",
name="pthreadpool",
url="https://github.com/Maratyszcza/pthreadpool/archive/545ebe9f225aec6dca49109516fac02e973a3de2.zip",
sha256="8461f6540ae9f777ce20d1c0d1d249e5e61c438744fb390c0c6f91940aa69ea3",
destination="deps",
placement="fxdiv",
when="@:2020-03-23",
placement="pthreadpool",
)
# cmake/DownloadPSimd.cmake
# Not listed in newer versions but FP16 needs it
resource(
name="psimd",
url="https://github.com/Maratyszcza/psimd/archive/10b4ffc6ea9e2e11668f86969586f88bc82aaefa.tar.gz",
@@ -159,59 +71,14 @@ class Xnnpack(CMakePackage):
placement="psimd",
)
# cmake/DownloadPThreadPool.cmake
resource(
name="pthreadpool",
url="https://github.com/Maratyszcza/pthreadpool/archive/4fe0e1e183925bf8cfa6aae24237e724a96479b8.zip",
sha256="a4cf06de57bfdf8d7b537c61f1c3071bce74e57524fe053e0bbd2332feca7f95",
destination="deps",
placement="pthreadpool",
when="@2024-02-29:",
)
resource(
name="pthreadpool",
url="https://github.com/Maratyszcza/pthreadpool/archive/43edadc654d6283b4b6e45ba09a853181ae8e850.zip",
sha256="e6370550a1abf1503daf3c2c196e0a1c2b253440c39e1a57740ff49af2d8bedf",
destination="deps",
placement="pthreadpool",
when="@2022-12-22",
)
resource(
name="pthreadpool",
url="https://github.com/Maratyszcza/pthreadpool/archive/545ebe9f225aec6dca49109516fac02e973a3de2.zip",
sha256="8461f6540ae9f777ce20d1c0d1d249e5e61c438744fb390c0c6f91940aa69ea3",
destination="deps",
placement="pthreadpool",
when="@2021-02-22:2022-02-16",
)
resource(
name="pthreadpool",
url="https://github.com/Maratyszcza/pthreadpool/archive/ebd50d0cfa3664d454ffdf246fcd228c3b370a11.zip",
sha256="ca4fc774cf2339cb739bba827de8ed4ccbd450c4608e05329e974153448aaf56",
destination="deps",
placement="pthreadpool",
when="@2020-03-23",
)
resource(
name="pthreadpool",
url="https://github.com/Maratyszcza/pthreadpool/archive/7ad026703b3109907ad124025918da15cfd3f100.tar.gz",
sha256="96eb4256fc438b7b8cab40541d383efaf546fae7bad380c24ea601c326c5f685",
destination="deps",
placement="pthreadpool",
when="@2020-02-24",
)
# May be possible to disable NEON dot product instructions
# https://github.com/google/XNNPACK/issues/1551
conflicts("%gcc@:8")
# https://github.com/google/XNNPACK/pull/2797
patch("2797.patch", when="@:2022-03-27")
def cmake_args(self):
# TODO: XNNPACK has a XNNPACK_USE_SYSTEM_LIBS option, but it seems to be broken
# See https://github.com/google/XNNPACK/issues/1543
args = [
return [
self.define("CLOG_SOURCE_DIR", join_path(self.stage.source_path, "deps", "clog")),
self.define(
"CPUINFO_SOURCE_DIR", join_path(self.stage.source_path, "deps", "cpuinfo")
),
@@ -221,16 +88,7 @@ def cmake_args(self):
"PTHREADPOOL_SOURCE_DIR", join_path(self.stage.source_path, "deps", "pthreadpool")
),
self.define("PSIMD_SOURCE_DIR", join_path(self.stage.source_path, "deps", "psimd")),
# https://github.com/pytorch/pytorch/blob/main/cmake/Dependencies.cmake
self.define("XNNPACK_LIBRARY_TYPE", "static"),
self.define("XNNPACK_BUILD_BENCHMARKS", False),
self.define("BUILD_SHARED_LIBS", True),
self.define("XNNPACK_BUILD_TESTS", False),
self.define("CMAKE_POSITION_INDEPENDENT_CODE", True),
self.define("XNNPACK_BUILD_BENCHMARKS", False),
]
if self.spec.satisfies("@:2023-01-17"):
args.append(
self.define("CLOG_SOURCE_DIR", join_path(self.stage.source_path, "deps", "clog"))
)
return args

View File

@@ -19,7 +19,6 @@ class Yoda(AutotoolsPackage):
version("2.0.2", sha256="31a41413641189814ff3c6bbb96ac5d17d2b68734fe327d06794cdbd3a540399")
version("2.0.1", sha256="ae5a78eaae5574a5159d4058839d0983c9923558bfc88fbce21d251fd925d260")
version("2.0.0", sha256="680f43dabebb3167ce1c5dee72d1c2c285c3190751245aa51e3260a005a99575")
version("1.9.11", sha256="a9c632f45925e30a3c75cd23a1a04aa4f527419256a4dad499f9c4f026477b5e")
version("1.9.10", sha256="0a708ee9d704945d3387cc437b15ffddf382c70fe5bab39ed2bdbf83c2c28c6f")
version("1.9.9", sha256="ebcad55369a1cedcee3a2de059407c851652ba44495113f5c09d8c2e57f516aa")
version("1.9.8", sha256="7bc3062468abba50aff3ecb8b22ce677196036009890688ef4533aaa7f92e6e4")