Compare commits
33 Commits
python/use
...
bugfix/roc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6e25c4393e | ||
|
|
b93be559f5 | ||
|
|
948f5a2135 | ||
|
|
493b131fa3 | ||
|
|
daee0dd42c | ||
|
|
0369568512 | ||
|
|
019e4f31a1 | ||
|
|
a49729c581 | ||
|
|
5e42a322e7 | ||
|
|
653b43be97 | ||
|
|
7126297da5 | ||
|
|
3efc19028e | ||
|
|
0b1f74bd04 | ||
|
|
fb4e1cad45 | ||
|
|
3054b71e2e | ||
|
|
47163f7435 | ||
|
|
e322a8382f | ||
|
|
53fb4795ca | ||
|
|
4517c7fa9b | ||
|
|
efaed17f91 | ||
|
|
2c17cd365d | ||
|
|
dfe537f688 | ||
|
|
be0002b460 | ||
|
|
743ee5f3de | ||
|
|
b6caf0156f | ||
|
|
ec00ffc244 | ||
|
|
f020256b9f | ||
|
|
04377e39e0 | ||
|
|
ba2703fea6 | ||
|
|
92b1c8f763 | ||
|
|
2b29ecd9b6 | ||
|
|
5b43bf1b58 | ||
|
|
37d9770e02 |
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 ""
|
||||
@@ -213,7 +220,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 +255,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 +274,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 +286,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
|
||||
|
||||
|
||||
@@ -145,7 +145,12 @@ class ROCmPackage(PackageBase):
|
||||
depends_on("hip +rocm", when="+rocm")
|
||||
|
||||
# need amd gpu type for rocm builds
|
||||
compilers_supporting_rocm = ("cce", "rocmcc", "clang", "aocc")
|
||||
conflicts("amdgpu_target=none", when="+rocm")
|
||||
# If this variable shadows a property, it overrides it
|
||||
for cmp_name in spack.compilers.supported_compilers():
|
||||
if cmp_name not in compilers_supporting_rocm:
|
||||
conflicts(f"%{cmp_name}", when="+rocm")
|
||||
|
||||
# https://github.com/ROCm-Developer-Tools/HIP/blob/master/bin/hipcc
|
||||
# It seems that hip-clang does not (yet?) accept this flag, in which case
|
||||
|
||||
@@ -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"),
|
||||
}
|
||||
@@ -18,23 +18,23 @@
|
||||
{ attr("virtual_node", node(0..X-1, Package)) } :- max_dupes(Package, X), virtual(Package).
|
||||
|
||||
% Integrity constraints on DAG nodes
|
||||
:- attr("root", PackageNode), not attr("node", PackageNode).
|
||||
:- attr("version", PackageNode, _), not attr("node", PackageNode), not attr("virtual_node", PackageNode).
|
||||
:- attr("node_version_satisfies", PackageNode, _), not attr("node", PackageNode), not attr("virtual_node", PackageNode).
|
||||
:- attr("hash", PackageNode, _), not attr("node", PackageNode).
|
||||
:- attr("node_platform", PackageNode, _), not attr("node", PackageNode).
|
||||
:- attr("node_os", PackageNode, _), not attr("node", PackageNode).
|
||||
:- attr("node_target", PackageNode, _), not attr("node", PackageNode).
|
||||
:- attr("node_compiler_version", PackageNode, _, _), not attr("node", PackageNode).
|
||||
:- attr("variant_value", PackageNode, _, _), not attr("node", PackageNode).
|
||||
:- attr("node_flag_compiler_default", PackageNode), not attr("node", PackageNode).
|
||||
:- attr("node_flag", PackageNode, _, _), not attr("node", PackageNode).
|
||||
:- attr("no_flags", PackageNode, _), not attr("node", PackageNode).
|
||||
:- attr("external_spec_selected", PackageNode, _), not attr("node", PackageNode).
|
||||
:- attr("depends_on", ParentNode, _, _), not attr("node", ParentNode).
|
||||
:- attr("depends_on", _, ChildNode, _), not attr("node", ChildNode).
|
||||
:- attr("node_flag_source", ParentNode, _, _), not attr("node", ParentNode).
|
||||
:- attr("node_flag_source", _, _, ChildNode), not attr("node", ChildNode).
|
||||
:- attr("root", PackageNode), not attr("node", PackageNode), internal_error("root without node").
|
||||
:- attr("version", PackageNode, _), not attr("node", PackageNode), not attr("virtual_node", PackageNode), internal_error("version without node").
|
||||
:- attr("node_version_satisfies", PackageNode, _), not attr("node", PackageNode), not attr("virtual_node", PackageNode), internal_error("version satisfies without node").
|
||||
:- attr("hash", PackageNode, _), not attr("node", PackageNode), internal_error("hash without node").
|
||||
:- attr("node_platform", PackageNode, _), not attr("node", PackageNode), internal_error("platform without node").
|
||||
:- attr("node_os", PackageNode, _), not attr("node", PackageNode), internal_error("os without node").
|
||||
:- attr("node_target", PackageNode, _), not attr("node", PackageNode), internal_error("target without node").
|
||||
:- attr("node_compiler_version", PackageNode, _, _), not attr("node", PackageNode), internal_error("compiler without node").
|
||||
:- attr("variant_value", PackageNode, _, _), not attr("node", PackageNode), internal_error("variant without node").
|
||||
:- attr("node_flag_compiler_default", PackageNode), not attr("node", PackageNode), internal_error("compiler flag default without node").
|
||||
:- attr("node_flag", PackageNode, _, _), not attr("node", PackageNode), internal_error("compiler flag without node").
|
||||
:- attr("no_flags", PackageNode, _), not attr("node", PackageNode), internal_error("empty compiler flag without node").
|
||||
:- attr("external_spec_selected", PackageNode, _), not attr("node", PackageNode), internal_error("external spec without node").
|
||||
:- attr("depends_on", ParentNode, _, _), not attr("node", ParentNode), internal_error("depends on without node for parent").
|
||||
:- attr("depends_on", _, ChildNode, _), not attr("node", ChildNode), internal_error("depends on without node for child").
|
||||
:- attr("node_flag_source", ParentNode, _, _), not attr("node", ParentNode), internal_error("node flag source without flag node").
|
||||
:- attr("node_flag_source", _, _, ChildNode), not attr("node", ChildNode), internal_error("node flag source without source node").
|
||||
:- attr("virtual_node", VirtualNode), not provider(_, VirtualNode), internal_error("virtual node with no provider").
|
||||
:- provider(_, VirtualNode), not attr("virtual_node", VirtualNode), internal_error("provider with no virtual node").
|
||||
:- provider(PackageNode, _), not attr("node", PackageNode), internal_error("provider with no real node").
|
||||
|
||||
@@ -116,8 +116,8 @@ def append_curl_env_for_ssl_certs(curl):
|
||||
"CURL config:ssl_certs "
|
||||
"resolves to {}. This is not a file so default certs will be used.".format(certs)
|
||||
)
|
||||
tty.debug(dbg_msg_no_ssl_cert_config)
|
||||
return curl
|
||||
else:
|
||||
tty.debug(dbg_msg_no_ssl_cert_config)
|
||||
|
||||
|
||||
def _urlopen():
|
||||
@@ -348,7 +348,8 @@ def _curl(curl=None):
|
||||
except CommandNotFoundError as exc:
|
||||
tty.error(str(exc))
|
||||
raise spack.error.FetchError("Missing required curl fetch method")
|
||||
return append_curl_env_for_ssl_certs(curl)
|
||||
append_curl_env_for_ssl_certs(curl)
|
||||
return curl
|
||||
|
||||
|
||||
def fetch_url_text(url, curl=None, dest_dir="."):
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,12 @@ spack:
|
||||
|
||||
packages:
|
||||
all:
|
||||
require: '%gcc target=x86_64_v3'
|
||||
require:
|
||||
- one_of:
|
||||
- '%gcc target=x86_64_v3'
|
||||
- '%rocmcc target=x86_64_v3'
|
||||
- spec: '+rocm'
|
||||
when: 'rocm=*'
|
||||
providers:
|
||||
blas: [openblas]
|
||||
variants: +mpi
|
||||
@@ -140,9 +145,12 @@ spack:
|
||||
- spec: llvm-amdgpu@5.7.1
|
||||
prefix: /opt/rocm-5.7.1/llvm
|
||||
extra_attributes:
|
||||
compilers:
|
||||
c: /opt/rocm-5.7.1/llvm/bin/clang++
|
||||
cxx: /opt/rocm-5.7.1/llvm/bin/clang++
|
||||
# These will change to new cleaner format soon
|
||||
paths:
|
||||
cc: /opt/rocm-5.7.1/bin/amdclang
|
||||
cxx: /opt/rocm-5.7.1/bin/amdclang++
|
||||
fc: /opt/rocm-5.7.1/bin/amdflang
|
||||
f77: /opt/rocm-5.7.1/bin/amdflang
|
||||
hsakmt-roct:
|
||||
buildable: false
|
||||
externals:
|
||||
@@ -175,7 +183,12 @@ spack:
|
||||
rocrand:
|
||||
buildable: false
|
||||
externals:
|
||||
- spec: rocrand@5.7.1
|
||||
- spec: rocrand@5.7.1 amdgpu_target=gfx908,gfx90a
|
||||
prefix: /opt/rocm-5.7.1
|
||||
hiprand:
|
||||
buildable: false
|
||||
externals:
|
||||
- spec: hiprand@5.7.1 amdgpu_target=gfx908,gfx90a
|
||||
prefix: /opt/rocm-5.7.1
|
||||
hipsolver:
|
||||
buildable: false
|
||||
@@ -203,94 +216,57 @@ spack:
|
||||
- spec: rocprofiler-dev@5.7.1
|
||||
prefix: /opt/rocm-5.7.1
|
||||
|
||||
definitions:
|
||||
- per_arch_specs:
|
||||
- adios2 +kokkos
|
||||
- amrex
|
||||
- arborx
|
||||
- cabana
|
||||
- caliper
|
||||
- chai
|
||||
# - cp2k +mpi # cptk: Error KeyError: 'No spec with name rocm in ... "-L{}".format(spec["rocm"].libs.directories[0])
|
||||
- ecp-data-vis-sdk +paraview +vtkm
|
||||
- exago +mpi +python +raja +hiop ~ipopt cxxflags="-Wno-error=non-pod-varargs" ^hiop ~sparse +mpi +raja
|
||||
- gasnet
|
||||
- ginkgo
|
||||
- heffte
|
||||
- hpx
|
||||
- hypre
|
||||
- kokkos
|
||||
- legion
|
||||
- magma ~cuda
|
||||
- mfem
|
||||
- petsc
|
||||
- raja ~openmp
|
||||
# - slate # slate: hip/device_gescale_row_col.hip.cc:58:49: error: use of overloaded operator '*' is ambiguous (with operand types 'HIP_vector_type<double, 2>' and 'const HIP_vector_type<double, 2>')
|
||||
- slepc
|
||||
- strumpack ~slate
|
||||
- sundials
|
||||
- superlu-dist
|
||||
- tasmanian ~openmp
|
||||
- trilinos +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext +ifpack ~ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu ~stokhos +stratimikos +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long
|
||||
- umpire
|
||||
- upcxx
|
||||
# INCLUDED IN ECP DAV ROCM
|
||||
# - hdf5
|
||||
# - hdf5-vol-async
|
||||
# - hdf5-vol-cache
|
||||
# - hdf5-vol-log
|
||||
# - libcatalyst
|
||||
- paraview
|
||||
# vtk-m ~openmp # vtk-m: https://github.com/spack/spack/issues/40268
|
||||
# --
|
||||
# - lbann ~cuda # aluminum: https://github.com/spack/spack/issues/38807
|
||||
# - papi # papi: https://github.com/spack/spack/issues/27898
|
||||
|
||||
specs:
|
||||
# ROCM NOARCH
|
||||
- hpctoolkit +rocm
|
||||
- tau +mpi +rocm +syscall # tau: has issue with `spack env depfile` build
|
||||
|
||||
# ROCM 908
|
||||
- adios2 +kokkos +rocm amdgpu_target=gfx908
|
||||
- amrex +rocm amdgpu_target=gfx908
|
||||
- arborx +rocm amdgpu_target=gfx908
|
||||
- cabana +rocm amdgpu_target=gfx908
|
||||
- caliper +rocm amdgpu_target=gfx908
|
||||
- chai ~benchmarks +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
|
||||
- gasnet +rocm amdgpu_target=gfx908
|
||||
- ginkgo +rocm amdgpu_target=gfx908
|
||||
- heffte +rocm amdgpu_target=gfx908
|
||||
- hpx +rocm amdgpu_target=gfx908
|
||||
- hypre +rocm amdgpu_target=gfx908
|
||||
- kokkos +rocm amdgpu_target=gfx908
|
||||
- legion +rocm amdgpu_target=gfx908
|
||||
- magma ~cuda +rocm amdgpu_target=gfx908
|
||||
- mfem +rocm amdgpu_target=gfx908
|
||||
- petsc +rocm amdgpu_target=gfx908
|
||||
- raja ~openmp +rocm amdgpu_target=gfx908
|
||||
# - slate +rocm amdgpu_target=gfx908 # slate: hip/device_gescale_row_col.hip.cc:58:49: error: use of overloaded operator '*' is ambiguous (with operand types 'HIP_vector_type<double, 2>' and 'const HIP_vector_type<double, 2>')
|
||||
- slepc +rocm amdgpu_target=gfx908 ^petsc +rocm amdgpu_target=gfx908
|
||||
- strumpack ~slate +rocm amdgpu_target=gfx908
|
||||
- sundials +rocm amdgpu_target=gfx908
|
||||
- superlu-dist +rocm amdgpu_target=gfx908
|
||||
- tasmanian ~openmp +rocm amdgpu_target=gfx908
|
||||
- trilinos +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext +ifpack ~ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu ~stokhos +stratimikos +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long +rocm amdgpu_target=gfx908
|
||||
- umpire +rocm amdgpu_target=gfx908
|
||||
- upcxx +rocm amdgpu_target=gfx908
|
||||
# INCLUDED IN ECP DAV ROCM
|
||||
# - hdf5
|
||||
# - hdf5-vol-async
|
||||
# - hdf5-vol-cache
|
||||
# - hdf5-vol-log
|
||||
# - libcatalyst
|
||||
- paraview +rocm amdgpu_target=gfx908
|
||||
# - vtk-m ~openmp +rocm amdgpu_target=gfx908 # vtk-m: https://github.com/spack/spack/issues/40268
|
||||
# --
|
||||
# - lbann ~cuda +rocm amdgpu_target=gfx908 # aluminum: https://github.com/spack/spack/issues/38807
|
||||
# - papi +rocm amdgpu_target=gfx908 # papi: https://github.com/spack/spack/issues/27898
|
||||
|
||||
# ROCM 90a
|
||||
- adios2 +kokkos +rocm amdgpu_target=gfx90a
|
||||
- amrex +rocm amdgpu_target=gfx90a
|
||||
- arborx +rocm amdgpu_target=gfx90a
|
||||
- cabana +rocm amdgpu_target=gfx90a
|
||||
- caliper +rocm amdgpu_target=gfx90a
|
||||
- chai ~benchmarks +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
|
||||
- gasnet +rocm amdgpu_target=gfx90a
|
||||
- ginkgo +rocm amdgpu_target=gfx90a
|
||||
- heffte +rocm amdgpu_target=gfx90a
|
||||
- hpx +rocm amdgpu_target=gfx90a
|
||||
- hypre +rocm amdgpu_target=gfx90a
|
||||
- kokkos +rocm amdgpu_target=gfx90a
|
||||
- legion +rocm amdgpu_target=gfx90a
|
||||
- magma ~cuda +rocm amdgpu_target=gfx90a
|
||||
- mfem +rocm amdgpu_target=gfx90a
|
||||
- petsc +rocm amdgpu_target=gfx90a
|
||||
- raja ~openmp +rocm amdgpu_target=gfx90a
|
||||
# - slate +rocm amdgpu_target=gfx90a # slate: hip/device_gescale_row_col.hip.cc:58:49: error: use of overloaded operator '*' is ambiguous (with operand types 'HIP_vector_type<double, 2>' and 'const HIP_vector_type<double, 2>')
|
||||
- slepc +rocm amdgpu_target=gfx90a ^petsc +rocm amdgpu_target=gfx90a
|
||||
- strumpack ~slate +rocm amdgpu_target=gfx90a
|
||||
- sundials +rocm amdgpu_target=gfx90a
|
||||
- superlu-dist +rocm amdgpu_target=gfx90a
|
||||
- tasmanian ~openmp +rocm amdgpu_target=gfx90a
|
||||
- trilinos +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext +ifpack ~ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu ~stokhos +stratimikos +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long +rocm amdgpu_target=gfx90a
|
||||
- umpire +rocm amdgpu_target=gfx90a
|
||||
- upcxx +rocm amdgpu_target=gfx90a
|
||||
# INCLUDED IN ECP DAV ROCM
|
||||
# - hdf5
|
||||
# - hdf5-vol-async
|
||||
# - hdf5-vol-cache
|
||||
# - hdf5-vol-log
|
||||
# - libcatalyst
|
||||
- paraview +rocm amdgpu_target=gfx90a
|
||||
# - vtk-m ~openmp +rocm amdgpu_target=gfx90a # vtk-m: https://github.com/spack/spack/issues/40268
|
||||
# --
|
||||
# - lbann ~cuda +rocm amdgpu_target=gfx90a # aluminum: https://github.com/spack/spack/issues/38807
|
||||
# - papi +rocm amdgpu_target=gfx90a # papi: https://github.com/spack/spack/issues/27898
|
||||
- hpctoolkit ++rocm
|
||||
- tau +mpi ++rocm +syscall # tau: has issue with `spack env depfile` build
|
||||
- matrix:
|
||||
- [$per_arch_specs]
|
||||
- [++rocm]
|
||||
- [amdgpu_target==gfx908, amdgpu_target==gfx90a]
|
||||
|
||||
ci:
|
||||
pipeline-gen:
|
||||
|
||||
@@ -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
|
||||
@@ -222,7 +222,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 +269,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 +320,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 +361,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
|
||||
|
||||
@@ -224,7 +224,7 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage):
|
||||
"+rocm", when="@:20.11", msg="AMReX HIP support needs AMReX newer than version 20.11"
|
||||
)
|
||||
conflicts(
|
||||
"%rocm@4.2.0:4.2",
|
||||
"%rocmcc@4.2.0:4.2",
|
||||
when="+rocm",
|
||||
msg="AMReX does not support rocm-4.2 due to a compiler bug",
|
||||
)
|
||||
@@ -300,11 +300,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")
|
||||
|
||||
@@ -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 []
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:")
|
||||
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
@@ -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:")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -286,11 +286,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"):
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
75
var/spack/repos/builtin/packages/parthenon/package.py
Normal file
75
var/spack/repos/builtin/packages/parthenon/package.py
Normal file
@@ -0,0 +1,75 @@
|
||||
# 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 Parthenon(CMakePackage):
|
||||
"""A performance portable block-structured adaptive mesh refinement framework."""
|
||||
|
||||
homepage = "https://github.com/parthenon-hpc-lab/parthenon"
|
||||
git = "https://github.com/parthenon-hpc-lab/parthenon.git"
|
||||
url = "https://github.com/parthenon-hpc-lab/parthenon/archive/v0.8.0.tar.gz"
|
||||
maintainers("pbrady", "pgrete")
|
||||
|
||||
version("develop", branch="develop")
|
||||
version("24.03", sha256="ec9109c6bf442237641e627f301567527eb5e756b6959b6747d35315d041727c")
|
||||
version("23.11", sha256="76f79fb7d6556d94052829a8ac71f53cbda76f37fabd9233c5c0cd47ef561aee")
|
||||
version("0.8.0", sha256="9ed7c9ebdc84927a43b86c1e061f925b57cef9b567c7275f22779ed4d98e858d")
|
||||
|
||||
# ------------------------------------------------------------#
|
||||
# Variants
|
||||
# ------------------------------------------------------------#
|
||||
|
||||
variant("single", default=False, description="Run in single precision")
|
||||
variant("mpi", default=True, description="Enable mpi")
|
||||
variant(
|
||||
"host_comm_buffers", default=False, description="Allocate communication buffers on host"
|
||||
)
|
||||
variant("hdf5", default=True, description="Enable hdf5")
|
||||
with when("+hdf5"):
|
||||
variant(
|
||||
"compression",
|
||||
default=True,
|
||||
description="Enable compression in hdf5 output/restart files",
|
||||
)
|
||||
variant("sparse", default=True, description="Sparse capability")
|
||||
variant("ascent", default=False, description="Enable Ascent for in-situ vis and analysis")
|
||||
variant("examples", default=False, description="Build example drivers")
|
||||
variant("python", default=False, description="Enable python for testing")
|
||||
variant(
|
||||
"pressure", default=False, description="Registry pressure check for Kokkos CUDA kernels"
|
||||
)
|
||||
|
||||
# ------------------------------------------------------------#
|
||||
# Dependencies
|
||||
# ------------------------------------------------------------#
|
||||
|
||||
depends_on("cmake@3.16:", type="build")
|
||||
|
||||
depends_on("mpi", when="+mpi")
|
||||
depends_on("hdf5", when="+hdf5")
|
||||
depends_on("hdf5 +mpi", when="+mpi +hdf5")
|
||||
depends_on("ascent", when="+ascent")
|
||||
depends_on("python@3.5:", when="+python")
|
||||
depends_on("kokkos@4:")
|
||||
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
return [
|
||||
self.define("PARTHENON_IMPORT_KOKKOS", True),
|
||||
self.define_from_variant("PARTHENON_SINGLE_PRECISION", "single"),
|
||||
self.define_from_variant("PARTHENON_ENABLE_HOST_COMM_BUFFERS", "host_comm_buffers"),
|
||||
self.define_from_variant("CHECK_REGISTRY_PRESSURE", "pressure"),
|
||||
self.define_from_variant("PARTHENON_ENABLE_ASCENT", "ascent"),
|
||||
self.define("PARTHENON_DISABLE_MPI", not spec.variants["mpi"].value),
|
||||
self.define("PARTHENON_DISABLE_HDF5", not spec.variants["hdf5"].value),
|
||||
self.define(
|
||||
"PARTHENON_DISABLE_HDF5_COMPRESSION", not spec.variants["compression"].value
|
||||
),
|
||||
self.define("PARTHENON_DISABLE_SPARSE", not spec.variants["sparse"].value),
|
||||
self.define("PARTHENON_DISABLE_EXAMPLES", not spec.variants["examples"].value),
|
||||
self.define("BUILD_TESTING", self.run_tests),
|
||||
]
|
||||
@@ -30,6 +30,7 @@ class PyCigPythia(AutotoolsPackage, PythonExtension):
|
||||
depends_on("mpi", when="+mpi")
|
||||
depends_on("python@3.8:")
|
||||
depends_on("py-pip")
|
||||
depends_on("py-setuptools")
|
||||
|
||||
def configure_args(self):
|
||||
spec = self.spec
|
||||
|
||||
@@ -16,8 +16,6 @@ class PyPillowSimd(PyPillowBase):
|
||||
homepage = "https://github.com/uploadcare/pillow-simd"
|
||||
pypi = "Pillow-SIMD/Pillow-SIMD-7.0.0.post3.tar.gz"
|
||||
|
||||
license("HPND")
|
||||
|
||||
version(
|
||||
"9.0.0.post1", sha256="918541cfaa90ba3c0e1bae5da31ba1b1f52b09c0009bd90183b787af4e018263"
|
||||
)
|
||||
|
||||
@@ -10,11 +10,11 @@ class PyPillowBase(PythonPackage):
|
||||
"""Base class for Pillow and its fork Pillow-SIMD."""
|
||||
|
||||
maintainers("adamjstewart")
|
||||
|
||||
license("HPND")
|
||||
provides("pil")
|
||||
|
||||
# These defaults correspond to Pillow defaults
|
||||
# https://pillow.readthedocs.io/en/stable/installation.html#external-libraries
|
||||
# https://pillow.readthedocs.io/en/stable/installation/building-from-source.html
|
||||
VARIANTS_IN_SETUP_CFG = (
|
||||
"zlib",
|
||||
"jpeg",
|
||||
@@ -40,18 +40,24 @@ class PyPillowBase(PythonPackage):
|
||||
variant("raqm", when="@8.2:", default=False, description="RAQM support")
|
||||
|
||||
# Required dependencies
|
||||
# https://pillow.readthedocs.io/en/latest/installation.html#python-support
|
||||
depends_on("python@3.8:3.11", when="@10:", type=("build", "link", "run"))
|
||||
depends_on("python@3.7:3.11", when="@9.3:9.5", type=("build", "link", "run"))
|
||||
depends_on("python@3.7:3.10", when="@9.0:9.2", type=("build", "link", "run"))
|
||||
depends_on("python@3.6:3.10", when="@8.3.2:8.4", type=("build", "link", "run"))
|
||||
depends_on("python@3.6:3.9", when="@8:8.3.1", type=("build", "link", "run"))
|
||||
depends_on("python@3.5:3.8", when="@7.0:7.2", type=("build", "link", "run"))
|
||||
depends_on("python@2.7:2.8,3.5:3.8", when="@6.2.1:6.2.2", type=("build", "link", "run"))
|
||||
depends_on("py-setuptools", type="build")
|
||||
# https://pillow.readthedocs.io/en/stable/installation/python-support.html
|
||||
with default_args(type=("build", "link", "run")):
|
||||
depends_on("python@3.8:3.12", when="@10.1:")
|
||||
depends_on("python@3.8:3.11", when="@10.0")
|
||||
depends_on("python@3.7:3.11", when="@9.3:9.5")
|
||||
depends_on("python@3.7:3.10", when="@9.0:9.2")
|
||||
depends_on("python@3.6:3.10", when="@8.3.2:8.4")
|
||||
depends_on("python@3.6:3.9", when="@8:8.3.1")
|
||||
depends_on("python@3.5:3.8", when="@7.0:7.2")
|
||||
depends_on("python@2.7:2.8,3.5:3.8", when="@6.2.1:6.2.2")
|
||||
|
||||
# pyproject.toml
|
||||
with default_args(type="build"):
|
||||
depends_on("py-setuptools@67.8:", when="@10:")
|
||||
depends_on("py-setuptools")
|
||||
|
||||
# Optional dependencies
|
||||
# https://pillow.readthedocs.io/en/latest/installation.html#external-libraries
|
||||
# https://pillow.readthedocs.io/en/stable/installation/building-from-source.html
|
||||
depends_on("zlib-api", when="+zlib")
|
||||
depends_on("jpeg", when="+jpeg")
|
||||
depends_on("libtiff", when="+tiff")
|
||||
@@ -95,7 +101,7 @@ def variant_to_cfg(variant):
|
||||
setup.write("[install]\n")
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
env.set("MAX_CONCURRENCY", str(make_jobs))
|
||||
env.set("MAX_CONCURRENCY", make_jobs)
|
||||
|
||||
|
||||
class PyPillow(PyPillowBase):
|
||||
@@ -105,10 +111,12 @@ class PyPillow(PyPillowBase):
|
||||
capabilities."""
|
||||
|
||||
homepage = "https://python-pillow.org/"
|
||||
pypi = "Pillow/Pillow-7.2.0.tar.gz"
|
||||
|
||||
license("HPND")
|
||||
pypi = "pillow/pillow-10.2.0.tar.gz"
|
||||
|
||||
version("10.3.0", sha256="9d2455fbf44c914840c793e89aa82d0e1763a14253a000743719ae5946814b2d")
|
||||
version("10.2.0", sha256="e87f0b2c78157e12d7686b27d63c070fd65d994e8ddae6f328e0dcf4a0cd007e")
|
||||
version("10.1.0", sha256="e6bf8de6c36ed96c86ea3b6e1d5273c53f46ef518a062464cd7ef5dd2cf92e38")
|
||||
version("10.0.1", sha256="d72967b06be9300fed5cfbc8b5bafceec48bf7cdc7dab66b1d2549035287191d")
|
||||
version("10.0.0", sha256="9c82b5b3e043c7af0d95792d0d20ccf68f61a1fec6b3530e718b688422727396")
|
||||
version("9.5.0", sha256="bf548479d336726d7a0eceb6e767e179fbde37833ae42794602631a070d630f1")
|
||||
version("9.4.0", sha256="a1c2d7780448eb93fbcc3789bf3916aa5720d942e37945f4056680317f1cd23e")
|
||||
@@ -126,6 +134,10 @@ class PyPillow(PyPillowBase):
|
||||
version("6.2.1", sha256="bf4e972a88f8841d8fdc6db1a75e0f8d763e66e3754b03006cbc3854d89f1cb1")
|
||||
|
||||
for ver in [
|
||||
"10.3.0",
|
||||
"10.2.0",
|
||||
"10.1.0",
|
||||
"10.0.1",
|
||||
"10.0.0",
|
||||
"9.5.0",
|
||||
"9.4.0",
|
||||
@@ -143,3 +155,11 @@ class PyPillow(PyPillowBase):
|
||||
"6.2.1",
|
||||
]:
|
||||
provides("pil@" + ver, when="@" + ver)
|
||||
|
||||
def url_for_version(self, version):
|
||||
url = "https://files.pythonhosted.org/packages/source/{0}/{0}illow/{0}illow-{1}.tar.gz"
|
||||
if version >= Version("10.2"):
|
||||
letter = "p"
|
||||
else:
|
||||
letter = "P"
|
||||
return url.format(letter, version)
|
||||
|
||||
@@ -13,7 +13,9 @@ class PyRarfile(PythonPackage):
|
||||
pypi = "rarfile/rarfile-4.0.tar.gz"
|
||||
|
||||
license("ISC")
|
||||
maintainers("adamjstewart")
|
||||
|
||||
version("4.2", sha256="8e1c8e72d0845ad2b32a47ab11a719bc2e41165ec101fd4d3fe9e92aa3f469ef")
|
||||
version("4.1", sha256="db60b3b5bc1c4bdeb941427d50b606d51df677353385255583847639473eda48")
|
||||
version("4.0", sha256="67548769229c5bda0827c1663dce3f54644f9dbfba4ae86d4da2b2afd3e602a1")
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@ class PyScikitImage(PythonPackage):
|
||||
pypi = "scikit-image/scikit_image-0.17.2.tar.gz"
|
||||
git = "https://github.com/scikit-image/scikit-image.git"
|
||||
|
||||
maintainers("adamjstewart")
|
||||
license("BSD-3-Clause")
|
||||
|
||||
skip_modules = [
|
||||
# Requires pytest
|
||||
"skimage.filters.rank.tests",
|
||||
@@ -21,6 +24,8 @@ class PyScikitImage(PythonPackage):
|
||||
"skimage.future.graph",
|
||||
]
|
||||
|
||||
version("0.22.0", sha256="018d734df1d2da2719087d15f679d19285fce97cd37695103deadfaef2873236")
|
||||
version("0.21.0", sha256="b33e823c54e6f11873ea390ee49ef832b82b9f70752c8759efd09d5a4e3d87f0")
|
||||
version("0.20.0", sha256="2cd784fce18bd31d71ade62c6221440199ead03acf7544086261ee032264cf61")
|
||||
version("0.19.3", sha256="24b5367de1762da6ee126dd8f30cc4e7efda474e0d7d70685433f0e3aa2ec450")
|
||||
version("0.18.3", sha256="ecae99f93f4c5e9b1bf34959f4dc596c41f2f6b2fc407d9d9ddf85aebd3137ca")
|
||||
@@ -36,67 +41,83 @@ class PyScikitImage(PythonPackage):
|
||||
# @0.14:0.17 from requirements/build.txt, requirements/default.txt
|
||||
# @:0.13 from requirements.txt, DEPENDS.txt
|
||||
|
||||
depends_on("python@3.8:", when="@0.20:", type=("build", "link", "run"))
|
||||
with default_args(type=("build", "run")):
|
||||
depends_on("python@3.9:", when="@0.22:")
|
||||
|
||||
depends_on("py-numpy@1.21.1:", when="@0.20:", type=("build", "link", "run"))
|
||||
depends_on("py-numpy@1.17,1.18.1:", when="@0.19", type=("build", "link", "run"))
|
||||
depends_on("py-numpy@1.16.5:1.17,1.18.1:", when="@0.18", type=("build", "link", "run"))
|
||||
depends_on("py-numpy@1.15.1:1.17,1.18.1:", when="@0.17", type=("build", "link", "run"))
|
||||
depends_on("py-numpy@1.14.1:", when="@0.16", type=("build", "link", "run"))
|
||||
depends_on("py-numpy@1.11:", when="@0.13:0.15", type=("build", "link", "run"))
|
||||
depends_on("py-numpy@1.7.2:", when="@:0.12", type=("build", "run"))
|
||||
depends_on("py-scipy@1.8:", when="@0.20:", type=("build", "run"))
|
||||
depends_on("py-scipy@1.4.1:", when="@0.19:", type=("build", "run"))
|
||||
depends_on("py-scipy@1.0.1:", when="@0.17:", type=("build", "run"))
|
||||
depends_on("py-scipy@0.19:", when="@0.16:", type=("build", "run"))
|
||||
depends_on("py-scipy@0.17:", when="@0.13:", type=("build", "run"))
|
||||
depends_on("py-scipy@0.9:", type=("build", "run"))
|
||||
depends_on("py-networkx@2.8:", when="@0.20:", type=("build", "run"))
|
||||
depends_on("py-networkx@2.2:", when="@0.19:", type=("build", "run"))
|
||||
depends_on("py-networkx@2:", when="@0.15:", type=("build", "run"))
|
||||
depends_on("py-networkx@1.8:", type=("build", "run"))
|
||||
depends_on("pil@9.0.1:", when="@0.20:", type=("build", "run"))
|
||||
depends_on("pil@6.1:7.0,7.1.2:8.2,8.3.1:", when="@0.19:", type=("build", "run"))
|
||||
depends_on("pil@4.3:7.0,7.1.2:", when="@0.17:", type=("build", "run"))
|
||||
depends_on("pil@4.3:", when="@0.14:", type=("build", "run"))
|
||||
depends_on("pil@2.1:", type=("build", "run"))
|
||||
depends_on("py-imageio@2.4.1:", when="@0.19:", type=("build", "run"))
|
||||
depends_on("py-imageio@2.3:", when="@0.16:", type=("build", "run"))
|
||||
depends_on("py-imageio@2.0.1:", when="@0.15:", type=("build", "run"))
|
||||
depends_on("py-tifffile@2019.7.26:", when="@0.17:", type=("build", "run"))
|
||||
depends_on("py-pywavelets@1.1.1:", when="@0.17:", type=("build", "run"))
|
||||
depends_on("py-pywavelets@0.4:", when="@0.13:", type=("build", "run"))
|
||||
depends_on("py-packaging@20:", when="@0.19:", type=("build", "run"))
|
||||
depends_on("py-lazy-loader@0.1:", when="@0.20:", type=("build", "run"))
|
||||
with default_args(type=("build", "link", "run")):
|
||||
depends_on("py-numpy@1.22:", when="@0.22:")
|
||||
depends_on("py-numpy@1.21.1:", when="@0.20:")
|
||||
depends_on("py-numpy@1.17,1.18.1:", when="@0.19")
|
||||
depends_on("py-numpy@1.16.5:1.17,1.18.1:", when="@0.18")
|
||||
depends_on("py-numpy@1.15.1:1.17,1.18.1:", when="@0.17")
|
||||
depends_on("py-numpy@1.14.1:", when="@0.16")
|
||||
depends_on("py-numpy@1.11:", when="@0.13:0.15")
|
||||
depends_on("py-numpy@1.7.2:", when="@:0.12")
|
||||
|
||||
depends_on("py-meson-python@0.13:", when="@0.20:", type="build")
|
||||
depends_on("py-setuptools@67:", when="@0.20:", type="build")
|
||||
depends_on("py-setuptools@:59.4", when="@0.19.1:0.19", type="build")
|
||||
depends_on("py-setuptools@51:", when="@0.18:", type="build")
|
||||
depends_on("py-setuptools", type="build")
|
||||
depends_on("py-cython@0.29.24:", when="@0.20:", type="build")
|
||||
depends_on("py-cython@0.29.24:2", when="@0.19", type="build")
|
||||
depends_on("py-cython@0.29.21:", when="@0.18", type="build")
|
||||
depends_on("py-cython@0.29.13:", when="@0.17", type="build")
|
||||
depends_on("py-cython@0.25:0.28.1,0.28.3:0.28,0.29.1:", when="@0.15:0.16", type="build")
|
||||
depends_on("py-cython@0.23.4:0.28.1,0.28.3:0.28,0.29.1:", when="@0.14.3:0.14", type="build")
|
||||
depends_on("py-cython@0.23.4:0.28.1", when="@0.14.2", type="build")
|
||||
depends_on("py-cython@0.23.4:", when="@0.14.1", type="build")
|
||||
depends_on("py-cython@0.21:", when="@0.12", type="build")
|
||||
depends_on("py-pythran", when="@0.19:", type="build")
|
||||
with default_args(type=("build", "run")):
|
||||
depends_on("py-scipy@1.8:", when="@0.20:")
|
||||
depends_on("py-scipy@1.4.1:", when="@0.19:")
|
||||
depends_on("py-scipy@1.0.1:", when="@0.17:")
|
||||
depends_on("py-scipy@0.19:", when="@0.16:")
|
||||
depends_on("py-scipy@0.17:", when="@0.13:")
|
||||
depends_on("py-scipy@0.9:")
|
||||
depends_on("py-networkx@2.8:", when="@0.20:")
|
||||
depends_on("py-networkx@2.2:", when="@0.19:")
|
||||
depends_on("py-networkx@2:", when="@0.15:")
|
||||
depends_on("py-networkx@1.8:")
|
||||
depends_on("pil@9.0.1:", when="@0.20:")
|
||||
depends_on("pil@6.1:7.0,7.1.2:8.2,8.3.1:", when="@0.19:")
|
||||
depends_on("pil@4.3:7.0,7.1.2:", when="@0.17:")
|
||||
depends_on("pil@4.3:", when="@0.14:")
|
||||
depends_on("pil@2.1:")
|
||||
depends_on("py-imageio@2.27:", when="@0.21:")
|
||||
depends_on("py-imageio@2.4.1:", when="@0.19:")
|
||||
depends_on("py-imageio@2.3:", when="@0.16:")
|
||||
depends_on("py-imageio@2.0.1:", when="@0.15:")
|
||||
depends_on("py-tifffile@2022.8.12:", when="@0.21:")
|
||||
depends_on("py-tifffile@2019.7.26:", when="@0.17:")
|
||||
depends_on("py-packaging@21:", when="@0.21:")
|
||||
depends_on("py-packaging@20:", when="@0.19:")
|
||||
depends_on("py-lazy-loader@0.3:", when="@0.22:")
|
||||
depends_on("py-lazy-loader@0.2:", when="@0.21:")
|
||||
depends_on("py-lazy-loader@0.1:", when="@0.20:")
|
||||
|
||||
with default_args(type="build"):
|
||||
depends_on("py-meson-python@0.14:", when="@0.22:")
|
||||
depends_on("py-meson-python@0.13:", when="@0.20:")
|
||||
depends_on("py-setuptools@67:", when="@0.20:")
|
||||
depends_on("py-setuptools@:59.4", when="@0.19.1:0.19")
|
||||
depends_on("py-setuptools@51:", when="@0.18:")
|
||||
depends_on("py-setuptools")
|
||||
depends_on("py-cython@0.29.32:", when="@0.21:")
|
||||
depends_on("py-cython@0.29.24:", when="@0.20:")
|
||||
depends_on("py-cython@0.29.24:2", when="@0.19")
|
||||
depends_on("py-cython@0.29.21:", when="@0.18")
|
||||
depends_on("py-cython@0.29.13:", when="@0.17")
|
||||
depends_on("py-cython@0.25:0.28.1,0.28.3:0.28,0.29.1:", when="@0.15:0.16")
|
||||
depends_on("py-cython@0.23.4:0.28.1,0.28.3:0.28,0.29.1:", when="@0.14.3:0.14")
|
||||
depends_on("py-cython@0.23.4:0.28.1", when="@0.14.2")
|
||||
depends_on("py-cython@0.23.4:", when="@0.14.1")
|
||||
depends_on("py-cython@0.21:", when="@0.12")
|
||||
depends_on("py-pythran", when="@0.19:")
|
||||
|
||||
# dependencies for old versions
|
||||
depends_on("py-numpydoc@0.6:", when="@0.13.0:0.13", type="build")
|
||||
depends_on("py-matplotlib@2.0:2,3.0.1:", when="@0.15:0.18", type=("build", "run"))
|
||||
depends_on("py-matplotlib@2:", when="@0.14:0.18", type=("build", "run"))
|
||||
depends_on("py-matplotlib@1.3.1:", when="@:0.18", type=("build", "run"))
|
||||
depends_on("py-six@1.10:", when="@0.14.0:0.14", type=("build", "run"))
|
||||
depends_on("py-six@1.7.3:", when="@:0.14", type=("build", "run"))
|
||||
depends_on("py-pooch@0.5.2:", when="@0.17.0:0.17.1", type=("build", "run"))
|
||||
depends_on("py-dask+array@1:", when="@0.14.2", type=("build", "run"))
|
||||
depends_on("py-dask+array@0.9:", when="@0.14.0:0.14.1", type=("build", "run"))
|
||||
depends_on("py-dask+array@0.5:", when="@:0.13", type=("build", "run"))
|
||||
depends_on("py-cloudpickle@0.2.1:", when="@0.14.0:0.14", type=("build", "run"))
|
||||
with default_args(type="build"):
|
||||
depends_on("py-numpydoc@0.6:", when="@0.13.0:0.13")
|
||||
|
||||
with default_args(type=("build", "run")):
|
||||
depends_on("py-pywavelets@1.1.1:", when="@0.17:0.21")
|
||||
depends_on("py-pywavelets@0.4:", when="@0.13:0.16")
|
||||
depends_on("py-matplotlib@2.0:2,3.0.1:", when="@0.15:0.18")
|
||||
depends_on("py-matplotlib@2:", when="@0.14:0.18")
|
||||
depends_on("py-matplotlib@1.3.1:", when="@:0.18")
|
||||
depends_on("py-six@1.10:", when="@0.14.0:0.14")
|
||||
depends_on("py-six@1.7.3:", when="@:0.14")
|
||||
depends_on("py-pooch@0.5.2:", when="@0.17.0:0.17.1")
|
||||
depends_on("py-dask+array@1:", when="@0.14.2")
|
||||
depends_on("py-dask+array@0.9:", when="@0.14.0:0.14.1")
|
||||
depends_on("py-dask+array@0.5:", when="@:0.13")
|
||||
depends_on("py-cloudpickle@0.2.1:", when="@0.14.0:0.14")
|
||||
|
||||
def url_for_version(self, version):
|
||||
url = (
|
||||
|
||||
@@ -105,6 +105,10 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage):
|
||||
description="Enable breakpad crash dump library",
|
||||
when="@1.10:1.11",
|
||||
)
|
||||
# py-torch has strict dependencies on old protobuf/py-protobuf versions that
|
||||
# cause problems with other packages that require newer versions of protobuf
|
||||
# and py-protobuf --> provide an option to use the internal/vendored protobuf.
|
||||
variant("custom-protobuf", default=False, description="Use vendored protobuf")
|
||||
|
||||
conflicts("+cuda+rocm")
|
||||
conflicts("+tensorpipe", when="+rocm ^hip@:5.1", msg="TensorPipe not supported until ROCm 5.2")
|
||||
@@ -176,14 +180,15 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage):
|
||||
depends_on("py-pybind11@2.10.0", when="@1.13:1", type=("build", "link", "run"))
|
||||
depends_on("py-pybind11@2.6.2", when="@1.8:1.12", type=("build", "link", "run"))
|
||||
depends_on("py-pybind11@2.3.0", when="@:1.7", type=("build", "link", "run"))
|
||||
depends_on("py-protobuf@3.12.2:", when="@1.10:", type=("build", "run"))
|
||||
depends_on("py-protobuf@:3.14", when="@:1.9", type=("build", "run"))
|
||||
depends_on("protobuf@3.12.2:", when="@1.10:")
|
||||
depends_on("protobuf@:3.14", when="@:1.9")
|
||||
# https://github.com/protocolbuffers/protobuf/issues/10051
|
||||
# https://github.com/pytorch/pytorch/issues/78362
|
||||
depends_on("py-protobuf@:3", type=("build", "run"))
|
||||
depends_on("protobuf@:3", type=("build", "run"))
|
||||
with when("~custom-protobuf"):
|
||||
depends_on("py-protobuf@3.12.2:", when="@1.10:", type=("build", "run"))
|
||||
depends_on("py-protobuf@:3.14", when="@:1.9", type=("build", "run"))
|
||||
depends_on("protobuf@3.12.2:", when="@1.10:")
|
||||
depends_on("protobuf@:3.14", when="@:1.9")
|
||||
# https://github.com/protocolbuffers/protobuf/issues/10051
|
||||
# https://github.com/pytorch/pytorch/issues/78362
|
||||
depends_on("py-protobuf@:3", type=("build", "run"))
|
||||
depends_on("protobuf@:3")
|
||||
depends_on("eigen")
|
||||
# https://github.com/pytorch/pytorch/issues/60329
|
||||
# depends_on("cpuinfo@2023-01-13", when="@2.1:")
|
||||
@@ -616,7 +621,10 @@ def enable_or_disable(variant, keyword="USE", var=None):
|
||||
env.set("WITH_BLAS", "generic")
|
||||
|
||||
# Don't use vendored third-party libraries when possible
|
||||
env.set("BUILD_CUSTOM_PROTOBUF", "OFF")
|
||||
if self.spec.satisfies("+custom-protobuf"):
|
||||
env.set("BUILD_CUSTOM_PROTOBUF", "ON")
|
||||
else:
|
||||
env.set("BUILD_CUSTOM_PROTOBUF", "OFF")
|
||||
env.set("USE_SYSTEM_NCCL", "ON")
|
||||
env.set("USE_SYSTEM_EIGEN_INSTALL", "ON")
|
||||
env.set("pybind11_DIR", self.spec["py-pybind11"].prefix)
|
||||
|
||||
@@ -6,13 +6,23 @@
|
||||
import socket
|
||||
|
||||
from spack.package import *
|
||||
from spack.pkg.builtin.camp import hip_repair_cache
|
||||
|
||||
from .blt import llnl_link_helpers
|
||||
|
||||
|
||||
# Starting with 2022.03.0, the only submodule we want to fetch is tpl/desul
|
||||
# since there is no package for it. Other RAJA submodules are defined as
|
||||
# dependencies.
|
||||
def submodules(package):
|
||||
submodules = []
|
||||
submodules.append("tpl/desul")
|
||||
return submodules
|
||||
|
||||
|
||||
class Raja(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
"""RAJA Parallel Framework."""
|
||||
|
||||
homepage = "https://software.llnl.gov/RAJA/"
|
||||
homepage = "https://github.com/LLNL/RAJA"
|
||||
git = "https://github.com/LLNL/RAJA.git"
|
||||
tags = ["radiuss", "e4s"]
|
||||
|
||||
@@ -20,19 +30,43 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
|
||||
license("BSD-3-Clause")
|
||||
|
||||
version("develop", branch="develop", submodules=False)
|
||||
version("main", branch="main", submodules=False)
|
||||
version("develop", branch="develop", submodules=submodules)
|
||||
version("main", branch="main", submodules=submodules)
|
||||
version(
|
||||
"2024.02.0",
|
||||
tag="v2024.02.0",
|
||||
commit="82d1b926ada0fbb15a4a6e0adadc30c715cfda7b",
|
||||
submodules=submodules,
|
||||
)
|
||||
version(
|
||||
"2023.06.1",
|
||||
tag="v2023.06.1",
|
||||
commit="9b5f61edf3aa1e6fdbc9a4b30828c81504639963",
|
||||
submodules=submodules,
|
||||
)
|
||||
version(
|
||||
"2023.06.0",
|
||||
tag="v2023.06.0",
|
||||
commit="e330b2560747d5417cd7bd265fab3fb91d32ecbd",
|
||||
submodules=submodules,
|
||||
)
|
||||
version(
|
||||
"2022.10.5",
|
||||
tag="v2022.10.5",
|
||||
commit="3774f51339459bbbdb77055aa23f82919b6335b6",
|
||||
submodules=submodules,
|
||||
)
|
||||
version(
|
||||
"2022.10.4",
|
||||
tag="v2022.10.4",
|
||||
commit="c2a6b1740759ae3ae7c85b35e20dbffbe235355d",
|
||||
submodules=False,
|
||||
submodules=submodules,
|
||||
)
|
||||
version(
|
||||
"2022.03.0",
|
||||
tag="v2022.03.0",
|
||||
commit="4351fe6a50bd579511a625b017c9e054885e7fd2",
|
||||
submodules=False,
|
||||
submodules=submodules,
|
||||
)
|
||||
version(
|
||||
"0.14.0",
|
||||
@@ -122,8 +156,14 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
when="^hip@6.0",
|
||||
)
|
||||
|
||||
variant("openmp", default=True, description="Build OpenMP backend")
|
||||
variant("shared", default=True, description="Build Shared Libs")
|
||||
variant("openmp", default=False, description="Build OpenMP backend")
|
||||
variant("shared", default=False, description="Build shared libs")
|
||||
variant("desul", default=False, description="Build desul atomics backend")
|
||||
variant("vectorization", default=False, description="Build SIMD/SIMT intrinsics support")
|
||||
variant(
|
||||
"omptask", default=False, description="Build OpenMP task variants of internal algorithms"
|
||||
)
|
||||
|
||||
variant("plugins", default=False, description="Enable runtime plugins")
|
||||
variant("examples", default=True, description="Build examples.")
|
||||
variant("exercises", default=True, description="Build exercises.")
|
||||
@@ -131,24 +171,40 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
# and remove the +tests conflict below.
|
||||
variant("tests", default=False, description="Build tests")
|
||||
|
||||
# we don’t use variants to express the failing test, we only add a variant to
|
||||
# define whether we want to run all the tests (including those known to fail)
|
||||
# or only the passing ones.
|
||||
variant(
|
||||
"run-all-tests",
|
||||
default=False,
|
||||
description="Run all the tests, including those known to fail.",
|
||||
)
|
||||
|
||||
depends_on("blt", type="build")
|
||||
depends_on("blt@0.6.1:", type="build", when="@2024.02.0:")
|
||||
depends_on("blt@0.5.3", type="build", when="@2023.06.0:2023.06.1")
|
||||
depends_on("blt@0.5.2:0.5.3", type="build", when="@2022.10.5")
|
||||
depends_on("blt@0.5.0:0.5.3", type="build", when="@0.14.1:2022.10.4")
|
||||
depends_on("blt@0.4.1", type="build", when="@0.14.0")
|
||||
depends_on("blt@0.4.0:", type="build", when="@0.13.0")
|
||||
depends_on("blt@0.3.6:", type="build", when="@:0.12.0")
|
||||
depends_on("blt@0.4.0:0.4.1", type="build", when="@0.13.0")
|
||||
depends_on("blt@0.3.6:0.4.1", type="build", when="@:0.12.0")
|
||||
conflicts("^blt@:0.3.6", when="+rocm")
|
||||
|
||||
depends_on("camp+openmp", when="+openmp")
|
||||
depends_on("camp@main", when="@develop")
|
||||
depends_on("camp@main", when="@main")
|
||||
depends_on("camp@2024.02.0:", type="build", when="@2024.02.0:")
|
||||
depends_on("camp@2023.06.0", type="build", when="@2023.06.0:2023.06.1")
|
||||
depends_on("camp@2022.10.1:2023.06.0", type="build", when="@2022.10.3:2022.10.5")
|
||||
depends_on("camp@2022.10.0:2023.06.0", type="build", when="@2022.10.0:2022.10.2")
|
||||
depends_on("camp@2022.03.2", type="build", when="@2022.03.0:2022.03.1")
|
||||
depends_on("camp@0.2.2:0.2.3", when="@0.14.0")
|
||||
depends_on("camp@0.1.0", when="@0.10.0:0.13.0")
|
||||
depends_on("camp@2022.03.2:2022.03", when="@2022.03.0:2022.03")
|
||||
depends_on("camp@2022.10:", when="@2022.10:")
|
||||
depends_on("camp@main", when="@main")
|
||||
depends_on("camp@main", when="@develop")
|
||||
depends_on("camp+openmp", when="+openmp")
|
||||
|
||||
depends_on("cmake@:3.20", when="@:2022.03+rocm", type="build")
|
||||
depends_on("cmake@3.23:", when="@2022.10:+rocm", type="build")
|
||||
depends_on("cmake@3.23:", when="@2022.10.0:+rocm", type="build")
|
||||
depends_on("cmake@3.20:", when="@2022.10.0:", type="build")
|
||||
depends_on("cmake@3.14:", when="@2022.03.0:", type="build")
|
||||
depends_on("cmake@:3.20", when="@:2022.03+rocm", type="build")
|
||||
|
||||
depends_on("llvm-openmp", when="+openmp %apple-clang")
|
||||
|
||||
@@ -159,7 +215,7 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
depends_on(
|
||||
"camp+rocm amdgpu_target={0}".format(arch), when="amdgpu_target={0}".format(arch)
|
||||
)
|
||||
conflicts("+openmp")
|
||||
conflicts("+openmp", when="@:2022.03")
|
||||
|
||||
with when("+cuda @0.12.0:"):
|
||||
depends_on("camp+cuda")
|
||||
@@ -182,49 +238,44 @@ 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("#------------------{0}".format("-" * 30))
|
||||
entries.append("# Package custom hardware settings")
|
||||
entries.append("#------------------{0}\n".format("-" * 30))
|
||||
|
||||
entries.append(cmake_cache_option("ENABLE_OPENMP", "+openmp" in spec))
|
||||
|
||||
if "+cuda" in spec:
|
||||
entries.append(cmake_cache_option("ENABLE_CUDA", 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]))
|
||||
)
|
||||
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)))
|
||||
hip_repair_cache(entries, spec)
|
||||
hipcc_flags = []
|
||||
if self.spec.satisfies("@0.14.0"):
|
||||
if self.spec.satisfies("@0.14.0:"):
|
||||
hipcc_flags.append("-std=c++14")
|
||||
archs = self.spec.variants["amdgpu_target"].value
|
||||
if archs != "none":
|
||||
arch_str = ",".join(archs)
|
||||
hipcc_flags.append("--amdgpu-target={0}".format(arch_str))
|
||||
entries.append(cmake_cache_string("HIP_HIPCC_FLAGS", " ".join(hipcc_flags)))
|
||||
else:
|
||||
entries.append(cmake_cache_option("ENABLE_HIP", False))
|
||||
@@ -237,11 +288,39 @@ def initconfig_package_entries(self):
|
||||
|
||||
option_prefix = "RAJA_" if spec.satisfies("@0.14.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 "camp" in self.spec:
|
||||
entries.append(cmake_cache_path("camp_DIR", spec["camp"].prefix))
|
||||
|
||||
# Build options
|
||||
entries.append("#------------------{0}".format("-" * 60))
|
||||
entries.append("# Build Options")
|
||||
entries.append("#------------------{0}\n".format("-" * 60))
|
||||
|
||||
entries.append(cmake_cache_string("CMAKE_BUILD_TYPE", spec.variants["build_type"].value))
|
||||
entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec))
|
||||
|
||||
entries.append(cmake_cache_option("RAJA_ENABLE_DESUL_ATOMICS", "+desul" in spec))
|
||||
|
||||
entries.append(cmake_cache_option("RAJA_ENABLE_VECTORIZATION", "+vectorization" in spec))
|
||||
|
||||
entries.append(cmake_cache_option("RAJA_ENABLE_OPENMP_TASK", "+omptask" in spec))
|
||||
|
||||
# C++14
|
||||
if spec.satisfies("@0.14.0:"):
|
||||
entries.append(cmake_cache_string("BLT_CXX_STD", "c++14"))
|
||||
|
||||
if "+desul" in spec:
|
||||
if "+cuda" in spec:
|
||||
entries.append(cmake_cache_string("CMAKE_CUDA_STANDARD", "14"))
|
||||
|
||||
entries.append(cmake_cache_option("RAJA_ENABLE_RUNTIME_PLUGINS", "+plugins" in spec))
|
||||
|
||||
entries.append(
|
||||
cmake_cache_option("{}ENABLE_EXAMPLES".format(option_prefix), "+examples" in spec)
|
||||
)
|
||||
@@ -254,19 +333,50 @@ def initconfig_package_entries(self):
|
||||
else:
|
||||
entries.append(cmake_cache_option("ENABLE_EXERCISES", "+exercises" in spec))
|
||||
|
||||
# TODO: Treat the workaround when building tests with spack wrapper
|
||||
# For now, removing it to test CI, which builds tests outside of wrapper.
|
||||
# Work around spack adding -march=ppc64le to SPACK_TARGET_ARGS which
|
||||
# is used by the spack compiler wrapper. This can go away when BLT
|
||||
# removes -Werror from GTest flags
|
||||
if self.spec.satisfies("%clang target=ppc64le:") or not self.run_tests:
|
||||
#
|
||||
# if self.spec.satisfies("%clang target=ppc64le:")
|
||||
# or (not self.run_tests and "+tests" not in spec):
|
||||
if not self.run_tests and "+tests" not in spec:
|
||||
entries.append(cmake_cache_option("ENABLE_TESTS", False))
|
||||
else:
|
||||
entries.append(cmake_cache_option("ENABLE_TESTS", True))
|
||||
if "+run-all-tests" not in spec:
|
||||
if spec.satisfies("%clang@12.0.0:13.9.999"):
|
||||
entries.append(
|
||||
cmake_cache_string(
|
||||
"CTEST_CUSTOM_TESTS_IGNORE",
|
||||
"test-algorithm-sort-OpenMP.exe;test-algorithm-stable-sort-OpenMP.exe",
|
||||
)
|
||||
)
|
||||
excluded_tests = [
|
||||
"test-algorithm-sort-Cuda.exe",
|
||||
"test-algorithm-stable-sort-Cuda.exe",
|
||||
"test-algorithm-sort-OpenMP.exe",
|
||||
"test-algorithm-stable-sort-OpenMP.exe",
|
||||
]
|
||||
if spec.satisfies("+cuda %clang@12.0.0:13.9.999"):
|
||||
entries.append(
|
||||
cmake_cache_string("CTEST_CUSTOM_TESTS_IGNORE", ";".join(excluded_tests))
|
||||
)
|
||||
if spec.satisfies("+cuda %xl@16.1.1.12"):
|
||||
entries.append(
|
||||
cmake_cache_string(
|
||||
"CTEST_CUSTOM_TESTS_IGNORE",
|
||||
"test-algorithm-sort-Cuda.exe;test-algorithm-stable-sort-Cuda.exe",
|
||||
)
|
||||
)
|
||||
|
||||
entries.append(cmake_cache_option("RAJA_HOST_CONFIG_LOADED", True))
|
||||
|
||||
return entries
|
||||
|
||||
def cmake_args(self):
|
||||
options = []
|
||||
return options
|
||||
return []
|
||||
|
||||
@property
|
||||
def build_relpath(self):
|
||||
|
||||
@@ -35,6 +35,7 @@ class Root(CMakePackage):
|
||||
version("develop", branch="master")
|
||||
|
||||
# Production version
|
||||
version("6.30.06", sha256="300db7ed1b678ed2fb9635ca675921a1945c7c2103da840033b493091f55700c")
|
||||
version("6.30.04", sha256="2b4180b698f39cc65d91084d833a884515b325bc5f673c8e39abe818b025d8cc")
|
||||
version("6.30.02", sha256="7965a456d1ad1ee0d5fe4769bf5a8fec291af684ed93db0f3080a9c362435183")
|
||||
version("6.30.00", sha256="0592c066954cfed42312957c9cb251654456064fe2d8dabdcb8826f1c0099d71")
|
||||
|
||||
@@ -31,10 +31,13 @@ class Seacas(CMakePackage):
|
||||
url = "https://github.com/sandialabs/seacas/archive/v2019-08-20.tar.gz"
|
||||
maintainers("gsjaardema")
|
||||
|
||||
license("Intel")
|
||||
license("BSD-3-Clause")
|
||||
|
||||
# ###################### Versions ##########################
|
||||
version("master", branch="master")
|
||||
version(
|
||||
"2024-04-03", sha256="edf1aacbde87212b10737d3037107dba5cf7e2cce167863e2ebb200dc1a3fbb5"
|
||||
)
|
||||
version(
|
||||
"2024-03-11", sha256="b849d958b34e77300aaf331f29c3e6fe417fd82600850a82e674a9b7ba4045ff"
|
||||
)
|
||||
@@ -65,46 +68,74 @@ class Seacas(CMakePackage):
|
||||
"2022-01-27", sha256="beff12583814dcaf75cf8f1a78bb183c1dcc8937bc18d5206672e3a692db05e0"
|
||||
)
|
||||
version(
|
||||
"2021-10-11", sha256="f8a6dac813c0937fed4a5377123aa61d47eb459ba87ddf368d02ebe10c2c3a0d"
|
||||
"2021-10-11",
|
||||
sha256="f8a6dac813c0937fed4a5377123aa61d47eb459ba87ddf368d02ebe10c2c3a0d",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2021-09-30", sha256="5d061e35e93eb81214da3b67ddda2829cf5efed38a566be6363a9866ba2f9ab3"
|
||||
"2021-09-30",
|
||||
sha256="5d061e35e93eb81214da3b67ddda2829cf5efed38a566be6363a9866ba2f9ab3",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2021-05-12", sha256="92663767f0317018d6f6e422e8c687e49f6f7eb2b92e49e837eb7dc0ca0ac33d"
|
||||
"2021-05-12",
|
||||
sha256="92663767f0317018d6f6e422e8c687e49f6f7eb2b92e49e837eb7dc0ca0ac33d",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2021-04-05", sha256="76f66eec1fec7aba30092c94c7609495e6b90d9dcb6f35b3ee188304d02c6e04"
|
||||
"2021-04-05",
|
||||
sha256="76f66eec1fec7aba30092c94c7609495e6b90d9dcb6f35b3ee188304d02c6e04",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2021-01-20", sha256="7814e81981d03009b6816be3eb4ed3845fd02cc69e006ee008a2cbc85d508246"
|
||||
"2021-01-20",
|
||||
sha256="7814e81981d03009b6816be3eb4ed3845fd02cc69e006ee008a2cbc85d508246",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2021-01-06", sha256="b233502a7dc3e5ab69466054cf358eb033e593b8679c6721bf630b03999bd7e5"
|
||||
"2021-01-06",
|
||||
sha256="b233502a7dc3e5ab69466054cf358eb033e593b8679c6721bf630b03999bd7e5",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2020-08-13", sha256="e5eaf203eb2dbfb33c61ccde26deea459d058aaea79b0847e2f4bdb0cef1ddcb"
|
||||
"2020-08-13",
|
||||
sha256="e5eaf203eb2dbfb33c61ccde26deea459d058aaea79b0847e2f4bdb0cef1ddcb",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2020-05-12", sha256="7fc6915f60568b36e052ba07a77d691c99abe42eaba6ae8a6dc74bb33490ed60"
|
||||
"2020-05-12",
|
||||
sha256="7fc6915f60568b36e052ba07a77d691c99abe42eaba6ae8a6dc74bb33490ed60",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2020-03-16", sha256="2eb404f3dcb17c3e7eacf66978372830d40ef3722788207741fcd48417807af6"
|
||||
"2020-03-16",
|
||||
sha256="2eb404f3dcb17c3e7eacf66978372830d40ef3722788207741fcd48417807af6",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2020-01-16", sha256="5ae84f61e410a4f3f19153737e0ac0493b144f20feb1bbfe2024f76613d8bff5"
|
||||
"2020-01-16",
|
||||
sha256="5ae84f61e410a4f3f19153737e0ac0493b144f20feb1bbfe2024f76613d8bff5",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2019-12-18", sha256="f82cfa276ebc5fe6054852383da16eba7a51c81e6640c73b5f01fc3109487c6f"
|
||||
"2019-12-18",
|
||||
sha256="f82cfa276ebc5fe6054852383da16eba7a51c81e6640c73b5f01fc3109487c6f",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2019-10-14", sha256="ca4cf585cdbc15c25f302140fe1f61ee1a30d72921e032b9a854492b6c61fb91"
|
||||
"2019-10-14",
|
||||
sha256="ca4cf585cdbc15c25f302140fe1f61ee1a30d72921e032b9a854492b6c61fb91",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2019-08-20", sha256="a82c1910c2b37427616dc3716ca0b3c1c77410db6723aefb5bea9f47429666e5"
|
||||
"2019-08-20",
|
||||
sha256="a82c1910c2b37427616dc3716ca0b3c1c77410db6723aefb5bea9f47429666e5",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2019-07-26", sha256="651dac832b0cfee0f63527f563415c8a65b8e4d79242735c1e2aec606f6b2e17"
|
||||
"2019-07-26",
|
||||
sha256="651dac832b0cfee0f63527f563415c8a65b8e4d79242735c1e2aec606f6b2e17",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
# ###################### Variants ##########################
|
||||
@@ -130,25 +161,58 @@ class Seacas(CMakePackage):
|
||||
)
|
||||
|
||||
# Build options
|
||||
variant("fortran", default=not is_windows, description="Compile with Fortran support")
|
||||
variant("fortran", default=not is_windows, description="Compile with Fortran support.")
|
||||
# Enable this on Windows at your own risk, SEACAS exports no symbols and so cannot be
|
||||
# meaningfully linked against as a shared library
|
||||
variant("shared", default=True, description="Enables the build of shared libraries")
|
||||
variant("shared", default=True, description="Enables the build of shared libraries.")
|
||||
variant("mpi", default=True, description="Enables MPI parallelism.")
|
||||
variant("tests", default=True, description="Enable the SEACAS tests to build")
|
||||
variant("tests", default=True, description="Enable building the SEACAS tests.")
|
||||
variant(
|
||||
"thread_safe", default=False, description="Enable thread-safe exodus and IOSS libraries"
|
||||
"thread_safe", default=False, description="Enable thread-safe exodus and IOSS libraries."
|
||||
)
|
||||
|
||||
# TPLs (alphabet order)
|
||||
variant("adios2", default=False, description="Enable ADIOS2")
|
||||
variant("cgns", default=True, description="Enable CGNS")
|
||||
variant("faodel", default=False, description="Enable Faodel")
|
||||
variant("matio", default=True, description="Compile with matio (MatLab) support")
|
||||
variant("metis", default=False, description="Compile with METIS and ParMETIS")
|
||||
variant("pamgen", default=False, description="Compile with pamgen")
|
||||
variant("x11", default=True, description="Compile with X11")
|
||||
variant("zlib", default=False, description="Compile with zlib")
|
||||
variant(
|
||||
"adios2",
|
||||
default=False,
|
||||
description="Enable ADIOS2. See https://github.com/ornladios/ADIOS2",
|
||||
)
|
||||
variant("cgns", default=True, description="Enable CGNS.")
|
||||
variant(
|
||||
"faodel",
|
||||
default=False,
|
||||
description="Enable Faodel. See https://github.com/sandialabs/faodel",
|
||||
)
|
||||
variant(
|
||||
"matio",
|
||||
default=True,
|
||||
description="Compile with matio (MatLab) support."
|
||||
" Enables exo2mat and mat2exo translators.",
|
||||
)
|
||||
variant(
|
||||
"metis",
|
||||
default=False,
|
||||
description="Compile with METIS and ParMETIS. "
|
||||
"Provides additional parallel decomposition options.",
|
||||
)
|
||||
variant(
|
||||
"pamgen",
|
||||
default=False,
|
||||
description="Compile with pamgen. "
|
||||
"Provides another ioss database option for internal generation of mesh models.",
|
||||
)
|
||||
variant(
|
||||
"x11",
|
||||
default=True,
|
||||
description="Compile with X11. "
|
||||
"Needed if building blot (visualizer) and fastq (2D mesh generation).",
|
||||
)
|
||||
variant(
|
||||
"zlib",
|
||||
default=False,
|
||||
description="Compile with zlib. "
|
||||
"Sometimes needed when building static libraries on some systems.",
|
||||
)
|
||||
# ###################### Dependencies ##########################
|
||||
depends_on("cmake@3.22:", when="@2023-10-24:", type="build")
|
||||
depends_on("cmake@3.17:", when="@:2023-05-30", type="build")
|
||||
@@ -167,6 +231,8 @@ class Seacas(CMakePackage):
|
||||
depends_on("fmt@9.1.0", when="@2022-10-14:2023-05-30")
|
||||
depends_on("fmt@8.1.0:9", when="@2022-03-04:2022-05-16")
|
||||
|
||||
depends_on("catch2@3:", when="@2024-03-11:+tests")
|
||||
|
||||
depends_on("matio", when="+matio")
|
||||
depends_on("libx11", when="+x11")
|
||||
|
||||
|
||||
@@ -542,8 +542,9 @@ class SimmetrixSimmodsuite(Package):
|
||||
variant("paralleladapt", default=False, description="enable parallel adaptation")
|
||||
|
||||
depends_on("mpi")
|
||||
depends_on("libtirpc", type="link")
|
||||
|
||||
oslib = "x64_rhel7_gcc48"
|
||||
oslib = "x64_rhel8_gcc83"
|
||||
|
||||
for release in RELEASES:
|
||||
# define the version using the mscore tarball
|
||||
@@ -571,12 +572,12 @@ class SimmetrixSimmodsuite(Package):
|
||||
simmetrix_resource(_name, url, sha256, condition)
|
||||
|
||||
def setup_dependent_build_environment(self, env, dependent_spec):
|
||||
archlib = join_path(prefix.lib, self.oslib)
|
||||
archlib = join_path(self.prefix.lib, self.oslib)
|
||||
env.append_path("CMAKE_PREFIX_PATH", archlib)
|
||||
simmetrix_setkernelcmakeprefixpath(self.spec, archlib, env)
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
archlib = join_path(prefix.lib, self.oslib)
|
||||
archlib = join_path(self.prefix.lib, self.oslib)
|
||||
env.append_path("CMAKE_PREFIX_PATH", archlib)
|
||||
simmetrix_setkernelcmakeprefixpath(self.spec, archlib, env)
|
||||
|
||||
|
||||
@@ -89,7 +89,8 @@ class Slate(CMakePackage, CudaPackage, ROCmPackage):
|
||||
depends_on("lapackpp@2021.04.00:", when="@2021.05.01:")
|
||||
depends_on("lapackpp@2020.10.02", when="@2020.10.00")
|
||||
depends_on("lapackpp@master", when="@master")
|
||||
depends_on("scalapack", type="test")
|
||||
depends_on("scalapack", when="@:2022.07.00", type="test")
|
||||
depends_on("python", type="test")
|
||||
depends_on("hipify-clang", when="@:2021.05.02 +rocm ^hip@5:")
|
||||
|
||||
requires("%oneapi", when="+sycl", msg="slate+sycl must be compiled with %oneapi")
|
||||
@@ -136,8 +137,8 @@ def cmake_args(self):
|
||||
archs = ";".join(spec.variants["amdgpu_target"].value)
|
||||
config.append("-DCMAKE_HIP_ARCHITECTURES=%s" % archs)
|
||||
|
||||
if self.run_tests:
|
||||
config.append("-DSCALAPACK_LIBRARIES=%s" % spec["scalapack"].libs.joined(";"))
|
||||
slibs = spec["scalapack"].libs.joined(";") if "scalapack" in spec else "none"
|
||||
config.append(f"-DSCALAPACK_LIBRARIES={slibs}")
|
||||
return config
|
||||
|
||||
@run_after("install")
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
diff --git a/cmake/SetupUmpireThirdParty.cmake b/cmake/SetupUmpireThirdParty.cmake
|
||||
index fc351369..6e82ab6e 100644
|
||||
--- a/cmake/SetupUmpireThirdParty.cmake
|
||||
+++ b/cmake/SetupUmpireThirdParty.cmake
|
||||
@@ -80,29 +80,40 @@ if (UMPIRE_ENABLE_SQLITE_EXPERIMENTAL)
|
||||
find_package(SQLite3 REQUIRED)
|
||||
endif()
|
||||
|
||||
-set(UMPIRE_NEEDS_BLT_TPLS False)
|
||||
-if (UMPIRE_ENABLE_MPI OR UMPIRE_ENABLE_HIP OR UMPIRE_ENABLE_OPENMP OR UMPIRE_ENABLE_CUDA)
|
||||
- set(UMPIRE_NEEDS_BLT_TPLS True)
|
||||
-
|
||||
- if (NOT BLT_EXPORTED)
|
||||
- set(BLT_EXPORTED On CACHE BOOL "" FORCE)
|
||||
- blt_import_library(NAME blt_stub EXPORTABLE On)
|
||||
- set_target_properties(blt_stub PROPERTIES EXPORT_NAME blt::blt_stub)
|
||||
- install(TARGETS blt_stub
|
||||
- EXPORT bltTargets)
|
||||
- blt_export_tpl_targets(EXPORT bltTargets NAMESPACE blt)
|
||||
- install(EXPORT bltTargets
|
||||
- DESTINATION lib/cmake/umpire)
|
||||
- elseif (UMPIRE_ENABLE_MPI)
|
||||
+
|
||||
+#################################################
|
||||
+# use bonafide cmake targets for openmp and mpi
|
||||
+#################################################
|
||||
+set(umpire_mpi_deps "")
|
||||
+if (UMPIRE_ENABLE_MPI)
|
||||
+ if(ENABLE_FIND_MPI)
|
||||
+ set (umpire_mpi_deps MPI::MPI_CXX)
|
||||
+ endif()
|
||||
+endif()
|
||||
+
|
||||
+set(umpire_openmp_deps "")
|
||||
+if (UMPIRE_ENABLE_OPENMP)
|
||||
+ set (umpire_openmp_deps OpenMP::OpenMP_CXX)
|
||||
+endif ()
|
||||
+
|
||||
+#################################################
|
||||
+# export necessary blt targets
|
||||
+#################################################
|
||||
+
|
||||
+set(UMPIRE_BLT_TPL_DEPS_EXPORTS)
|
||||
+
|
||||
+blt_list_append(TO UMPIRE_BLT_TPL_DEPS_EXPORTS ELEMENTS cuda cuda_runtime IF UMPIRE_ENABLE_CUDA)
|
||||
+blt_list_append(TO UMPIRE_BLT_TPL_DEPS_EXPORTS ELEMENTS blt_hip blt_hip_runtime IF UMPIRE_ENABLE_HIP)
|
||||
+
|
||||
+foreach(dep ${UMPIRE_BLT_TPL_DEPS_EXPORTS})
|
||||
# If the target is EXPORTABLE, add it to the export set
|
||||
- get_target_property(_is_imported mpi IMPORTED)
|
||||
+ get_target_property(_is_imported ${dep} IMPORTED)
|
||||
if(NOT ${_is_imported})
|
||||
- install(TARGETS mpi
|
||||
- EXPORT ${arg_EXPORT})
|
||||
- # Namespace target to avoid conflicts
|
||||
- set_target_properties(mpi PROPERTIES EXPORT_NAME blt::mpi)
|
||||
- install(EXPORT bltTargets
|
||||
- DESTINATION lib/cmake/umpire)
|
||||
+ install(TARGETS ${dep}
|
||||
+ EXPORT umpire-targets
|
||||
+ DESTINATION lib/cmake/umpire)
|
||||
+ # Namespace target to avoid conflicts
|
||||
+ set_target_properties(${dep} PROPERTIES EXPORT_NAME umpire::blt_tpl_exports_${dep})
|
||||
endif()
|
||||
- endif()
|
||||
-endif()
|
||||
+endforeach()
|
||||
+
|
||||
diff --git a/src/umpire/interface/c_fortran/CMakeLists.txt b/src/umpire/interface/c_fortran/CMakeLists.txt
|
||||
index ab675adf..22e4dc90 100644
|
||||
--- a/src/umpire/interface/c_fortran/CMakeLists.txt
|
||||
+++ b/src/umpire/interface/c_fortran/CMakeLists.txt
|
||||
@@ -43,7 +43,7 @@ set_source_files_properties(
|
||||
set(umpire_interface_c_fortran_depends camp umpire_util)
|
||||
blt_list_append( TO umpire_interface_c_fortran_depends ELEMENTS cuda_runtime IF UMPIRE_ENABLE_CUDA )
|
||||
-blt_list_append( TO umpire_interface_c_fortran_depends ELEMENTS blt::hip_runtime IF UMPIRE_ENABLE_HIP )
|
||||
-blt_list_append( TO umpire_interface_c_fortran_depends ELEMENTS mpi IF UMPIRE_ENABLE_MPI )
|
||||
+blt_list_append( TO umpire_interface_c_fortran_depends ELEMENTS blt_hip_runtime IF UMPIRE_ENABLE_HIP )
|
||||
+blt_list_append( TO umpire_interface_c_fortran_depends ELEMENTS ${umpire_mpi_deps} IF UMPIRE_ENABLE_MPI )
|
||||
|
||||
blt_add_library(
|
||||
NAME umpire_interface
|
||||
diff --git a/src/umpire/util/CMakeLists.txt b/src/umpire/util/CMakeLists.txt
|
||||
index 551f8188..02eb13e4 100644
|
||||
--- a/src/umpire/util/CMakeLists.txt
|
||||
+++ b/src/umpire/util/CMakeLists.txt
|
||||
@@ -73,14 +73,15 @@ endif()
|
||||
|
||||
if (UMPIRE_ENABLE_MPI)
|
||||
set (umpire_util_depends
|
||||
- ${umpire_util_depends}
|
||||
- mpi)
|
||||
+ ${umpire_util_depends}
|
||||
+ ${umpire_mpi_deps}
|
||||
+ )
|
||||
endif ()
|
||||
|
||||
if (UMPIRE_ENABLE_OPENMP_TARGET)
|
||||
set (umpire_util_depends
|
||||
- ${umpire_util_depends}
|
||||
- openmp)
|
||||
+ ${umpire_util_depends}
|
||||
+ ${umpire_openmp_deps})
|
||||
endif ()
|
||||
|
||||
if (UMPIRE_ENABLE_HIP)
|
||||
130
var/spack/repos/builtin/packages/umpire/export_includes.patch
Normal file
130
var/spack/repos/builtin/packages/umpire/export_includes.patch
Normal file
@@ -0,0 +1,130 @@
|
||||
diff --git a/src/tpl/CMakeLists.txt b/src/tpl/CMakeLists.txt
|
||||
index 6803f0a4..60269f88 100644
|
||||
--- a/src/tpl/CMakeLists.txt
|
||||
+++ b/src/tpl/CMakeLists.txt
|
||||
@@ -50,7 +50,13 @@ target_include_directories(
|
||||
umpire_tpl_json
|
||||
INTERFACE
|
||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/tpl>
|
||||
- $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>
|
||||
+ $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>)
|
||||
+
|
||||
+blt_convert_to_system_includes(TARGET umpire_tpl_json)
|
||||
+
|
||||
+target_include_directories(
|
||||
+ umpire_tpl_json
|
||||
+ INTERFACE
|
||||
$<INSTALL_INTERFACE:include>)
|
||||
|
||||
install(FILES
|
||||
@@ -64,8 +70,6 @@ install(TARGETS
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib)
|
||||
|
||||
-blt_patch_target(NAME umpire_tpl_json
|
||||
- TREAT_INCLUDES_AS_SYSTEM ON)
|
||||
|
||||
#
|
||||
# CLI11 Option Parsing Headers
|
||||
@@ -82,7 +86,13 @@ target_include_directories(
|
||||
umpire_tpl_CLI11
|
||||
INTERFACE
|
||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/tpl>
|
||||
- $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>
|
||||
+ $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>)
|
||||
+
|
||||
+blt_convert_to_system_includes(TARGET umpire_tpl_CLI11)
|
||||
+
|
||||
+target_include_directories(
|
||||
+ umpire_tpl_CLI11
|
||||
+ INTERFACE
|
||||
$<INSTALL_INTERFACE:include>)
|
||||
|
||||
install(FILES
|
||||
@@ -96,9 +106,6 @@ install(TARGETS
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib)
|
||||
|
||||
-blt_patch_target(NAME umpire_tpl_CLI11
|
||||
- TREAT_INCLUDES_AS_SYSTEM ON)
|
||||
-
|
||||
add_subdirectory(umpire/judy)
|
||||
|
||||
if (NOT TARGET camp)
|
||||
@@ -153,7 +160,14 @@ target_include_directories(
|
||||
umpire_tpl_fmt
|
||||
INTERFACE
|
||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/tpl>
|
||||
- $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>
|
||||
+ $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>)
|
||||
+
|
||||
+# Avoid warnings from fmt (so we can still use -Werror)
|
||||
+blt_convert_to_system_includes(TARGET umpire_tpl_fmt)
|
||||
+
|
||||
+target_include_directories(
|
||||
+ umpire_tpl_fmt
|
||||
+ INTERFACE
|
||||
$<INSTALL_INTERFACE:include>)
|
||||
|
||||
if (C_COMPILER_FAMILY_IS_XL)
|
||||
@@ -168,21 +182,17 @@ if (C_COMPILER_FAMILY_IS_PGI)
|
||||
set(_fmt_warning_disable_flag
|
||||
"--diag_suppress 1625;--diag_suppress 185;--diag_suppress 811;--diag_suppress 186")
|
||||
|
||||
- if (ENABLE_FORTRAN)
|
||||
+ if (ENABLE_FORTRAN)
|
||||
target_compile_options(umpire_tpl_fmt
|
||||
INTERFACE
|
||||
$<$<NOT:$<COMPILE_LANGUAGE:Fortran>>:${_fmt_warning_disable_flag}>)
|
||||
- else ()
|
||||
- target_compile_options(umpire_tpl_fmt
|
||||
- INTERFACE
|
||||
- ${_fmt_warning_disable_flag})
|
||||
- endif ()
|
||||
+ else ()
|
||||
+ target_compile_options(umpire_tpl_fmt
|
||||
+ INTERFACE
|
||||
+ ${_fmt_warning_disable_flag})
|
||||
+ endif ()
|
||||
endif ()
|
||||
|
||||
-# Avoid warnings from fmt (so we can still use -Werror)
|
||||
-blt_patch_target(NAME umpire_tpl_fmt
|
||||
- TREAT_INCLUDES_AS_SYSTEM ON)
|
||||
-
|
||||
if (C_COMPILER_FAMILY_IS_GNU)
|
||||
target_compile_options(umpire_tpl_fmt
|
||||
INTERFACE
|
||||
diff --git a/src/umpire/interface/c_fortran/CMakeLists.txt b/src/umpire/interface/c_fortran/CMakeLists.txt
|
||||
index cf0d6932..ab675adf 100644
|
||||
--- a/src/umpire/interface/c_fortran/CMakeLists.txt
|
||||
+++ b/src/umpire/interface/c_fortran/CMakeLists.txt
|
||||
@@ -57,15 +57,22 @@ target_include_directories(
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>
|
||||
- $<BUILD_INTERFACE:$<$<COMPILE_LANGUAGE:Fortran>:${CMAKE_Fortran_MODULE_DIRECTORY}>>
|
||||
- $<INSTALL_INTERFACE:$<$<COMPILE_LANGUAGE:Fortran>:include/umpire>> # for Fortran module files
|
||||
$<INSTALL_INTERFACE:include>)
|
||||
|
||||
install(FILES
|
||||
${umpire_interface_c_fortran_headers}
|
||||
DESTINATION include/umpire/interface/c_fortran)
|
||||
|
||||
-install(DIRECTORY
|
||||
- ${CMAKE_Fortran_MODULE_DIRECTORY}/
|
||||
- DESTINATION include/umpire
|
||||
- FILES_MATCHING PATTERN "*.mod")
|
||||
+if(UMPIRE_ENABLE_FORTRAN)
|
||||
+ target_include_directories(
|
||||
+ umpire_interface
|
||||
+ PUBLIC
|
||||
+ $<BUILD_INTERFACE:${CMAKE_Fortran_MODULE_DIRECTORY}>
|
||||
+ $<INSTALL_INTERFACE:include/umpire>)
|
||||
+
|
||||
+ install(DIRECTORY
|
||||
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/
|
||||
+ DESTINATION include/umpire
|
||||
+ FILES_MATCHING PATTERN "*.mod")
|
||||
+endif()
|
||||
+
|
||||
@@ -9,7 +9,8 @@
|
||||
import llnl.util.tty as tty
|
||||
|
||||
from spack.package import *
|
||||
from spack.pkg.builtin.camp import hip_repair_cache
|
||||
|
||||
from .blt import llnl_link_helpers
|
||||
|
||||
|
||||
class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
@@ -25,7 +26,18 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
license("MIT")
|
||||
|
||||
version("develop", branch="develop", submodules=False)
|
||||
version("main", branch="main", submodules=False)
|
||||
version(
|
||||
"2024.02.0",
|
||||
tag="v2024.02.0",
|
||||
commit="1db3fef913a70d8882ca510a4830c77c388873e0",
|
||||
submodules=False,
|
||||
)
|
||||
version(
|
||||
"2023.06.0",
|
||||
tag="v2023.06.0",
|
||||
commit="1e5ef604de88e81bb3b6fc4a5d914be833529da5",
|
||||
submodules=False,
|
||||
)
|
||||
version(
|
||||
"2022.10.0",
|
||||
tag="v2022.10.0",
|
||||
@@ -126,6 +138,11 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
"0.1.3", tag="v0.1.3", commit="cc347edeb17f5f30f694aa47f395d17369a2e449", submodules=True
|
||||
)
|
||||
|
||||
# Some projects importing both camp and umpire targets end up with conflicts in BLT targets
|
||||
# import. This is not addressing the root cause, which will be addressed in BLT@5.4.0 and will
|
||||
# require adapting umpire build system.
|
||||
patch("dual_blt_import_umpire_2022.10_2023.06.patch", when="@2022.10.0:2023.06.0")
|
||||
patch("export_includes.patch", when="@2022.10.0")
|
||||
patch("std-filesystem-pr784.patch", when="@2022.03.1 +rocm ^blt@0.5.2:")
|
||||
patch("camp_target_umpire_3.0.0.patch", when="@3.0.0")
|
||||
patch("cmake_version_check.patch", when="@4.1")
|
||||
@@ -161,11 +178,19 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
|
||||
variant("fortran", default=False, description="Build C/Fortran API")
|
||||
variant("c", default=True, description="Build C API")
|
||||
variant("mpi", default=False, description="Enable MPI support")
|
||||
variant("ipc_shmem", default=False, description="Enable POSIX shared memory")
|
||||
variant(
|
||||
"sqlite_experimental",
|
||||
default=False,
|
||||
description="Enable sqlite integration with umpire events (Experimental)",
|
||||
)
|
||||
variant("numa", default=False, description="Enable NUMA support")
|
||||
variant("shared", default=True, description="Enable Shared libs")
|
||||
variant("openmp", default=False, description="Build with OpenMP support")
|
||||
variant("openmp_target", default=False, description="Build with OpenMP 4.5 support")
|
||||
variant("deviceconst", default=False, description="Enables support for constant device memory")
|
||||
variant("examples", default=True, description="Build Umpire Examples")
|
||||
variant("examples", default=False, description="Build Umpire Examples")
|
||||
variant(
|
||||
"tests",
|
||||
default="none",
|
||||
@@ -173,29 +198,48 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
multi=False,
|
||||
description="Tests to run",
|
||||
)
|
||||
variant("device_alloc", default=True, description="Build Umpire Device Allocator")
|
||||
variant("tools", default=False, description="Enable tools")
|
||||
variant("backtrace", default=False, description="Enable backtrace tools")
|
||||
variant("dev_benchmarks", default=False, description="Enable developer benchmarks")
|
||||
variant("device_alloc", default=False, description="Enable DeviceAllocator")
|
||||
variant("werror", default=False, description="Enable warnings as errors")
|
||||
variant("asan", default=False, description="Enable ASAN")
|
||||
variant("sanitizer_tests", default=False, description="Enable address sanitizer tests")
|
||||
|
||||
depends_on("cmake@3.8:", type="build")
|
||||
depends_on("cmake@3.9:", when="+cuda", type="build")
|
||||
depends_on("cmake@3.23:", when="@2022.10.0: +rocm", type="build")
|
||||
depends_on("cmake@3.20:", when="@2022.10.0:", type="build")
|
||||
depends_on("cmake@:3.20", when="@2022.03.0:2022.03 +rocm", type="build")
|
||||
depends_on("cmake@3.14:", when="@2022.03.0:", type="build")
|
||||
depends_on("cmake@3.9:", when="+cuda", type="build")
|
||||
depends_on("cmake@3.8:", type="build")
|
||||
|
||||
depends_on("blt", type="build")
|
||||
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:2022.03.1")
|
||||
depends_on("blt@0.4.1", type="build", when="@6.0.0")
|
||||
depends_on("blt@0.4.0:", type="build", when="@4.1.3:5.0.1")
|
||||
depends_on("blt@0.3.6:", type="build", when="@:4.1.2")
|
||||
depends_on("blt@0.4.0:0.4.1", type="build", when="@4.1.3:5.0.1")
|
||||
depends_on("blt@0.3.6:0.4.1", type="build", when="@:4.1.2")
|
||||
conflicts("^blt@:0.3.6", when="+rocm")
|
||||
|
||||
depends_on("camp", when="@5.0.0:")
|
||||
depends_on("camp@0.2.2:0.2.3", when="@6.0.0")
|
||||
depends_on("camp@0.1.0", when="@5.0.0:5.0.1")
|
||||
depends_on("camp@2022.03.2:", when="@2022.03.0:")
|
||||
depends_on("camp@main", when="@main")
|
||||
depends_on("camp@main", when="@develop")
|
||||
depends_on("camp")
|
||||
depends_on("camp+openmp", when="+openmp")
|
||||
depends_on("camp~cuda", when="~cuda")
|
||||
depends_on("camp~rocm", when="~rocm")
|
||||
depends_on("camp@main", when="@develop")
|
||||
depends_on("camp@2024.02.0:", when="@2024.02.0:")
|
||||
depends_on("camp@2023.06.0", when="@2023.06.0")
|
||||
depends_on("camp@2022.10.0:2023.06.0", when="@2022.10.0")
|
||||
depends_on("camp@2022.03.2:2023.06.0", when="@2022.03.0:2022.03.1")
|
||||
depends_on("camp@0.2.2:0.2.3", when="@6.0.0")
|
||||
depends_on("camp@0.1.0", when="@5.0.0:5.0.1")
|
||||
|
||||
depends_on("sqlite", when="+sqlite_experimental")
|
||||
depends_on("mpi", when="+mpi")
|
||||
|
||||
depends_on("fmt@9.1:", when="@2024.02.0:")
|
||||
# For some reason, we need c++ 17 explicitly only with intel
|
||||
depends_on("fmt@9.1: cxxstd=17", when="@2024.02.0: %intel@19.1")
|
||||
|
||||
with when("@5.0.0:"):
|
||||
with when("+cuda"):
|
||||
@@ -213,7 +257,26 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
|
||||
conflicts("+numa", when="@:0.3.2")
|
||||
conflicts("~c", when="+fortran", msg="Fortran API requires C API")
|
||||
|
||||
# device allocator must be used with more current umpire versions, rocm 5.4.0 and greater,
|
||||
# and with either rocm or cuda enabled
|
||||
conflicts("+device_alloc", when="@:2022.03.0")
|
||||
conflicts("+device_alloc", when="^hip@:5.3.99")
|
||||
conflicts("+device_alloc", when="~rocm~cuda")
|
||||
|
||||
conflicts("+deviceconst", when="~rocm~cuda")
|
||||
conflicts("~openmp", when="+openmp_target", msg="OpenMP target requires OpenMP")
|
||||
conflicts("+cuda", when="+rocm")
|
||||
conflicts("+tools", when="+rocm")
|
||||
conflicts(
|
||||
"+rocm",
|
||||
when="+openmp_target",
|
||||
msg="Cant support both rocm and openmp device backends at once",
|
||||
)
|
||||
conflicts("+ipc_shmem", when="@:5.0.1")
|
||||
|
||||
conflicts("+sqlite_experimental", when="@:6.0.0")
|
||||
conflicts("+sanitizer_tests", when="~asan")
|
||||
|
||||
# device allocator exports device code, which requires static libs
|
||||
# currently only available for cuda.
|
||||
@@ -230,73 +293,78 @@ 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))
|
||||
|
||||
option_prefix = "UMPIRE_" if spec.satisfies("@2022.03.0:") else ""
|
||||
|
||||
if "+fortran" in spec and self.compiler.fc is not None:
|
||||
if "+fortran" in spec and compiler.fc is not None:
|
||||
entries.append(cmake_cache_option("ENABLE_FORTRAN", True))
|
||||
else:
|
||||
entries.append(cmake_cache_option("ENABLE_FORTRAN", False))
|
||||
|
||||
entries.append(cmake_cache_option("{}ENABLE_C".format(option_prefix), "+c" in spec))
|
||||
|
||||
llnl_link_helpers(entries, spec, compiler)
|
||||
|
||||
return entries
|
||||
|
||||
def initconfig_hardware_entries(self):
|
||||
spec = self.spec
|
||||
entries = super().initconfig_hardware_entries()
|
||||
|
||||
entries.append("#------------------{0}".format("-" * 30))
|
||||
entries.append("# Package custom hardware settings")
|
||||
entries.append("#------------------{0}\n".format("-" * 30))
|
||||
|
||||
option_prefix = "UMPIRE_" if spec.satisfies("@2022.03.0:") else ""
|
||||
|
||||
if "+cuda" in spec:
|
||||
entries.append(cmake_cache_option("ENABLE_CUDA", 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)))
|
||||
|
||||
entries.append(
|
||||
cmake_cache_option(
|
||||
"{}ENABLE_DEVICE_CONST".format(option_prefix), spec.satisfies("+deviceconst")
|
||||
)
|
||||
)
|
||||
# Umpire used to pick only the first architecture in the list. The shared logic in
|
||||
# CachedCMakePackage keeps the list of architectures.
|
||||
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)))
|
||||
hip_repair_cache(entries, spec)
|
||||
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))
|
||||
)
|
||||
entries.append(
|
||||
cmake_cache_string("CMAKE_HIP_ARCHITECTURES", "{0}".format(arch_str))
|
||||
)
|
||||
else:
|
||||
entries.append(cmake_cache_option("ENABLE_HIP", False))
|
||||
|
||||
entries.append(
|
||||
cmake_cache_option(
|
||||
"{}ENABLE_DEVICE_CONST".format(option_prefix), "+deviceconst" in spec
|
||||
)
|
||||
)
|
||||
|
||||
entries.append(
|
||||
cmake_cache_option(
|
||||
"{}ENABLE_OPENMP_TARGET".format(option_prefix), "+openmp_target" in spec
|
||||
)
|
||||
)
|
||||
|
||||
if "+openmp_target" in spec and "%xl" in spec:
|
||||
entries.append(cmake_cache_string("OpenMP_CXX_FLAGS", "-qsmp;-qoffload"))
|
||||
|
||||
return entries
|
||||
|
||||
def initconfig_mpi_entries(self):
|
||||
spec = self.spec
|
||||
|
||||
entries = super(Umpire, self).initconfig_mpi_entries()
|
||||
entries.append(cmake_cache_option("ENABLE_MPI", "+mpi" in spec))
|
||||
|
||||
return entries
|
||||
|
||||
def initconfig_package_entries(self):
|
||||
@@ -313,24 +381,73 @@ def initconfig_package_entries(self):
|
||||
entries.append(cmake_cache_path("BLT_SOURCE_DIR", spec["blt"].prefix))
|
||||
if spec.satisfies("@5.0.0:"):
|
||||
entries.append(cmake_cache_path("camp_DIR", spec["camp"].prefix))
|
||||
entries.append(cmake_cache_option("{}ENABLE_NUMA".format(option_prefix), "+numa" in spec))
|
||||
|
||||
if spec.satisfies("@2024.02.0:"):
|
||||
entries.append(cmake_cache_path("fmt_DIR", spec["fmt"].prefix))
|
||||
|
||||
# Build options
|
||||
entries.append("#------------------{0}".format("-" * 60))
|
||||
entries.append("# Build Options")
|
||||
entries.append("#------------------{0}\n".format("-" * 60))
|
||||
|
||||
entries.append(cmake_cache_string("CMAKE_BUILD_TYPE", spec.variants["build_type"].value))
|
||||
entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec))
|
||||
entries.append(cmake_cache_option("ENABLE_WARNINGS_AS_ERRORS", "+werror" in spec))
|
||||
|
||||
# Generic options that have a prefixed equivalent in Umpire CMake
|
||||
entries.append(cmake_cache_option("ENABLE_OPENMP", "+openmp" in spec))
|
||||
entries.append(cmake_cache_option("ENABLE_BENCHMARKS", "tests=benchmarks" 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 or "+dev_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_BENCHMARKS", False))
|
||||
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_NUMA".format(option_prefix), "+numa" in spec))
|
||||
entries.append(
|
||||
cmake_cache_option("{}ENABLE_EXAMPLES".format(option_prefix), "+examples" in spec)
|
||||
cmake_cache_option(
|
||||
"{}ENABLE_DEVELOPER_BENCHMARKS".format(option_prefix), "+dev_benchmarks" in spec
|
||||
)
|
||||
)
|
||||
entries.append(cmake_cache_option("{}ENABLE_DOCS".format(option_prefix), False))
|
||||
entries.append(
|
||||
cmake_cache_option("{}ENABLE_TOOLS".format(option_prefix), "+tools" in spec)
|
||||
)
|
||||
entries.append(
|
||||
cmake_cache_option("{}ENABLE_BACKTRACE".format(option_prefix), "+backtrace" in spec)
|
||||
)
|
||||
entries.append(cmake_cache_option("{}ENABLE_ASAN".format(option_prefix), "+asan" in spec))
|
||||
entries.append(
|
||||
cmake_cache_option(
|
||||
"{}ENABLE_SANITIZER_TESTS".format(option_prefix), "+sanitizer_tests" in spec
|
||||
)
|
||||
)
|
||||
|
||||
# Recent options, were never name without prefix
|
||||
entries.append(
|
||||
cmake_cache_option("UMPIRE_ENABLE_DEVICE_ALLOCATOR", "+device_alloc" in spec)
|
||||
)
|
||||
entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec))
|
||||
entries.append(cmake_cache_option("ENABLE_TESTS", "tests=none" not in spec))
|
||||
entries.append(
|
||||
cmake_cache_option("UMPIRE_ENABLE_SQLITE_EXPERIMENTAL", "+sqlite_experimental" in spec)
|
||||
)
|
||||
if "+sqlite_experimental" in spec:
|
||||
entries.append(cmake_cache_path("SQLite3_ROOT", spec["sqlite"].prefix))
|
||||
|
||||
# This option was renamed later than the others
|
||||
if spec.satisfies("@2022.10.0:"):
|
||||
entries.append(
|
||||
cmake_cache_option("UMPIRE_ENABLE_IPC_SHARED_MEMORY", "+ipc_shmem" in spec)
|
||||
)
|
||||
else:
|
||||
entries.append(cmake_cache_option("ENABLE_IPC_SHARED_MEMORY", "+ipc_shmem" in spec))
|
||||
|
||||
return entries
|
||||
|
||||
def cmake_args(self):
|
||||
options = []
|
||||
return options
|
||||
return []
|
||||
|
||||
def test(self):
|
||||
"""Perform stand-alone checks on the installed package."""
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import os
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
@@ -121,6 +123,14 @@ def setup_build_environment(self, env):
|
||||
env.set("FC", self.compiler.fc)
|
||||
env.set("F77", self.compiler.fc)
|
||||
|
||||
@run_before("autoreconf")
|
||||
def prepare_whizard(self):
|
||||
# As described in the manual (SVN Repository version)
|
||||
# https://whizard.hepforge.org/manual/manual003.html#sec%3Aprerequisites
|
||||
if not os.path.exists("configure.ac"):
|
||||
shell = which("sh")
|
||||
shell("build_master.sh")
|
||||
|
||||
def configure_args(self):
|
||||
spec = self.spec
|
||||
enable_hepmc = "no" if "hepmc=off" in spec else "yes"
|
||||
|
||||
Reference in New Issue
Block a user