cholesky.sh 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #!/bin/bash
  2. # StarPU --- Runtime system for heterogeneous multicore architectures.
  3. #
  4. # Copyright (C) 2018-2019 Université de Bordeaux
  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. ROOT=${0%.sh}
  18. #[ -n "$STARPU_SCHEDS" ] || STARPU_SCHEDS=`$(dirname $0)/../../tools/starpu_sched_display`
  19. [ -n "$STARPU_SCHEDS" ] || STARPU_SCHEDS="dmdas modular-heft modular-heft-prio dmdap dmdar dmda dmdasd prio lws"
  20. [ -n "$STARPU_HOSTNAME" ] || export STARPU_HOSTNAME=mirage
  21. unset MALLOC_PERTURB_
  22. (
  23. echo -n "#"
  24. for STARPU_SCHED in $STARPU_SCHEDS ; do
  25. echo -n " $STARPU_SCHED"
  26. done
  27. echo
  28. for size in `seq 2 2 30` ; do
  29. echo -n "$((size * 960))"
  30. for STARPU_SCHED in $STARPU_SCHEDS
  31. do
  32. export STARPU_SCHED
  33. GFLOPS=`${ROOT}_implicit -size $((size * 960)) -nblocks $size 2> /dev/null | grep -v GFlops | cut -d ' ' -f 3`
  34. [ -n "$GFLOPS" ] || GFLOPS='""'
  35. echo -n " $GFLOPS"
  36. done
  37. echo
  38. done
  39. ) | tee cholesky.output
  40. [ -n "$TERMINAL" ] || TERMINAL=eps
  41. [ -n "$OUTFILE" ] || OUTFILE=cholesky.eps
  42. cat > cholesky.gp << EOF
  43. set terminal $TERMINAL
  44. set output "$OUTFILE"
  45. set key top left
  46. set xlabel "size"
  47. set ylabel "GFlops"
  48. plot \\
  49. EOF
  50. N=2
  51. COMMA=""
  52. for STARPU_SCHED in $STARPU_SCHEDS
  53. do
  54. echo "$COMMA'cholesky.output' using 1:$N with lines title '$STARPU_SCHED' \\" >> cholesky.gp
  55. N=$(($N + 1))
  56. COMMA=", "
  57. done
  58. gnuplot cholesky.gp
  59. #gv $OUTFILE
  60. true