Skip to content

Commit 7d6af69

Browse files
committed
Use env var to check for GPU support and add this to module path
1 parent 0e8861f commit 7d6af69

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

init/bash

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ if [ $? -eq 0 ]; then
3131
# prepend location of modules for EESSI software stack to $MODULEPATH
3232
echo "Prepending $EESSI_MODULEPATH to \$MODULEPATH..." >> $output
3333
module use $EESSI_MODULEPATH
34+
if [[ ! -z "${EESSI_SITE_MODULEPATH}" ]]; then
35+
echo "Add ${EESSI_SITE_MODULEPATH} to \$MODULEPATH for GPU support..."
36+
module use ${EESSI_SITE_MODULEPATH}
37+
fi
3438

3539
#echo >> $output
3640
#echo "*** Known problems in the ${EESSI_PILOT_VERSION} pilot software stack ***" >> $output

init/eessi_environment_variables

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ if [ -d $EESSI_PREFIX ]; then
3232

3333
echo "Using ${EESSI_SOFTWARE_SUBDIR} as software subdirectory." >> $output
3434
export EESSI_SOFTWARE_PATH=$EESSI_PREFIX/software/$EESSI_OS_TYPE/$EESSI_SOFTWARE_SUBDIR
35-
if [ -d "${EESSI_SOFTWARE_PATH/versions/host_injections}" ]; then
36-
eessi_gpu_software_path="${EESSI_SOFTWARE_PATH/versions/host_injections}/modules/all"
35+
eessi_site_modulepath="${EESSI_SOFTWARE_PATH/versions/host_injections}/modules/all"
36+
if [ -d "$eessi_site_modulepath" ]; then
37+
export EESSI_SITE_MODULEPATH="$eessi_site_modulepath"
3738
fi
3839
if [ ! -z $EESSI_BASIC_ENV ]; then
3940
echo "Only setting up basic environment, so we're done" >> $output

0 commit comments

Comments
 (0)