summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Bakita <jbakita@cs.unc.edu>2020-11-05 20:55:02 -0500
committerJoshua Bakita <jbakita@cs.unc.edu>2020-11-05 20:55:02 -0500
commit30e6b4765a310a1589cb56683dcbb4a0e8caee28 (patch)
tree4ea1d80af0fcbce4506cac2aa099e4e3b42b4d2c
parent47da00d019b27772cb6009a07ad3fc52aaf2b15f (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--.gitignore1
-rw-r--r--all_pairs/Makefile1
-rw-r--r--baseline/Makefile1
-rw-r--r--dis/dis2MbInNames.txt12
-rw-r--r--dis/disPairs2MbInNames.txt12
-rw-r--r--kill.py5
-rwxr-xr-xrun_all_dis.sh64
7 files changed, 79 insertions, 17 deletions
diff --git a/.gitignore b/.gitignore
index b7e90f4..b82afb8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
3override CFLAGS += -pthread -O2 -I.. -DPAIRED 3override CFLAGS += -pthread -O2 -I.. -DPAIRED
4LDFLAGS += -lrt 4LDFLAGS += -lrt
5COMMON = ../extra.h 5COMMON = ../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
8ifneq ($(shell grep "define MMDC 1" ../extra.h),) 9ifneq ($(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
3override CFLAGS = -pthread -O2 -I.. 3override CFLAGS = -pthread -O2 -I..
4LDFLAGS = -lrt 4LDFLAGS = -lrt
5COMMON = ../extra.h 5COMMON = ../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
8ifneq ($(shell grep "define MMDC 1" ../extra.h),) 9ifneq ($(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 @@
1field ./gen_input.py field inputs/Field/in0 2097152 1field ./gen_input.py field ./inputs/Field/in0 2097152
2matrix ./gen_input.py matrix inputs/Matrix/in0 2097152 2matrix ./gen_input.py matrix ./inputs/Matrix/in0 2097152
3neighborhood ./gen_input.py neighborhood inputs/Neighborhood/in0 2097152 3neighborhood ./gen_input.py neighborhood ./inputs/Neighborhood/in0 2097152
4pointer ./gen_input.py pointer inputs/Pointer/in0 2097152 4pointer ./gen_input.py pointer ./inputs/Pointer/in0 2097152
5transitive ./gen_input.py transitive inputs/Transitive/in0 2097152 5transitive ./gen_input.py transitive ./inputs/Transitive/in0 2097152
6update ./gen_input.py update inputs/Update/in0 2097152 6update ./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 @@
1field_all ./gen_input.py field inputs/Field/in0 2097152 1field_all ./gen_input.py field ./inputs/Field/in0 2097152
2matrix_all ./gen_input.py matrix inputs/Matrix/in0 2097152 2matrix_all ./gen_input.py matrix ./inputs/Matrix/in0 2097152
3neighborhood_all ./gen_input.py neighborhood inputs/Neighborhood/in0 2097152 3neighborhood_all ./gen_input.py neighborhood ./inputs/Neighborhood/in0 2097152
4pointer_all ./gen_input.py pointer inputs/Pointer/in0 2097152 4pointer_all ./gen_input.py pointer ./inputs/Pointer/in0 2097152
5transitive_all ./gen_input.py transitive inputs/Transitive/in0 2097152 5transitive_all ./gen_input.py transitive ./inputs/Transitive/in0 2097152
6update_all ./gen_input.py update inputs/Update/in0 2097152 6update_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 @@
1import os
2
3with 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
6maxJobs=$1
7runID=$2
8
9if [ $# -lt 2 ]; then
10 echo "Usage $0 <number of iterations> <run ID>"
11 exit
12fi
13if [[ "$EUID" != 0 ]]; then
14 echo "You need to be root to enable spatial isolation!"
15 exit
16fi
17date
18
19# Run the pairs baseline and some comparisons to examine the effect of less cache
20echo "Building benchmarks in unpaired configuration..."
21cd dis
22make baseline -j30 > /dev/null # Suppress noisy output
23echo "Done. Running experiments..."
24# Full L3, full L2 - xi is the baseline for the pairs
25baseXI=dis/$(date +"%b%d-%H")-c-xi-$runID.txt
26echo "" | ../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
28baseI3=dis/$(date +"%b%d-%H")-c-i3-$runID.txt
29echo "" | ../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
31baseI=dis/$(date +"%b%d-%H")-c-i-$runID.txt
32echo "" | ../run_bench.sh -m base -p 15 -l $maxJobs -b dis2MbInNames.txt -B -I i $runID
33date
34
35# Run the Level-C pairs
36pairC=dis/$(date +"%b%d-%H")-c-xi-async-$runID.txt
37echo "" | ../run_bench.sh -m pair -p 15 -P 31 -l $maxJobs -b dis2MbInNames.txt -B -I xi -A $runID
38date
39
40# Run the Level-A/-B pairs
41echo "Building benchmarks in paired configuration..."
42make pairs -j30 > /dev/null # Suppress noisy output
43echo "Done. Continuing experiments..."
44# No cache isolation
45pairXI=dis/$(date +"%b%d-%H")-c-xi-$runID"-A.txt and -B.txt"
46echo "" | ../run_bench.sh -m pair -p 15 -P 31 -l $maxJobs -b disPairs2MbInNames.txt -B -I xi $runID
47# Shared L2, split L3
48pairI3=dis/$(date +"%b%d-%H")-c-i3-$runID"-A.txt and -B.txt"
49echo "" | ../run_bench.sh -m pair -p 15 -P 31 -l $maxJobs -b disPairs2MbInNames.txt -B -I i3 $runID
50# Split L2, split L3
51pairI=dis/$(date +"%b%d-%H")-c-i-$runID"-A.txt and -B.txt"
52echo "" | ../run_bench.sh -m pair -p 15 -P 31 -l $maxJobs -b disPairs2MbInNames.txt -B -I i $runID
53date
54
55echo "==== DONE ===="
56echo "Results are in:"
57echo "- $baseXI"
58echo "- $baseI3"
59echo "- $baseI"
60echo "- $pairXI"
61echo "- $pairI3"
62echo "- $pairI"
63echo "- $pairC"
64