sched_one_gpu.sh 1.7 KB

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