Skip to content

Commit aa99eae

Browse files
authored
Merge pull request #72 from casparvl/fix_false_insufficient_disk_space_error
2 parents 99c82b5 + 15e99a2 commit aa99eae

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

EESSI-install-software.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ fi
348348

349349
# if an accelerator target is specified, we need to make sure that the CPU-only modules are also still available
350350
if [ ! -z ${EESSI_ACCELERATOR_TARGET} ]; then
351-
CPU_ONLY_MODULES_PATH=$(echo $EASYBUILD_INSTALLPATH | sed "s@/accel/${EESSI_ACCELERATOR_TARGET}@@g")/modules/all
351+
CPU_ONLY_MODULES_PATH=$(echo $EASYBUILD_INSTALLPATH | sed "s@/${EESSI_ACCELERATOR_TARGET}@@g")/modules/all
352352
if [ -d ${CPU_ONLY_MODULES_PATH} ]; then
353353
module use ${CPU_ONLY_MODULES_PATH}
354354
else
@@ -439,7 +439,7 @@ lmod_rc_file="$LMOD_CONFIG_DIR/lmodrc.lua"
439439
echo "DEBUG: lmod_rc_file='${lmod_rc_file}'"
440440
if [[ ! -z ${EESSI_ACCELERATOR_TARGET} ]]; then
441441
# EESSI_ACCELERATOR_TARGET is set, so let's remove the accelerator path from $lmod_rc_file
442-
lmod_rc_file=$(echo ${lmod_rc_file} | sed "s@/accel/${EESSI_ACCELERATOR_TARGET}@@")
442+
lmod_rc_file=$(echo ${lmod_rc_file} | sed "s@/${EESSI_ACCELERATOR_TARGET}@@")
443443
echo "Path to lmodrc.lua changed to '${lmod_rc_file}'"
444444
fi
445445
lmodrc_changed=$(cat ${pr_diff} | grep '^+++' | cut -f2 -d' ' | sed 's@^[a-z]/@@g' | grep '^create_lmodrc.py$' > /dev/null; echo $?)
@@ -452,7 +452,7 @@ fi
452452
lmod_sitepackage_file="$LMOD_PACKAGE_PATH/SitePackage.lua"
453453
if [[ ! -z ${EESSI_ACCELERATOR_TARGET} ]]; then
454454
# EESSI_ACCELERATOR_TARGET is set, so let's remove the accelerator path from $lmod_sitepackage_file
455-
lmod_sitepackage_file=$(echo ${lmod_sitepackage_file} | sed "s@/accel/${EESSI_ACCELERATOR_TARGET}@@")
455+
lmod_sitepackage_file=$(echo ${lmod_sitepackage_file} | sed "s@/${EESSI_ACCELERATOR_TARGET}@@")
456456
echo "Path to SitePackage.lua changed to '${lmod_sitepackage_file}'"
457457
fi
458458
sitepackage_changed=$(cat ${pr_diff} | grep '^+++' | cut -f2 -d' ' | sed 's@^[a-z]/@@g' | grep '^create_lmodsitepackage.py$' > /dev/null; echo $?)

scripts/gpu_support/nvidia/install_cuda_and_libraries.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,14 @@ for EASYSTACK_FILE in ${TOPDIR}/easystacks/eessi-*CUDA*.yml; do
211211
required_space_in_tmpdir=$((required_space_in_tmpdir + ${base_storage_space}))
212212
fi
213213

214+
# Checking disk space on a non-existing folder returns a permission denied, but the error then seems to
215+
# incorrectly suggest there is insufficient disk space. Let's make sure this directory exists.
216+
mkdir -p ${EASYBUILD_INSTALLPATH}
217+
214218
# The install is pretty fat, you need lots of space for download/unpack/install
215219
# (~3*${base_storage_space}*1000 Bytes),
216220
# need to do a space check before we proceed
217-
avail_space=$(df --output=avail "${EESSI_SITE_SOFTWARE_PATH}"/ | tail -n 1 | awk '{print $1}')
221+
avail_space=$(df --output=avail "${EASYBUILD_INSTALLPATH}"/ | tail -n 1 | awk '{print $1}')
218222
min_disk_storage=$((3 * ${base_storage_space}))
219223
if (( avail_space < ${min_disk_storage} )); then
220224
fatal_error "Need at least $(echo "${min_disk_storage} / 1000000" | bc) GB disk space to install CUDA and other libraries under ${EESSI_SITE_SOFTWARE_PATH}, exiting now..."

0 commit comments

Comments
 (0)