-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFDT-range.sh
executable file
·52 lines (42 loc) · 1.1 KB
/
FDT-range.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
#####################################################
### VESPo testing range of degrees with given tasks
### Copyright(c) 2023 Jean-Guillaume Dumas
#####################################################
START=$1
ENDLO=$2
if [ $# -lt 3 ]; then
NBTASKS=4
else
NBTASKS=$3
fi
if [ $# -lt 4 ]; then
THREADS=${NBTASKS}
else
THREADS=$4
fi
SECU=2048
ITER=2
LINFIL=/tmp/bench_range_vespo_P254.txt
SIZLD=$((ENDLO - START + 1))
PINIT=0
if [ -e ${LINFIL} ]
then
PINIT=`grep VAUDIT ${LINFIL} | grep OK | wc -l`
fi
PCURR=${PINIT}
PASSED=$((PCURR-PINIT))
PERCEN=0
TOTALT=$((SIZLD * ITER))
i=${START}
while [ $i -le $ENDLO ]
do
echo -ne "##### Passed: \e[32m${PERCEN}%\e[0m, OMP_NUM_THREADS=${THREADS} ./vespo_bench $i ${SECU} ${ITER} ${NBTASKS}\r"
# Benchmaring
OMP_NUM_THREADS=${THREADS} ./vespo_bench $i ${SECU} ${ITER} ${NBTASKS} &>> ${LINFIL}
i=$(( $i + 1 ))
PCURR=`grep VAUDIT ${LINFIL} | grep OK | wc -l`
PASSED=$((PCURR-PINIT))
PERCEN=$(( (100 * PASSED) / TOTALT ))
done
echo -ne "##### Passed: \e[32m${PERCEN}%\e[0m \n"