From db81fd36358c0430bfc6d3ae2784b7e0958d097a Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sat, 20 Apr 2024 07:05:40 +0200 Subject: [PATCH 1/5] zen4-only {2023.06}[system] EasyBuild v4.9.1 --- .../2023.06/zen4/eessi-2023.06-eb-4.9.1-001-system.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 easystacks/software.eessi.io/2023.06/zen4/eessi-2023.06-eb-4.9.1-001-system.yml diff --git a/easystacks/software.eessi.io/2023.06/zen4/eessi-2023.06-eb-4.9.1-001-system.yml b/easystacks/software.eessi.io/2023.06/zen4/eessi-2023.06-eb-4.9.1-001-system.yml new file mode 100644 index 0000000000..c5a08b5209 --- /dev/null +++ b/easystacks/software.eessi.io/2023.06/zen4/eessi-2023.06-eb-4.9.1-001-system.yml @@ -0,0 +1,4 @@ +easyconfigs: + - EasyBuild-4.9.1.eb: + options: + from-pr: 20299 From 8cb9547b0c2b1b3bd1736b57d754fa9cad01516b Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sat, 20 Apr 2024 14:10:55 +0200 Subject: [PATCH 2/5] make sure lmod cfg files exists early in build environment --- EESSI-install-software.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index 91effe4aba..7f67b883f2 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -147,6 +147,24 @@ else mkdir -p ${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${EESSI_SOFTWARE_SUBDIR_OVERRIDE} fi +# if we run the script for the first time, e.g., to start building for a new +# stack, we need to ensure certain files are present in +# ${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${EESSI_SOFTWARE_SUBDIR_OVERRIDE} +# - .lmod/lmodrc.lua +# - .lmod/SitePackage.lua +_eessi_software_path=${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${EESSI_SOFTWARE_SUBDIR_OVERRIDE} +_lmod_cfg_dir=${_eessi_software_path}/.lmod +_lmod_rc_file=${_lmod_cfg_dir}/lmodrc.lua +if [ ! -f ${_lmod_rc_file} ]; then + command -V python3 + python3 ${TOPDIR}/create_lmodrc.py ${_eessi_software_path} +fi +_lmod_sitepackage_file=${_lmod_cfg_dir}/SitePackage.lua +if [ ! -f ${_lmod_sitepackage_file} ]; then + command -V python3 + python3 ${TOPDIR}/create_lmodrc.py ${_eessi_software_path} +fi + # Set all the EESSI environment variables (respecting $EESSI_SOFTWARE_SUBDIR_OVERRIDE) # $EESSI_SILENT - don't print any messages # $EESSI_BASIC_ENV - give a basic set of environment variables From da9f206f216c70b8559bdd002235a754125aba2d Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sat, 20 Apr 2024 14:18:58 +0200 Subject: [PATCH 3/5] use create_lmodsitepackage.py --- EESSI-install-software.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index 7f67b883f2..13e94fb72d 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -162,7 +162,7 @@ fi _lmod_sitepackage_file=${_lmod_cfg_dir}/SitePackage.lua if [ ! -f ${_lmod_sitepackage_file} ]; then command -V python3 - python3 ${TOPDIR}/create_lmodrc.py ${_eessi_software_path} + python3 ${TOPDIR}/create_lmodsitepackage.py ${_eessi_software_path} fi # Set all the EESSI environment variables (respecting $EESSI_SOFTWARE_SUBDIR_OVERRIDE) From c4cbcd8b9b6212c830e371aa3013eee8977ff776 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sat, 20 Apr 2024 14:41:02 +0200 Subject: [PATCH 4/5] skip CUDA install if no EasyBuild module is found --- EESSI-install-software.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index 13e94fb72d..2d401e40ce 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -221,10 +221,21 @@ ${TOPDIR}/install_scripts.sh --prefix ${EESSI_PREFIX} # Hardcode this for now, see if it works # TODO: We should make a nice yaml and loop over all CUDA versions in that yaml to figure out what to install # Allow skipping CUDA SDK install in e.g. CI environments +# The install_cuda... script uses EasyBuild. So, we need to check if we have EB +# or skip this step. +module_avail_out=$TMPDIR/ml.out +module avail 2>&1 | grep EasyBuild &> ${module_avail_out} +if [[ $? -eq 0 ]]; then + echo_green ">> Found an EasyBuild module" +else + echo_yellow ">> No EasyBuild module found: skipping step to install CUDA (see output in ${module_avail_out})" + export skip_cuda_install=True +fi +if if [ -z "${skip_cuda_install}" ] || [ ! "${skip_cuda_install}" ]; then ${EESSI_PREFIX}/scripts/gpu_support/nvidia/install_cuda_host_injections.sh -c 12.1.1 --accept-cuda-eula else - echo "Skipping installation of CUDA SDK in host_injections, since the --skip-cuda-install flag was passed" + echo "Skipping installation of CUDA SDK in host_injections, since the --skip-cuda-install flag was passed OR no EasyBuild module was found" fi # Install drivers in host_injections From eeb5537e4b8889cbbf183ffd17e4743961357f3c Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sat, 20 Apr 2024 14:45:17 +0200 Subject: [PATCH 5/5] remove extra if --- EESSI-install-software.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index 2d401e40ce..8a5789c2b2 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -231,7 +231,7 @@ else echo_yellow ">> No EasyBuild module found: skipping step to install CUDA (see output in ${module_avail_out})" export skip_cuda_install=True fi -if + if [ -z "${skip_cuda_install}" ] || [ ! "${skip_cuda_install}" ]; then ${EESSI_PREFIX}/scripts/gpu_support/nvidia/install_cuda_host_injections.sh -c 12.1.1 --accept-cuda-eula else