From dabcb3e94f6fb7d44e4ab6ef7066cfd8d43fc3e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oriol=20Tint=C3=B3?= <oriol.tinto@lmu.de> Date: Thu, 23 Mar 2023 16:27:15 +0100 Subject: [PATCH] Update spack_utils.sh --- platforms/common/spack_utils.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/platforms/common/spack_utils.sh b/platforms/common/spack_utils.sh index 22eea00..1ad23dd 100644 --- a/platforms/common/spack_utils.sh +++ b/platforms/common/spack_utils.sh @@ -4,7 +4,7 @@ function _install_spack() { git clone --depth 1 ${SPACK_URL} -b ${SPACK_BRANCH} ${SPACK_ROOT} fi - _init_spack + _init_spack ${SPACK_INIT_CMD} ${SPACK_ROOT} if [[ $(spack compiler info ${SPACK_COMPILER}) ]]; then echo "Found Compiler $(spack compiler info ${SPACK_COMPILER})" @@ -16,8 +16,8 @@ function _install_spack() { } function _init_spack() { - #SPACK_INIT_CMD=$1 - #SPACK_ROOT=$2 + SPACK_INIT_CMD=$1 + SPACK_ROOT=$2 if [ -z "$SPACK_INIT_CMD" ] && [ ! -z "${SPACK_ROOT}" ]; then echo "Empty SPACK_INIT_CMD -> trying to source config file of spack root: $SPACK_ROOT/share/spack/setup-env.sh" . $SPACK_ROOT/share/spack/setup-env.sh @@ -29,12 +29,12 @@ function _init_spack() { function load_spack() { export SPACK_INIT_CMD=$1 - export SPACK_ROOT=${2:-spack} - export SPACK_URL=${3:-https://github.com/spack/spack.git} - export SPACK_BRANCH=${4:-develop} - export SPACK_COMPILER=${5:-gcc@12.2.0} - export SPACK_DISABLE_LOCAL_CONFIG=${6:-true} - export SPACK_USER_CACHE_PATH=${7:-${SPACK_ROOT}/spack_user_cache_path} + export SPACK_ROOT=$2 # i.e.: spack + export SPACK_URL=$3 # i.e.: https://github.com/spack/spack.git + export SPACK_BRANCH=$4 # i.e.: develop + export SPACK_COMPILER=$5 # i.e.: gcc@12.2.0 + export SPACK_DISABLE_LOCAL_CONFIG=$6 # i.e.: true + export SPACK_USER_CACHE_PATH=$7 # i.e.: ${SPACK_ROOT}/spack_user_cache_path echo "SPACK_INIT_CMD = $SPACK_INIT_CMD" echo "SPACK_ROOT = $SPACK_ROOT" -- GitLab