Remove feature gdrcopy when CUDA is disabled

This commit is contained in:
Matthias Krack 2026-02-25 13:50:19 +01:00
parent d7e922a052
commit db02cc849e
2 changed files with 4 additions and 2 deletions

View file

@ -864,7 +864,7 @@ if [[ ! -d "${SPACK_BUILD_PATH}" ]]; then
if ((CUDA_ARCH > 0)); then
sed -E \
-e "0,/~cuda/s//+cuda cuda_arch=${CUDA_ARCH}/" \
-e '/\s*#\s*-\s+"\+cuda\s+\+gpu_direct"/ s/#/ /' \
-e 's/"~cuda\s+~gpu_direct"/"\+cuda \+gpu_direct"/' \
-e 's/"~cuda\s+~gdrcopy"/"\+cuda \+gdrcopy"/' \
-e '/\s*#\s*-\s+"fabrics=efa,ucx"/ s/#/ /' \
-i "${CP2K_CONFIG_FILE}"
@ -874,6 +874,8 @@ if [[ ! -d "${SPACK_BUILD_PATH}" ]]; then
if [[ -n "${CUDA_HOME:-}" ]]; then
sed -E -e "s|prefix: /usr/local/cuda|prefix: ${CUDA_HOME}|" -i "${CP2K_CONFIG_FILE}"
fi
else
sed -E -e 's/"~cuda\s+~gdrcopy"/"\~cuda"/' -i "${CP2K_CONFIG_FILE}"
fi
# Apply Cray specific adaptation of the spack configuration if requested (CSCS)

View file

@ -83,7 +83,7 @@ spack:
cosma:
require:
# - "+cuda +gpu_direct"
- "~cuda ~gpu_direct"
- "+scalapack"
dbcsr: