cholesky.sh 1.9 KB

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