mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-28 22:25:32 -04:00
Enable DFTD4 with CMake CI build (Spack)
This commit is contained in:
parent
52fc3dc60e
commit
6bc67c85af
6 changed files with 17 additions and 10 deletions
|
|
@ -690,6 +690,13 @@ endif()
|
|||
|
||||
if(CP2K_USE_DFTD4)
|
||||
find_package(dftd4 REQUIRED)
|
||||
|
||||
get_target_property(CP2K_DFTD4_LINK_LIBRARIES dftd4::dftd4
|
||||
INTERFACE_LINK_LIBRARIES)
|
||||
get_target_property(CP2K_DFTD4_LIB_LINK_LIBRARIES dftd4::dftd4-lib
|
||||
INTERFACE_LINK_LIBRARIES)
|
||||
get_target_property(CP2K_DFTD4_INCLUDE_DIR dftd4::dftd4-lib
|
||||
INTERFACE_INCLUDE_DIRECTORIES)
|
||||
endif()
|
||||
|
||||
# SIRIUS
|
||||
|
|
@ -847,9 +854,10 @@ endif()
|
|||
|
||||
if(CP2K_USE_DFTD4)
|
||||
message(
|
||||
" - DFTD4 :\n" " - include modules : ${DFTD4_DFTD4};${DFTD4_MCTC}\n"
|
||||
" - include directories : ${DFTD4_INCLUDE_DIR}\n"
|
||||
" - libraries : ${DFTD4_LIBDIR}\n\n")
|
||||
" - DFTD4 :\n"
|
||||
" - include directories : ${CP2K_DFTD4_INCLUDE_DIR}\n"
|
||||
" - libraries : ${CP2K_DFTD4_LINK_LIBRARIES};${CP2K_DFTD4_LIB_LINK_LIBRARIES}\n\n"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(CP2K_USE_SIRIUS)
|
||||
|
|
|
|||
|
|
@ -1600,9 +1600,6 @@ endif()
|
|||
|
||||
add_library(cp2k_link_libs INTERFACE)
|
||||
|
||||
include_directories(${DFTD4_DFTD4})
|
||||
include_directories(${DFTD4_MCTC})
|
||||
|
||||
# the order is important so keep it that way
|
||||
target_link_libraries(
|
||||
cp2k_link_libs
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
|
|||
|
||||
# Install a recent developer version of Spack.
|
||||
WORKDIR /opt/spack
|
||||
ARG SPACK_VERSION=847f560a6eff23f2177f3e8a2c143d309bb06acf
|
||||
ARG SPACK_VERSION=56495a8cd81640302a9d3a22249ce42bc4698a38
|
||||
RUN git init --quiet && \
|
||||
git remote add origin https://github.com/spack/spack.git && \
|
||||
git fetch --quiet --depth 1 origin ${SPACK_VERSION} --no-tags && \
|
||||
|
|
@ -54,7 +54,7 @@ RUN spack compiler find
|
|||
RUN spack external find --all --not-buildable
|
||||
|
||||
# Enable Spack build cache
|
||||
ARG SPACK_BUILD_CACHE=develop-2025-01-12
|
||||
ARG SPACK_BUILD_CACHE=develop-2025-01-26
|
||||
RUN spack mirror add ${SPACK_BUILD_CACHE} https://binaries.spack.io/${SPACK_BUILD_CACHE} && \
|
||||
spack mirror add develop https://binaries.spack.io/develop && \
|
||||
spack buildcache keys --install --trust --force && \
|
||||
|
|
|
|||
|
|
@ -849,7 +849,7 @@ RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
|
|||
|
||||
# Install a recent developer version of Spack.
|
||||
WORKDIR /opt/spack
|
||||
ARG SPACK_VERSION=847f560a6eff23f2177f3e8a2c143d309bb06acf
|
||||
ARG SPACK_VERSION=56495a8cd81640302a9d3a22249ce42bc4698a38
|
||||
RUN git init --quiet && \
|
||||
git remote add origin https://github.com/spack/spack.git && \
|
||||
git fetch --quiet --depth 1 origin ${{SPACK_VERSION}} --no-tags && \
|
||||
|
|
@ -861,7 +861,7 @@ RUN spack compiler find
|
|||
RUN spack external find --all --not-buildable
|
||||
|
||||
# Enable Spack build cache
|
||||
ARG SPACK_BUILD_CACHE=develop-2025-01-12
|
||||
ARG SPACK_BUILD_CACHE=develop-2025-01-26
|
||||
RUN spack mirror add ${{SPACK_BUILD_CACHE}} https://binaries.spack.io/${{SPACK_BUILD_CACHE}} && \
|
||||
spack mirror add develop https://binaries.spack.io/develop && \
|
||||
spack buildcache keys --install --trust --force && \
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ if [[ "${PROFILE}" == "spack" ]] && [[ "${VERSION}" == "psmp" ]]; then
|
|||
-DCP2K_USE_SIRIUS=ON \
|
||||
-DCP2K_USE_LIBTORCH=OFF \
|
||||
-DCP2K_USE_DLAF=ON \
|
||||
-DCP2K_USE_DFTD4=ON \
|
||||
.. |& tee ./cmake.log
|
||||
CMAKE_EXIT_CODE=$?
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ spack:
|
|||
- "sirius @7.6.1 +fortran +pugixml ~apps"
|
||||
- "libvori@220621"
|
||||
- "spla@1.6.1 +fortran"
|
||||
- "dftd4@3.6.0 build_system=cmake"
|
||||
# Unfortunately, ScaLAPACK 2.2.1 has not yet been packaged by Spack.
|
||||
# https://github.com/Reference-ScaLAPACK/scalapack/tree/v2.2.1
|
||||
# which contains https://github.com/Reference-ScaLAPACK/scalapack/pull/26
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue