From c1e6f2db8e9e3589e6bdc463256cbc9c59906ae7 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Wed, 15 May 2019 16:11:26 +0200 Subject: Measures for bitslices-aes, bitsliced-tea and complex_mat --- test/monniaux/bitsliced-aes/make.proto | 2 ++ test/monniaux/bitsliced-tea/make.proto | 2 ++ test/monniaux/clean_csv.sh | 9 +++++++++ test/monniaux/complex/complex_mat.c | 6 +++--- test/monniaux/complex/make.proto | 1 + test/monniaux/genmake.py | 5 +++-- test/monniaux/run_benches.sh | 2 +- 7 files changed, 21 insertions(+), 6 deletions(-) create mode 100755 test/monniaux/clean_csv.sh (limited to 'test') diff --git a/test/monniaux/bitsliced-aes/make.proto b/test/monniaux/bitsliced-aes/make.proto index 530d7e36..5fb11e5f 100644 --- a/test/monniaux/bitsliced-aes/make.proto +++ b/test/monniaux/bitsliced-aes/make.proto @@ -1,2 +1,4 @@ sources: "$(wildcard *.c) tests/tests.c" target: test +measures: ["cycles"] +name: bitsliced-aes diff --git a/test/monniaux/bitsliced-tea/make.proto b/test/monniaux/bitsliced-tea/make.proto index 7ddc95d2..09113280 100644 --- a/test/monniaux/bitsliced-tea/make.proto +++ b/test/monniaux/bitsliced-tea/make.proto @@ -1,2 +1,4 @@ objdeps: [{name: bstea_run, compiler: gcc}] target: bstea +name: bitsliced-tea +measures: ["cycles"] diff --git a/test/monniaux/clean_csv.sh b/test/monniaux/clean_csv.sh new file mode 100755 index 00000000..e480aa5a --- /dev/null +++ b/test/monniaux/clean_csv.sh @@ -0,0 +1,9 @@ + +source benches.sh + +rm -f commands.txt +for bench in $benches; do + (cd $bench && rm *.csv) +done + +rm measures.csv diff --git a/test/monniaux/complex/complex_mat.c b/test/monniaux/complex/complex_mat.c index 6c7dae1d..b7103f60 100644 --- a/test/monniaux/complex/complex_mat.c +++ b/test/monniaux/complex/complex_mat.c @@ -227,9 +227,9 @@ int main() { printf("c1==c8: %s\n" "c1==c9: %s\n" - "c1_time = %" PRIu64 "\n" - "c8_time = %" PRIu64 "\n" - "c9_time = %" PRIu64 "\n", + "c1_time : %" PRIu64 "\n" + "c8_time : %" PRIu64 "\n" + "c9_time : %" PRIu64 "\n", COMPLEX_mat_equal(m, n, c1, p, c8, p)?"true":"false", COMPLEX_mat_equal(m, n, c1, p, c9, p)?"true":"false", diff --git a/test/monniaux/complex/make.proto b/test/monniaux/complex/make.proto index b4d1222f..b959c611 100644 --- a/test/monniaux/complex/make.proto +++ b/test/monniaux/complex/make.proto @@ -1 +1,2 @@ target: complex_mat +measures: ["c1_time"] diff --git a/test/monniaux/genmake.py b/test/monniaux/genmake.py index 80ef53e3..ddbdf839 100755 --- a/test/monniaux/genmake.py +++ b/test/monniaux/genmake.py @@ -43,6 +43,7 @@ objdeps = settings["objdeps"] if "objdeps" in settings else [] intro = settings["intro"] if "intro" in settings else "" sources = settings["sources"] if "sources" in settings else None measures = settings["measures"] if "measures" in settings else [] +name = settings["name"] if "name" in settings else None if sources: intro += "\nsrc=" + sources @@ -87,7 +88,7 @@ def print_measure_rule(environments, measures): print("measures.csv: $(PRODUCTS_OUT)") print(' echo ", {}" > $@'.format(make_env_list(environments))) for measure in measures: - print(' echo "{name} {measure}"'.format(name=basename, measure=measure), end="") + print(' echo "{name} {measure}"'.format(name=basename if not name else name, measure=measure if len(measures) > 1 else ""), end="") for env in environments: for optim in env.optimizations: print(", $$(grep '{measure}' {outfile} | cut -d':' -f2)".format( @@ -110,7 +111,7 @@ PRODUCTS_OUT=$(addsuffix .out,$(PRODUCTS)) all: $(PRODUCTS) .PHONY: -exec: measures.csv +run: measures.csv """.format(intro=intro, prod=" ".join(products))) diff --git a/test/monniaux/run_benches.sh b/test/monniaux/run_benches.sh index 9537f63a..4db4b5a2 100755 --- a/test/monniaux/run_benches.sh +++ b/test/monniaux/run_benches.sh @@ -3,7 +3,7 @@ source benches.sh rm -f commands.txt for bench in $benches; do - echo "(cd $bench && make -j5 exec)" >> commands.txt + echo "(cd $bench && make -j5 run)" >> commands.txt done cat commands.txt | xargs -n1 -I{} -P4 bash -c '{}' -- cgit