Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{2023.06}[system] EasyBuild v4.9.0 (for test purposes only) #219

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a0ce712
{2023.06}[system] EasyBuild v4.9.0 (for test purposes only)
truib Jan 16, 2024
b4f8de1
Merge branch 'nessi.no-2023.06' of github-trz:NorESSI/software-layer …
truib Jan 16, 2024
aee293c
Merge branch 'nessi.no-2023.06' of github-trz:NorESSI/software-layer …
truib Jan 16, 2024
3a8b44a
moved test easystack file to new directory
truib Jan 16, 2024
adf5df4
Merge branch 'nessi.no-2023.06' of github-trz:NorESSI/software-layer …
truib Jan 16, 2024
b61d423
Merge branch 'nessi.no-2023.06' of github-trz:NorESSI/software-layer …
truib Jan 17, 2024
2bd8426
Merge branch 'nessi.no-2023.06' of github-trz:NorESSI/software-layer …
truib Jan 22, 2024
a2034ed
Merge branch 'nessi.no-2023.06' of github-trz:NorESSI/software-layer …
truib Jan 22, 2024
e53dd19
attempt to use archdetect
truib Jan 22, 2024
5d8083b
print a few more messages to verify CPU detection works
truib Jan 22, 2024
89a6af5
do not set EESSI_SILENT
truib Jan 22, 2024
ca07b2c
Merge branch 'nessi.no-2023.06' of github-trz:NorESSI/software-layer …
truib Jan 22, 2024
84b4b58
Merge branch 'nessi.no-2023.06' of github-trz:NorESSI/software-layer …
truib Jan 22, 2024
5a0c0cc
attempt to fix failing CI checking for missing installations
truib Jan 22, 2024
34c12e3
Merge branch 'nessi.no-2023.06' of github-trz:NorESSI/software-layer …
truib Jan 23, 2024
a788394
Merge branch 'nessi.no-2023.06' of github-trz:NorESSI/software-layer …
truib Jan 23, 2024
20eb40e
remove obsolete test files, correct cpupath for skylake
truib Jan 23, 2024
b31d8b7
Merge branch 'nessi.no-2023.06' of github-trz:NorESSI/software-layer …
truib Jan 23, 2024
f74626d
Merge branch 'nessi.no-2023.06' of github-trz:NorESSI/software-layer …
truib Jan 23, 2024
cafb53a
define directory that contains repos cfg
truib Jan 23, 2024
932d96d
Merge branch 'nessi.no-2023.06' of github-trz:NorESSI/software-layer …
truib Jan 23, 2024
a82f163
bump eb version to 4.8.0
truib Jan 23, 2024
2c1d681
test CI against software.eessi.io and show last eb log
truib Jan 24, 2024
dcab6f2
add fuse mount for cvmfs-config
truib Jan 24, 2024
63101e7
override repo for specific task
truib Jan 24, 2024
c124baa
repo override needs to include /cvmfs/
truib Jan 24, 2024
8460e9e
small update to show more debug info
truib Jan 26, 2024
a538fde
show which pip3 is used
truib Jan 26, 2024
160bfc2
more info about pip3 run and which eb is used
truib Jan 26, 2024
1227362
add pip3 output, run eb with debug info, add retry step
truib Jan 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 45 additions & 1 deletion .github/workflows/tests_scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
export EESSI_REPOS_CFG_DIR_OVERRIDE=${PWD}/repos
./eessi_container.sh --list-repos

- name: test load_easybuild_module.sh script
- name: test load_easybuild_module.sh script with software.eessi.io
run: |
# bind current directory into container as /software-layer
export SINGULARITY_BIND="${PWD}:/software-layer"
Expand Down Expand Up @@ -79,6 +79,50 @@ jobs:

chmod u+x ${test_script}

# run wrapper script + capture & check output
out="${PWD}/eb-${EB_VERSION}.out"
export EESSI_REPOS_CFG_DIR_OVERRIDE=${PWD}/repos
export EESSI_CVMFS_REPO_OVERRIDE="/cvmfs/software.eessi.io"
./eessi_container.sh --access rw --mode run --verbose --repository EESSI /software-layer/run_in_compat_layer_env.sh /software-layer/eb-${EB_VERSION}.sh 2>&1 | tee ${out}
pattern="^This is EasyBuild ${EB_VERSION} "
grep "${pattern}" ${out} || (echo "Pattern '${pattern}' not found in output!" && exit 1)
done

- name: test load_easybuild_module.sh script
run: |
# bind current directory into container as /software-layer
export SINGULARITY_BIND="${PWD}:/software-layer"

# can't test with EasyBuild versions older than v4.5.2 when using EESSI 2023.06,
# since Python in compat layer is Python 3.11.x;
# testing with a single EasyBuild version takes a while in GitHub Actions, so stick to a single sensible version
for EB_VERSION in '4.8.0'; do
# Create script that uses load_easybuild_module.sh which we can run in compat layer environment
# note: Be careful with single vs double quotes below!
# ${EB_VERSION} should be expanded, so use double quotes;
# For statements using variables that are only defined in the script, like ${EASYBUILD_INSTALLPATH},
# use single quotes to avoid expansion while creating the script.
test_script="${PWD}/eb-${EB_VERSION}.sh"
echo '#!/bin/bash' > ${test_script}
# both $EB and $TMPDIR environment must be set, required by load_easybuild_module.sh script
echo 'export EB="eb"' >> ${test_script}
echo 'export TMPDIR=$(mktemp -d)' >> ${test_script}
# set up environment to have utility functions in place that load_easybuild_module.sh script relies on,
# along with $EESSI_* environment variables, and Lmod
echo 'ls -l /software-layer/' >> ${test_script}
echo 'source /software-layer/scripts/utils.sh' >> ${test_script}
echo 'source /software-layer/init/eessi_environment_variables' >> ${test_script}
echo 'source ${EPREFIX}/usr/share/Lmod/init/bash' >> ${test_script}
# minimal configuration for EasyBuild so we can test installation aspect of load_easybuild_module.sh script
echo "export EASYBUILD_INSTALLPATH=/tmp/eb-${EB_VERSION}" >> ${test_script}
echo 'module use ${EASYBUILD_INSTALLPATH}/modules/all' >> ${test_script}
echo '' >> ${test_script}
echo "source /software-layer/load_easybuild_module.sh ${EB_VERSION}" >> ${test_script}
echo 'module list' >> ${test_script}
echo 'eb --version' >> ${test_script}

chmod u+x ${test_script}

# run wrapper script + capture & check output
out="${PWD}/eb-${EB_VERSION}.out"
export EESSI_REPOS_CFG_DIR_OVERRIDE=${PWD}/repos
Expand Down
3 changes: 2 additions & 1 deletion EESSI-install-software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ 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
EESSI_SILENT=1 EESSI_BASIC_ENV=1 source $TOPDIR/init/eessi_environment_variables
# EESSI_SILENT=1 EESSI_BASIC_ENV=1 source $TOPDIR/init/eessi_environment_variables
EESSI_BASIC_ENV=1 source $TOPDIR/init/eessi_environment_variables

if [[ -z ${EESSI_SOFTWARE_SUBDIR} ]]; then
fatal_error "Failed to determine software subdirectory?!"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
easyconfigs:
- EasyBuild-4.9.0.eb:
options:
from-pr: 19464
1 change: 1 addition & 0 deletions eessi_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ declare -a EESSI_FUSE_MOUNTS=()

# always mount cvmfs-config repo (to get access to software.eessi.io)
# Commented out intentionally EESSI_FUSE_MOUNTS+=("--fusemount" "container:cvmfs2 cvmfs-config.cern.ch /cvmfs/cvmfs-config.cern.ch")
EESSI_FUSE_MOUNTS+=("--fusemount" "container:cvmfs2 cvmfs-config.cern.ch /cvmfs/cvmfs-config.cern.ch")

if [[ "${ACCESS}" == "ro" ]]; then
export EESSI_READONLY="container:cvmfs2 ${repo_name} /cvmfs/${repo_name}"
Expand Down
27 changes: 25 additions & 2 deletions load_easybuild_module.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,15 @@ else
EB_TMPDIR=${TMPDIR}/ebtmp
echo ">> Temporary installation (in ${EB_TMPDIR})..."
pip_install_out=${TMPDIR}/pip_install.out
which pip3
pip3 install --prefix ${EB_TMPDIR} easybuild &> ${pip_install_out}
if [[ $? -ne 0 ]]; then
echo "pip3 installing easybuild failed; see command output below"
cat ${pip_install_out}
else
echo "pip3 installing easybuild succeeded; see command output below"
cat ${pip_install_out}
fi

# keep track of original $PATH and $PYTHONPATH values, so we can restore them
ORIG_PATH=${PATH}
Expand All @@ -67,8 +75,23 @@ else
eb_install_out=${TMPDIR}/eb_install.out
ok_msg="Latest EasyBuild release installed, let's go!"
fail_msg="Installing latest EasyBuild release failed, that's not good... (output: ${eb_install_out})"
${EB} --install-latest-eb-release 2>&1 | tee ${eb_install_out}
check_exit_code $? "${ok_msg}" "${fail_msg}"
which ${EB}
${EB} --debug --install-latest-eb-release 2>&1 | tee ${eb_install_out}
exit_code=$?
if [[ $exit_code -ne 0 ]]; then
# show last log
echo "show last log: cat $(${EB} --last-log)"
cat $(${EB} --last-log)

# retry: wait a minute, then rerun command
date
SLEEP=60
echo "first attempt failed, retrying it after waiting $SLEEP seconds"
sleep $SLEEP
date
${EB} --debug --install-latest-eb-release 2>&1 | tee -a ${eb_install_out}
fi
check_exit_code ${exit_code} "${ok_msg}" "${fail_msg}"

# maybe the module obtained with --install-latest-eb-release is exactly the EasyBuild version we wanted?
IGNORE_CACHE=''
Expand Down
Loading