exec_scr_no_power.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #!/bin/bash
  2. index_start=$1
  3. num_of_rounds=$2 # Default, if not specified on command-line.
  4. #echo num of apps is $num_of_apps
  5. num_of_apps=$3
  6. scen_num=$4
  7. exec_name=$5
  8. res_dir=$6
  9. #echo $num_of_apps
  10. #base_dir=$2
  11. #echo num is $2
  12. for (( i=$index_start; i<=$num_of_rounds; i++ ))
  13. do
  14. ./clear_app_logs.sh 128 mul_scenaria/$scen_num/app_logs > /dev/null
  15. #fname_power=power_$num_of_apps'_'$res_dir'_'$i.txt
  16. #echo "fname_power ="
  17. #echo $fname_power
  18. name=$exec_name'_'$num_of_apps'_'$i
  19. echo $name
  20. #fname_power_output=power_output_$num_of_apps'_'$i.txt
  21. #echo $fname_power_output
  22. #time_init=$(date +%H-%M-%S-%N)
  23. #echo "Init time" $time_init
  24. #./power_tst.sh $fname_power & #power_64_3.txt &
  25. #power_pid=$!
  26. ./brccerun -nue 48 -f rc.hosts_48 $exec_name $scen_num & #> $fname_power_output & #power_output_64_3 &
  27. rcce_pid=$!
  28. ./watchdog.sh $exec_name & #my_rtrm_power & #$rcce_pid &
  29. watchdog_pid=$!
  30. echo "watchdog_pid " $watchdog_pid
  31. wait $rcce_pid
  32. #kill -9 $power_pid
  33. #time_fin=$(date +%H-%M-%S-%N)
  34. echo "SCC exec completed successfully!"
  35. kill -9 $watchdog_pid
  36. #echo "Init time" $time_init
  37. #echo "Finish time" $time_fin
  38. #./get_power_stats.py $fname_power #power_64_3.txt
  39. #./mul_scenaria/8x6_power/cp_scr.sh $num_of_apps $i
  40. cd mul_scenaria/$scen_num/
  41. ./cp_scr.sh $num_of_apps $i $res_dir
  42. cd ../../
  43. sleep 10
  44. done