From f42cbfa816306ff64fc9965aeb1005dd871f4091 Mon Sep 17 00:00:00 2001 From: Arif Ali Date: Wed, 10 Jun 2020 14:59:58 +0000 Subject: [PATCH] Add extra variable WRITE_OUT_FILE This allows us to not to write the output of the job to a file We have this due to the performance of writing data to the SD card But the variable is there, if you aver want to use USB disk --- scripts/CONFIG | 12 ++++++++++++ scripts/run_job.sh | 19 ++++++++++++++----- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/scripts/CONFIG b/scripts/CONFIG index 7562b0e..a03c528 100644 --- a/scripts/CONFIG +++ b/scripts/CONFIG @@ -1,9 +1,21 @@ +# +# Default variables that we want to use in all of our scripts +# export DOWNLOADS=~/Downloads export WORKDIR=~/rpi-hpl-workdir export RESULTSDIR=${WORKDIR}/results export SCRIPTSDIR=${PWD} export SERVICES="snap.lxd.daemon snap.lxd.daemon.unix.socket postfix systemd-timesyncd wpa_supplicant snapd snapd.apparmor.service systemd-resolved snapd.service snapd.socket" +# # Flags based on https://en.wikichip.org/wiki/arm_holdings/microarchitectures/cortex-a72 +# export COMMON_FLAGS="-mtune=cortex-a72" +# +# This variable masks the fact if you want to write to output file or not +# With a system that has SD card that is non-performant, then this value +# with 1 may slow the overall HPL benchmark down +# +WRITE_OUT_FILE=0 + diff --git a/scripts/run_job.sh b/scripts/run_job.sh index 20129c9..50d2ba4 100755 --- a/scripts/run_job.sh +++ b/scripts/run_job.sh @@ -12,10 +12,19 @@ sudo systemctl stop ${SERVICES} for mount in $(df -h | grep loop.*snap | awk '{print $6}'); do sudo umount $mount; done cd ${SCRIPTSDIR}/../configs -${WORKDIR}/hpl-2.3/bin/rpi4-mpich/xhpl | tee -a ${RESULTSDIR}/HPL.out.${TIMESTAMP} -echo -echo Results ... -echo +COMMAND="${WORKDIR}/hpl-2.3/bin/rpi4-mpich/xhpl" + +if [ ${WRITE_OUT_FILE} -eq 1 ] ; then + ${COMMAND} | tee -a ${RESULTSDIR}/HPL.out.${TIMESTAMP} + + echo + echo Results ... + echo + + grep WR.*17 ${RESULTSDIR}/HPL.out.${TIMESTAMP} + +else + ${COMMAND} +fi -grep WR.*17 ${RESULTSDIR}/HPL.out.${TIMESTAMP}