From 30e6b4765a310a1589cb56683dcbb4a0e8caee28 Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Thu, 5 Nov 2020 20:55:02 -0500 Subject: Small scripting cleanups - Add a unified runner script for DIS - Remove explicit case study termination script (do `kill ${cat pids.txt}` instead) - Auto-create bin directories for TACLe - Add the python cache directory to the gitignore - Tweak input path representation in benchmark name files --- .gitignore | 1 + all_pairs/Makefile | 1 + baseline/Makefile | 1 + dis/dis2MbInNames.txt | 12 ++++----- dis/disPairs2MbInNames.txt | 12 ++++----- kill.py | 5 ---- run_all_dis.sh | 64 ++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 79 insertions(+), 17 deletions(-) delete mode 100644 kill.py create mode 100755 run_all_dis.sh diff --git a/.gitignore b/.gitignore index b7e90f4..b82afb8 100644 --- a/.gitignore +++ b/.gitignore @@ -65,3 +65,4 @@ # Ignore misc temporary files **/.gdb_history *.swp +**/__pycache__ diff --git a/all_pairs/Makefile b/all_pairs/Makefile index 592db70..6405df0 100644 --- a/all_pairs/Makefile +++ b/all_pairs/Makefile @@ -3,6 +3,7 @@ CC ?= gcc override CFLAGS += -pthread -O2 -I.. -DPAIRED LDFLAGS += -lrt COMMON = ../extra.h +$(shell mkdir -p bin) # Handle cases where we're also profiling with the MMDC on the i.MX6Q ifneq ($(shell grep "define MMDC 1" ../extra.h),) diff --git a/baseline/Makefile b/baseline/Makefile index a929bc6..dad45a0 100644 --- a/baseline/Makefile +++ b/baseline/Makefile @@ -3,6 +3,7 @@ CC ?= gcc override CFLAGS = -pthread -O2 -I.. LDFLAGS = -lrt COMMON = ../extra.h +$(shell mkdir -p bin) # Handle cases where we're also profiling with the MMDC on the i.MX6Q ifneq ($(shell grep "define MMDC 1" ../extra.h),) diff --git a/dis/dis2MbInNames.txt b/dis/dis2MbInNames.txt index 00e6a22..9f35401 100644 --- a/dis/dis2MbInNames.txt +++ b/dis/dis2MbInNames.txt @@ -1,6 +1,6 @@ -field ./gen_input.py field inputs/Field/in0 2097152 -matrix ./gen_input.py matrix inputs/Matrix/in0 2097152 -neighborhood ./gen_input.py neighborhood inputs/Neighborhood/in0 2097152 -pointer ./gen_input.py pointer inputs/Pointer/in0 2097152 -transitive ./gen_input.py transitive inputs/Transitive/in0 2097152 -update ./gen_input.py update inputs/Update/in0 2097152 +field ./gen_input.py field ./inputs/Field/in0 2097152 +matrix ./gen_input.py matrix ./inputs/Matrix/in0 2097152 +neighborhood ./gen_input.py neighborhood ./inputs/Neighborhood/in0 2097152 +pointer ./gen_input.py pointer ./inputs/Pointer/in0 2097152 +transitive ./gen_input.py transitive ./inputs/Transitive/in0 2097152 +update ./gen_input.py update ./inputs/Update/in0 2097152 diff --git a/dis/disPairs2MbInNames.txt b/dis/disPairs2MbInNames.txt index a45ead4..1aeabf6 100644 --- a/dis/disPairs2MbInNames.txt +++ b/dis/disPairs2MbInNames.txt @@ -1,6 +1,6 @@ -field_all ./gen_input.py field inputs/Field/in0 2097152 -matrix_all ./gen_input.py matrix inputs/Matrix/in0 2097152 -neighborhood_all ./gen_input.py neighborhood inputs/Neighborhood/in0 2097152 -pointer_all ./gen_input.py pointer inputs/Pointer/in0 2097152 -transitive_all ./gen_input.py transitive inputs/Transitive/in0 2097152 -update_all ./gen_input.py update inputs/Update/in0 2097152 +field_all ./gen_input.py field ./inputs/Field/in0 2097152 +matrix_all ./gen_input.py matrix ./inputs/Matrix/in0 2097152 +neighborhood_all ./gen_input.py neighborhood ./inputs/Neighborhood/in0 2097152 +pointer_all ./gen_input.py pointer ./inputs/Pointer/in0 2097152 +transitive_all ./gen_input.py transitive ./inputs/Transitive/in0 2097152 +update_all ./gen_input.py update ./inputs/Update/in0 2097152 diff --git a/kill.py b/kill.py deleted file mode 100644 index acb236e..0000000 --- a/kill.py +++ /dev/null @@ -1,5 +0,0 @@ -import os - -with open("./pids.txt", "r") as f: - for line in f: - os.system("sudo kill " + line) diff --git a/run_all_dis.sh b/run_all_dis.sh new file mode 100755 index 0000000..588538d --- /dev/null +++ b/run_all_dis.sh @@ -0,0 +1,64 @@ +#!/bin/bash +# Copyright 2020 Joshua Bakita +# Runs DIS in every configuration needed +# for the paper and schedulability studies + +maxJobs=$1 +runID=$2 + +if [ $# -lt 2 ]; then + echo "Usage $0 " + exit +fi +if [[ "$EUID" != 0 ]]; then + echo "You need to be root to enable spatial isolation!" + exit +fi +date + +# Run the pairs baseline and some comparisons to examine the effect of less cache +echo "Building benchmarks in unpaired configuration..." +cd dis +make baseline -j30 > /dev/null # Suppress noisy output +echo "Done. Running experiments..." +# Full L3, full L2 - xi is the baseline for the pairs +baseXI=dis/$(date +"%b%d-%H")-c-xi-$runID.txt +echo "" | ../run_bench.sh -m base -p 15 -l $maxJobs -b dis2MbInNames.txt -B -I xi $runID +# Half L3, full L2 - i3 sees effect of half L3 +baseI3=dis/$(date +"%b%d-%H")-c-i3-$runID.txt +echo "" | ../run_bench.sh -m base -p 15 -l $maxJobs -b dis2MbInNames.txt -B -I i3 $runID +# Half L3, half L2 - additional effect of half L2 +baseI=dis/$(date +"%b%d-%H")-c-i-$runID.txt +echo "" | ../run_bench.sh -m base -p 15 -l $maxJobs -b dis2MbInNames.txt -B -I i $runID +date + +# Run the Level-C pairs +pairC=dis/$(date +"%b%d-%H")-c-xi-async-$runID.txt +echo "" | ../run_bench.sh -m pair -p 15 -P 31 -l $maxJobs -b dis2MbInNames.txt -B -I xi -A $runID +date + +# Run the Level-A/-B pairs +echo "Building benchmarks in paired configuration..." +make pairs -j30 > /dev/null # Suppress noisy output +echo "Done. Continuing experiments..." +# No cache isolation +pairXI=dis/$(date +"%b%d-%H")-c-xi-$runID"-A.txt and -B.txt" +echo "" | ../run_bench.sh -m pair -p 15 -P 31 -l $maxJobs -b disPairs2MbInNames.txt -B -I xi $runID +# Shared L2, split L3 +pairI3=dis/$(date +"%b%d-%H")-c-i3-$runID"-A.txt and -B.txt" +echo "" | ../run_bench.sh -m pair -p 15 -P 31 -l $maxJobs -b disPairs2MbInNames.txt -B -I i3 $runID +# Split L2, split L3 +pairI=dis/$(date +"%b%d-%H")-c-i-$runID"-A.txt and -B.txt" +echo "" | ../run_bench.sh -m pair -p 15 -P 31 -l $maxJobs -b disPairs2MbInNames.txt -B -I i $runID +date + +echo "==== DONE ====" +echo "Results are in:" +echo "- $baseXI" +echo "- $baseI3" +echo "- $baseI" +echo "- $pairXI" +echo "- $pairI3" +echo "- $pairI" +echo "- $pairC" + -- cgit v1.2.2