speed.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/bin/bash
  2. # StarPU --- Runtime system for heterogeneous multicore architectures.
  3. #
  4. # Copyright (C) 2010-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. # We compute the duration of the experiment for multiple powers of 2
  18. i=1
  19. examplebindir=../../examples/incrementer/
  20. rm -f .perftable
  21. max=20
  22. for logi in `seq 0 $max`
  23. do
  24. $STARPU_LAUNCH $examplebindir/incrementer $i 2> .tmpperf
  25. grep "ms" .tmpperf
  26. grep "ms" .tmpperf | sed -e "s/^\(.*\) elems took \(.*\) ms$/\1 \2/" >> .perftable
  27. i=$((2 * $i))
  28. done
  29. gnuplot > /dev/null << EOF
  30. set term postscript eps enhanced color
  31. set output "incrementer.eps"
  32. set xlabel "Number of iterations"
  33. set ylabel "Execution time (ms)"
  34. set logscale x
  35. set logscale y
  36. plot ".perftable" using 1:2 with linespoint title "Time"
  37. EOF