speed.sh 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/bin/bash
  2. # StarPU --- Runtime system for heterogeneous multicore architectures.
  3. #
  4. # Copyright (C) 2010 Université de Bordeaux 1
  5. # Copyright (C) 2010 Centre National de la Recherche Scientifique
  6. #
  7. # StarPU is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU Lesser General Public License as published by
  9. # the Free Software Foundation; either version 2.1 of the License, or (at
  10. # your option) any later version.
  11. #
  12. # StarPU is distributed in the hope that it will be useful, but
  13. # WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. #
  16. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  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. $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