-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetTimeImpi.sh
More file actions
executable file
·42 lines (40 loc) · 861 Bytes
/
getTimeImpi.sh
File metadata and controls
executable file
·42 lines (40 loc) · 861 Bytes
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
#!/bin/bash -e
run() {
ibrun.symm -m "$1" &>> work${2}.log
}
threadWorkComm() {
export MIC_MY_NSLOTS=1
export MIC_PPN=1
run "./threadWorkComm.${1} $2" $2
}
mpiWork() {
export MIC_MY_NSLOTS=$1
export MIC_PPN=$1
run "./mpiWork.${1}" $2
}
mpiWorkThreadMult() {
export MIC_MY_NSLOTS=$1
export MIC_PPN=$1
run "./mpiWorkThreadMult.${1}" $2
}
getAvg() {
t=$(awk '/realTime/ {sum+=$2; cnt+=1;} END {print sum/cnt}' work${1}.log)
echo -n ", $t "
}
declare -a fns
fns[1]="threadWorkComm"
fns[2]="mpiWork"
fns[3]="mpiWorkThreadMult"
for fnIdx in "${!fns[@]}"; do
for affinity in 1 2 4; do
echo -n "${fns[$fnIdx]}, $affinity"
for workers in 2 4 8 16 32; do
cat /dev/null > work${workers}.log
for j in {0..4}; do
${fns[$fnIdx]} $affinity $workers
done
getAvg $workers
done
echo ""
done
done