File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -481,6 +481,11 @@ config_validate() {
481481 CONFIG_CACHE[" ARCH_NUM" ]=" no"
482482 fi
483483
484+ # Backward compatibility: also export ARCH_NUM to environment when set
485+ if [[ -n " ${CONFIG_CACHE[ARCH_NUM]} " ]]; then
486+ export ARCH_NUM=" ${CONFIG_CACHE[ARCH_NUM]} "
487+ fi
488+
484489 return 0
485490}
486491
@@ -606,6 +611,10 @@ config_export_to_env() {
606611 for key in " ${! CONFIG_CACHE[@]} " ; do
607612 export " $key " =" ${CONFIG_CACHE[$key]} "
608613 done
614+
615+ # Backward compatibility for stage scripts expecting uppercase GPU flags
616+ # Installers (e.g., stage3/install_elpa.sh) read ENABLE_CUDA, not enable_cuda
617+ export ENABLE_CUDA=" ${CONFIG_CACHE[enable_cuda]} "
609618
610619 # Export package list variables
611620 export tool_list
Original file line number Diff line number Diff line change @@ -114,9 +114,11 @@ case "$with_elpa" in
114114 fi
115115 fi
116116 for TARGET in " cpu" " nvidia" ; do
117- [ " $TARGET " = " nvidia" ] && [ " $ENABLE_CUDA " != " __TRUE__" ] && continue
117+ # Accept both uppercase and lowercase GPU enable flags for compatibility
118+ gpu_enabled=" ${ENABLE_CUDA:- ${enable_cuda} } "
119+ [ " $TARGET " = " nvidia" ] && [ " $gpu_enabled " != " __TRUE__" ] && continue
118120 # disable cpu if cuda is enabled, only install one
119- [ " $TARGET " != " nvidia" ] && [ " $ENABLE_CUDA " = " __TRUE__" ] && continue
121+ [ " $TARGET " != " nvidia" ] && [ " $gpu_enabled " = " __TRUE__" ] && continue
120122 # extend the pkg_install_dir by TARGET
121123 # this linking method is totally different from cp2k toolchain
122124 # for cp2k, ref https://github.com/cp2k/cp2k/commit/6fe2fc105b8cded84256248f68c74139dd8fc2e9
You can’t perform that action at this time.
0 commit comments