raspberrypi-hpl/scripts/run_job.sh
Arif Ali f42cbfa816 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
2020-06-10 14:59:58 +00:00

31 lines
536 B
Bash
Executable File

#!/bin/bash
. CONFIG
mkdir -p ${RESULTSDIR}
TIMESTAMP=$(date +%s)
# stop unnecessary services
sudo systemctl stop ${SERVICES}
# Unmount all the snap loop devices
for mount in $(df -h | grep loop.*snap | awk '{print $6}'); do sudo umount $mount; done
cd ${SCRIPTSDIR}/../configs
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