From 4009c36127223f6387676d4731250c0a32c11924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20R=C3=B6hl?= Date: Wed, 21 Aug 2019 16:03:23 +0200 Subject: [PATCH] Add header line to output for later use in bench.plot --- MemoryHierarchy/bench.pl | 2 +- MemoryHierarchy/bench.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/MemoryHierarchy/bench.pl b/MemoryHierarchy/bench.pl index 6c29456..d1e91a4 100755 --- a/MemoryHierarchy/bench.pl +++ b/MemoryHierarchy/bench.pl @@ -22,7 +22,7 @@ if ( $ARGV[1] eq 'seq' ){ $type = 2; } - +print("# striad $numCores $SMT $ARGV[1]\n"); while ( $N < 8000000 ) { my $result; my $performance = '0.00'; diff --git a/MemoryHierarchy/bench.py b/MemoryHierarchy/bench.py index 5d12715..48ec4c3 100755 --- a/MemoryHierarchy/bench.py +++ b/MemoryHierarchy/bench.py @@ -52,12 +52,14 @@ else: sys.exit(1) smt = int(sys.argv[3]) if len(sys.argv) == 4 else default_smt +print("# striad {} {} {}".format(numcores, smt, striad_type)) + N = start_N while N < max_N: performance = 0 result = None runcmd = "likwid-pin -c E:S0:{}:1:{} -q ./striad {} {}".format(numcores, smt, - striad_t, N) + striad_t, N) while performance == 0: p = subprocess.Popen(runcmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, @@ -72,4 +74,5 @@ while N < max_N: print("Execution failed: {}".format(runcmd)) break print(result) + sys.stdout.flush() N = int(N * scale_N)