Sherman-Morrison/tests/run_test.sh
Francois Coppens c2f643ad8f - Updated cleaning target in Makefile
- Updated gitignore
- Added python script to compute basic statistical observables from testruns
- Added test bash script to automate test_h5: the cycles in the dataset are not continues and test_h5 crashes if a cycle number is not present in the dataset.
- Added common threshold for all 3 standard SM algos.
2021-04-09 17:23:14 +02:00

42 lines
903 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
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
LAST=$i
done
LSTART=$((LAST*BLOCKSIZE+1))
LSTOP=$((LSTART+LEFT-1))
$TEST $ALGO $LSTART $LSTOP
else
for ((i=1; i<=$BLOCKS; i++))
do
BSTART=$(((i-1)*BLOCKSIZE+1))
BSTOP=$((i*BLOCKSIZE-1))
$TEST $ALGO $BSTART $BSTOP
done
fi