diff options
author | Joshua Bakita <jbakita@cs.unc.edu> | 2020-11-05 20:55:02 -0500 |
---|---|---|
committer | Joshua Bakita <jbakita@cs.unc.edu> | 2020-11-05 20:55:02 -0500 |
commit | 30e6b4765a310a1589cb56683dcbb4a0e8caee28 (patch) | |
tree | 4ea1d80af0fcbce4506cac2aa099e4e3b42b4d2c | |
parent | 47da00d019b27772cb6009a07ad3fc52aaf2b15f (diff) |
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
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | all_pairs/Makefile | 1 | ||||
-rw-r--r-- | baseline/Makefile | 1 | ||||
-rw-r--r-- | dis/dis2MbInNames.txt | 12 | ||||
-rw-r--r-- | dis/disPairs2MbInNames.txt | 12 | ||||
-rw-r--r-- | kill.py | 5 | ||||
-rwxr-xr-x | run_all_dis.sh | 64 |
7 files changed, 79 insertions, 17 deletions
@@ -65,3 +65,4 @@ | |||
65 | # Ignore misc temporary files | 65 | # Ignore misc temporary files |
66 | **/.gdb_history | 66 | **/.gdb_history |
67 | *.swp | 67 | *.swp |
68 | **/__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 | |||
3 | override CFLAGS += -pthread -O2 -I.. -DPAIRED | 3 | override CFLAGS += -pthread -O2 -I.. -DPAIRED |
4 | LDFLAGS += -lrt | 4 | LDFLAGS += -lrt |
5 | COMMON = ../extra.h | 5 | COMMON = ../extra.h |
6 | $(shell mkdir -p bin) | ||
6 | 7 | ||
7 | # Handle cases where we're also profiling with the MMDC on the i.MX6Q | 8 | # Handle cases where we're also profiling with the MMDC on the i.MX6Q |
8 | ifneq ($(shell grep "define MMDC 1" ../extra.h),) | 9 | 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 | |||
3 | override CFLAGS = -pthread -O2 -I.. | 3 | override CFLAGS = -pthread -O2 -I.. |
4 | LDFLAGS = -lrt | 4 | LDFLAGS = -lrt |
5 | COMMON = ../extra.h | 5 | COMMON = ../extra.h |
6 | $(shell mkdir -p bin) | ||
6 | 7 | ||
7 | # Handle cases where we're also profiling with the MMDC on the i.MX6Q | 8 | # Handle cases where we're also profiling with the MMDC on the i.MX6Q |
8 | ifneq ($(shell grep "define MMDC 1" ../extra.h),) | 9 | 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 @@ | |||
1 | field ./gen_input.py field inputs/Field/in0 2097152 | 1 | field ./gen_input.py field ./inputs/Field/in0 2097152 |
2 | matrix ./gen_input.py matrix inputs/Matrix/in0 2097152 | 2 | matrix ./gen_input.py matrix ./inputs/Matrix/in0 2097152 |
3 | neighborhood ./gen_input.py neighborhood inputs/Neighborhood/in0 2097152 | 3 | neighborhood ./gen_input.py neighborhood ./inputs/Neighborhood/in0 2097152 |
4 | pointer ./gen_input.py pointer inputs/Pointer/in0 2097152 | 4 | pointer ./gen_input.py pointer ./inputs/Pointer/in0 2097152 |
5 | transitive ./gen_input.py transitive inputs/Transitive/in0 2097152 | 5 | transitive ./gen_input.py transitive ./inputs/Transitive/in0 2097152 |
6 | update ./gen_input.py update inputs/Update/in0 2097152 | 6 | 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 @@ | |||
1 | field_all ./gen_input.py field inputs/Field/in0 2097152 | 1 | field_all ./gen_input.py field ./inputs/Field/in0 2097152 |
2 | matrix_all ./gen_input.py matrix inputs/Matrix/in0 2097152 | 2 | matrix_all ./gen_input.py matrix ./inputs/Matrix/in0 2097152 |
3 | neighborhood_all ./gen_input.py neighborhood inputs/Neighborhood/in0 2097152 | 3 | neighborhood_all ./gen_input.py neighborhood ./inputs/Neighborhood/in0 2097152 |
4 | pointer_all ./gen_input.py pointer inputs/Pointer/in0 2097152 | 4 | pointer_all ./gen_input.py pointer ./inputs/Pointer/in0 2097152 |
5 | transitive_all ./gen_input.py transitive inputs/Transitive/in0 2097152 | 5 | transitive_all ./gen_input.py transitive ./inputs/Transitive/in0 2097152 |
6 | update_all ./gen_input.py update inputs/Update/in0 2097152 | 6 | 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 @@ | |||
1 | import os | ||
2 | |||
3 | with open("./pids.txt", "r") as f: | ||
4 | for line in f: | ||
5 | 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 @@ | |||
1 | #!/bin/bash | ||
2 | # Copyright 2020 Joshua Bakita | ||
3 | # Runs DIS in every configuration needed | ||
4 | # for the paper and schedulability studies | ||
5 | |||
6 | maxJobs=$1 | ||
7 | runID=$2 | ||
8 | |||
9 | if [ $# -lt 2 ]; then | ||
10 | echo "Usage $0 <number of iterations> <run ID>" | ||
11 | exit | ||
12 | fi | ||
13 | if [[ "$EUID" != 0 ]]; then | ||
14 | echo "You need to be root to enable spatial isolation!" | ||
15 | exit | ||
16 | fi | ||
17 | date | ||
18 | |||
19 | # Run the pairs baseline and some comparisons to examine the effect of less cache | ||
20 | echo "Building benchmarks in unpaired configuration..." | ||
21 | cd dis | ||
22 | make baseline -j30 > /dev/null # Suppress noisy output | ||
23 | echo "Done. Running experiments..." | ||
24 | # Full L3, full L2 - xi is the baseline for the pairs | ||
25 | baseXI=dis/$(date +"%b%d-%H")-c-xi-$runID.txt | ||
26 | echo "" | ../run_bench.sh -m base -p 15 -l $maxJobs -b dis2MbInNames.txt -B -I xi $runID | ||
27 | # Half L3, full L2 - i3 sees effect of half L3 | ||
28 | baseI3=dis/$(date +"%b%d-%H")-c-i3-$runID.txt | ||
29 | echo "" | ../run_bench.sh -m base -p 15 -l $maxJobs -b dis2MbInNames.txt -B -I i3 $runID | ||
30 | # Half L3, half L2 - additional effect of half L2 | ||
31 | baseI=dis/$(date +"%b%d-%H")-c-i-$runID.txt | ||
32 | echo "" | ../run_bench.sh -m base -p 15 -l $maxJobs -b dis2MbInNames.txt -B -I i $runID | ||
33 | date | ||
34 | |||
35 | # Run the Level-C pairs | ||
36 | pairC=dis/$(date +"%b%d-%H")-c-xi-async-$runID.txt | ||
37 | echo "" | ../run_bench.sh -m pair -p 15 -P 31 -l $maxJobs -b dis2MbInNames.txt -B -I xi -A $runID | ||
38 | date | ||
39 | |||
40 | # Run the Level-A/-B pairs | ||
41 | echo "Building benchmarks in paired configuration..." | ||
42 | make pairs -j30 > /dev/null # Suppress noisy output | ||
43 | echo "Done. Continuing experiments..." | ||
44 | # No cache isolation | ||
45 | pairXI=dis/$(date +"%b%d-%H")-c-xi-$runID"-A.txt and -B.txt" | ||
46 | echo "" | ../run_bench.sh -m pair -p 15 -P 31 -l $maxJobs -b disPairs2MbInNames.txt -B -I xi $runID | ||
47 | # Shared L2, split L3 | ||
48 | pairI3=dis/$(date +"%b%d-%H")-c-i3-$runID"-A.txt and -B.txt" | ||
49 | echo "" | ../run_bench.sh -m pair -p 15 -P 31 -l $maxJobs -b disPairs2MbInNames.txt -B -I i3 $runID | ||
50 | # Split L2, split L3 | ||
51 | pairI=dis/$(date +"%b%d-%H")-c-i-$runID"-A.txt and -B.txt" | ||
52 | echo "" | ../run_bench.sh -m pair -p 15 -P 31 -l $maxJobs -b disPairs2MbInNames.txt -B -I i $runID | ||
53 | date | ||
54 | |||
55 | echo "==== DONE ====" | ||
56 | echo "Results are in:" | ||
57 | echo "- $baseXI" | ||
58 | echo "- $baseI3" | ||
59 | echo "- $baseI" | ||
60 | echo "- $pairXI" | ||
61 | echo "- $pairI3" | ||
62 | echo "- $pairI" | ||
63 | echo "- $pairC" | ||
64 | |||