bench_bandwidth.sh 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. mkdir -p .results
  19. rm -f .results/htod-pin.data
  20. rm -f .results/dtoh-pin.data
  21. echo "H -> D"
  22. for log in `seq 1 13`
  23. do
  24. size=$((2**$log))
  25. echo "$size `./cuda_bandwidth -pin -HtoD -size $size -cpu-ld $size -gpu-ld $size -iter 50`" >> .results/htod-pin.data
  26. done
  27. echo "D -> H"
  28. for log in `seq 1 13`
  29. do
  30. size=$((2**$log))
  31. echo "$size `./cuda_bandwidth -pin -size $size -cpu-ld $size -gpu-ld $size -iter 50`" >> .results/dtoh-pin.data
  32. done
  33. ./bench_bandwidth.gp
  34. echo "STRIDED H -> D"
  35. for stridelog in `seq 1 13`
  36. do
  37. stridesize=$((2**$stridelog))
  38. rm -f .results/htod-pin.$stridesize.data
  39. echo " STRIDE $stridesize"
  40. for log in `seq 1 $stridelog`
  41. do
  42. size=$((2**$log))
  43. echo "$size `./cuda_bandwidth -pin -HtoD -size $size -cpu-ld $stridesize -gpu-ld $stridesize -iter 50`" >> .results/htod-pin.$stridesize.data
  44. done
  45. done
  46. echo "STRIDED D -> H"
  47. for stridelog in `seq 1 13`
  48. do
  49. stridesize=$((2**$stridelog))
  50. rm -f .results/dtoh-pin.$stridesize.data
  51. echo " STRIDE $stridesize"
  52. for log in `seq 1 $stridelog`
  53. do
  54. size=$((2**$log))
  55. echo "$size `./cuda_bandwidth -pin -size $size -cpu-ld $stridesize -gpu-ld $stridesize -iter 50`" >> .results/dtoh-pin.$stridesize.data
  56. done
  57. done