From 95b383ce406872937fb810ac1f8b8a17ef887429 Mon Sep 17 00:00:00 2001 From: leochanj105 Date: Tue, 26 Oct 2021 00:07:19 -0400 Subject: fixed power issue and extra.h first job issue --- Makefile | 8 +-- SD-VBS/dag_binaries/disparity_qcif_pair | Bin 131616 -> 121696 bytes SD-VBS/dag_binaries/disparity_qcif_single | Bin 126384 -> 120568 bytes SD-VBS/dag_binaries/localization_qcif_pair | Bin 140272 -> 130352 bytes SD-VBS/dag_binaries/localization_qcif_single | Bin 130944 -> 125128 bytes SD-VBS/dag_binaries/mser_qcif_pair | Bin 126952 -> 121128 bytes SD-VBS/dag_binaries/mser_qcif_single | Bin 125816 -> 119992 bytes SD-VBS/dag_binaries/multi_ncut_qcif_pair | Bin 131256 -> 121336 bytes SD-VBS/dag_binaries/multi_ncut_qcif_single | Bin 126024 -> 120208 bytes SD-VBS/dag_binaries/sift_qcif_pair | Bin 140368 -> 134544 bytes SD-VBS/dag_binaries/sift_qcif_single | Bin 135136 -> 125216 bytes SD-VBS/dag_binaries/stitch_qcif_pair | Bin 135640 -> 125720 bytes SD-VBS/dag_binaries/stitch_qcif_single | Bin 130408 -> 120496 bytes SD-VBS/dag_binaries/svm_qcif_pair | Bin 135624 -> 129808 bytes SD-VBS/dag_binaries/svm_qcif_single | Bin 130400 -> 124576 bytes SD-VBS/dag_binaries/texture_synthesis_qcif_pair | Bin 136336 -> 130512 bytes SD-VBS/dag_binaries/texture_synthesis_qcif_single | Bin 131112 -> 121192 bytes SD-VBS/dag_binaries/tracking_qcif_pair | Bin 135576 -> 125664 bytes SD-VBS/dag_binaries/tracking_qcif_single | Bin 130344 -> 124528 bytes dag | 2 +- deadline_misses | 10 ++- extra.h | 79 +++++++++++++++------- power_on.sh | 2 + run_all_sd-vbs.sh | 2 + run_bench.sh | 39 ++++++++--- run_case_study_dag.py | 17 +++-- 26 files changed, 113 insertions(+), 46 deletions(-) create mode 100644 power_on.sh diff --git a/Makefile b/Makefile index 6408505..44171d0 100644 --- a/Makefile +++ b/Makefile @@ -6,12 +6,12 @@ case-study: $(MAKE) -C SD-VBS/benchmarks compile benchmarks: - sed -i "s/LITMUS 1/LITMUS 0/g" extra.h - #$(MAKE) -C baseline all + sed -i "s/LITMUS 0/LITMUS 1/g" extra.h + # $(MAKE) -C baseline all #$(MAKE) -C all_pairs all #$(MAKE) -C dis pairs -# $(MAKE) -C SD-VBS/benchmarks CFLAGS=-DPAIRED compile - $(MAKE) -C SD-VBS/benchmarks compile + $(MAKE) -C SD-VBS/benchmarks CFLAGS=-DPAIRED compile +# $(MAKE) -C SD-VBS/benchmarks compile benches := svm mser sift texture_synthesis tracking disparity localization multi_ncut stitch diff --git a/SD-VBS/dag_binaries/disparity_qcif_pair b/SD-VBS/dag_binaries/disparity_qcif_pair index e40c79c..44a7f81 100755 Binary files a/SD-VBS/dag_binaries/disparity_qcif_pair and b/SD-VBS/dag_binaries/disparity_qcif_pair differ diff --git a/SD-VBS/dag_binaries/disparity_qcif_single b/SD-VBS/dag_binaries/disparity_qcif_single index 961f76f..73bd933 100755 Binary files a/SD-VBS/dag_binaries/disparity_qcif_single and b/SD-VBS/dag_binaries/disparity_qcif_single differ diff --git a/SD-VBS/dag_binaries/localization_qcif_pair b/SD-VBS/dag_binaries/localization_qcif_pair index 846e01d..5fb17b3 100755 Binary files a/SD-VBS/dag_binaries/localization_qcif_pair and b/SD-VBS/dag_binaries/localization_qcif_pair differ diff --git a/SD-VBS/dag_binaries/localization_qcif_single b/SD-VBS/dag_binaries/localization_qcif_single index 4c18acd..be38797 100755 Binary files a/SD-VBS/dag_binaries/localization_qcif_single and b/SD-VBS/dag_binaries/localization_qcif_single differ diff --git a/SD-VBS/dag_binaries/mser_qcif_pair b/SD-VBS/dag_binaries/mser_qcif_pair index 59532ba..3b66704 100755 Binary files a/SD-VBS/dag_binaries/mser_qcif_pair and b/SD-VBS/dag_binaries/mser_qcif_pair differ diff --git a/SD-VBS/dag_binaries/mser_qcif_single b/SD-VBS/dag_binaries/mser_qcif_single index 18be365..80c4abd 100755 Binary files a/SD-VBS/dag_binaries/mser_qcif_single and b/SD-VBS/dag_binaries/mser_qcif_single differ diff --git a/SD-VBS/dag_binaries/multi_ncut_qcif_pair b/SD-VBS/dag_binaries/multi_ncut_qcif_pair index a92002f..d5c9eb2 100755 Binary files a/SD-VBS/dag_binaries/multi_ncut_qcif_pair and b/SD-VBS/dag_binaries/multi_ncut_qcif_pair differ diff --git a/SD-VBS/dag_binaries/multi_ncut_qcif_single b/SD-VBS/dag_binaries/multi_ncut_qcif_single index db3d837..9772c3c 100755 Binary files a/SD-VBS/dag_binaries/multi_ncut_qcif_single and b/SD-VBS/dag_binaries/multi_ncut_qcif_single differ diff --git a/SD-VBS/dag_binaries/sift_qcif_pair b/SD-VBS/dag_binaries/sift_qcif_pair index e8fb035..d08dcd6 100755 Binary files a/SD-VBS/dag_binaries/sift_qcif_pair and b/SD-VBS/dag_binaries/sift_qcif_pair differ diff --git a/SD-VBS/dag_binaries/sift_qcif_single b/SD-VBS/dag_binaries/sift_qcif_single index f829bbe..a1c8c3d 100755 Binary files a/SD-VBS/dag_binaries/sift_qcif_single and b/SD-VBS/dag_binaries/sift_qcif_single differ diff --git a/SD-VBS/dag_binaries/stitch_qcif_pair b/SD-VBS/dag_binaries/stitch_qcif_pair index e0359cb..a6e9ea9 100755 Binary files a/SD-VBS/dag_binaries/stitch_qcif_pair and b/SD-VBS/dag_binaries/stitch_qcif_pair differ diff --git a/SD-VBS/dag_binaries/stitch_qcif_single b/SD-VBS/dag_binaries/stitch_qcif_single index 31278ac..209fc86 100755 Binary files a/SD-VBS/dag_binaries/stitch_qcif_single and b/SD-VBS/dag_binaries/stitch_qcif_single differ diff --git a/SD-VBS/dag_binaries/svm_qcif_pair b/SD-VBS/dag_binaries/svm_qcif_pair index aa9e7f1..8891062 100755 Binary files a/SD-VBS/dag_binaries/svm_qcif_pair and b/SD-VBS/dag_binaries/svm_qcif_pair differ diff --git a/SD-VBS/dag_binaries/svm_qcif_single b/SD-VBS/dag_binaries/svm_qcif_single index da0986e..76da83f 100755 Binary files a/SD-VBS/dag_binaries/svm_qcif_single and b/SD-VBS/dag_binaries/svm_qcif_single differ diff --git a/SD-VBS/dag_binaries/texture_synthesis_qcif_pair b/SD-VBS/dag_binaries/texture_synthesis_qcif_pair index 4017329..5133606 100755 Binary files a/SD-VBS/dag_binaries/texture_synthesis_qcif_pair and b/SD-VBS/dag_binaries/texture_synthesis_qcif_pair differ diff --git a/SD-VBS/dag_binaries/texture_synthesis_qcif_single b/SD-VBS/dag_binaries/texture_synthesis_qcif_single index 9e75bce..c982e12 100755 Binary files a/SD-VBS/dag_binaries/texture_synthesis_qcif_single and b/SD-VBS/dag_binaries/texture_synthesis_qcif_single differ diff --git a/SD-VBS/dag_binaries/tracking_qcif_pair b/SD-VBS/dag_binaries/tracking_qcif_pair index 3967bc8..bafb339 100755 Binary files a/SD-VBS/dag_binaries/tracking_qcif_pair and b/SD-VBS/dag_binaries/tracking_qcif_pair differ diff --git a/SD-VBS/dag_binaries/tracking_qcif_single b/SD-VBS/dag_binaries/tracking_qcif_single index 023dfc9..25d9d80 100755 Binary files a/SD-VBS/dag_binaries/tracking_qcif_single and b/SD-VBS/dag_binaries/tracking_qcif_single differ diff --git a/dag b/dag index 7217bfa..5dbd6b6 100644 --- a/dag +++ b/dag @@ -1 +1 @@ -1,disparity_qcif, cut001, 5, 9, 4, 1, 100, 1, 0, svm_qcif, svm001 \ No newline at end of file +1,disparity_qcif, dis001, 5, 1, 3, 1, 10, 1, 19, mser_qcif, mser001 \ No newline at end of file diff --git a/deadline_misses b/deadline_misses index 90ccbf7..664ac11 100644 --- a/deadline_misses +++ b/deadline_misses @@ -1,2 +1,8 @@ -(svm001/232202:2) HAZARDOUS: Level-B tardy 50419794 ns, relative tardiness 0.504198 -(svm001/232202:3) HAZARDOUS: Level-B tardy 639529 ns, relative tardiness 0.006395 +(dis001/93299:2) tardy 3033045 ns, relative tardiness 0.303304 +(dis001/93299:3) tardy 6005778 ns, relative tardiness 0.600578 +(mser001/93302:4) tardy 102354 ns, relative tardiness 0.010235 +(dis001/93299:4) tardy 8989592 ns, relative tardiness 0.898959 +(mser001/93302:5) tardy 3083757 ns, relative tardiness 0.308376 +(dis001/93299:5) tardy 11969214 ns, relative tardiness 1.196921 +(mser001/93302:6) tardy 6060660 ns, relative tardiness 0.606066 +(dis001/93299:6) tardy 15251106 ns, relative tardiness 1.525111 diff --git a/extra.h b/extra.h index 5f08a60..7bcc8f5 100644 --- a/extra.h +++ b/extra.h @@ -244,10 +244,10 @@ static void _rt_load_params_itrl(int argc, char **argv) { exit(1); } _rt_cp = get_ctrl_page(); - if (wait && wait_for_ts_release() != 0) { - perror("Unable to wait for taskset release"); - exit(1); - } + // if (wait && wait_for_ts_release() != 0) { + // perror("Unable to wait for taskset release"); + // exit(1); + // } #endif /* LITMUS */ #if MMDC_PROF SETUP_MMDC @@ -434,31 +434,46 @@ out: // Start a job static void _rt_start_loop() { #if LITMUS - static lt_t last = 0; - lt_t now = litmus_clock(); - if (now > _rt_cp->deadline) { - fprintf(stderr, "(%s/%d:%lu) ", _rt_our_prog_name, gettid(), _rt_cp->job_index); - if (_rt_crit == 0) - fprintf(stderr, "CATASTROPHIC: Level-A"); - else if (_rt_crit == 1) - fprintf(stderr, "HAZARDOUS: Level-B"); - else - fprintf(stderr, "MAJOR: Level-C"); - fprintf(stderr, " tardy %llu ns, " - "relative tardiness %f\n", - now - _rt_cp->deadline, - (now - _rt_cp->deadline) / (double)_rt_period); + if (_rt_jobs_complete == 0) { + if(wait_for_ts_release() != 0){ + perror("Unable to wait for taskset release"); + exit(1); + } + } + else{ + if (sleep_next_period() != 0) { + perror("Unable to sleep for next period"); + } } - if (last == 0) { - last = now; - } + // static lt_t last = 0; + // lt_t now = litmus_clock(); + // fprintf(stderr, "current now : %llu\n", now); + // if (now > _rt_cp->deadline) { + // fprintf(stderr, "(%s/%d:%lu) ", _rt_our_prog_name, gettid(), _rt_cp->job_index); + // // if (_rt_crit == 0) + // // fprintf(stderr, "CATASTROPHIC: Level-A"); + // // else if (_rt_crit == 1) + // // fprintf(stderr, "HAZARDOUS: Level-B"); + // // else + // // fprintf(stderr, "MAJOR: Level-C"); + // fprintf(stderr, " tardy %llu ns, " + // "relative tardiness %f\n", + // now - _rt_cp->deadline, + // (now - _rt_cp->deadline) / (double)_rt_period); + // } + // if (last == 0) { + // last = now; + // } // else if (now > last + 60ull * _BILLION && _rt_crit >= 2) { // last = now; // fprintf(stderr, "(%s/%d:%lu) Ping\n", _rt_our_prog_name, gettid(), _rt_cp->job_index); // } - if (sleep_next_period() != 0) { - perror("Unable to sleep for next period"); - } + // lt_t now = litmus_clock(); + // if(_rt_jobs_complete != 0){ + // fprintf(stderr, "in start before sleep: release: %llu, deadline: %llu, now: %llu\n", _rt_cp->release ,_rt_cp->deadline, litmus_clock()); + + // fprintf(stderr, "in start after sleep: release: %llu, deadline: %llu, now: %llu\n", _rt_cp->release ,_rt_cp->deadline, litmus_clock()); + // } #else sched_yield(); #endif /* LITMUS */ @@ -488,6 +503,22 @@ static void _rt_stop_loop() { get_mmdc_profiling_results(mmdc, &mmdc_res); #endif /* MMDC_PROF */ _rt_save_job_result(); +#if LITMUS + long long end = _rt_end_time[_rt_jobs_complete]; + if (end > _rt_cp->deadline) { + fprintf(stderr, "(%s/%d:%lu) ", _rt_our_prog_name, gettid(), _rt_cp->job_index); + // if (_rt_crit == 0) + // fprintf(stderr, "CATASTROPHIC: Level-A"); + // else if (_rt_crit == 1) + // fprintf(stderr, "HAZARDOUS: Level-B"); + // else + // fprintf(stderr, "MAJOR: Level-C"); + fprintf(stderr, " tardy %llu ns, " + "relative tardiness %f\n", + end - _rt_cp->deadline, + (end - _rt_cp->deadline) / (double)_rt_period); + } +#endif _rt_jobs_complete++; } diff --git a/power_on.sh b/power_on.sh new file mode 100644 index 0000000..0a65288 --- /dev/null +++ b/power_on.sh @@ -0,0 +1,2 @@ +#!/bin/bash +echo "performance" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor diff --git a/run_all_sd-vbs.sh b/run_all_sd-vbs.sh index 2db51f2..102af14 100755 --- a/run_all_sd-vbs.sh +++ b/run_all_sd-vbs.sh @@ -21,6 +21,7 @@ date # Configure libextra for benchmarking sed -i "s/LITMUS 1/LITMUS 0/g" extra.h +# sed -i "s/LITMUS 0/LITMUS 1/g" extra.h # Run the pairs baseline and some comparisons to examine the effect of less cache echo "Building benchmarks in unpaired configuration..." @@ -31,6 +32,7 @@ echo "Done. Running experiments..." # Full L3, full L2 - xi is the baseline for the pairs baseXI=SD-VBS/$(date +"%b%d-%H")-c-xi-$runID.txt echo "" | ../run_bench.sh -m base -p $coreCPU -l $maxJobs -b sd-vbsNames.txt -I xi $runID +exit 0 # Half L3, full L2 - i3 sees effect of half L3 baseI3=SD-VBS/$(date +"%b%d-%H")-c-i3-$runID.txt echo "" | ../run_bench.sh -m base -p $coreCPU -l $maxJobs -b sd-vbsNames.txt -I i3 $runID diff --git a/run_bench.sh b/run_bench.sh index 39e9dcb..242d987 100755 --- a/run_bench.sh +++ b/run_bench.sh @@ -11,7 +11,7 @@ # - L2+L3 cache splitting (if OS supported) if grep -q "#define LITMUS 1" ../extra.h ./extra.h 2> /dev/null; then - LITMUS=1 +LITMUS=1 fi if [ $# -lt 5 ]; then @@ -174,7 +174,7 @@ do fi i=$(( $i + 1 )) done - + echo "Done. Creating cleanup handler..." function cleanup { # End contending tasks @@ -327,8 +327,16 @@ FAIL_COLOR="\033[0;31m" GOOD_COLOR="\033[0;32m" RESET_COLOR="\033[0m" + # For each benchmark for (( i = 0; i < ${#bench[@]} ; i++ )); do + # PERIOD="1000" + + # if [[ "${bench[$i]}" == "multi_ncut_qcif" ]]; then + # PERIOD="10000" + # echo "-------------${bench[$i]}------------------" + # fi + # Search for the benchmark in this directory, than /bin if [[ -f ${bench[$i]} ]]; then prefix="." @@ -338,8 +346,13 @@ for (( i = 0; i < ${#bench[@]} ; i++ )); do if [[ "$mode" == "base" ]]; then # Just run the benchmark if TACLeBench # Check if we're using LITMUS^RT or not - if [[ -v $LITMUS ]]; then - echo "${input[$i]}" | numactl $numa_arg0 $prefix/${bench[$i]} ${bench[$i]} $maxJobs $core $runID-$userRunID 1 + if [[ -v LITMUS ]]; then + # echo "numactl $numa_arg0 $prefix/${bench[$i]} ${bench[$i]} $maxJobs $core $runID-$userRunID 1 $PERIOD 1 0" + echo "${input[$i]}" | numactl $numa_arg0 $prefix/${bench[$i]} ${bench[$i]} $maxJobs $core $runID-$userRunID 1 $PERIOD 1 0 & PID1=$! + # sudo /home/ae/liblitmus/release_ts + # echo "waiting......" + # wait $PID1 + # exit 0 else # Remember: Unpaired tasks always get access to all colors (so we --interleave all) echo "${input[$i]}" | chrt -r 97 numactl $numa_arg0 taskset -c $core $prefix/${bench[$i]} ${bench[$i]} $maxJobs $core $runID-$userRunID 1 @@ -349,7 +362,7 @@ for (( i = 0; i < ${#bench[@]} ; i++ )); do while read j; do # For cache setting echo $j > /sys/fs/resctrl/benchmarks/schemata while read ii; do # For WSS setting - if [[ -v $LITMUS ]]; then + if [[ -v LITMUS ]]; then ./gen_input.py ${bench[$i]} inputs/${bench[$i]^}/$template_input $ii | numactl $numa_arg0 $prefix/${bench[$i]} $bench{[$i]}-$ii-$j $maxJobs $core $runID-$userRunID 1 else ./gen_input.py ${bench[$i]} inputs/${bench[$i]^}/$template_input $ii | chrt -r 97 numactl $numa_arg0 taskset -c $core $prefix/${bench[$i]} ${bench[$i]}-$ii-$j $maxJobs $core $runID-$userRunID 1 @@ -364,11 +377,19 @@ for (( i = 0; i < ${#bench[@]} ; i++ )); do start=0 fi for (( j = $start; j < ${#bench[@]} ; j++ )); do + # PERIOD="1000" + # if [[ "${bench[$i]}" == "multi_ncut_qcif" || "${bench[$j]}" == "multi_ncut_qcif" ]]; then + # PERIOD="20000" + # echo "-------------${bench[$i]}---------${bench[$j]}---------" + # fi if [[ ! -v async ]]; then # Synchronize between pairs - original hard real-time SMT approach - if [[ -v $LITMUS ]]; then - echo "${input[$i]}" | numactl $numa_arg0 taskset -c $core $prefix/${bench[$i]} ${bench[$i]} $maxJobs $core $core_two ${bench[$j]} $runID-$userRunID-A 1 & PID1=$!; - echo "${input[$j]}" | numactl $numa_arg1 taskset -c $core_two $prefix/${bench[$j]} ${bench[$j]} $maxJobs $core_two $core ${bench[$i]} $runID-$userRunID-B 1 & PID2=$!; + if [[ -v LITMUS ]]; then + # echo "numactl $numa_arg0 taskset -c $core $prefix/${bench[$i]} ${bench[$i]} $maxJobs $core $core_two ${bench[$j]} $runID-$userRunID-A 1 $PERIOD 1 0 & PID1=$!;" + # echo "numactl $numa_arg1 taskset -c $core_two $prefix/${bench[$j]} ${bench[$j]} $maxJobs $core_two $core ${bench[$i]} $runID-$userRunID-B 1 $PERIOD 1 0 & PID2=$!;" + echo "${input[$i]}" | numactl $numa_arg0 taskset -c $core $prefix/${bench[$i]} ${bench[$i]} $maxJobs $core $core_two ${bench[$j]} $runID-$userRunID-A 1 $PERIOD 1 0 & PID1=$!; + echo "${input[$j]}" | numactl $numa_arg1 taskset -c $core_two $prefix/${bench[$j]} ${bench[$j]} $maxJobs $core_two $core ${bench[$i]} $runID-$userRunID-B 1 $PERIOD 1 0 & PID2=$!; + # sudo /home/ae/liblitmus/release_ts else echo "${input[$i]}" | chrt -r 97 numactl $numa_arg0 taskset -c $core $prefix/${bench[$i]} ${bench[$i]} $maxJobs $core $core_two ${bench[$j]} $runID-$userRunID-A 1 & PID1=$!; echo "${input[$j]}" | chrt -r 97 numactl $numa_arg1 taskset -c $core_two $prefix/${bench[$j]} ${bench[$j]} $maxJobs $core_two $core ${bench[$i]} $runID-$userRunID-B 1 & PID2=$!; @@ -377,7 +398,7 @@ for (( i = 0; i < ${#bench[@]} ; i++ )); do wait $PID1 $PID2 else # No synchronization between pairs - original soft real-time SMT approach - if [[ -v $LITMUS ]]; then + if [[ -v LITMUS ]]; then echo "${input[$j]}" | numactl $numa_arg0 taskset -c $core $prefix/${bench[$j]} ${bench[$j]} -1 $core NULL 0 & PID1=$!; echo "${input[$i]}" | numactl $numa_arg1 taskset -c $core_two $prefix/${bench[$i]} ${bench[$i]}"+"${bench[$j]} $maxJobs $core_two $runID-$userRunID 1 & PID2=$!; else 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): in_ccx = core % 4 mask = "0000" mask = mask[:in_ccx] +'f'+ mask[in_ccx+1:] + run('echo {},{} > /sys/fs/resctrl/core-{}/cpus_list'.format(core,core+16, core)) + # run('echo {} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core)) if ccx == 0: - run('echo {} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core)) + # run('echo {},{} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core)) run('echo "L3:0=' + mask + ';1=0000;2=0000;3=0000" > /sys/fs/resctrl/core-{}/schemata'.format(core)) # run('echo "L3:0=ffff;1=0000;2=0000;3=0000" > /sys/fs/resctrl/core-{}/schemata'.format(core)) if ccx == 1: - run('echo {} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core)) + # run('echo {},{} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core)) run('echo "L3:0=0000;1=' + mask + ';2=0000;3=0000" > /sys/fs/resctrl/core-{}/schemata'.format(core)) if ccx == 2: - run('echo {} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core)) + # run('echo {},{} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core)) run('echo "L3:0=0000;1=0000;2=' + mask + ';3=0000" > /sys/fs/resctrl/core-{}/schemata'.format(core)) if ccx == 3: - run('echo {} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core)) + # run('echo {},{} > /sys/fs/resctrl/core-{}/cpus_list'.format(core, core)) run('echo "L3:0=0000;1=0000;2=0000;3=' + mask + '" > /sys/fs/resctrl/core-{}/schemata'.format(core)) # return 1 @@ -143,13 +145,14 @@ def main(pathName): # Arg format: arg = " " + task_name + " " + num_iters +" " + core_num +" " + run_id +" " + save_result+" " + period +" " + crt_level + " "+ phase bench_tsk = subprocess.Popen(input_cmd[binary_name] + " | numactl --interleave=all " + binary + arg, shell=True, executable='/bin/bash', stderr=stderr_file) + else: - # Arg format: + # Arg format: binary = binary_path + binary_name + "_single_no_litmus" arg = " " + task_name + " " + num_iters +" " + core_num +" " + run_id +" " + save_result+" " 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) - # print(input_cmd[binary_name] + " | numactl --interleave=all " + binary + arg) + print(input_cmd[binary_name] + " | numactl --interleave=all " + binary + arg) # print(binary) # print(arg) pid_str = ID2PID(binary + " " + task_name) @@ -195,6 +198,8 @@ def main(pathName): run("echo " + pid1_str + " > /sys/fs/resctrl/core-" + str(phys_core) + "/tasks") run("echo " + pid2_str + " > /sys/fs/resctrl/core-" + str(phys_core) + "/tasks") + # run("wait " + pid1_str) + # run("wait " + pid2_str) pairID += 1 if __name__ == "__main__": -- cgit v1.2.2