speed.sh 1.3 KB

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