summaryrefslogtreecommitdiffstats
path: root/run_case_study_dag.py
diff options
context:
space:
mode:
authorleochanj105 <leochanj@live.unc.edu>2021-10-26 00:07:19 -0400
committerleochanj105 <leochanj@live.unc.edu>2021-10-26 00:07:19 -0400
commit95b383ce406872937fb810ac1f8b8a17ef887429 (patch)
tree63b9be99c2fcbeac9c3f6d2992ac37c69124ee2f /run_case_study_dag.py
parent65ea49f13da3e20c6e0a5c0a8a4432d6b61f7674 (diff)
fixed power issue and extra.h first job issue
Diffstat (limited to 'run_case_study_dag.py')
-rwxr-xr-xrun_case_study_dag.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/run_case_study_dag.py b/run_case_study_dag.py
index d4f12e1..e2c4607 100755
--- a/run_case_study_dag.py
+++ b/run_case_study_dag.py
@@ -99,18 +99,20 @@ def main(pathName):
99 in_ccx = core % 4 99 in_ccx = core % 4
100 mask = "0000" 100 mask = "0000"
101 mask = mask[:in_ccx] +'f'+ mask[in_ccx+1:] 101 mask = mask[:in_ccx] +'f'+ mask[in_ccx+1:]
102 run('echo {},{} > /sys/fs/resctrl/core-{}/cpus_list'.format(core,core+16, core))
103 # run('echo {} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core))
102 if ccx == 0: 104 if ccx == 0:
103 run('echo {} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core)) 105 # run('echo {},{} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core))
104 run('echo "L3:0=' + mask + ';1=0000;2=0000;3=0000" > /sys/fs/resctrl/core-{}/schemata'.format(core)) 106 run('echo "L3:0=' + mask + ';1=0000;2=0000;3=0000" > /sys/fs/resctrl/core-{}/schemata'.format(core))
105 # run('echo "L3:0=ffff;1=0000;2=0000;3=0000" > /sys/fs/resctrl/core-{}/schemata'.format(core)) 107 # run('echo "L3:0=ffff;1=0000;2=0000;3=0000" > /sys/fs/resctrl/core-{}/schemata'.format(core))
106 if ccx == 1: 108 if ccx == 1:
107 run('echo {} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core)) 109 # run('echo {},{} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core))
108 run('echo "L3:0=0000;1=' + mask + ';2=0000;3=0000" > /sys/fs/resctrl/core-{}/schemata'.format(core)) 110 run('echo "L3:0=0000;1=' + mask + ';2=0000;3=0000" > /sys/fs/resctrl/core-{}/schemata'.format(core))
109 if ccx == 2: 111 if ccx == 2:
110 run('echo {} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core)) 112 # run('echo {},{} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core))
111 run('echo "L3:0=0000;1=0000;2=' + mask + ';3=0000" > /sys/fs/resctrl/core-{}/schemata'.format(core)) 113 run('echo "L3:0=0000;1=0000;2=' + mask + ';3=0000" > /sys/fs/resctrl/core-{}/schemata'.format(core))
112 if ccx == 3: 114 if ccx == 3:
113 run('echo {} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core)) 115 # run('echo {},{} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core))
114 run('echo "L3:0=0000;1=0000;2=0000;3=' + mask + '" > /sys/fs/resctrl/core-{}/schemata'.format(core)) 116 run('echo "L3:0=0000;1=0000;2=0000;3=' + mask + '" > /sys/fs/resctrl/core-{}/schemata'.format(core))
115 117
116 # return 1 118 # return 1
@@ -143,13 +145,14 @@ def main(pathName):
143 # Arg format: <unique name> <num_iters> <core> <NULL runID> <save?> <period> <crit lvl> <phase> 145 # Arg format: <unique name> <num_iters> <core> <NULL runID> <save?> <period> <crit lvl> <phase>
144 arg = " " + task_name + " " + num_iters +" " + core_num +" " + run_id +" " + save_result+" " + period +" " + crt_level + " "+ phase 146 arg = " " + task_name + " " + num_iters +" " + core_num +" " + run_id +" " + save_result+" " + period +" " + crt_level + " "+ phase
145 bench_tsk = subprocess.Popen(input_cmd[binary_name] + " | numactl --interleave=all " + binary + arg, shell=True, executable='/bin/bash', stderr=stderr_file) 147 bench_tsk = subprocess.Popen(input_cmd[binary_name] + " | numactl --interleave=all " + binary + arg, shell=True, executable='/bin/bash', stderr=stderr_file)
148
146 else: 149 else:
147 # Arg format: <unique name> <num_iters> <core> <NULL runID> 150 # Arg format: <unique name> <num_iters> <core> <NULL runID> <save?>
148 binary = binary_path + binary_name + "_single_no_litmus" 151 binary = binary_path + binary_name + "_single_no_litmus"
149 arg = " " + task_name + " " + num_iters +" " + core_num +" " + run_id +" " + save_result+" " 152 arg = " " + task_name + " " + num_iters +" " + core_num +" " + run_id +" " + save_result+" "
150 bench_tsk = subprocess.Popen(input_cmd[binary_name] + " | numactl --interleave=all taskset -c " + core_num + " " + binary + arg, shell=True, executable='/bin/bash', stderr=stderr_file) 153 bench_tsk = subprocess.Popen(input_cmd[binary_name] + " | numactl --interleave=all taskset -c " + core_num + " " + binary + arg, shell=True, executable='/bin/bash', stderr=stderr_file)
151 154
152 # print(input_cmd[binary_name] + " | numactl --interleave=all " + binary + arg) 155 print(input_cmd[binary_name] + " | numactl --interleave=all " + binary + arg)
153 # print(binary) 156 # print(binary)
154 # print(arg) 157 # print(arg)
155 pid_str = ID2PID(binary + " " + task_name) 158 pid_str = ID2PID(binary + " " + task_name)
@@ -195,6 +198,8 @@ def main(pathName):
195 198
196 run("echo " + pid1_str + " > /sys/fs/resctrl/core-" + str(phys_core) + "/tasks") 199 run("echo " + pid1_str + " > /sys/fs/resctrl/core-" + str(phys_core) + "/tasks")
197 run("echo " + pid2_str + " > /sys/fs/resctrl/core-" + str(phys_core) + "/tasks") 200 run("echo " + pid2_str + " > /sys/fs/resctrl/core-" + str(phys_core) + "/tasks")
201 # run("wait " + pid1_str)
202 # run("wait " + pid2_str)
198 pairID += 1 203 pairID += 1
199 204
200if __name__ == "__main__": 205if __name__ == "__main__":