#!/bin/bash source scan-dmidecode source test-variables if [[ ! -d /usr/local/linpack ]] ; then echo "${RES_ERROR} Linpack missing in /usr/local/linpack" exit 21 fi if [[ ! -f /usr/local/linpack/runme_xeon64 ]] ; then echo "${RES_ERROR} runme_xeon64 missing in /usr/local/linpack" exit 22 fi mkdir -pv $OUTPUT_DIR/linpack MY_DATE=`date +%Y-%m-%d_%H-%M-%S` if [[ -f $OUTPUT_DIR/linpack/linpack.out ]] ; then mv -vf $OUTPUT_DIR/linpack/linpack.out \ $OUTPUT_DIR/linpack/linpack.out.old-$MY_DATE fi cd /usr/local/linpack ./runme_xeon64 | tee $OUTPUT_DIR/linpack/linpack.out RES=$? ERRNO=$! if [[ $RES != '0' ]] ; then echo "${RES_FAIL} linpack exited abnormally with error code: $BLD$ERRNO$OFF"; else echo "${RES_OK} linpack finished successfully." echo "Results in $OUTPUT_DIR/linpack/linpack.out" fi