model_perturbation.sh 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #!/bin/bash
  2. # StarPU --- Runtime system for heterogeneous multicore architectures.
  3. #
  4. # Copyright (C) 2008-2011,2014, 2019 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. # Testing another specific scheduler, no need to run this
  22. [ -z "$STARPU_SCHED" -a "$STARPU_SCHED" != dm ] || exit 77
  23. maxiter=1
  24. MAXCPU=3
  25. trace_perturbation()
  26. {
  27. export STARPU_SCHED="dm"
  28. for blocks in `seq 12 2 24`
  29. do
  30. ntheta=$(( $(($blocks*32)) + 2))
  31. size=$(( $(($blocks*32)) * 32))
  32. echo "size : $size"
  33. OPTIONS="-pin -v2 -nblocks $blocks -ntheta $ntheta -nthick 34"
  34. cd $ROOTDIR
  35. filename=$TIMINGDIR/pertubate.$size.$AMPL
  36. #rm -f $filename
  37. make clean 1> /dev/null 2> /dev/null
  38. make examples -j STARPU_ATLAS=1 CPUS=$MAXCPU CUDA=1 PERTURB_AMPL=$AMPL 1> /dev/null 2> /dev/null
  39. cd $DIR
  40. if [ $size -le 16384 ]
  41. then
  42. nsamples=$maxiter
  43. else
  44. nsamples=1
  45. fi
  46. for iter in `seq 1 $nsamples`
  47. do
  48. echo "$iter / $nsamples"
  49. val=`$ROOTDIR/examples/heat/heat $OPTIONS 2> /dev/null`
  50. echo "$val" >> $filename
  51. done
  52. done
  53. }
  54. DIR=$PWD
  55. ROOTDIR=$DIR/../..
  56. TIMINGDIR=$DIR/timing_perturbate/
  57. mkdir -p $TIMINGDIR
  58. for ampl in $ampllist
  59. do
  60. export AMPL=$ampl
  61. echo "ampl : $AMPL"
  62. trace_perturbation;
  63. done