A triangle counting assignment for A.U.TH Parallel and distributed systems class.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

runall.sh 1.1 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
1234567891011121314151617181920212223242526272829303132
  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;