sched.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #!/bin/bash
  2. #
  3. # StarPU
  4. # Copyright (C) INRIA 2008-2009 (see AUTHORS file)
  5. #
  6. # This program 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. # This program 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. maxiter=10
  18. MAXCPU=3
  19. trace_sched()
  20. {
  21. for blocks in `seq 2 1 24`
  22. do
  23. size=$(($blocks*1024))
  24. echo "size : $size"
  25. OPTIONS="-pin -nblocks $blocks -x $size -y $size -z $size"
  26. cd $ROOTDIR
  27. filename=$TIMINGDIR/sched.$SCHED.$size
  28. #rm -f $filename
  29. make clean 1> /dev/null 2> /dev/null
  30. make examples -j ATLAS=1 CPUS=$MAXCPU CUDA=1 1> /dev/null 2> /dev/null
  31. cd $DIR
  32. for iter in `seq 1 $maxiter`
  33. do
  34. echo "$iter / $maxiter"
  35. echo "$ROOTDIR/examples/mult/dw_mult $OPTIONS 2> /dev/null"
  36. val=`$ROOTDIR/examples/mult/dw_mult $OPTIONS 2> /dev/null`
  37. echo "$val" >> $filename
  38. done
  39. done
  40. }
  41. DIR=$PWD
  42. ROOTDIR=$DIR/../..
  43. TIMINGDIR=$DIR/timings-sched/
  44. mkdir -p $TIMINGDIR
  45. schedlist="random greedy model random random random greedy dm greedy dm random random random random"
  46. #schedlist="random"
  47. for sched in $schedlist
  48. do
  49. export SCHED=$sched
  50. echo "sched : $SCHED"
  51. trace_sched;
  52. done