model_distrib.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/bash
  2. #
  3. # StarPU
  4. # Copyright (C) INRIA 2008-2009 (see AUTHORS file)
  5. #
  6. # This program 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. # This program 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. # we want to handle requests like *.debug
  18. for inputfile in "$@"
  19. do
  20. echo "Handle file $inputfile"
  21. hashlist=`cut -f 1 $inputfile | sort | uniq | xargs`
  22. # extract subfiles from the history file
  23. for h in $hashlist
  24. do
  25. echo "Handling tasks with hash = $h"
  26. grep "^$h" $inputfile| cut -f 2 > $inputfile.$h
  27. R --no-save > /dev/null << EOF
  28. x <- scan("$inputfile.$h")
  29. hist(x[x > quantile(x,0.01) & x<quantile(x,0.99)], col="red", breaks=50, density=10)
  30. EOF
  31. mv Rplots.pdf $inputfile.$h.pdf
  32. done
  33. done
  34. echo "finished !"