mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-29 06:35:28 -04:00
Check if the selected features are available for building a serial CP2K binary
This commit is contained in:
parent
0cc6abc953
commit
37e9a773c6
1 changed files with 13 additions and 0 deletions
13
make_cp2k.sh
13
make_cp2k.sh
|
|
@ -635,6 +635,18 @@ case "${MPI_MODE}" in
|
|||
;;
|
||||
esac
|
||||
|
||||
# Check if CP2K_VERSION and the selected features are compatible
|
||||
case "${CP2K_VERSION}" in
|
||||
ssmp | ssmp-static)
|
||||
for package in cosma dlaf elpa libfabric libsmeagol mimic openpmd pexsi plumed sirius spla; do
|
||||
if [[ "${CMAKE_FEATURE_FLAGS}" == *" -DCP2K_USE_${package^^}=ON"* ]]; then
|
||||
echo -e "ERROR: The feature ${package^^} is not available for building serial CP2K binaries (${CP2K_VERSION})\n"
|
||||
${EXIT_CMD} 1
|
||||
fi
|
||||
done
|
||||
;;
|
||||
esac
|
||||
|
||||
# Perform CUDA GPU related settings
|
||||
if ((CUDA_ARCH > 0)); then
|
||||
if command -v nvcc &> /dev/null; then
|
||||
|
|
@ -830,6 +842,7 @@ if [[ ! -d "${SPACK_BUILD_PATH}" ]]; then
|
|||
sed -E \
|
||||
-e "0,/~cuda/s//+cuda cuda_arch=${CUDA_ARCH}/" \
|
||||
-e '/\s*#\s*-\s+"\+cuda\s+\+gpu_direct"/ s/#/ /' \
|
||||
-e '/\s*#\s*-\s+"\+cuda\s+\+gdrcopy"/ s/#/ /' \
|
||||
-i "${CP2K_CONFIG_FILE}"
|
||||
if [[ -n "${CUDA_VERSION:-}" ]]; then
|
||||
sed -E -e "s/spec:\s+cuda@[.0-9]*/spec: cuda@${CUDA_VERSION}/" -i "${CP2K_CONFIG_FILE}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue