forked from devinmcgloin/MPI_Linear_Equations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMPIAutomationScript
30 lines (26 loc) · 957 Bytes
/
MPIAutomationScript
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
#!/bin/bash
# AUTOMATION
txt=".txt"
rowArr=("2" "4" "8" "16" "32" "64" "128" "256" "512" "1024" "2048" "4096")
colArr=("1" "2" "4" "8" "16" "32" "64")
echo "STARTED"
rm -rf output.txt
rm -rf time.txt
module load openmpi-x86_64
for row in "${rowArr[@]}";
do
for col in "${colArr[@]}";
do
if (( $col <= $row )); then
for (( num=1; num<=5; num++));
do
echo "ROWS: $row CORES: $col TRIAL: $num" >> output.txt
echo "ROWS: $row CORES: $col TRIAL: $num" >> time.txt
echo "ROWS: $row CORES: $col TRIAL: $num"
(time mpirun -n $col ./gs $row$txt) >> output.txt 2>> time.txt
echo "" >> output.txt
echo "" >> time.txt
done
fi
done
done