forked from Lapo9/AutocorrelationCUDA
-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_all.sh
executable file
·53 lines (31 loc) · 1.29 KB
/
run_all.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/sh
set -e
TIMEPOINTS="10 100 1000 2048 10000 30000"
NVIDIA_SMI_ARGS="-lms 1 --format=csv --query-gpu=timestamp,power.draw,utilization.gpu,utilization.memory,memory.total,memory.free,memory.used"
OUTPUT_FOLDER="output"
INPUT_FOLDER="../input"
LEVELS_CONFIG="8 10 16"
GROUP_SIZE_CONFIG="8 16 32"
echo "Compiling..."
make
echo "-----------------------------------"
for TIMEPOINT in $TIMEPOINTS; do
echo "Running benchmarks for $TIMEPOINT timepoints"
AUTOCORR_ARGS="-I 30 -r -p ${TIMEPOINT}"
for level in $LEVELS_CONFIG; do
for group in $GROUP_SIZE_CONFIG; do
CONFIG_OUTPUT="$OUTPUT_FOLDER/g$group-l$level"
if [ ! -d "$CONFIG_OUTPUT" ]; then
mkdir -p "$CONFIG_OUTPUT"
echo "Folder created: $CONFIG_OUTPUT"
fi
echo " Running current config: -l $level -g $group for $TIMEPOINT timepoints"
nvidia-smi $NVIDIA_SMI_ARGS -f "${CONFIG_OUTPUT}/${TIMEPOINT}-utilization.csv" & pid2=$!
./bin/main $AUTOCORR_ARGS -i "${INPUT_FOLDER}/${TIMEPOINT}.csv" -l "${level}" -g "${group}" -o "${CONFIG_OUTPUT}/${TIMEPOINT}.csv" > "${CONFIG_OUTPUT}/${TIMEPOINT}" & pid1=$!
wait $pid1
sleep 1
kill $pid2
sleep 1
done
done
done