From 386b7d3366f1359a265da207a9cafa3edf553b64 Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Mon, 7 Oct 2019 19:13:39 -0400 Subject: Reorganize and commit all the modified TACLeBench code and run scripts --- all_pairs/run_all_pairs.sh | 77 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100755 all_pairs/run_all_pairs.sh (limited to 'all_pairs/run_all_pairs.sh') diff --git a/all_pairs/run_all_pairs.sh b/all_pairs/run_all_pairs.sh new file mode 100755 index 0000000..d48f211 --- /dev/null +++ b/all_pairs/run_all_pairs.sh @@ -0,0 +1,77 @@ +#!/bin/bash + +firstCore=$1 +secondCore=$2 +maxJobs=$3 +runID=$4 +tacleNames=tacleNames.txt + +if [ $# -lt 4 ]; then + echo "Usage $0 [TACLe names file]" + exit +fi + +if [ $# -gt 4 ]; then + echo "Using alternate list of TACLe benchmarks from $5" + tacleNames=$5 +fi + +echo "Making sure that binaries are up to date..." +while read i; do + make bin/$i +done < $tacleNames +echo "Done. Disabling real-time throttling..." + +# Turn off rt throttling +echo -1 > /proc/sys/kernel/sched_rt_runtime_us +echo "Done. Redirecting all interrupts to core 0..." + +# Redirect all interrupts to core 0 +i=0 +for IRQ in /proc/irq/* +do + # Skip default_smp_affinity + if [ -d $IRQ ]; then + irqList[$i]=$(cat $IRQ/smp_affinity_list) + echo 0 > $IRQ/smp_affinity_list + fi + i=$(( $i + 1 )) +done +echo "Done. Beginning benchmarks..." + +# Read the names of each benchmark +j=0 +while read i; do + tacleProg[$j]=$i + j=$(( $j + 1 )) +done < $tacleNames + + +num_tests=$(wc -l < $tacleNames) +for (( i = 0; i < $num_tests ; i++ )) +do + for (( j = $i; j < $num_tests ; j++ )) #loop through programs + do + chrt -r 97 taskset -c $firstCore ./bin/${tacleProg[$i]} ${tacleProg[$i]} $maxJobs $firstCore $secondCore ${tacleProg[$j]} $runID"-A" 1 & \ + chrt -r 97 taskset -c $secondCore ./bin/${tacleProg[$j]} ${tacleProg[$j]} $maxJobs $secondCore $firstCore ${tacleProg[$i]} $runID"-B" 2 & + wait + echo ${tacleProg[$i]} ${tacleProg[$j]} + done + echo COMPLETE: ${tacleProg[$i]} +done + +# Remove semaphores from system +# Leaving them won't hurt these tests, but would be messy and is bad practice +# TODO: Do this directly in the benchmarks. They should clean up after themselves +./bin/cleanupSemaphores + +# Put smp_affinty back the way it was +i=0 +for IRQ in /proc/irq/* +do + if [ -d $IRQ ]; then + echo ${irqList[$i]} > $IRQ/smp_affinity_list + fi + i=$(( $i + 1 )) +done + -- cgit v1.2.2