speedup.sh 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. cd $ROOTDIR
  23. make clean 1> /dev/null 2> /dev/null
  24. make STARPU_ATLAS=1 CPUS=16 1> /dev/null 2> /dev/null
  25. echo "speedup ..."
  26. for theta in 32 64 128 256 512 1024
  27. do
  28. size=$(($theta * 32))
  29. echo "# ncpus time reftime" > $TIMINGDIR/speedup.$size
  30. for cpus in 1 2 4 6 8 10 12 14 16
  31. do
  32. export STARPU_NCPUS=$cpus
  33. echo "ncpus $cpus size $size"
  34. filename=$TIMINGDIR/timing.$cpus.$size
  35. $ROOTDIR/examples/heat -v2 -pin -nthick 34 -ntheta $(($theta+2)) -nblocks 16 2>/dev/null| tee $filename
  36. echo "$cpus `cat $TIMINGDIR/timing.$cpus.$size` `cat $TIMINGDIR/timing.1.$size`" >> $TIMINGDIR/speedup.$size
  37. done
  38. done