sched_with_ctxs.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #!/bin/bash
  2. # StarPU --- Runtime system for heterogeneous multicore architectures.
  3. #
  4. # Copyright (C) 2011 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. DIR=$PWD
  17. ROOTDIR=$DIR/../..
  18. TIMINGDIR=$DIR/timings-sched/
  19. mkdir -p $TIMINGDIR
  20. BENCH_NAME=cholesky/cholesky_implicit
  21. filename=$TIMINGDIR/$1
  22. gpu=$2
  23. gpu1=$3
  24. gpu2=$4
  25. nmaxcpus=$STARPU_NCPUS
  26. echo $nmaxcpus
  27. nmincpus1=1
  28. nmincpus2=1
  29. if [ $gpu1 -gt 0 ]
  30. then
  31. nmincpus1=0
  32. fi
  33. if [ $gpu2 -gt 0 ]
  34. then
  35. nmincpus2=0
  36. fi
  37. blocks1=40
  38. blocks2=40
  39. size1=20000
  40. size2=10000
  41. for j in `seq $nmincpus1 1 $(($nmaxcpus-1))`
  42. do
  43. if [ $j -gt $(($nmaxcpus-$nmincpus2)) ]
  44. then
  45. break
  46. fi
  47. ncpus1=$j
  48. ncpus2=$(($nmaxcpus-$j))
  49. OPTIONS="-with_ctxs -nblocks1 $blocks1 -size1 $size1 -nblocks2 $blocks2 -size2 $size2 -gpu $gpu -gpu1 $gpu1 -gpu2 $gpu2 -cpu1 $ncpus1 -cpu2 $ncpus2"
  50. source evaluate_expression.sh "$BENCH_NAME" "$OPTIONS" "$filename" "$gpu $gpu1 $gpu2 $ncpus1 $ncpus2"
  51. done