Skip to content
Snippets Groups Projects
Commit 3c2c2749 authored by Fabian.Jakub's avatar Fabian.Jakub
Browse files

add --reuse flag to spack install calls

parent 2026f625
No related branches found
No related tags found
1 merge request!4Switching to the advanced configuration method and fixing spack build.
...@@ -16,7 +16,7 @@ function _install_spack() { ...@@ -16,7 +16,7 @@ function _install_spack() {
echo "Found Compiler $(spack compiler info ${SPACK_COMPILER})" echo "Found Compiler $(spack compiler info ${SPACK_COMPILER})"
else else
echo "could not find compiler, will now try to install it... this may take a while" echo "could not find compiler, will now try to install it... this may take a while"
spack install ${SPACK_COMPILER} spack install --reuse ${SPACK_COMPILER}
spack compiler add $(spack location --install-dir $SPACK_COMPILER) spack compiler add $(spack location --install-dir $SPACK_COMPILER)
fi fi
} }
......
...@@ -17,7 +17,7 @@ cd ${WORKDIR} || exit ...@@ -17,7 +17,7 @@ cd ${WORKDIR} || exit
load_spack "%spack.init%" "%spack.root%" "%spack.url%" "%spack.branch%" "%spack.externals%" "%spack.compiler%" "%spack.disable_local_config%" "%spack.user_cache_path%" "%spack.user_config_path%" load_spack "%spack.init%" "%spack.root%" "%spack.url%" "%spack.branch%" "%spack.externals%" "%spack.compiler%" "%spack.disable_local_config%" "%spack.user_cache_path%" "%spack.user_config_path%"
if [ ! $(rpm -qa | grep bzip2) ]; then if [ ! $(rpm -qa | grep bzip2) ]; then
spack install bzip2 spack install --reuse bzip2
spack load --first bzip2 spack load --first bzip2
fi fi
...@@ -32,7 +32,7 @@ if [ ! -z "$SPACK_BUILD_ICON" ]; then ...@@ -32,7 +32,7 @@ if [ ! -z "$SPACK_BUILD_ICON" ]; then
spack repo add ${WORKDIR}/proj/spack_repo spack repo add ${WORKDIR}/proj/spack_repo
fi fi
spack spec $SPACK_BUILD_ICON spack spec $SPACK_BUILD_ICON
spack install $SPACK_BUILD_ICON spack install --reuse $SPACK_BUILD_ICON
#TODO: had some problems with spack load when more than one version is available, adding --first to overcome that #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. # although in principle we should not install the model if its already installed.
spack load --first "icon-nwp@${ICON_VERSION}%${COMPILER}" spack load --first "icon-nwp@${ICON_VERSION}%${COMPILER}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment