csci5451/assignments/01/run_benchmark.sh

18 lines
607 B
Bash
Raw Normal View History

2023-10-09 09:17:14 +00:00
#!/usr/bin/env bash
LC_OPENMP=${LC_OPENMP:-./lc_openmp}
LC_PTHREADS=${LC_PTHREADS:-./lc_pthreads}
SMALL_DATA=${SMALL_DATA:-./dataset/small_data.csv}
SMALL_LABEL=${SMALL_DATA:-./dataset/small_label.csv}
MNIST_DATA=${MNIST_DATA:-./dataset/MNIST_data.csv}
MNIST_LABEL=${MNIST_LABEL:-./dataset/MNIST_label.csv}
for impl in ${LC_PTHREADS} ${LC_OPENMP}; do
for dataset in "${SMALL_DATA} ${SMALL_LABEL}" "${MNIST_DATA} ${MNIST_LABEL}"; do
for t in 1 2 4 8 16; do
echo $impl $dataset 10 "$t"
$impl $dataset 10 "$t" | grep -F "Program time (compute)"
done
done
done