memstress2.sh 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #!/bin/bash
  2. # StarPU --- Runtime system for heterogeneous multicore architectures.
  3. #
  4. # Copyright (C) 2008-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. DIR=$PWD
  19. ROOTDIR=$DIR/../..
  20. TIMINGDIR=$DIR/timings/
  21. mkdir -p $TIMINGDIR
  22. filename=$TIMINGDIR/memstress2.data
  23. sizelist="512 1024 2048 4096 8192 16384"
  24. stresslist="0 350"
  25. #stresslist="672"
  26. trace_stress()
  27. {
  28. size=$1
  29. line="$size"
  30. for stress in $stresslist
  31. do
  32. export STRESS_MEM=$stress
  33. nblocks=$(($size / 1024))
  34. echo "Computing size $size with $stress MB of memory LESS"
  35. echo "$ROOTDIR/examples/mult/dw_mult -x $size -y $size -z $size -nblocks $nblocks 2>/dev/null"
  36. timing=`$ROOTDIR/examples/mult/dw_mult -x $size -y $size -z $size -nblocks $nblocks 2>/dev/null`
  37. echo "size : $size memstress $stress => $timing us"
  38. line="$line $timing"
  39. done
  40. echo "$line" >> $filename
  41. }
  42. cd $ROOTDIR
  43. make clean 1> /dev/null 2> /dev/null
  44. make examples STARPU_ATLAS=1 CUDA=1 CPUS=0 1> /dev/null 2> /dev/null
  45. cd $DIR
  46. echo "#size $stresslist " > $filename
  47. for size in $sizelist
  48. do
  49. trace_stress $size;
  50. done