sched.sh 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/bin/bash
  2. # StarPU --- Runtime system for heterogeneous multicore architectures.
  3. #
  4. # Copyright (C) 2008-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. # Testing another specific scheduler, no need to run this
  18. [ -z "$STARPU_SCHED" -o "$STARPU_SCHED" = greedy -o "$STARPU_SCHED" = no-prio -o "$STARPU_SCHED" = dm -o "$STARPU_SCHED" = random ] || exit 77
  19. maxiter=10
  20. MAXCPU=3
  21. trace_sched()
  22. {
  23. for blocks in `seq 10 2 24`
  24. do
  25. size=$(($blocks*1024))
  26. echo "size : $size"
  27. OPTIONS="-pin -nblocks $blocks -size $size"
  28. cd $ROOTDIR
  29. filename=$TIMINGDIR/sched.$STARPU_SCHED.$size
  30. for iter in `seq 1 $maxiter`
  31. do
  32. echo "$iter / $maxiter"
  33. echo "$ROOTDIR/examples/cholesky/dw_cholesky $OPTIONS 2> /dev/null"
  34. val=`$STARPU_LAUNCH $ROOTDIR/examples/cholesky/dw_cholesky $OPTIONS 2> /dev/null`
  35. echo "$val" >> $filename
  36. done
  37. done
  38. }
  39. DIR=$PWD
  40. ROOTDIR=$DIR/../..
  41. TIMINGDIR=$DIR/timings-sched/
  42. mkdir -p $TIMINGDIR
  43. schedlist="greedy no-prio dm random"
  44. #schedlist="random"
  45. for sched in $schedlist
  46. do
  47. export STARPU_SCHED=$sched
  48. echo "sched : $STARPU_SCHED"
  49. trace_sched;
  50. done