sched_with_ctxs.sh 1.5 KB

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