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.
|
- #!/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;
|