-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_all.sh
58 lines (40 loc) · 1.24 KB
/
run_all.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
55
56
57
58
#!/bin/bash
# Define the path to the case folder
path=Poisson/WinkelStructured
# Define the problem type
problem=Poisson
# Define the number of partitions (should be np)
partitions=4
# Remove the result files if they already exist
# rm -f $path/results/f.*
# Copy the valid case file into the case.sif file
# This can be commented out if there is only a single
# default case file in the folder
cp $path/case_all.sif $path/case.sif
for mesh_level in 1; do
for solver in linsys/*.sif; do
if grep -Fxq "$solver" solver-lists/$problem-Solvers.txt
then
cp $solver $path/linsys.sif
cd $path
echo
echo
echo "-----------------------------------"
echo "Starting $solver with mesh level $mesh_level"
echo
start=$(date +%s)
mpirun -np 4 ElmerSolver case.sif -ipar 2 $mesh_level $partitions
end=$(date +%s)
echo
echo "Ending $solver with mesh level $mesh_level"
echo "Elapsed time: $(($end-$start)) s"
echo "-----------------------------------"
echo
cd ../..
else
echo
echo "Solver $solver not recommended for given problem. Ignoring it"
echo
fi
done
done