-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhercules_preamble
executable file
·80 lines (77 loc) · 3.14 KB
/
hercules_preamble
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
73
74
75
76
77
78
79
80
#!/bin/sh
##SBATCH -q urgent
#SBATCH -t 08:00:00
#SBATCH -A gsienkf
#SBATCH -N 8
#SBATCH --ntasks-per-node=80
#SBATCH -p hercules
#SBATCH -J C96_3dvar_iau
#SBATCH -e C96_3dvar_iau.err
#SBATCH -o C96_3dvar_iau.out
export NODES=$SLURM_NNODES
export corespernode=$SLURM_CPUS_ON_NODE
export machine='hercules'
# for control forecast
if [ $NODES -eq 5 ]; then
# 5 nodes, 1 threads
export control_threads=1
export control_proc=400
export write_groups_ctl=1 # write groups for control forecast.
export write_tasks_ctl=16
export layout_ctl="8,8" # layout_x,layout_y (total # mpi tasks = $layout_x*$layout_y*6=($fg_proc/$fg_threads) - $write_tasks*$write_groups)
elif [ $NODES -eq 6 ]; then
# 6 nodes, 1 threads
export control_threads=1
export control_proc=480
export write_groups_ctl=4 # write groups for control forecast.
export write_tasks_ctl=12
export layout_ctl="6,12" # layout_x,layout_y (total # mpi tasks = $layout_x*$layout_y*6=($fg_proc/$fg_threads) - $write_tasks*$write_groups)
elif [ $NODES -eq 8 ]; then
# 8 nodes, 1 threads
export control_threads=1
export control_proc=640
export write_groups_ctl=4 # write groups for control forecast.
export write_tasks_ctl=16
export layout_ctl="8,12" # layout_x,layout_y (total # mpi tasks = $layout_x*$layout_y*6=($fg_proc/$fg_threads) - $write_tasks*$write_groups)
elif [ $NODES -eq 16 ]; then
# 8 nodes, 1 threads
export control_threads=2
export control_proc=640
export write_groups_ctl=4 # write groups for control forecast.
export write_tasks_ctl=16
export layout_ctl="8,12" # layout_x,layout_y (total # mpi tasks = $layout_x*$layout_y*6=($fg_proc/$fg_threads) - $write_tasks*$write_groups)
elif [ $NODES -eq 20 ]; then
# 8 nodes, 1 threads
export control_threads=1
export control_proc=1600
export write_groups_ctl=4 # write groups for control forecast.
export write_tasks_ctl=8
export layout_ctl="16,16" # layout_x,layout_y (total # mpi tasks = $layout_x*$layout_y*6=($fg_proc/$fg_threads) - $write_tasks*$write_groups)
elif [ $NODES -eq 32 ]; then
# 8 nodes, 1 threads
export control_threads=2
export control_proc=2560
export write_groups_ctl=4 # write groups for control forecast.
export write_tasks_ctl=32
export layout_ctl="16,12" # layout_x,layout_y (total # mpi tasks = $layout_x*$layout_y*6=($fg_proc/$fg_threads) - $write_tasks*$write_groups)
elif [ $NODES -eq 40 ]; then
# 8 nodes, 1 threads
export control_threads=2
export control_proc=3200
export write_groups_ctl=4 # write groups for control forecast.
export write_tasks_ctl=16
export layout_ctl="16,16" # layout_x,layout_y (total # mpi tasks = $layout_x*$layout_y*6=($fg_proc/$fg_threads) - $write_tasks*$write_groups)
elif [ $NODES -eq 48 ]; then
# 8 nodes, 1 threads
export control_threads=4
export control_proc=3840
export write_groups_ctl=4 # write groups for control forecast.
export write_tasks_ctl=24
export layout_ctl="12,12" # layout_x,layout_y (total # mpi tasks = $layout_x*$layout_y*6=($fg_proc/$fg_threads) - $write_tasks*$write_groups)
else
echo "processor layout for $NODES nodes not set"
exit 1
fi
export fg_proc=$corespernode
export fg_threads=1
export gsi_control_threads=10