diff options
| author | Joshua Bakita <bakitajoshua@gmail.com> | 2019-10-07 19:13:39 -0400 |
|---|---|---|
| committer | Joshua Bakita <bakitajoshua@gmail.com> | 2019-10-07 19:13:39 -0400 |
| commit | 386b7d3366f1359a265da207a9cafa3edf553b64 (patch) | |
| tree | c76120c2c138faed822e4ae386be6ef22a738a78 /baseline/run_baseline.sh | |
| parent | 54a3f7091a2146b29c73a6fdc4b62a5c4ad7a3d8 (diff) | |
Reorganize and commit all the modified TACLeBench code and run scripts
Diffstat (limited to 'baseline/run_baseline.sh')
| -rwxr-xr-x | baseline/run_baseline.sh | 65 |
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 | |||
| 3 | core=$1 | ||
| 4 | maxJobs=$2 | ||
| 5 | runID=$3 | ||
| 6 | tacleNames=tacleNames.txt | ||
| 7 | |||
| 8 | if [ $# -lt 3 ]; then | ||
| 9 | echo "Usage $0 <core ID> <number of iterations> <run ID> [TACLe names file]" | ||
| 10 | exit | ||
| 11 | fi | ||
| 12 | |||
| 13 | if [ $# -gt 3 ]; then | ||
| 14 | echo "Using alternate list of TACLe benchmarks from $4" | ||
| 15 | tacleNames=$4 | ||
| 16 | fi | ||
| 17 | |||
| 18 | echo "Making sure that binaries are up to date..." | ||
| 19 | while read i; do | ||
| 20 | make bin/$i | ||
| 21 | done < $tacleNames | ||
| 22 | echo "Done. Disabling real-time throttling..." | ||
| 23 | |||
| 24 | # Turn off rt throttling | ||
| 25 | echo -1 > /proc/sys/kernel/sched_rt_runtime_us | ||
| 26 | echo "Done. Redirecting all interrupts to core 0..." | ||
| 27 | |||
| 28 | # Redirect all interrupts to core 0 | ||
| 29 | i=0 | ||
| 30 | for IRQ in /proc/irq/* | ||
| 31 | do | ||
| 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 )) | ||
| 38 | done | ||
| 39 | echo "Done. Beginning benchmarks..." | ||
| 40 | |||
| 41 | # Read the names of each benchmark | ||
| 42 | j=0 | ||
| 43 | while read i; do | ||
| 44 | tacleProg[$j]=$i | ||
| 45 | j=$(( $j + 1 )) | ||
| 46 | done < $tacleNames | ||
| 47 | |||
| 48 | |||
| 49 | num_tests=$(wc -l < $tacleNames) | ||
| 50 | for (( i = 0; i < $num_tests ; i++ )) | ||
| 51 | do | ||
| 52 | chrt -r 97 taskset -c $core ./bin/${tacleProg[$i]} ${tacleProg[$i]} $maxJobs $core none none $runID 1 none | ||
| 53 | echo COMPLETE: ${tacleProg[$i]} | ||
| 54 | done | ||
| 55 | |||
| 56 | # Put smp_affinty back the way it was | ||
| 57 | i=0 | ||
| 58 | for IRQ in /proc/irq/* | ||
| 59 | do | ||
| 60 | if [ -d $IRQ ]; then | ||
| 61 | echo ${irqList[$i]} > $IRQ/smp_affinity_list | ||
| 62 | fi | ||
| 63 | i=$(( $i + 1 )) | ||
| 64 | done | ||
| 65 | |||
