Drop local spack recipes for elpa, exchcxx and gau2grid (#5561)

This commit is contained in:
Matthias Krack 2026-07-09 12:13:12 +02:00 committed by GitHub
parent 0ea840e1ab
commit f7216f7eed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 3 additions and 424 deletions

View file

@ -184,7 +184,7 @@ spack:
repos:
builtin:
commit: 2b567e37d2cf29b5c1ed598187842d11457f3a8f # 2026-07-08
commit: edc067bda809d84697447136810472b828dd5c19 # 2026-07-09
specs:
# Build tools

View file

@ -92,7 +92,7 @@ spack:
repos:
builtin:
commit: 2b567e37d2cf29b5c1ed598187842d11457f3a8f # 2026-07-08
commit: edc067bda809d84697447136810472b828dd5c19 # 2026-07-09
specs:
# Build tools

View file

@ -117,7 +117,7 @@ spack:
repos:
builtin:
commit: 2b567e37d2cf29b5c1ed598187842d11457f3a8f # 2026-07-08
commit: edc067bda809d84697447136810472b828dd5c19 # 2026-07-09
specs:
# Build tools

View file

@ -1,10 +0,0 @@
--- a/src/solve_tridi/merge_systems_template.F90
+++ b/src/solve_tridi/merge_systems_template.F90
@@ -809,4 +809,6 @@
- write(error_unit,*) "Returing early from merge_systems (na1==1 .or. na1==2)"
+ if (wantDebug) then
+ write(error_unit,*) "Returning early from merge_systems (na1==1 .or. na1==2)"
+ endif
! na=1 can be tested with "mpirun -n 4 ./validate_real_double_solve_tridiagonal_1stage_gpu_blocktridi 3 3 1"
! na=2 can be tested with "mpirun -n 4 ./validate_real_double_solve_tridiagonal_1stage_gpu_toeplitz 4 4 2"
else if (na1>2) then

View file

@ -1,290 +0,0 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from spack_repo.builtin.build_systems.autotools import AutotoolsPackage
from spack_repo.builtin.build_systems.cuda import CudaPackage
from spack_repo.builtin.build_systems.rocm import ROCmPackage
from spack.package import *
#
# Please note that you can open issues on the github page of ELPA:
# https://github.com/marekandreas/elpa/issues
#
class Elpa(AutotoolsPackage, CudaPackage, ROCmPackage):
"""Eigenvalue solvers for Petaflop-Applications (ELPA)"""
homepage = "https://elpa.mpcdf.mpg.de/"
url = "https://elpa.mpcdf.mpg.de/software/tarball-archive/Releases/2015.11.001/elpa-2015.11.001.tar.gz"
git = "https://gitlab.mpcdf.mpg.de/elpa/elpa.git"
license("LGPL-3.0-only")
version("master", branch="master")
version(
"2026.02.002", sha256="02e3c59fec53cd8eb66a4cc15fa4fbf190cf9654227223fb8ad55713e9427932"
)
version(
"2026.02.001", sha256="a379f27f4dbd27b2ee45017afec656d064301e97150c874649bdfd64957b75ed"
)
version(
"2025.06.001", sha256="feeb1fea1ab4a8670b8d3240765ef0ada828062ef7ec9b735eecba2848515c94"
)
version(
"2025.01.002", sha256="8febe408c590ba9b44bd8bce04605fd1b7da964afcd8fd5f1ce9edecb3d0b65d"
)
version(
"2025.01.001", sha256="3ef0c6aed9a3e05db6efafe6e14d66eb88b2a1354d61e765b7cde0d3d5f3951e"
)
version(
"2024.05.001", sha256="9caf41a3e600e2f6f4ce1931bd54185179dade9c171556d0c9b41bbc6940f2f6"
)
version(
"2024.03.001", sha256="41c6cbf56d2dac26443faaba8a77307d261bf511682a64b96e24def77c813622"
)
version(
"2023.11.001-patched",
sha256="62ee109afc06539507f459c08b958dc4db65b757dbd77f927678c77f7687415e",
url="https://elpa.mpcdf.mpg.de/software/tarball-archive/Releases/2023.11.001/elpa-2023.11.001-patched.tar.gz",
)
version(
"2023.05.001", sha256="ec64be5d6522810d601a3b8e6a31720e3c3eb4af33a434d8a64570d76e6462b6"
)
version(
"2022.11.001", sha256="75db3ac146f9a6a1598e3418ddcab2be2f40a30ef9ec4c00a3b5d3808c99c430"
)
version(
"2021.11.001", sha256="fb361da6c59946661b73e51538d419028f763d7cb9dacf9d8cd5c9cd3fb7802f"
)
version(
"2021.05.002_bugfix",
sha256="deabc48de5b9e4b2f073d749d335c8f354a7ce4245b643a23b7951cd6c90224b",
)
version(
"2021.05.001", sha256="a4f1a4e3964f2473a5f8177f2091a9da5c6b5ef9280b8272dfefcbc3aad44d41"
)
variant("openmp", default=True, description="Activates OpenMP support")
variant("mpi", default=True, description="Activates MPI support")
with when("@2021.11.001:"):
variant(
"autotune", default=False, description="Enables autotuning for matrix restribution"
)
variant(
"gpu_streams", default=True, when="+cuda", description="Activates GPU streams support"
)
variant(
"gpu_streams", default=True, when="+rocm", description="Activates GPU streams support"
)
# patch("fujitsu.patch", when="%fj")
# wrong filename handling in elpa's custom preprocessor
# patch(
# "https://gitlab.mpcdf.mpg.de/elpa/elpa/-/commit/5a821b79dd2905c691fc0973c9f3044904ac2653.diff",
# sha256="90f18c84e740a35d726e44078a111fac3b6278a0e750ce1f3ea154ee78e93298",
# when="@:2025.01.001",
# )
# patch("hipcc.patch", when="+rocm @2025.01.001:2025.06.001")
# Suppress debug output to stderr for non-debug builds
patch("elpa-2026.02.001-wantDebug.patch", when="@2026.02.001:")
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
depends_on("fortran", type="build") # generated
depends_on("autoconf@2.71:", type="build", when="@master")
depends_on("automake", type="build", when="@master")
depends_on("blas")
depends_on("lapack")
depends_on("mpi", when="+mpi")
depends_on("scalapack", when="+mpi")
depends_on("rocblas", when="+rocm")
# elpa 2024.05.001 enables rocsolver by default
# https://github.com/marekandreas/elpa/commit/de90ce3d634be468e71c2827d788de52ceb606bf#diff-49473dca262eeab3b4a43002adb08b4db31020d190caaad1594b47f1d5daa810R2635-R2638
depends_on("rocsolver", when="+rocm @2024.05.001:")
depends_on("libtool", type="build")
depends_on("python@3:", type="build")
depends_on("scalapack", when="+autotune")
# Force openmp propagation on some providers of blas/lapack, as adviced by docs
# https://gitlab.mpcdf.mpg.de/elpa/elpa/-/blob/master/documentation/PERFORMANCE_TUNING.md?ref_type=heads#builds-with-openmp-enabled
with when("+openmp"):
requires("^openblas threads=openmp", when="^[virtuals=blas,lapack] openblas")
requires(
"^intel-oneapi-mkl threads=openmp", when="^[virtuals=blas,lapack] intel-oneapi-mkl"
)
# fails to build due to broken type-bound procedures in OMP parallel regions
conflicts(
"+openmp",
when="@2021.05.001: %gcc@:7",
msg="ELPA-2021.05.001+ requires GCC-8+ for OpenMP support",
)
conflicts("+mpi", when="+rocm @:2024", msg="ROCm support and MPI are not yet compatible")
conflicts(
"+gpu_streams",
when="@:2023.11.001-patched +openmp",
msg="GPU streams currently not supported in combination with OpenMP",
)
def url_for_version(self, version):
return "https://elpa.mpcdf.mpg.de/software/tarball-archive/Releases/{0}/elpa-{0}.tar.gz".format(
str(version)
)
# override default implementation which returns static lib
@property
def libs(self):
libname = "libelpa_openmp" if "+openmp" in self.spec else "libelpa"
return find_libraries(libname, root=self.prefix, shared=True, recursive=True)
@property
def headers(self):
suffix = "_openmp" if self.spec.satisfies("+openmp") else ""
# upstream sometimes adds tarball suffixes not part of the internal version
elpa_version = str(self.spec.version)
for vsuffix in ("_bugfix", "-patched"):
if elpa_version.endswith(vsuffix): # implementation of py3.9 removesuffix
elpa_version = elpa_version[: -len(vsuffix)]
incdir = os.path.join(
self.spec.prefix.include,
"elpa{suffix}-{version}".format(suffix=suffix, version=elpa_version),
)
hlist = find_all_headers(incdir)
hlist.directories = [incdir]
return hlist
build_directory = "spack-build"
# parallel = False
def flag_handler(self, name, flags):
spec = self.spec
if name == "cflags":
if spec.satisfies("^[virtuals=c] gcc") or spec.satisfies("^[virtuals=c] aocc"):
flags.append("-O3")
if name == "fflags":
if spec.satisfies("^[virtuals=fortran] aocc"):
flags.append("-O3")
elif spec.satisfies("^[virtuals=fortran] gcc"):
flags.append("-O3 -ffree-line-length-none")
if spec.satisfies("+autotune"):
flags.append("-fallow-argument-mismatch")
elif spec.satisfies("^[virtuals=fortran] fj") and spec.satisfies("+openmp"):
flags.append("-Kparallel")
if name == "ldflags":
flags += [spec["blas"].libs.search_flags, spec["lapack"].libs.search_flags, "-lstdc++"]
flags += [spec["lapack"].libs.link_flags, spec["blas"].libs.link_flags]
if self.spec.satisfies("@2024.05.001,2025.01.001 %aocc"):
# fix an issue where main library and test suite containing duplicate symbols
flags.append("-Wl,--allow-multiple-definition")
return (flags, None, None)
def configure_args(self):
spec = self.spec
options = []
options += self.with_or_without("mpi")
# New options use the "-kernels" suffix
kernels = "-kernels" if spec.satisfies("@2023.11:") else ""
# TODO: --disable-sse-assembly, --enable-sparc64, --enable-neon-arch64
# Don't include vsx; as of 2022.05 it fails (reported upstream).
# Altivec SSE intrinsics are used anyway.
simd_features = ["sse", "avx", "avx2", "avx512", "sve128", "sve256", "sve512"]
for feature in simd_features:
msg = "--enable-{0}" if feature in spec.target else "--disable-{0}"
options.append(msg.format(feature + kernels))
if spec.target.family != "x86_64":
options.append("--disable-sse-assembly")
if spec.satisfies("%aocc") or spec.satisfies("%fj"):
options.append("--disable-shared")
options.append("--enable-static")
# If no features are found, enable the generic ones
if not any(f in spec.target for f in simd_features):
options.append("--enable-generic" + kernels)
if spec.satisfies("%fj"):
options.append("--disable-Fortran2008-features")
options.append("--enable-FUGAKU")
cuda_flag = "nvidia-gpu"
if spec.satisfies("+cuda"):
prefix = spec["cuda"].prefix
# Can't yet be changed to the new option --enable-nvidia-gpu-kernels
# https://github.com/marekandreas/elpa/issues/55
options.append(f"--enable-{cuda_flag}")
options.append("--with-cuda-path={0}".format(prefix))
options.append("--with-cuda-sdk-path={0}".format(prefix))
if spec.satisfies("+gpu_streams"):
options.append("--enable-gpu-streams=nvidia")
cuda_arch = spec.variants["cuda_arch"].value[0]
if cuda_arch != "none":
options.append(
"--with-{0}-compute-capability=sm_{1}".format(cuda_flag.upper(), cuda_arch)
)
else:
options.append(f"--disable-{cuda_flag}" + kernels)
if spec.satisfies("+rocm"):
# Can't yet be changed to the new option --enable-amd-gpu-kernels
# https://github.com/marekandreas/elpa/issues/55
options.append("--enable-amd-gpu")
if spec.satisfies("@2025.01.001:"):
options.append(
"HIPCC={0} {1} {2}".format(
spec["hip"].hipcc,
spec["rocblas"].headers.include_flags,
spec["rocsolver"].headers.include_flags,
)
)
else:
options.append("CXX={0}".format(spec["hip"].hipcc))
if spec.satisfies("+gpu_streams"):
options.append("--enable-gpu-streams=amd")
elif self.spec.satisfies("@2021.05.001:"):
options.append("--disable-amd-gpu" + kernels)
options += self.enable_or_disable("openmp")
if self.spec.satisfies("+mpi"):
options += [
"CC={0}".format(spec["mpi"].mpicc),
"CXX={0}".format(spec["mpi"].mpicxx),
"FC={0}".format(spec["mpi"].mpifc),
"SCALAPACK_LDFLAGS={0}".format(spec["scalapack"].libs.joined()),
]
if self.spec.satisfies("+autotune"):
options.append("--enable-autotune-redistribute-matrix")
# --enable-autotune-redistribute-matrix requires --enable-scalapack-tests as well
options.append("--enable-scalapack-tests")
options.append("--disable-silent-rules")
options.append("--without-threading-support-check-during-build")
options.append("--disable-c-tests")
options.append("--disable-cpp-tests")
options.append("--disable-Fortran-tests")
return options

View file

@ -1,62 +0,0 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack_repo.builtin.build_systems.cmake import CMakePackage, generator
from spack_repo.builtin.build_systems.cuda import CudaPackage
from spack.package import *
class Exchcxx(CMakePackage, CudaPackage):
"""Exchange correlation (XC) library for density functional theory (DFT)
calculations in modern C++."""
homepage = "https://github.com/wavefunction91/ExchCXX"
git = "https://github.com/wavefunction91/ExchCXX.git"
url = "https://github.com/wavefunction91/ExchCXX/archive/refs/tags/v1.0.0.tar.gz"
maintainers("awvwgk", "mkrack")
license("BSD-3-Clause")
version("master", branch="master")
version("1.0.0", sha256="0ea38aab563ea5d11a03d80dc1bf909821091d903eb852c5cb350484753a847a")
variant("benchmark", default=False, description="Enable benchmarking")
variant("cuda", default=False, description="Build with CUDA support")
variant("hip", default=False, description="Build with HIP support")
variant("sycl", default=False, description="Build with SYCL support")
variant("libxc", default=True, description="Build with LibXC support")
variant("shared", default=False, description="Build shared libraries")
variant("pic", default=True, description="Build position independent code")
conflicts("+cuda", when="+hip", msg="CUDA and HIP are mutually exclusive")
conflicts("+cuda", when="+sycl", msg="CUDA and SYCL are mutually exclusive")
conflicts("+hip", when="+sycl", msg="HIP and SYCL are mutually exclusive")
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("cmake@3.21:", type="build")
depends_on("ninja@1.10:", type="build")
depends_on("libxc@7.0.0:", when="+libxc")
depends_on("cuda@11:", when="+cuda")
depends_on("hip", when="+hip")
depends_on("intel-oneapi-compilers", when="+sycl")
generator("ninja")
def cmake_args(self):
args = [
self.define_from_variant("EXCHCXX_ENABLE_BENCHMARK", "benchmark"),
self.define_from_variant("EXCHCXX_ENABLE_CUDA", "cuda"),
self.define_from_variant("EXCHCXX_ENABLE_HIP", "hip"),
self.define_from_variant("EXCHCXX_ENABLE_SYCL", "sycl"),
self.define_from_variant("EXCHCXX_ENABLE_LIBXC", "libxc"),
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
]
if self.spec.satisfies("+cuda"):
args.append(self.define_cuda_architectures(self))
return args

View file

@ -1,59 +0,0 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack_repo.builtin.build_systems.cmake import CMakePackage, generator
from spack.package import *
class Gau2grid(CMakePackage):
"""Gau2Grid is a library for the fast computation of a Gaussian and
its derivative on a grid.
"""
homepage = "https://gau2grid.readthedocs.io"
git = "https://github.com/psi4/gau2grid.git"
url = "https://github.com/psi4/gau2grid/archive/refs/tags/v2.0.9.tar.gz"
maintainers("awvwgk", "mkrack")
license("BSD-3-Clause")
version("master", branch="master")
version("2.0.9", sha256="7879bdddf3a52cd2a051086215977822bbe8d1af927fcf5b4fb0256a38b8a76c")
version("2.0.8", sha256="c5f445344a465c1d9afc6516544dc4a2fba588af7ba0f1ac1a6b538260f0cd96")
variant("max_am", default="8", description="Maximum Gaussian angular momentum")
variant(
"xhost",
default=True,
description="Enable processor-specific optimizations (-march=native)",
)
variant("pic", default=True, description="Build with position independent code")
variant("shared", default=True, description="Build shared libraries")
variant("generic", default=False, description="Enable generic/static system linking")
variant("no_pragma", default=False, description="Disable pragma optimizations")
conflicts("+shared~pic", msg="Shared library requires position independent code")
depends_on("c", type="build")
depends_on("cmake@3.12:", type="build")
depends_on("ninja@1.10:", type="build")
depends_on("python@3.6:", type=("build", "link"))
depends_on("py-numpy", type=("build", "link"))
generator("ninja")
def cmake_args(self):
spec = self.spec
args = [
self.define("MAX_AM", spec.variants["max_am"].value),
self.define("ENABLE_XHOST", spec.satisfies("+xhost")),
self.define("BUILD_FPIC", spec.satisfies("+pic")),
self.define("BUILD_SHARED_LIBS", spec.satisfies("+shared")),
self.define("ENABLE_GENERIC", spec.satisfies("+generic")),
self.define("DISABLE_PRAGMA", spec.satisfies("+no_pragma")),
]
return args