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

Report build progress #94

Open
wants to merge 7 commits into
base: nessi.no-2022.11-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions EESSI-pilot-install-software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ esac
echo "REQ_EB_VERSION=${REQ_EB_VERSION}"
module avail 2>&1 | grep -i easybuild

export JOB_PROGRESS_FILE="_bot_job${SLURM_JOB_ID}.progress"

echo ">> Checking for EasyBuild module..."
ml_av_easybuild_out=$TMPDIR/ml_av_easybuild.out
module avail 2>&1 | grep -i easybuild/${REQ_EB_VERSION} &> ${ml_av_easybuild_out}
Expand Down Expand Up @@ -287,6 +289,8 @@ fail_msg="Installation of Qt5 failed, that's frustrating..."
$EB Qt5-5.14.1-GCCcore-9.3.0.eb --robot --disable-cleanup-tmpdir
check_exit_code $? "${ok_msg}" "${fail_msg}"

exit 0

# skip test step when installing SciPy-bundle on aarch64,
# to dance around problem with broken numpy tests;
# cfr. https://github.com/easybuilders/easybuild-easyconfigs/issues/11959
Expand Down
20 changes: 13 additions & 7 deletions bot/check-result.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,45 +82,51 @@ job_dir=${PWD}
[[ ${VERBOSE} -ne 0 ]] && echo ">> analysing job in directory ${job_dir}"

GP_slurm_out="slurm-${SLURM_JOB_ID}.out"
[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for job output file(s) matching '"${GP_slurm_out}"'"
job_out=$(ls ${job_dir} | grep "${GP_slurm_out}")
[[ $? -eq 0 ]] && SLURM=1 || SLURM=0
# have to be careful to not add searched for pattern into slurm out file
[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for job output file(s) matching '"${GP_slurm_out}"'"
[[ ${VERBOSE} -ne 0 ]] && echo " found slurm output file '"${job_out}"'"

GP_error='ERROR: '
[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_error}"'"
grep_out=$(grep "${GP_error}" ${job_dir}/${job_out})
[[ $? -eq 0 ]] && ERROR=1 || ERROR=0
# have to be careful to not add searched for pattern into slurm out file
[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_error}"'"
[[ ${VERBOSE} -ne 0 ]] && echo "${grep_out}"

GP_failed='FAILED: '
[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_failed}"'"
grep_out=$(grep "${GP_failed}" ${job_dir}/${job_out})
[[ $? -eq 0 ]] && FAILED=1 || FAILED=0
# have to be careful to not add searched for pattern into slurm out file
[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_failed}"'"
[[ ${VERBOSE} -ne 0 ]] && echo "${grep_out}"

GP_req_missing=' required modules missing:'
[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_req_missing}"'"
grep_out=$(grep "${GP_req_missing}" ${job_dir}/${job_out})
[[ $? -eq 0 ]] && MISSING=1 || MISSING=0
# have to be careful to not add searched for pattern into slurm out file
[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_req_missing}"'"
[[ ${VERBOSE} -ne 0 ]] && echo "${grep_out}"

GP_no_missing='No missing modules!'
[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_no_missing}"'"
grep_out=$(grep "${GP_no_missing}" ${job_dir}/${job_out})
[[ $? -eq 0 ]] && NO_MISSING=1 || NO_MISSING=0
# have to be careful to not add searched for pattern into slurm out file
[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_no_missing}"'"
[[ ${VERBOSE} -ne 0 ]] && echo "${grep_out}"

GP_tgz_created="tar.gz created!"
[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_tgz_created}"'"
grep_out=$(grep "${GP_tgz_created}" ${job_dir}/${job_out})
TARBALL=
grep_out=$(grep "${GP_tgz_created}" ${job_dir}/${job_out})
if [[ $? -eq 0 ]]; then
TGZ=1
TARBALL=$(echo ${grep_out} | sed -e 's@^.*\(eessi[^/ ]*\) .*$@\1@')
else
TGZ=0
fi
# have to be careful to not add searched for pattern into slurm out file
[[ ${VERBOSE} -ne 0 ]] && echo ">> searching for '"${GP_tgz_created}"'"
[[ ${VERBOSE} -ne 0 ]] && echo "${grep_out}"

[[ ${VERBOSE} -ne 0 ]] && echo "SUMMARY: ${job_dir}/${job_out}"
Expand Down
6 changes: 6 additions & 0 deletions eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ def parse_hook(ec, *args, **kwargs):
# determine path to Prefix installation in compat layer via $EPREFIX
eprefix = get_eessi_envvar('EPREFIX')

# write name of currently processed ec to _bot_jobJOBID.progress
job_progress_file = os.getenv('JOB_PROGRESS_FILE')
if job_progress_file:
with open(job_progress_file, "w") as jpf:
jpf.write(f"[PROGRESS]\nsummary = {ec.filename()}\n")

if ec.name in PARSE_HOOKS:
PARSE_HOOKS[ec.name](ec, eprefix)

Expand Down