bench_bandwidth.sh 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #!/bin/bash
  2. # StarPU --- Runtime system for heterogeneous multicore architectures.
  3. #
  4. # Copyright (C) 2009, 2010 Université de Bordeaux
  5. # Copyright (C) 2010 Centre National de la Recherche Scientifique
  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. mkdir -p .results
  18. rm -f .results/htod-pin.data
  19. rm -f .results/dtoh-pin.data
  20. echo "H -> D"
  21. for log in `seq 1 13`
  22. do
  23. size=$((2**$log))
  24. echo "$size `./cuda_bandwidth -pin -HtoD -size $size -cpu-ld $size -gpu-ld $size -iter 50`" >> .results/htod-pin.data
  25. done
  26. echo "D -> H"
  27. for log in `seq 1 13`
  28. do
  29. size=$((2**$log))
  30. echo "$size `./cuda_bandwidth -pin -size $size -cpu-ld $size -gpu-ld $size -iter 50`" >> .results/dtoh-pin.data
  31. done
  32. ./bench_bandwidth.gp
  33. echo "STRIDED H -> D"
  34. for stridelog in `seq 1 13`
  35. do
  36. stridesize=$((2**$stridelog))
  37. rm -f .results/htod-pin.$stridesize.data
  38. echo " STRIDE $stridesize"
  39. for log in `seq 1 $stridelog`
  40. do
  41. size=$((2**$log))
  42. echo "$size `./cuda_bandwidth -pin -HtoD -size $size -cpu-ld $stridesize -gpu-ld $stridesize -iter 50`" >> .results/htod-pin.$stridesize.data
  43. done
  44. done
  45. echo "STRIDED D -> H"
  46. for stridelog in `seq 1 13`
  47. do
  48. stridesize=$((2**$stridelog))
  49. rm -f .results/dtoh-pin.$stridesize.data
  50. echo " STRIDE $stridesize"
  51. for log in `seq 1 $stridelog`
  52. do
  53. size=$((2**$log))
  54. echo "$size `./cuda_bandwidth -pin -size $size -cpu-ld $stridesize -gpu-ld $stridesize -iter 50`" >> .results/dtoh-pin.$stridesize.data
  55. done
  56. done