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.
|
- #!/usr/bin/env bash
-
- if [[ $# -lt 2 ]]; then
- echo "Error: You must pass the matrix files and the number of iterations"
- echo "example $ runnall.sh mtx/s12.mtx 5"
- exit 1;
- fi
-
- dynamics=("out/hpc_ompv3" "out/hpc_ompv4" "out/hpc_pthv4")
-
- for ex in out/*; do
- echo "-------------------------------------------"
- echo "executable: $ex"
- for file in "$@"; do
- if [[ $file == ${@: -1} ]];then
- continue
- fi
- echo "running $ex -i $file -r ${@: -1} --timing -o /dev/null"
- eval $ex -i $file -r ${@: -1} --timing -o /dev/null
- echo "running $ex -i $file -r ${@: -1} --timing --print_count"
- eval $ex -i $file -r ${@: -1} --timing --print_count
-
- if [[ $ex == ${dynamics[0]} || $ex == ${dynamics[1]} || $ex == ${dynamics[2]} ]]; then
- echo "running $ex -i $file -r ${@: -1} --timing -o /dev/null --dynamic"
- eval $ex -i $file -r ${@: -1} --timing -o /dev/null --dynamic
- echo "running $ex -i $file -r ${@: -1} --timing --print_count --dynamic"
- eval $ex -i $file -r ${@: -1} --timing --print_count --dynamic
- fi
- done
- done
-
- exit 0;
|