mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-28 06:05:29 -04:00
Toolchain: Several tweaks and fixes
This commit is contained in:
parent
5d1292bd6a
commit
e644ccc3b3
47 changed files with 91 additions and 28 deletions
|
|
@ -184,6 +184,9 @@ cmake_dependent_option(
|
|||
cmake_dependent_option(CP2K_USE_SIRIUS_NLCG "Enable nlcg method in SIRIUS" OFF
|
||||
"CP2K_USE_SIRIUS" OFF)
|
||||
|
||||
cmake_dependent_option(CP2K_USE_SpFFT "Enable spare FFT in SIRIUS" OFF
|
||||
"CP2K_USE_SIRIUS" OFF)
|
||||
|
||||
cmake_dependent_option(
|
||||
CP2K_DBCSR_USE_CPU_ONLY "Disable the DBCSR accelerated backend" OFF
|
||||
"NOT CP2K_USE_ACCEL MATCHES \"OPENCL|HIP|CUDA\"" OFF)
|
||||
|
|
@ -216,8 +219,7 @@ cmake_dependent_option(CP2K_ENABLE_FFTW3_THREADS_SUPPORT
|
|||
"Enable FFTW3 threads support" OFF "CP2K_USE_FFTW3" OFF)
|
||||
|
||||
cmake_dependent_option(
|
||||
CP2K_USE_CUSOLVER_MP
|
||||
"Use Nvidia GPU accelerated eigensolver. Only active when CUDA is ON" OFF
|
||||
CP2K_USE_CUSOLVER_MP "Enable cuSOLVERMp. Only active when CUDA is ON" OFF
|
||||
"CP2K_USE_ACCEL MATCHES \"CUDA\"" OFF)
|
||||
|
||||
cmake_dependent_option(CP2K_USE_NVHPC OFF "Enable Nvidia NVHPC kit"
|
||||
|
|
|
|||
|
|
@ -154,6 +154,13 @@ SIRIUS is a domain specific library for electronic structure calculations.
|
|||
<https://brehm-research.de/bqb> for more information as well as the `bqbtool` to inspect BQB
|
||||
files.
|
||||
|
||||
## SpFFT (Sparse 3D FFT)
|
||||
|
||||
- SpFFT is a 3D FFT library for sparse frequency domain data written in C++ with support for MPI,
|
||||
OpenMP, CUDA and ROCm.
|
||||
- Pass `-DCP2K_USE_SpFFT=ON` to CMake to enable support for SpFFT.
|
||||
- See <https://github.com/eth-cscs/SpFFT> for more information.
|
||||
|
||||
## Torch (Machine Learning Framework needed for NequIP)
|
||||
|
||||
- The C++ API of PyTorch can be downloaded from https://pytorch.org/get-started/locally/.
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -519,6 +519,7 @@ COPY ./tools/toolchain/scripts/VERSION \
|
|||
./tools/toolchain/scripts/common_vars.sh \
|
||||
./tools/toolchain/scripts/signal_trap.sh \
|
||||
./tools/toolchain/scripts/get_openblas_arch.sh \
|
||||
./tools/toolchain/scripts/generate_cmake_options.sh \
|
||||
./scripts/
|
||||
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
|
||||
RUN ./install_cp2k_toolchain.sh \
|
||||
|
|
|
|||
|
|
@ -1037,6 +1037,7 @@ write_toolchain_env ${INSTALLDIR}
|
|||
|
||||
# write toolchain config
|
||||
echo "tool_list=\"${tool_list}\"" > ${INSTALLDIR}/toolchain.conf
|
||||
echo "dry_run=\"${dry_run}\"" >> ${INSTALLDIR}/toolchain.conf
|
||||
for ii in ${package_list}; do
|
||||
install_mode="$(eval echo \${with_${ii}})"
|
||||
echo "with_${ii}=\"${install_mode}\"" >> ${INSTALLDIR}/toolchain.conf
|
||||
|
|
@ -1047,6 +1048,7 @@ done
|
|||
# ------------------------------------------------------------------------
|
||||
if [ "${dry_run}" = "__TRUE__" ]; then
|
||||
echo "Wrote only configuration files (--dry-run)."
|
||||
./scripts/generate_cmake_options.sh
|
||||
else
|
||||
echo "# Leak suppressions" > ${INSTALLDIR}/lsan.supp
|
||||
./scripts/stage0/install_stage0.sh
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ CMAKE_OPTIONS="-DCMAKE_INSTALL_PREFIX=../install -DCP2K_DATA_DIR=${CP2K_ROOT}/da
|
|||
if [ -n "$(grep -- "--install-all" ${INSTALLDIR}/setup)" ]; then
|
||||
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCP2K_USE_EVERYTHING=ON -DCP2K_USE_DLAF=OFF -DCP2K_USE_PEXSI=OFF"
|
||||
# Since "--install-all" can be used together with "--with-PKG=no", an extra safeguard is added here
|
||||
for toolchain_option in $(grep -i "dontuse" ${INSTALLDIR}/toolchain.conf | cut -d'_' -f2 | cut -d'=' -f1); do
|
||||
for toolchain_option in $(grep -i "dontuse" ${INSTALLDIR}/toolchain.conf | grep -vi "gcc" | cut -d'_' -f2 | cut -d'=' -f1); do
|
||||
if [ $(eval echo "$with_"'$toolchain_option') != "__DONTUSE__" ]; then
|
||||
ADDED_CMAKE_OPTION=$(sed -n '/target_compile_definitions(/,/)/p' ${CP2K_ROOT}/src/CMakeLists.txt | grep -i $toolchain_option | cut -d'{' -f2 | cut -d'}' -f1 | head -n 1)
|
||||
ADDED_CMAKE_OPTION=$(sed -n '/option(/,/)/p' ${CP2K_ROOT}/CMakeLists.txt | grep -i $toolchain_option | awk '{print $1}' | cut -d'(' -f2 | head -n 1)
|
||||
# Use "if-then" below can avoid generating empty "-D=OFF" options
|
||||
if [ -n "${ADDED_CMAKE_OPTION}" ]; then
|
||||
CMAKE_OPTIONS="${CMAKE_OPTIONS} -D${ADDED_CMAKE_OPTION}=OFF"
|
||||
|
|
@ -52,18 +52,14 @@ else
|
|||
if [ "${with_fftw}" != "__DONTUSE__" ] || [ "${MATH_MODE}" = "mkl" ]; then
|
||||
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCP2K_USE_FFTW3=ON"
|
||||
fi
|
||||
# When user chooses dftd4 rather than tblite in toolchain, the ADDED_CMAKE_OPTION below is set to CP2K_USE_TBLITE by mistake.
|
||||
if [ "${with_dftd4}" != "__DONTUSE__" ] && [ "${with_tblite}" = "__DONTUSE__" ]; then
|
||||
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCP2K_USE_DFTD4=ON"
|
||||
fi
|
||||
# There is only MCL (MiMiC Communication Library) and no MiMiC that can be installed via toolchain, but if one chooses to install MCL then MiMiC should have been installed?
|
||||
if [ "${with_mcl}" != "__DONTUSE__" ]; then
|
||||
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCP2K_USE_MIMIC=ON"
|
||||
fi
|
||||
# Detect if any other dependencies is used and add the proper cmake option. Since "pugixml" and "gsl" are not mentioned in CMakeLists.txt, they will not be considered.
|
||||
for toolchain_option in $(grep -vi "dontuse\|list\|cmake\|fftw\|dbcsr\|dftd4" ${INSTALLDIR}/toolchain.conf | cut -d'_' -f2 | cut -d'=' -f1); do
|
||||
for toolchain_option in $(grep -vi "dry\|list\|dontuse\|gcc\|cmake\|fftw\|mkl\|dbcsr" ${INSTALLDIR}/toolchain.conf | cut -d'_' -f2 | cut -d'=' -f1); do
|
||||
if [ $(eval echo "$with_"'$toolchain_option') != "__DONTUSE__" ]; then
|
||||
ADDED_CMAKE_OPTION=$(sed -n '/target_compile_definitions(/,/)/p' ${CP2K_ROOT}/src/CMakeLists.txt | grep -i $toolchain_option | cut -d'{' -f2 | cut -d'}' -f1 | head -n 1)
|
||||
ADDED_CMAKE_OPTION=$(sed -n '/option(/,/)/p' ${CP2K_ROOT}/CMakeLists.txt | grep -i $toolchain_option | awk '{print $1}' | cut -d'(' -f2 | head -n 1)
|
||||
# Use "if-then" below can avoid generating empty "-D=ON" options
|
||||
if [ -n "${ADDED_CMAKE_OPTION}" ]; then
|
||||
CMAKE_OPTIONS="${CMAKE_OPTIONS} -D${ADDED_CMAKE_OPTION}=ON"
|
||||
|
|
@ -75,9 +71,14 @@ fi
|
|||
# -------------------------
|
||||
# print out user instructions
|
||||
# -------------------------
|
||||
|
||||
cat << EOF
|
||||
|
||||
if [ "${dry_run}" = "__TRUE__" ]; then
|
||||
cat << EOF
|
||||
Suggested cmake command if toolchain is built with your options:
|
||||
cmake .. ${CMAKE_OPTIONS}
|
||||
EOF
|
||||
else
|
||||
echo
|
||||
cat << EOF | tee ${ROOTDIR}/installation_guide.txt
|
||||
========================== usage =========================
|
||||
Done! The "build" directory can now be removed.
|
||||
|
||||
|
|
@ -91,6 +92,10 @@ It's recommended for you to build CP2K like this after executing above command:
|
|||
make install -j $(get_nprocs)
|
||||
|
||||
When completed, you can run "make clean" or delete this build directory to free up some space.
|
||||
|
||||
For more information about available build options, see: https://manual.cp2k.org/trunk/getting-started/build-from-source.html.
|
||||
This message is saved to "installation_guide.txt".
|
||||
EOF
|
||||
fi
|
||||
|
||||
#EOF
|
||||
|
|
|
|||
|
|
@ -18,10 +18,6 @@ source "${INSTALLDIR}"/toolchain.env
|
|||
|
||||
[ -f "${BUILDDIR}/setup_openblas" ] && rm "${BUILDDIR}/setup_openblas"
|
||||
|
||||
OPENBLAS_CFLAGS=""
|
||||
OPENBLAS_LDFLAGS=""
|
||||
OPENBLAS_LIBS=""
|
||||
OPENBLAS_ROOT=""
|
||||
! [ -d "${BUILDDIR}" ] && mkdir -p "${BUILDDIR}"
|
||||
cd "${BUILDDIR}"
|
||||
|
||||
|
|
@ -100,7 +96,7 @@ case "${with_openblas}" in
|
|||
OPENBLAS_ROOT="${pkg_install_dir}"
|
||||
# Prefer static library if available
|
||||
if [ -f "${pkg_install_dir}/lib/libopenblas.a" ]; then
|
||||
OPENBLAS_LIBS="${pkg_install_dir}/lib/libopenblas.a"
|
||||
OPENBLAS_LIBS="-l:libopenblas.a"
|
||||
else
|
||||
OPENBLAS_LIBS="-lopenblas"
|
||||
fi
|
||||
|
|
@ -109,12 +105,18 @@ case "${with_openblas}" in
|
|||
echo "==================== Finding OpenBLAS from system paths ===================="
|
||||
# assume that system openblas is threaded
|
||||
check_lib -lopenblas "OpenBLAS"
|
||||
OPENBLAS_LIBS="-lopenblas"
|
||||
pkg_install_dir=$(
|
||||
result=$(find_in_paths "libopenblas.a" $LIB_PATHS)
|
||||
[ "$result" = "__FALSE__" ] && result=$(find_in_paths "libopenblas.so" $LIB_PATHS)
|
||||
[ "$result" != "__FALSE__" ] && dirname $(dirname "$result")
|
||||
)
|
||||
INCLUDE_PATHS=${INCLUDE_PATHS}:"$pkg_install_dir/include"
|
||||
# detect separate omp builds
|
||||
check_lib -lopenblas_openmp 2> /dev/null && OPENBLAS_LIBS="-lopenblas_openmp"
|
||||
check_lib -lopenblas_omp 2> /dev/null && OPENBLAS_LIBS="-lopenblas_omp"
|
||||
add_include_from_paths OPENBLAS_CFLAGS "openblas_config.h" $INCLUDE_PATHS
|
||||
add_lib_from_paths OPENBLAS_LDFLAGS "libopenblas.*" $LIB_PATHS
|
||||
OPENBLAS_LIBS="-lopenblas"
|
||||
;;
|
||||
__DONTUSE__) ;;
|
||||
|
||||
|
|
|
|||
|
|
@ -18,9 +18,6 @@ source "${INSTALLDIR}"/toolchain.env
|
|||
|
||||
[ -f "${BUILDDIR}/setup_fftw" ] && rm "${BUILDDIR}/setup_fftw"
|
||||
|
||||
FFTW_CFLAGS=''
|
||||
FFTW_LDFLAGS=''
|
||||
FFTW_LIBS=''
|
||||
! [ -d "${BUILDDIR}" ] && mkdir -p "${BUILDDIR}"
|
||||
cd "${BUILDDIR}"
|
||||
|
||||
|
|
@ -73,6 +70,12 @@ case "$with_fftw" in
|
|||
check_lib -lfftw3 "FFTW"
|
||||
check_lib -lfftw3_omp "FFTW"
|
||||
[ "${MPI_MODE}" != "no" ] && check_lib -lfftw3_mpi "FFTW"
|
||||
pkg_install_dir=$(
|
||||
result=$(find_in_paths "libfftw3.a" $LIB_PATHS)
|
||||
[ "$result" = "__FALSE__" ] && result=$(find_in_paths "libfftw3.so" $LIB_PATHS)
|
||||
[ "$result" != "__FALSE__" ] && dirname $(dirname "$result")
|
||||
)
|
||||
INCLUDE_PATHS=${INCLUDE_PATHS}:"$pkg_install_dir/include"
|
||||
add_include_from_paths FFTW_CFLAGS "fftw3.h" FFTW_INC ${INCLUDE_PATHS}
|
||||
add_lib_from_paths FFTW_LDFLAGS "libfftw3.*" ${LIB_PATHS}
|
||||
;;
|
||||
|
|
@ -113,8 +116,8 @@ export CP_DFLAGS="\${CP_DFLAGS} -D__FFTW3 IF_COVERAGE(IF_MPI(|-U__FFTW3)|)"
|
|||
export CP_CFLAGS="\${CP_CFLAGS} ${FFTW_CFLAGS}"
|
||||
export CP_LDFLAGS="\${CP_LDFLAGS} ${FFTW_LDFLAGS}"
|
||||
export CP_LIBS="${FFTW_LIBS} \${CP_LIBS}"
|
||||
export FFTW_ROOT=${FFTW_ROOT:-${pkg_install_dir}}
|
||||
export FFTW3_ROOT=${pkg_install_dir}
|
||||
export FFTW_ROOT="${FFTW_ROOT:-${pkg_install_dir}}"
|
||||
export FFTW3_ROOT="${FFTW_ROOT:-${pkg_install_dir}}"
|
||||
EOF
|
||||
cat "${BUILDDIR}/setup_fftw" >> $SETUPFILE
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -18,9 +18,6 @@ source "${INSTALLDIR}"/toolchain.env
|
|||
|
||||
[ -f "${BUILDDIR}/setup_scalapack" ] && rm "${BUILDDIR}/setup_scalapack"
|
||||
|
||||
SCALAPACK_CFLAGS=''
|
||||
SCALAPACK_LDFLAGS=''
|
||||
SCALAPACK_LIBS=''
|
||||
! [ -d "${BUILDDIR}" ] && mkdir -p "${BUILDDIR}"
|
||||
cd "${BUILDDIR}"
|
||||
|
||||
|
|
@ -75,6 +72,11 @@ case "$with_scalapack" in
|
|||
__SYSTEM__)
|
||||
echo "==================== Finding ScaLAPACK from system paths ===================="
|
||||
check_lib -lscalapack "ScaLAPACK"
|
||||
pkg_install_dir=$(
|
||||
result=$(find_in_paths "libscalapack.a" $LIB_PATHS)
|
||||
[ "$result" = "__FALSE__" ] && result=$(find_in_paths "libscalapack.so" $LIB_PATHS)
|
||||
[ "$result" != "__FALSE__" ] && dirname $(dirname "$result")
|
||||
)
|
||||
add_lib_from_paths SCALAPACK_LDFLAGS "libscalapack.*" $LIB_PATHS
|
||||
;;
|
||||
__DONTUSE__) ;;
|
||||
|
|
@ -100,7 +102,6 @@ prepend_path PKG_CONFIG_PATH "$pkg_install_dir/lib/pkgconfig"
|
|||
prepend_path CMAKE_PREFIX_PATH "$pkg_install_dir"
|
||||
export SCALAPACK_ROOT="${pkg_install_dir}"
|
||||
EOF
|
||||
cat "${BUILDDIR}/setup_scalapack" >> $SETUPFILE
|
||||
fi
|
||||
cat << EOF >> "${BUILDDIR}/setup_scalapack"
|
||||
export SCALAPACK_LDFLAGS="${SCALAPACK_LDFLAGS}"
|
||||
|
|
@ -110,6 +111,7 @@ export CP_DFLAGS="\${CP_DFLAGS} IF_MPI(-D__parallel|)"
|
|||
export CP_LDFLAGS="\${CP_LDFLAGS} IF_MPI(${SCALAPACK_LDFLAGS}|)"
|
||||
export CP_LIBS="IF_MPI(-lscalapack|) \${CP_LIBS}"
|
||||
EOF
|
||||
cat "${BUILDDIR}/setup_scalapack" >> $SETUPFILE
|
||||
fi
|
||||
cd "${ROOTDIR}"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue