exec_scr_multiple.sh 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #!/bin/bash
  2. index_start=$1
  3. num_of_rounds=$2
  4. num_of_apps=$3
  5. exec_name=$4
  6. scen_dir=$5
  7. scen_name=$6
  8. res_dir=$7
  9. idag_conf=$8
  10. suffix=$9
  11. app_input_file=${10}
  12. app_type=${11}
  13. fname_output=$scen_dir/$scen_name/$res_dir/$idag_conf'_'$suffix'_'output.txt
  14. echo $fname_output
  15. for (( i=$index_start; i<=$num_of_rounds; i++ ))
  16. do
  17. date
  18. ./clear_app_logs.sh 128 $scen_dir/$scen_name/app_logs > /dev/null
  19. fname_power=power_$res_dir/$exec_name'_'power'_'$idag_conf'_'$suffix'_'$num_of_apps'_apps_'$i.txt
  20. echo $fname_power
  21. #fname_power_output=power_output_$num_of_apps'_'$i.txt
  22. #echo $fname_power_output
  23. sccBmc -c status
  24. time_init=$(date +%H-%M-%S-%N)
  25. echo "Init time" $time_init
  26. ./power_tst.sh $fname_power & #power_64_3.txt &
  27. power_pid=$!
  28. #pssh -h PSSH_HOST_FILE.30448 -t -1 -P -p 48 /shared/herc/my_rtrm_multiple_apps 48 0.533 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 -d drtrm-multiple-apps/scenaria// -n 8x6_journal// -i idag_conf_2_1 -a 10 -p paxos_0.conf -x 1 -y 1 -t 11 < /dev/nul
  29. #./brccerun -nue 48 -f rc.hosts_48 my_rtrm_multiple_apps -d drtrm-multiple-apps/scenaria/ -n 8x6_journal/ -i idag_conf_2_1 -a app_input_idag_conf_2_1_full_higher.txt -p paxos_0.conf -x 1 -y 1 -t S
  30. #./exec_scr_multiple.sh 1 5 128 my_rtrm_multiple_apps drtrm-multiple-apps/scenaria/ 8x6_journal/ 2_idags idag_conf_2_1 rr app_input_idag_conf_2_1_rr_higher.txt S
  31. echo "Selfopt radius is 6, Selfopt rounds is 3"
  32. ./brccerun -nue 48 -f rc.hosts_48 $exec_name -d $scen_dir/ -n $scen_name/ -i $idag_conf -a $app_input_file -p paxos_0.conf -x 1 -y 1 -t $app_type -r 6 -u 3 &
  33. rcce_pid=$!
  34. ./watchdog.sh $exec_name & #my_rtrm_power & #$rcce_pid &
  35. watchdog_pid=$!
  36. echo "watchdog_pid " $watchdog_pid
  37. wait $rcce_pid
  38. kill -9 $power_pid
  39. time_fin=$(date +%H-%M-%S-%N)
  40. echo "SCC exec completed successfully!"
  41. sleep 10s
  42. if [ -e /proc/$watchdog_pid ]
  43. then
  44. kill -9 $watchdog_pid
  45. echo "Init time" $time_init
  46. echo $fname_power > $scen_dir/$scen_name/tmp_power_out
  47. date >> $scen_dir/$scen_name/tmp_power_out
  48. echo "Init time" $time_init >> $scen_dir/$scen_name/tmp_power_out
  49. echo "Finish time" $time_fin
  50. echo "Finish time" $time_fin >> $scen_dir/$scen_name/tmp_power_out
  51. ./get_power_stats.py $fname_power >> $scen_dir/$scen_name/tmp_power_out
  52. #cp_scr.sh has to be in the appropriate directory to find the files to copy. FIXME probably
  53. #mul_scenaria/8x6_power/cp_scr.sh $num_of_apps $i $res_dir
  54. cd $scen_dir/$scen_name/
  55. mkdir $res_dir/$idag_conf'_'$app_type'_'$suffix
  56. ./cp_scr.sh $num_of_apps $i $res_dir/$idag_conf'_'$app_type'_'$suffix
  57. cd ../../../
  58. ##sleep 30s
  59. ##cat current_exec_out.txt >> $fname_output
  60. ##sleep 30s
  61. fi
  62. sleep 10
  63. done