model_distrib.sh 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. table <- read.table("$inputfile.$h")
  29. x <- table[,1]
  30. hist(x[x > quantile(x,0.01) & x<quantile(x,0.99)], col="red", breaks=50, density=10)
  31. EOF
  32. mv Rplots.pdf $inputfile.$h.pdf
  33. done
  34. done
  35. echo "finished !"