-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexperiment.sh
54 lines (52 loc) · 1.79 KB
/
experiment.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
54
#!/bin/bash
mpicc main.c -o out
echo "experiments: " > output.txt
cp input3.txt input.txt
echo "n = 3 with 2 processes" >> output.txt
mpirun -n 2 ./out >> output.txt
echo "n = 3 with 3 processes" >> output.txt
mpirun -n 3 ./out >> output.txt
echo "n = 3 with 4 processes" >> output.txt
mpirun -n 4 ./out >> output.txt
cp input4.txt input.txt
echo "n = 4 with 2 processes" >> output.txt
mpirun -n 2 ./out >> output.txt
echo "n = 4 with 3 processes" >> output.txt
mpirun -n 3 ./out >> output.txt
echo "n = 4 with 4 processes" >> output.txt
mpirun -n 4 ./out >> output.txt
cp input5.txt input.txt
echo "n = 5 with 2 processes" >> output.txt
mpirun -n 2 ./out >> output.txt
echo "n = 5 with 3 processes" >> output.txt
mpirun -n 3 ./out >> output.txt
echo "n = 5 with 4 processes" >> output.txt
mpirun -n 4 ./out >> output.txt
cp input6.txt input.txt
echo "n = 6 with 2 processes" >> output.txt
mpirun -n 2 ./out >> output.txt
echo "n = 6 with 3 processes" >> output.txt
mpirun -n 3 ./out >> output.txt
echo "n = 6 with 4 processes" >> output.txt
mpirun -n 4 ./out >> output.txt
cp input7.txt input.txt
echo "n = 7 with 2 processes" >> output.txt
mpirun -n 2 ./out >> output.txt
echo "n = 7 with 3 processes" >> output.txt
mpirun -n 3 ./out >> output.txt
echo "n = 7 with 4 processes" >> output.txt
mpirun -n 4 ./out >> output.txt
cp input8.txt input.txt
echo "n = 8 with 2 processes" >> output.txt
mpirun -n 2 ./out >> output.txt
echo "n = 8 with 3 processes" >> output.txt
mpirun -n 3 ./out >> output.txt
echo "n = 8 with 4 processes" >> output.txt
mpirun -n 4 ./out >> output.txt
cp input9.txt input.txt
echo "n = 9 with 2 processes" >> output.txt
mpirun -n 2 ./out >> output.txt
echo "n = 9 with 3 processes" >> output.txt
mpirun -n 3 ./out >> output.txt
echo "n = 9 with 4 processes" >> output.txt
mpirun -n 4 ./out >> output.txt