Skip to content

Commit

Permalink
Merge branch 'nessi.no-2023.06' of github-trz:NorESSI/software-layer …
Browse files Browse the repository at this point in the history
…into sync_nessi_eessi_test_pr
  • Loading branch information
truib committed Jan 23, 2024
2 parents 5a0c0cc + 60faa41 commit 34c12e3
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions init/eessi_environment_variables
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,17 @@ if [ -d $EESSI_PREFIX ]; then
# determine subdirectory in software layer
if [ "$EESSI_USE_ARCHDETECT" == "1" ]; then
# if archdetect is enabled, use internal code
export EESSI_SOFTWARE_SUBDIR=$(${EESSI_INIT_DIR_PATH}/eessi_archdetect.sh cpupath)
show_msg "archdetect says ${EESSI_SOFTWARE_SUBDIR}"
all_cpupaths=$(${EESSI_INIT_DIR_PATH}/eessi_archdetect.sh -a cpupath)
# iterate over colon-separated list verifying if the architecture is present
# under $EESSI_PREFIX/software/$EESSI_OS_TYPE; if so use the architecture as best match
IFS=: read -r -a archs <<< "${all_cpupaths}"
for arch in "${archs[@]}"; do
if [ -d ${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${arch} ]; then
export EESSI_SOFTWARE_SUBDIR=${arch}
show_msg "archdetect says ${EESSI_SOFTWARE_SUBDIR}"
break
fi
done
elif [ "$EESSI_USE_ARCHSPEC" == "1" ]; then
# note: eessi_software_subdir_for_host.py will pick up value from $EESSI_SOFTWARE_SUBDIR_OVERRIDE if it's defined!
export EESSI_EPREFIX_PYTHON=$EESSI_EPREFIX/usr/bin/python3
Expand Down

0 comments on commit 34c12e3

Please sign in to comment.