sched_with_ctxs.sh 1.5 KB

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