summaryrefslogtreecommitdiffstats
path: root/SD-VBS/benchmarks/sift/data/sqcif/expected.m
blob: 140643b72d8b2ada200ce2d9e3a2b82c7ce72435 (plain) (blame)
1
2
3
183.000403	51.001171	55.999927	79.999487	87.000171	88.000835	73.999127	57.999392	67.000131	44.000999	74.001196	26.999298	43.999218	72.001323	8.998266	17.001107	31.999034	40.995249	19.998951	20.003080	35.998479	13.001442	35.001360	28.997337	25.999158	31.000511	
150.000063	49.999426	87.000198	72.999307	51.999937	88.000170	87.000970	12.000201	18.999405	48.000347	66.000128	69.000323	49.999689	27.000191	41.000470	9.000107	33.999173	10.999689	19.999543	35.999525	20.998161	18.998984	14.001576	20.998481	28.000519	43.994983	
1.000056	-0.000244	0.000069	-0.001128	0.000711	0.000815	1.004050	2.000387	2.001282	1.000891	1.001405	2.000524	1.999328	2.001783	0.000885	0.000626	-0.001537	0.004831	0.999517	1.000593	1.001016	-0.000170	-0.000697	0.997790	2.001555	1.997893	
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152
#!/bin/bash

core=$1
maxJobs=$2
userRunID=$3
tacleNames=tacleNames.txt

if [ $# -lt 3 ]; then
    echo "Usage $0 <core ID> <number of iterations> <run ID> [TACLe names file] [--contend]"
    exit
fi

if [ $# -gt 3 ]; then
    echo "Using alternate list of TACLe benchmarks from $4"
    tacleNames=$4
fi

if [ "$EUID" -ne 0 ]
then
    echo "You need to be root to enable interrupt isolation and real-time execution!"
    exit
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 2> /dev/null > $IRQ/smp_affinity_list
    fi
    i=$(( $i + 1 ))
done

# Read the names of each benchmark
j=0
while read i; do
    tacleProg[$j]=$i
    j=$(( $j + 1 ))
done < $tacleNames

echo "Done. Checking for wbinvd module..."
if [[ ! -f "/proc/wbinvd" ]]; then
    echo "ERROR: wbinvd module not loaded. Exiting..."
    exit
fi

# Enable L3 isolation
echo "Done. Enabling L3 isolation..."
mount -t resctrl resctrl /sys/fs/resctrl
mkdir -p /sys/fs/resctrl/benchmarks
echo $1 > /sys/fs/resctrl/benchmarks/cpus_list
# Reset global bandwith control and remove L3 from global
echo "L3:0=ffff;1=ffff;2=ffff;3=0000" > /sys/fs/resctrl/schemata
echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/schemata
# Alloc L3 to benchmark
echo "L3:0=0000;1=0000;2=0000;3=00ff" > /sys/fs/resctrl/benchmarks/schemata
echo "MB:0=2048;1=2048;2=2048;3=2048" > /sys/fs/resctrl/benchmarks/schemata
echo "Done. Verifying configuration with user..."

# Generate file name string
# We append to this as we parse the environment settings
runID=$(date +"%b%d-%H")

# Confirm configuration with user
echo "=== Global Config ==="
cat /sys/fs/resctrl/schemata
echo "=== Core $1 Config ==="
cat /sys/fs/resctrl/benchmarks/cpus_list
cat /sys/fs/resctrl/benchmarks/schemata
if [[ $5 == "--contend" ]]; then
    if [[ ! -f "/playpen/mc2/imx6q-thrasher/thrasher" ]]; then
        echo "ERROR: thrasher binary not fonud. Exiting..."
        exit
    fi
    echo "Will run 6 contending tasks"
    runID=$runID-c
else
    runID=$runID-xc
fi
if uname -a | grep -q "mc2"; then
    echo "MC^2 Autodetected. NOT SUPPORTED. Exiting..."
    exit
else
    echo "MC^2 not detected. 50% L3 allocation enabled."
    runID=$runID-i3
fi
if pwd | grep -qi dis; then
    echo "Autodetected DIS. Will use script-level looping."
fi
echo "Results will be saved as $runID-$userRunID.txt"
echo "Press enter to confirm environment, Ctrl-C to exit..."
read

# Start contending tasks
if [[ $5 == "--contend" ]]; then
    echo "Done. Starting 6 contending tasks..."
    # Run two contending tasks on each other CCX
    taskset -c 1 /playpen/mc2/imx6q-thrasher/thrasher &
    taskset -c 2 /playpen/mc2/imx6q-thrasher/thrasher &
    taskset -c 5 /playpen/mc2/imx6q-thrasher/thrasher &
    taskset -c 6 /playpen/mc2/imx6q-thrasher/thrasher &
    taskset -c 9 /playpen/mc2/imx6q-thrasher/thrasher &
    taskset -c 10 /playpen/mc2/imx6q-thrasher/thrasher &
fi
sleep 1 # Wait for contending tasks to start
echo "Done. Beginning benchmarks..."

num_tests=$(wc -l < $tacleNames)
for (( i = 0; i < $num_tests ; i++ ))
do
    # If using DIS, we have to iterate in the script as DIS won't do it for us
    pwd | grep -qi dis
    iters=$(python3 -c "print(int(not "$?")*("$maxJobs"-1))")
    for ((k=0;k<=iters;k++)); do
        # Check if we're using LITMUS^RT or not
        if [[ -f source/extra.h ]] && grep -q "#define LITMUS 1" source/extra.h; then
            ./bin/${tacleProg[$i]} ${tacleProg[$i]} $maxJobs $core $runID-$userRunID 1
        else
            # Interleave memory allocations between all nodes (only 1 node w/out MC^2)
            chrt -r 97 numactl --interleave=all taskset -c $core ./bin/${tacleProg[$i]} ${tacleProg[$i]} $maxJobs $core $runID-$userRunID 1
        fi
    done
    echo COMPLETE: ${tacleProg[$i]}
done

# End contending tasks
if [[ $5 == "--contend" ]]; then
    killall thrasher
fi

# Put smp_affinty back the way it was
i=0
for IRQ in /proc/irq/*
do
    if [ -d $IRQ ]; then
        echo ${irqList[$i]} 2> /dev/null > $IRQ/smp_affinity_list
    fi
    i=$(( $i + 1 ))
done