From f71b4c2f7a5c9f3852df9119ebfe2e1537d3077f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oriol=20Tint=C3=B3=20Prims?= <oriol.tinto@lmu.de> Date: Mon, 27 Mar 2023 14:42:46 +0200 Subject: [PATCH] Add --first to load icon. --- templates/common/build_icon.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/common/build_icon.sh b/templates/common/build_icon.sh index 977619d..bdf12fb 100644 --- a/templates/common/build_icon.sh +++ b/templates/common/build_icon.sh @@ -34,7 +34,9 @@ if [ ! -z "$SPACK_BUILD_ICON" ]; then fi spack install $SPACK_BUILD_ICON - spack load "icon-nwp@${ICON_VERSION}%${COMPILER}" + #TODO: had some problems with spack load when more than one version is available, adding --first to overcome that + # although in principle we should not install the model if its already installed. + spack load --first "icon-nwp@${ICON_VERSION}%${COMPILER}" else echo "\%icon.spack_cmd\% is not defined. If you want to compile icon with spack, please provide a spack compile instruction string in your build.yml" fi -- GitLab