diff options
| author | Joshua Bakita <jbakita@cs.unc.edu> | 2024-11-14 16:30:50 -0500 |
|---|---|---|
| committer | Joshua Bakita <jbakita@cs.unc.edu> | 2024-11-14 16:31:33 -0500 |
| commit | adca31b9bfa537da927a21fdb8e65891f0a02c53 (patch) | |
| tree | f415caa5c2b9fb0950ef52e7c52a1a9d53c92c05 /run_case_study_dag.py | |
| parent | 92df3dcae6747e4410574e7bf1f14dd1c07c3471 (diff) | |
Changes left by Tyler on tamartas22-casestudy
Found while cleaning up and removing his home directory
Diffstat (limited to 'run_case_study_dag.py')
| -rwxr-xr-x | run_case_study_dag.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/run_case_study_dag.py b/run_case_study_dag.py index 9ff1809..c251a57 100755 --- a/run_case_study_dag.py +++ b/run_case_study_dag.py | |||
| @@ -15,7 +15,7 @@ import subprocess | |||
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | binary_path = "./SD-VBS/dag_binaries/" | 17 | binary_path = "./SD-VBS/dag_binaries/" |
| 18 | stderr_file = open("./deadline_misses", 'w+') | 18 | #stderr_file = open("./deadline_misses", 'a+') |
| 19 | 19 | ||
| 20 | LITMUS = True | 20 | LITMUS = True |
| 21 | 21 | ||
| @@ -195,8 +195,8 @@ def main(pathName): | |||
| 195 | binary = binary_path + binary_name + "_pair" | 195 | binary = binary_path + binary_name + "_pair" |
| 196 | other_binary = binary_path + other_binary_name + "_pair" | 196 | other_binary = binary_path + other_binary_name + "_pair" |
| 197 | # Arg format: <unique name> <num iters> <core> <0 other core> <other name> <runID> <save?> <pairID> <period> <crit lvl> <phase> <other_cost> <other_deadline> | 197 | # Arg format: <unique name> <num iters> <core> <0 other core> <other name> <runID> <save?> <pairID> <period> <crit lvl> <phase> <other_cost> <other_deadline> |
| 198 | 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 | 198 | arg1 = " " + task_name + " " + num_iters +" " + core_num +" " + other_core_num+" "+ other_task_name+" "+ run_id +"_A " + save_result+" " +str(pairID) +" "+ period +" " + crt_level +" "+phase + " " + cost + " " + deadline |
| 199 | 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 | 199 | arg2 = " " + other_task_name + " " + num_iters +" " + other_core_num +" " + core_num+" "+ task_name+" "+ run_id +"_B " + save_result+" " +str(pairID) +" "+ period +" " + crt_level+" " +phase + " " + other_cost + " " + other_deadline |
| 200 | # print(input_cmd[binary_name] + " | numactl --membind=0 " + binary + arg1) | 200 | # print(input_cmd[binary_name] + " | numactl --membind=0 " + binary + arg1) |
| 201 | # print(input_cmd[other_binary_name] + " | numactl --membind=1 " + other_binary + arg2) | 201 | # print(input_cmd[other_binary_name] + " | numactl --membind=1 " + other_binary + arg2) |
| 202 | bench_tsk1 = subprocess.Popen(input_cmd[binary_name] + " | numactl --membind=0 " + binary + arg1, shell=True, executable='/bin/bash', stderr=stderr_file) | 202 | bench_tsk1 = subprocess.Popen(input_cmd[binary_name] + " | numactl --membind=0 " + binary + arg1, shell=True, executable='/bin/bash', stderr=stderr_file) |
| @@ -205,8 +205,8 @@ def main(pathName): | |||
| 205 | binary = binary_path + binary_name + "_pair_no_litmus" | 205 | binary = binary_path + binary_name + "_pair_no_litmus" |
| 206 | other_binary = binary_path + other_binary_name + "_pair_no_litmus" | 206 | other_binary = binary_path + other_binary_name + "_pair_no_litmus" |
| 207 | # Arg format: <unique name> <num iters> <core> <0 other core> <other name> <runID> <save?> <pairID> | 207 | # Arg format: <unique name> <num iters> <core> <0 other core> <other name> <runID> <save?> <pairID> |
| 208 | arg1 = " " + task_name + " " + num_iters +" " + core_num +" " + other_core_num+" "+ other_task_name+" "+ run_id +" " + save_result+" " +str(pairID) | 208 | arg1 = " " + task_name + " " + num_iters +" " + core_num +" " + other_core_num+" "+ other_task_name+" "+ run_id +"_A " + save_result+" " +str(pairID) |
| 209 | arg2 = " " + other_task_name + " " + num_iters +" " + other_core_num +" " + core_num+" "+ task_name+" "+ run_id +" " + save_result+" " +str(pairID) | 209 | arg2 = " " + other_task_name + " " + num_iters +" " + other_core_num +" " + core_num+" "+ task_name+" "+ run_id +"_B " + save_result+" " +str(pairID) |
| 210 | 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) | 210 | 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) |
| 211 | 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) | 211 | 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) |
| 212 | # print(binary + " " + task_name,other_binary + " " +other_task_name) | 212 | # print(binary + " " + task_name,other_binary + " " +other_task_name) |
| @@ -234,7 +234,7 @@ if __name__ == "__main__": | |||
| 234 | LITMUS =True | 234 | LITMUS =True |
| 235 | else: | 235 | else: |
| 236 | LITMUS = False | 236 | LITMUS = False |
| 237 | stderr_file = open(sys.argv[3], 'w+') | 237 | stderr_file = open(sys.argv[3], 'a+') |
| 238 | print("stderr: ", sys.argv[3]) | 238 | print("stderr: ", sys.argv[3]) |
| 239 | print("Litmus on ? " + str(LITMUS)) | 239 | print("Litmus on ? " + str(LITMUS)) |
| 240 | err = main(pathName) | 240 | err = main(pathName) |
