Compare commits
69 Commits
develop-20
...
packages/m
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c034e1ba9f | ||
|
|
84b6266190 | ||
|
|
94a42d786f | ||
|
|
0e71ea51ce | ||
|
|
b3cef1072d | ||
|
|
e8ae9a403c | ||
|
|
1a8ef161c8 | ||
|
|
d3913938bc | ||
|
|
4179880fe6 | ||
|
|
125dd0368e | ||
|
|
fd68f8916c | ||
|
|
93e6f5fa4e | ||
|
|
54acda3f11 | ||
|
|
663e20fcc4 | ||
|
|
6428132ebb | ||
|
|
171958cf09 | ||
|
|
0d0f7ab030 | ||
|
|
35f8b43a54 | ||
|
|
6f7eb3750c | ||
|
|
2121eb31ba | ||
|
|
c68d739825 | ||
|
|
c468697b35 | ||
|
|
c4094cf051 | ||
|
|
9ff9ca61e6 | ||
|
|
826e0c0405 | ||
|
|
1b86a842ea | ||
|
|
558a28bf52 | ||
|
|
411576e1fa | ||
|
|
cab4f92960 | ||
|
|
c6c13f6782 | ||
|
|
cf11fab5ad | ||
|
|
1d8b35c840 | ||
|
|
5dc46a976d | ||
|
|
05f5596cdd | ||
|
|
6942c7f35b | ||
|
|
18f0ac0f94 | ||
|
|
d9196ee3f8 | ||
|
|
ef0bb6fe6b | ||
|
|
3fed320013 | ||
|
|
1aa77e695d | ||
|
|
3a0efeecf1 | ||
|
|
5ffb5657c9 | ||
|
|
2b3e7fd10a | ||
|
|
cb315e18f0 | ||
|
|
10c637aca0 | ||
|
|
fb4e1cad45 | ||
|
|
3054b71e2e | ||
|
|
47163f7435 | ||
|
|
e322a8382f | ||
|
|
53fb4795ca | ||
|
|
4517c7fa9b | ||
|
|
efaed17f91 | ||
|
|
2c17cd365d | ||
|
|
dfe537f688 | ||
|
|
be0002b460 | ||
|
|
743ee5f3de | ||
|
|
b6caf0156f | ||
|
|
ec00ffc244 | ||
|
|
f020256b9f | ||
|
|
04377e39e0 | ||
|
|
ba2703fea6 | ||
|
|
92b1c8f763 | ||
|
|
2b29ecd9b6 | ||
|
|
5b43bf1b58 | ||
|
|
37d9770e02 | ||
|
|
0e016ba6f5 | ||
|
|
7afa949da1 | ||
|
|
b81d7d0aac | ||
|
|
e78484f501 |
@@ -101,6 +101,12 @@ config:
|
||||
verify_ssl: true
|
||||
|
||||
|
||||
# This is where custom certs for proxy/firewall are stored.
|
||||
# It can be a path or environment variable. To match ssl env configuration
|
||||
# the default is the environment variable SSL_CERT_FILE
|
||||
ssl_certs: $SSL_CERT_FILE
|
||||
|
||||
|
||||
# Suppress gpg warnings from binary package verification
|
||||
# Only suppresses warnings, gpg failure will still fail the install
|
||||
# Potential rationale to set True: users have already explicitly trusted the
|
||||
|
||||
@@ -145,6 +145,22 @@ hosts when making ``ssl`` connections. Set to ``false`` to disable, and
|
||||
tools like ``curl`` will use their ``--insecure`` options. Disabling
|
||||
this can expose you to attacks. Use at your own risk.
|
||||
|
||||
--------------------
|
||||
``ssl_certs``
|
||||
--------------------
|
||||
|
||||
Path to custom certificats for SSL verification. The value can be a
|
||||
filesytem path, or an environment variable that expands to a file path.
|
||||
The default value is set to the environment variable ``SSL_CERT_FILE``
|
||||
to use the same syntax used by many other applications that automatically
|
||||
detect custom certificates.
|
||||
When ``url_fetch_method:curl`` the ``config:ssl_certs`` should resolve to
|
||||
a single file. Spack will then set the environment variable ``CURL_CA_BUNDLE``
|
||||
in the subprocess calling ``curl``.
|
||||
If ``url_fetch_method:urllib`` then files and directories are supported i.e.
|
||||
``config:ssl_certs:$SSL_CERT_FILE`` or ``config:ssl_certs:$SSL_CERT_DIR``
|
||||
will work.
|
||||
|
||||
--------------------
|
||||
``checksum``
|
||||
--------------------
|
||||
|
||||
5
lib/spack/env/cc
vendored
5
lib/spack/env/cc
vendored
@@ -248,7 +248,7 @@ case "$command" in
|
||||
lang_flags=C
|
||||
debug_flags="-g"
|
||||
;;
|
||||
c++|CC|g++|clang++|armclang++|icpc|icpx|dpcpp|pgc++|nvc++|xlc++|xlc++_r|FCC|amdclang++|crayCC)
|
||||
c++|CC|g++|clang++|armclang++|icpc|icpx|pgc++|nvc++|xlc++|xlc++_r|FCC|amdclang++|crayCC)
|
||||
command="$SPACK_CXX"
|
||||
language="C++"
|
||||
comp="CXX"
|
||||
@@ -526,7 +526,7 @@ categorize_arguments() {
|
||||
continue
|
||||
fi
|
||||
|
||||
replaced="$after$stripped"
|
||||
replaced="$after$stripped"
|
||||
|
||||
# it matched, remove it
|
||||
shift
|
||||
@@ -913,4 +913,3 @@ fi
|
||||
# Execute the full command, preserving spaces with IFS set
|
||||
# to the alarm bell separator.
|
||||
IFS="$lsep"; exec $full_command_list
|
||||
|
||||
|
||||
@@ -434,11 +434,6 @@ def _do_patch_libtool(self):
|
||||
r"crtendS\.o",
|
||||
]:
|
||||
x.filter(regex=(rehead + o), repl="")
|
||||
elif self.pkg.compiler.name == "dpcpp":
|
||||
# Hack to filter out spurious predep_objects when building with Intel dpcpp
|
||||
# (see https://github.com/spack/spack/issues/32863):
|
||||
x.filter(regex=r"^(predep_objects=.*)/tmp/conftest-[0-9A-Fa-f]+\.o", repl=r"\1")
|
||||
x.filter(regex=r"^(predep_objects=.*)/tmp/a-[0-9A-Fa-f]+\.o", repl=r"\1")
|
||||
elif self.pkg.compiler.name == "nag":
|
||||
for tag in ["fc", "f77"]:
|
||||
marker = markers[tag]
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
import collections.abc
|
||||
import os
|
||||
import re
|
||||
from typing import Tuple
|
||||
|
||||
import llnl.util.filesystem as fs
|
||||
@@ -15,6 +16,12 @@
|
||||
from .cmake import CMakeBuilder, CMakePackage
|
||||
|
||||
|
||||
def spec_uses_toolchain(spec):
|
||||
gcc_toolchain_regex = re.compile(".*gcc-toolchain.*")
|
||||
using_toolchain = list(filter(gcc_toolchain_regex.match, spec.compiler_flags["cxxflags"]))
|
||||
return using_toolchain
|
||||
|
||||
|
||||
def cmake_cache_path(name, value, comment="", force=False):
|
||||
"""Generate a string for a cmake cache variable"""
|
||||
force_str = " FORCE" if force else ""
|
||||
@@ -132,6 +139,11 @@ def initconfig_compiler_entries(self):
|
||||
"endif()\n",
|
||||
]
|
||||
|
||||
# We defined hipcc as top-level compiler for packages when +rocm.
|
||||
# This avoid problems coming from rocm flags being applied to another compiler.
|
||||
if "+rocm" in spec:
|
||||
entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc))
|
||||
|
||||
flags = spec.compiler_flags
|
||||
|
||||
# use global spack compiler flags
|
||||
@@ -213,7 +225,7 @@ def initconfig_mpi_entries(self):
|
||||
else:
|
||||
# starting with cmake 3.10, FindMPI expects MPIEXEC_EXECUTABLE
|
||||
# vs the older versions which expect MPIEXEC
|
||||
if self.pkg.spec["cmake"].satisfies("@3.10:"):
|
||||
if spec["cmake"].satisfies("@3.10:"):
|
||||
entries.append(cmake_cache_path("MPIEXEC_EXECUTABLE", mpiexec))
|
||||
else:
|
||||
entries.append(cmake_cache_path("MPIEXEC", mpiexec))
|
||||
@@ -248,12 +260,17 @@ def initconfig_hardware_entries(self):
|
||||
# Include the deprecated CUDA_TOOLKIT_ROOT_DIR for supporting BLT packages
|
||||
entries.append(cmake_cache_path("CUDA_TOOLKIT_ROOT_DIR", cudatoolkitdir))
|
||||
|
||||
archs = spec.variants["cuda_arch"].value
|
||||
if archs[0] != "none":
|
||||
arch_str = ";".join(archs)
|
||||
entries.append(
|
||||
cmake_cache_string("CMAKE_CUDA_ARCHITECTURES", "{0}".format(arch_str))
|
||||
)
|
||||
# CUDA_FLAGS
|
||||
cuda_flags = []
|
||||
|
||||
if not spec.satisfies("cuda_arch=none"):
|
||||
cuda_archs = ";".join(spec.variants["cuda_arch"].value)
|
||||
entries.append(cmake_cache_string("CMAKE_CUDA_ARCHITECTURES", cuda_archs))
|
||||
|
||||
if spec_uses_toolchain(spec):
|
||||
cuda_flags.append("-Xcompiler {}".format(spec_uses_toolchain(spec)[0]))
|
||||
|
||||
entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS", " ".join(cuda_flags)))
|
||||
|
||||
if "+rocm" in spec:
|
||||
entries.append("#------------------{0}".format("-" * 30))
|
||||
@@ -262,9 +279,6 @@ def initconfig_hardware_entries(self):
|
||||
|
||||
# Explicitly setting HIP_ROOT_DIR may be a patch that is no longer necessary
|
||||
entries.append(cmake_cache_path("HIP_ROOT_DIR", "{0}".format(spec["hip"].prefix)))
|
||||
entries.append(
|
||||
cmake_cache_path("HIP_CXX_COMPILER", "{0}".format(self.spec["hip"].hipcc))
|
||||
)
|
||||
llvm_bin = spec["llvm-amdgpu"].prefix.bin
|
||||
llvm_prefix = spec["llvm-amdgpu"].prefix
|
||||
# Some ROCm systems seem to point to /<path>/rocm-<ver>/ and
|
||||
@@ -277,11 +291,9 @@ def initconfig_hardware_entries(self):
|
||||
archs = self.spec.variants["amdgpu_target"].value
|
||||
if archs[0] != "none":
|
||||
arch_str = ";".join(archs)
|
||||
entries.append(
|
||||
cmake_cache_string("CMAKE_HIP_ARCHITECTURES", "{0}".format(arch_str))
|
||||
)
|
||||
entries.append(cmake_cache_string("AMDGPU_TARGETS", "{0}".format(arch_str)))
|
||||
entries.append(cmake_cache_string("GPU_TARGETS", "{0}".format(arch_str)))
|
||||
entries.append(cmake_cache_string("CMAKE_HIP_ARCHITECTURES", arch_str))
|
||||
entries.append(cmake_cache_string("AMDGPU_TARGETS", arch_str))
|
||||
entries.append(cmake_cache_string("GPU_TARGETS", arch_str))
|
||||
|
||||
return entries
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
from llnl.util.link_tree import LinkTree
|
||||
|
||||
from spack.build_environment import dso_suffix
|
||||
from spack.directives import conflicts, variant
|
||||
from spack.directives import conflicts, license, variant
|
||||
from spack.package_base import InstallError
|
||||
from spack.util.environment import EnvironmentModifications
|
||||
from spack.util.executable import Executable
|
||||
@@ -26,6 +26,7 @@ class IntelOneApiPackage(Package):
|
||||
"""Base class for Intel oneAPI packages."""
|
||||
|
||||
homepage = "https://software.intel.com/oneapi"
|
||||
license("https://intel.ly/393CijO")
|
||||
|
||||
# oneAPI license does not allow mirroring outside of the
|
||||
# organization (e.g. University/Company).
|
||||
|
||||
@@ -1947,9 +1947,9 @@ def reproduce_ci_job(url, work_dir, autostart, gpg_url, runtime):
|
||||
entrypoint_script.append(["echo", f"Re-run install script using:\n\t{install_mechanism}"])
|
||||
# Allow interactive
|
||||
if IS_WINDOWS:
|
||||
entrypoint_script.extend(["&", "($args -Join ' ')", "-NoExit"])
|
||||
entrypoint_script.append(["&", "($args -Join ' ')", "-NoExit"])
|
||||
else:
|
||||
entrypoint_script.extend(["exec", "$@"])
|
||||
entrypoint_script.append(["exec", "$@"])
|
||||
|
||||
process_command(
|
||||
"entrypoint", entrypoint_script, work_dir, run=False, exit_on_failure=False
|
||||
|
||||
@@ -420,10 +420,9 @@ def install_with_active_env(env: ev.Environment, args, install_kwargs, reporter_
|
||||
with reporter_factory(specs_to_install):
|
||||
env.install_specs(specs_to_install, **install_kwargs)
|
||||
finally:
|
||||
# TODO: this is doing way too much to trigger
|
||||
# views and modules to be generated.
|
||||
with env.write_transaction():
|
||||
env.write(regenerate=True)
|
||||
if env.views:
|
||||
with env.write_transaction():
|
||||
env.write(regenerate=True)
|
||||
|
||||
|
||||
def concrete_specs_from_cli(args, install_kwargs):
|
||||
|
||||
@@ -91,7 +91,6 @@ def setup_parser(subparser):
|
||||
|
||||
|
||||
def _process_result(result, show, required_format, kwargs):
|
||||
result.raise_if_unsat()
|
||||
opt, _, _ = min(result.answers)
|
||||
if ("opt" in show) and (not required_format):
|
||||
tty.msg("Best of %d considered solutions." % result.nmodels)
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
# 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 spack.compilers.oneapi
|
||||
|
||||
|
||||
class Dpcpp(spack.compilers.oneapi.Oneapi):
|
||||
"""This is the same as the oneAPI compiler but uses dpcpp instead of
|
||||
icpx (for DPC++ source files). It explicitly refers to dpcpp, so that
|
||||
CMake test files which check the compiler name (e.g. CMAKE_CXX_COMPILER)
|
||||
detect it as dpcpp.
|
||||
|
||||
Ideally we could switch out icpx for dpcpp where needed in the oneAPI
|
||||
compiler definition, but two things are needed for that: (a) a way to
|
||||
tell the compiler that it should be using dpcpp and (b) a way to
|
||||
customize the link_paths
|
||||
|
||||
See also: https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compiler-setup/using-the-command-line/invoking-the-compiler.html
|
||||
"""
|
||||
|
||||
# Subclasses use possible names of C++ compiler
|
||||
cxx_names = ["dpcpp"]
|
||||
|
||||
# Named wrapper links within build_env_path
|
||||
link_paths = {
|
||||
"cc": os.path.join("oneapi", "icx"),
|
||||
"cxx": os.path.join("oneapi", "dpcpp"),
|
||||
"f77": os.path.join("oneapi", "ifx"),
|
||||
"fc": os.path.join("oneapi", "ifx"),
|
||||
}
|
||||
@@ -199,7 +199,7 @@ def __init__(self, *args, **kwargs):
|
||||
# for a fortran compiler
|
||||
if paths[2]:
|
||||
# If this found, it sets all the vars
|
||||
oneapi_root = os.getenv("ONEAPI_ROOT")
|
||||
oneapi_root = os.path.join(self.cc, "../../..")
|
||||
oneapi_root_setvars = os.path.join(oneapi_root, "setvars.bat")
|
||||
oneapi_version_setvars = os.path.join(
|
||||
oneapi_root, "compiler", str(self.ifx_version), "env", "vars.bat"
|
||||
|
||||
@@ -749,7 +749,6 @@ def _concretize_specs_together_new(*abstract_specs, **kwargs):
|
||||
result = solver.solve(
|
||||
abstract_specs, tests=kwargs.get("tests", False), allow_deprecated=allow_deprecated
|
||||
)
|
||||
result.raise_if_unsat()
|
||||
return [s.copy() for s in result.specs]
|
||||
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ def __init__(self, pkg_count: int):
|
||||
self.pkg_ids: Set[str] = set()
|
||||
|
||||
def next_pkg(self, pkg: "spack.package_base.PackageBase"):
|
||||
pkg_id = package_id(pkg)
|
||||
pkg_id = package_id(pkg.spec)
|
||||
|
||||
if pkg_id not in self.pkg_ids:
|
||||
self.pkg_num += 1
|
||||
@@ -221,12 +221,12 @@ def _handle_external_and_upstream(pkg: "spack.package_base.PackageBase", explici
|
||||
# consists in module file generation and registration in the DB.
|
||||
if pkg.spec.external:
|
||||
_process_external_package(pkg, explicit)
|
||||
_print_installed_pkg(f"{pkg.prefix} (external {package_id(pkg)})")
|
||||
_print_installed_pkg(f"{pkg.prefix} (external {package_id(pkg.spec)})")
|
||||
return True
|
||||
|
||||
if pkg.spec.installed_upstream:
|
||||
tty.verbose(
|
||||
f"{package_id(pkg)} is installed in an upstream Spack instance at "
|
||||
f"{package_id(pkg.spec)} is installed in an upstream Spack instance at "
|
||||
f"{pkg.spec.prefix}"
|
||||
)
|
||||
_print_installed_pkg(pkg.prefix)
|
||||
@@ -403,7 +403,7 @@ def _install_from_cache(
|
||||
return False
|
||||
t.stop()
|
||||
|
||||
pkg_id = package_id(pkg)
|
||||
pkg_id = package_id(pkg.spec)
|
||||
tty.debug(f"Successfully extracted {pkg_id} from binary cache")
|
||||
|
||||
_write_timer_json(pkg, t, True)
|
||||
@@ -484,7 +484,7 @@ def _process_binary_cache_tarball(
|
||||
if download_result is None:
|
||||
return False
|
||||
|
||||
tty.msg(f"Extracting {package_id(pkg)} from binary cache")
|
||||
tty.msg(f"Extracting {package_id(pkg.spec)} from binary cache")
|
||||
|
||||
with timer.measure("install"), spack.util.path.filter_padding():
|
||||
binary_distribution.extract_tarball(pkg.spec, download_result, force=False, timer=timer)
|
||||
@@ -513,7 +513,7 @@ def _try_install_from_binary_cache(
|
||||
if not spack.mirror.MirrorCollection(binary=True):
|
||||
return False
|
||||
|
||||
tty.debug(f"Searching for binary cache of {package_id(pkg)}")
|
||||
tty.debug(f"Searching for binary cache of {package_id(pkg.spec)}")
|
||||
|
||||
with timer.measure("search"):
|
||||
matches = binary_distribution.get_mirrors_for_spec(pkg.spec, index_only=True)
|
||||
@@ -610,7 +610,7 @@ def get_dependent_ids(spec: "spack.spec.Spec") -> List[str]:
|
||||
|
||||
Returns: list of package ids
|
||||
"""
|
||||
return [package_id(d.package) for d in spec.dependents()]
|
||||
return [package_id(d) for d in spec.dependents()]
|
||||
|
||||
|
||||
def install_msg(name: str, pid: int, install_status: InstallStatus) -> str:
|
||||
@@ -720,7 +720,7 @@ def log(pkg: "spack.package_base.PackageBase") -> None:
|
||||
dump_packages(pkg.spec, packages_dir)
|
||||
|
||||
|
||||
def package_id(pkg: "spack.package_base.PackageBase") -> str:
|
||||
def package_id(spec: "spack.spec.Spec") -> str:
|
||||
"""A "unique" package identifier for installation purposes
|
||||
|
||||
The identifier is used to track build tasks, locks, install, and
|
||||
@@ -732,10 +732,10 @@ def package_id(pkg: "spack.package_base.PackageBase") -> str:
|
||||
Args:
|
||||
pkg: the package from which the identifier is derived
|
||||
"""
|
||||
if not pkg.spec.concrete:
|
||||
if not spec.concrete:
|
||||
raise ValueError("Cannot provide a unique, readable id when the spec is not concretized.")
|
||||
|
||||
return f"{pkg.name}-{pkg.version}-{pkg.spec.dag_hash()}"
|
||||
return f"{spec.name}-{spec.version}-{spec.dag_hash()}"
|
||||
|
||||
|
||||
class BuildRequest:
|
||||
@@ -765,7 +765,7 @@ def __init__(self, pkg: "spack.package_base.PackageBase", install_args: dict):
|
||||
self.pkg.last_phase = install_args.pop("stop_at", None) # type: ignore[attr-defined]
|
||||
|
||||
# Cache the package id for convenience
|
||||
self.pkg_id = package_id(pkg)
|
||||
self.pkg_id = package_id(pkg.spec)
|
||||
|
||||
# Save off the original install arguments plus standard defaults
|
||||
# since they apply to the requested package *and* dependencies.
|
||||
@@ -780,9 +780,9 @@ def __init__(self, pkg: "spack.package_base.PackageBase", install_args: dict):
|
||||
# are not able to return full dependents for all packages across
|
||||
# environment specs.
|
||||
self.dependencies = set(
|
||||
package_id(d.package)
|
||||
package_id(d)
|
||||
for d in self.pkg.spec.dependencies(deptype=self.get_depflags(self.pkg))
|
||||
if package_id(d.package) != self.pkg_id
|
||||
if package_id(d) != self.pkg_id
|
||||
)
|
||||
|
||||
def __repr__(self) -> str:
|
||||
@@ -832,7 +832,7 @@ def get_depflags(self, pkg: "spack.package_base.PackageBase") -> int:
|
||||
depflag = dt.LINK | dt.RUN
|
||||
include_build_deps = self.install_args.get("include_build_deps")
|
||||
|
||||
if self.pkg_id == package_id(pkg):
|
||||
if self.pkg_id == package_id(pkg.spec):
|
||||
cache_only = self.install_args.get("package_cache_only")
|
||||
else:
|
||||
cache_only = self.install_args.get("dependencies_cache_only")
|
||||
@@ -927,7 +927,7 @@ def __init__(
|
||||
raise ValueError(f"{self.pkg.name} must have a concrete spec")
|
||||
|
||||
# The "unique" identifier for the task's package
|
||||
self.pkg_id = package_id(self.pkg)
|
||||
self.pkg_id = package_id(self.pkg.spec)
|
||||
|
||||
# The explicit build request associated with the package
|
||||
if not isinstance(request, BuildRequest):
|
||||
@@ -965,9 +965,9 @@ def __init__(
|
||||
# if use traverse for transitive dependencies, then must remove
|
||||
# transitive dependents on failure.
|
||||
self.dependencies = set(
|
||||
package_id(d.package)
|
||||
package_id(d)
|
||||
for d in self.pkg.spec.dependencies(deptype=self.request.get_depflags(self.pkg))
|
||||
if package_id(d.package) != self.pkg_id
|
||||
if package_id(d) != self.pkg_id
|
||||
)
|
||||
|
||||
# Handle bootstrapped compiler
|
||||
@@ -983,7 +983,7 @@ def __init__(
|
||||
dep.constrain(f"os={str(arch_spec.os)}")
|
||||
dep.constrain(f"target={arch_spec.target.microarchitecture.family.name}:")
|
||||
dep.concretize()
|
||||
dep_id = package_id(dep.package)
|
||||
dep_id = package_id(dep)
|
||||
self.dependencies.add(dep_id)
|
||||
|
||||
# List of uninstalled dependencies, which is used to establish
|
||||
@@ -1194,7 +1194,7 @@ def _add_bootstrap_compilers(
|
||||
"""
|
||||
packages = _packages_needed_to_bootstrap_compiler(compiler, architecture, pkgs)
|
||||
for comp_pkg, is_compiler in packages:
|
||||
pkgid = package_id(comp_pkg)
|
||||
pkgid = package_id(comp_pkg.spec)
|
||||
if pkgid not in self.build_tasks:
|
||||
self._add_init_task(comp_pkg, request, is_compiler, all_deps)
|
||||
elif is_compiler:
|
||||
@@ -1241,7 +1241,7 @@ def _add_init_task(
|
||||
"""
|
||||
task = BuildTask(pkg, request, is_compiler, 0, 0, STATUS_ADDED, self.installed)
|
||||
for dep_id in task.dependencies:
|
||||
all_deps[dep_id].add(package_id(pkg))
|
||||
all_deps[dep_id].add(package_id(pkg.spec))
|
||||
|
||||
self._push_task(task)
|
||||
|
||||
@@ -1276,7 +1276,7 @@ def _check_deps_status(self, request: BuildRequest) -> None:
|
||||
err = "Cannot proceed with {0}: {1}"
|
||||
for dep in request.traverse_dependencies():
|
||||
dep_pkg = dep.package
|
||||
dep_id = package_id(dep_pkg)
|
||||
dep_id = package_id(dep)
|
||||
|
||||
# Check for failure since a prefix lock is not required
|
||||
if spack.store.STORE.failure_tracker.has_failed(dep):
|
||||
@@ -1409,7 +1409,7 @@ def _cleanup_task(self, pkg: "spack.package_base.PackageBase") -> None:
|
||||
Args:
|
||||
pkg: the package being installed
|
||||
"""
|
||||
self._remove_task(package_id(pkg))
|
||||
self._remove_task(package_id(pkg.spec))
|
||||
|
||||
# Ensure we have a read lock to prevent others from uninstalling the
|
||||
# spec during our installation.
|
||||
@@ -1423,7 +1423,7 @@ def _ensure_install_ready(self, pkg: "spack.package_base.PackageBase") -> None:
|
||||
Args:
|
||||
pkg: the package being locally installed
|
||||
"""
|
||||
pkg_id = package_id(pkg)
|
||||
pkg_id = package_id(pkg.spec)
|
||||
pre = f"{pkg_id} cannot be installed locally:"
|
||||
|
||||
# External packages cannot be installed locally.
|
||||
@@ -1465,7 +1465,7 @@ def _ensure_locked(
|
||||
"write",
|
||||
], f'"{lock_type}" is not a supported package management lock type'
|
||||
|
||||
pkg_id = package_id(pkg)
|
||||
pkg_id = package_id(pkg.spec)
|
||||
ltype, lock = self.locks.get(pkg_id, (lock_type, None))
|
||||
if lock and ltype == lock_type:
|
||||
return ltype, lock
|
||||
@@ -1601,7 +1601,7 @@ def _add_tasks(self, request: BuildRequest, all_deps):
|
||||
for dep in request.traverse_dependencies():
|
||||
dep_pkg = dep.package
|
||||
|
||||
dep_id = package_id(dep_pkg)
|
||||
dep_id = package_id(dep)
|
||||
if dep_id not in self.build_tasks:
|
||||
self._add_init_task(dep_pkg, request, False, all_deps)
|
||||
|
||||
@@ -1913,7 +1913,7 @@ def _flag_installed(
|
||||
dependent_ids: set of the package's dependent ids, or None if the dependent ids are
|
||||
limited to those maintained in the package (dependency DAG)
|
||||
"""
|
||||
pkg_id = package_id(pkg)
|
||||
pkg_id = package_id(pkg.spec)
|
||||
|
||||
if pkg_id in self.installed:
|
||||
# Already determined the package has been installed
|
||||
@@ -2309,7 +2309,7 @@ def __init__(self, pkg: "spack.package_base.PackageBase", install_args: dict):
|
||||
|
||||
# info/debug information
|
||||
self.pre = _log_prefix(pkg.name)
|
||||
self.pkg_id = package_id(pkg)
|
||||
self.pkg_id = package_id(pkg.spec)
|
||||
|
||||
def run(self) -> bool:
|
||||
"""Main entry point from ``build_process`` to kick off install in child."""
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
import xml.sax.saxutils
|
||||
from typing import Dict, Optional
|
||||
from urllib.parse import urlencode
|
||||
from urllib.request import HTTPHandler, Request, build_opener
|
||||
from urllib.request import HTTPSHandler, Request, build_opener
|
||||
|
||||
import llnl.util.tty as tty
|
||||
from llnl.util.filesystem import working_dir
|
||||
@@ -27,6 +27,7 @@
|
||||
from spack.error import SpackError
|
||||
from spack.util.crypto import checksum
|
||||
from spack.util.log_parse import parse_log_events
|
||||
from spack.util.web import urllib_ssl_cert_handler
|
||||
|
||||
from .base import Reporter
|
||||
from .extract import extract_test_parts
|
||||
@@ -427,7 +428,7 @@ def upload(self, filename):
|
||||
# Compute md5 checksum for the contents of this file.
|
||||
md5sum = checksum(hashlib.md5, filename, block_size=8192)
|
||||
|
||||
opener = build_opener(HTTPHandler)
|
||||
opener = build_opener(HTTPSHandler(context=urllib_ssl_cert_handler()))
|
||||
with open(filename, "rb") as f:
|
||||
params_dict = {
|
||||
"build": self.buildname,
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
"environments_root": {"type": "string"},
|
||||
"connect_timeout": {"type": "integer", "minimum": 0},
|
||||
"verify_ssl": {"type": "boolean"},
|
||||
"ssl_certs": {"type": "string"},
|
||||
"suppress_gpg_warnings": {"type": "boolean"},
|
||||
"install_missing_compilers": {"type": "boolean"},
|
||||
"debug": {"type": "boolean"},
|
||||
|
||||
@@ -763,7 +763,6 @@ def solve(self, setup, specs, reuse=None, output=None, control=None, allow_depre
|
||||
timer.stop("ground")
|
||||
|
||||
# With a grounded program, we can run the solve.
|
||||
result = Result(specs)
|
||||
models = [] # stable models if things go well
|
||||
cores = [] # unsatisfiable cores if they do not
|
||||
|
||||
@@ -784,6 +783,7 @@ def on_model(model):
|
||||
timer.stop("solve")
|
||||
|
||||
# once done, construct the solve result
|
||||
result = Result(specs)
|
||||
result.satisfiable = solve_result.satisfiable
|
||||
|
||||
if result.satisfiable:
|
||||
@@ -824,6 +824,8 @@ def on_model(model):
|
||||
print("Statistics:")
|
||||
pprint.pprint(self.control.statistics)
|
||||
|
||||
result.raise_if_unsat()
|
||||
|
||||
if result.satisfiable and result.unsolved_specs and setup.concretize_everything:
|
||||
unsolved_str = Result.format_unsolved(result.unsolved_specs)
|
||||
raise InternalConcretizerError(
|
||||
@@ -3369,7 +3371,7 @@ def _is_reusable(spec: spack.spec.Spec, packages, local: bool) -> bool:
|
||||
return False
|
||||
|
||||
if not spec.external:
|
||||
return True
|
||||
return _has_runtime_dependencies(spec)
|
||||
|
||||
# Cray external manifest externals are always reusable
|
||||
if local:
|
||||
@@ -3394,6 +3396,19 @@ def _is_reusable(spec: spack.spec.Spec, packages, local: bool) -> bool:
|
||||
return False
|
||||
|
||||
|
||||
def _has_runtime_dependencies(spec: spack.spec.Spec) -> bool:
|
||||
if not WITH_RUNTIME:
|
||||
return True
|
||||
|
||||
if spec.compiler.name == "gcc" and not spec.dependencies("gcc-runtime"):
|
||||
return False
|
||||
|
||||
if spec.compiler.name == "oneapi" and not spec.dependencies("intel-oneapi-runtime"):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
class Solver:
|
||||
"""This is the main external interface class for solving.
|
||||
|
||||
@@ -3535,9 +3550,14 @@ def solve_in_rounds(
|
||||
if not result.unsolved_specs:
|
||||
break
|
||||
|
||||
# This means we cannot progress with solving the input
|
||||
if not result.satisfiable or not result.specs:
|
||||
break
|
||||
if not result.specs:
|
||||
# This is also a problem: no specs were solved for, which
|
||||
# means we would be in a loop if we tried again
|
||||
unsolved_str = Result.format_unsolved(result.unsolved_specs)
|
||||
raise InternalConcretizerError(
|
||||
"Internal Spack error: a subset of input specs could not"
|
||||
f" be solved for.\n\t{unsolved_str}"
|
||||
)
|
||||
|
||||
input_specs = list(x for (x, y) in result.unsolved_specs)
|
||||
for spec in result.specs:
|
||||
|
||||
@@ -80,6 +80,7 @@ unification_set(SetID, VirtualNode)
|
||||
|
||||
|
||||
#defined multiple_unification_sets/1.
|
||||
#defined runtime/1.
|
||||
|
||||
%----
|
||||
% Rules to break symmetry and speed-up searches
|
||||
@@ -1494,18 +1495,20 @@ opt_criterion(40, "compiler mismatches that are not from CLI").
|
||||
#minimize{ 0@240: #true }.
|
||||
#minimize{ 0@40: #true }.
|
||||
#minimize{
|
||||
1@40+Priority,PackageNode,DependencyNode
|
||||
: compiler_mismatch(PackageNode, DependencyNode),
|
||||
build_priority(PackageNode, Priority)
|
||||
1@40+Priority,PackageNode,node(ID, Dependency)
|
||||
: compiler_mismatch(PackageNode, node(ID, Dependency)),
|
||||
build_priority(node(ID, Dependency), Priority),
|
||||
not runtime(Dependency)
|
||||
}.
|
||||
|
||||
opt_criterion(39, "compiler mismatches that are not from CLI").
|
||||
#minimize{ 0@239: #true }.
|
||||
#minimize{ 0@39: #true }.
|
||||
#minimize{
|
||||
1@39+Priority,PackageNode,DependencyNode
|
||||
: compiler_mismatch_required(PackageNode, DependencyNode),
|
||||
build_priority(PackageNode, Priority)
|
||||
1@39+Priority,PackageNode,node(ID, Dependency)
|
||||
: compiler_mismatch_required(PackageNode, node(ID, Dependency)),
|
||||
build_priority(node(ID, Dependency), Priority),
|
||||
not runtime(Dependency)
|
||||
}.
|
||||
|
||||
opt_criterion(30, "non-preferred OS's").
|
||||
@@ -1522,9 +1525,10 @@ opt_criterion(25, "version badness").
|
||||
#minimize{ 0@225: #true }.
|
||||
#minimize{ 0@25: #true }.
|
||||
#minimize{
|
||||
Weight@25+Priority,PackageNode
|
||||
: version_weight(PackageNode, Weight),
|
||||
build_priority(PackageNode, Priority)
|
||||
Weight@25+Priority,node(X, Package)
|
||||
: version_weight(node(X, Package), Weight),
|
||||
build_priority(node(X, Package), Priority),
|
||||
not runtime(Package)
|
||||
}.
|
||||
|
||||
% Try to use all the default values of variants
|
||||
@@ -1543,9 +1547,10 @@ opt_criterion(15, "non-preferred compilers").
|
||||
#minimize{ 0@215: #true }.
|
||||
#minimize{ 0@15: #true }.
|
||||
#minimize{
|
||||
Weight@15+Priority,PackageNode
|
||||
: node_compiler_weight(PackageNode, Weight),
|
||||
build_priority(PackageNode, Priority)
|
||||
Weight@15+Priority,node(X, Package)
|
||||
: node_compiler_weight(node(X, Package), Weight),
|
||||
build_priority(node(X, Package), Priority),
|
||||
not runtime(Package)
|
||||
}.
|
||||
|
||||
% Minimize the number of mismatches for targets in the DAG, try
|
||||
@@ -1554,18 +1559,55 @@ opt_criterion(10, "target mismatches").
|
||||
#minimize{ 0@210: #true }.
|
||||
#minimize{ 0@10: #true }.
|
||||
#minimize{
|
||||
1@10+Priority,PackageNode,Dependency
|
||||
: node_target_mismatch(PackageNode, Dependency),
|
||||
build_priority(PackageNode, Priority)
|
||||
1@10+Priority,PackageNode,node(ID, Dependency)
|
||||
: node_target_mismatch(PackageNode, node(ID, Dependency)),
|
||||
build_priority(node(ID, Dependency), Priority),
|
||||
not runtime(Dependency)
|
||||
}.
|
||||
|
||||
opt_criterion(5, "non-preferred targets").
|
||||
#minimize{ 0@205: #true }.
|
||||
#minimize{ 0@5: #true }.
|
||||
#minimize{
|
||||
Weight@5+Priority,PackageNode
|
||||
: node_target_weight(PackageNode, Weight),
|
||||
build_priority(PackageNode, Priority)
|
||||
Weight@5+Priority,node(X, Package)
|
||||
: node_target_weight(node(X, Package), Weight),
|
||||
build_priority(node(X, Package), Priority),
|
||||
not runtime(Package)
|
||||
}.
|
||||
|
||||
|
||||
% Minimize the number of compiler mismatches for runtimes
|
||||
opt_criterion(4, "compiler mismatches (runtimes)").
|
||||
#minimize{ 0@204: #true }.
|
||||
#minimize{ 0@4: #true }.
|
||||
#minimize{
|
||||
1@4,PackageNode,node(ID, Dependency)
|
||||
: compiler_mismatch(PackageNode, node(ID, Dependency)), runtime(Dependency)
|
||||
}.
|
||||
#minimize{
|
||||
1@4,PackageNode,node(ID, Dependency)
|
||||
: compiler_mismatch_required(PackageNode, node(ID, Dependency)), runtime(Dependency)
|
||||
}.
|
||||
|
||||
|
||||
% Choose more recent versions for runtimes
|
||||
opt_criterion(3, "version badness (runtimes)").
|
||||
#minimize{ 0@203: #true }.
|
||||
#minimize{ 0@3: #true }.
|
||||
#minimize{
|
||||
Weight@3,node(X, Package)
|
||||
: version_weight(node(X, Package), Weight),
|
||||
runtime(Package)
|
||||
}.
|
||||
|
||||
% Choose best target for runtimes
|
||||
opt_criterion(2, "non-preferred targets (runtimes)").
|
||||
#minimize{ 0@202: #true }.
|
||||
#minimize{ 0@2: #true }.
|
||||
#minimize{
|
||||
Weight@2,node(X, Package)
|
||||
: node_target_weight(node(X, Package), Weight),
|
||||
runtime(Package)
|
||||
}.
|
||||
|
||||
% Choose more recent versions for nodes
|
||||
|
||||
@@ -2968,7 +2968,6 @@ def _new_concretize(self, tests=False):
|
||||
allow_deprecated = spack.config.get("config:deprecated", False)
|
||||
solver = spack.solver.asp.Solver()
|
||||
result = solver.solve([self], tests=tests, allow_deprecated=allow_deprecated)
|
||||
result.raise_if_unsat()
|
||||
|
||||
# take the best answer
|
||||
opt, i, answer = min(result.answers)
|
||||
|
||||
@@ -142,7 +142,7 @@ def optimization_flags(self, compiler):
|
||||
# custom spec.
|
||||
compiler_version = compiler.version
|
||||
version_number, suffix = archspec.cpu.version_components(compiler.version)
|
||||
if not version_number or suffix not in ("", "apple"):
|
||||
if not version_number or suffix:
|
||||
# Try to deduce the underlying version of the compiler, regardless
|
||||
# of its name in compilers.yaml. Depending on where this function
|
||||
# is called we might get either a CompilerSpec or a fully fledged
|
||||
|
||||
@@ -112,10 +112,10 @@ def test_compiler_find_no_apple_gcc(no_compilers_yaml, working_env, mock_executa
|
||||
@pytest.mark.regression("37996")
|
||||
def test_compiler_remove(mutable_config, mock_packages):
|
||||
"""Tests that we can remove a compiler from configuration."""
|
||||
assert spack.spec.CompilerSpec("gcc@=4.8.0") in spack.compilers.all_compiler_specs()
|
||||
args = spack.util.pattern.Bunch(all=True, compiler_spec="gcc@4.8.0", add_paths=[], scope=None)
|
||||
assert spack.spec.CompilerSpec("gcc@=9.4.0") in spack.compilers.all_compiler_specs()
|
||||
args = spack.util.pattern.Bunch(all=True, compiler_spec="gcc@9.4.0", add_paths=[], scope=None)
|
||||
spack.cmd.compiler.compiler_remove(args)
|
||||
assert spack.spec.CompilerSpec("gcc@=4.8.0") not in spack.compilers.all_compiler_specs()
|
||||
assert spack.spec.CompilerSpec("gcc@=9.4.0") not in spack.compilers.all_compiler_specs()
|
||||
|
||||
|
||||
@pytest.mark.regression("37996")
|
||||
@@ -124,10 +124,10 @@ def test_removing_compilers_from_multiple_scopes(mutable_config, mock_packages):
|
||||
site_config = spack.config.get("compilers", scope="site")
|
||||
spack.config.set("compilers", site_config, scope="user")
|
||||
|
||||
assert spack.spec.CompilerSpec("gcc@=4.8.0") in spack.compilers.all_compiler_specs()
|
||||
args = spack.util.pattern.Bunch(all=True, compiler_spec="gcc@4.8.0", add_paths=[], scope=None)
|
||||
assert spack.spec.CompilerSpec("gcc@=9.4.0") in spack.compilers.all_compiler_specs()
|
||||
args = spack.util.pattern.Bunch(all=True, compiler_spec="gcc@9.4.0", add_paths=[], scope=None)
|
||||
spack.cmd.compiler.compiler_remove(args)
|
||||
assert spack.spec.CompilerSpec("gcc@=4.8.0") not in spack.compilers.all_compiler_specs()
|
||||
assert spack.spec.CompilerSpec("gcc@=9.4.0") not in spack.compilers.all_compiler_specs()
|
||||
|
||||
|
||||
@pytest.mark.not_on_windows("Cannot execute bash script on Windows")
|
||||
|
||||
@@ -31,7 +31,7 @@ def test_spec():
|
||||
|
||||
|
||||
@pytest.mark.only_clingo("Known failure of the original concretizer")
|
||||
def test_spec_concretizer_args(mutable_config, mutable_database):
|
||||
def test_spec_concretizer_args(mutable_config, mutable_database, do_not_check_runtimes_on_reuse):
|
||||
"""End-to-end test of CLI concretizer prefs.
|
||||
|
||||
It's here to make sure that everything works from CLI
|
||||
|
||||
@@ -254,7 +254,7 @@ def gcc11_with_flags(compiler_factory):
|
||||
# This must use the mutable_config fixture because the test
|
||||
# adjusting_default_target_based_on_compiler uses the current_host fixture,
|
||||
# which changes the config.
|
||||
@pytest.mark.usefixtures("mutable_config", "mock_packages")
|
||||
@pytest.mark.usefixtures("mutable_config", "mock_packages", "do_not_check_runtimes_on_reuse")
|
||||
class TestConcretize:
|
||||
def test_concretize(self, spec):
|
||||
check_concretize(spec)
|
||||
@@ -614,7 +614,7 @@ def test_my_dep_depends_on_provider_of_my_virtual_dep(self):
|
||||
spec.normalize()
|
||||
spec.concretize()
|
||||
|
||||
@pytest.mark.parametrize("compiler_str", ["clang", "gcc", "gcc@10.2.1", "clang@:12.0.0"])
|
||||
@pytest.mark.parametrize("compiler_str", ["clang", "gcc", "gcc@10.2.1", "clang@:15.0.0"])
|
||||
def test_compiler_inheritance(self, compiler_str):
|
||||
spec_str = "mpileaks %{0}".format(compiler_str)
|
||||
spec = Spec(spec_str).concretized()
|
||||
@@ -877,7 +877,7 @@ def test_concretize_anonymous_dep(self, spec_str):
|
||||
# Unconstrained versions select default compiler (gcc@4.5.0)
|
||||
("bowtie@1.4.0", "%gcc@10.2.1"),
|
||||
# Version with conflicts and no valid gcc select another compiler
|
||||
("bowtie@1.3.0", "%clang@12.0.0"),
|
||||
("bowtie@1.3.0", "%clang@15.0.0"),
|
||||
# If a higher gcc is available still prefer that
|
||||
("bowtie@1.2.2 os=redhat6", "%gcc@11.1.0"),
|
||||
],
|
||||
@@ -1439,7 +1439,7 @@ def test_os_selection_when_multiple_choices_are_possible(
|
||||
@pytest.mark.regression("22718")
|
||||
@pytest.mark.parametrize(
|
||||
"spec_str,expected_compiler",
|
||||
[("mpileaks", "%gcc@10.2.1"), ("mpileaks ^mpich%clang@12.0.0", "%clang@12.0.0")],
|
||||
[("mpileaks", "%gcc@10.2.1"), ("mpileaks ^mpich%clang@15.0.0", "%clang@15.0.0")],
|
||||
)
|
||||
def test_compiler_is_unique(self, spec_str, expected_compiler):
|
||||
s = Spec(spec_str).concretized()
|
||||
@@ -1727,7 +1727,7 @@ def test_reuse_with_unknown_package_dont_raise(self, tmpdir, temporary_store, mo
|
||||
[
|
||||
(["libelf", "libelf@0.8.10"], 1),
|
||||
(["libdwarf%gcc", "libelf%clang"], 2),
|
||||
(["libdwarf%gcc", "libdwarf%clang"], 4),
|
||||
(["libdwarf%gcc", "libdwarf%clang"], 3),
|
||||
(["libdwarf^libelf@0.8.12", "libdwarf^libelf@0.8.13"], 4),
|
||||
(["hdf5", "zmpi"], 3),
|
||||
(["hdf5", "mpich"], 2),
|
||||
@@ -1794,6 +1794,22 @@ def test_best_effort_coconcretize_preferences(self, specs, expected_spec, occura
|
||||
counter += 1
|
||||
assert counter == occurances, concrete_specs
|
||||
|
||||
@pytest.mark.only_clingo("Original concretizer cannot concretize in rounds")
|
||||
def test_solve_in_rounds_all_unsolved(self, monkeypatch, mock_packages, config):
|
||||
specs = [Spec(x) for x in ["libdwarf%gcc", "libdwarf%clang"]]
|
||||
solver = spack.solver.asp.Solver()
|
||||
solver.reuse = False
|
||||
|
||||
simulate_unsolved_property = list((x, None) for x in specs)
|
||||
monkeypatch.setattr(spack.solver.asp.Result, "unsolved_specs", simulate_unsolved_property)
|
||||
monkeypatch.setattr(spack.solver.asp.Result, "specs", list())
|
||||
|
||||
with pytest.raises(
|
||||
spack.solver.asp.InternalConcretizerError,
|
||||
match="a subset of input specs could not be solved for",
|
||||
):
|
||||
list(solver.solve_in_rounds(specs))
|
||||
|
||||
@pytest.mark.only_clingo("Use case not supported by the original concretizer")
|
||||
def test_coconcretize_reuse_and_virtuals(self):
|
||||
reusable_specs = []
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
import pytest
|
||||
|
||||
import archspec.cpu
|
||||
|
||||
import spack.paths
|
||||
import spack.repo
|
||||
import spack.solver.asp
|
||||
@@ -24,9 +26,7 @@ def _concretize_with_reuse(*, root_str, reused_str):
|
||||
reused_spec = spack.spec.Spec(reused_str).concretized()
|
||||
setup = spack.solver.asp.SpackSolverSetup(tests=False)
|
||||
driver = spack.solver.asp.PyclingoDriver()
|
||||
result, _, _ = driver.solve(
|
||||
setup, [spack.spec.Spec(f"{root_str} ^{reused_str}")], reuse=[reused_spec]
|
||||
)
|
||||
result, _, _ = driver.solve(setup, [spack.spec.Spec(f"{root_str}")], reuse=[reused_spec])
|
||||
root = result.specs[0]
|
||||
return root, reused_spec
|
||||
|
||||
@@ -47,7 +47,7 @@ def enable_runtimes():
|
||||
|
||||
|
||||
def test_correct_gcc_runtime_is_injected_as_dependency(runtime_repo):
|
||||
s = spack.spec.Spec("a%gcc@10.2.1 ^b%gcc@4.8.0").concretized()
|
||||
s = spack.spec.Spec("a%gcc@10.2.1 ^b%gcc@9.4.0").concretized()
|
||||
a, b = s["a"], s["b"]
|
||||
|
||||
# Both a and b should depend on the same gcc-runtime directly
|
||||
@@ -78,9 +78,28 @@ def test_external_nodes_do_not_have_runtimes(runtime_repo, mutable_config, tmp_p
|
||||
"root_str,reused_str,expected,nruntime",
|
||||
[
|
||||
# The reused runtime is older than we need, thus we'll add a more recent one for a
|
||||
("a%gcc@10.2.1", "b%gcc@4.8.0", {"a": "gcc-runtime@10.2.1", "b": "gcc-runtime@4.8.0"}, 2),
|
||||
("a%gcc@10.2.1", "b%gcc@9.4.0", {"a": "gcc-runtime@10.2.1", "b": "gcc-runtime@9.4.0"}, 2),
|
||||
# The root is compiled with an older compiler, thus we'll reuse the runtime from b
|
||||
("a%gcc@4.8.0", "b%gcc@10.2.1", {"a": "gcc-runtime@10.2.1", "b": "gcc-runtime@10.2.1"}, 1),
|
||||
("a%gcc@9.4.0", "b%gcc@10.2.1", {"a": "gcc-runtime@10.2.1", "b": "gcc-runtime@10.2.1"}, 1),
|
||||
# Same as before, but tests that we can reuse from a more generic target
|
||||
pytest.param(
|
||||
"a%gcc@9.4.0",
|
||||
"b%gcc@10.2.1 target=x86_64",
|
||||
{"a": "gcc-runtime@10.2.1 target=x86_64", "b": "gcc-runtime@10.2.1 target=x86_64"},
|
||||
1,
|
||||
marks=pytest.mark.skipif(
|
||||
str(archspec.cpu.host().family) != "x86_64", reason="test data is x86_64 specific"
|
||||
),
|
||||
),
|
||||
pytest.param(
|
||||
"a%gcc@10.2.1",
|
||||
"b%gcc@9.4.0 target=x86_64",
|
||||
{"a": "gcc-runtime@10.2.1 target=x86_64", "b": "gcc-runtime@9.4.0 target=x86_64"},
|
||||
2,
|
||||
marks=pytest.mark.skipif(
|
||||
str(archspec.cpu.host().family) != "x86_64", reason="test data is x86_64 specific"
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_reusing_specs_with_gcc_runtime(root_str, reused_str, expected, nruntime, runtime_repo):
|
||||
@@ -104,8 +123,8 @@ def test_reusing_specs_with_gcc_runtime(root_str, reused_str, expected, nruntime
|
||||
[
|
||||
# Ensure that, whether we have multiple runtimes in the DAG or not,
|
||||
# we always link only the latest version
|
||||
("a%gcc@10.2.1", "b%gcc@4.8.0", ["gcc-runtime@10.2.1"], ["gcc-runtime@4.8.0"]),
|
||||
("a%gcc@4.8.0", "b%gcc@10.2.1", ["gcc-runtime@10.2.1"], ["gcc-runtime@4.8.0"]),
|
||||
("a%gcc@10.2.1", "b%gcc@9.4.0", ["gcc-runtime@10.2.1"], ["gcc-runtime@9.4.0"]),
|
||||
("a%gcc@9.4.0", "b%gcc@10.2.1", ["gcc-runtime@10.2.1"], ["gcc-runtime@9.4.0"]),
|
||||
],
|
||||
)
|
||||
def test_views_can_handle_duplicate_runtime_nodes(
|
||||
|
||||
@@ -105,7 +105,7 @@ def test_preferred_variants_from_wildcard(self):
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"compiler_str,spec_str",
|
||||
[("gcc@=4.8.0", "mpileaks"), ("clang@=12.0.0", "mpileaks"), ("gcc@=4.8.0", "openmpi")],
|
||||
[("gcc@=9.4.0", "mpileaks"), ("clang@=15.0.0", "mpileaks"), ("gcc@=9.4.0", "openmpi")],
|
||||
)
|
||||
def test_preferred_compilers(self, compiler_str, spec_str):
|
||||
"""Test preferred compilers are applied correctly"""
|
||||
|
||||
@@ -2013,3 +2013,12 @@ def _factory(*, spec, operating_system):
|
||||
def host_architecture_str():
|
||||
"""Returns the broad architecture family (x86_64, aarch64, etc.)"""
|
||||
return str(archspec.cpu.host().family)
|
||||
|
||||
|
||||
def _true(x):
|
||||
return True
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def do_not_check_runtimes_on_reuse(monkeypatch):
|
||||
monkeypatch.setattr(spack.solver.asp, "_has_runtime_dependencies", _true)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
compilers:
|
||||
- compiler:
|
||||
spec: gcc@=4.8.0
|
||||
spec: gcc@=9.4.0
|
||||
operating_system: {linux_os.name}{linux_os.version}
|
||||
paths:
|
||||
cc: /path/to/gcc
|
||||
@@ -10,7 +10,7 @@ compilers:
|
||||
modules: []
|
||||
target: {target}
|
||||
- compiler:
|
||||
spec: gcc@=4.8.0
|
||||
spec: gcc@=9.4.0
|
||||
operating_system: redhat6
|
||||
paths:
|
||||
cc: /path/to/gcc
|
||||
@@ -20,7 +20,7 @@ compilers:
|
||||
modules: []
|
||||
target: {target}
|
||||
- compiler:
|
||||
spec: clang@=12.0.0
|
||||
spec: clang@=15.0.0
|
||||
operating_system: {linux_os.name}{linux_os.version}
|
||||
paths:
|
||||
cc: /path/to/clang
|
||||
|
||||
@@ -10,6 +10,7 @@ config:
|
||||
source_cache: $user_cache_path/source
|
||||
misc_cache: $user_cache_path/cache
|
||||
verify_ssl: true
|
||||
ssl_certs: $SSL_CERT_FILE
|
||||
checksum: true
|
||||
dirty: false
|
||||
concretizer: {0}
|
||||
|
||||
@@ -16,7 +16,7 @@ packages:
|
||||
externalvirtual:
|
||||
buildable: False
|
||||
externals:
|
||||
- spec: externalvirtual@2.0%clang@12.0.0
|
||||
- spec: externalvirtual@2.0%clang@15.0.0
|
||||
prefix: /path/to/external_virtual_clang
|
||||
- spec: externalvirtual@1.0%gcc@10.2.1
|
||||
prefix: /path/to/external_virtual_gcc
|
||||
|
||||
@@ -4,7 +4,7 @@ lmod:
|
||||
hash_length: 0
|
||||
|
||||
core_compilers:
|
||||
- 'clang@12.0.0'
|
||||
- 'clang@15.0.0'
|
||||
|
||||
core_specs:
|
||||
- 'mpich@3.0.1'
|
||||
|
||||
@@ -2,4 +2,4 @@ enable:
|
||||
- lmod
|
||||
lmod:
|
||||
core_compilers:
|
||||
- 'clang@12.0.0'
|
||||
- 'clang@15.0.0'
|
||||
|
||||
@@ -2,4 +2,4 @@ enable:
|
||||
- lmod
|
||||
lmod:
|
||||
core_compilers:
|
||||
- 'clang@=12.0.0'
|
||||
- 'clang@=15.0.0'
|
||||
|
||||
@@ -136,7 +136,7 @@ def test_get_dependent_ids(install_mockery, mock_packages):
|
||||
spec.concretize()
|
||||
assert spec.concrete
|
||||
|
||||
pkg_id = inst.package_id(spec.package)
|
||||
pkg_id = inst.package_id(spec)
|
||||
|
||||
# Grab the sole dependency of 'a', which is 'b'
|
||||
dep = spec.dependencies()[0]
|
||||
@@ -385,7 +385,7 @@ def test_ensure_locked_have(install_mockery, tmpdir, capsys):
|
||||
const_arg = installer_args(["trivial-install-test-package"], {})
|
||||
installer = create_installer(const_arg)
|
||||
spec = installer.build_requests[0].pkg.spec
|
||||
pkg_id = inst.package_id(spec.package)
|
||||
pkg_id = inst.package_id(spec)
|
||||
|
||||
with tmpdir.as_cwd():
|
||||
# Test "downgrade" of a read lock (to a read lock)
|
||||
@@ -456,17 +456,15 @@ def _pl(db, spec, timeout):
|
||||
|
||||
def test_package_id_err(install_mockery):
|
||||
s = spack.spec.Spec("trivial-install-test-package")
|
||||
pkg_cls = spack.repo.PATH.get_pkg_class(s.name)
|
||||
with pytest.raises(ValueError, match="spec is not concretized"):
|
||||
inst.package_id(pkg_cls(s))
|
||||
inst.package_id(s)
|
||||
|
||||
|
||||
def test_package_id_ok(install_mockery):
|
||||
spec = spack.spec.Spec("trivial-install-test-package")
|
||||
spec.concretize()
|
||||
assert spec.concrete
|
||||
pkg = spec.package
|
||||
assert pkg.name in inst.package_id(pkg)
|
||||
assert spec.name in inst.package_id(spec)
|
||||
|
||||
|
||||
def test_fake_install(install_mockery):
|
||||
@@ -726,7 +724,7 @@ def test_check_deps_status_external(install_mockery, monkeypatch):
|
||||
installer._check_deps_status(request)
|
||||
|
||||
for dep in request.spec.traverse(root=False):
|
||||
assert inst.package_id(dep.package) in installer.installed
|
||||
assert inst.package_id(dep) in installer.installed
|
||||
|
||||
|
||||
def test_check_deps_status_upstream(install_mockery, monkeypatch):
|
||||
@@ -739,7 +737,7 @@ def test_check_deps_status_upstream(install_mockery, monkeypatch):
|
||||
installer._check_deps_status(request)
|
||||
|
||||
for dep in request.spec.traverse(root=False):
|
||||
assert inst.package_id(dep.package) in installer.installed
|
||||
assert inst.package_id(dep) in installer.installed
|
||||
|
||||
|
||||
def test_add_bootstrap_compilers(install_mockery, monkeypatch):
|
||||
@@ -1111,7 +1109,7 @@ def test_install_fail_fast_on_detect(install_mockery, monkeypatch, capsys):
|
||||
const_arg = installer_args(["b"], {"fail_fast": False})
|
||||
const_arg.extend(installer_args(["c"], {"fail_fast": True}))
|
||||
installer = create_installer(const_arg)
|
||||
pkg_ids = [inst.package_id(spec.package) for spec, _ in const_arg]
|
||||
pkg_ids = [inst.package_id(spec) for spec, _ in const_arg]
|
||||
|
||||
# Make sure all packages are identified as failed
|
||||
#
|
||||
@@ -1186,7 +1184,7 @@ def test_install_lock_installed_requeue(install_mockery, monkeypatch, capfd):
|
||||
const_arg = installer_args(["b"], {})
|
||||
b, _ = const_arg[0]
|
||||
installer = create_installer(const_arg)
|
||||
b_pkg_id = inst.package_id(b.package)
|
||||
b_pkg_id = inst.package_id(b)
|
||||
|
||||
def _prep(installer, task):
|
||||
installer.installed.add(b_pkg_id)
|
||||
@@ -1196,7 +1194,7 @@ def _prep(installer, task):
|
||||
monkeypatch.setattr(inst.PackageInstaller, "_ensure_locked", _not_locked)
|
||||
|
||||
def _requeued(installer, task, install_status):
|
||||
tty.msg("requeued {0}".format(inst.package_id(task.pkg)))
|
||||
tty.msg("requeued {0}".format(inst.package_id(task.pkg.spec)))
|
||||
|
||||
# Flag the package as installed
|
||||
monkeypatch.setattr(inst.PackageInstaller, "_prepare_for_install", _prep)
|
||||
@@ -1262,7 +1260,7 @@ def test_install_skip_patch(install_mockery, mock_fetch):
|
||||
installer.install()
|
||||
|
||||
spec, install_args = const_arg[0]
|
||||
assert inst.package_id(spec.package) in installer.installed
|
||||
assert inst.package_id(spec) in installer.installed
|
||||
|
||||
|
||||
def test_install_implicit(install_mockery, mock_fetch):
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
]
|
||||
|
||||
|
||||
@pytest.fixture(params=["clang@=12.0.0", "gcc@=10.2.1"])
|
||||
@pytest.fixture(params=["clang@=15.0.0", "gcc@=10.2.1"])
|
||||
def compiler(request):
|
||||
return request.param
|
||||
|
||||
@@ -59,7 +59,7 @@ def test_layout_for_specs_compiled_with_core_compilers(
|
||||
we can use both ``compiler@version`` and ``compiler@=version`` to specify a core compiler.
|
||||
"""
|
||||
module_configuration(modules_config)
|
||||
module, spec = factory("libelf%clang@12.0.0")
|
||||
module, spec = factory("libelf%clang@15.0.0")
|
||||
assert "Core" in module.layout.available_path_parts
|
||||
|
||||
def test_file_layout(self, compiler, provider, factory, module_configuration):
|
||||
@@ -78,7 +78,7 @@ def test_file_layout(self, compiler, provider, factory, module_configuration):
|
||||
# is transformed to r"Core" if the compiler is listed among core
|
||||
# compilers
|
||||
# Check that specs listed as core_specs are transformed to "Core"
|
||||
if compiler == "clang@=12.0.0" or spec_string == "mpich@3.0.1":
|
||||
if compiler == "clang@=15.0.0" or spec_string == "mpich@3.0.1":
|
||||
assert "Core" in layout.available_path_parts
|
||||
else:
|
||||
assert compiler.replace("@=", "/") in layout.available_path_parts
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
import email.message
|
||||
import os
|
||||
import pickle
|
||||
import ssl
|
||||
import urllib.request
|
||||
|
||||
import pytest
|
||||
@@ -363,3 +364,81 @@ def test_detailed_http_error_pickle(tmpdir):
|
||||
assert deserialized.reason == "Not Found"
|
||||
assert str(deserialized.info()) == str(headers)
|
||||
assert str(deserialized) == str(error)
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def ssl_scrubbed_env(mutable_config, monkeypatch):
|
||||
"""clear out environment variables that could give false positives for SSL Cert tests"""
|
||||
monkeypatch.delenv("SSL_CERT_FILE", raising=False)
|
||||
monkeypatch.delenv("SSL_CERT_DIR", raising=False)
|
||||
monkeypatch.delenv("CURL_CA_BUNDLE", raising=False)
|
||||
spack.config.set("config:verify_ssl", True)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"cert_path,cert_creator",
|
||||
[
|
||||
pytest.param(
|
||||
lambda base_path: os.path.join(base_path, "mock_cert.crt"),
|
||||
lambda cert_path: open(cert_path, "w").close(),
|
||||
id="cert_file",
|
||||
),
|
||||
pytest.param(
|
||||
lambda base_path: os.path.join(base_path, "mock_cert"),
|
||||
lambda cert_path: os.mkdir(cert_path),
|
||||
id="cert_directory",
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_ssl_urllib(
|
||||
cert_path, cert_creator, tmpdir, ssl_scrubbed_env, mutable_config, monkeypatch
|
||||
):
|
||||
"""
|
||||
create a proposed cert type and then verify that they exist inside ssl's checks
|
||||
"""
|
||||
spack.config.set("config:url_fetch_method", "urllib")
|
||||
|
||||
def mock_verify_locations(self, cafile, capath, cadata):
|
||||
"""overwrite ssl's verification to simply check for valid file/path"""
|
||||
assert cafile or capath
|
||||
if cafile:
|
||||
assert os.path.isfile(cafile)
|
||||
if capath:
|
||||
assert os.path.isdir(capath)
|
||||
|
||||
monkeypatch.setattr(ssl.SSLContext, "load_verify_locations", mock_verify_locations)
|
||||
|
||||
with tmpdir.as_cwd():
|
||||
mock_cert = cert_path(tmpdir.strpath)
|
||||
cert_creator(mock_cert)
|
||||
spack.config.set("config:ssl_certs", mock_cert)
|
||||
|
||||
assert mock_cert == spack.config.get("config:ssl_certs", None)
|
||||
|
||||
ssl_context = spack.util.web.urllib_ssl_cert_handler()
|
||||
assert ssl_context.verify_mode == ssl.CERT_REQUIRED
|
||||
|
||||
|
||||
@pytest.mark.parametrize("cert_exists", [True, False], ids=["exists", "missing"])
|
||||
def test_ssl_curl_cert_file(cert_exists, tmpdir, ssl_scrubbed_env, mutable_config, monkeypatch):
|
||||
"""
|
||||
Assure that if a valid cert file is specified curl executes
|
||||
with CURL_CA_BUNDLE in the env
|
||||
"""
|
||||
spack.config.set("config:url_fetch_method", "curl")
|
||||
with tmpdir.as_cwd():
|
||||
mock_cert = str(tmpdir.join("mock_cert.crt"))
|
||||
spack.config.set("config:ssl_certs", mock_cert)
|
||||
if cert_exists:
|
||||
open(mock_cert, "w").close()
|
||||
assert os.path.isfile(mock_cert)
|
||||
curl = spack.util.web._curl()
|
||||
|
||||
# arbitrary call to query the run env
|
||||
dump_env = {}
|
||||
curl("--help", output=str, _dump_env=dump_env)
|
||||
|
||||
if cert_exists:
|
||||
assert dump_env["CURL_CA_BUNDLE"] == mock_cert
|
||||
else:
|
||||
assert "CURL_CA_BUNDLE" not in dump_env
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
import spack.config
|
||||
import spack.error
|
||||
import spack.util.path
|
||||
import spack.util.url as url_util
|
||||
|
||||
from .executable import CommandNotFoundError, which
|
||||
@@ -59,6 +60,66 @@ def http_error_default(self, req, fp, code, msg, hdrs):
|
||||
raise DetailedHTTPError(req, code, msg, hdrs, fp)
|
||||
|
||||
|
||||
dbg_msg_no_ssl_cert_config = (
|
||||
"config:ssl_certs not in configuration. "
|
||||
"Default cert configuation and environment will be used."
|
||||
)
|
||||
|
||||
|
||||
def urllib_ssl_cert_handler():
|
||||
"""context for configuring ssl during urllib HTTPS operations"""
|
||||
custom_cert_var = spack.config.get("config:ssl_certs")
|
||||
if custom_cert_var:
|
||||
# custom certs will be a location, so expand env variables, paths etc
|
||||
certs = spack.util.path.canonicalize_path(custom_cert_var)
|
||||
tty.debug("URLLIB: Looking for custom SSL certs at {}".format(certs))
|
||||
if os.path.isfile(certs):
|
||||
tty.debug("URLLIB: Custom SSL certs file found at {}".format(certs))
|
||||
return ssl.create_default_context(cafile=certs)
|
||||
elif os.path.isdir(certs):
|
||||
tty.debug("URLLIB: Custom SSL certs directory found at {}".format(certs))
|
||||
return ssl.create_default_context(capath=certs)
|
||||
else:
|
||||
tty.debug("URLLIB: Custom SSL certs not found")
|
||||
return ssl.create_default_context()
|
||||
else:
|
||||
tty.debug(dbg_msg_no_ssl_cert_config)
|
||||
return ssl.create_default_context()
|
||||
|
||||
|
||||
# curl requires different strategies for custom certs at runtime depending on if certs
|
||||
# are stored as a file or a directory
|
||||
def append_curl_env_for_ssl_certs(curl):
|
||||
"""
|
||||
configure curl to use custom certs in a file at run time
|
||||
see: https://curl.se/docs/sslcerts.html item 4
|
||||
"""
|
||||
custom_cert_var = spack.config.get("config:ssl_certs")
|
||||
if custom_cert_var:
|
||||
# custom certs will be a location, so expand env variables, paths etc
|
||||
certs = spack.util.path.canonicalize_path(custom_cert_var)
|
||||
tty.debug("CURL: Looking for custom SSL certs file at {}".format(certs))
|
||||
if os.path.isfile(certs):
|
||||
tty.debug(
|
||||
"CURL: Configuring curl to use custom"
|
||||
" certs from {} by setting "
|
||||
"CURL_CA_BUNDLE".format(certs)
|
||||
)
|
||||
curl.add_default_env("CURL_CA_BUNDLE", certs)
|
||||
elif os.path.isdir(certs):
|
||||
tty.warn(
|
||||
"CURL config:ssl_certs"
|
||||
" is a directory but cURL only supports files. Default certs will be used instead."
|
||||
)
|
||||
else:
|
||||
tty.debug(
|
||||
"CURL config:ssl_certs "
|
||||
"resolves to {}. This is not a file so default certs will be used.".format(certs)
|
||||
)
|
||||
else:
|
||||
tty.debug(dbg_msg_no_ssl_cert_config)
|
||||
|
||||
|
||||
def _urlopen():
|
||||
s3 = UrllibS3Handler()
|
||||
gcs = GCSHandler()
|
||||
@@ -66,7 +127,7 @@ def _urlopen():
|
||||
|
||||
# One opener with HTTPS ssl enabled
|
||||
with_ssl = build_opener(
|
||||
s3, gcs, HTTPSHandler(context=ssl.create_default_context()), error_handler
|
||||
s3, gcs, HTTPSHandler(context=urllib_ssl_cert_handler()), error_handler
|
||||
)
|
||||
|
||||
# One opener with HTTPS ssl disabled
|
||||
@@ -287,6 +348,7 @@ def _curl(curl=None):
|
||||
except CommandNotFoundError as exc:
|
||||
tty.error(str(exc))
|
||||
raise spack.error.FetchError("Missing required curl fetch method")
|
||||
append_curl_env_for_ssl_certs(curl)
|
||||
return curl
|
||||
|
||||
|
||||
|
||||
@@ -27,12 +27,12 @@ ci:
|
||||
- - 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)
|
||||
after_script:
|
||||
- - ./bin/spack python ${CI_PROJECT_DIR}/share/spack/gitlab/cloud_pipelines/scripts/common/aggregate_package_logs.spack.py
|
||||
--prefix /home/software/spack:${CI_PROJECT_DIR}/opt/spack
|
||||
--log install_times.json
|
||||
${SPACK_ARTIFACTS_ROOT}/user_data/install_times.json
|
||||
- - cat /proc/loadavg || true
|
||||
- cat /proc/meminfo | grep 'MemTotal\|MemFree' || true
|
||||
- - time python ${CI_PROJECT_DIR}/share/spack/gitlab/cloud_pipelines/scripts/common/aggregate_package_logs.spack.py
|
||||
--prefix /home/software/spack:${CI_PROJECT_DIR}/opt/spack
|
||||
--log install_times.json
|
||||
${SPACK_ARTIFACTS_ROOT}/user_data/install_times.json || true
|
||||
variables:
|
||||
CI_JOB_SIZE: "default"
|
||||
CI_GPG_KEY_ROOT: /mnt/key
|
||||
|
||||
@@ -37,10 +37,14 @@ def find_logs(prefix, filename):
|
||||
|
||||
# Look in the list of prefixes for logs
|
||||
for prefix in prefixes:
|
||||
logs = find_logs(prefix, args.log)
|
||||
print(f"Walking {prefix}")
|
||||
logs = [log for log in find_logs(prefix, args.log)]
|
||||
print(f" * found {len(logs)} logs")
|
||||
for log in logs:
|
||||
print(f" * appending data for {log}")
|
||||
with open(log) as fd:
|
||||
data.append(json.load(fd))
|
||||
|
||||
print(f"Writing {args.output_file}")
|
||||
with open(args.output_file, "w") as fd:
|
||||
json.dump(data, fd)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
spack:
|
||||
view: false
|
||||
packages:
|
||||
all:
|
||||
require: target=x86_64_v3
|
||||
cmake:
|
||||
variants: ~ownlibs
|
||||
ecp-data-vis-sdk:
|
||||
@@ -20,8 +22,6 @@ spack:
|
||||
require: '@14:'
|
||||
# Minimize LLVM
|
||||
variants: ~lldb~lld~libomptarget~polly~gold libunwind=none compiler-rt=none
|
||||
all:
|
||||
require: target=x86_64_v3
|
||||
|
||||
definitions:
|
||||
- paraview_specs:
|
||||
|
||||
@@ -81,7 +81,7 @@ spack:
|
||||
- boost +python +filesystem +iostreams +system
|
||||
- cabana
|
||||
- caliper
|
||||
- chai ~benchmarks ~tests
|
||||
- chai
|
||||
- charliecloud
|
||||
- conduit
|
||||
# - cp2k +mpi # libxsmm: ftn-78 ftn: ERROR in command linel; The -f option has an invalid argument, "tree-vectorize".
|
||||
|
||||
@@ -71,7 +71,7 @@ spack:
|
||||
- butterflypack
|
||||
- boost +python +filesystem +iostreams +system
|
||||
- cabana
|
||||
- chai ~benchmarks ~tests
|
||||
- chai
|
||||
- conduit
|
||||
# - cp2k +mpi # cp2k: Error: Type mismatch between actual argument at (1) and actual argument at (2) (LOGICAL(4)/COMPLEX(4)).
|
||||
- datatransferkit
|
||||
|
||||
@@ -64,7 +64,7 @@ spack:
|
||||
- butterflypack
|
||||
- cabana
|
||||
- caliper
|
||||
- chai ~benchmarks ~tests
|
||||
- chai
|
||||
- charliecloud
|
||||
- conduit
|
||||
- cp2k +mpi
|
||||
@@ -214,7 +214,7 @@ spack:
|
||||
- arborx +cuda cuda_arch=75 ^kokkos +wrapper
|
||||
- cabana +cuda cuda_arch=75 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=75
|
||||
- caliper +cuda cuda_arch=75
|
||||
- chai ~benchmarks ~tests +cuda cuda_arch=75 ^umpire ~shared
|
||||
- chai +cuda cuda_arch=75 ^umpire ~shared
|
||||
# - cp2k +mpi +cuda cuda_arch=75 # cp2k: cp2k only supports cuda_arch ('35', '37', '60', '70', '80')
|
||||
- flecsi +cuda cuda_arch=75
|
||||
- ginkgo +cuda cuda_arch=75
|
||||
@@ -261,7 +261,7 @@ spack:
|
||||
- arborx +cuda cuda_arch=80 ^kokkos +wrapper
|
||||
- cabana +cuda cuda_arch=80 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=80
|
||||
- caliper +cuda cuda_arch=80
|
||||
- chai ~benchmarks ~tests +cuda cuda_arch=80 ^umpire ~shared
|
||||
- chai +cuda cuda_arch=80 ^umpire ~shared
|
||||
# - cp2k +mpi +cuda cuda_arch=80 # cp2k: Error: KeyError: 'Point environment variable LIBSMM_PATH to the absolute path of the libsmm.a file'
|
||||
- flecsi +cuda cuda_arch=80
|
||||
- ginkgo +cuda cuda_arch=80
|
||||
@@ -308,7 +308,7 @@ spack:
|
||||
- arborx +cuda cuda_arch=90 ^kokkos +wrapper
|
||||
- cabana +cuda cuda_arch=90 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=90
|
||||
- caliper +cuda cuda_arch=90
|
||||
- chai ~benchmarks ~tests +cuda cuda_arch=90 ^umpire ~shared
|
||||
- chai +cuda cuda_arch=90 ^umpire ~shared
|
||||
# - cp2k +mpi +cuda cuda_arch=90 # cp2k: cp2k only supports cuda_arch ('35', '37', '60', '70', '80')
|
||||
- flecsi +cuda cuda_arch=90
|
||||
- ginkgo +cuda cuda_arch=90
|
||||
|
||||
@@ -64,13 +64,13 @@ spack:
|
||||
- butterflypack
|
||||
- cabana
|
||||
- caliper
|
||||
- chai ~benchmarks ~tests
|
||||
- chai
|
||||
- charliecloud
|
||||
- conduit
|
||||
- cp2k +mpi
|
||||
- datatransferkit
|
||||
- dyninst
|
||||
- ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc ~visit +vtkm +zfp # +visit: ?
|
||||
- ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc ~visit +vtkm +zfp # +visit: ?
|
||||
- exaworks
|
||||
- flecsi
|
||||
- flit
|
||||
@@ -214,7 +214,7 @@ spack:
|
||||
- arborx +cuda cuda_arch=75 ^kokkos +wrapper
|
||||
- cabana +cuda cuda_arch=75 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=75
|
||||
- caliper +cuda cuda_arch=75
|
||||
- chai ~benchmarks ~tests +cuda cuda_arch=75 ^umpire ~shared
|
||||
- chai +cuda cuda_arch=75 ^umpire ~shared
|
||||
# - cp2k +mpi +cuda cuda_arch=75 # cp2k: cp2k only supports cuda_arch ('35', '37', '60', '70', '80')
|
||||
- flecsi +cuda cuda_arch=75
|
||||
- ginkgo +cuda cuda_arch=75
|
||||
@@ -240,7 +240,6 @@ spack:
|
||||
- umpire ~shared +cuda cuda_arch=75
|
||||
# INCLUDED IN ECP DAV CUDA
|
||||
- adios2 +cuda cuda_arch=75
|
||||
- paraview +cuda cuda_arch=75
|
||||
- vtk-m +cuda cuda_arch=75
|
||||
- zfp +cuda cuda_arch=75
|
||||
# --
|
||||
@@ -248,6 +247,7 @@ spack:
|
||||
# - axom +cuda cuda_arch=75 # axom: https://github.com/spack/spack/issues/29520
|
||||
# - cusz +cuda cuda_arch=75 # cusz: https://github.com/spack/spack/issues/38787
|
||||
# - dealii +cuda cuda_arch=75 # slepc: make[1]: *** internal error: invalid --jobserver-auth string 'fifo:/tmp/GMfifo1313'.
|
||||
# - paraview +cuda cuda_arch=75 # Error building some cuda componets in paraview
|
||||
# - ecp-data-vis-sdk +adios2 +hdf5 +vtkm +zfp +paraview +cuda cuda_arch=75 # embree: https://github.com/spack/spack/issues/39534
|
||||
# - lammps +cuda cuda_arch=75 # lammps: needs NVIDIA driver
|
||||
# - lbann +cuda cuda_arch=75 # lbann: https://github.com/spack/spack/issues/38788
|
||||
@@ -261,7 +261,7 @@ spack:
|
||||
- arborx +cuda cuda_arch=80 ^kokkos +wrapper
|
||||
- cabana +cuda cuda_arch=80 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=80
|
||||
- caliper +cuda cuda_arch=80
|
||||
- chai ~benchmarks ~tests +cuda cuda_arch=80 ^umpire ~shared
|
||||
- chai +cuda cuda_arch=80 ^umpire ~shared
|
||||
# - cp2k +mpi +cuda cuda_arch=80 # cp2k: Error: KeyError: 'Point environment variable LIBSMM_PATH to the absolute path of the libsmm.a file'
|
||||
- flecsi +cuda cuda_arch=80
|
||||
- ginkgo +cuda cuda_arch=80
|
||||
@@ -287,7 +287,6 @@ spack:
|
||||
- umpire ~shared +cuda cuda_arch=80
|
||||
# INCLUDED IN ECP DAV CUDA
|
||||
- adios2 +cuda cuda_arch=80
|
||||
- paraview +cuda cuda_arch=80
|
||||
- vtk-m +cuda cuda_arch=80
|
||||
- zfp +cuda cuda_arch=80
|
||||
# --
|
||||
@@ -295,6 +294,7 @@ spack:
|
||||
# - axom +cuda cuda_arch=80 # axom: https://github.com/spack/spack/issues/29520
|
||||
# - cusz +cuda cuda_arch=80 # cusz: https://github.com/spack/spack/issues/38787
|
||||
# - dealii +cuda cuda_arch=80 # slepc: make[1]: *** internal error: invalid --jobserver-auth string 'fifo:/tmp/GMfifo1313'.
|
||||
# - paraview +cuda cuda_arch=80 # Error building some cuda componets in paraview
|
||||
# - ecp-data-vis-sdk +adios2 +hdf5 +vtkm +zfp +paraview +cuda cuda_arch=80 # embree: https://github.com/spack/spack/issues/39534
|
||||
# - lammps +cuda cuda_arch=80 # lammps: needs NVIDIA driver
|
||||
# - lbann +cuda cuda_arch=80 # lbann: https://github.com/spack/spack/issues/38788
|
||||
@@ -308,7 +308,7 @@ spack:
|
||||
- arborx +cuda cuda_arch=90 ^kokkos +wrapper
|
||||
- cabana +cuda cuda_arch=90 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=90
|
||||
- caliper +cuda cuda_arch=90
|
||||
- chai ~benchmarks ~tests +cuda cuda_arch=90 ^umpire ~shared
|
||||
- chai +cuda cuda_arch=90 ^umpire ~shared
|
||||
# - cp2k +mpi +cuda cuda_arch=90 # cp2k: cp2k only supports cuda_arch ('35', '37', '60', '70', '80')
|
||||
- flecsi +cuda cuda_arch=90
|
||||
- ginkgo +cuda cuda_arch=90
|
||||
|
||||
@@ -76,7 +76,7 @@ spack:
|
||||
- butterflypack
|
||||
- cabana
|
||||
- caliper
|
||||
- chai ~benchmarks ~tests
|
||||
- chai
|
||||
- charliecloud
|
||||
- conduit
|
||||
# - cp2k +mpi # dbcsr
|
||||
|
||||
@@ -65,7 +65,7 @@ spack:
|
||||
- butterflypack
|
||||
- cabana
|
||||
- caliper
|
||||
- chai ~benchmarks ~tests
|
||||
- chai
|
||||
- charliecloud
|
||||
- conduit
|
||||
- cp2k +mpi
|
||||
@@ -218,7 +218,7 @@ spack:
|
||||
- amrex +cuda cuda_arch=70
|
||||
- arborx +cuda cuda_arch=70 ^kokkos +wrapper
|
||||
- caliper +cuda cuda_arch=70
|
||||
- chai ~benchmarks ~tests +cuda cuda_arch=70 ^umpire ~shared
|
||||
- chai +cuda cuda_arch=70 ^umpire ~shared
|
||||
# - cp2k +mpi +cuda cuda_arch=70 # dbcsr
|
||||
- ecp-data-vis-sdk ~rocm +adios2 ~ascent +hdf5 +vtkm +zfp ~paraview +cuda cuda_arch=70
|
||||
- exago +mpi +python +raja +hiop ~rocm +cuda cuda_arch=70 ~ipopt ^hiop@1.0.0 ~sparse +mpi +raja ~rocm +cuda cuda_arch=70 #^raja@0.14.0
|
||||
|
||||
@@ -214,7 +214,7 @@ spack:
|
||||
- arborx +rocm amdgpu_target=gfx908
|
||||
- cabana +rocm amdgpu_target=gfx908
|
||||
- caliper +rocm amdgpu_target=gfx908
|
||||
- chai ~benchmarks +rocm amdgpu_target=gfx908
|
||||
- chai +rocm amdgpu_target=gfx908
|
||||
# - cp2k +mpi +rocm amdgpu_target=gfx908 # cp2k: Error: KeyError: 'No spec with name rocm in... "-L{}".format(spec["rocm"].libs.directories[0]),
|
||||
- ecp-data-vis-sdk +paraview +vtkm +rocm amdgpu_target=gfx908
|
||||
- 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
|
||||
@@ -256,7 +256,7 @@ spack:
|
||||
- arborx +rocm amdgpu_target=gfx90a
|
||||
- cabana +rocm amdgpu_target=gfx90a
|
||||
- caliper +rocm amdgpu_target=gfx90a
|
||||
- chai ~benchmarks +rocm amdgpu_target=gfx90a
|
||||
- chai +rocm amdgpu_target=gfx90a
|
||||
# - cp2k +mpi +rocm amdgpu_target=gfx90a # cp2k: Error: KeyError: 'No spec with name rocm in... "-L{}".format(spec["rocm"].libs.directories[0]),
|
||||
- ecp-data-vis-sdk +paraview +vtkm +rocm amdgpu_target=gfx90a
|
||||
- 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
|
||||
|
||||
@@ -69,7 +69,7 @@ spack:
|
||||
- butterflypack
|
||||
- cabana
|
||||
- caliper
|
||||
- chai ~benchmarks ~tests
|
||||
- chai
|
||||
- charliecloud
|
||||
- conduit
|
||||
- cp2k +mpi
|
||||
@@ -78,7 +78,7 @@ spack:
|
||||
- drishti
|
||||
- dxt-explorer
|
||||
- dyninst
|
||||
- ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc +visit +vtkm +zfp # adios2~cuda, ascent~cuda, darshan-runtime, darshan-util, faodel, hdf5, libcatalyst, parallel-netcdf, paraview~cuda, py-cinemasci, sz, unifyfs, veloc, visit, vtk-m, zfp
|
||||
- ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc +visit +vtkm +zfp # adios2~cuda, ascent~cuda, darshan-runtime, darshan-util, faodel, hdf5, libcatalyst, parallel-netcdf, paraview~cuda, py-cinemasci, sz, unifyfs, veloc, visit, vtk-m, zfp
|
||||
- exaworks
|
||||
- flecsi
|
||||
- flit
|
||||
@@ -103,7 +103,7 @@ spack:
|
||||
- kokkos +openmp
|
||||
- kokkos-kernels +openmp
|
||||
- laghos
|
||||
- lammps
|
||||
- lammps +amoeba +asphere +bocs +body +bpm +brownian +cg-dna +cg-spica +class2 +colloid +colvars +compress +coreshell +dielectric +diffraction +dipole +dpd-basic +dpd-meso +dpd-react +dpd-smooth +drude +eff +electrode +extra-compute +extra-dump +extra-fix +extra-molecule +extra-pair +fep +granular +interlayer +kspace +lepton +machdyn +manybody +mc +meam +mesont +misc +ml-iap +ml-pod +ml-snap +mofff +molecule +openmp-package +opt +orient +peri +phonon +plugin +poems +qeq +reaction +reaxff +replica +rigid +shock +sph +spin +srd +tally +uef +voronoi +yaff
|
||||
- lbann
|
||||
- legion
|
||||
- libnrm
|
||||
@@ -119,6 +119,7 @@ spack:
|
||||
- mpifileutils ~xattr
|
||||
- nccmp
|
||||
- nco
|
||||
- nekbone +mpi
|
||||
- netlib-scalapack
|
||||
- nrm
|
||||
- nvhpc
|
||||
@@ -186,6 +187,7 @@ spack:
|
||||
# --
|
||||
# - geopm # geopm: https://github.com/spack/spack/issues/38795
|
||||
# - glvis # glvis: https://github.com/spack/spack/issues/42839
|
||||
# - nek5000 +mpi +visit # nek5000: Error: AttributeError: 'str' object has no attribute 'propagate': 'VISIT_INSTALL="' + spec["visit"].prefix.bin + '"',
|
||||
|
||||
# PYTHON PACKAGES
|
||||
- opencv +python3
|
||||
@@ -207,6 +209,7 @@ spack:
|
||||
- py-seaborn
|
||||
- py-tensorflow
|
||||
- py-torch
|
||||
- py-deephyper
|
||||
|
||||
# # CUDA NOARCH
|
||||
# - bricks +cuda
|
||||
@@ -222,7 +225,7 @@ spack:
|
||||
# - arborx +cuda cuda_arch=80 ^kokkos +wrapper
|
||||
# - cabana +cuda cuda_arch=80 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=80
|
||||
# - caliper +cuda cuda_arch=80
|
||||
# - chai ~benchmarks ~tests +cuda cuda_arch=80 ^umpire ~shared
|
||||
# - chai +cuda cuda_arch=80 ^umpire ~shared
|
||||
# - cusz +cuda cuda_arch=80
|
||||
# - dealii +cuda cuda_arch=80
|
||||
# - ecp-data-vis-sdk ~rocm +adios2 ~ascent +hdf5 +vtkm +zfp +paraview +cuda cuda_arch=80 # +ascent fails because fides fetch error
|
||||
@@ -269,7 +272,7 @@ spack:
|
||||
# - arborx +cuda cuda_arch=90 ^kokkos +wrapper
|
||||
# - cabana +cuda cuda_arch=90 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=90
|
||||
# - caliper +cuda cuda_arch=90
|
||||
# - chai ~benchmarks ~tests +cuda cuda_arch=90 ^umpire ~shared
|
||||
# - chai +cuda cuda_arch=90 ^umpire ~shared
|
||||
# - cusz +cuda cuda_arch=90
|
||||
# - flecsi +cuda cuda_arch=90
|
||||
# - ginkgo +cuda cuda_arch=90
|
||||
@@ -320,7 +323,7 @@ spack:
|
||||
# - arborx +rocm amdgpu_target=gfx908
|
||||
# - cabana +rocm amdgpu_target=gfx908
|
||||
# - caliper +rocm amdgpu_target=gfx908
|
||||
# - chai ~benchmarks +rocm amdgpu_target=gfx908
|
||||
# - chai +rocm amdgpu_target=gfx908
|
||||
# - ecp-data-vis-sdk +paraview +vtkm +rocm amdgpu_target=gfx908
|
||||
# - gasnet +rocm amdgpu_target=gfx908
|
||||
# - ginkgo +rocm amdgpu_target=gfx908
|
||||
@@ -361,7 +364,7 @@ spack:
|
||||
# - arborx +rocm amdgpu_target=gfx90a
|
||||
# - cabana +rocm amdgpu_target=gfx90a
|
||||
# - caliper +rocm amdgpu_target=gfx90a
|
||||
# - chai ~benchmarks +rocm amdgpu_target=gfx90a
|
||||
# - chai +rocm amdgpu_target=gfx90a
|
||||
# - ecp-data-vis-sdk +paraview +vtkm +rocm amdgpu_target=gfx90a
|
||||
# - gasnet +rocm amdgpu_target=gfx90a
|
||||
# - ginkgo +rocm amdgpu_target=gfx90a
|
||||
|
||||
@@ -18,7 +18,7 @@ spack:
|
||||
- blt
|
||||
- caliper
|
||||
#- care ## ~benchmarks ~examples ~tests
|
||||
#- chai ## ~benchmarks ~examples ~tests
|
||||
#- chai ## ~examples
|
||||
- conduit # ^hdf5+shared
|
||||
- flux-core
|
||||
#- flux-sched
|
||||
|
||||
@@ -331,10 +331,7 @@ class Acts(CMakePackage, CudaPackage):
|
||||
depends_on("python@3.8:", when="+python @19.11:19")
|
||||
depends_on("python@3.8:", when="+python @21:")
|
||||
depends_on("py-onnxruntime@:1.12", when="+onnx @:23.2")
|
||||
# FIXME py-onnxruntime@1.12: required but not yet available
|
||||
# Ref: https://github.com/spack/spack/pull/37064
|
||||
# depends_on("py-onnxruntime@1.12:", when="+onnx @23.3:")
|
||||
conflicts("+onnx", when="@23.3:", msg="py-onnxruntime@1.12: required but not yet available")
|
||||
depends_on("py-onnxruntime@1.12:", when="+onnx @23.3:")
|
||||
depends_on("py-pybind11 @2.6.2:", when="+python @18:")
|
||||
depends_on("py-pytest", when="+python +unit_tests")
|
||||
|
||||
|
||||
@@ -26,13 +26,11 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage):
|
||||
|
||||
version("master", branch="master")
|
||||
version(
|
||||
"2.10.0-rc1", sha256="8b72142bd5aabfb80c7963f524df11b8721c09ef20caea6df5fb00c31a7747c0"
|
||||
)
|
||||
version(
|
||||
"2.9.2",
|
||||
sha256="78309297c82a95ee38ed3224c98b93d330128c753a43893f63bbe969320e4979",
|
||||
"2.10.0",
|
||||
sha256="e5984de488bda546553dd2f46f047e539333891e63b9fe73944782ba6c2d95e4",
|
||||
preferred=True,
|
||||
)
|
||||
version("2.9.2", sha256="78309297c82a95ee38ed3224c98b93d330128c753a43893f63bbe969320e4979")
|
||||
version("2.9.1", sha256="ddfa32c14494250ee8a48ef1c97a1bf6442c15484bbbd4669228a0f90242f4f9")
|
||||
version("2.9.0", sha256="69f98ef58c818bb5410133e1891ac192653b0ec96eb9468590140f2552b6e5d1")
|
||||
version("2.8.3", sha256="4906ab1899721c41dd918dddb039ba2848a1fb0cf84f3a563a1179b9d6ee0d9f")
|
||||
@@ -225,7 +223,7 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage):
|
||||
|
||||
# cmake: find threads package first
|
||||
# https://github.com/ornladios/ADIOS2/pull/3893
|
||||
patch("2.9.2-cmake-find-threads-package-first.patch", when="@2.9.2:")
|
||||
patch("2.9.2-cmake-find-threads-package-first.patch", when="@2.9")
|
||||
|
||||
@when("%fj")
|
||||
def patch(self):
|
||||
|
||||
@@ -20,6 +20,7 @@ class AmrWind(CMakePackage, CudaPackage, ROCmPackage):
|
||||
license("BSD-3-Clause")
|
||||
|
||||
version("main", branch="main", submodules=True)
|
||||
version("0.9.0", tag="v0.9.0", submodules=True)
|
||||
|
||||
variant("hypre", default=True, description="Enable Hypre integration")
|
||||
variant("ascent", default=False, description="Enable Ascent integration")
|
||||
@@ -31,9 +32,22 @@ class AmrWind(CMakePackage, CudaPackage, ROCmPackage):
|
||||
variant("shared", default=True, description="Build shared libraries")
|
||||
variant("tests", default=True, description="Activate regression tests")
|
||||
variant("tiny_profile", default=False, description="Activate tiny profile")
|
||||
variant("hdf5", default=False, description="Enable HDF5 plots with ZFP compression")
|
||||
variant("umpire", default=False, description="Enable Umpire")
|
||||
variant("sycl", default=False, description="Enable SYCL backend")
|
||||
variant("gpu-aware-mpi", default=False, description="gpu-aware-mpi")
|
||||
|
||||
depends_on("hypre~int64@2.20.0:", when="+hypre")
|
||||
depends_on("hypre+mpi", when="+hypre+mpi")
|
||||
depends_on("hdf5~mpi", when="+hdf5~mpi")
|
||||
depends_on("hdf5+mpi", when="+hdf5+mpi")
|
||||
depends_on("h5z-zfp", when="+hdf5")
|
||||
depends_on("zfp", when="+hdf5")
|
||||
depends_on("hypre+umpire", when="+umpire")
|
||||
depends_on("hypre+sycl", when="+sycl")
|
||||
depends_on("hypre+gpu-aware-mpi", when="+gpu-aware-mpi")
|
||||
depends_on("hypre@2.29.0:", when="@0.9.0:+hypre")
|
||||
|
||||
for arch in CudaPackage.cuda_arch_values:
|
||||
depends_on("hypre+cuda cuda_arch=%s" % arch, when="+cuda+hypre cuda_arch=%s" % arch)
|
||||
for arch in ROCmPackage.amdgpu_targets:
|
||||
@@ -88,6 +102,13 @@ def cmake_args(self):
|
||||
if "+mpi" in self.spec:
|
||||
args.append(define("MPI_HOME", self.spec["mpi"].prefix))
|
||||
|
||||
if "+hdf5" in self.spec:
|
||||
cmake_options.append(self.define("AMR_WIND_ENABLE_HDF5", True))
|
||||
cmake_options.append(self.define("AMR_WIND_ENABLE_HDF5_ZFP", True))
|
||||
# Help AMReX understand if HDF5 is parallel or not.
|
||||
# Building HDF5 with CMake as Spack does, causes this inspection to break.
|
||||
cmake_options.append(self.define("HDF5_IS_PARALLEL", spec.satisfies("+mpi")))
|
||||
|
||||
if "+cuda" in self.spec:
|
||||
amrex_arch = [
|
||||
"{0:.1f}".format(float(i) / 10.0) for i in self.spec.variants["cuda_arch"].value
|
||||
@@ -100,4 +121,16 @@ def cmake_args(self):
|
||||
targets = self.spec.variants["amdgpu_target"].value
|
||||
args.append("-DAMReX_AMD_ARCH=" + ";".join(str(x) for x in targets))
|
||||
|
||||
if "+sycl" in self.spec:
|
||||
cmake_options.append(self.define("AMR_WIND_ENABLE_SYCL", True))
|
||||
requires(
|
||||
"%dpcpp",
|
||||
"%oneapi",
|
||||
policy="one_of",
|
||||
msg=(
|
||||
"AMReX's SYCL GPU Backend requires DPC++ (dpcpp) "
|
||||
"or the oneAPI CXX (icpx) compiler."
|
||||
),
|
||||
)
|
||||
|
||||
return args
|
||||
|
||||
@@ -26,6 +26,7 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage):
|
||||
license("BSD-3-Clause")
|
||||
|
||||
version("develop", branch="development")
|
||||
version("24.04", sha256="77a91e75ad0106324a44ca514e1e8abc54f2fc2d453406441c871075726a8167")
|
||||
version("24.03", sha256="024876fe65838d1021fcbf8530b992bff8d9be1d3f08a1723c4e2e5f7c28b427")
|
||||
version("24.02", sha256="286cc3ca29daa69c8eafc1cd7a572662dec9eb78631ac3d33a1260868fdc6996")
|
||||
version("24.01", sha256="83dbd4dad6dc51fa4a80aad0347b15ee5a6d816cf4abcd87f7b0e2987d8131b7")
|
||||
@@ -300,11 +301,10 @@ def cmake_args(self):
|
||||
if "+sycl" in self.spec:
|
||||
args.append("-DAMReX_GPU_BACKEND=SYCL")
|
||||
# SYCL GPU backend only supported with Intel's oneAPI or DPC++ compilers
|
||||
sycl_compatible_compilers = ["dpcpp", "icpx"]
|
||||
sycl_compatible_compilers = ["icpx"]
|
||||
if not (os.path.basename(self.compiler.cxx) in sycl_compatible_compilers):
|
||||
raise InstallError(
|
||||
"AMReX's SYCL GPU Backend requires DPC++ (dpcpp)"
|
||||
+ " or the oneAPI CXX (icpx) compiler."
|
||||
"AMReX's SYCL GPU Backend requires the oneAPI CXX (icpx) compiler."
|
||||
)
|
||||
|
||||
return args
|
||||
|
||||
@@ -185,7 +185,10 @@ class Ascent(CMakePackage, CudaPackage):
|
||||
# RAJA and Umpire
|
||||
#######################
|
||||
depends_on("raja", when="+raja")
|
||||
depends_on("raja+openmp", when="+raja +openmp")
|
||||
depends_on("raja~openmp", when="+raja ~openmp")
|
||||
depends_on("umpire", when="+umpire")
|
||||
depends_on("umpire@:2023.06.0", when="@:0.9.2 +umpire")
|
||||
|
||||
#######################
|
||||
# BabelFlow
|
||||
|
||||
@@ -104,7 +104,7 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
depends_on("cmake@3.21:", type="build", when="+rocm")
|
||||
|
||||
depends_on("blt", type="build")
|
||||
depends_on("blt@0.5.1:", type="build", when="@0.6.1:")
|
||||
depends_on("blt@0.5.1:0.5.3", type="build", when="@0.6.1:")
|
||||
|
||||
depends_on("mpi", when="+mpi")
|
||||
|
||||
@@ -122,13 +122,13 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
depends_on("scr~fortran", when="+scr~fortran")
|
||||
|
||||
with when("+umpire"):
|
||||
depends_on("umpire@2022.03.0:", when="@0.7.0:")
|
||||
depends_on("umpire@2022.03.0:2023.06", when="@0.7.0:")
|
||||
depends_on("umpire@6.0.0", when="@0.6.0")
|
||||
depends_on("umpire@5:5.0.1", when="@:0.5.0")
|
||||
depends_on("umpire +openmp", when="+openmp")
|
||||
|
||||
with when("+raja"):
|
||||
depends_on("raja@2022.03.0:", when="@0.7.0:")
|
||||
depends_on("raja@2022.03.0:2023.06", when="@0.7.0:")
|
||||
depends_on("raja@0.14.0", when="@0.6.0")
|
||||
depends_on("raja@:0.13.0", when="@:0.5.0")
|
||||
depends_on("raja~openmp", when="~openmp")
|
||||
|
||||
@@ -131,6 +131,8 @@ class Bazel(Package):
|
||||
# Bazel-4.0.0 does not compile with gcc-11
|
||||
# Newer versions of grpc and abseil dependencies are needed but are not in bazel-4.0.0
|
||||
conflicts("@4.0.0", when="%gcc@11:")
|
||||
# https://github.com/bazelbuild/bazel/issues/18642
|
||||
conflicts("@:6", when="%gcc@13:")
|
||||
|
||||
executables = ["^bazel$"]
|
||||
|
||||
|
||||
@@ -3,9 +3,57 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import os
|
||||
import re
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
def spec_uses_toolchain(spec):
|
||||
gcc_toolchain_regex = re.compile(".*gcc-toolchain.*")
|
||||
using_toolchain = list(filter(gcc_toolchain_regex.match, spec.compiler_flags["cxxflags"]))
|
||||
return using_toolchain
|
||||
|
||||
|
||||
def spec_uses_gccname(spec):
|
||||
gcc_name_regex = re.compile(".*gcc-name.*")
|
||||
using_gcc_name = list(filter(gcc_name_regex.match, spec.compiler_flags["cxxflags"]))
|
||||
return using_gcc_name
|
||||
|
||||
|
||||
def llnl_link_helpers(options, spec, compiler):
|
||||
# From local package:
|
||||
if compiler.fc:
|
||||
fortran_compilers = ["gfortran", "xlf"]
|
||||
if any(f_comp in compiler.fc for f_comp in fortran_compilers) and (
|
||||
"clang" in compiler.cxx
|
||||
):
|
||||
# Pass fortran compiler lib as rpath to find missing libstdc++
|
||||
libdir = os.path.join(os.path.dirname(os.path.dirname(compiler.fc)), "lib")
|
||||
flags = ""
|
||||
for _libpath in [libdir, libdir + "64"]:
|
||||
if os.path.exists(_libpath):
|
||||
flags += " -Wl,-rpath,{0}".format(_libpath)
|
||||
description = "Adds a missing libstdc++ rpath"
|
||||
if flags:
|
||||
options.append(cmake_cache_string("BLT_EXE_LINKER_FLAGS", flags, description))
|
||||
|
||||
if "cce" in compiler.cxx:
|
||||
description = "Adds a missing rpath for libraries " "associated with the fortran compiler"
|
||||
# Here is where to find libs that work for fortran
|
||||
libdir = "/opt/cray/pe/cce/{0}/cce-clang/x86_64/lib".format(compiler.version)
|
||||
linker_flags = "${{BLT_EXE_LINKER_FLAGS}} -Wl,-rpath,{0}".format(libdir)
|
||||
|
||||
version = "{0}".format(compiler.version)
|
||||
|
||||
if version == "16.0.0" or version == "16.0.1":
|
||||
# Here is another directory added by cce@16.0.0 and cce@16.0.1
|
||||
libdir = os.path.join(libdir, "x86_64-unknown-linux-gnu")
|
||||
linker_flags += " -Wl,-rpath,{0}".format(libdir)
|
||||
|
||||
options.append(cmake_cache_string("BLT_EXE_LINKER_FLAGS", linker_flags, description))
|
||||
|
||||
|
||||
class Blt(Package):
|
||||
"""BLT is a streamlined CMake-based foundation for Building, Linking and
|
||||
Testing large-scale high performance computing (HPC) applications."""
|
||||
|
||||
@@ -18,4 +18,5 @@ class Byfl(CMakePackage):
|
||||
|
||||
version("1.8.0", sha256="45a9640ba2d77153a425c72349c18b124754123b30c411707b71abd217bbfce0")
|
||||
|
||||
depends_on("llvm@:13.9999")
|
||||
# llvm-13 builds, but doesn’t work
|
||||
depends_on("llvm@:12.9999")
|
||||
|
||||
@@ -78,7 +78,7 @@ class Caliper(CMakePackage, CudaPackage, ROCmPackage):
|
||||
is_linux = sys.platform.startswith("linux")
|
||||
variant("shared", default=True, description="Build shared libraries")
|
||||
variant("adiak", default=True, description="Enable Adiak support")
|
||||
variant("mpi", default=True, description="Enable MPI wrappers")
|
||||
variant("mpi", default=True, description="Enable MPI support")
|
||||
# libunwind has some issues on Mac
|
||||
variant(
|
||||
"libunwind", default=sys.platform != "darwin", description="Enable stack unwind support"
|
||||
@@ -94,6 +94,7 @@ class Caliper(CMakePackage, CudaPackage, ROCmPackage):
|
||||
variant("fortran", default=False, description="Enable Fortran support")
|
||||
variant("variorum", default=False, description="Enable Variorum support")
|
||||
variant("kokkos", default=True, when="@2.3.0:", description="Enable Kokkos profiling support")
|
||||
variant("tests", default=False, description="Enable tests")
|
||||
|
||||
depends_on("adiak@0.1:0", when="@2.2: +adiak")
|
||||
|
||||
|
||||
@@ -3,29 +3,9 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import glob
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
def hip_repair_options(options, spec):
|
||||
# there is only one dir like this, but the version component is unknown
|
||||
options.append(
|
||||
"-DHIP_CLANG_INCLUDE_PATH="
|
||||
+ glob.glob("{}/lib/clang/*/include".format(spec["llvm-amdgpu"].prefix))[0]
|
||||
)
|
||||
|
||||
|
||||
def hip_repair_cache(options, spec):
|
||||
# there is only one dir like this, but the version component is unknown
|
||||
options.append(
|
||||
cmake_cache_path(
|
||||
"HIP_CLANG_INCLUDE_PATH",
|
||||
glob.glob("{}/lib/clang/*/include".format(spec["llvm-amdgpu"].prefix))[0],
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
class Camp(CMakePackage, CudaPackage, ROCmPackage):
|
||||
"""
|
||||
Compiler agnostic metaprogramming library providing concepts,
|
||||
@@ -40,8 +20,21 @@ class Camp(CMakePackage, CudaPackage, ROCmPackage):
|
||||
|
||||
license("BSD-3-Clause")
|
||||
|
||||
version("main", branch="main", submodules="True")
|
||||
version("main", branch="main", submodules=False)
|
||||
version(
|
||||
"2024.02.0",
|
||||
tag="v2024.02.0",
|
||||
commit="03c80a6c6ab4f97e76a52639563daec71435a277",
|
||||
submodules=False,
|
||||
)
|
||||
version(
|
||||
"2023.06.0",
|
||||
tag="v2023.06.0",
|
||||
commit="ac34c25b722a06b138bc045d38bfa5e8fa3ec9c5",
|
||||
submodules=False,
|
||||
)
|
||||
version("2022.10.1", sha256="2d12f1a46f5a6d01880fc075cfbd332e2cf296816a7c1aa12d4ee5644d386f02")
|
||||
version("2022.10.0", sha256="3561c3ef00bbcb61fe3183c53d49b110e54910f47e7fc689ad9ccce57e55d6b8")
|
||||
version("2022.03.2", sha256="bc4aaeacfe8f2912e28f7a36fc731ab9e481bee15f2c6daf0cb208eed3f201eb")
|
||||
version("2022.03.0", sha256="e9090d5ee191ea3a8e36b47a8fe78f3ac95d51804f1d986d931e85b8f8dad721")
|
||||
version("0.3.0", sha256="129431a049ca5825443038ad5a37a86ba6d09b2618d5fe65d35f83136575afdb")
|
||||
@@ -51,12 +44,13 @@ class Camp(CMakePackage, CudaPackage, ROCmPackage):
|
||||
|
||||
# TODO: figure out gtest dependency and then set this default True.
|
||||
variant("tests", default=False, description="Build tests")
|
||||
variant("openmp", default=False, description="Build OpenMP support")
|
||||
variant("openmp", default=False, description="Build with OpenMP support")
|
||||
|
||||
depends_on("cub", when="+cuda")
|
||||
|
||||
depends_on("blt", type="build")
|
||||
depends_on("blt@0.5.0:0.5.3", type="build", when="@2022.03.0:")
|
||||
depends_on("blt@0.6.1:", type="build", when="@2024.02.0:")
|
||||
depends_on("blt@0.5.0:0.5.3", type="build", when="@2022.03.0:2023.06.0")
|
||||
|
||||
patch("libstdc++-13-missing-header.patch", when="@:2022.10")
|
||||
|
||||
@@ -69,11 +63,9 @@ def cmake_args(self):
|
||||
|
||||
options.append("-DBLT_SOURCE_DIR={0}".format(spec["blt"].prefix))
|
||||
|
||||
options.append("-DENABLE_OPENMP=" + ("On" if "+openmp" in spec else "Off"))
|
||||
options.append(self.define_from_variant("ENABLE_CUDA", "cuda"))
|
||||
if "+cuda" in spec:
|
||||
options.extend(
|
||||
["-DENABLE_CUDA=ON", "-DCUDA_TOOLKIT_ROOT_DIR=%s" % (spec["cuda"].prefix)]
|
||||
)
|
||||
options.append("-DCUDA_TOOLKIT_ROOT_DIR={0}".format(spec["cuda"].prefix))
|
||||
|
||||
if not spec.satisfies("cuda_arch=none"):
|
||||
cuda_arch = spec.variants["cuda_arch"].value
|
||||
@@ -81,21 +73,17 @@ def cmake_args(self):
|
||||
options.append("-DCUDA_ARCH=sm_{0}".format(cuda_arch[0]))
|
||||
flag = "-arch sm_{0}".format(cuda_arch[0])
|
||||
options.append("-DCMAKE_CUDA_FLAGS:STRING={0}".format(flag))
|
||||
else:
|
||||
options.append("-DENABLE_CUDA=OFF")
|
||||
|
||||
options.append(self.define_from_variant("ENABLE_HIP", "rocm"))
|
||||
if "+rocm" in spec:
|
||||
options.extend(["-DENABLE_HIP=ON", "-DHIP_ROOT_DIR={0}".format(spec["hip"].prefix)])
|
||||
|
||||
hip_repair_options(options, spec)
|
||||
options.append("-DHIP_ROOT_DIR={0}".format(spec["hip"].prefix))
|
||||
|
||||
archs = self.spec.variants["amdgpu_target"].value
|
||||
if archs != "none":
|
||||
arch_str = ",".join(archs)
|
||||
options.append("-DHIP_HIPCC_FLAGS=--amdgpu-target={0}".format(arch_str))
|
||||
else:
|
||||
options.append("-DENABLE_HIP=OFF")
|
||||
options.append("-DCMAKE_HIP_ARCHITECTURES={0}".format(archs))
|
||||
options.append("-DGPU_TARGETS={0}".format(archs))
|
||||
options.append("-DAMDGPU_TARGETS={0}".format(archs))
|
||||
|
||||
options.append(self.define_from_variant("ENABLE_OPENMP", "openmp"))
|
||||
options.append(self.define_from_variant("ENABLE_TESTS", "tests"))
|
||||
|
||||
return options
|
||||
|
||||
@@ -45,7 +45,7 @@ class Care(CMakePackage, CudaPackage, ROCmPackage):
|
||||
depends_on("camp")
|
||||
depends_on("umpire@develop")
|
||||
depends_on("raja@develop")
|
||||
depends_on("chai@develop+enable_pick~benchmarks")
|
||||
depends_on("chai@develop+enable_pick")
|
||||
|
||||
# WARNING: this package currently only supports an internal cub
|
||||
# package. This will cause a race condition if compiled with another
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/cmake/thirdparty/SetupChaiThirdparty.cmake b/cmake/thirdparty/SetupChaiThirdparty.cmake
|
||||
index d0be864..a8b33f0 100644
|
||||
--- a/cmake/thirdparty/SetupChaiThirdparty.cmake
|
||||
+++ b/cmake/thirdparty/SetupChaiThirdparty.cmake
|
||||
@@ -12,7 +12,7 @@ if (NOT TARGET umpire)
|
||||
find_package(umpire REQUIRED)
|
||||
|
||||
if (ENABLE_MPI)
|
||||
- set(UMPIRE_DEPENDS mpi)
|
||||
+ set(UMPIRE_DEPENDS MPI::MPI_CXX)
|
||||
else()
|
||||
set(UMPIRE_DEPENDS)
|
||||
endif()
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
from spack.package import *
|
||||
|
||||
from .blt import llnl_link_helpers
|
||||
|
||||
|
||||
class Chai(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
"""
|
||||
@@ -22,7 +24,24 @@ class Chai(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
license("BSD-3-Clause")
|
||||
|
||||
version("develop", branch="develop", submodules=False)
|
||||
version("main", branch="main", submodules=False)
|
||||
version(
|
||||
"2024.02.0",
|
||||
tag="v2024.02.0",
|
||||
commit="31773a2f0d30f3f64c82939f60fc4da32cf33261",
|
||||
submodules=False,
|
||||
)
|
||||
version(
|
||||
"2023.06.0",
|
||||
tag="v2023.06.0",
|
||||
commit="6fe3470ad020303530af2f3dbbfe18826bd3319b",
|
||||
submodules=False,
|
||||
)
|
||||
version(
|
||||
"2022.10.0",
|
||||
tag="v2022.10.0",
|
||||
commit="9510efd33b06e4443b15447eebb7dad761822654",
|
||||
submodules=False,
|
||||
)
|
||||
version(
|
||||
"2022.03.0",
|
||||
tag="v2022.03.0",
|
||||
@@ -61,6 +80,10 @@ class Chai(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
)
|
||||
version("1.0", tag="v1.0", commit="501a098ad879dc8deb4a74fcfe8c08c283a10627", submodules=True)
|
||||
|
||||
# Patching Umpire for dual BLT targets import changed MPI target name in Umpire link interface
|
||||
# We propagate the patch here.
|
||||
patch("change_mpi_target_name_umpire_patch.patch", when="@2022.10.0:2023.06.0")
|
||||
|
||||
variant("enable_pick", default=False, description="Enable pick method")
|
||||
variant(
|
||||
"separable_compilation",
|
||||
@@ -68,29 +91,43 @@ class Chai(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
description="Build with CUDA_SEPARABLE_COMPILATION flag on ",
|
||||
)
|
||||
variant("shared", default=True, description="Build Shared Libs")
|
||||
variant("mpi", default=False, description="Enable MPI support")
|
||||
variant("raja", default=False, description="Build plugin for RAJA")
|
||||
variant("benchmarks", default=False, description="Build benchmarks.")
|
||||
variant("examples", default=True, description="Build examples.")
|
||||
variant("openmp", default=False, description="Build using OpenMP")
|
||||
# TODO: figure out gtest dependency and then set this default True
|
||||
# and remove the +tests conflict below.
|
||||
variant("tests", default=False, description="Build tests")
|
||||
variant(
|
||||
"tests",
|
||||
default="none",
|
||||
values=("none", "basic", "benchmarks"),
|
||||
multi=False,
|
||||
description="Tests to run",
|
||||
)
|
||||
|
||||
depends_on("cmake@3.8:", type="build")
|
||||
depends_on("cmake@3.9:", type="build", when="+cuda")
|
||||
depends_on("cmake@3.14:", when="@2022.03.0:")
|
||||
depends_on("cmake@3.14:", type="build", when="@2022.03.0:")
|
||||
|
||||
depends_on("blt@0.5.0:", type="build", when="@2022.03.0:")
|
||||
depends_on("blt@0.4.1:", type="build", when="@2.4.0:")
|
||||
depends_on("blt@0.4.0:", type="build", when="@2.3.0")
|
||||
depends_on("blt@0.3.6:", type="build", when="@:2.2.2")
|
||||
depends_on("blt")
|
||||
depends_on("blt@0.6.1:", type="build", when="@2024.02.0:")
|
||||
depends_on("blt@0.5.3", type="build", when="@2023.06.0")
|
||||
depends_on("blt@0.5.2:0.5.3", type="build", when="@2022.10.0")
|
||||
depends_on("blt@0.5.0:0.5.3", type="build", when="@2022.03.0")
|
||||
depends_on("blt@0.4.1:0.5.3", type="build", when="@2.4.0")
|
||||
depends_on("blt@0.4.0:0.5.3", type="build", when="@2.3.0")
|
||||
depends_on("blt@0.3.6:0.5.3", type="build", when="@:2.2.2")
|
||||
conflicts("^blt@:0.3.6", when="+rocm")
|
||||
|
||||
depends_on("umpire")
|
||||
depends_on("umpire@2022.03.0:", when="@2022.03.0:")
|
||||
depends_on("umpire@2024.02.0:", when="@2024.02.0:")
|
||||
depends_on("umpire@2023.06.0", when="@2023.06.0")
|
||||
depends_on("umpire@2022.10.0:2023.06.0", when="@2022.10.0")
|
||||
depends_on("umpire@2022.03.0:2023.06.0", when="@2022.03.0")
|
||||
depends_on("umpire@6.0.0", when="@2.4.0")
|
||||
depends_on("umpire@4.1.2", when="@2.2.0:2.3.0")
|
||||
depends_on("umpire@main", when="@main")
|
||||
|
||||
depends_on("umpire+mpi", when="+mpi")
|
||||
|
||||
with when("+cuda"):
|
||||
depends_on("umpire+cuda")
|
||||
@@ -107,11 +144,13 @@ class Chai(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
with when("+raja"):
|
||||
depends_on("raja~openmp", when="~openmp")
|
||||
depends_on("raja+openmp", when="+openmp")
|
||||
depends_on("raja@0.14.0", when="@2.4.0")
|
||||
depends_on("raja@0.13.0", when="@2.3.0")
|
||||
depends_on("raja@2024.02.0:", when="@2024.02.0:")
|
||||
depends_on("raja@2023.06.0", when="@2023.06.0")
|
||||
depends_on("raja@2022.10.0:2023.06.0", when="@2022.10.0")
|
||||
depends_on("raja@2022.03.0:2023.06.0", when="@2022.03.0")
|
||||
depends_on("raja@0.12.0", when="@2.2.0:2.2.2")
|
||||
depends_on("raja@2022.03.0:", when="@2022.03.0:")
|
||||
depends_on("raja@main", when="@main")
|
||||
depends_on("raja@0.13.0", when="@2.3.0")
|
||||
depends_on("raja@0.14.0", when="@2.4.0")
|
||||
|
||||
with when("+cuda"):
|
||||
depends_on("raja+cuda")
|
||||
@@ -125,7 +164,7 @@ class Chai(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
when="amdgpu_target={0}".format(arch),
|
||||
)
|
||||
|
||||
conflicts("+benchmarks", when="~tests")
|
||||
depends_on("mpi", when="+mpi")
|
||||
|
||||
def _get_sys_type(self, spec):
|
||||
sys_type = spec.architecture
|
||||
@@ -138,25 +177,31 @@ def cache_name(self):
|
||||
hostname = socket.gethostname()
|
||||
if "SYS_TYPE" in env:
|
||||
hostname = hostname.rstrip("1234567890")
|
||||
return "{0}-{1}-{2}@{3}.cmake".format(
|
||||
return "{0}-{1}-{2}@{3}-{4}.cmake".format(
|
||||
hostname,
|
||||
self._get_sys_type(self.spec),
|
||||
self.spec.compiler.name,
|
||||
self.spec.compiler.version,
|
||||
self.spec.dag_hash(8),
|
||||
)
|
||||
|
||||
def initconfig_compiler_entries(self):
|
||||
spec = self.spec
|
||||
compiler = self.compiler
|
||||
# Default entries are already defined in CachedCMakePackage, inherit them:
|
||||
entries = super().initconfig_compiler_entries()
|
||||
if "+rocm" in spec:
|
||||
entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
|
||||
|
||||
llnl_link_helpers(entries, spec, compiler)
|
||||
|
||||
return entries
|
||||
|
||||
def initconfig_hardware_entries(self):
|
||||
spec = self.spec
|
||||
entries = super().initconfig_hardware_entries()
|
||||
|
||||
entries.append(cmake_cache_option("ENABLE_OPENMP", "+openmp" in spec))
|
||||
entries.append("#------------------{0}".format("-" * 30))
|
||||
entries.append("# Package custom hardware settings")
|
||||
entries.append("#------------------{0}\n".format("-" * 30))
|
||||
|
||||
if "+cuda" in spec:
|
||||
entries.append(cmake_cache_option("ENABLE_CUDA", True))
|
||||
@@ -164,54 +209,67 @@ def initconfig_hardware_entries(self):
|
||||
entries.append(cmake_cache_option("CMAKE_CUDA_SEPARABLE_COMPILATION", True))
|
||||
entries.append(cmake_cache_option("CUDA_SEPARABLE_COMPILATION", True))
|
||||
|
||||
if not spec.satisfies("cuda_arch=none"):
|
||||
cuda_arch = spec.variants["cuda_arch"].value
|
||||
entries.append(cmake_cache_string("CUDA_ARCH", "sm_{0}".format(cuda_arch[0])))
|
||||
entries.append(
|
||||
cmake_cache_string("CMAKE_CUDA_ARCHITECTURES", "{0}".format(cuda_arch[0]))
|
||||
)
|
||||
flag = "-arch sm_{0}".format(cuda_arch[0])
|
||||
entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS", "{0}".format(flag)))
|
||||
else:
|
||||
entries.append(cmake_cache_option("ENABLE_CUDA", False))
|
||||
|
||||
if "+rocm" in spec:
|
||||
entries.append(cmake_cache_option("ENABLE_HIP", True))
|
||||
entries.append(cmake_cache_path("HIP_ROOT_DIR", "{0}".format(spec["hip"].prefix)))
|
||||
archs = self.spec.variants["amdgpu_target"].value
|
||||
if archs != "none":
|
||||
arch_str = ",".join(archs)
|
||||
entries.append(
|
||||
cmake_cache_string("HIP_HIPCC_FLAGS", "--amdgpu-target={0}".format(arch_str))
|
||||
)
|
||||
else:
|
||||
entries.append(cmake_cache_option("ENABLE_HIP", False))
|
||||
|
||||
return entries
|
||||
|
||||
def initconfig_mpi_entries(self):
|
||||
spec = self.spec
|
||||
|
||||
entries = super(Chai, self).initconfig_mpi_entries()
|
||||
entries.append(cmake_cache_option("ENABLE_MPI", "+mpi" in spec))
|
||||
|
||||
return entries
|
||||
|
||||
def initconfig_package_entries(self):
|
||||
spec = self.spec
|
||||
entries = []
|
||||
|
||||
option_prefix = "CHAI_" if spec.satisfies("@2022.03.0:") else ""
|
||||
|
||||
# TPL locations
|
||||
entries.append("#------------------{0}".format("-" * 60))
|
||||
entries.append("# TPLs")
|
||||
entries.append("#------------------{0}\n".format("-" * 60))
|
||||
|
||||
entries.append(cmake_cache_path("BLT_SOURCE_DIR", spec["blt"].prefix))
|
||||
if "+raja" in spec:
|
||||
entries.append(cmake_cache_option("{}ENABLE_RAJA_PLUGIN".format(option_prefix), True))
|
||||
entries.append(cmake_cache_path("RAJA_DIR", spec["raja"].prefix))
|
||||
entries.append(cmake_cache_path("umpire_DIR", spec["umpire"].prefix))
|
||||
|
||||
# Build options
|
||||
entries.append("#------------------{0}".format("-" * 60))
|
||||
entries.append("# Build Options")
|
||||
entries.append("#------------------{0}\n".format("-" * 60))
|
||||
|
||||
# Build options
|
||||
entries.append(cmake_cache_string("CMAKE_BUILD_TYPE", spec.variants["build_type"].value))
|
||||
entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec))
|
||||
|
||||
# Generic options that have a prefixed equivalent in CHAI CMake
|
||||
entries.append(cmake_cache_option("ENABLE_OPENMP", "+openmp" in spec))
|
||||
entries.append(cmake_cache_option("ENABLE_EXAMPLES", "+examples" in spec))
|
||||
entries.append(cmake_cache_option("ENABLE_DOCS", False))
|
||||
if "tests=benchmarks" in spec:
|
||||
# BLT requires ENABLE_TESTS=True to enable benchmarks
|
||||
entries.append(cmake_cache_option("ENABLE_BENCHMARKS", True))
|
||||
entries.append(cmake_cache_option("ENABLE_TESTS", True))
|
||||
else:
|
||||
entries.append(cmake_cache_option("ENABLE_TESTS", "tests=none" not in spec))
|
||||
|
||||
# Prefixed options that used to be name without one
|
||||
entries.append(
|
||||
cmake_cache_option("{}ENABLE_PICK".format(option_prefix), "+enable_pick" in spec)
|
||||
)
|
||||
entries.append(cmake_cache_path("umpire_DIR", spec["umpire"].prefix.share.umpire.cmake))
|
||||
entries.append(cmake_cache_option("ENABLE_TESTS", "+tests" in spec))
|
||||
entries.append(cmake_cache_option("ENABLE_BENCHMARKS", "+benchmarks" in spec))
|
||||
entries.append(
|
||||
cmake_cache_option("{}ENABLE_EXAMPLES".format(option_prefix), "+examples" in spec)
|
||||
)
|
||||
entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec))
|
||||
|
||||
return entries
|
||||
|
||||
def cmake_args(self):
|
||||
options = []
|
||||
return options
|
||||
return []
|
||||
|
||||
@@ -43,7 +43,7 @@ class Datatransferkit(CMakePackage):
|
||||
depends_on("trilinos+openmp", when="+openmp")
|
||||
depends_on("trilinos+stratimikos+belos", when="@master")
|
||||
depends_on("trilinos@13:13.4.1", when="@3.1-rc2:3.1-rc3")
|
||||
depends_on("trilinos@14:", when="@3.1.0:")
|
||||
depends_on("trilinos@14.2:", when="@3.1.0:")
|
||||
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
|
||||
@@ -41,10 +41,8 @@ class DoubleBatchedFftLibrary(CMakePackage):
|
||||
|
||||
def cmake_args(self):
|
||||
cxx_compiler = os.path.basename(self.compiler.cxx)
|
||||
if self.spec.satisfies("+sycl") and cxx_compiler not in ["icpx", "dpcpp"]:
|
||||
raise InstallError(
|
||||
"The Double-Batched FFT Library requires the oneapi DPC++/C++ Compiler"
|
||||
)
|
||||
if self.spec.satisfies("+sycl") and cxx_compiler not in ["icpx"]:
|
||||
raise InstallError("The Double-Batched FFT Library requires the oneapi C++ Compiler")
|
||||
|
||||
return [
|
||||
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
|
||||
|
||||
@@ -1,166 +0,0 @@
|
||||
# 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
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Dpcpp(CMakePackage):
|
||||
"""Data Parallel C++ compiler: Intel's implementation of SYCL programming model"""
|
||||
|
||||
homepage = "https://intel.github.io/llvm-docs/"
|
||||
git = "https://github.com/intel/llvm.git"
|
||||
|
||||
license("Apache-2.0")
|
||||
|
||||
version("develop", branch="sycl")
|
||||
version("2021.09", commit="bd68232bb96386bf7649345c0557ba520e73c02d")
|
||||
version("2021.12", commit="27f59d8906fcc8aece7ff6aa570ccdee52168c2d")
|
||||
|
||||
maintainers("ravil-mobile")
|
||||
variant("cuda", default=False, description="switch from OpenCL to CUDA")
|
||||
variant("rocm", default=False, description="switch from OpenCL to ROCm")
|
||||
variant(
|
||||
"rocm-platform",
|
||||
default="AMD",
|
||||
values=("AMD", "NVIDIA"),
|
||||
multi=False,
|
||||
description="choose ROCm backend",
|
||||
)
|
||||
variant("openmp", default=False, description="build with OpenMP without target offloading")
|
||||
variant("esimd-cpu", default=False, description="build with ESIMD_CPU support")
|
||||
variant("assertions", default=False, description="build with assertions")
|
||||
variant("docs", default=False, description="build Doxygen documentation")
|
||||
variant("werror", default=False, description="treat warnings as errors")
|
||||
variant("shared", default=False, description="build shared libraries")
|
||||
variant("remangle_libclc", default=True, description="remangle libclc gen. variants")
|
||||
variant("lld", default=False, description="use LLD linker for build")
|
||||
|
||||
depends_on("cmake@3.16.2:", type="build")
|
||||
depends_on("ninja@1.10.0:", type="build")
|
||||
|
||||
depends_on("cuda@10.2.0:11.4.999", when="+cuda")
|
||||
|
||||
# NOTE: AMD HIP needs to be tested; it will be done in the next update
|
||||
# depends_on('cuda@10.2.0:10.2.999', when='rocm-platform=NVIDIA', type='build')
|
||||
# depends_on('hip@4.0.0:', when='+rocm', type='build')
|
||||
|
||||
root_cmakelists_dir = "llvm"
|
||||
|
||||
def cmake_args(self):
|
||||
llvm_external_projects = "sycl;llvm-spirv;opencl;libdevice;xpti;xptifw"
|
||||
|
||||
if "+openmp" in self.spec:
|
||||
llvm_external_projects += ";openmp"
|
||||
|
||||
sycl_dir = os.path.join(self.stage.source_path, "sycl")
|
||||
spirv_dir = os.path.join(self.stage.source_path, "llvm-spirv")
|
||||
xpti_dir = os.path.join(self.stage.source_path, "xpti")
|
||||
xptifw_dir = os.path.join(self.stage.source_path, "xptifw")
|
||||
libdevice_dir = os.path.join(self.stage.source_path, "libdevice")
|
||||
llvm_enable_projects = "clang;" + llvm_external_projects
|
||||
libclc_targets_to_build = ""
|
||||
sycl_build_pi_rocm_platform = self.spec.variants["rocm-platform"].value
|
||||
|
||||
if self.spec.satisfies("target=x86_64:"):
|
||||
llvm_targets_to_build = "X86"
|
||||
elif self.spec.satisfies("target=aarch64:"):
|
||||
llvm_targets_to_build = "ARM;AArch64"
|
||||
else:
|
||||
raise InstallError(
|
||||
"target is not supported. " "This package only works on x86_64 or aarch64"
|
||||
)
|
||||
|
||||
is_cuda = "+cuda" in self.spec
|
||||
is_rocm = "+rocm" in self.spec
|
||||
|
||||
if is_cuda or is_rocm:
|
||||
llvm_enable_projects += ";libclc"
|
||||
|
||||
if is_cuda:
|
||||
llvm_targets_to_build += ";NVPTX"
|
||||
libclc_targets_to_build = "nvptx64--;nvptx64--nvidiacl"
|
||||
|
||||
if is_rocm:
|
||||
if sycl_build_pi_rocm_platform == "AMD":
|
||||
llvm_targets_to_build += ";AMDGPU"
|
||||
libclc_targets_to_build += ";amdgcn--;amdgcn--amdhsa"
|
||||
elif sycl_build_pi_rocm_platform and not is_cuda:
|
||||
llvm_targets_to_build += ";NVPTX"
|
||||
libclc_targets_to_build += ";nvptx64--;nvptx64--nvidiacl"
|
||||
|
||||
args = [
|
||||
self.define_from_variant("LLVM_ENABLE_ASSERTIONS", "assertions"),
|
||||
self.define("LLVM_TARGETS_TO_BUILD", llvm_targets_to_build),
|
||||
self.define("LLVM_EXTERNAL_PROJECTS", llvm_external_projects),
|
||||
self.define("LLVM_EXTERNAL_SYCL_SOURCE_DIR", sycl_dir),
|
||||
self.define("LLVM_EXTERNAL_LLVM_SPIRV_SOURCE_DIR", spirv_dir),
|
||||
self.define("LLVM_EXTERNAL_XPTI_SOURCE_DIR", xpti_dir),
|
||||
self.define("XPTI_SOURCE_DIR", xpti_dir),
|
||||
self.define("LLVM_EXTERNAL_XPTIFW_SOURCE_DIR", xptifw_dir),
|
||||
self.define("LLVM_EXTERNAL_LIBDEVICE_SOURCE_DIR", libdevice_dir),
|
||||
self.define("LLVM_ENABLE_PROJECTS", llvm_enable_projects),
|
||||
self.define("LIBCLC_TARGETS_TO_BUILD", libclc_targets_to_build),
|
||||
self.define_from_variant("SYCL_BUILD_PI_CUDA", "cuda"),
|
||||
self.define_from_variant("SYCL_BUILD_PI_ROCM", "rocm"),
|
||||
self.define("SYCL_BUILD_PI_ROCM_PLATFORM", sycl_build_pi_rocm_platform),
|
||||
self.define("LLVM_BUILD_TOOLS", True),
|
||||
self.define_from_variant("SYCL_ENABLE_WERROR", "werror"),
|
||||
self.define("SYCL_INCLUDE_TESTS", True),
|
||||
self.define_from_variant("LIBCLC_GENERATE_REMANGLED_VARIANTS", "remangle_libclc"),
|
||||
self.define_from_variant("LLVM_ENABLE_DOXYGEN", "docs"),
|
||||
self.define_from_variant("LLVM_ENABLE_SPHINX", "docs"),
|
||||
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
|
||||
self.define("SYCL_ENABLE_XPTI_TRACING", "ON"),
|
||||
self.define_from_variant("LLVM_ENABLE_LLD", "lld"),
|
||||
self.define_from_variant("SYCL_BUILD_PI_ESIMD_CPU", "esimd-cpu"),
|
||||
]
|
||||
|
||||
if is_cuda or (is_rocm and sycl_build_pi_rocm_platform == "NVIDIA"):
|
||||
args.append(self.define("CUDA_TOOLKIT_ROOT_DIR", self.spec["cuda"].prefix))
|
||||
|
||||
if "+openmp" in self.spec:
|
||||
omp_dir = os.path.join(self.stage.source_path, "openmp")
|
||||
args.extend(
|
||||
[
|
||||
self.define("LLVM_EXTERNAL_OPENMP_SOURCE_DIR", omp_dir),
|
||||
self.define("OPENMP_ENABLE_LIBOMPTARGET", False),
|
||||
]
|
||||
)
|
||||
|
||||
if self.compiler.name == "gcc":
|
||||
gcc_prefix = ancestor(self.compiler.cc, 2)
|
||||
args.append(self.define("GCC_INSTALL_PREFIX", gcc_prefix))
|
||||
|
||||
return args
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
if "+cuda" in self.spec:
|
||||
env.set("CUDA_LIB_PATH", "{0}/lib64/stubs".format(self.spec["cuda"].prefix))
|
||||
|
||||
@run_after("install")
|
||||
def post_install(self):
|
||||
clang_cpp_path = os.path.join(self.spec.prefix.bin, "clang++")
|
||||
dpcpp_path = os.path.join(self.spec.prefix.bin, "dpcpp")
|
||||
|
||||
real_clang_cpp_path = os.path.realpath(clang_cpp_path)
|
||||
os.symlink(real_clang_cpp_path, dpcpp_path)
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
bin_path = self.spec.prefix.bin
|
||||
for env_var_name, compiler in zip(["CC", "CXX"], ["clang", "clang++"]):
|
||||
env.set(env_var_name, os.path.join(bin_path, compiler))
|
||||
|
||||
include_env_vars = ["C_INCLUDE_PATH", "CPLUS_INCLUDE_PATH", "INCLUDE"]
|
||||
for var in include_env_vars:
|
||||
env.prepend_path(var, self.prefix.include)
|
||||
env.prepend_path(var, self.prefix.include.sycl)
|
||||
|
||||
sycl_build_pi_rocm_platform = self.spec.variants["rocm-platform"].value
|
||||
if "+cuda" in self.spec or sycl_build_pi_rocm_platform == "NVIDIA":
|
||||
env.prepend_path("PATH", self.spec["cuda"].prefix.bin)
|
||||
env.set("CUDA_TOOLKIT_ROOT_DIR", self.spec["cuda"].prefix)
|
||||
@@ -81,9 +81,10 @@ class Dray(Package, CudaPackage):
|
||||
depends_on("apcomp~shared", when="~shared")
|
||||
depends_on("apcomp+shared", when="+shared")
|
||||
|
||||
depends_on("raja@0.12.0:")
|
||||
depends_on("raja@0.14.0:0.14", when="@0.1.8:")
|
||||
depends_on("raja@:0.14", when="@0.1.7:")
|
||||
depends_on("raja@:0.13", when="@:0.1.6")
|
||||
depends_on("raja@0.12.0:")
|
||||
depends_on("raja~cuda", when="~cuda")
|
||||
depends_on("raja+cuda", when="+cuda")
|
||||
propagate_cuda_arch("raja")
|
||||
|
||||
@@ -23,8 +23,18 @@ class Eospac(Package):
|
||||
# - alpha and beta versions are marked with 'deprecated=True' to help
|
||||
# spack's version comparison.
|
||||
version(
|
||||
"6.5.7",
|
||||
"6.5.9",
|
||||
preferred=True,
|
||||
sha256="54df29b1dc3b35c654ef2ebfbfa42d960a230cfb2d3c04a75ba93d3a789a312a",
|
||||
url="https://laws.lanl.gov/projects/data/eos/get_file.php?package=eospac&filename=eospac_v6.5.9_4c633156bacc7b721bdd2735e40e09984a4d60a3.tgz",
|
||||
)
|
||||
version(
|
||||
"6.5.8",
|
||||
sha256="4e2c5db150bf7f45b5615c034848b9256f8659bcde95f097e446c226c70c6d96",
|
||||
url="https://laws.lanl.gov/projects/data/eos/get_file.php?package=eospac&filename=eospac_v6.5.8_052127ccd65148632bd1258764f455c692a4dfc1.tgz",
|
||||
)
|
||||
version(
|
||||
"6.5.7",
|
||||
sha256="e59bd449bf97ce977309c6fc8a54fa30f4db9b2ca3e21f996095d78e23799e42",
|
||||
url="https://laws.lanl.gov/projects/data/eos/get_file.php?package=eospac&filename=eospac_v6.5.7_9a867a15ae4137d22e1b52199d6a46b486fc4376.tgz",
|
||||
)
|
||||
|
||||
@@ -156,7 +156,7 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage):
|
||||
# This is duplicated from HiOp
|
||||
# RAJA > 0.14 and Umpire > 6.0 require c++ std 14
|
||||
# We are working on supporting newer Umpire/RAJA versions
|
||||
depends_on("raja@0.14.0:0.14", when="@1.1.0:+raja")
|
||||
depends_on("raja@0.14.0:0.14 +shared", when="@1.1.0:+raja")
|
||||
depends_on("umpire@6.0.0:6", when="@1.1.0:+raja")
|
||||
depends_on("camp@0.2.3:0.2", when="@1.1.0:+raja")
|
||||
# This is no longer a requirement in RAJA > 0.14
|
||||
|
||||
@@ -6,37 +6,93 @@
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Exawind(CMakePackage):
|
||||
class Exawind(CMakePackage, CudaPackage, ROCmPackage):
|
||||
"""Multi-application driver for Exawind project."""
|
||||
|
||||
homepage = "https://github.com/Exawind/exawind-driver"
|
||||
git = "https://github.com/Exawind/exawind-driver.git"
|
||||
|
||||
maintainers("jrood-nrel", "psakievich")
|
||||
maintainers("jrood-nrel")
|
||||
|
||||
tags = ["ecp", "ecp-apps"]
|
||||
|
||||
# Testing is currently always enabled, but should be optional in the future
|
||||
# to avoid cloning the mesh submodule
|
||||
version("master", branch="main", submodules=True)
|
||||
version("1.0.0", tag="v1.0.0", submodules=True)
|
||||
license("Apache-2.0")
|
||||
|
||||
version("master", branch="main")
|
||||
variant("openfast", default=False, description="Enable OpenFAST integration")
|
||||
variant("hypre", default=True, description="Enable hypre solver")
|
||||
variant("stk_simd", default=False, description="Enable SIMD in STK")
|
||||
variant("umpire", default=False, description="Enable Umpire")
|
||||
variant("tiny_profile", default=False, description="Turn on AMR-wind with tiny profile")
|
||||
variant("sycl", default=False, description="Enable SYCL backend for AMR-Wind")
|
||||
variant("gpu-aware-mpi", default=False, description="gpu-aware-mpi")
|
||||
|
||||
depends_on("trilinos+stk")
|
||||
depends_on("tioga+shared~nodegid")
|
||||
depends_on("nalu-wind+hypre+openfast+tioga+wind-utils")
|
||||
depends_on("amr-wind+hypre+mpi+netcdf+openfast")
|
||||
depends_on("openfast+cxx+shared@2.6.0:")
|
||||
conflicts("amr-wind+hypre", when="+sycl")
|
||||
|
||||
for arch in CudaPackage.cuda_arch_values:
|
||||
depends_on("amr-wind+cuda cuda_arch=%s" % arch, when="+cuda cuda_arch=%s" % arch)
|
||||
depends_on("nalu-wind+cuda cuda_arch=%s" % arch, when="+cuda cuda_arch=%s" % arch)
|
||||
|
||||
for arch in ROCmPackage.amdgpu_targets:
|
||||
depends_on("amr-wind+rocm amdgpu_target=%s" % arch, when="+rocm amdgpu_target=%s" % arch)
|
||||
depends_on("nalu-wind+rocm amdgpu_target=%s" % arch, when="+rocm amdgpu_target=%s" % arch)
|
||||
|
||||
depends_on("nalu-wind+tioga")
|
||||
depends_on("amr-wind+netcdf+mpi")
|
||||
depends_on("tioga~nodegid")
|
||||
depends_on("yaml-cpp@0.6:")
|
||||
depends_on("nalu-wind+openfast", when="+openfast")
|
||||
depends_on("amr-wind+hypre", when="+hypre~sycl")
|
||||
depends_on("amr-wind~hypre", when="~hypre")
|
||||
depends_on("nalu-wind+hypre", when="+hypre")
|
||||
depends_on("nalu-wind~hypre", when="~hypre")
|
||||
depends_on("amr-wind+sycl", when="+sycl")
|
||||
depends_on("nalu-wind+umpire", when="+umpire")
|
||||
depends_on("amr-wind+umpire", when="+umpire")
|
||||
depends_on("amr-wind+tiny_profile", when="+tiny_profile")
|
||||
depends_on("nalu-wind+gpu-aware-mpi", when="+gpu-aware-mpi")
|
||||
depends_on("amr-wind+gpu-aware-mpi", when="+gpu-aware-mpi")
|
||||
depends_on("nalu-wind@2.0.0:", when="@1.0.0:")
|
||||
depends_on("amr-wind@0.9.0:", when="@1.0.0:")
|
||||
depends_on("tioga@1.0.0:", when="@1.0.0:")
|
||||
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
|
||||
args = [
|
||||
self.define("Trilinos_DIR", spec["trilinos"].prefix),
|
||||
self.define("TIOGA_DIR", spec["tioga"].prefix),
|
||||
self.define("Nalu-Wind_DIR", spec["nalu-wind"].prefix),
|
||||
self.define("AMR-Wind_DIR", spec["amr-wind"].prefix),
|
||||
self.define("OpenFAST_DIR", spec["openfast"].prefix),
|
||||
self.define("YAML-CPP_DIR", spec["yaml-cpp"].prefix),
|
||||
]
|
||||
args = [self.define("MPI_HOME", spec["mpi"].prefix)]
|
||||
|
||||
if "+umpire" in self.spec:
|
||||
args.append(self.define_from_variant("EXAWIND_ENABLE_UMPIRE", "umpire"))
|
||||
args.append(self.define("UMPIRE_DIR", self.spec["umpire"].prefix))
|
||||
|
||||
if spec.satisfies("+cuda"):
|
||||
args.append(self.define("EXAWIND_ENABLE_CUDA", True))
|
||||
args.append(self.define("CUDAToolkit_ROOT", self.spec["cuda"].prefix))
|
||||
args.append(self.define("EXAWIND_CUDA_ARCH", self.spec.variants["cuda_arch"].value))
|
||||
|
||||
if spec.satisfies("+rocm"):
|
||||
targets = self.spec.variants["amdgpu_target"].value
|
||||
args.append(self.define("EXAWIND_ENABLE_ROCM", True))
|
||||
args.append(self.define("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc))
|
||||
args.append(self.define("CMAKE_HIP_ARCHITECTURES", ";".join(str(x) for x in targets)))
|
||||
args.append(self.define("AMDGPU_TARGETS", ";".join(str(x) for x in targets)))
|
||||
args.append(self.define("GPU_TARGETS", ";".join(str(x) for x in targets)))
|
||||
|
||||
if spec.satisfies("^amr-wind+hdf5"):
|
||||
args.append(self.define("H5Z_ZFP_USE_STATIC_LIBS", True))
|
||||
|
||||
if spec.satisfies("^amr-wind+ascent"):
|
||||
args.append(self.define("CMAKE_EXE_LINKER_FLAGS", self.compiler.openmp_flag))
|
||||
|
||||
return args
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
if "~stk_simd" in self.spec:
|
||||
env.append_flags("CXXFLAGS", "-DUSE_STK_SIMD_NONE")
|
||||
if "+rocm" in self.spec:
|
||||
env.set("OMPI_CXX", self.spec["hip"].hipcc)
|
||||
env.set("MPICH_CXX", self.spec["hip"].hipcc)
|
||||
env.set("MPICXX_CXX", self.spec["hip"].hipcc)
|
||||
|
||||
@@ -31,6 +31,9 @@ class Exodusii(CMakePackage):
|
||||
license("BSD-3-Clause")
|
||||
|
||||
version("master", branch="master")
|
||||
version(
|
||||
"2024-04-03", sha256="72b095bae64b2b6c232630f79de763c6ade00c9b1199fc6980800891b2ab3751"
|
||||
)
|
||||
version(
|
||||
"2024-03-11", sha256="5d417aa652e4ec8d66e27714c63b8cb5a7f878fb7b2ec55f629636fcff7c0f00"
|
||||
)
|
||||
@@ -59,39 +62,61 @@ class Exodusii(CMakePackage):
|
||||
"2022-01-27", sha256="d21c14b9b30f773cef8e2029773f3cc35da021eebe9060298231f95021eb814f"
|
||||
)
|
||||
version(
|
||||
"2021-10-11", sha256="5c04d252e1c4a10b037aa352b89487e581ec6b52bdb46e9e85f101bbdcd9c388"
|
||||
"2021-10-11",
|
||||
sha256="5c04d252e1c4a10b037aa352b89487e581ec6b52bdb46e9e85f101bbdcd9c388",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2021-04-05", sha256="f40d318674753287b8b28d2b4e5cca872cd772d4c7383af4a8f3eeb48fcc7ec0"
|
||||
"2021-04-05",
|
||||
sha256="f40d318674753287b8b28d2b4e5cca872cd772d4c7383af4a8f3eeb48fcc7ec0",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2021-04-02", sha256="811037a68eaff0daf9f34bd31b2ab1c9b8f028dfcb998ab01fbcb80d9458257c"
|
||||
"2021-04-02",
|
||||
sha256="811037a68eaff0daf9f34bd31b2ab1c9b8f028dfcb998ab01fbcb80d9458257c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2021-01-20", sha256="6ff7c3f0651138f2e2305b5270108ca45f96346a739b35a126a0a260c91cbe64"
|
||||
"2021-01-20",
|
||||
sha256="6ff7c3f0651138f2e2305b5270108ca45f96346a739b35a126a0a260c91cbe64",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2021-01-06", sha256="69cafef17d8e624c2d9871f3a281ff3690116a6f82162fe5c1507bb4ecd6a32a"
|
||||
"2021-01-06",
|
||||
sha256="69cafef17d8e624c2d9871f3a281ff3690116a6f82162fe5c1507bb4ecd6a32a",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2020-08-13", sha256="5b128a8ad9b0a69cff4fe937828d6d1702f1fe8aa80d4751e6522939afe62957"
|
||||
"2020-08-13",
|
||||
sha256="5b128a8ad9b0a69cff4fe937828d6d1702f1fe8aa80d4751e6522939afe62957",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2020-05-12", sha256="0402facf6cf23d903d878fb924b5d57e9f279dead5b92cf986953a6b91a6e81f"
|
||||
"2020-05-12",
|
||||
sha256="0402facf6cf23d903d878fb924b5d57e9f279dead5b92cf986953a6b91a6e81f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2020-03-16", sha256="ed1d42c8c657931ecd45367a465cf9c00255772d9cd0811fc9baacdb67fc71fa"
|
||||
"2020-03-16",
|
||||
sha256="ed1d42c8c657931ecd45367a465cf9c00255772d9cd0811fc9baacdb67fc71fa",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2020-01-16", sha256="db69dca25595e88a40c00db0ccf2afed1ecd6008ba30bb478a4e1c5dd61998b8"
|
||||
"2020-01-16",
|
||||
sha256="db69dca25595e88a40c00db0ccf2afed1ecd6008ba30bb478a4e1c5dd61998b8",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2019-12-18", sha256="88a71de836aa26fd63756cf3ffbf3978612edc5b6c61fa8de32fe9d638007774"
|
||||
"2019-12-18",
|
||||
sha256="88a71de836aa26fd63756cf3ffbf3978612edc5b6c61fa8de32fe9d638007774",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2019-10-14", sha256="f143d90e8a7516d25979d1416e580dea638332db723f26ae94a712dfe4052e8f"
|
||||
"2019-10-14",
|
||||
sha256="f143d90e8a7516d25979d1416e580dea638332db723f26ae94a712dfe4052e8f",
|
||||
deprecated=True,
|
||||
)
|
||||
version("2016-08-09", commit="2ffeb1bd39454ad5aa230e12969ce976f3d1c92b")
|
||||
version("2016-08-09", commit="2ffeb1bd39454ad5aa230e12969ce976f3d1c92b", deprecated=True)
|
||||
|
||||
patch("Fix-ioss-tpl.patch", when="@2021-10-11:")
|
||||
|
||||
|
||||
@@ -72,6 +72,28 @@ class Fastjet(AutotoolsPackage):
|
||||
)
|
||||
variant("atlas", default=False, description="Patch to make random generator thread_local")
|
||||
|
||||
available_plugins = (
|
||||
conditional("atlascone", when="@2.4.0:"),
|
||||
conditional("cdfcones", when="@2.1.0:"),
|
||||
conditional("cmsiterativecone", when="@2.4.0:"),
|
||||
conditional("d0runicone", when="@3.0.0:"),
|
||||
conditional("d0runiicone", when="@2.4.0:"),
|
||||
conditional("eecambridge", when="@2.4.0:"),
|
||||
conditional("gridjet", when="@3.0.0:"),
|
||||
conditional("jade", when="@2.4.0:"),
|
||||
conditional("nesteddefs", when="@2.4.0:"),
|
||||
conditional("pxcone", when="@2.1.0:"),
|
||||
conditional("siscone", when="@2.1.0:"),
|
||||
conditional("trackjet", when="@2.4.0:"),
|
||||
)
|
||||
variant(
|
||||
"plugins",
|
||||
multi=True,
|
||||
values=("all", "cxx") + available_plugins,
|
||||
default="all",
|
||||
description="List of plugins to enable, or 'cxx' or 'all'",
|
||||
)
|
||||
|
||||
patch("atlas.patch", when="@:3.3 +atlas", level=0)
|
||||
patch(
|
||||
"https://gitlab.cern.ch/sft/lcgcmake/-/raw/23c82f269b8e5df0190e20b7fbe06db16b24d667/externals/patches/fastjet-3.4.1.patch",
|
||||
@@ -81,7 +103,21 @@ class Fastjet(AutotoolsPackage):
|
||||
)
|
||||
|
||||
def configure_args(self):
|
||||
extra_args = ["--enable-allplugins"]
|
||||
extra_args = []
|
||||
plugins = self.spec.variants["plugins"].value
|
||||
if "all" in plugins:
|
||||
extra_args += ["--enable-allplugins"]
|
||||
elif "cxx" in plugins:
|
||||
extra_args += ["--enable-allcxxplugins"]
|
||||
else:
|
||||
for plugin in self.available_plugins:
|
||||
# conditional returns an iterable _ConditionalVariantValues
|
||||
for v in plugin:
|
||||
# this version does not support this plugin
|
||||
if not self.spec.satisfies(v.when):
|
||||
continue
|
||||
enabled = v.value in plugins
|
||||
extra_args += [f"--{'enable' if enabled else 'disable'}-{v.value}"]
|
||||
extra_args += self.enable_or_disable("shared")
|
||||
extra_args += self.enable_or_disable("auto-ptr")
|
||||
if self.spec.variants["thread-safety"].value == "limited":
|
||||
|
||||
@@ -25,6 +25,7 @@ class FftwBase(AutotoolsPackage):
|
||||
)
|
||||
variant("openmp", default=False, description="Enable OpenMP support.")
|
||||
variant("mpi", default=True, description="Activate MPI support")
|
||||
variant("shared", default=True, description="Build shared libraries")
|
||||
|
||||
depends_on("mpi", when="+mpi")
|
||||
depends_on("llvm-openmp", when="%apple-clang +openmp")
|
||||
@@ -104,7 +105,9 @@ def setup_build_environment(self, env):
|
||||
|
||||
def configure(self, spec, prefix):
|
||||
# Base options
|
||||
options = ["--prefix={0}".format(prefix), "--enable-shared", "--enable-threads"]
|
||||
options = ["--prefix={0}".format(prefix), "--enable-threads"]
|
||||
options.extend(self.enable_or_disable("shared"))
|
||||
|
||||
if not self.compiler.f77 or not self.compiler.fc:
|
||||
options.append("--disable-fortran")
|
||||
if spec.satisfies("@:2"):
|
||||
|
||||
@@ -22,6 +22,7 @@ class FluxCore(AutotoolsPackage):
|
||||
license("LGPL-3.0-only")
|
||||
|
||||
version("master", branch="master")
|
||||
version("0.61.0", sha256="02cedc6abb12816cbb01f2195c1acf7b6552c1d8b9029f899148df48a7cd05e2")
|
||||
version("0.60.0", sha256="f96025204a20f94c2821db47fe010b2c19e076ef93281ac7d308e82853e135ff")
|
||||
version("0.59.0", sha256="465d24294b92962d156ad49768ea804ff848d5c0b3470d80e07ebf24cd255f2d")
|
||||
version("0.58.0", sha256="3125ace7d4d3c99b362290344f97db74c06c37b5510cfcb746e1bf48e1dc1389")
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
diff --git a/include/fmt/format.h b/include/fmt/format.h
|
||||
index 7637c8a0..c9d7b6cc 100644
|
||||
--- a/include/fmt/format.h
|
||||
+++ b/include/fmt/format.h
|
||||
@@ -1332,7 +1332,7 @@ template <typename Char, typename UInt, typename Iterator,
|
||||
FMT_CONSTEXPR inline auto format_decimal(Iterator out, UInt value, int size)
|
||||
-> format_decimal_result<Iterator> {
|
||||
// Buffer is large enough to hold all digits (digits10 + 1).
|
||||
- Char buffer[digits10<UInt>() + 1] = {};
|
||||
+ Char buffer[digits10<UInt>() + 1];
|
||||
auto end = format_decimal(buffer, value, size).end;
|
||||
return {out, detail::copy_str_noinline<Char>(buffer, end, out)};
|
||||
}
|
||||
@@ -1359,7 +1359,7 @@ FMT_CONSTEXPR inline auto format_uint(It out, UInt value, int num_digits,
|
||||
return out;
|
||||
}
|
||||
// Buffer should be large enough to hold all digits (digits / BASE_BITS + 1).
|
||||
- char buffer[num_bits<UInt>() / BASE_BITS + 1] = {};
|
||||
+ char buffer[num_bits<UInt>() / BASE_BITS + 1];
|
||||
format_uint<BASE_BITS>(buffer, value, num_digits, upper);
|
||||
return detail::copy_str_noinline<Char>(buffer, buffer + num_digits, out);
|
||||
}
|
||||
@@ -94,6 +94,14 @@ class Fmt(CMakePackage):
|
||||
when="@10.0.0:10.1.1",
|
||||
)
|
||||
|
||||
# Fix 'variable "buffer" may not be initialized' compiler error
|
||||
patch(
|
||||
"fmt-no-variable-initialize_10.0.0.patch", when="@10.0.0:10.2.1%clang@12.0.1.ibm.gcc.8.3.1"
|
||||
)
|
||||
patch(
|
||||
"fmt-no-variable-initialize_10.0.0.patch", when="@10.0.0:10.2.1%clang@14.0.5.ibm.gcc.8.3.1"
|
||||
)
|
||||
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
args = []
|
||||
|
||||
@@ -20,6 +20,7 @@ class G2(CMakePackage):
|
||||
maintainers("AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett")
|
||||
|
||||
version("develop", branch="develop")
|
||||
version("3.4.9", sha256="6edc33091f6bd2acb191182831499c226a1c3992c3acc104d6363528b12dfbae")
|
||||
version("3.4.8", sha256="071a6f799c4c4fdfd5d0478152a0cbb9d668d12d71c78d5bda71845fc5580a7f")
|
||||
version("3.4.7", sha256="d6530611e3a515122f11ed4aeede7641f6f8932ef9ee0d4828786572767304dc")
|
||||
version("3.4.6", sha256="c4b03946365ce0bacf1e10e8412a5debd72d8671d1696aa4fb3f3adb119175fe")
|
||||
|
||||
@@ -18,6 +18,7 @@ class G2c(CMakePackage):
|
||||
maintainers("AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett")
|
||||
|
||||
version("develop", branch="develop")
|
||||
version("1.9.0", sha256="5554276e18bdcddf387a08c2dd23f9da310c6598905df6a2a244516c22ded9aa")
|
||||
version("1.8.0", sha256="4ce9f5a7cb0950699fe08ebc5a463ab4d09ef550c050391a319308a2494f971f")
|
||||
version("1.7.0", sha256="73afba9da382fed73ed8692d77fa037bb313280879cd4012a5e5697dccf55175")
|
||||
version("1.6.4", sha256="5129a772572a358296b05fbe846bd390c6a501254588c6a223623649aefacb9d")
|
||||
|
||||
@@ -18,6 +18,20 @@ class G2tmpl(CMakePackage):
|
||||
maintainers("edwardhartnett", "AlexanderRichert-NOAA", "Hang-Lei-NOAA")
|
||||
|
||||
version("develop", branch="develop")
|
||||
version("1.11.0", sha256="00fde3b37c6b4d1f0eaf60f230159298ffcb47349a076c3bd6afa20c7ed791a9")
|
||||
version("1.10.2", sha256="4063361369f3691f75288c801fa9d1a2414908b7d6c07bbf69d4165802e2a7fc")
|
||||
version("1.10.1", sha256="0be425e5128fabb89915a92261aa75c27a46a3e115e00c686fc311321e5d1e2a")
|
||||
version("1.10.0", sha256="dcc0e40b8952f91d518c59df7af64e099131c17d85d910075bfa474c8822649d")
|
||||
|
||||
variant("shared", default=False, description="Build shared library")
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
|
||||
self.define("BUILD_TESTING", self.run_tests),
|
||||
]
|
||||
return args
|
||||
|
||||
def check(self):
|
||||
with working_dir(self.builder.build_directory):
|
||||
make("test")
|
||||
|
||||
@@ -32,6 +32,7 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
|
||||
|
||||
license("MIT")
|
||||
|
||||
version("3.8.5", sha256="e8b4df2a8a7d25272f867455c0c230459545972f81f0eff2ddbf6a6f60dcb1e4")
|
||||
version("3.8.4", sha256="0c53ced95d29474236487202709b49015854f8e02e35e44ed0f4f4e12a7966ce")
|
||||
version("3.8.3", sha256="ae2d160f65016e208eca34ff14490ec4511f1fa03fd386ac130449d15e82929d")
|
||||
version("3.8.2", sha256="dc2921ee1cf7a5c0498e94d15fb9ab9c9689c296363a1d021fc3293dd242b4db")
|
||||
|
||||
@@ -85,6 +85,7 @@ class Gdb(AutotoolsPackage, GNUMirrorPackage):
|
||||
depends_on("xz", when="+xz")
|
||||
depends_on("zlib-api")
|
||||
depends_on("zstd", when="@13.1:")
|
||||
depends_on("pkgconfig", type="build", when="@13.1:")
|
||||
depends_on("source-highlight", when="+source-highlight")
|
||||
depends_on("ncurses", when="+tui")
|
||||
depends_on("gmp", when="@11.1:")
|
||||
|
||||
143
var/spack/repos/builtin/packages/geopm-runtime/package.py
Normal file
143
var/spack/repos/builtin/packages/geopm-runtime/package.py
Normal file
@@ -0,0 +1,143 @@
|
||||
# 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)
|
||||
|
||||
import os
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class GeopmRuntime(AutotoolsPackage):
|
||||
"""The Global Extensible Open Power Manager (GEOPM) Runtime is designed to
|
||||
enhance energy efficiency of applications through active hardware
|
||||
configuration."""
|
||||
|
||||
homepage = "https://geopm.github.io"
|
||||
git = "https://github.com/geopm/geopm.git"
|
||||
url = "https://github.com/geopm/geopm/tarball/v3.0.1"
|
||||
|
||||
maintainers("bgeltz", "cmcantalupo")
|
||||
license("BSD-3-Clause")
|
||||
tags = ["e4s"]
|
||||
|
||||
version("develop", branch="dev", get_full_repo=True)
|
||||
version("3.0.1", sha256="32ba1948de58815ee055470dcdea64593d1113a6cad70ce00ab0286c127f8234")
|
||||
|
||||
variant("debug", default=False, description="Enable debug")
|
||||
variant("docs", default=False, description="Create man pages with Sphinx")
|
||||
variant("overhead", default=False, description="Track time spent in GEOPM API calls")
|
||||
variant("beta", default=False, description="Enable beta features")
|
||||
variant("mpi", default=True, description="Enable MPI dependent components")
|
||||
variant("fortran", default=True, description="Build fortran interface")
|
||||
variant("openmp", default=True, description="Build with OpenMP")
|
||||
variant("ompt", default=True, description="Use OpenMP Tools Interface")
|
||||
variant("gnu-ld", default=False, description="Assume C compiler uses gnu-ld")
|
||||
variant("intel-mkl", default=True, description="Build with Intel MKL support")
|
||||
variant(
|
||||
"checkprogs",
|
||||
default=False,
|
||||
description='Build tests (use with "devbuild" or "install --keep-stage")',
|
||||
)
|
||||
|
||||
conflicts("%gcc@:7.2", msg="Requires C++17 support")
|
||||
conflicts("%clang@:4", msg="Requires C++17 support")
|
||||
conflicts("%gcc", when="+ompt")
|
||||
|
||||
conflicts("platform=darwin", msg="Darwin is not supported")
|
||||
conflicts("platform=windows", msg="Windows is not supported")
|
||||
|
||||
conflicts("target=aarch64:", msg="Only available on x86_64", when="@3.0.1")
|
||||
conflicts("target=ppc64:", msg="Only available on x86_64", when="@3.0.1")
|
||||
conflicts("target=ppc64le:", msg="Only available on x86_64", when="@3.0.1")
|
||||
|
||||
# Autotools dependencies
|
||||
depends_on("automake", type="build")
|
||||
depends_on("libtool", type="build")
|
||||
depends_on("file")
|
||||
|
||||
# Docs dependencies
|
||||
depends_on("doxygen", type="build", when="+docs")
|
||||
depends_on("py-sphinx", type="build", when="+docs")
|
||||
depends_on("py-sphinx-rtd-theme@1:", type="build", when="+docs")
|
||||
depends_on("py-sphinxemoji@0.2.0:", type="build", when="+docs")
|
||||
depends_on("py-sphinx-tabs@3.3.1:", type="build", when="+docs")
|
||||
depends_on("py-pygments@2.13.0:", type="build", when="+docs")
|
||||
|
||||
# Other Python dependencies - from scripts/setup.py
|
||||
depends_on("python@3.6:3", type=("build", "run"))
|
||||
depends_on("py-setuptools@53.0.0:", type="build")
|
||||
depends_on("py-cffi@1.14.5:", type="run")
|
||||
depends_on("py-natsort@8.2.0:", type="run")
|
||||
depends_on("py-numpy@1.19.5:", type="run")
|
||||
depends_on("py-pandas@1.1.5:", type="run")
|
||||
depends_on("py-tables@3.7.0:", type="run")
|
||||
depends_on("py-psutil@5.8.0:", type="run")
|
||||
depends_on("py-pyyaml@6.0:", type="run")
|
||||
depends_on("py-docutils@0.18:", type="run", when="+checkprogs")
|
||||
|
||||
# Other dependencies
|
||||
for ver in ["3.0.1", "develop"]:
|
||||
depends_on(f"geopm-service@{ver}", type="build", when=f"@{ver}")
|
||||
depends_on(f"py-geopmdpy@{ver}", type="run", when=f"@{ver}")
|
||||
depends_on("bash-completion")
|
||||
depends_on("unzip")
|
||||
depends_on("mpi@2.2:", when="+mpi")
|
||||
depends_on("libelf")
|
||||
depends_on("numactl", type="run", when="+checkprogs")
|
||||
depends_on("stress-ng", type="run", when="+checkprogs")
|
||||
|
||||
# Intel dependencies
|
||||
depends_on("intel-oneapi-mkl%oneapi", when="+intel-mkl")
|
||||
|
||||
extends("python")
|
||||
|
||||
@property
|
||||
def install_targets(self):
|
||||
target = ["install"]
|
||||
if "+checkprogs" in self.spec:
|
||||
target += ["checkprogs"]
|
||||
return target
|
||||
|
||||
def autoreconf(self, spec, prefix):
|
||||
bash = which("bash")
|
||||
if not spec.version.isdevelop():
|
||||
# Required to workaround missing VERSION files
|
||||
# from GitHub generated source tarballs
|
||||
with open("VERSION_OVERRIDE", "w") as fd:
|
||||
fd.write(f"{spec.version}")
|
||||
bash("./autogen.sh")
|
||||
|
||||
def configure_args(self):
|
||||
args = [
|
||||
"--with-bash-completion-dir="
|
||||
+ join_path(self.spec.prefix, "share", "bash-completion", "completions"),
|
||||
"--disable-geopmd-local",
|
||||
f"--with-geopmd={self.spec['geopm-service'].prefix}",
|
||||
]
|
||||
|
||||
args += self.enable_or_disable("debug")
|
||||
args += self.enable_or_disable("docs")
|
||||
args += self.enable_or_disable("overhead")
|
||||
args += self.enable_or_disable("beta")
|
||||
args += self.enable_or_disable("mpi")
|
||||
args += self.enable_or_disable("fortran")
|
||||
args += self.enable_or_disable("openmp")
|
||||
args += self.enable_or_disable("ompt")
|
||||
args += self.with_or_without("gnu-ld")
|
||||
|
||||
return args
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
# Required to ensure libgeopm.so
|
||||
# can be used with LD_PRELOAD
|
||||
if os.path.isdir(self.prefix.lib64):
|
||||
lib_dir = self.prefix.lib64
|
||||
else:
|
||||
lib_dir = self.prefix.lib
|
||||
env.prepend_path("LD_LIBRARY_PATH", lib_dir)
|
||||
|
||||
if "+checkprogs" in self.spec:
|
||||
env.set("GEOPM_SOURCE", self.stage.source_path)
|
||||
env.prepend_path("PYTHONPATH", self.stage.source_path)
|
||||
env.set("GEOPM_INSTALL", self.prefix)
|
||||
@@ -9,14 +9,8 @@
|
||||
|
||||
|
||||
class GeopmService(AutotoolsPackage):
|
||||
"""The Global Extensible Open Power Manager (GEOPM) is a framework for
|
||||
exploring power and energy optimizations targeting heterogeneous platforms.
|
||||
The GEOPM package provides many built-in features. A simple use case is
|
||||
reading hardware counters and setting hardware controls with platform
|
||||
independent syntax using a command line tool on a particular compute node.
|
||||
An advanced use case is dynamically coordinating hardware settings across
|
||||
all compute nodes used by a distributed application is response to the
|
||||
application's behavior and requests from the resource manager.
|
||||
"""The Global Extensible Open Power Manager (GEOPM) Service provides a
|
||||
user interface for accessing hardware telemetry and settings securely.
|
||||
|
||||
Note: GEOPM interfaces with hardware using Model Specific Registers (MSRs).
|
||||
For proper usage make sure MSRs are made available via the msr or
|
||||
@@ -35,11 +29,7 @@ class GeopmService(AutotoolsPackage):
|
||||
|
||||
variant("debug", default=False, description="Enable debug")
|
||||
variant("docs", default=True, description="Create man pages with Sphinx")
|
||||
variant(
|
||||
"systemd",
|
||||
default=False,
|
||||
description="Enable use of systemd (systemd development libraries required)",
|
||||
)
|
||||
variant("systemd", default=True, description="Enable use of systemd/DBus")
|
||||
variant("liburing", default=True, description="Enables the use of liburing for batch I/O")
|
||||
variant(
|
||||
"libcap", default=True, description="Enables the use of libcap to do capabilities checks"
|
||||
@@ -64,9 +54,9 @@ class GeopmService(AutotoolsPackage):
|
||||
conflicts("platform=darwin", msg="Darwin is not supported")
|
||||
conflicts("platform=windows", msg="Windows is not supported")
|
||||
|
||||
conflicts("target=aarch64:", msg="Only available on x86_64")
|
||||
conflicts("target=ppc64:", msg="Only available on x86_64")
|
||||
conflicts("target=ppc64le:", msg="Only available on x86_64")
|
||||
conflicts("target=aarch64:", msg="Only available on x86_64", when="@3.0.1")
|
||||
conflicts("target=ppc64:", msg="Only available on x86_64", when="@3.0.1")
|
||||
conflicts("target=ppc64le:", msg="Only available on x86_64", when="@3.0.1")
|
||||
|
||||
patch("0001-Support-NVML-via-CUDA-installation.patch", when="+nvml")
|
||||
|
||||
@@ -78,7 +68,7 @@ class GeopmService(AutotoolsPackage):
|
||||
# Docs dependencies
|
||||
depends_on("doxygen", type="build", when="+docs")
|
||||
depends_on("py-docstring-parser@0.13.0:", type="build", when="+docs")
|
||||
depends_on("py-sphinx@4.5:", type="build", when="+docs")
|
||||
depends_on("py-sphinx", type="build", when="+docs")
|
||||
depends_on("py-sphinx-rtd-theme@1:", type="build", when="+docs")
|
||||
depends_on("py-sphinxemoji@0.2.0:", type="build", when="+docs")
|
||||
depends_on("py-sphinx-tabs@3.3.1:", type="build", when="+docs")
|
||||
@@ -95,6 +85,7 @@ class GeopmService(AutotoolsPackage):
|
||||
# Other dependencies
|
||||
depends_on("bash-completion")
|
||||
depends_on("unzip")
|
||||
depends_on("systemd", when="+systemd")
|
||||
depends_on("libcap", when="+libcap")
|
||||
depends_on("liburing", when="+liburing")
|
||||
depends_on("oneapi-level-zero", when="+levelzero")
|
||||
@@ -132,10 +123,16 @@ def configure_args(self):
|
||||
args += self.enable_or_disable("nvml")
|
||||
if "+nvml" in self.spec:
|
||||
args += [
|
||||
"--with-nvml=" + join_path(self.spec["cuda"].prefix, "targets", "x86_64-linux")
|
||||
"--with-nvml="
|
||||
+ join_path(
|
||||
self.spec["cuda"].prefix, "targets", f"{self.spec.target.family}-linux"
|
||||
)
|
||||
]
|
||||
|
||||
args += self.enable_or_disable("rawmsr")
|
||||
with when("@develop"):
|
||||
if self.spec.target.family != "x86_64":
|
||||
args += ["--disable-cpuid"]
|
||||
return args
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
commit 83164570f0d3511d114114bcc2b02ad23b753ed0
|
||||
Author: Yuhsiang M. Tsai <yhmtsai@gmail.com>
|
||||
Date: Wed Oct 6 16:33:16 2021 +0200
|
||||
|
||||
syclstd 1.2.1 in new release to propagate subgroup
|
||||
remove 64 subgroup in dense to avoid conj_trans issue on cpu temporarily
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index ceb269b1cb..b47388a596 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -67,7 +67,8 @@ if(MSVC)
|
||||
elseif(GINKGO_BUILD_DPCPP OR CMAKE_CXX_COMPILER MATCHES "dpcpp")
|
||||
# For now always use `-ffp-model=precise` with DPC++. This can be removed when
|
||||
# the floating point issues are fixed.
|
||||
- set(GINKGO_COMPILER_FLAGS "-Wpedantic;-ffp-model=precise" CACHE STRING
|
||||
+ # -sycl-std=1.2.1 (or -sycl-std=2017) is temporary workaround after 2021.4 to propagate subgroup setting correctly
|
||||
+ set(GINKGO_COMPILER_FLAGS "-Wpedantic;-ffp-model=precise;-sycl-std=1.2.1" CACHE STRING
|
||||
"Set the required CXX compiler flags, mainly used for warnings. Current default is `-Wpedantic;-ffp-model=precise`")
|
||||
else()
|
||||
set(GINKGO_COMPILER_FLAGS "-Wpedantic" CACHE STRING
|
||||
diff --git a/cmake/create_test.cmake b/cmake/create_test.cmake
|
||||
index 9d22406f9a..dcc452b293 100644
|
||||
--- a/cmake/create_test.cmake
|
||||
+++ b/cmake/create_test.cmake
|
||||
@@ -40,6 +40,7 @@ function(ginkgo_create_dpcpp_test test_name)
|
||||
add_executable(${test_target_name} ${test_name}.dp.cpp)
|
||||
target_compile_features(${test_target_name} PUBLIC cxx_std_17)
|
||||
target_compile_options(${test_target_name} PRIVATE "${GINKGO_DPCPP_FLAGS}")
|
||||
+ target_compile_options(${test_target_name} PRIVATE "${GINKGO_COMPILER_FLAGS}")
|
||||
target_link_options(${test_target_name} PRIVATE -fsycl-device-code-split=per_kernel)
|
||||
ginkgo_set_test_target_properties(${test_name} ${test_target_name})
|
||||
# Note: MKL_ENV is empty on linux. Maybe need to apply MKL_ENV to all test.
|
||||
diff --git a/dpcpp/CMakeLists.txt b/dpcpp/CMakeLists.txt
|
||||
index fee9ec3639..ce71fd5d3c 100644
|
||||
--- a/dpcpp/CMakeLists.txt
|
||||
+++ b/dpcpp/CMakeLists.txt
|
||||
@@ -68,6 +68,7 @@ target_compile_definitions(ginkgo_dpcpp PRIVATE GKO_COMPILING_DPCPP)
|
||||
|
||||
set(GINKGO_DPCPP_FLAGS ${GINKGO_DPCPP_FLAGS} PARENT_SCOPE)
|
||||
target_compile_options(ginkgo_dpcpp PRIVATE "${GINKGO_DPCPP_FLAGS}")
|
||||
+target_compile_options(ginkgo_dpcpp PRIVATE "${GINKGO_COMPILER_FLAGS}")
|
||||
# Note: add MKL as PRIVATE not PUBLIC (MKL example shows) to avoid propagating
|
||||
# find_package(MKL) everywhere when linking ginkgo (see the MKL example
|
||||
# https://software.intel.com/content/www/us/en/develop/documentation/onemkl-windows-developer-guide/top/getting-started/cmake-config-for-onemkl.html)
|
||||
diff --git a/dpcpp/matrix/dense_kernels.dp.cpp b/dpcpp/matrix/dense_kernels.dp.cpp
|
||||
index 0c89530d1d..9a86ab9cd1 100644
|
||||
--- a/dpcpp/matrix/dense_kernels.dp.cpp
|
||||
+++ b/dpcpp/matrix/dense_kernels.dp.cpp
|
||||
@@ -69,14 +69,14 @@ namespace dpcpp {
|
||||
namespace dense {
|
||||
|
||||
|
||||
+// Disable the 64 subgroup. CPU supports 64 now, but conj_transpose will
|
||||
+// lead CL_OUT_OF_RESOURCES. TODO: investigate this issue.
|
||||
using KCFG_1D = ConfigSet<11, 7>;
|
||||
constexpr auto kcfg_1d_list =
|
||||
- syn::value_list<std::uint32_t, KCFG_1D::encode(512, 64),
|
||||
- KCFG_1D::encode(512, 32), KCFG_1D::encode(512, 16),
|
||||
- KCFG_1D::encode(256, 32), KCFG_1D::encode(256, 16),
|
||||
- KCFG_1D::encode(256, 8)>();
|
||||
-constexpr auto subgroup_list =
|
||||
- syn::value_list<std::uint32_t, 64, 32, 16, 8, 4>();
|
||||
+ syn::value_list<std::uint32_t, KCFG_1D::encode(512, 32),
|
||||
+ KCFG_1D::encode(512, 16), KCFG_1D::encode(256, 32),
|
||||
+ KCFG_1D::encode(256, 16), KCFG_1D::encode(256, 8)>();
|
||||
+constexpr auto subgroup_list = syn::value_list<std::uint32_t, 32, 16, 8, 4>();
|
||||
constexpr auto kcfg_1d_array = syn::as_array(kcfg_1d_list);
|
||||
constexpr int default_block_size = 256;
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
diff -ruN spack-src/dpcpp/components/intrinsics.dp.hpp spack-src-patched/dpcpp/components/intrinsics.dp.hpp
|
||||
--- spack-src/dpcpp/components/intrinsics.dp.hpp 2024-04-03 18:53:42.724032846 +0000
|
||||
+++ spack-src-patched/dpcpp/components/intrinsics.dp.hpp 2024-04-03 18:55:01.744543032 +0000
|
||||
@@ -67,13 +67,13 @@
|
||||
*/
|
||||
__dpct_inline__ int ffs(uint32 mask)
|
||||
{
|
||||
- return (mask == 0) ? 0 : (sycl::ext::intel::ctz(mask) + 1);
|
||||
+ return (mask == 0) ? 0 : (sycl::ctz(mask) + 1);
|
||||
}
|
||||
|
||||
/** @copydoc ffs */
|
||||
__dpct_inline__ int ffs(uint64 mask)
|
||||
{
|
||||
- return (mask == 0) ? 0 : (sycl::ext::intel::ctz(mask) + 1);
|
||||
+ return (mask == 0) ? 0 : (sycl::ctz(mask) + 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -106,6 +106,9 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage):
|
||||
# https://github.com/ginkgo-project/ginkgo/pull/1524
|
||||
patch("ginkgo-sycl-pr1524.patch", when="@1.7.0 +sycl %oneapi@2024:")
|
||||
|
||||
# https://github.com/ginkgo-project/ginkgo/pull/1585
|
||||
patch("ginkgo-dpcpp-intrinsincs-oneapi-2024.1.patch", when="@1.7.0 +sycl %oneapi@2024.1:")
|
||||
|
||||
# Skip smoke tests if compatible hardware isn't found
|
||||
patch("1.4.0_skip_invalid_smoke_tests.patch", when="@1.4.0")
|
||||
|
||||
@@ -118,7 +121,7 @@ def setup_build_environment(self, env):
|
||||
env.set("MKLROOT", join_path(spec["intel-oneapi-mkl"].prefix, "mkl", "latest"))
|
||||
env.set("DPL_ROOT", join_path(spec["intel-oneapi-dpl"].prefix, "dpl", "latest"))
|
||||
# The `IntelSYCLConfig.cmake` is broken with spack. By default, it
|
||||
# relies on the CMAKE_CXX_COMPILER being the real ipcx/dpcpp
|
||||
# relies on the CMAKE_CXX_COMPILER being the real ipcx
|
||||
# compiler. If not, the variable SYCL_COMPILER of that script is
|
||||
# broken, and all the SYCL detection mechanism is wrong. We fix it
|
||||
# by giving hint environment variables.
|
||||
@@ -197,9 +200,9 @@ def cmake_args(self):
|
||||
)
|
||||
|
||||
if "+sycl" in self.spec:
|
||||
sycl_compatible_compilers = ["dpcpp", "icpx"]
|
||||
sycl_compatible_compilers = ["icpx"]
|
||||
if not (os.path.basename(self.compiler.cxx) in sycl_compatible_compilers):
|
||||
raise InstallError("ginkgo +sycl requires DPC++ (dpcpp) or icpx compiler.")
|
||||
raise InstallError("ginkgo +sycl requires icpx compiler.")
|
||||
return args
|
||||
|
||||
@property
|
||||
|
||||
@@ -44,9 +44,9 @@ class GobjectIntrospection(MesonPackage, AutotoolsPackage):
|
||||
depends_on("cairo+gobject")
|
||||
depends_on("glib@2.78:", when="@1.78")
|
||||
depends_on("glib@2.76:", when="@1.76")
|
||||
depends_on("glib@2.72:", when="@1.72")
|
||||
depends_on("glib@2.58:", when="@1.72")
|
||||
depends_on("glib@2.56:", when="@1.56")
|
||||
depends_on("glib@2.49.2:", when="@1.49.2:")
|
||||
depends_on("glib@2.49.2:", when="@1.49.2")
|
||||
depends_on("glib@2.48.1", when="@1.48.0")
|
||||
|
||||
depends_on("libffi")
|
||||
|
||||
@@ -3,10 +3,11 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack.build_systems import autotools, cmake
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Gperftools(AutotoolsPackage):
|
||||
class Gperftools(AutotoolsPackage, CMakePackage):
|
||||
"""Google's fast malloc/free implementation, especially for
|
||||
multi-threaded applications. Contains tcmalloc, heap-checker,
|
||||
heap-profiler, and cpu-profiler.
|
||||
@@ -19,6 +20,8 @@ class Gperftools(AutotoolsPackage):
|
||||
|
||||
license("BSD-3-Clause")
|
||||
|
||||
build_system(conditional("cmake", when="@2.8.1:"), "autotools", default="cmake")
|
||||
|
||||
version("2.15", sha256="c69fef855628c81ef56f12e3c58f2b7ce1f326c0a1fe783e5cae0b88cbbe9a80")
|
||||
version("2.14", sha256="6b561baf304b53d0a25311bd2e29bc993bed76b7c562380949e7cb5e3846b299")
|
||||
version("2.13", sha256="4882c5ece69f8691e51ffd6486df7d79dbf43b0c909d84d3c0883e30d27323e7")
|
||||
@@ -43,21 +46,38 @@ class Gperftools(AutotoolsPackage):
|
||||
)
|
||||
|
||||
depends_on("unwind", when="+libunwind")
|
||||
depends_on("cmake@3.12:", type="build", when="build_system=cmake")
|
||||
|
||||
# Linker error: src/base/dynamic_annotations.cc:46: undefined reference to
|
||||
# `TCMallocGetenvSafe'
|
||||
conflicts("target=ppc64:", when="@2.14")
|
||||
conflicts("target=ppc64le:", when="@2.14")
|
||||
|
||||
def configure_args(self):
|
||||
args = []
|
||||
args += self.enable_or_disable("sized-delete", variant="sized_delete")
|
||||
args += self.enable_or_disable(
|
||||
"dynamic-sized-delete-support", variant="dynamic_sized_delete_support"
|
||||
)
|
||||
args += self.enable_or_disable("debugalloc")
|
||||
args += self.enable_or_disable("libunwind")
|
||||
if self.spec.satisfies("+libunwind"):
|
||||
args += ["LDFLAGS=-lunwind"]
|
||||
# the autotools build system creates an explicit list of -L <system dir> flags that end up
|
||||
# before the -L <spack dir> flags, which causes the system libunwind to be linked instead of
|
||||
# the spack libunwind. This is a workaround to fix that.
|
||||
conflicts("+libunwind", when="build_system=autotools")
|
||||
|
||||
return args
|
||||
|
||||
class CMakeBuilder(cmake.CMakeBuilder):
|
||||
def cmake_args(self):
|
||||
return [
|
||||
self.define_from_variant("gperftools_sized_delete", "sized_delete"),
|
||||
self.define_from_variant(
|
||||
"gperftools_dynamic_sized_delete_support", "dynamic_sized_delete_support"
|
||||
),
|
||||
self.define_from_variant("GPERFTOOLS_BUILD_DEBUGALLOC", "debugalloc"),
|
||||
self.define_from_variant("gperftools_enable_libunwind", "libunwind"),
|
||||
]
|
||||
|
||||
|
||||
class AutotooolsBuilder(autotools.AutotoolsBuilder):
|
||||
def configure_args(self):
|
||||
return [
|
||||
*self.enable_or_disable("sized-delete", variant="sized_delete"),
|
||||
*self.enable_or_disable(
|
||||
"dynamic-sized-delete-support", variant="dynamic_sized_delete_support"
|
||||
),
|
||||
*self.enable_or_disable("debugalloc"),
|
||||
*self.enable_or_disable("libunwind"),
|
||||
]
|
||||
|
||||
@@ -22,6 +22,7 @@ class GribUtil(CMakePackage):
|
||||
version("1.2.3", sha256="b17b08e12360bb8ad01298e615f1b4198e304b0443b6db35fe990a817e648ad5")
|
||||
|
||||
variant("openmp", default=False, description="Use OpenMP multithreading")
|
||||
variant("tests", default=False, description="Enable this variant when installing with --test")
|
||||
|
||||
depends_on("jasper")
|
||||
depends_on("libpng")
|
||||
@@ -30,15 +31,19 @@ class GribUtil(CMakePackage):
|
||||
requires("^w3emc precision=4,d", when="^w3emc@2.10:")
|
||||
depends_on("w3nco", when="@:1.2.3")
|
||||
depends_on("g2")
|
||||
depends_on("g2c@1.8: +utils", when="+tests")
|
||||
depends_on("bacio")
|
||||
depends_on("ip")
|
||||
depends_on("ip@:3.3.3", when="@:1.2.4")
|
||||
depends_on("sp")
|
||||
requires("^ip precision=d", when="^ip@4.1:")
|
||||
depends_on("ip@:3.3.3", when="@:1.2")
|
||||
depends_on("sp", when="^ip@:4")
|
||||
requires("^sp precision=d", when="^ip@:4 ^sp@2.4:")
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
self.define_from_variant("OPENMP", "openmp"),
|
||||
self.define("BUILD_TESTING", self.run_tests),
|
||||
self.define("G2C_COMPARE", self.run_tests),
|
||||
]
|
||||
return args
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage):
|
||||
variant("int64", default=False, description="Use 64bit integers")
|
||||
variant("mixedint", default=False, description="Use 64bit integers while reducing memory use")
|
||||
variant("complex", default=False, description="Use complex values")
|
||||
variant("gpu-aware-mpi", default=False, description="Use gpu-aware mpi")
|
||||
variant("mpi", default=True, description="Enable MPI support")
|
||||
variant("openmp", default=False, description="Enable OpenMP support")
|
||||
variant("debug", default=False, description="Build debug instead of optimized version")
|
||||
@@ -286,11 +287,10 @@ def configure_args(self):
|
||||
|
||||
if spec.satisfies("+sycl"):
|
||||
configure_args.append("--with-sycl")
|
||||
sycl_compatible_compilers = ["dpcpp", "icpx"]
|
||||
sycl_compatible_compilers = ["icpx"]
|
||||
if not (os.path.basename(self.compiler.cxx) in sycl_compatible_compilers):
|
||||
raise InstallError(
|
||||
"Hypre's SYCL GPU Backend requires DPC++ (dpcpp)"
|
||||
+ " or the oneAPI CXX (icpx) compiler."
|
||||
"Hypre's SYCL GPU Backend requires the oneAPI CXX (icpx) compiler."
|
||||
)
|
||||
|
||||
if spec.satisfies("+unified-memory"):
|
||||
@@ -301,6 +301,9 @@ def configure_args(self):
|
||||
configure_args.append("--with-magma-lib=%s" % spec["magma"].libs)
|
||||
configure_args.append("--with-magma")
|
||||
|
||||
if "+gpu-aware-mpi" in spec:
|
||||
options.append("--enable-gpu-aware-mpi")
|
||||
|
||||
configure_args.extend(self.enable_or_disable("fortran"))
|
||||
|
||||
return configure_args
|
||||
|
||||
@@ -223,10 +223,7 @@
|
||||
|
||||
@IntelOneApiPackage.update_description
|
||||
class IntelOneapiCompilers(IntelOneApiPackage):
|
||||
"""Intel oneAPI Compilers. Includes: icc, icpc, ifort, icx, icpx, ifx,
|
||||
and dpcpp.
|
||||
|
||||
"""
|
||||
"""Intel oneAPI Compilers. Includes: icc, icpc, ifort, icx, icpx, and ifx."""
|
||||
|
||||
maintainers("rscohn2")
|
||||
|
||||
|
||||
@@ -24,6 +24,12 @@ class IntelOneapiInspector(IntelOneApiLibraryPackageWithSdk):
|
||||
|
||||
homepage = "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/inspector.html"
|
||||
|
||||
version(
|
||||
"2024.1.0",
|
||||
url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/891acaab-a5b4-4a3c-9f36-60dca629e410/l_inspector_oneapi_p_2024.1.0.158_offline.sh",
|
||||
sha256="b4e4e2e395ad98ce025a6bf26950fc39c2f54c905a1a9c88cb129109a5dd0936",
|
||||
expand=False,
|
||||
)
|
||||
version(
|
||||
"2024.0.0",
|
||||
url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/44ae6846-719c-49bd-b196-b16ce5835a1e/l_inspector_oneapi_p_2024.0.0.49433_offline.sh",
|
||||
|
||||
@@ -27,6 +27,12 @@ class IntelOneapiItac(IntelOneApiPackage):
|
||||
|
||||
maintainers("rscohn2")
|
||||
|
||||
version(
|
||||
"2022.1.0",
|
||||
url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/644eec67-83d9-4bdd-be0d-d90587ec72ed/l_itac_oneapi_p_2022.1.0.158_offline.sh",
|
||||
sha256="2a1f4be6b349d1629006ee72087b361a5f3e714bddd1ef932045d0c03c0b20e8",
|
||||
expand=False,
|
||||
)
|
||||
version(
|
||||
"2022.0.0",
|
||||
url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/e83526f5-7e0f-4708-9e0d-47f1e65f29aa/l_itac_oneapi_p_2022.0.0.49690_offline.sh",
|
||||
|
||||
@@ -15,6 +15,9 @@ class IntelOneapiRuntime(Package):
|
||||
|
||||
homepage = "https://software.intel.com/content/www/us/en/develop/tools/oneapi.html"
|
||||
has_code = False
|
||||
license("https://intel.ly/393CijO")
|
||||
|
||||
maintainers("rscohn2")
|
||||
|
||||
tags = ["runtime"]
|
||||
|
||||
|
||||
@@ -64,7 +64,6 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
|
||||
conflicts("+openmptarget", when="@:3.5")
|
||||
|
||||
# https://github.com/spack/spack/issues/29052
|
||||
conflicts("@:3.5 +sycl", when="%dpcpp@2022:")
|
||||
conflicts("@:3.5 +sycl", when="%oneapi@2022:")
|
||||
|
||||
tpls_variants = {
|
||||
|
||||
36
var/spack/repos/builtin/packages/libfort/package.py
Normal file
36
var/spack/repos/builtin/packages/libfort/package.py
Normal file
@@ -0,0 +1,36 @@
|
||||
# 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 Libfort(CMakePackage):
|
||||
"""libfort is a simple crossplatform library to create formatted text tables."""
|
||||
|
||||
homepage = "https://github.com/seleznevae/libfort"
|
||||
url = "https://github.com/seleznevae/libfort/archive/refs/tags/v0.4.2.tar.gz"
|
||||
|
||||
license("MIT")
|
||||
|
||||
version("0.4.2", sha256="8f7b03f1aa526e50c9828f09490f3c844b73d5f9ca72493fe81931746f75e489")
|
||||
|
||||
variant("enable_astyle", default=False, description="Enable astyle")
|
||||
variant("enable_wchar", default=True, description="Enable wchar support")
|
||||
variant("enable_utf8", default=True, description="Enable utf8 support")
|
||||
variant("enable_testing", default=True, description="Enables building tests and examples")
|
||||
variant("shared", default=False, description="Build shared library")
|
||||
|
||||
depends_on("cmake@3.0.0:", type="build")
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
self.define_from_variant("FORT_ENABLE_ASTYLE", "enable_astyle"),
|
||||
self.define_from_variant("FORT_ENABLE_WCHAR", "enable_wchar"),
|
||||
self.define_from_variant("FORT_ENABLE_UTF8", "enable_utf8"),
|
||||
self.define_from_variant("FORT_ENABLE_TESTING", "enable_testing"),
|
||||
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
|
||||
]
|
||||
|
||||
return args
|
||||
@@ -13,9 +13,9 @@ class Magma(CMakePackage, CudaPackage, ROCmPackage):
|
||||
current "Multicore+GPU" systems.
|
||||
"""
|
||||
|
||||
homepage = "https://icl.cs.utk.edu/magma/"
|
||||
homepage = "https://icl.utk.edu/magma/"
|
||||
git = "https://bitbucket.org/icl/magma"
|
||||
url = "https://icl.cs.utk.edu/projectsfiles/magma/downloads/magma-2.2.0.tar.gz"
|
||||
url = "https://icl.utk.edu/projectsfiles/magma/downloads/magma-2.2.0.tar.gz"
|
||||
maintainers("stomov", "luszczek", "G-Ragghianti")
|
||||
|
||||
tags = ["e4s"]
|
||||
@@ -23,6 +23,7 @@ class Magma(CMakePackage, CudaPackage, ROCmPackage):
|
||||
test_requires_compiler = True
|
||||
|
||||
version("master", branch="master")
|
||||
version("2.8.0", sha256="f4e5e75350743fe57f49b615247da2cc875e5193cc90c11b43554a7c82cc4348")
|
||||
version("2.7.2", sha256="729bc1a70e518a7422fe7a3a54537a4741035a77be3349f66eac5c362576d560")
|
||||
version("2.7.1", sha256="d9c8711c047a38cae16efde74bee2eb3333217fd2711e1e9b8606cbbb4ae1a50")
|
||||
version("2.7.0", sha256="fda1cbc4607e77cacd8feb1c0f633c5826ba200a018f647f1c5436975b39fd18")
|
||||
@@ -47,6 +48,10 @@ class Magma(CMakePackage, CudaPackage, ROCmPackage):
|
||||
depends_on("cuda@8:", when="@2.5.1: +cuda") # See PR #14471
|
||||
depends_on("hipblas", when="+rocm")
|
||||
depends_on("hipsparse", when="+rocm")
|
||||
# This ensures that rocm-core matches the hip package version in the case that
|
||||
# hip is an external package.
|
||||
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"]:
|
||||
depends_on(f"rocm-core@{ver}", when=f"@2.8.0: +rocm ^hip@{ver}")
|
||||
depends_on("python", when="@master", type="build")
|
||||
|
||||
conflicts("~cuda", when="~rocm", msg="magma: Either CUDA or HIP support must be enabled")
|
||||
@@ -150,6 +155,8 @@ def cmake_args(self):
|
||||
# See https://github.com/ROCm/rocFFT/issues/322
|
||||
if spec.satisfies("^cmake@3.21.0:3.21.2"):
|
||||
options.append(define("__skip_rocmclang", True))
|
||||
if spec.satisfies("@2.8.0:"):
|
||||
options.append(define("ROCM_CORE", spec["rocm-core"].prefix))
|
||||
else:
|
||||
options.append(define("MAGMA_ENABLE_CUDA", True))
|
||||
|
||||
|
||||
44
var/spack/repos/builtin/packages/meshlab/package.py
Normal file
44
var/spack/repos/builtin/packages/meshlab/package.py
Normal file
@@ -0,0 +1,44 @@
|
||||
# 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 Meshlab(CMakePackage):
|
||||
"""The open source mesh processing system."""
|
||||
|
||||
homepage = "https://www.meshlab.net"
|
||||
url = "https://github.com/cnr-isti-vclab/meshlab/archive/refs/tags/MeshLab-2023.12.tar.gz"
|
||||
git = "https://github.com/cnr-isti-vclab/meshlab.git"
|
||||
|
||||
maintainers("wdconinc")
|
||||
|
||||
license("GPL-3.0", checked_by="wdconinc")
|
||||
|
||||
version("main", branch="main", submodules=True)
|
||||
version("2023.12", commit="2dbd2f4b12df3b47d8777b2b4a43cabd9e425735", submodules=True)
|
||||
|
||||
variant("double_scalar", default=False, description="Type to use for scalars")
|
||||
|
||||
depends_on("eigen")
|
||||
depends_on("glew")
|
||||
depends_on("mpfr")
|
||||
depends_on("qt@5.15: +opengl")
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
self.define_from_variant("MESHLAB_BUILD_WITH_DOUBLE_SCALAR", "double_scalar"),
|
||||
# E57 and Nexus plugins fail on gcc-13 due to missing include cstdint,
|
||||
# but patching is cumbersome since build process downloads their source.
|
||||
# Ref: https://github.com/asmaloney/libE57Format/pull/176
|
||||
self.define("MESHLAB_ALLOW_DOWNLOAD_SOURCE_LIBE57", False),
|
||||
# Ref: https://github.com/cnr-isti-vclab/corto/pull/44
|
||||
self.define("MESHLAB_ALLOW_DOWNLOAD_SOURCE_NEXUS", False),
|
||||
]
|
||||
|
||||
for bundle in "LIBIGL", "LEVMAR", "LIB3DS", "EMBREE", "NEXUS", "QHULL", "STRUCTURE_SYNTH", "TINYGLTF", "MUPARSER", "BOOST", "OPENCTM", "U3D", "LIBE57", "CGAL", "XERCES":
|
||||
args.append(self.define(f"MESHLAB_ALLOW_DOWNLOAD_SOURCE_{bundle}", False))
|
||||
|
||||
return args
|
||||
@@ -15,7 +15,7 @@ def _parse_float(val):
|
||||
return False
|
||||
|
||||
|
||||
class NaluWind(CMakePackage, CudaPackage):
|
||||
class NaluWind(CMakePackage, CudaPackage, ROCmPackage):
|
||||
"""Nalu-Wind: Wind energy focused variant of Nalu."""
|
||||
|
||||
homepage = "https://nalu-wind.readthedocs.io"
|
||||
@@ -26,6 +26,7 @@ class NaluWind(CMakePackage, CudaPackage):
|
||||
tags = ["ecp", "ecp-apps"]
|
||||
|
||||
version("master", branch="master")
|
||||
version("2.0.0", tag="v2.0.0")
|
||||
|
||||
variant("pic", default=True, description="Position independent code")
|
||||
variant(
|
||||
@@ -45,12 +46,31 @@ class NaluWind(CMakePackage, CudaPackage):
|
||||
variant("hypre", default=True, description="Compile with Hypre support")
|
||||
variant("trilinos-solvers", default=True, description="Compile with Trilinos Solvers support")
|
||||
variant("catalyst", default=False, description="Compile with Catalyst support")
|
||||
variant("shared", default=True, description="Build shared libraries")
|
||||
variant("fftw", default=False, description="Compile with FFTW support")
|
||||
variant("fsi", default=False, description="Enable fluid-structure-interaction models")
|
||||
variant("boost", default=False, description="Enable Boost integration")
|
||||
variant("gpu-aware-mpi", default=False, description="gpu-aware-mpi")
|
||||
variant("wind-utils", default=False, description="Build wind-utils")
|
||||
variant("umpire", default=False, description="Enable Umpire")
|
||||
conflicts(
|
||||
"+shared",
|
||||
when="+cuda",
|
||||
msg="invalid device functions are generated with shared libs and cuda",
|
||||
)
|
||||
conflicts(
|
||||
"+shared",
|
||||
when="+rocm",
|
||||
msg="invalid device functions are generated with shared libs and rocm",
|
||||
)
|
||||
conflicts("+cuda", when="+rocm")
|
||||
conflicts("+rocm", when="+cuda")
|
||||
|
||||
depends_on("mpi")
|
||||
depends_on("yaml-cpp@0.5.3:")
|
||||
depends_on("openfast@4.0.0:+cxx+netcdf", when="+fsi")
|
||||
depends_on("trilinos@13.4.1+exodus+zoltan+stk", when="@=2.0.0")
|
||||
depends_on("hypre@2.29.0:", when="@2.0.0:+hypre")
|
||||
depends_on(
|
||||
"trilinos@13:+exodus+tpetra+zoltan+stk~superlu-dist~superlu+hdf5+shards~hypre+gtest"
|
||||
)
|
||||
@@ -76,12 +96,42 @@ class NaluWind(CMakePackage, CudaPackage):
|
||||
"hypre@develop +mpi+cuda~int64~superlu-dist cuda_arch={0}".format(_arch),
|
||||
when="+hypre+cuda cuda_arch={0}".format(_arch),
|
||||
)
|
||||
for _arch in ROCmPackage.amdgpu_targets:
|
||||
depends_on(
|
||||
"trilinos@13.4.0.2022.10.27: "
|
||||
"~shared+exodus+tpetra+zoltan+stk~superlu-dist~superlu"
|
||||
"+hdf5+shards~hypre+gtest+rocm amdgpu_target={0}".format(_arch),
|
||||
when="+rocm amdgpu_target={0}".format(_arch),
|
||||
)
|
||||
depends_on(
|
||||
"hypre+rocm amdgpu_target={0}".format(_arch),
|
||||
when="+hypre+rocm amdgpu_target={0}".format(_arch),
|
||||
)
|
||||
|
||||
depends_on("trilinos-catalyst-ioss-adapter", when="+catalyst")
|
||||
depends_on("fftw+mpi", when="+fftw")
|
||||
depends_on("nccmp")
|
||||
# indirect dependency needed to make original concretizer work
|
||||
depends_on("netcdf-c+parallel-netcdf")
|
||||
depends_on("boost +filesystem +iostreams cxxstd=14", when="+boost")
|
||||
supported_cxxstd = ["17"]
|
||||
variant(
|
||||
"cxxstd", default="17", values=supported_cxxstd, multi=False, description="cxx standard"
|
||||
)
|
||||
for std in supported_cxxstd:
|
||||
depends_on("trilinos cxxstd=%s" % std, when="cxxstd=%s" % std)
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
if "~stk_simd" in self.spec:
|
||||
env.append_flags("CXXFLAGS", "-DUSE_STK_SIMD_NONE")
|
||||
if "+cuda" in self.spec:
|
||||
env.set("CUDA_LAUNCH_BLOCKING", "1")
|
||||
env.set("CUDA_MANAGED_FORCE_DEVICE_ALLOC", "1")
|
||||
env.set("OMPI_CXX", self.spec["kokkos-nvcc-wrapper"].kokkos_cxx)
|
||||
env.set("MPICH_CXX", self.spec["kokkos-nvcc-wrapper"].kokkos_cxx)
|
||||
env.set("MPICXX_CXX", self.spec["kokkos-nvcc-wrapper"].kokkos_cxx)
|
||||
if "+rocm" in self.spec:
|
||||
env.append_flags("CXXFLAGS", "-fgpu-rdc")
|
||||
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
@@ -95,22 +145,26 @@ def cmake_args(self):
|
||||
self.define_from_variant("ENABLE_CUDA", "cuda"),
|
||||
self.define_from_variant("ENABLE_WIND_UTILS", "wind-utils"),
|
||||
self.define_from_variant("ENABLE_BOOST", "boost"),
|
||||
self.define_from_variant("CMAKE_CXX_STANDARD", "cxxstd"),
|
||||
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
|
||||
self.define_from_variant("ENABLE_OPENFAST", "openfast"),
|
||||
self.define_from_variant("ENABLE_TIOGA", "tioga"),
|
||||
self.define_from_variant("ENABLE_HYPRE", "hypre"),
|
||||
self.define_from_variant("ENABLE_TRILINOS_SOLVERS", "trilinos-solvers"),
|
||||
self.define_from_variant("ENABLE_PARAVIEW_CATALYST", "catalyst"),
|
||||
self.define_from_variant("ENABLE_FFTW", "fftw"),
|
||||
self.define_from_variant("ENABLE_UMPIRE", "umpire"),
|
||||
]
|
||||
|
||||
args.append(self.define_from_variant("ENABLE_OPENFAST", "openfast"))
|
||||
if "+openfast" in spec:
|
||||
args.append(self.define("OpenFAST_DIR", spec["openfast"].prefix))
|
||||
|
||||
args.append(self.define_from_variant("ENABLE_TIOGA", "tioga"))
|
||||
if "+tioga" in spec:
|
||||
args.append(self.define("TIOGA_DIR", spec["tioga"].prefix))
|
||||
|
||||
args.append(self.define_from_variant("ENABLE_HYPRE", "hypre"))
|
||||
if "+hypre" in spec:
|
||||
args.append(self.define("HYPRE_DIR", spec["hypre"].prefix))
|
||||
|
||||
args.append(self.define_from_variant("ENABLE_TRILINOS_SOLVERS", "trilinos-solvers"))
|
||||
args.append(self.define_from_variant("ENABLE_PARAVIEW_CATALYST", "catalyst"))
|
||||
if "+catalyst" in spec:
|
||||
args.append(
|
||||
self.define(
|
||||
@@ -118,7 +172,6 @@ def cmake_args(self):
|
||||
)
|
||||
)
|
||||
|
||||
args.append(self.define_from_variant("ENABLE_FFTW", "fftw"))
|
||||
if "+fftw" in spec:
|
||||
args.append(self.define("FFTW_DIR", spec["fftw"].prefix))
|
||||
|
||||
@@ -131,6 +184,15 @@ def cmake_args(self):
|
||||
]
|
||||
)
|
||||
|
||||
if "+umpire" in spec:
|
||||
args.append(self.define("UMPIRE_DIR", spec["umpire"].prefix))
|
||||
|
||||
if "+rocm" in spec:
|
||||
args.append(self.define("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
|
||||
args.append(self.define("ENABLE_ROCM", True))
|
||||
targets = spec.variants["amdgpu_target"].value
|
||||
args.append(self.define("GPU_TARGETS", ";".join(str(x) for x in targets)))
|
||||
|
||||
if "darwin" in spec.architecture:
|
||||
args.append(self.define("CMAKE_MACOSX_RPATH", "ON"))
|
||||
|
||||
|
||||
@@ -15,9 +15,14 @@ class Nalu(CMakePackage):
|
||||
"""
|
||||
|
||||
homepage = "https://github.com/NaluCFD/Nalu"
|
||||
url = "https://github.com/NaluCFD/Nalu/archive/refs/tags/v1.6.0.tar.gz"
|
||||
git = "https://github.com/NaluCFD/Nalu.git"
|
||||
|
||||
version("master", branch="master")
|
||||
version("1.6.0", sha256="2eafafe25ed44a7bc1429881f8f944b9794ca51b1e1b29c28a45b91520c7cf97")
|
||||
|
||||
depends_on("trilinos@master", when="@master")
|
||||
depends_on("trilinos@=14.0.0", when="@1.6.0")
|
||||
|
||||
# Options
|
||||
variant(
|
||||
@@ -31,16 +36,15 @@ class Nalu(CMakePackage):
|
||||
|
||||
# Required dependencies
|
||||
depends_on("mpi")
|
||||
depends_on("yaml-cpp@0.5.3:", when="+shared")
|
||||
depends_on("yaml-cpp~shared@0.5.3:", when="~shared")
|
||||
depends_on("yaml-cpp@0.5.3:0.6.2", when="+shared")
|
||||
depends_on("yaml-cpp~shared@0.5.3:0.6.2", when="~shared")
|
||||
# Cannot build Trilinos as a shared library with STK on Darwin
|
||||
# which is why we have a 'shared' variant for Nalu
|
||||
# https://github.com/trilinos/Trilinos/issues/2994
|
||||
depends_on(
|
||||
"trilinos"
|
||||
"+mpi+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost"
|
||||
"~superlu-dist+superlu+hdf5+shards~hypre"
|
||||
"@master"
|
||||
"+mpi+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost+gtest"
|
||||
"~superlu-dist+superlu+hdf5+shards~hypre gotype=long"
|
||||
)
|
||||
depends_on("trilinos~shared", when="~shared")
|
||||
# Optional dependencies
|
||||
|
||||
@@ -85,7 +85,6 @@ class Onednn(CMakePackage):
|
||||
"tbb",
|
||||
"seq",
|
||||
conditional("threadpool", when="@1.4:"),
|
||||
conditional("dpcpp", when="@2:"),
|
||||
conditional("sycl", when="@2:"),
|
||||
),
|
||||
multi=False,
|
||||
@@ -94,7 +93,7 @@ class Onednn(CMakePackage):
|
||||
"gpu_runtime",
|
||||
default="none",
|
||||
description="Runtime to use for GPU engines",
|
||||
values=("ocl", "none", conditional("dpcpp", when="@2:"), conditional("sycl", when="@2:")),
|
||||
values=("ocl", "none", conditional("sycl", when="@2:")),
|
||||
multi=False,
|
||||
)
|
||||
variant(
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
diff --git a/modules/openfast-library/src/FAST_Solver.f90 b/modules/openfast-library/src/FAST_Solver.f90
|
||||
index 364d0b78..10056965 100644
|
||||
--- a/modules/openfast-library/src/FAST_Solver.f90
|
||||
+++ b/modules/openfast-library/src/FAST_Solver.f90
|
||||
@@ -607,9 +607,9 @@ SUBROUTINE AD_InputSolve_IfW( p_FAST, u_AD, y_IfW, y_OpFM, ErrStat, ErrMsg )
|
||||
end if
|
||||
|
||||
if (u_AD%rotors(1)%NacelleMotion%NNodes > 0) then
|
||||
- u_AD%rotors(1)%InflowOnNacelle(1) = y_OpFM%u(node)
|
||||
- u_AD%rotors(1)%InflowOnNacelle(2) = y_OpFM%v(node)
|
||||
- u_AD%rotors(1)%InflowOnNacelle(3) = y_OpFM%w(node)
|
||||
+ u_AD%rotors(1)%InflowOnNacelle(1) = y_OpFM%u(1)
|
||||
+ u_AD%rotors(1)%InflowOnNacelle(2) = y_OpFM%v(1)
|
||||
+ u_AD%rotors(1)%InflowOnNacelle(3) = y_OpFM%w(1)
|
||||
node = node + 1
|
||||
else
|
||||
u_AD%rotors(1)%InflowOnNacelle = 0.0_ReKi
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user