Sherman-Morrison/tests/run_test.sh
François Coppens 3ee4d3b56d - Added a small 3x3 example that will always become singular regardles the order of the applied updates. This example is added to test Maponi A3 augmented with Slagel-splitting.
- Slagel-splitting in Maponi A3 is now working. A thourough analysis on the QMC=Chem datasets still has te be done.
- Acceptance tollerance  in 'test_h5' on the residuals can be set at runtime now.
2021-05-05 11:59:00 +02:00

43 lines
951 B
Bash
Executable File

#!/usr/bin/env bash
## IMPORTANT: start cycle will always be 1 because of the intention of this
## script and the way it is written now. In fact, var. $START is not used at
## the moment.
## Call: $ ./run_test.sh <{sm1|sm2|sm3|maponia3}> <start cycle> <stop cycle>
## Example: ./run_test.sh sm2 1 500
TEST=test_h5
ALGO=$1
START=$2
STOP=$3
BLOCKSIZE=329
TOLERANCE=1e-3
BLOCKS=$((STOP / BLOCKSIZE))
LEFT=$((STOP % BLOCKSIZE))
if [[ $LEFT -ne 0 ]]
then
BSTART=0
BSTOP=0
LAST=0
for ((i=1; i<=$BLOCKS; i++))
do
BSTART=$(((i-1)*BLOCKSIZE+1))
BSTOP=$((i*BLOCKSIZE-1))
$TEST $ALGO $BSTART $BSTOP $TOLERANCE
LAST=$i
done
LSTART=$((LAST*BLOCKSIZE+1))
LSTOP=$((LSTART+LEFT-1))
$TEST $ALGO $LSTART $LSTOP $TOLERANCE
else
for ((i=1; i<=$BLOCKS; i++))
do
BSTART=$(((i-1)*BLOCKSIZE+1))
BSTOP=$((i*BLOCKSIZE-1))
$TEST $ALGO $BSTART $BSTOP $TOLERANCE
done
fi