model_perturbation.sh 1.8 KB

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