model_perturbation.sh 1.8 KB

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