A triangle counting assignment for A.U.TH Parallel and distributed systems class.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

runall.sh 1.1 KiB

il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
il y a 4 ans
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;