mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-29 06:35:28 -04:00
Use pre-built libint archive with spack (2.11.2 -> 2.13.1) (#4923)
This commit is contained in:
parent
3e9557df5d
commit
9a4037812a
5 changed files with 72 additions and 8 deletions
|
|
@ -160,7 +160,7 @@ else
|
|||
MAX_PROCS=-1
|
||||
NUM_PROCS=${NUM_PROCS:-8}
|
||||
fi
|
||||
NUM_PACKAGES=4
|
||||
NUM_PACKAGES=2
|
||||
NVCC_VERSION=0
|
||||
REBUILD_CP2K="no"
|
||||
RUN_TEST="no"
|
||||
|
|
@ -1032,7 +1032,7 @@ if [[ ! -d "${SPACK_BUILD_PATH}" ]]; then
|
|||
fi
|
||||
|
||||
# Disable PEXSI because of an issue with SuperLU using recent GCC versions
|
||||
if ((CUDA_SM_CODE > 0)) || ((GCC_VERSION_NEWEST > 14)); then
|
||||
if ((CUDA_SM_CODE > 0)) || ([[ "${GCC_VERSION}" == "auto" ]] && ((GCC_VERSION_NEWEST > 14))); then
|
||||
sed -E -e '/\s*-\s+"pexsi@/ s/^ /#/' -i "${CP2K_CONFIG_FILE}"
|
||||
echo "INFO: PEXSI has been disabled because CUDA or GCC 15 is used"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -120,7 +120,6 @@ spack:
|
|||
libint:
|
||||
require:
|
||||
- "+fortran"
|
||||
- "tune=cp2k-lmax-5"
|
||||
|
||||
libxc:
|
||||
require:
|
||||
|
|
@ -192,7 +191,7 @@ spack:
|
|||
- "greenx@2.2"
|
||||
- "hdf5@1.14.6"
|
||||
- "libfabric@2.4.0"
|
||||
- "libint@2.11.2"
|
||||
- "libint@2.13.1-cp2k-lmax-5"
|
||||
- "libsmeagol@1.2"
|
||||
- "libvdwxc@0.5.0"
|
||||
- "libvori@220621"
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@ spack:
|
|||
require:
|
||||
- "+fortran"
|
||||
- "~shared"
|
||||
- "tune=cp2k-lmax-5"
|
||||
|
||||
libxc:
|
||||
require:
|
||||
|
|
@ -102,7 +101,7 @@ spack:
|
|||
- "dftd4@3.7.0"
|
||||
- "fftw@3.3.10"
|
||||
# - "hdf5@1.14.6"
|
||||
- "libint@2.11.2"
|
||||
- "libint@2.13.1-cp2k-lmax-5"
|
||||
- "libvori@220621"
|
||||
- "libxc@7.0.0"
|
||||
- "libxsmm@1.17-cp2k"
|
||||
|
|
|
|||
|
|
@ -79,7 +79,6 @@ spack:
|
|||
libint:
|
||||
require:
|
||||
- "+fortran"
|
||||
- "tune=cp2k-lmax-5"
|
||||
|
||||
libxc:
|
||||
require:
|
||||
|
|
@ -117,7 +116,7 @@ spack:
|
|||
- "fftw@3.3.10"
|
||||
- "greenx@2.2"
|
||||
- "hdf5@1.14.6"
|
||||
- "libint@2.11.2"
|
||||
- "libint@2.13.1-cp2k-lmax-5"
|
||||
- "libvori@220621"
|
||||
- "libxc@7.0.0"
|
||||
- "libxsmm@1.17-cp2k"
|
||||
|
|
|
|||
67
tools/spack/spack_repo/cp2k_dev/packages/libint/package.py
Normal file
67
tools/spack/spack_repo/cp2k_dev/packages/libint/package.py
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
# 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.cmake import CMakePackage
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Libint(CMakePackage):
|
||||
"""Libint is a high-performance library for computing Gaussian integrals in quantum mechanics.
|
||||
This recipe is tailored for CP2K and requires a pre-built libint archive with the source code
|
||||
generated for a specific maximum l value.
|
||||
"""
|
||||
|
||||
homepage = "https://github.com/evaleev/libint"
|
||||
url = "https://www.cp2k.org/static/downloads/libint-v2.13.1.tar.xz"
|
||||
|
||||
maintainers("mkrack")
|
||||
|
||||
license("LGPL-3.0-only")
|
||||
|
||||
version(
|
||||
"2.13.1-cp2k-lmax-7",
|
||||
sha256="ba19571deefa5c3063e620210c87cf706ef8d75b47f3b0d66547f889f906b3dd",
|
||||
)
|
||||
version(
|
||||
"2.13.1-cp2k-lmax-6",
|
||||
sha256="a7990c4862d549e6328596f20b8a7ece40ded396b953d5d5d7c3200f13e37429",
|
||||
)
|
||||
version(
|
||||
"2.13.1-cp2k-lmax-5",
|
||||
sha256="527000f915bea9879391273b96689a8c2b98beeec37cb64637e3c11dd421a5e8",
|
||||
)
|
||||
version(
|
||||
"2.13.1-cp2k-lmax-4",
|
||||
sha256="8ff388fbf171635420fdfdbafc7dc949e9cf4c0b6a62f23dac3af8b1c942d407",
|
||||
)
|
||||
|
||||
variant("fortran", default=True, description="Build Fortran interface")
|
||||
variant("pic", default=True, description="Build position independent code")
|
||||
variant("shared", default=False, description="Build shared library")
|
||||
|
||||
# Build dependencies
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
depends_on("fortran", type="build", when="+fortran")
|
||||
|
||||
depends_on("boost", type="build")
|
||||
depends_on("eigen", type="build")
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
env.append_flags("CXXFLAGS", "-g1")
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
|
||||
self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
|
||||
self.define_from_variant("LIBINT2_ENABLE_FORTRAN", "fortran"),
|
||||
]
|
||||
return args
|
||||
|
||||
@property
|
||||
def libs(self):
|
||||
return find_libraries("libint2", self.spec.prefix, shared=True, recursive=True)
|
||||
Loading…
Add table
Add a link
Reference in a new issue