From 0a1598cc6d0c56eb131b82199a0d53654f395617 Mon Sep 17 00:00:00 2001 From: Johannes Keller Date: Wed, 8 Oct 2025 15:46:07 +0200 Subject: [PATCH 1/5] typo fixes --- build_tsmp2.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_tsmp2.sh b/build_tsmp2.sh index 7edd729..79709b7 100755 --- a/build_tsmp2.sh +++ b/build_tsmp2.sh @@ -74,7 +74,7 @@ if [ -n "${comp_name}" ] && [ -z "${comp_srcname}" ];then submodule_name=$(echo "models/"${sub_srcname}) fi if [ "$( ls -A ${cmake_tsmp2_dir}/${submodule_name} | wc -l)" -ne 0 ];then - read -p "submodule ${submodule_name} aleady exists. Do you want to overwrite it? (y/N) " yn + read -p "submodule ${submodule_name} already exists. Do you want to overwrite it? (y/N) " yn if [ "${yn,}" = "y" ];then message "Overwrite submodule ${submodule_name}" git submodule update --init --force -- ${submodule_name} @@ -197,7 +197,7 @@ fi # Check if the supplied environment file actually exists. if [[ ! -f "${env}" ]]; then - message "ERROR: Environment file \"${env}\" not found". + message "ERROR: Environment file \"${env}\" not found." exit 1 fi From c65a96e0063908a86c300d79c4477a9a0795cd84 Mon Sep 17 00:00:00 2001 From: Johannes Keller Date: Wed, 8 Oct 2025 15:46:15 +0200 Subject: [PATCH 2/5] exit code 0 for `--version` --- build_tsmp2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tsmp2.sh b/build_tsmp2.sh index 79709b7..aaddbcc 100755 --- a/build_tsmp2.sh +++ b/build_tsmp2.sh @@ -103,7 +103,7 @@ while [[ "$#" -gt 0 ]]; do -h|--help) help_tsmp2;; -q|--quiet) quiet=y;; -v|--verbose) verbose_makefile=y;; - --version) echo "$0 version 0.1.0"; exit 1;; + --version) echo "$0 version 0.1.0"; exit 0;; --icon) icon=y;; --eclm) eclm=y;; --parflow) parflow=y;; From cc14d8c1da6b31f0b534e360b327e5c0dd5e1973 Mon Sep 17 00:00:00 2001 From: Johannes Keller Date: Wed, 8 Oct 2025 15:46:48 +0200 Subject: [PATCH 3/5] check if only one ParFlow option is enabled either --parflow or --parflowgpu --- build_tsmp2.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build_tsmp2.sh b/build_tsmp2.sh index aaddbcc..2e56e3b 100755 --- a/build_tsmp2.sh +++ b/build_tsmp2.sh @@ -142,11 +142,17 @@ message "Setting model-id and component string..." set_component icon "ICON" set_component eclm "eCLM" set_component parflow "ParFlow" -set_component parflowGPU "ParFlowGPU" #TODO: check if only one ParFlow option is enabled (either --parflow or --parflowgpu) +set_component parflowGPU "ParFlowGPU" set_component cosmo "COSMO" set_component clm35 "CLM3.5" set_component pdaf "PDAF" +# Validate mutually exclusive ParFlow options +if [ "${parflow}" = "y" ] && [ "${parflowGPU}" = "y" ];then + echo "ABORT: Cannot enable both --parflow and --parflowgpu simultaneously" + exit 1 +fi + if [ $model_count = 0 ];then echo "ABORT: No model component is chosen" exit 1 From 9bfc73ca1214be50a924dacb0bec1879ef37b1fa Mon Sep 17 00:00:00 2001 From: Johannes Keller Date: Wed, 8 Oct 2025 16:28:43 +0200 Subject: [PATCH 4/5] Debug configuration output Error: https://github.com/HPSCTerrSys/TSMP2/actions/runs/18346915715/job/52255954942 --- build_tsmp2.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/build_tsmp2.sh b/build_tsmp2.sh index 2e56e3b..2e82572 100755 --- a/build_tsmp2.sh +++ b/build_tsmp2.sh @@ -147,6 +147,17 @@ set_component cosmo "COSMO" set_component clm35 "CLM3.5" set_component pdaf "PDAF" +echo "" +echo "Configuration:" +echo " icon : $icon" +echo " eCLM : $eclm" +echo " ParFlow : $parflow" +echo " ParFlow GPU : $parflowGPU" +echo " COSMO : $cosmo" +echo " CLM3.5 : $clm35" +echo " PDAF : $pdaf" +echo "" + # Validate mutually exclusive ParFlow options if [ "${parflow}" = "y" ] && [ "${parflowGPU}" = "y" ];then echo "ABORT: Cannot enable both --parflow and --parflowgpu simultaneously" From e8d54f98891f06795e2f5a7c833207b1f05b7664 Mon Sep 17 00:00:00 2001 From: Johannes Keller Date: Wed, 8 Oct 2025 20:37:48 +0200 Subject: [PATCH 5/5] revert changes regarding `parflow` and `parflowGPU` see https://github.com/HPSCTerrSys/TSMP2/pull/97#discussion_r2414623587 --- build_tsmp2.sh | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/build_tsmp2.sh b/build_tsmp2.sh index 2e82572..aaddbcc 100755 --- a/build_tsmp2.sh +++ b/build_tsmp2.sh @@ -142,28 +142,11 @@ message "Setting model-id and component string..." set_component icon "ICON" set_component eclm "eCLM" set_component parflow "ParFlow" -set_component parflowGPU "ParFlowGPU" +set_component parflowGPU "ParFlowGPU" #TODO: check if only one ParFlow option is enabled (either --parflow or --parflowgpu) set_component cosmo "COSMO" set_component clm35 "CLM3.5" set_component pdaf "PDAF" -echo "" -echo "Configuration:" -echo " icon : $icon" -echo " eCLM : $eclm" -echo " ParFlow : $parflow" -echo " ParFlow GPU : $parflowGPU" -echo " COSMO : $cosmo" -echo " CLM3.5 : $clm35" -echo " PDAF : $pdaf" -echo "" - -# Validate mutually exclusive ParFlow options -if [ "${parflow}" = "y" ] && [ "${parflowGPU}" = "y" ];then - echo "ABORT: Cannot enable both --parflow and --parflowgpu simultaneously" - exit 1 -fi - if [ $model_count = 0 ];then echo "ABORT: No model component is chosen" exit 1