Skip to content

Commit 0313b30

Browse files
author
Caspar van Leeuwen
committed
Let's make sure the EASYBUILD_INSTALLPATH is used for the disk space check. Also, make sure that dir exists to avoid strange errors that say you're out of disk space, while actually, the dir just didn't exist
1 parent 99c82b5 commit 0313b30

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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)