Skip to content

Commit

Permalink
Only source env file when using JSC supercomputers
Browse files Browse the repository at this point in the history
  • Loading branch information
kvrigor committed Oct 9, 2024
1 parent 94d0474 commit e2936d9
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions build_tsmp2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ else
fi

# set INSTALL and BUILD DIR (neccesary for building)
if [ -z "${SYSTEMNAME}" ]; then SYSTEMNAME="UNKN"; fi
if [ -z "${SYSTEMNAME}" ]; then SYSTEMNAME=$(hostname); fi

if [ -z "${build_dir}" ]; then
cmake_build_dir="${cmake_tsmp2_dir}/bld/${SYSTEMNAME^^}_${model_id}"
Expand All @@ -203,13 +203,15 @@ fi # install_dir
build_log="$(dirname ${cmake_build_dir})/${model_id}_$(date +%Y-%m-%d_%H-%M).log"

## source environment
message "source environment"
if [ -z "${tsmp2_env}" ]; then
if [[ $SYSTEMNAME = "jurecadc" || $SYSTEMNAME = "juwels" || $SYSTEMNAME = "jusuf" ]]; then
message "source environment"
if [ -z "${tsmp2_env}" ]; then
tsmp2_env="${cmake_tsmp2_dir}/env/jsc.2024_Intel.sh"
else
tsmp2_env="${tsmp2_env}"
fi # tsmp2_env
source $tsmp2_env
else
tsmp2_env="${tsmp2_env}"
fi # tsmp2_env
source $tsmp2_env
fi

## CMAKE config
# rm -rf ${cmake_build_dir}
Expand Down

0 comments on commit e2936d9

Please sign in to comment.