mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-21 06:25:15 -04:00
Disable DLA-Future only with MPICH (#5578)
This commit is contained in:
parent
440cf4f012
commit
c835e6b7b6
3 changed files with 23 additions and 11 deletions
26
make_cp2k.sh
26
make_cp2k.sh
|
|
@ -137,7 +137,6 @@ DEPS_BUILD_TYPE="${DEPS_BUILD_TYPE:-Release}"
|
||||||
CMAKE_FEATURE_FLAG_ALL="-DCP2K_USE_EVERYTHING=ON" # all features are activated by default
|
CMAKE_FEATURE_FLAG_ALL="-DCP2K_USE_EVERYTHING=ON" # all features are activated by default
|
||||||
CMAKE_FEATURE_FLAGS="-DCP2K_BLAS_VENDOR=OpenBLAS" # LAPACK/BLAS from OpenBLAS by default
|
CMAKE_FEATURE_FLAGS="-DCP2K_BLAS_VENDOR=OpenBLAS" # LAPACK/BLAS from OpenBLAS by default
|
||||||
CMAKE_FEATURE_FLAGS+=" -DCP2K_USE_FFTW3=ON" # FFTW3 is always activated unless explicitly disabled
|
CMAKE_FEATURE_FLAGS+=" -DCP2K_USE_FFTW3=ON" # FFTW3 is always activated unless explicitly disabled
|
||||||
CMAKE_FEATURE_FLAGS+=" -DCP2K_USE_DLAF=OFF" # DLAF is deactivated by default
|
|
||||||
CMAKE_FEATURE_FLAG_MPI="-DCP2K_USE_MPI=ON" # MPI is switched on by default
|
CMAKE_FEATURE_FLAG_MPI="-DCP2K_USE_MPI=ON" # MPI is switched on by default
|
||||||
CMAKE_FEATURE_FLAGS_GPU="-DCP2K_USE_SPLA_GEMM_OFFLOADING=ON"
|
CMAKE_FEATURE_FLAGS_GPU="-DCP2K_USE_SPLA_GEMM_OFFLOADING=ON"
|
||||||
CRAY="no"
|
CRAY="no"
|
||||||
|
|
@ -281,8 +280,8 @@ while [[ $# -gt 0 ]]; do
|
||||||
CMAKE_FEATURE_FLAG_ALL="-DCP2K_USE_EVERYTHING=${ON_OFF}"
|
CMAKE_FEATURE_FLAG_ALL="-DCP2K_USE_EVERYTHING=${ON_OFF}"
|
||||||
for package in adios2 cosma deepmdkit dla-future dla-future-fortran elpa \
|
for package in adios2 cosma deepmdkit dla-future dla-future-fortran elpa \
|
||||||
gauxc greenx hdf5 libfabric libfci libint libvdwxc libsmeagol libvori \
|
gauxc greenx hdf5 libfabric libfci libint libvdwxc libsmeagol libvori \
|
||||||
libxc libxs mimic-mcl openpmd-api pace pexsi plumed py-torch sirius spfft \
|
libxc libxs libxsmm mimic-mcl openpmd-api pace pexsi plumed py-torch sirius \
|
||||||
spglib spla tblite trexio; do
|
spfft spglib spla tblite trexio; do
|
||||||
SED_PATTERN_LIST+=" -e '/\s*-\s+\"${package}@/ ${SUBST}"
|
SED_PATTERN_LIST+=" -e '/\s*-\s+\"${package}@/ ${SUBST}"
|
||||||
done
|
done
|
||||||
# dbcsr must use blas as fallback when libxs/libxsmm is disabled
|
# dbcsr must use blas as fallback when libxs/libxsmm is disabled
|
||||||
|
|
@ -322,9 +321,9 @@ while [[ $# -gt 0 ]]; do
|
||||||
dlaf)
|
dlaf)
|
||||||
SED_PATTERN_LIST+=" -e '/\s*-\s+\"dla-future.*@/ ${SUBST}"
|
SED_PATTERN_LIST+=" -e '/\s*-\s+\"dla-future.*@/ ${SUBST}"
|
||||||
if [[ "${ON_OFF}" == "ON" ]]; then
|
if [[ "${ON_OFF}" == "ON" ]]; then
|
||||||
SED_PATTERN_LIST+=" -e 's/\"~dlaf\"/\"+dlaf\"/'"
|
SED_PATTERN_LIST+=" -e 's/\~dlaf/\+dlaf/'"
|
||||||
else
|
else
|
||||||
SED_PATTERN_LIST+=" -e 's/\"+dlaf\"/\"~dlaf\"/'"
|
SED_PATTERN_LIST+=" -e 's/\+dlaf/\~dlaf/'"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
fftw3)
|
fftw3)
|
||||||
|
|
@ -352,7 +351,7 @@ while [[ $# -gt 0 ]]; do
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
libxs)
|
libxs)
|
||||||
SED_PATTERN_LIST+=" -e '/\s*-\s+\"${2,,}@/ ${SUBST}"
|
SED_PATTERN_LIST+=" -e '/\s*-\s+\"libxs@/ ${SUBST}"
|
||||||
SED_PATTERN_LIST+=" -e '/\s*-\s+\"libxsmm@/ ${SUBST}"
|
SED_PATTERN_LIST+=" -e '/\s*-\s+\"libxsmm@/ ${SUBST}"
|
||||||
if [[ "${ON_OFF}" == "OFF" ]]; then
|
if [[ "${ON_OFF}" == "OFF" ]]; then
|
||||||
SED_PATTERN_LIST+=" -e '/\s*-\s+\"smm=${2,,}\"/ s/${2,,}/blas/'"
|
SED_PATTERN_LIST+=" -e '/\s*-\s+\"smm=${2,,}\"/ s/${2,,}/blas/'"
|
||||||
|
|
@ -618,6 +617,19 @@ NUM_PROCS=$(awk '{print $1+0}' <<< "${NUM_PROCS}")
|
||||||
# Assemble CMake feature flag list
|
# Assemble CMake feature flag list
|
||||||
CMAKE_FEATURE_FLAGS="${CMAKE_FEATURE_FLAG_ALL} ${CMAKE_FEATURE_FLAG_MPI} ${CMAKE_FEATURE_FLAGS}"
|
CMAKE_FEATURE_FLAGS="${CMAKE_FEATURE_FLAG_ALL} ${CMAKE_FEATURE_FLAG_MPI} ${CMAKE_FEATURE_FLAGS}"
|
||||||
|
|
||||||
|
# DLA-Future does not work with MPICH yet
|
||||||
|
case "${MPI_MODE}" in
|
||||||
|
mpich | openmpi)
|
||||||
|
if [[ "${CMAKE_FEATURE_FLAGS}" == *"-DCP2K_USE_EVERYTHING=ON"* ]] ||
|
||||||
|
[[ "${CMAKE_FEATURE_FLAGS}" == *"-DCP2K_USE_DLAF=ON"* ]]; then
|
||||||
|
echo -e "\nINFO: DLA-Future does not work with ${MPI_MODE^^} yet and is disabled"
|
||||||
|
CMAKE_FEATURE_FLAGS+=" -DCP2K_USE_DLAF=OFF"
|
||||||
|
SED_PATTERN_LIST+=" -e '/\s*-\s+\"dla-future.*@/ s/^ /#/'"
|
||||||
|
SED_PATTERN_LIST+=" -e 's/\+dlaf/\~dlaf/'"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Clean CMake feature flag list from repeated entries and keep only the last definition
|
# Clean CMake feature flag list from repeated entries and keep only the last definition
|
||||||
declare -A last=()
|
declare -A last=()
|
||||||
order=()
|
order=()
|
||||||
|
|
@ -757,7 +769,7 @@ echo ""
|
||||||
echo "CMAKE_FEATURE_FLAGS = ${CMAKE_FEATURE_FLAGS}"
|
echo "CMAKE_FEATURE_FLAGS = ${CMAKE_FEATURE_FLAGS}"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
((VERBOSE > 0)) && echo "SED_PATTERN_LIST = ${SED_PATTERN_LIST}"
|
((VERBOSE > 0)) && echo -e "SED_PATTERN_LIST = ${SED_PATTERN_LIST}\n"
|
||||||
|
|
||||||
# Check if a valid number for the packages to be built by spack in parallel is given
|
# Check if a valid number for the packages to be built by spack in parallel is given
|
||||||
if ((NUM_PACKAGES < 1)); then
|
if ((NUM_PACKAGES < 1)); then
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
"test08.inp" = [{matcher="TDDFPT_Check_Energy", tol=5.0E-06, ref=0.103120E+01},
|
"test08.inp" = [{matcher="TDDFPT_Check_Energy", tol=5.0E-06, ref=0.103120E+01},
|
||||||
{matcher="TDDFPT_Check_Osc_Strength", tol=1.0E-06, ref=0.53475506E+00}]
|
{matcher="TDDFPT_Check_Osc_Strength", tol=1.0E-06, ref=0.53475506E+00}]
|
||||||
"test09.inp" = [{matcher="TDDFPT_Check_Energy", tol=5.0E-06, ref=0.101371E+01},
|
"test09.inp" = [{matcher="TDDFPT_Check_Energy", tol=5.0E-06, ref=0.101371E+01},
|
||||||
{matcher="TDDFPT_Check_Osc_Strength", tol=2.0E-05, ref=0.52917241E+00}]
|
{matcher="TDDFPT_Check_Osc_Strength", tol=4.0E-05, ref=0.52917241E+00}]
|
||||||
"test10.inp" = [{matcher="TDDFPT_Check_Energy", tol=5.0E-06, ref=0.997064E+00},
|
"test10.inp" = [{matcher="TDDFPT_Check_Energy", tol=5.0E-06, ref=0.997064E+00},
|
||||||
{matcher="TDDFPT_Check_Osc_Strength", tol=1.0E-05, ref=0.550257E+00}]
|
{matcher="TDDFPT_Check_Osc_Strength", tol=1.0E-05, ref=0.550257E+00}]
|
||||||
"test11.inp" = [{matcher="TDDFPT_Check_Energy", tol=5.0E-06, ref=0.105541E+01},
|
"test11.inp" = [{matcher="TDDFPT_Check_Energy", tol=5.0E-06, ref=0.105541E+01},
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ spack:
|
||||||
require:
|
require:
|
||||||
- "~apps"
|
- "~apps"
|
||||||
- "+dftd3"
|
- "+dftd3"
|
||||||
- "~dlaf"
|
- "+dlaf"
|
||||||
- "+elpa"
|
- "+elpa"
|
||||||
- "+fortran"
|
- "+fortran"
|
||||||
- "+pugixml"
|
- "+pugixml"
|
||||||
|
|
@ -201,8 +201,8 @@ spack:
|
||||||
- "dbcsr@2.10.0"
|
- "dbcsr@2.10.0"
|
||||||
- "deepmdkit@3.1.3"
|
- "deepmdkit@3.1.3"
|
||||||
# - "dftd4@4.0.2"
|
# - "dftd4@4.0.2"
|
||||||
# - "dla-future@0.10.0"
|
- "dla-future@0.10.0"
|
||||||
# - "dla-future-fortran@0.5.0"
|
- "dla-future-fortran@0.5.0"
|
||||||
- "elpa@2026.02.002"
|
- "elpa@2026.02.002"
|
||||||
- "fftw@3.3.11"
|
- "fftw@3.3.11"
|
||||||
- "gauxc@dev20260608"
|
- "gauxc@dev20260608"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue