sched.sh 1.4 KB

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