-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbenchmark.sh
40 lines (34 loc) · 1.45 KB
/
benchmark.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
#!/bin/bash
make clean
make all
echo "============================================"
echo "Serial Nelder Mead with 20 Parameters:"
echo "============================================"
./NelderTest.out 20
./LeeWiswall.out 20
./DistParNelderTest.out 20 1
echo "\n>>>>> The three implementations above produce identical results!"
echo "\n\n============================================"
echo "Replace the 2 worst points on the simplex"
echo "============================================"
mpirun -np 1 ./DistParNelderTest.out 20 2
mpirun -np 2 ./LeeWiswall.out 20
echo "\n>>>>> The two implementations above produce identical results!"
echo "\n\n============================================"
echo "Replace the 3 worst points on the simplex"
echo "============================================"
mpirun -np 1 ./DistParNelderTest.out 20 3
mpirun -np 3 ./LeeWiswall.out 20
echo "\n>>>>> The two implementations above produce identical results!"
echo "\n\n============================================"
echo "Parallel implementations with two workers"
echo "============================================"
mpirun -np 2 ./DistParNelderTest.out 20 1
mpirun -np 2 ./LeeWiswall.out 20
echo "\n>>>>> This takes a while."
echo "\n\n============================================"
echo "Parallel implementations with three workers"
echo "============================================"
mpirun -np 3 ./DistParNelderTest.out 20 1
mpirun -np 3 ./LeeWiswall.out 20
echo "\n>>>>> This takes a while."