sched_one_gpu.sh 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #!/bin/bash
  2. # StarPU --- Runtime system for heterogeneous multicore architectures.
  3. #
  4. # Copyright (C) 2009, 2010 Université de Bordeaux 1
  5. # Copyright (C) 2010 Centre National de la Recherche Scientifique
  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. maxiter=5
  18. ROOTDIR=../../
  19. TIMINGDIR=$PWD/timing/
  20. export STARPU_WORKERS_CUDAID="1"
  21. trace_sched()
  22. {
  23. sched=$1
  24. use_prio=$2
  25. export STARPU_SCHED=$sched
  26. for blocks in `seq 24 2 24`
  27. do
  28. size=$(($blocks*1024))
  29. echo "size : $size"
  30. OPTIONS="-pin -nblocks $blocks -size $size"
  31. if [ $use_prio -eq 0 ]
  32. then
  33. OPTIONS="$OPTIONS -no-prio"
  34. fi
  35. filename=$TIMINGDIR/sched.$STARPU_SCHED.$size.$use_prio
  36. for iter in `seq 1 $maxiter`
  37. do
  38. echo "$iter / $maxiter"
  39. echo "$ROOTDIR/examples/cholesky/dw_cholesky $OPTIONS 2> /dev/null"
  40. val=`$ROOTDIR/examples/cholesky/dw_cholesky $OPTIONS 2> /dev/null`
  41. echo "$val" >> $filename
  42. echo "$val"
  43. done
  44. done
  45. }
  46. schedlist='dm dm dm dm greedy dm'
  47. export STARPU_NCUDA=1
  48. export STARPU_CALIBRATE=1
  49. mkdir -p $TIMINGDIR
  50. # calibrate
  51. for i in `seq 1 5`
  52. do
  53. STARPU_SCHED="dm" $ROOTDIR/examples/cholesky/dw_cholesky -nblocks 16 -size 16384 2> /dev/null
  54. done
  55. for sched in $schedlist
  56. do
  57. echo "sched : $sched"
  58. trace_sched $sched 0;
  59. trace_sched $sched 1;
  60. done