mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-28 14:15:19 -04:00
Add local spack recipe for libxs (#5366)
This commit is contained in:
parent
2254d362dc
commit
f229b202dd
6 changed files with 72 additions and 6 deletions
13
make_cp2k.sh
13
make_cp2k.sh
|
|
@ -231,7 +231,7 @@ while [[ $# -gt 0 ]]; do
|
|||
case "${CP2K_VERSION}" in
|
||||
ssmp-static)
|
||||
CMAKE_FEATURE_FLAG_ALL="-DCP2K_USE_EVERYTHING=ON"
|
||||
for package in libfci libint2 libxc libxsmm spglib vori tblite; do
|
||||
for package in libfci libint2 libxc libxs spglib vori tblite; do
|
||||
CMAKE_FEATURE_FLAGS+=" -DCP2K_USE_${package^^}=ON"
|
||||
done
|
||||
for package in ace deepmd gauxc greenx hdf5 libtorch pexsi trexio; do
|
||||
|
|
@ -269,17 +269,17 @@ while [[ $# -gt 0 ]]; do
|
|||
CMAKE_FEATURE_FLAG_ALL="-DCP2K_USE_EVERYTHING=${ON_OFF}"
|
||||
for package in adios2 cosma deepmdkit dla-future dla-future-fortran elpa \
|
||||
gauxc greenx hdf5 libfci libfabric libint libvdwxc libsmeagol libvori libxc \
|
||||
libxsmm mimic-mcl openpmd-api pace pexsi plumed py-torch sirius spfft \
|
||||
libxs mimic-mcl openpmd-api pace pexsi plumed py-torch sirius spfft \
|
||||
spglib spla tblite trexio; do
|
||||
SED_PATTERN_LIST+=" -e '/\s*-\s+\"${package}@/ ${SUBST}"
|
||||
done
|
||||
# dbcsr must use blas as fallback when libxsmm is disabled
|
||||
# dbcsr must use blas as fallback when libxs/libxsmm is disabled
|
||||
if [[ "${ON_OFF}" == "OFF" ]]; then
|
||||
SED_PATTERN_LIST+=" -e '/\s*-\s+\"smm=libxsmm\"/ s/libxsmm/blas/'"
|
||||
fi
|
||||
;;
|
||||
ace | cosma | deepmd | dftd4 | dlaf | elpa | fftw3 | gauxc | greenx | hdf5 | libfci | libint2 | \
|
||||
libsmeagol | libtorch | libxc | libxsmm | mimic | openpmd | pexsi | plumed | spglib | \
|
||||
libsmeagol | libtorch | libxc | libxs | mimic | openpmd | pexsi | plumed | spglib | \
|
||||
tblite | trexio | vori)
|
||||
CMAKE_FEATURE_FLAGS+=" -DCP2K_USE_${2^^}=${ON_OFF}"
|
||||
# Translate package selection to sed pattern
|
||||
|
|
@ -333,8 +333,9 @@ while [[ $# -gt 0 ]]; do
|
|||
SED_PATTERN_LIST+=" -e '/\s*-\s+\"gauxc@/ ${SUBST}"
|
||||
fi
|
||||
;;
|
||||
libxsmm)
|
||||
libxs)
|
||||
SED_PATTERN_LIST+=" -e '/\s*-\s+\"${2,,}@/ ${SUBST}"
|
||||
SED_PATTERN_LIST+=" -e '/\s*-\s+\"libxsmm@/ ${SUBST}"
|
||||
if [[ "${ON_OFF}" == "OFF" ]]; then
|
||||
SED_PATTERN_LIST+=" -e '/\s*-\s+\"smm=${2,,}\"/ s/${2,,}/blas/'"
|
||||
fi
|
||||
|
|
@ -678,7 +679,7 @@ if [[ "${HELP}" == "yes" ]]; then
|
|||
echo " - The folder ${CP2K_ROOT}/install is updated after each successful run"
|
||||
echo ""
|
||||
echo "Packages: all | ace | cosma | deepmd | dftd4 | dlaf | elpa | fftw3 | gauxc | greenx | hdf5 | libfci |"
|
||||
echo " libint | libsmeagol | libtorch | libvdwxc | libxsmm | mimic | openpmd | pexsi | plumed |"
|
||||
echo " libint | libsmeagol | libtorch | libvdwxc | libxs | mimic | openpmd | pexsi | plumed |"
|
||||
echo " sirius | spfft | spglib | spla | tblite | trexio | vori "
|
||||
echo ""
|
||||
echo "Features: cray_pm_accel_energy | cusolver_mp | dbm_gpu | elpa_gpu | grid_gpu | pw_gpu |"
|
||||
|
|
|
|||
|
|
@ -64,6 +64,10 @@ spack:
|
|||
require:
|
||||
- openblas
|
||||
|
||||
libxs:
|
||||
require:
|
||||
- "+fortran"
|
||||
|
||||
libxsmm:
|
||||
require:
|
||||
- "blas=default"
|
||||
|
|
@ -207,6 +211,7 @@ spack:
|
|||
- "libvdwxc@0.5.0"
|
||||
- "libvori@220621"
|
||||
- "libxc@7.0.0"
|
||||
- "libxs@20260605"
|
||||
- "libxsmm@1.17-cp2k"
|
||||
- "mimic-mcl@3.0.0"
|
||||
- "netlib-scalapack@2.2.3"
|
||||
|
|
|
|||
|
|
@ -44,6 +44,11 @@ spack:
|
|||
require:
|
||||
- openblas
|
||||
|
||||
libxs:
|
||||
require:
|
||||
- "+fortran"
|
||||
- "~shared"
|
||||
|
||||
libxsmm:
|
||||
require:
|
||||
- "blas=default"
|
||||
|
|
@ -105,6 +110,7 @@ spack:
|
|||
- "libint@2.13.1-cp2k-lmax-5"
|
||||
- "libvori@220621"
|
||||
- "libxc@7.0.0"
|
||||
- "libxs@20260605"
|
||||
- "libxsmm@1.17-cp2k"
|
||||
- "openblas@0.3.33"
|
||||
- "pace@2025.12.4.1"
|
||||
|
|
|
|||
|
|
@ -50,6 +50,10 @@ spack:
|
|||
require:
|
||||
- openblas
|
||||
|
||||
libxs:
|
||||
require:
|
||||
- "+fortran"
|
||||
|
||||
libxsmm:
|
||||
require:
|
||||
- "blas=default"
|
||||
|
|
@ -130,6 +134,7 @@ spack:
|
|||
- "libint@2.13.1-cp2k-lmax-5"
|
||||
- "libvori@220621"
|
||||
- "libxc@7.0.0"
|
||||
- "libxs@20260605"
|
||||
- "libxsmm@1.17-cp2k"
|
||||
- "openblas@0.3.33"
|
||||
- "pace@2025.12.4.1"
|
||||
|
|
|
|||
48
tools/spack/spack_repo/cp2k_dev/packages/libxs/package.py
Normal file
48
tools/spack/spack_repo/cp2k_dev/packages/libxs/package.py
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
# 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
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Libxs(CMakePackage):
|
||||
"""LIBXS is a portable C library providing building blocks for memory
|
||||
operations, numerics, synchronization, and more -- with a focus on
|
||||
performance and minimal dependencies. Targets x86-64, AArch64, and RISC-V;
|
||||
requires only a C89 compiler. Originally developed as part of LIBXSMM.
|
||||
"""
|
||||
|
||||
maintainers("hfp", "mkrack", "mtaillefumier")
|
||||
|
||||
homepage = "hhttps://libxs.readthedocs.io/en/latest"
|
||||
url = (
|
||||
"https://github.com/hfp/libxs/archiv/libxs-ab416130f8c9f7edb8c1bf3d3abaf402f61d0fe0.tar.gz"
|
||||
)
|
||||
git = "https://github.com/hfp/libxs.git"
|
||||
|
||||
license("BSD-3-Clause", checked_by="mkrack")
|
||||
|
||||
version("main", branch="main")
|
||||
version("20260605", commit="ab416130f8c9f7edb8c1bf3d3abaf402f61d0fe0")
|
||||
|
||||
variant("fortran", default=False, description="Build Fortran module interface")
|
||||
variant("pic", default=True, description="Build position independent code")
|
||||
variant("shared", default=False, description="Build shared libraries (otherwise static)")
|
||||
|
||||
depends_on("cmake@3.13:", type="build")
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
depends_on("fortran", type="build", when="+fortran")
|
||||
|
||||
depends_on("libxsmm")
|
||||
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
args = [
|
||||
self.define_from_variant("LIBXS_FORTRAN", "fortran"),
|
||||
self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
|
||||
self.define_from_variant("LIBXS_SHARED", "shared"),
|
||||
]
|
||||
return args
|
||||
|
|
@ -28,6 +28,7 @@ class Libxsmm(MakefilePackage):
|
|||
# after 2.0 release.
|
||||
version("main-2023-11", commit="0d9be905527ba575c14ca5d3b4c9673916c868b2")
|
||||
version("main", branch="main")
|
||||
version("20260526-cp2k", commit="0cea22fdc34ec54bc59ffb47a43cb3e28b26d3e0")
|
||||
version("1.17-cp2k", commit="e0c4a2389afba36c453233ad7de07bd92c715bec")
|
||||
version(
|
||||
"1.17",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue