From 92df3dcae6747e4410574e7bf1f14dd1c07c3471 Mon Sep 17 00:00:00 2001 From: leochanj105 Date: Fri, 29 Oct 2021 03:40:38 -0400 Subject: tmp 10/29 --- Makefile | 50 ++++- SD-VBS/common/makefiles/Makefile.common | 2 +- SD-VBS/dag_binaries/disparity_qcif_pair | Bin 0 -> 125896 bytes SD-VBS/dag_binaries/disparity_qcif_pair_no_litmus | Bin 0 -> 58248 bytes SD-VBS/dag_binaries/disparity_qcif_single | Bin 0 -> 120672 bytes .../dag_binaries/disparity_qcif_single_no_litmus | Bin 0 -> 48880 bytes SD-VBS/dag_binaries/localization_qcif_pair | Bin 0 -> 130456 bytes .../dag_binaries/localization_qcif_pair_no_litmus | Bin 0 -> 66904 bytes SD-VBS/dag_binaries/localization_qcif_single | Bin 0 -> 125232 bytes .../localization_qcif_single_no_litmus | Bin 0 -> 57536 bytes SD-VBS/dag_binaries/mser_qcif_pair | Bin 0 -> 121232 bytes SD-VBS/dag_binaries/mser_qcif_pair_no_litmus | Bin 0 -> 61776 bytes SD-VBS/dag_binaries/mser_qcif_single | Bin 0 -> 120096 bytes SD-VBS/dag_binaries/mser_qcif_single_no_litmus | Bin 0 -> 48312 bytes SD-VBS/dag_binaries/multi_ncut_qcif_pair | Bin 0 -> 121440 bytes SD-VBS/dag_binaries/multi_ncut_qcif_pair_no_litmus | Bin 0 -> 57888 bytes SD-VBS/dag_binaries/multi_ncut_qcif_single | Bin 0 -> 120312 bytes .../dag_binaries/multi_ncut_qcif_single_no_litmus | Bin 0 -> 48520 bytes SD-VBS/dag_binaries/sift_qcif_pair | Bin 0 -> 134648 bytes SD-VBS/dag_binaries/sift_qcif_pair_no_litmus | Bin 0 -> 67000 bytes SD-VBS/dag_binaries/sift_qcif_single | Bin 0 -> 129416 bytes SD-VBS/dag_binaries/sift_qcif_single_no_litmus | Bin 0 -> 61728 bytes SD-VBS/dag_binaries/stitch_qcif_pair | Bin 0 -> 129920 bytes SD-VBS/dag_binaries/stitch_qcif_pair_no_litmus | Bin 0 -> 62272 bytes SD-VBS/dag_binaries/stitch_qcif_single | Bin 0 -> 124696 bytes SD-VBS/dag_binaries/stitch_qcif_single_no_litmus | Bin 0 -> 52904 bytes SD-VBS/dag_binaries/svm_qcif_pair | Bin 0 -> 129912 bytes SD-VBS/dag_binaries/svm_qcif_pair_no_litmus | Bin 0 -> 62256 bytes SD-VBS/dag_binaries/svm_qcif_single | Bin 0 -> 124680 bytes SD-VBS/dag_binaries/svm_qcif_single_no_litmus | Bin 0 -> 56984 bytes SD-VBS/dag_binaries/texture_synthesis_qcif_pair | Bin 0 -> 130616 bytes .../texture_synthesis_qcif_pair_no_litmus | Bin 0 -> 62968 bytes SD-VBS/dag_binaries/texture_synthesis_qcif_single | Bin 0 -> 121296 bytes .../texture_synthesis_qcif_single_no_litmus | Bin 0 -> 57696 bytes SD-VBS/dag_binaries/tracking_qcif_pair | Bin 0 -> 129864 bytes SD-VBS/dag_binaries/tracking_qcif_pair_no_litmus | Bin 0 -> 62208 bytes SD-VBS/dag_binaries/tracking_qcif_single | Bin 0 -> 124632 bytes SD-VBS/dag_binaries/tracking_qcif_single_no_litmus | Bin 0 -> 52840 bytes SD-VBS/sd-vbsNames.txt | 1 - bckup/sched-10 | 0 bckup/sched-11 | 5 + bckup/sched-12 | 4 + bckup/sched-20 | 5 + bckup/sched-21 | 5 + bckup/sched-30 | 10 + bckup/sched-31 | 8 + bckup/sched-32 | 6 + dag_example | 4 + dag_example_tyler | 14 ++ deadline_misses | 0 extra.h | 163 ++++++++------ no-stitch | 5 + run_all_casestudies.sh | 47 ++++ run_all_sd-vbs.sh | 31 ++- run_bench.sh | 18 +- run_case_study_dag.py | 244 +++++++++++++++++++++ sched-10 | 0 sched-11 | 5 + sched-12 | 4 + sched-20 | 5 + sched-21 | 5 + sched-30 | 10 + sched-31 | 8 + sched-32 | 6 + smt_analysis/computeSMTslowdown.py | 13 +- smt_analysis/libSMT.py | 10 +- 66 files changed, 588 insertions(+), 100 deletions(-) create mode 100755 SD-VBS/dag_binaries/disparity_qcif_pair create mode 100755 SD-VBS/dag_binaries/disparity_qcif_pair_no_litmus create mode 100755 SD-VBS/dag_binaries/disparity_qcif_single create mode 100755 SD-VBS/dag_binaries/disparity_qcif_single_no_litmus create mode 100755 SD-VBS/dag_binaries/localization_qcif_pair create mode 100755 SD-VBS/dag_binaries/localization_qcif_pair_no_litmus create mode 100755 SD-VBS/dag_binaries/localization_qcif_single create mode 100755 SD-VBS/dag_binaries/localization_qcif_single_no_litmus create mode 100755 SD-VBS/dag_binaries/mser_qcif_pair create mode 100755 SD-VBS/dag_binaries/mser_qcif_pair_no_litmus create mode 100755 SD-VBS/dag_binaries/mser_qcif_single create mode 100755 SD-VBS/dag_binaries/mser_qcif_single_no_litmus create mode 100755 SD-VBS/dag_binaries/multi_ncut_qcif_pair create mode 100755 SD-VBS/dag_binaries/multi_ncut_qcif_pair_no_litmus create mode 100755 SD-VBS/dag_binaries/multi_ncut_qcif_single create mode 100755 SD-VBS/dag_binaries/multi_ncut_qcif_single_no_litmus create mode 100755 SD-VBS/dag_binaries/sift_qcif_pair create mode 100755 SD-VBS/dag_binaries/sift_qcif_pair_no_litmus create mode 100755 SD-VBS/dag_binaries/sift_qcif_single create mode 100755 SD-VBS/dag_binaries/sift_qcif_single_no_litmus create mode 100755 SD-VBS/dag_binaries/stitch_qcif_pair create mode 100755 SD-VBS/dag_binaries/stitch_qcif_pair_no_litmus create mode 100755 SD-VBS/dag_binaries/stitch_qcif_single create mode 100755 SD-VBS/dag_binaries/stitch_qcif_single_no_litmus create mode 100755 SD-VBS/dag_binaries/svm_qcif_pair create mode 100755 SD-VBS/dag_binaries/svm_qcif_pair_no_litmus create mode 100755 SD-VBS/dag_binaries/svm_qcif_single create mode 100755 SD-VBS/dag_binaries/svm_qcif_single_no_litmus create mode 100755 SD-VBS/dag_binaries/texture_synthesis_qcif_pair create mode 100755 SD-VBS/dag_binaries/texture_synthesis_qcif_pair_no_litmus create mode 100755 SD-VBS/dag_binaries/texture_synthesis_qcif_single create mode 100755 SD-VBS/dag_binaries/texture_synthesis_qcif_single_no_litmus create mode 100755 SD-VBS/dag_binaries/tracking_qcif_pair create mode 100755 SD-VBS/dag_binaries/tracking_qcif_pair_no_litmus create mode 100755 SD-VBS/dag_binaries/tracking_qcif_single create mode 100755 SD-VBS/dag_binaries/tracking_qcif_single_no_litmus create mode 100644 bckup/sched-10 create mode 100644 bckup/sched-11 create mode 100644 bckup/sched-12 create mode 100644 bckup/sched-20 create mode 100644 bckup/sched-21 create mode 100644 bckup/sched-30 create mode 100644 bckup/sched-31 create mode 100644 bckup/sched-32 create mode 100644 dag_example create mode 100644 dag_example_tyler create mode 100644 deadline_misses create mode 100644 no-stitch create mode 100644 run_all_casestudies.sh create mode 100755 run_case_study_dag.py create mode 100644 sched-10 create mode 100644 sched-11 create mode 100644 sched-12 create mode 100644 sched-20 create mode 100644 sched-21 create mode 100644 sched-30 create mode 100644 sched-31 create mode 100644 sched-32 diff --git a/Makefile b/Makefile index a473a20..44171d0 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,51 @@ case-study: sed -i "s/LITMUS 0/LITMUS 1/g" extra.h - $(MAKE) -C baseline all - $(MAKE) -C dis baseline + #$(MAKE) -C baseline all + #$(MAKE) -C dis baseline $(MAKE) -C SD-VBS/benchmarks compile benchmarks: - sed -i "s/LITMUS 1/LITMUS 0/g" extra.h - $(MAKE) -C baseline all - $(MAKE) -C all_pairs all - $(MAKE) -C dis pairs + sed -i "s/LITMUS 0/LITMUS 1/g" extra.h + # $(MAKE) -C baseline all + #$(MAKE) -C all_pairs all + #$(MAKE) -C dis pairs + $(MAKE) -C SD-VBS/benchmarks CFLAGS=-DPAIRED compile +# $(MAKE) -C SD-VBS/benchmarks compile + + +benches := svm mser sift texture_synthesis tracking disparity localization multi_ncut stitch +bench_path := SD-VBS/benchmarks +dag_path := SD-VBS/dag_binaries +single_suffix := _qcif_single +pair_suffix := _qcif_pair + +single_suffix_no := _qcif_single_no_litmus +pair_suffix_no := _qcif_pair_no_litmus + +dag-case-study: + sudo mkdir -p SD-VBS/dag_binaries + sudo sed -i "s/LITMUS 0/LITMUS 1/g" extra.h + $(MAKE) -C SD-VBS/benchmarks compile + @for v in $(benches) ; do \ + # echo "$(dag_path)/$$v""$(single_suffix)"; \ + sudo cp $(bench_path)/$$v/data/qcif/$$v "$(dag_path)/$$v""$(single_suffix)"; \ + done + $(MAKE) -C SD-VBS/benchmarks CFLAGS=-DPAIRED compile + @for v in $(benches) ; do \ + # echo "$(dag_path)/$$v""$(pair_suffix)"; \ + sudo cp $(bench_path)/$$v/data/qcif/$$v "$(dag_path)/$$v""$(pair_suffix)"; \ + done + + + sudo sed -i "s/LITMUS 1/LITMUS 0/g" extra.h + $(MAKE) -C SD-VBS/benchmarks compile + @for v in $(benches) ; do \ + # echo "$(dag_path)/$$v""$(single_suffix)"; \ + sudo cp $(bench_path)/$$v/data/qcif/$$v "$(dag_path)/$$v""$(single_suffix_no)"; \ + done $(MAKE) -C SD-VBS/benchmarks CFLAGS=-DPAIRED compile + @for v in $(benches) ; do \ + # echo "$(dag_path)/$$v""$(pair_suffix)"; \ + sudo cp $(bench_path)/$$v/data/qcif/$$v "$(dag_path)/$$v""$(pair_suffix_no)"; \ + done diff --git a/SD-VBS/common/makefiles/Makefile.common b/SD-VBS/common/makefiles/Makefile.common index ab3a6b4..15f4f56 100644 --- a/SD-VBS/common/makefiles/Makefile.common +++ b/SD-VBS/common/makefiles/Makefile.common @@ -29,7 +29,7 @@ PRELOAD_TIMES_DIR := $(TOP_DIR)/preload-times/$(BMARK) MTIMING_DIR := $(TOP_DIR)/cycles/$(BMARK) BMARK_DIR := $(TOP_DIR)/benchmarks/$(BMARK) TOOL_DIR := $(TOP_DIR)/tools -LIBLITMUS ?= /playpen/mc2/liblitmus +LIBLITMUS ?= /home/ae/liblitmus ifneq ($(shell grep "define LITMUS 1" ${TOP_DIR}/../extra.h),) override CFLAGS += -I${LIBLITMUS}/include -I${LIBLITMUS}/arch/arm/include override LDFLAGS += -L${LIBLITMUS} -llitmus diff --git a/SD-VBS/dag_binaries/disparity_qcif_pair b/SD-VBS/dag_binaries/disparity_qcif_pair new file mode 100755 index 0000000..d7a274d Binary files /dev/null and b/SD-VBS/dag_binaries/disparity_qcif_pair differ diff --git a/SD-VBS/dag_binaries/disparity_qcif_pair_no_litmus b/SD-VBS/dag_binaries/disparity_qcif_pair_no_litmus new file mode 100755 index 0000000..2135b21 Binary files /dev/null and b/SD-VBS/dag_binaries/disparity_qcif_pair_no_litmus differ diff --git a/SD-VBS/dag_binaries/disparity_qcif_single b/SD-VBS/dag_binaries/disparity_qcif_single new file mode 100755 index 0000000..bd992e0 Binary files /dev/null and b/SD-VBS/dag_binaries/disparity_qcif_single differ diff --git a/SD-VBS/dag_binaries/disparity_qcif_single_no_litmus b/SD-VBS/dag_binaries/disparity_qcif_single_no_litmus new file mode 100755 index 0000000..29527db Binary files /dev/null and b/SD-VBS/dag_binaries/disparity_qcif_single_no_litmus differ diff --git a/SD-VBS/dag_binaries/localization_qcif_pair b/SD-VBS/dag_binaries/localization_qcif_pair new file mode 100755 index 0000000..76e1604 Binary files /dev/null and b/SD-VBS/dag_binaries/localization_qcif_pair differ diff --git a/SD-VBS/dag_binaries/localization_qcif_pair_no_litmus b/SD-VBS/dag_binaries/localization_qcif_pair_no_litmus new file mode 100755 index 0000000..5cefd67 Binary files /dev/null and b/SD-VBS/dag_binaries/localization_qcif_pair_no_litmus differ diff --git a/SD-VBS/dag_binaries/localization_qcif_single b/SD-VBS/dag_binaries/localization_qcif_single new file mode 100755 index 0000000..bd6f7e3 Binary files /dev/null and b/SD-VBS/dag_binaries/localization_qcif_single differ diff --git a/SD-VBS/dag_binaries/localization_qcif_single_no_litmus b/SD-VBS/dag_binaries/localization_qcif_single_no_litmus new file mode 100755 index 0000000..bfeed5a Binary files /dev/null and b/SD-VBS/dag_binaries/localization_qcif_single_no_litmus differ diff --git a/SD-VBS/dag_binaries/mser_qcif_pair b/SD-VBS/dag_binaries/mser_qcif_pair new file mode 100755 index 0000000..21e5bcb Binary files /dev/null and b/SD-VBS/dag_binaries/mser_qcif_pair differ diff --git a/SD-VBS/dag_binaries/mser_qcif_pair_no_litmus b/SD-VBS/dag_binaries/mser_qcif_pair_no_litmus new file mode 100755 index 0000000..d571f3c Binary files /dev/null and b/SD-VBS/dag_binaries/mser_qcif_pair_no_litmus differ diff --git a/SD-VBS/dag_binaries/mser_qcif_single b/SD-VBS/dag_binaries/mser_qcif_single new file mode 100755 index 0000000..ae95654 Binary files /dev/null and b/SD-VBS/dag_binaries/mser_qcif_single differ diff --git a/SD-VBS/dag_binaries/mser_qcif_single_no_litmus b/SD-VBS/dag_binaries/mser_qcif_single_no_litmus new file mode 100755 index 0000000..e9d9713 Binary files /dev/null and b/SD-VBS/dag_binaries/mser_qcif_single_no_litmus differ diff --git a/SD-VBS/dag_binaries/multi_ncut_qcif_pair b/SD-VBS/dag_binaries/multi_ncut_qcif_pair new file mode 100755 index 0000000..dd6507d Binary files /dev/null and b/SD-VBS/dag_binaries/multi_ncut_qcif_pair differ diff --git a/SD-VBS/dag_binaries/multi_ncut_qcif_pair_no_litmus b/SD-VBS/dag_binaries/multi_ncut_qcif_pair_no_litmus new file mode 100755 index 0000000..d3d9172 Binary files /dev/null and b/SD-VBS/dag_binaries/multi_ncut_qcif_pair_no_litmus differ diff --git a/SD-VBS/dag_binaries/multi_ncut_qcif_single b/SD-VBS/dag_binaries/multi_ncut_qcif_single new file mode 100755 index 0000000..ff83ac5 Binary files /dev/null and b/SD-VBS/dag_binaries/multi_ncut_qcif_single differ diff --git a/SD-VBS/dag_binaries/multi_ncut_qcif_single_no_litmus b/SD-VBS/dag_binaries/multi_ncut_qcif_single_no_litmus new file mode 100755 index 0000000..518b247 Binary files /dev/null and b/SD-VBS/dag_binaries/multi_ncut_qcif_single_no_litmus differ diff --git a/SD-VBS/dag_binaries/sift_qcif_pair b/SD-VBS/dag_binaries/sift_qcif_pair new file mode 100755 index 0000000..9ed7780 Binary files /dev/null and b/SD-VBS/dag_binaries/sift_qcif_pair differ diff --git a/SD-VBS/dag_binaries/sift_qcif_pair_no_litmus b/SD-VBS/dag_binaries/sift_qcif_pair_no_litmus new file mode 100755 index 0000000..9cc110c Binary files /dev/null and b/SD-VBS/dag_binaries/sift_qcif_pair_no_litmus differ diff --git a/SD-VBS/dag_binaries/sift_qcif_single b/SD-VBS/dag_binaries/sift_qcif_single new file mode 100755 index 0000000..79fbd60 Binary files /dev/null and b/SD-VBS/dag_binaries/sift_qcif_single differ diff --git a/SD-VBS/dag_binaries/sift_qcif_single_no_litmus b/SD-VBS/dag_binaries/sift_qcif_single_no_litmus new file mode 100755 index 0000000..12493bc Binary files /dev/null and b/SD-VBS/dag_binaries/sift_qcif_single_no_litmus differ diff --git a/SD-VBS/dag_binaries/stitch_qcif_pair b/SD-VBS/dag_binaries/stitch_qcif_pair new file mode 100755 index 0000000..7f2e406 Binary files /dev/null and b/SD-VBS/dag_binaries/stitch_qcif_pair differ diff --git a/SD-VBS/dag_binaries/stitch_qcif_pair_no_litmus b/SD-VBS/dag_binaries/stitch_qcif_pair_no_litmus new file mode 100755 index 0000000..5051dff Binary files /dev/null and b/SD-VBS/dag_binaries/stitch_qcif_pair_no_litmus differ diff --git a/SD-VBS/dag_binaries/stitch_qcif_single b/SD-VBS/dag_binaries/stitch_qcif_single new file mode 100755 index 0000000..54a33cd Binary files /dev/null and b/SD-VBS/dag_binaries/stitch_qcif_single differ diff --git a/SD-VBS/dag_binaries/stitch_qcif_single_no_litmus b/SD-VBS/dag_binaries/stitch_qcif_single_no_litmus new file mode 100755 index 0000000..6a0d971 Binary files /dev/null and b/SD-VBS/dag_binaries/stitch_qcif_single_no_litmus differ diff --git a/SD-VBS/dag_binaries/svm_qcif_pair b/SD-VBS/dag_binaries/svm_qcif_pair new file mode 100755 index 0000000..0f421f1 Binary files /dev/null and b/SD-VBS/dag_binaries/svm_qcif_pair differ diff --git a/SD-VBS/dag_binaries/svm_qcif_pair_no_litmus b/SD-VBS/dag_binaries/svm_qcif_pair_no_litmus new file mode 100755 index 0000000..d2f0555 Binary files /dev/null and b/SD-VBS/dag_binaries/svm_qcif_pair_no_litmus differ diff --git a/SD-VBS/dag_binaries/svm_qcif_single b/SD-VBS/dag_binaries/svm_qcif_single new file mode 100755 index 0000000..88994ca Binary files /dev/null and b/SD-VBS/dag_binaries/svm_qcif_single differ diff --git a/SD-VBS/dag_binaries/svm_qcif_single_no_litmus b/SD-VBS/dag_binaries/svm_qcif_single_no_litmus new file mode 100755 index 0000000..f8af380 Binary files /dev/null and b/SD-VBS/dag_binaries/svm_qcif_single_no_litmus differ diff --git a/SD-VBS/dag_binaries/texture_synthesis_qcif_pair b/SD-VBS/dag_binaries/texture_synthesis_qcif_pair new file mode 100755 index 0000000..2336dca Binary files /dev/null and b/SD-VBS/dag_binaries/texture_synthesis_qcif_pair differ diff --git a/SD-VBS/dag_binaries/texture_synthesis_qcif_pair_no_litmus b/SD-VBS/dag_binaries/texture_synthesis_qcif_pair_no_litmus new file mode 100755 index 0000000..ad5f705 Binary files /dev/null and b/SD-VBS/dag_binaries/texture_synthesis_qcif_pair_no_litmus differ diff --git a/SD-VBS/dag_binaries/texture_synthesis_qcif_single b/SD-VBS/dag_binaries/texture_synthesis_qcif_single new file mode 100755 index 0000000..1aa2e36 Binary files /dev/null and b/SD-VBS/dag_binaries/texture_synthesis_qcif_single differ diff --git a/SD-VBS/dag_binaries/texture_synthesis_qcif_single_no_litmus b/SD-VBS/dag_binaries/texture_synthesis_qcif_single_no_litmus new file mode 100755 index 0000000..3394b70 Binary files /dev/null and b/SD-VBS/dag_binaries/texture_synthesis_qcif_single_no_litmus differ diff --git a/SD-VBS/dag_binaries/tracking_qcif_pair b/SD-VBS/dag_binaries/tracking_qcif_pair new file mode 100755 index 0000000..491e519 Binary files /dev/null and b/SD-VBS/dag_binaries/tracking_qcif_pair differ diff --git a/SD-VBS/dag_binaries/tracking_qcif_pair_no_litmus b/SD-VBS/dag_binaries/tracking_qcif_pair_no_litmus new file mode 100755 index 0000000..748dfc5 Binary files /dev/null and b/SD-VBS/dag_binaries/tracking_qcif_pair_no_litmus differ diff --git a/SD-VBS/dag_binaries/tracking_qcif_single b/SD-VBS/dag_binaries/tracking_qcif_single new file mode 100755 index 0000000..b99f578 Binary files /dev/null and b/SD-VBS/dag_binaries/tracking_qcif_single differ diff --git a/SD-VBS/dag_binaries/tracking_qcif_single_no_litmus b/SD-VBS/dag_binaries/tracking_qcif_single_no_litmus new file mode 100755 index 0000000..c3b941c Binary files /dev/null and b/SD-VBS/dag_binaries/tracking_qcif_single_no_litmus differ diff --git a/SD-VBS/sd-vbsNames.txt b/SD-VBS/sd-vbsNames.txt index 23b168d..aca41f8 100644 --- a/SD-VBS/sd-vbsNames.txt +++ b/SD-VBS/sd-vbsNames.txt @@ -1,7 +1,6 @@ disparity_qcif echo -e "./benchmarks/disparity/data/qcif/1.bmp\\n./benchmarks/disparity/data/qcif/2.bmp" localization_qcif echo "./benchmarks/localization/data/qcif/1.txt" mser_qcif echo "./benchmarks/mser/data/qcif/1.bmp" -multi_ncut_qcif echo "./benchmarks/multi_ncut/data/qcif/1.bmp" sift_qcif echo "./benchmarks/sift/data/qcif/1.bmp" stitch_qcif echo "./benchmarks/stitch/data/qcif/1.bmp" svm_qcif echo -e "./benchmarks/svm/data/qcif/d16trn_1.txt\\n./benchmarks/svm/data/qcif/d16trn_2.txt\\n./benchmarks/svm/data/qcif/d16tst_1.txt\\n./benchmarks/svm/data/qcif/d16tst_2.txt" diff --git a/bckup/sched-10 b/bckup/sched-10 new file mode 100644 index 0000000..e69de29 diff --git a/bckup/sched-11 b/bckup/sched-11 new file mode 100644 index 0000000..b1dc303 --- /dev/null +++ b/bckup/sched-11 @@ -0,0 +1,5 @@ +0, mser_qcif, mser_qcif__A, 50000, 1, 110, 1, 103, 1, 0, 7, 7 +1, localization_qcif, localization_qcif__B, 50000, 1, 111, 1, 103, 1, 7, 41, 41, disparity_qcif, disparity_qcif__C, 27, 27 +0, svm_qcif, svm_qcif__D, 50000, 1, 112, 1, 103, 1, 48, 38, 38 +0, texture_synthesis_qcif, texture_synthesis_qcif__F, 50000, 1, 115, 1, 103, 1, 88, 6, 6 +0, sift_qcif, sift_qcif__E, 50000, 2, 114, 1, 103, 1, 34, 54, 54 diff --git a/bckup/sched-12 b/bckup/sched-12 new file mode 100644 index 0000000..8da0a19 --- /dev/null +++ b/bckup/sched-12 @@ -0,0 +1,4 @@ +0, mser_qcif, mser_qcif__A, 50000, 1, 120, 1, 129, 1, 0, 7, 7 +1, localization_qcif, localization_qcif__B, 50000, 1, 121, 1, 129, 1, 7, 41, 41, disparity_qcif, disparity_qcif__C, 27, 27 +1, svm_qcif, svm_qcif__D, 50000, 1, 122, 1, 129, 1, 48, 55, 55, sift_qcif, sift_qcif__E, 72, 72 +0, texture_synthesis_qcif, texture_synthesis_qcif__F, 50000, 1, 125, 1, 129, 1, 120, 6, 6 diff --git a/bckup/sched-20 b/bckup/sched-20 new file mode 100644 index 0000000..403619f --- /dev/null +++ b/bckup/sched-20 @@ -0,0 +1,5 @@ +0, tracking_qcif, tracking_qcif__A, 50000, 1, 200, 1, 68, 1, 0, 9, 9 +1, mser_qcif, mser_qcif__B, 50000, 1, 201, 1, 68, 1, 9, 10, 10, localization_qcif, localization_qcif__C, 34, 34 +0, texture_synthesis_qcif, texture_synthesis_qcif__E, 50000, 1, 204, 1, 68, 1, 43, 6, 6 +0, disparity_qcif, disparity_qcif__F, 50000, 1, 205, 1, 68, 1, 49, 19, 19 +0, stitch_qcif, stitch_qcif__D, 50000, 2, 202, 1, 68, 1, 19, 27, 27 diff --git a/bckup/sched-21 b/bckup/sched-21 new file mode 100644 index 0000000..c79057f --- /dev/null +++ b/bckup/sched-21 @@ -0,0 +1,5 @@ +0, tracking_qcif, tracking_qcif__A, 50000, 1, 210, 1, 74, 1, 0, 9, 9 +1, mser_qcif, mser_qcif__B, 50000, 1, 211, 1, 74, 1, 9, 10, 10, localization_qcif, localization_qcif__C, 34, 34 +0, texture_synthesis_qcif, texture_synthesis_qcif__E, 50000, 1, 214, 1, 74, 1, 43, 6, 6 +0, disparity_qcif, disparity_qcif__F, 50000, 1, 215, 1, 74, 1, 49, 19, 19 +0, stitch_qcif, stitch_qcif__D, 50000, 2, 212, 1, 74, 1, 19, 27, 27 diff --git a/bckup/sched-30 b/bckup/sched-30 new file mode 100644 index 0000000..f545015 --- /dev/null +++ b/bckup/sched-30 @@ -0,0 +1,10 @@ +0, texture_synthesis_qcif, texture_synthesis_qcif__A, 50000, 1, 300, 1, 126, 1, 0, 6, 6 +0, disparity_qcif, disparity_qcif__B, 50000, 1, 305, 1, 126, 1, 6, 19, 19 +0, mser_qcif, mser_qcif__C, 50000, 1, 306, 1, 126, 1, 25, 7, 7 +0, localization_qcif, localization_qcif__D, 50000, 1, 307, 1, 126, 1, 32, 34, 34 +0, sift_qcif, sift_qcif__E, 50000, 1, 308, 1, 126, 1, 66, 54, 54 +0, texture_synthesis_qcif, texture_synthesis_qcif__J, 50000, 1, 309, 1, 126, 1, 120, 6, 6 +0, stitch_qcif, stitch_qcif__F, 50000, 2, 301, 1, 126, 1, 6, 27, 27 +0, tracking_qcif, tracking_qcif__G, 50000, 2, 302, 1, 126, 1, 33, 9, 9 +0, svm_qcif, svm_qcif__H, 50000, 2, 303, 1, 126, 1, 42, 38, 38 +0, stitch_qcif, stitch_qcif__I, 50000, 2, 304, 1, 126, 1, 80, 27, 27 diff --git a/bckup/sched-31 b/bckup/sched-31 new file mode 100644 index 0000000..beba5f7 --- /dev/null +++ b/bckup/sched-31 @@ -0,0 +1,8 @@ +0, texture_synthesis_qcif, texture_synthesis_qcif__A, 50000, 1, 310, 1, 163, 1, 0, 6, 6 +1, stitch_qcif, stitch_qcif__F, 50000, 1, 311, 1, 163, 1, 6, 37, 37, disparity_qcif, disparity_qcif__B, 28, 28 +0, tracking_qcif, tracking_qcif__G, 50000, 1, 312, 1, 163, 1, 43, 9, 9 +1, svm_qcif, svm_qcif__H, 50000, 1, 313, 1, 163, 1, 75, 55, 55, sift_qcif, sift_qcif__E, 72, 72 +0, texture_synthesis_qcif, texture_synthesis_qcif__J, 50000, 1, 319, 1, 163, 1, 157, 6, 6 +0, mser_qcif, mser_qcif__C, 50000, 2, 316, 1, 163, 1, 34, 7, 7 +0, localization_qcif, localization_qcif__D, 50000, 2, 317, 1, 163, 1, 41, 34, 34 +0, stitch_qcif, stitch_qcif__I, 50000, 2, 314, 1, 163, 1, 130, 27, 27 diff --git a/bckup/sched-32 b/bckup/sched-32 new file mode 100644 index 0000000..ed783e1 --- /dev/null +++ b/bckup/sched-32 @@ -0,0 +1,6 @@ +0, texture_synthesis_qcif, texture_synthesis_qcif__A, 50000, 1, 320, 1, 189, 1, 0, 6, 6 +1, stitch_qcif, stitch_qcif__F, 50000, 1, 321, 1, 189, 1, 6, 37, 37, disparity_qcif, disparity_qcif__B, 28, 28 +1, tracking_qcif, tracking_qcif__G, 50000, 1, 322, 1, 189, 1, 43, 12, 12, mser_qcif, mser_qcif__C, 9, 9 +1, svm_qcif, svm_qcif__H, 50000, 1, 323, 1, 189, 1, 55, 53, 53, localization_qcif, localization_qcif__D, 49, 49 +1, stitch_qcif, stitch_qcif__I, 50000, 1, 324, 1, 189, 1, 108, 45, 45, sift_qcif, sift_qcif__E, 70, 70 +0, texture_synthesis_qcif, texture_synthesis_qcif__J, 50000, 1, 329, 1, 189, 1, 178, 6, 6 diff --git a/dag_example b/dag_example new file mode 100644 index 0000000..f52ff5c --- /dev/null +++ b/dag_example @@ -0,0 +1,4 @@ +1, mser_qcif, mser001, 5, 0, 1, 1, 100, 1, 7, sift_qcif, sift001 +0, mser_qcif, mser002, 3, 1, 2, 1, 10, 1, 13 +1, svm_qcif, svm001, 6, 0, 3, 1, 50, 1, 11, localization_qcif, localization001 +0, tracking_qcif, tracking001, 3, 2, 4, 1, 9, 1, 37 \ No newline at end of file diff --git a/dag_example_tyler b/dag_example_tyler new file mode 100644 index 0000000..593d23f --- /dev/null +++ b/dag_example_tyler @@ -0,0 +1,14 @@ +0, disparity_qcif, disparity_qcif__node4, 10, 1, 1, 1, 7338, 1, 0 +0, localization_qcif, localization_qcif__node4, 10, 1, 2, 1, 7338, 1, 18 +0, multi_ncut_qcif, multi_ncut_qcif__node2, 10, 1, 3, 1, 7338, 1, 49 +0, disparity_qcif, disparity_qcif__node2, 10, 2, 4, 1, 7338, 1, 0 +1, mser_qcif, mser_qcif__node3, 10, 2, 5, 1, 7338, 1, 18, mser_qcif, mser_qcif__node2 +0, multi_ncut_qcif, multi_ncut_qcif__node4, 10, 2, 6, 1, 7338, 1, 49 +0, disparity_qcif, disparity_qcif__node3, 10, 3, 7, 1, 7338, 1, 0 +0, localization_qcif, localization_qcif__node3, 10, 3, 8, 1, 7338, 1, 18 +0, multi_ncut_qcif, multi_ncut_qcif__node3, 10, 3, 9, 1, 7338, 1, 49 +0, disparity_qcif, disparity_qcif__node1, 10, 4, 10, 1, 7338, 1, 0 +1, mser_qcif, mser_qcif__node1, 10, 4, 11, 1, 7338, 1, 18, mser_qcif, mser_qcif__node4 +0, multi_ncut_qcif, multi_ncut_qcif__node1, 10, 4, 12, 1, 7338, 1, 49 +0, localization_qcif, localization_qcif__node2, 10, 5, 13, 1, 7338, 1, 18 +0, localization_qcif, localization_qcif__node1, 10, 6, 14, 1, 7338, 1, 18 \ No newline at end of file diff --git a/deadline_misses b/deadline_misses new file mode 100644 index 0000000..e69de29 diff --git a/extra.h b/extra.h index a16c671..a4a3d9c 100644 --- a/extra.h +++ b/extra.h @@ -30,7 +30,7 @@ extern int sched_getcpu(); #endif // This is a proxy for "case study mode" now -#define LITMUS 1 +#define LITMUS 0 #define MMDC_PROF 0 #if LITMUS @@ -44,12 +44,12 @@ extern int sched_getcpu(); // Store state globally so that the job can be outside main() // Arrays use float as a comprimise between overflow and size // Paired arrays use long longs as precision is more important for those times -#ifdef PAIRED +// #ifdef PAIRED long long *_rt_start_time; long long *_rt_end_time; -#else +// #else float *_rt_exec_time; -#endif +// #endif #if MMDC_PERF float *_rt_mmdc_read; float *_rt_mmdc_write; @@ -60,6 +60,8 @@ int _rt_core; int _rt_will_output; struct timespec _rt_start, _rt_end; +int first_job; + char *_rt_run_id; char *_rt_our_prog_name; char *_rt_other_prog_name; @@ -79,15 +81,18 @@ char _rt_shm_name[_ID_SZ] = "/_libextra_barrier-"; #if LITMUS lt_t _rt_period; int _rt_crit; +lt_t _rt_phase; +lt_t _rt_cost; +lt_t _rt_deadline; struct control_page *_rt_cp; #endif static void _rt_load_params_itrl(int argc, char **argv) { #ifdef PAIRED - if (argc != (8 + LITMUS*2) && argc != (9 + LITMUS*2)) { + if (argc != (8 + LITMUS*5) && argc != (9 + LITMUS*5)) { fprintf(stderr, "Usage: %s \n", argv[0]); #else - if (argc != (6 + LITMUS*2)) { + if (argc != (6 + LITMUS*5)) { fprintf(stderr, "Usage: %s \n", argv[0]); #endif /* PAIRED */ fprintf(stderr, " string for logging. Name of this task.\n"); @@ -105,6 +110,9 @@ static void _rt_load_params_itrl(int argc, char **argv) { #if LITMUS fprintf(stderr, " in ms\n"); fprintf(stderr, " 0 for Level-A, 1 for Level-B, 2 for Level-C\n"); + fprintf(stderr, " in ms\n"); + fprintf(stderr, " in ms\n"); + fprintf(stderr, " in ms\n"); #endif /* LITMUS */ exit(1); } @@ -144,18 +152,23 @@ static void _rt_load_params_itrl(int argc, char **argv) { fprintf(stderr, "Run ID is too large! Keep it to less than %d characters.\n", _RT_FILENAME_LEN); exit(1); } -#ifdef PAIRED - // __rt_sem2_name happens to be the longest - if (strlen(pairId) + strlen(_rt_sem2_name) > _ID_SZ) { - fprintf(stderr, "PairID is too long! Maximum length is %ld characters.\n", _ID_SZ - strlen(_rt_sem2_name)); - exit(1); - } _rt_start_time = calloc(_rt_max_jobs * _rt_will_output, sizeof(long long)); _rt_end_time = calloc(_rt_max_jobs * _rt_will_output, sizeof(long long)); if (!_rt_end_time || !_rt_start_time) { perror("Unable to allocate buffers for execution times"); exit(1); } + _rt_exec_time = calloc(_rt_max_jobs * _rt_will_output, sizeof(float)); + if (!_rt_exec_time) { + perror("Unable to allocate buffer for execution times"); + exit(1); + } +#ifdef PAIRED + // __rt_sem2_name happens to be the longest + if (strlen(pairId) + strlen(_rt_sem2_name) > _ID_SZ) { + fprintf(stderr, "PairID is too long! Maximum length is %ld characters.\n", _ID_SZ - strlen(_rt_sem2_name)); + exit(1); + } // Use PairID to create unique semaphore and shared memory paths strcat(_rt_sem1_name, pairId); strcat(_rt_sem2_name, pairId); @@ -194,18 +207,18 @@ static void _rt_load_params_itrl(int argc, char **argv) { exit(1); } *_rt_barrier = 0; -#else - _rt_exec_time = calloc(_rt_max_jobs * _rt_will_output, sizeof(float)); - if (!_rt_exec_time) { - perror("Unable to allocate buffer for execution times"); - exit(1); - } +// #else + #endif /* PAIRED */ _rt_jobs_complete = 0; + first_job = 1; mlockall(MCL_CURRENT || MCL_FUTURE); #if LITMUS _rt_period = ms2ns(strtoul(argv[end], NULL, 10)); _rt_crit = atoi(argv[end+1]); + _rt_phase = ms2ns(strtoul(argv[end+2], NULL, 10)); + _rt_cost = ms2ns(strtoul(argv[end+3], NULL, 10)); + _rt_deadline = ms2ns(strtoul(argv[end+4], NULL, 10)); unsigned int wait = 1; if (be_migrate_to_domain(_rt_core) < 0) { perror("Unable to migrate to specified CPU"); @@ -214,10 +227,10 @@ static void _rt_load_params_itrl(int argc, char **argv) { struct rt_task rt_param; init_rt_task_param(&rt_param); // Fake exec cost - this value ignored by the MC^2 scheduler - rt_param.exec_cost = _rt_period; + rt_param.exec_cost = _rt_cost; rt_param.period = _rt_period; - rt_param.relative_deadline = 0; - rt_param.phase = 0; + rt_param.relative_deadline = _rt_deadline; + rt_param.phase = _rt_phase; rt_param.priority = LITMUS_LOWEST_PRIORITY; rt_param.cls = _rt_crit; rt_param.budget_policy = NO_ENFORCEMENT; @@ -236,10 +249,10 @@ static void _rt_load_params_itrl(int argc, char **argv) { exit(1); } _rt_cp = get_ctrl_page(); - if (wait && wait_for_ts_release() != 0) { - perror("Unable to wait for taskset release"); - exit(1); - } + // if (wait && wait_for_ts_release() != 0) { + // perror("Unable to wait for taskset release"); + // exit(1); + // } #endif /* LITMUS */ #if MMDC_PROF SETUP_MMDC @@ -337,18 +350,18 @@ static void _rt_save_job_result() { fprintf(stderr, "Max jobs setting too small! Trying to record job #%ld when we only have space for %ld jobs. Exiting...\n", _rt_jobs_complete, _rt_max_jobs); exit(1); } -#ifdef PAIRED +// #ifdef PAIRED _rt_start_time[_rt_jobs_complete] = _rt_start.tv_sec; _rt_start_time[_rt_jobs_complete] *= _BILLION; _rt_start_time[_rt_jobs_complete] += _rt_start.tv_nsec; _rt_end_time[_rt_jobs_complete] = _rt_end.tv_sec; _rt_end_time[_rt_jobs_complete] *= _BILLION; _rt_end_time[_rt_jobs_complete] += _rt_end.tv_nsec; -#else +// #else _rt_exec_time[_rt_jobs_complete] = _rt_end.tv_sec - _rt_start.tv_sec; _rt_exec_time[_rt_jobs_complete] *= _BILLION; _rt_exec_time[_rt_jobs_complete] += _rt_end.tv_nsec - _rt_start.tv_nsec; -#endif /* PAIRED */ +// #endif /* PAIRED */ #if MMDC_PROF _rt_mmdc_read[_rt_jobs_complete] = mmdc_res.read_bytes; _rt_mmdc_write[_rt_jobs_complete] = mmdc_res.write_bytes; @@ -373,14 +386,14 @@ static void _rt_write_to_file() { for (int i = 0; i < _rt_jobs_complete; i++){ fprintf(fp, "%s %s %u %s %ld", _rt_our_prog_name, _rt_other_prog_name, _rt_core, _rt_other_core, _rt_max_jobs); -#ifdef PAIRED +// #ifdef PAIRED // For unclear legacy reasons, paired tasks emit sec and ns separately fprintf(fp, " %lld %lld %lld %lld", _rt_start_time[i] / _BILLION, _rt_start_time[i] % _BILLION, _rt_end_time[i] / _BILLION, _rt_end_time[i] % _BILLION); -#else +// #else fprintf(fp, " %.f", _rt_exec_time[i]); -#endif /* PAIRED */ +// #endif /* PAIRED */ fprintf(fp, " %s %d %.f %.f\n", _rt_run_id, i, #if MMDC_PROF _rt_mmdc_read[i], _rt_mmdc_write[i]); @@ -390,12 +403,12 @@ static void _rt_write_to_file() { } fclose(fp); out: -#if LITMUS - if (task_mode(BACKGROUND_TASK) != 0) { - perror("Unable to become a real-time task"); - exit(1); - } -#endif /* LITMUS */ +// #if LITMUS +// if (task_mode(BACKGROUND_TASK) != 0) { +// perror("Unable to become a real-time task"); +// exit(1); +// } +// #endif /* LITMUS */ #ifdef PAIRED munmap(_rt_barrier, 2); sem_unlink(_rt_sem1_name); @@ -414,41 +427,45 @@ out: // Start a job static void _rt_start_loop() { -#if LITMUS - static lt_t last = 0; - lt_t now = litmus_clock(); - if (now > _rt_cp->deadline) { - fprintf(stderr, "(%s/%d:%lu) ", _rt_our_prog_name, gettid(), _rt_cp->job_index); - if (_rt_crit == 0) - fprintf(stderr, "CATASTROPHIC: Level-A"); - else if (_rt_crit == 1) - fprintf(stderr, "HAZARDOUS: Level-B"); - else - fprintf(stderr, "MAJOR: Level-C"); - fprintf(stderr, " tardy %llu ns, " - "relative tardiness %f\n", - now - _rt_cp->deadline, - (now - _rt_cp->deadline) / (double)_rt_period); + // Let the first job run before synchrnous release --- make sure we have no further page faults + if(first_job == 1){ + // FLUSH_CACHES + return; } - if (last == 0) { - last = now; - } else if (now > last + 60ull * _BILLION && _rt_crit >= 2) { - last = now; - fprintf(stderr, "(%s/%d:%lu) Ping\n", _rt_our_prog_name, gettid(), _rt_cp->job_index); +#if LITMUS + // static lt_t last = 0; + if (_rt_jobs_complete == 0) { + if(wait_for_ts_release() != 0){ + perror("Unable to wait for taskset release"); + exit(1); + } } - if (sleep_next_period() != 0) { - perror("Unable to sleep for next period"); + else{ + if (sleep_next_period() != 0) { + perror("Unable to sleep for next period"); + } } + + // if (last == 0) { + // last = now; + // } else if (now > last + 60ull * _BILLION && _rt_crit >= 2) { + // last = now; + // fprintf(stderr, "(%s/%d:%lu) Ping\n", _rt_our_prog_name, gettid(), _rt_cp->job_index); + // } + // if (sleep_next_period() != 0) { + // perror("Unable to sleep for next period"); + // } #else sched_yield(); + // sleep(1); #endif /* LITMUS */ #ifdef PAIRED FIRST_UNLOCK FIRST_LOCK #endif /* PAIRED */ -#if !LITMUS +// #if !LITMUS FLUSH_CACHES -#endif +// #endif #ifdef PAIRED BARRIER_SYNC #endif /* PAIRED */ @@ -462,13 +479,35 @@ static void _rt_start_loop() { // Complete a job static void _rt_stop_loop() { clock_gettime(CLOCK_MONOTONIC, &_rt_end); + // Set first_job == 0 + if(first_job == 1){ + first_job = 0; + return; + } #if MMDC_PROF /* This freezes the profiling and makes results available */ pause_mmdc_profiling(mmdc); get_mmdc_profiling_results(mmdc, &mmdc_res); #endif /* MMDC_PROF */ _rt_save_job_result(); - _rt_jobs_complete++; +#if LITMUS + long long end = _rt_end_time[_rt_jobs_complete]; + if (end > _rt_cp->deadline) { + fprintf(stderr, "(%s/%d:%lu) ", _rt_our_prog_name, gettid(), _rt_cp->job_index); + fprintf(stderr, "tardy %llu ns, relative tardiness %f\n", end - _rt_cp->deadline, (end - _rt_cp->deadline) / (double)_rt_deadline); + } +#endif + _rt_jobs_complete++; +#if LITMUS + if(_rt_jobs_complete == _rt_max_jobs){ + // fprintf(stderr, "complete %s: %d\n" , _rt_our_prog_name, _rt_jobs_complete); + if (task_mode(BACKGROUND_TASK) != 0) { + perror("Unable to become background task"); + exit(1); + } + } +#endif + } /****** New API ****** diff --git a/no-stitch b/no-stitch new file mode 100644 index 0000000..3106dbe --- /dev/null +++ b/no-stitch @@ -0,0 +1,5 @@ +0, mser_qcif, mser_qcif__A, 10, 1, 120, 1, 78, 1, 0, 5, 5 +0, disparity_qcif, disparity_qcif__C, 10, 1, 123, 1, 78, 1, 5, 13, 13 +1, svm_qcif, svm_qcif__D, 10, 1, 122, 1, 78, 1, 27, 37, 37, sift_qcif, sift_qcif__E, 48, 48 +0, texture_synthesis_qcif, texture_synthesis_qcif__F, 10, 1, 125, 1, 78, 1, 74, 4, 4 +0, localization_qcif, localization_qcif__B, 10, 2, 121, 1, 78, 1, 5, 23, 23 \ No newline at end of file diff --git a/run_all_casestudies.sh b/run_all_casestudies.sh new file mode 100644 index 0000000..83e1d41 --- /dev/null +++ b/run_all_casestudies.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +# run this with sudo + +casestudies=("12" "20" "21" "30" "31" "32") #("10" "11" "12" "20" "21" "30" "31" "32") +periods=(129 68 75 126 164 189) #(86 104 129 68 75 126 164 189) #ms + +iterations=50000 +iteration_safety_margin=20 + +safety_wait_secs=3 + +sudo /home/ae/liblitmus/setsched P-FP +sudo /home/ae/liblitmus/showsched + + +if ! cat /proc/litmus/stats | grep -q 'real-time tasks = 0'; then + echo "ERROR: NOT ALL TASKS OUT OF SYSTEM." +fi + +for i in ${!casestudies[@]}; do + echo "------RELEASING sched-${casestudies[i]}------" + stderr_name = deadline_misses_sched-${casestudies[i]}_${iterations} + echo "stderr file goes to ${stderr_name}" + #sudo python3 run_case_study_dag.py sched-${casestudies[i]} 1 + sleep $safety_wait_secs + sudo /home/ae/liblitmus/release_ts + + if cat /proc/litmus/stats | grep -q 'real-time tasks = 0'; then + echo "ERROR: problem releasing tasks." + fi + sleep_dur=$(( ($iterations+$iteration_safety_margin)*${periods[i]}/1000+$safety_wait_secs )) + echo "sleeping for $sleep_dur s..." + sleep $sleep_dur + while ! cat /proc/litmus/stats | grep -q 'real-time tasks = 0'; do + sleep_dur=$(( ($iteration_safety_margin)*${periods[i]}/1000+$safety_wait_secs )) + echo "sleeping for $sleep_dur s..." + sleep $sleep_dur + done + + if cat /proc/litmus/stats | grep -q 'tardy'; then + echo "**********************DEADLINE MISS**********************" + fi +done +echo "printing deadline misses:" +cat deadline_misses +echo "-------------------------" diff --git a/run_all_sd-vbs.sh b/run_all_sd-vbs.sh index 97fc4f1..f59edf5 100755 --- a/run_all_sd-vbs.sh +++ b/run_all_sd-vbs.sh @@ -33,41 +33,40 @@ baseXI=SD-VBS/$(date +"%b%d-%H")-c-xi-$runID.txt echo "" | ../run_bench.sh -m base -p $coreCPU -l $maxJobs -b sd-vbsNames.txt -B -I xi $runID # Half L3, full L2 - i3 sees effect of half L3 baseI3=SD-VBS/$(date +"%b%d-%H")-c-i3-$runID.txt -echo "" | ../run_bench.sh -m base -p $coreCPU -l $maxJobs -b sd-vbsNames.txt -B -I i3 $runID +#echo "" | ../run_bench.sh -m base -p $coreCPU -l $maxJobs -b sd-vbsNames.txt -B -I i3 $runID # Half L3, half L2 - additional effect of half L2 baseI=SD-VBS/$(date +"%b%d-%H")-c-i-$runID.txt -echo "" | ../run_bench.sh -m base -p $coreCPU -l $maxJobs -b sd-vbsNames.txt -B -I i $runID -date +#echo "" | ../run_bench.sh -m base -p $coreCPU -l $maxJobs -b sd-vbsNames.txt -B -I i $runID +#date # Run the Level-C pairs pairC=SD-VBS/$(date +"%b%d-%H")-c-xi-async-$runID.txt -echo "" | ../run_bench.sh -m pair -p $coreCPU -P $threadCPU -l $maxJobs -b sd-vbsNames.txt -B -I xi -A $runID -date +#echo "" | ../run_bench.sh -m pair -p $coreCPU -P $threadCPU -l $maxJobs -b sd-vbsNames.txt -B -I xi -A $runID +#date # Run the Level-A/-B pairs -echo "Building benchmarks in paired configuration..." +echo "Building benchmarks in paired configuration... (remember to add this back)" cd benchmarks make CFLAGS=-DPAIRED compile -j30 > /dev/null # Suppress noisy output cd .. echo "Done. Continuing experiments..." # No cache isolation pairXI=SD-VBS/$(date +"%b%d-%H")-c-xi-$runID"-A.txt and -B.txt" -echo "" | ../run_bench.sh -m pair -p $coreCPU -P $threadCPU -l $maxJobs -b sd-vbsNames.txt -B -I xi $runID +#echo "" | ../run_bench.sh -m pair -p $coreCPU -P $threadCPU -l $maxJobs -b sd-vbsNames.txt -B -I xi $runID # Shared L2, split L3 pairI3=SD-VBS/$(date +"%b%d-%H")-c-i3-$runID"-A.txt and -B.txt" -echo "" | ../run_bench.sh -m pair -p $coreCPU -P $threadCPU -l $maxJobs -b sd-vbsNames.txt -B -I i3 $runID +#echo "" | ../run_bench.sh -m pair -p $coreCPU -P $threadCPU -l $maxJobs -b sd-vbsNames.txt -B -I i3 $runID # Split L2, split L3 pairI=SD-VBS/$(date +"%b%d-%H")-c-i-$runID"-A.txt and -B.txt" -echo "" | ../run_bench.sh -m pair -p $coreCPU -P $threadCPU -l $maxJobs -b sd-vbsNames.txt -B -I i $runID +#echo "" | ../run_bench.sh -m pair -p $coreCPU -P $threadCPU -l $maxJobs -b sd-vbsNames.txt -B -I i $runID date echo "==== DONE ====" echo "Results are in:" echo "- SD-VBS/$baseXI" -echo "- SD-VBS/$baseI3" -echo "- SD-VBS/$baseI" -echo "- SD-VBS/$pairXI" -echo "- SD-VBS/$pairI3" -echo "- SD-VBS/$pairI" -echo "- SD-VBS/$pairC" - +#echo "- SD-VBS/$baseI3" +#echo "- SD-VBS/$baseI" +#echo "- SD-VBS/$pairXI" +#echo "- SD-VBS/$pairI3" +#echo "- SD-VBS/$pairI" +#echo "- SD-VBS/$pairC" diff --git a/run_bench.sh b/run_bench.sh index 39e9dcb..0498e37 100755 --- a/run_bench.sh +++ b/run_bench.sh @@ -350,9 +350,9 @@ for (( i = 0; i < ${#bench[@]} ; i++ )); do echo $j > /sys/fs/resctrl/benchmarks/schemata while read ii; do # For WSS setting if [[ -v $LITMUS ]]; then - ./gen_input.py ${bench[$i]} inputs/${bench[$i]^}/$template_input $ii | numactl $numa_arg0 $prefix/${bench[$i]} $bench{[$i]}-$ii-$j $maxJobs $core $runID-$userRunID 1 + ./gen_input.py ${bench[$i]} inputs/${bench[$i]^}/$template_input $ii | numactl $numa_arg0 $prefix/${bench[$i]} $bench{[$i]}-$ii-$j $maxJobs $core $runID-$userRunID 1 0 else - ./gen_input.py ${bench[$i]} inputs/${bench[$i]^}/$template_input $ii | chrt -r 97 numactl $numa_arg0 taskset -c $core $prefix/${bench[$i]} ${bench[$i]}-$ii-$j $maxJobs $core $runID-$userRunID 1 + ./gen_input.py ${bench[$i]} inputs/${bench[$i]^}/$template_input $ii | chrt -r 97 numactl $numa_arg0 taskset -c $core $prefix/${bench[$i]} ${bench[$i]}-$ii-$j $maxJobs $core $runID-$userRunID 1 0 fi done < $wss_settings done < $cache_settings @@ -367,22 +367,22 @@ for (( i = 0; i < ${#bench[@]} ; i++ )); do if [[ ! -v async ]]; then # Synchronize between pairs - original hard real-time SMT approach if [[ -v $LITMUS ]]; then - echo "${input[$i]}" | numactl $numa_arg0 taskset -c $core $prefix/${bench[$i]} ${bench[$i]} $maxJobs $core $core_two ${bench[$j]} $runID-$userRunID-A 1 & PID1=$!; - echo "${input[$j]}" | numactl $numa_arg1 taskset -c $core_two $prefix/${bench[$j]} ${bench[$j]} $maxJobs $core_two $core ${bench[$i]} $runID-$userRunID-B 1 & PID2=$!; + echo "${input[$i]}" | numactl $numa_arg0 taskset -c $core $prefix/${bench[$i]} ${bench[$i]} $maxJobs $core $core_two ${bench[$j]} $runID-$userRunID-A 1 0 & PID1=$!; + echo "${input[$j]}" | numactl $numa_arg1 taskset -c $core_two $prefix/${bench[$j]} ${bench[$j]} $maxJobs $core_two $core ${bench[$i]} $runID-$userRunID-B 1 0 & PID2=$!; else - echo "${input[$i]}" | chrt -r 97 numactl $numa_arg0 taskset -c $core $prefix/${bench[$i]} ${bench[$i]} $maxJobs $core $core_two ${bench[$j]} $runID-$userRunID-A 1 & PID1=$!; - echo "${input[$j]}" | chrt -r 97 numactl $numa_arg1 taskset -c $core_two $prefix/${bench[$j]} ${bench[$j]} $maxJobs $core_two $core ${bench[$i]} $runID-$userRunID-B 1 & PID2=$!; + echo "${input[$i]}" | chrt -r 97 numactl $numa_arg0 taskset -c $core $prefix/${bench[$i]} ${bench[$i]} $maxJobs $core $core_two ${bench[$j]} $runID-$userRunID-A 1 0 & PID1=$!; + echo "${input[$j]}" | chrt -r 97 numactl $numa_arg1 taskset -c $core_two $prefix/${bench[$j]} ${bench[$j]} $maxJobs $core_two $core ${bench[$i]} $runID-$userRunID-B 1 0 & PID2=$!; fi # We launched them asynchronously, so we have to wait wait $PID1 $PID2 else # No synchronization between pairs - original soft real-time SMT approach if [[ -v $LITMUS ]]; then - echo "${input[$j]}" | numactl $numa_arg0 taskset -c $core $prefix/${bench[$j]} ${bench[$j]} -1 $core NULL 0 & PID1=$!; - echo "${input[$i]}" | numactl $numa_arg1 taskset -c $core_two $prefix/${bench[$i]} ${bench[$i]}"+"${bench[$j]} $maxJobs $core_two $runID-$userRunID 1 & PID2=$!; + echo "${input[$j]}" | numactl $numa_arg0 taskset -c $core $prefix/${bench[$j]} ${bench[$j]} -1 $core NULL 0 0 & PID1=$!; + echo "${input[$i]}" | numactl $numa_arg1 taskset -c $core_two $prefix/${bench[$i]} ${bench[$i]}"+"${bench[$j]} $maxJobs $core_two $runID-$userRunID 1 0 & PID2=$!; else echo "${input[$j]}" | chrt -r 97 numactl $numa_arg0 taskset -c $core $prefix/${bench[$j]} ${bench[$j]} -1 $core NULL 0 & PID1=$!; - echo "${input[$i]}" | chrt -r 97 numactl $numa_arg1 taskset -c $core_two $prefix/${bench[$i]} ${bench[$i]}"+"${bench[$j]} $maxJobs $core_two $runID-$userRunID 1 & PID2=$!; + echo "${input[$i]}" | chrt -r 97 numactl $numa_arg1 taskset -c $core_two $prefix/${bench[$i]} ${bench[$i]}"+"${bench[$j]} $maxJobs $core_two $runID-$userRunID 1 0 & PID2=$!; fi wait $PID2 kill $PID1 diff --git a/run_case_study_dag.py b/run_case_study_dag.py new file mode 100755 index 0000000..9ff1809 --- /dev/null +++ b/run_case_study_dag.py @@ -0,0 +1,244 @@ +#/usr/bin/python3 +# Make sure to run this as root!!!!! +import os +import sys +import re +import csv +import time +import subprocess + + +# Single tasks: +# 0, binary_name, task_name, iterations, my_core, runID, save?, period, criticality, phase, cost, deadline +# Paired tasks: +# 1, binary_name, task_name, iterations, my_core, runID, save?, period, criticality, phase, cost, deadline, other_binary_name, other_task_name, other_cost, other_deadline + + +binary_path = "./SD-VBS/dag_binaries/" +stderr_file = open("./deadline_misses", 'w+') + +LITMUS = True + +BINARY_NAME = 1 +TASK_NAME = 2 +NUM_ITERS = 3 +CORE_NUM = 4 +RUN_ID = 5 +SAVE_RESULT = 6 +PERIOD = 7 +CRT_LEVEL = 8 +PHASE= 9 +COST = 10 +DEADLINE = 11 + +OTHER_BINARY_NAME = 12 +OTHER_TASK_NAME = 13 +OTHER_COST = 14 +OTHER_DEADLINE = 15 +# OTHER_CORE_NUM = 12 +# PAIR_ID = 12 + +all_pids=[] +def run(command): + print(command) + os.system(command) + +def addpid(pid): + with open("./pids.txt", "a") as f: + f.write(str(pid) + "\n") +def ID2PID(lookupID): + res = None + # Find benchmark PID (avoid getting shell or numactl PID) + try: + res = subprocess.check_output("pgrep -af '" + lookupID + "' | grep -v numactl", shell=True) + except: + res = None + if res: + # Ignore the newline + return res.decode("utf-8").split(" ")[0].strip() + else: + return None + +def main(pathName): + + + with open("./pids.txt", "w") as f: + f.write("") + + input_cmd = {} + # Load input command for each binary + + with open("SD-VBS/sd-vbsNames.txt") as f: + for line in f: + name, cmd = line.split(maxsplit=1) + input_cmd[name.replace("./", "")] = cmd.replace("./", "./SD-VBS/").strip() + + task_launches = [] + max_core = 0 + all_cores = set() + # Load task specifications + with open(pathName, "r") as file: + for line in file: + parameters = line.split(",") + task_launches.append(parameters) + core_num = int(parameters[CORE_NUM]) % 16 + # if max_core < core_num: + # max_core = core_num + all_cores.add(core_num) + # if parameters[0] == '1': + # other_core_num = int(parameters[OTHER_CORE_NUM]) % 16 + # if other_core_num > max_core: + # max_core = other_core_num + + core_count = max_core+1 + # print(parameters) + + # Turn off power management + run('sudo echo "performance" | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor') + + ### Allocate Cache Ways ### + run('mount -t resctrl resctrl /sys/fs/resctrl') + # run('sudo echo "L3:0=0000;1=0000;2=0000;3=ffff" | sudo tee /sys/fs/resctrl/schemata') + run('sudo echo "L3:0=0000;1=0000;2=0000;3=000f" | sudo tee /sys/fs/resctrl/schemata') + for core in range(16): + if core not in all_cores: + continue + run("mkdir -p /sys/fs/resctrl/core-{}".format(core)) + ccx = core // 4 + in_ccx = core % 4 + mask = "0000" + # mask = "ffff" + mask = mask[:in_ccx] +'f'+ mask[in_ccx+1:] + run('echo {},{} > /sys/fs/resctrl/core-{}/cpus_list'.format(core,core+16, core)) + # run('echo {} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core)) + if ccx == 0: + # run('echo {},{} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core)) + run('echo "L3:0=' + mask + ';1=0000;2=0000;3=0000" > /sys/fs/resctrl/core-{}/schemata'.format(core)) + # run('echo "L3:0=ffff;1=0000;2=0000;3=0000" > /sys/fs/resctrl/core-{}/schemata'.format(core)) + if ccx == 1: + # run('echo {},{} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core)) + run('echo "L3:0=0000;1=' + mask + ';2=0000;3=0000" > /sys/fs/resctrl/core-{}/schemata'.format(core)) + if ccx == 2: + # run('echo {},{} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core)) + run('echo "L3:0=0000;1=0000;2=' + mask + ';3=0000" > /sys/fs/resctrl/core-{}/schemata'.format(core)) + if ccx == 3: + # run('echo {},{} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core)) + run('echo "L3:0=0000;1=0000;2=0000;3=' + mask + '" > /sys/fs/resctrl/core-{}/schemata'.format(core)) + + # return 1 + run("rm -rf /dev/shm/*") + + + pairID = 0 + ### Dispatch tasks + for launch in task_launches: + binary_name = launch[BINARY_NAME].strip() + task_name = launch[TASK_NAME].strip() + num_iters = launch[NUM_ITERS].strip() + core_num =launch[CORE_NUM].strip() + run_id = launch[RUN_ID].strip() + save_result = launch[SAVE_RESULT].strip() + if LITMUS: + period = launch[PERIOD].strip() + crt_level = launch[CRT_LEVEL].strip() + phase = launch[PHASE].strip() + cost = launch[COST].strip() + deadline = launch[DEADLINE].strip() + if(int(cost) > int(deadline)): + print("----Error: task {} cost = {} > {} = deadline!----".format(task_name, int(cost), int(deadline))) + continue + + + phys_core = int(core_num) % 16 + if ID2PID(task_name): + print("----ERROR: Task Name {} is already running! Did you end the previous case study?---- ".format(task_name)) + return 1 + # single tasks + if launch[0] == '0': + if LITMUS: + binary = binary_path + binary_name + "_single" + # Arg format: + arg = " " + task_name + " " + num_iters +" " + core_num +" " + run_id +" " + save_result+" " + period +" " + crt_level + " "+ phase + " " + cost + " " + deadline + bench_tsk = subprocess.Popen(input_cmd[binary_name] + " | numactl --interleave=all " + binary + arg, shell=True, executable='/bin/bash', stderr=stderr_file) + + else: + # Arg format: + binary = binary_path + binary_name + "_single_no_litmus" + arg = " " + task_name + " " + num_iters +" " + core_num +" " + run_id +" " + save_result+" " + bench_tsk = subprocess.Popen(input_cmd[binary_name] + " | numactl --interleave=all taskset -c " + core_num + " " + binary + arg, shell=True, executable='/bin/bash', stderr=stderr_file) + + print(input_cmd[binary_name] + " | numactl --interleave=all " + binary + arg) + # print(binary) + # print(arg) + pid_str = ID2PID(binary + " " + task_name) + if not pid_str: + print("Unable to launch {} as a solo task! Exiting...".format(task_name)) + return 1 + # run("echo " + pid_str + " > /sys/fs/resctrl/core-" + str(phys_core) + "/tasks") + else: + # Paried tasks + other_binary_name = launch[OTHER_BINARY_NAME].strip() + other_task_name = launch[OTHER_TASK_NAME].strip() + other_core_num = str(int(core_num)+16) + if LITMUS: + other_cost = launch[OTHER_COST].strip() + other_deadline = launch[OTHER_DEADLINE].strip() + if(int(other_cost) > int(other_deadline)): + print("----Error: task {} cost = {} > {} = deadline!----".format(other_task_name, int(other_cost), int(other_deadline))) + continue + #Check if SMT-paired correctly + # assert(abs(int(core_num)-int(other_core_num)) == 16) + if ID2PID(other_task_name): + print("----ERROR: Task Name {} is already running! Did you end the previous case study?----".format(other_task_name)) + return 1 + if LITMUS: + binary = binary_path + binary_name + "_pair" + other_binary = binary_path + other_binary_name + "_pair" + # Arg format: <0 other core> + arg1 = " " + task_name + " " + num_iters +" " + core_num +" " + other_core_num+" "+ other_task_name+" "+ run_id +" " + save_result+" " +str(pairID) +" "+ period +" " + crt_level +" "+phase + " " + cost + " " + deadline + arg2 = " " + other_task_name + " " + num_iters +" " + other_core_num +" " + core_num+" "+ task_name+" "+ run_id +" " + save_result+" " +str(pairID) +" "+ period +" " + crt_level+" " +phase + " " + other_cost + " " + other_deadline + # print(input_cmd[binary_name] + " | numactl --membind=0 " + binary + arg1) + # print(input_cmd[other_binary_name] + " | numactl --membind=1 " + other_binary + arg2) + bench_tsk1 = subprocess.Popen(input_cmd[binary_name] + " | numactl --membind=0 " + binary + arg1, shell=True, executable='/bin/bash', stderr=stderr_file) + bench_tsk2 = subprocess.Popen(input_cmd[other_binary_name] + " | numactl --membind=1 " + other_binary + arg2, shell=True, executable='/bin/bash', stderr=stderr_file) + else: + binary = binary_path + binary_name + "_pair_no_litmus" + other_binary = binary_path + other_binary_name + "_pair_no_litmus" + # Arg format: <0 other core> + arg1 = " " + task_name + " " + num_iters +" " + core_num +" " + other_core_num+" "+ other_task_name+" "+ run_id +" " + save_result+" " +str(pairID) + arg2 = " " + other_task_name + " " + num_iters +" " + other_core_num +" " + core_num+" "+ task_name+" "+ run_id +" " + save_result+" " +str(pairID) + bench_tsk1 = subprocess.Popen(input_cmd[binary_name] + " | numactl --membind=0 taskset -c " + core_num + " " + binary + arg1, shell=True, executable='/bin/bash', stderr=stderr_file) + bench_tsk2 = subprocess.Popen(input_cmd[other_binary_name] + " | numactl --membind=1 taskset -c " + other_core_num + " " + other_binary + arg2, shell=True, executable='/bin/bash', stderr=stderr_file) + # print(binary + " " + task_name,other_binary + " " +other_task_name) + pid1_str = ID2PID(binary + " " + task_name) + pid2_str = ID2PID(other_binary + " " +other_task_name) + if not pid1_str or not pid2_str: + print("Unable to launch {} and {} in a pair! Exiting...".format(task_name, other_task_name)) + return 1 + + # run("echo " + pid1_str + " > /sys/fs/resctrl/core-" + str(phys_core) + "/tasks") + # run("echo " + pid2_str + " > /sys/fs/resctrl/core-" + str(phys_core) + "/tasks") + # run("wait " + pid1_str) + # run("wait " + pid2_str) + pairID += 1 + +if __name__ == "__main__": + if len(sys.argv) < 4: + print("Usage: " + sys.argv[0] + " ") + exit(1) + if os.geteuid() != 0: + print("You must run this script as root to enable cache isolation and access LITMUS-RT.") + exit(1) + pathName = sys.argv[1] + if sys.argv[2] == '1': + LITMUS =True + else: + LITMUS = False + stderr_file = open(sys.argv[3], 'w+') + print("stderr: ", sys.argv[3]) + print("Litmus on ? " + str(LITMUS)) + err = main(pathName) + #input("Done. Waiting for termination signal...") + exit(err) + + diff --git a/sched-10 b/sched-10 new file mode 100644 index 0000000..e69de29 diff --git a/sched-11 b/sched-11 new file mode 100644 index 0000000..b1dc303 --- /dev/null +++ b/sched-11 @@ -0,0 +1,5 @@ +0, mser_qcif, mser_qcif__A, 50000, 1, 110, 1, 103, 1, 0, 7, 7 +1, localization_qcif, localization_qcif__B, 50000, 1, 111, 1, 103, 1, 7, 41, 41, disparity_qcif, disparity_qcif__C, 27, 27 +0, svm_qcif, svm_qcif__D, 50000, 1, 112, 1, 103, 1, 48, 38, 38 +0, texture_synthesis_qcif, texture_synthesis_qcif__F, 50000, 1, 115, 1, 103, 1, 88, 6, 6 +0, sift_qcif, sift_qcif__E, 50000, 2, 114, 1, 103, 1, 34, 54, 54 diff --git a/sched-12 b/sched-12 new file mode 100644 index 0000000..8da0a19 --- /dev/null +++ b/sched-12 @@ -0,0 +1,4 @@ +0, mser_qcif, mser_qcif__A, 50000, 1, 120, 1, 129, 1, 0, 7, 7 +1, localization_qcif, localization_qcif__B, 50000, 1, 121, 1, 129, 1, 7, 41, 41, disparity_qcif, disparity_qcif__C, 27, 27 +1, svm_qcif, svm_qcif__D, 50000, 1, 122, 1, 129, 1, 48, 55, 55, sift_qcif, sift_qcif__E, 72, 72 +0, texture_synthesis_qcif, texture_synthesis_qcif__F, 50000, 1, 125, 1, 129, 1, 120, 6, 6 diff --git a/sched-20 b/sched-20 new file mode 100644 index 0000000..403619f --- /dev/null +++ b/sched-20 @@ -0,0 +1,5 @@ +0, tracking_qcif, tracking_qcif__A, 50000, 1, 200, 1, 68, 1, 0, 9, 9 +1, mser_qcif, mser_qcif__B, 50000, 1, 201, 1, 68, 1, 9, 10, 10, localization_qcif, localization_qcif__C, 34, 34 +0, texture_synthesis_qcif, texture_synthesis_qcif__E, 50000, 1, 204, 1, 68, 1, 43, 6, 6 +0, disparity_qcif, disparity_qcif__F, 50000, 1, 205, 1, 68, 1, 49, 19, 19 +0, stitch_qcif, stitch_qcif__D, 50000, 2, 202, 1, 68, 1, 19, 27, 27 diff --git a/sched-21 b/sched-21 new file mode 100644 index 0000000..c79057f --- /dev/null +++ b/sched-21 @@ -0,0 +1,5 @@ +0, tracking_qcif, tracking_qcif__A, 50000, 1, 210, 1, 74, 1, 0, 9, 9 +1, mser_qcif, mser_qcif__B, 50000, 1, 211, 1, 74, 1, 9, 10, 10, localization_qcif, localization_qcif__C, 34, 34 +0, texture_synthesis_qcif, texture_synthesis_qcif__E, 50000, 1, 214, 1, 74, 1, 43, 6, 6 +0, disparity_qcif, disparity_qcif__F, 50000, 1, 215, 1, 74, 1, 49, 19, 19 +0, stitch_qcif, stitch_qcif__D, 50000, 2, 212, 1, 74, 1, 19, 27, 27 diff --git a/sched-30 b/sched-30 new file mode 100644 index 0000000..f545015 --- /dev/null +++ b/sched-30 @@ -0,0 +1,10 @@ +0, texture_synthesis_qcif, texture_synthesis_qcif__A, 50000, 1, 300, 1, 126, 1, 0, 6, 6 +0, disparity_qcif, disparity_qcif__B, 50000, 1, 305, 1, 126, 1, 6, 19, 19 +0, mser_qcif, mser_qcif__C, 50000, 1, 306, 1, 126, 1, 25, 7, 7 +0, localization_qcif, localization_qcif__D, 50000, 1, 307, 1, 126, 1, 32, 34, 34 +0, sift_qcif, sift_qcif__E, 50000, 1, 308, 1, 126, 1, 66, 54, 54 +0, texture_synthesis_qcif, texture_synthesis_qcif__J, 50000, 1, 309, 1, 126, 1, 120, 6, 6 +0, stitch_qcif, stitch_qcif__F, 50000, 2, 301, 1, 126, 1, 6, 27, 27 +0, tracking_qcif, tracking_qcif__G, 50000, 2, 302, 1, 126, 1, 33, 9, 9 +0, svm_qcif, svm_qcif__H, 50000, 2, 303, 1, 126, 1, 42, 38, 38 +0, stitch_qcif, stitch_qcif__I, 50000, 2, 304, 1, 126, 1, 80, 27, 27 diff --git a/sched-31 b/sched-31 new file mode 100644 index 0000000..beba5f7 --- /dev/null +++ b/sched-31 @@ -0,0 +1,8 @@ +0, texture_synthesis_qcif, texture_synthesis_qcif__A, 50000, 1, 310, 1, 163, 1, 0, 6, 6 +1, stitch_qcif, stitch_qcif__F, 50000, 1, 311, 1, 163, 1, 6, 37, 37, disparity_qcif, disparity_qcif__B, 28, 28 +0, tracking_qcif, tracking_qcif__G, 50000, 1, 312, 1, 163, 1, 43, 9, 9 +1, svm_qcif, svm_qcif__H, 50000, 1, 313, 1, 163, 1, 75, 55, 55, sift_qcif, sift_qcif__E, 72, 72 +0, texture_synthesis_qcif, texture_synthesis_qcif__J, 50000, 1, 319, 1, 163, 1, 157, 6, 6 +0, mser_qcif, mser_qcif__C, 50000, 2, 316, 1, 163, 1, 34, 7, 7 +0, localization_qcif, localization_qcif__D, 50000, 2, 317, 1, 163, 1, 41, 34, 34 +0, stitch_qcif, stitch_qcif__I, 50000, 2, 314, 1, 163, 1, 130, 27, 27 diff --git a/sched-32 b/sched-32 new file mode 100644 index 0000000..ed783e1 --- /dev/null +++ b/sched-32 @@ -0,0 +1,6 @@ +0, texture_synthesis_qcif, texture_synthesis_qcif__A, 50000, 1, 320, 1, 189, 1, 0, 6, 6 +1, stitch_qcif, stitch_qcif__F, 50000, 1, 321, 1, 189, 1, 6, 37, 37, disparity_qcif, disparity_qcif__B, 28, 28 +1, tracking_qcif, tracking_qcif__G, 50000, 1, 322, 1, 189, 1, 43, 12, 12, mser_qcif, mser_qcif__C, 9, 9 +1, svm_qcif, svm_qcif__H, 50000, 1, 323, 1, 189, 1, 55, 53, 53, localization_qcif, localization_qcif__D, 49, 49 +1, stitch_qcif, stitch_qcif__I, 50000, 1, 324, 1, 189, 1, 108, 45, 45, sift_qcif, sift_qcif__E, 70, 70 +0, texture_synthesis_qcif, texture_synthesis_qcif__J, 50000, 1, 329, 1, 189, 1, 178, 6, 6 diff --git a/smt_analysis/computeSMTslowdown.py b/smt_analysis/computeSMTslowdown.py index d612ea6..cf09402 100755 --- a/smt_analysis/computeSMTslowdown.py +++ b/smt_analysis/computeSMTslowdown.py @@ -81,7 +81,7 @@ for b1 in reliableNames: else: if not TIMES_ONLY: print("{:>10}".format("N/A"), end=" ") - if TIMES_ONLY and (not OK_PAIRS_ONLY or Cj * 10 > Ci): + if TIMES_ONLY:# and (not OK_PAIRS_ONLY or Cj * 10 > Ci): print("{:>12}".format(Cij), end=" ") elif OK_PAIRS_ONLY and Cj * 10 <= Ci: print("{:>12}".format("0"), end=" ") @@ -93,6 +93,17 @@ for b1 in reliableNames: M_vals.append(M) print("{:>10.3}".format(M), end=" ") print("") + +# Output baselines +print("Baselines ", end=" ") +print() +# Print rows +for b1 in reliableNames: + print("{:<14.14}:".format(b1), end=" ") + Ci = sample_f(baseline_times[b1]) + print("{:>12}".format(Ci), end=" ") + print("") + # Print some statistics about the distribution print("Overall average is {:>5.3} with standard deviation {:>5.3} using `{}`".format(np.mean(M_vals), np.std(M_vals), sample_f.__name__)) Ms = np.asarray(M_vals, dtype=np.float32) diff --git a/smt_analysis/libSMT.py b/smt_analysis/libSMT.py index c0b5178..881ef07 100755 --- a/smt_analysis/libSMT.py +++ b/smt_analysis/libSMT.py @@ -17,7 +17,7 @@ def assert_valid_input_files(names, on_fail): # @returns max_res May of benchmark to maximum execution time among all samples for that benchmark def load_baseline(f): # constants for columns of baseline data files - TOTAL_NS = 5 + TOTAL_NS = 9 BENCH_NAME = 0 SAMPLES = 4 @@ -65,8 +65,8 @@ def load_paired(file1, file2, benchmarkCount): START_N = 6 # Start nanoseconds END_S = 7 # End seconds END_N = 8 # End nanoseconds - RUN_ID = 9 - JOB_NUM = 10 + RUN_ID = 10 + JOB_NUM = 11 with open(fil