A triangle counting assignment for A.U.TH Parallel and distributed systems class.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

32 Zeilen
1.1 KiB

  1. #!/usr/bin/env bash
  2. if [[ $# -lt 2 ]]; then
  3. echo "Error: You must pass the matrix files and the number of iterations"
  4. echo "example $ runnall.sh mtx/s12.mtx 5"
  5. exit 1;
  6. fi
  7. dynamics=("out/hpc_ompv3" "out/hpc_ompv4" "out/hpc_pthv4")
  8. for ex in out/*; do
  9. echo "-------------------------------------------"
  10. echo "executable: $ex"
  11. for file in "$@"; do
  12. if [[ $file == ${@: -1} ]];then
  13. continue
  14. fi
  15. echo "running $ex -i $file -r ${@: -1} --timing -o /dev/null"
  16. eval $ex -i $file -r ${@: -1} --timing -o /dev/null
  17. echo "running $ex -i $file -r ${@: -1} --timing --print_count"
  18. eval $ex -i $file -r ${@: -1} --timing --print_count
  19. if [[ $ex == ${dynamics[0]} || $ex == ${dynamics[1]} || $ex == ${dynamics[2]} ]]; then
  20. echo "running $ex -i $file -r ${@: -1} --timing -o /dev/null --dynamic"
  21. eval $ex -i $file -r ${@: -1} --timing -o /dev/null --dynamic
  22. echo "running $ex -i $file -r ${@: -1} --timing --print_count --dynamic"
  23. eval $ex -i $file -r ${@: -1} --timing --print_count --dynamic
  24. fi
  25. done
  26. done
  27. exit 0;