dynamic.sh 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #!/bin/sh
  2. # StarPU --- Runtime system for heterogeneous multicore architectures.
  3. #
  4. # Copyright (C) 2020 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  5. #
  6. # StarPU is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU Lesser General Public License as published by
  8. # the Free Software Foundation; either version 2.1 of the License, or (at
  9. # your option) any later version.
  10. #
  11. # StarPU is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. #
  15. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  16. #
  17. # To have 24 cores
  18. export STARPU_HOSTNAME=sirocco
  19. # To avoid slowing down simulation
  20. export MALLOC_PERTURB_=0
  21. # You can play with these
  22. export N=40
  23. export NITER=30
  24. GAMMAS="1000000 100000 76000 10000 0"
  25. for gamma in $GAMMA
  26. do
  27. (for freq_slow in $(seq 1200 200 3500) ; do
  28. STARPU_SCHED_GAMMA=$gamma STARPU_FREQ_SLOW=$freq_slow \
  29. ./energy_efficiency $N $NITER | grep "^$(($N * 512)) " &
  30. done) | sort -n -k 2 > dynamic.$gamma.dat
  31. done
  32. cat > dynamic.gp << EOF
  33. set output "dynamic.eps"
  34. set term postscript eps enhanced color font ",20"
  35. set key bottom right
  36. set xlabel "performance (GFlop/s)"
  37. set ylabel "energy (J)"
  38. plot \\
  39. EOF
  40. for gamma in $GAMMAS; do
  41. cat >> dynamic.gp << EOF
  42. "dynamic.$gamma.dat" using 5:7:6:8 with xyerrorlines lw 2 title "$gamma", \\
  43. EOF
  44. done
  45. cat >> dynamic.gp << EOF
  46. set output "dynamic-time.eps"
  47. set xlabel "time (ms)"
  48. set ylabel "energy (J)"
  49. plot \\
  50. EOF
  51. for gamma in $GAMMAS; do
  52. cat >> dynamic.gp << EOF
  53. "dynamic.$gamma.dat" using 3:7:4:8 with xyerrorlines lw 2 title "$gamma", \\
  54. EOF
  55. done
  56. gnuplot dynamic.gp
  57. gv dynamic.eps &
  58. gv dynamic-time.eps &