Skip to content

Commit 1c31551

Browse files
committed
Switch to just explicitly setting EASYBUILD_INSTALLPATH
1 parent add793e commit 1c31551

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

scripts/gpu_support/nvidia/install_cuda_and_libraries.sh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,12 @@ for EASYSTACK_FILE in ${TOPDIR}/easystacks/eessi-*CUDA*.yml; do
109109
fi
110110
module load EasyBuild/${eb_version}
111111

112-
# Even though EESSI-extend should target a site install here, we tell EESSI-extend
113-
# that it is a project installation so that the packages do not get installed under
114-
# an accelerator subdirectory if there is a GPU available (which is enforced for site
115-
# installations).
116-
module unload EESSI-extend
112+
# Make sure EESSI-extend does a site install here
113+
# We need to reload it with the current environment variables set
117114
unset EESSI_CVMFS_INSTALL
118-
unset EESSI_SITE_INSTALL
119-
export EESSI_PROJECT_INSTALL="$EESSI_SITE_SOFTWARE_PATH"
115+
unset EESSI_PROJECT_INSTALL
120116
unset EESSI_USER_INSTALL
117+
export EESSI_SITE_INSTALL=1
121118
module unload EESSI-extend
122119
ml_av_eessi_extend_out=${tmpdir}/ml_av_eessi_extend.out
123120
# need to use --ignore_cache to avoid the case that the module was removed (to be
@@ -133,10 +130,16 @@ for EASYSTACK_FILE in ${TOPDIR}/easystacks/eessi-*CUDA*.yml; do
133130
module --ignore_cache load EESSI-extend/${EESSI_EXTEND_VERSION}
134131
unset EESSI_EXTEND_VERSION
135132

133+
# If there is a GPU on the node, the installation path will by default have an
134+
# accelerator subdirectory. For CUDA and cu*, these are binary installations and
135+
# don't care about the target compute capability. Our hooks are aware of this and
136+
# therefore expect CUDA to be available under EESSI_SITE_SOFTWARE_PATH
137+
export EASYBUILD_INSTALLPATH=$EESSI_SITE_SOFTWARE_PATH
138+
136139
# Install modules in hidden .modules dir to keep track of what was installed before
137140
# (this action is temporary, and we do not call Lmod again within the current shell context, but in EasyBuild
138141
# subshells, so loaded modules are not automatically unloaded)
139-
MODULEPATH=${EESSI_SITE_SOFTWARE_PATH}/.modules/all
142+
MODULEPATH=${EASYBUILD_INSTALLPATH}/.modules/all
140143
echo "set MODULEPATH=${MODULEPATH}"
141144

142145
# We don't want hooks used in this install, we need vanilla installations

0 commit comments

Comments
 (0)