memstress2.sh 1.6 KB

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