A triangle counting assignment for A.U.TH Parallel and distributed systems class.
Du kan inte välja fler än 25 ämnen
Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
|
- #!/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;
|