static.sh 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #!/bin/sh
  2. # StarPU --- Runtime system for heterogeneous multicore architectures.
  3. #
  4. # Copyright (C) 2020-2021 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 STARPU_FREQ_SLOW=1200
  23. export STARPU_POWER_SLOW=2
  24. export STARPU_POWER_FAST=8.2
  25. export N=40
  26. export NITER=30
  27. GAMMAS="1000000 100000 10000 0"
  28. for gamma in $GAMMAS; do
  29. (for ncpu_slow in $(seq 0 24) ; do
  30. STARPU_SCHED_GAMMA=$gamma STARPU_NCPU_SLOW=$ncpu_slow \
  31. ./energy_efficiency $N $NITER | grep "^$(($N * 512)) " &
  32. done) | sort -n -k 2 > static.$gamma.dat
  33. done
  34. cat > static.gp << EOF
  35. set output "static.eps"
  36. set term postscript eps enhanced color font ",20"
  37. set key top center
  38. set xlabel "performance (GFlop/s)"
  39. set ylabel "energy (J)"
  40. plot \\
  41. EOF
  42. for gamma in $GAMMAS; do
  43. cat >> static.gp << EOF
  44. "static.$gamma.dat" using 5:7:6:8 with xyerrorlines title "$gamma", \\
  45. EOF
  46. done
  47. cat >> static.gp << EOF
  48. set output "static-time.eps"
  49. set xlabel "time (ms)"
  50. set ylabel "energy (J)"
  51. plot \\
  52. EOF
  53. for gamma in $GAMMAS; do
  54. cat >> static.gp << EOF
  55. "static.$gamma.dat" using 3:7:4:8 with xyerrorlines title "$gamma", \\
  56. EOF
  57. done
  58. gnuplot static.gp
  59. gv static.eps &
  60. gv static-time.eps &