benchmarks.sh 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. #!/bin/bash
  2. # Script to generate all simulation results in a single folder
  3. # to allow much easier rerunning and updating of plots
  4. export repetitions=1
  5. # Folders are created for all result files and are named
  6. # according to the mindmap
  7. function seq_activity_synthetic {
  8. #### Synthetic tests for sequential activity
  9. echo "Running Sequential Activity Synthetic"
  10. ### Run the simulations
  11. python seq_activity_synthetic/timer.py $repetitions
  12. ### Plot the results
  13. gnuplot seq_activity_synthetic/plot
  14. }
  15. function seq_activity_firespread {
  16. #### Firespread tests for sequential activity
  17. echo "Running Sequential Activity Firespread"
  18. ### Run the simulations
  19. # Force a higher number of repetions due to high jitter
  20. python seq_activity_firespread/timer.py 50
  21. ### Plot the results
  22. gnuplot seq_activity_firespread/plot
  23. }
  24. function seq_devstone {
  25. #### DEVStone benchmarks
  26. echo "Running Sequential DEVStone"
  27. ### Run the simulations
  28. pypy-c2.0 seq_devstone/timer.py $repetitions
  29. ### Plot the results
  30. gnuplot seq_devstone/plot
  31. }
  32. function dist_activity_synthetic {
  33. #### Synthetic tests for sequential activity
  34. echo "Running Distributed Activity Synthetic"
  35. ### Run the simulations
  36. python dist_activity_synthetic/timer.py $repetitions
  37. ### Plot the results
  38. gnuplot dist_activity_synthetic/plot
  39. }
  40. function dist_activity_citylayout {
  41. #### Firespread tests for sequential activity
  42. echo "Running Distributed Activity Citylayout"
  43. ### Run the simulations
  44. python dist_activity_citylayout/timer.py $repetitions
  45. ### Plot the results
  46. gnuplot dist_activity_citylayout/plot
  47. }
  48. function dist_phold {
  49. #### PHOLD benchmark
  50. echo "Running Distributed PHOLD"
  51. ### Run the simulations
  52. python dist_phold/timer.py $repetitions
  53. ### Plot the results
  54. gnuplot dist_phold/plot
  55. }
  56. function seq_poly {
  57. #### PHOLD benchmark
  58. echo "Running Sequential Polymorphic Scheduler"
  59. ### Run the simulations
  60. python seq_poly/timer.py $repetitions
  61. ### Plot the results
  62. gnuplot seq_poly/plot
  63. }
  64. if [ $# -eq 0 ] ; then
  65. echo "Run all benchmarks"
  66. seq_activity_synthetic
  67. seq_activity_firespread
  68. seq_devstone
  69. seq_poly
  70. dist_activity_synthetic
  71. dist_activity_citylayout
  72. dist_phold
  73. elif [ $1 == "seq" ] ; then
  74. seq_activity_synthetic
  75. seq_activity_firespread
  76. seq_devstone
  77. seq_poly
  78. elif [ $1 == "dist" ] ; then
  79. dist_activity_synthetic
  80. dist_activity_citylayout
  81. dist_phold
  82. elif [ $1 == "seq_activity_synthetic" ] ; then
  83. seq_activity_synthetic
  84. elif [ $1 == "seq_activity_firespread" ] ; then
  85. seq_activity_firespread
  86. elif [ $1 == "seq_devstone" ] ; then
  87. seq_devstone
  88. elif [ $1 == "dist_activity_synthetic" ] ; then
  89. dist_activity_synthetic
  90. elif [ $1 == "dist_activity_citylayout" ] ; then
  91. dist_activity_citylayout
  92. elif [ $1 == "dist_phold" ] ; then
  93. dist_phold
  94. elif [ $1 == "seq_poly" ] ; then
  95. seq_poly
  96. else
  97. echo "Unknown benchmark $1"
  98. fi
  99. # Remove the activity log if it is present
  100. (rm activity-log 2>&1) >> /dev/null