-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.sh
executable file
·47 lines (40 loc) · 1.25 KB
/
test.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
#!/bin/bash
# This script runs all the possible kernels with different arguments and checks
# the exit status of each run.
make clean
make
echo "mpirun --oversubscribe -n 10 ./benchmark GatherBcast 10 100 dummy"
mpirun --oversubscribe -n 10 ./benchmark GatherBcast 10 100 dummy
EXIT_CODE=$?
if [ "$EXIT_CODE" -ne "0" ] ; then
exit 1
fi
echo "mpirun --oversubscribe -n 10 ./benchmark AllReduce 10 100 dummy"
mpirun --oversubscribe -n 10 ./benchmark AllReduce 10 100 dummy
EXIT_CODE=$?
if [ "$EXIT_CODE" -ne "0" ] ; then
exit 1
fi
for kernel in PointToPoint PersistentComm ; do
for n_partners in 2 4 8 ; do
echo "mpirun --oversubscribe -n 9 ./benchmark $kernel 10 100 dummy 4096 $n_partners"
mpirun --oversubscribe -n 9 ./benchmark $kernel 10 100 dummy 4096 $n_partners
EXIT_CODE=$?
if [ "$EXIT_CODE" -ne "0" ] ; then
exit 1
fi
done
done
for lock_each_iteration in 0 1 ; do
for n_partners in 2 4 8 ; do
echo "mpirun --oversubscribe -n 9 ./benchmark Shm 10 100 dummy 4096 $n_partners $lock_each_iteration"
mpirun --oversubscribe -n 9 ./benchmark Shm 10 100 dummy 4096 $n_partners $lock_each_iteration
EXIT_CODE=$?
if [ "$EXIT_CODE" -ne "0" ] ; then
exit 1
fi
done
done
make clean
rm dummy.txt
echo "Test passed"