forked from jswhit/da_scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gaea_preamble
74 lines (71 loc) · 2.26 KB
/
gaea_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
#!/bin/sh
#SBATCH -q urgent
##SBATCH -q debug
#SBATCH --clusters c4
#SBATCH -t 04:00:00
##SBATCH -t 00:30:00
#SBATCH -A nggps_psd
##SBATCH -A cpo_ngrr_e
#SBATCH -N 21
#SBATCH -J C192_hybgain_test
#SBATCH -e C192_hybgain_test.err
#SBATCH -o C192_hybgain_test.out
export NODES=$SLURM_NNODES
export corespernode=$SLURM_CPUS_ON_NODE
export machine='gaea'
# for control forecast
if [ $NODES -eq 10 ]; then
# 20 nodes, 1 threads
#export control_threads=2 # control forecast threads
#export control_proc=444 # total number of processors for control forecast
export control_threads=1
export control_proc=312
export write_groups_ctl=4 # write groups for control forecast.
export layout_ctl="6,8" # layout_x,layout_y (total # mpi tasks = $layout_x*$layout_y*6=($fg_proc/$fg_threads) - $write_tasks*$write_groups)
elif [ $NODES -eq 20 ] || [ $NODES -eq 21 ]; then
# 20 nodes, 3 threads
#export control_threads=2 # control forecast threads
#export control_proc=444 # total number of processors for control forecast
export control_threads=3
export control_proc=666
export control_proc_noquilt=648
export write_groups_ctl=1 # write groups for control forecast.
export layout_ctl="6,6" # layout_x,layout_y (total # mpi tasks = $layout_x*$layout_y*6=($fg_proc/$fg_threads) - $write_tasks*$write_groups)
elif [ $NODES -eq 40 ] || [ $NODES -eq 41 ]; then
# 40 nodes, 6 threads
export control_threads=6
export control_proc=1332
export control_proc_noquilt=1296
export write_groups_ctl=1
export layout_ctl="6, 6"
elif [ $NODES -eq 80 ]; then
# 80 nodes, 6 threads
export control_threads=6
export control_proc=2664
export write_groups_ctl=1
export layout_ctl="12, 12"
else
echo "processor layout for $NODES nodes not set"
exit 1
fi
# for ensemble forecast and GSI
export fg_proc=$corespernode
export fg_threads=1
export write_groups=1
export write_tasks=6
if [ $corespernode -eq 36 ]; then
export enkf_threads=9
export gsi_control_threads=6
export write_groups=2
export layout="2, 2"
elif [ $corespernode -eq 32 ]; then
export enkf_threads=8
export gsi_control_threads=4
export fg_proc=30
export layout="2, 2"
elif [ $corespernode -eq 24 ]; then
export layout="3, 1"
else
echo "layout for ensemble forecast not specified for corespernode=$corespernode"
exit 1
fi