-
Notifications
You must be signed in to change notification settings - Fork 2
/
runme_perf.sh
72 lines (43 loc) · 1.45 KB
/
runme_perf.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
69
70
71
72
#!/bin/bash
# -> to make it executable: chmod +x runme.sh or chmod 755 runme.sh
module purge > /dev/null 2>&1
module load julia
module load cuda/11.2
# module load openmpi/gcc83-316-c112
module load openmpi/gcc83-314-c112
mpirun_=$(which mpirun)
RESOL1=( 32 64 128 256 512 )
RESOL2=512
NP=( 1 2 4 8 )
declare -a RUN=( "diff_3D_nonlin_perf" "diff_3D_nonlin_multixpu_perf" )
USE_GPU=true
DO_VIZ=false
DO_SAVE=true
DO_SAVE_VIZ=false
# Read the array values with space
for name in "${RUN[@]}"; do
if [ "$DO_SAVE" = "true" ]; then
FILE=../../output/out_"$name".txt
if [ -f "$FILE" ]; then
echo "Systematic results (file $FILE) already exists. Remove to continue."
exit 0
else
echo "Launching systematics (saving results to $FILE)."
fi
fi
if [ "$name" = "${RUN[0]}" ]; then
for i in "${RESOL1[@]}"; do
for ie in {1..5}; do
echo "== Running script $name, resol=$i (test $ie)"
./submit_julia.sh $i $USE_GPU $DO_VIZ $DO_SAVE $DO_SAVE_VIZ $name
done
done
else
for np in "${NP[@]}"; do
for ie in {1..5}; do
echo "== Running script $name, resol=$RESOL2, nprocs=$np (test $ie)"
$mpirun_ -np $np -rf gpu_rankfile_node40 ./submit_julia.sh $RESOL2 $USE_GPU $DO_VIZ $DO_SAVE $DO_SAVE_VIZ $name
done
done
fi
done