You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

plot-filter.sh 2.4 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #!/bin/sh
  2. # **********************************************************************************
  3. # Copyright (c) 2014, The OpenBLAS Project
  4. # All rights reserved.
  5. # Redistribution and use in source and binary forms, with or without
  6. # modification, are permitted provided that the following conditions are
  7. # met:
  8. # 1. Redistributions of source code must retain the above copyright
  9. # notice, this list of conditions and the following disclaimer.
  10. # 2. Redistributions in binary form must reproduce the above copyright
  11. # notice, this list of conditions and the following disclaimer in
  12. # the documentation and/or other materials provided with the
  13. # distribution.
  14. # 3. Neither the name of the OpenBLAS project nor the names of
  15. # its contributors may be used to endorse or promote products
  16. # derived from this software without specific prior written permission.
  17. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  18. # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19. # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20. # ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
  21. # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22. # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  23. # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  24. # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  25. # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
  26. # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27. # **********************************************************************************
  28. # ************************************************************************
  29. # sample filter for data output from benchmark programs
  30. #
  31. # usage example:
  32. # ./dgemm.goto 2>&1|./plotfilter.sh >OpenBLAS
  33. # ************************************************************************
  34. if [ $# -eq 1 ]
  35. then
  36. arg1=$1
  37. else
  38. arg1=0
  39. fi
  40. case $arg1 in
  41. L)
  42. # Linpack Benchmark
  43. awk '/MFlops/ { print $1,int($8) }'|tail --lines=+2
  44. ;;
  45. C)
  46. # Cholesky Benchmark
  47. awk '/MFlops/ { print $3,int($9) }'|tail --lines=+2
  48. ;;
  49. B)
  50. # Copy Benchmark
  51. awk '/MBytes/ { print $1,int($3) }'|tail --lines=+2
  52. ;;
  53. *)
  54. awk '/MFlops/ { print $1,int($3) }'|tail --lines=+2
  55. ;;
  56. esac