model_perturbation.sh 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #!/bin/bash
  2. # StarPU --- Runtime system for heterogeneous multicore architectures.
  3. #
  4. # Copyright (C) 2008, 2009, 2010 Université de Bordeaux 1
  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. #ampllist="0.0 0.1 0.2 0.25 0.3 0.4 0.50 0.6 0.7 0.75 0.8 0.9 0.95 1.0 "
  18. #ampllist="1.0 0.50 0.25 0.1 0.0"
  19. ampllist="1.0 0.5"
  20. maxiter=1
  21. MAXCPU=3
  22. trace_perturbation()
  23. {
  24. export STARPU_SCHED="dm"
  25. for blocks in `seq 12 2 24`
  26. do
  27. ntheta=$(( $(($blocks*32)) + 2))
  28. size=$(( $(($blocks*32)) * 32))
  29. echo "size : $size"
  30. OPTIONS="-pin -v2 -nblocks $blocks -ntheta $ntheta -nthick 34"
  31. cd $ROOTDIR
  32. filename=$TIMINGDIR/pertubate.$size.$AMPL
  33. #rm -f $filename
  34. make clean 1> /dev/null 2> /dev/null
  35. make examples -j STARPU_ATLAS=1 CPUS=$MAXCPU CUDA=1 PERTURB_AMPL=$AMPL 1> /dev/null 2> /dev/null
  36. cd $DIR
  37. if [ $size -le 16384 ]
  38. then
  39. nsamples=$maxiter
  40. else
  41. nsamples=1
  42. fi
  43. for iter in `seq 1 $nsamples`
  44. do
  45. echo "$iter / $nsamples"
  46. val=`$ROOTDIR/examples/heat/heat $OPTIONS 2> /dev/null`
  47. echo "$val" >> $filename
  48. done
  49. done
  50. }
  51. DIR=$PWD
  52. ROOTDIR=$DIR/../..
  53. TIMINGDIR=$DIR/timing_perturbate/
  54. mkdir -p $TIMINGDIR
  55. for ampl in $ampllist
  56. do
  57. export AMPL=$ampl
  58. echo "ampl : $AMPL"
  59. trace_perturbation;
  60. done