Page MenuHomec4science

runtests.bgp
No OneTemporary

File Metadata

Created
Fri, Jun 21, 05:41

runtests.bgp

#!/bin/sh
part=$1
part=${part:?"missing (R00-M0-00 for example)"}
d=`pwd`
b=$d/../bin
w=/bgscratch/$USER
cd $w
rm -f *.h5
cp -p $d/*.out ./
cp -p $d/*.in ./
EXEC="mpirun -nofree -mode VN -np 1 -cwd $w -partition $part -exe"
for e in $b/*; do
c=$(basename $e);
if [ -f $c.out ]; then #run only if reference output file exists.
echo -ne "\n*** Running $c ... "
temp=$c.$$
if [ -f $c.in ]; then
$EXEC $e < $c.in | grep -v 'time (s)' | grep -v 'Memory used' > $temp
else
$EXEC $e | grep -v 'time (s)' | grep -v 'Memory used' > $temp
fi
diff -w $c.out $temp >/dev/null
stat=$?
if [ $stat -eq 1 ]; then
echo "test failed! ***"
echo "*** Diff of $c.out $temp ***"
diff -w $c.out $temp
else
echo "test passed! ***"
fi
rm $temp
fi
done

Event Timeline