speedup.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/bin/bash
  2. # StarPU --- Runtime system for heterogeneous multicore architectures.
  3. #
  4. # Copyright (C) 2008-2021 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. cd $ROOTDIR
  22. make clean 1> /dev/null 2> /dev/null
  23. make examples STARPU_ATLAS=1 CPUS=16 1> /dev/null 2> /dev/null
  24. echo "speedup ..."
  25. for size in 2048 4096 8192
  26. do
  27. echo "# ncpus time reftime" > $TIMINGDIR/speedup.$size
  28. for cpus in 1 2 4 6 8 10 12 14 16
  29. do
  30. export STARPU_NCPUS=$cpus
  31. echo "ncpus $cpus size $size"
  32. filename=$TIMINGDIR/timing.$cpus.$size
  33. $STARPU_LAUNCH $ROOTDIR/examples/mult/dw_mult -x $size -y $size -z $size -nblocks 16 2>/dev/null| tee $filename
  34. echo "$cpus `cat $TIMINGDIR/timing.$cpus.$size` `cat $TIMINGDIR/timing.1.$size`" >> $TIMINGDIR/speedup.$size
  35. done
  36. done