From 5f48f487da55c2af82fb3ebd94808598174d9aaf Mon Sep 17 00:00:00 2001 From: stephenzhang Date: Mon, 24 Aug 2020 10:17:22 -0400 Subject: [PATCH] update --- data_distribution.py | 30 ------------------------------ make_table_script.py | 17 ++++++++--------- 2 files changed, 8 insertions(+), 39 deletions(-) delete mode 100644 data_distribution.py diff --git a/data_distribution.py b/data_distribution.py deleted file mode 100644 index 750213b..0000000 --- a/data_distribution.py +++ /dev/null @@ -1,30 +0,0 @@ -import os -import numpy as np -def average(filename): - with open(filename) as f: - # result = np.array([0]*18, dtype="float32") - result = 0 - job_num = 0 - for line in f.readlines(): - if not line.startswith(";"): - job_num += 1 - line_arr = line.strip().split() - if job_num > 1: - result += float(line_arr[1]) - temp - temp = float(line_arr[1]) - return result/job_num - - -filenames = [ - "CTC-SP2-1996-3.1-cln.swf", - "SDSC-SP2-1998-4.2-cln.swf", - "SDSC-BLUE-2000-4.2-cln.swf", - "HPC2N-2002-2.2-cln.swf", - "ANL-Intrepid-2009-1.swf", - "lublin_256.swf" -] -cpus = [338, 128, 1152, 240, 163840, 256] -path = "./data" -for index, i in enumerate(filenames): - aver = average(os.path.join(path,i)) - print(i,aver) \ No newline at end of file diff --git a/make_table_script.py b/make_table_script.py index 0963ace..a4d13e8 100644 --- a/make_table_script.py +++ b/make_table_script.py @@ -28,13 +28,12 @@ for backfil in [0, 1]: for model, workload, batch_job_slice in zip(models, workloads, batches): - if 1 or workload == "data/SDSC-SP2-1998-4.2-cln.swf": - print("*"*20+model+"_seed_"+str(seed)+"*"*20) - sub_file = os.listdir(dire+"/"+model)[-1] - command = "--rlmodel {6}{0}/{8}/ --seed {1} --len {2} --backfil {3} --score_type {4} --batch_job_slice {5} --workload {7} --iter {9}"\ - .format(model, seed, len, backfil, score_type, batch_job_slice, dire, workload, sub_file, iter) - print(command) - s = os.popen("python"+ " -W ignore compare-make-table.py " + command).read() + print("*"*20+model+"_seed_"+str(seed)+"*"*20) + sub_file = os.listdir(dire+"/"+model)[-1] + command = "--rlmodel {6}{0}/{8}/ --seed {1} --len {2} --backfil {3} --score_type {4} --batch_job_slice {5} --workload {7} --iter {9}"\ + .format(model, seed, len, backfil, score_type, batch_job_slice, dire, workload, sub_file, iter) + print(command) + s = os.popen("python"+ " -W ignore compare-make-table.py " + command).read() - print(s) - print("*"*50) + print(s) + print("*"*50)