summaryrefslogtreecommitdiffstats
path: root/baseline/run_baseline.sh
diff options
context:
space:
mode:
Diffstat (limited to 'baseline/run_baseline.sh')
-rwxr-xr-xbaseline/run_baseline.sh65
1 files changed, 65 insertions, 0 deletions
diff --git a/baseline/run_baseline.sh b/baseline/run_baseline.sh
new file mode 100755
index 0000000..7fdc2aa
--- /dev/null
+++ b/baseline/run_baseline.sh
@@ -0,0 +1,65 @@
1#!/bin/bash
2
3core=$1
4maxJobs=$2
5runID=$3
6tacleNames=tacleNames.txt
7
8if [ $# -lt 3 ]; then
9 echo "Usage $0 <core ID> <number of iterations> <run ID> [TACLe names file]"
10 exit
11fi
12
13if [ $# -gt 3 ]; then
14 echo "Using alternate list of TACLe benchmarks from $4"
15 tacleNames=$4
16fi
17
18echo "Making sure that binaries are up to date..."
19while read i; do
20 make bin/$i
21done < $tacleNames
22echo "Done. Disabling real-time throttling..."
23
24# Turn off rt throttling
25echo -1 > /proc/sys/kernel/sched_rt_runtime_us
26echo "Done. Redirecting all interrupts to core 0..."
27
28# Redirect all interrupts to core 0
29i=0
30for IRQ in /proc/irq/*
31do
32 # Skip default_smp_affinity
33 if [ -d $IRQ ]; then
34 irqList[$i]=$(cat $IRQ/smp_affinity_list)
35 echo 0 > $IRQ/smp_affinity_list
36 fi
37 i=$(( $i + 1 ))
38done
39echo "Done. Beginning benchmarks..."
40
41# Read the names of each benchmark
42j=0
43while read i; do
44 tacleProg[$j]=$i
45 j=$(( $j + 1 ))
46done < $tacleNames
47
48
49num_tests=$(wc -l < $tacleNames)
50for (( i = 0; i < $num_tests ; i++ ))
51do
52 chrt -r 97 taskset -c $core ./bin/${tacleProg[$i]} ${tacleProg[$i]} $maxJobs $core none none $runID 1 none
53 echo COMPLETE: ${tacleProg[$i]}
54done
55
56# Put smp_affinty back the way it was
57i=0
58for IRQ in /proc/irq/*
59do
60 if [ -d $IRQ ]; then
61 echo ${irqList[$i]} > $IRQ/smp_affinity_list
62 fi
63 i=$(( $i + 1 ))
64done
65