From 92df3dcae6747e4410574e7bf1f14dd1c07c3471 Mon Sep 17 00:00:00 2001 From: leochanj105 Date: Fri, 29 Oct 2021 03:40:38 -0400 Subject: tmp 10/29 --- smt_analysis/computeSMTslowdown.py | 13 ++++++++++++- smt_analysis/libSMT.py | 10 ++++++---- 2 files changed, 18 insertions(+), 5 deletions(-) (limited to 'smt_analysis') 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(file1) as f1: numJobs = int(f1.readline().split()[TRIALS]) @@ -101,7 +101,9 @@ def load_paired(file1, file2, benchmarkCount): end2 = int(lineArr2[END_S]) * 10**9 + int(lineArr2[END_N]) maxEnd = max(end1, end2) # Time actually co-scheduled is minEnd - maxStart, but Sims uses a different model - time[bench1][bench2][job_idx] = maxEnd - minStart + #time[bench1][bench2][job_idx] = maxEnd - minStart + time[bench1][bench2][job_idx] = end1-minStart + time[bench2][bench1][job_idx] = end2-minStart # Compute offset: if first job starts at t=0, when does second start? offset[bench1][bench2][job_idx] = abs(start2-start1) # Compute some running statistics -- cgit v1.2.2