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
This commit is contained in:
Arif Ali 2020-06-10 14:59:58 +00:00
parent 2bee672d92
commit f42cbfa816
2 changed files with 26 additions and 5 deletions

View File

@ -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

View File

@ -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}