-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_single_mahti.sh
68 lines (51 loc) · 1.48 KB
/
run_single_mahti.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
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
#SBATCH --time=02:00:00
#SBATCH --job-name=run_scaling
#SBATCH --output=%x_%j.out
#SBATCH --error=%x_%j.err
#SBATCH --partition=medium
#SBATCH --account=project_2001628
#SBATCH --nodes=2
#SBATCH --ntasks-per-node=64
export OMP_NUM_THREADS=1
module load elmer/latest
# Define the path to the case folder
path=Poisson/WinkelStructured
# Define the problem type
problem=Poisson
# Define the number of partitions (should be nodes * ntasks-per-node)
partitions=128
if ! grep -Fxq "$solver" solver-lists/$problem-Solvers.txt
then
echo
echo "Solver $solver not recommended for given problem. Exiting"
echo
return
fi
# Declare here which solver is to be used
solver=linsys/elmer_iter_BiCGStab2_BILU0.sif
# linMarker=??????
# Remove the result files if they already exist
# rm -f $path/results/f$linMarker.*
# 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
cp $solver $path/linsys.sif
cd $path
for mesh_level in 1 2 3 4 5 6 7; do
echo
echo
echo "-----------------------------------"
echo "Starting $solver with mesh level $mesh_level"
echo
start=$(date +%s)
srun 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
done
cd ../..