-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathgaea_preamble_cpld_slurm
88 lines (86 loc) · 3.09 KB
/
gaea_preamble_cpld_slurm
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
81
82
83
84
85
86
87
#!/bin/sh
#SBATCH -q urgent
#SBATCH -t 02:00:00
##SBATCH -q debug
##SBATCH -t 00:30:00
#SBATCH -A nggps_psd
#SBATCH --clusters c4
#SBATCH -N 48
#SBATCH -J ufs_era5_replay
#SBATCH -e ufs_era5_replay.err
#SBATCH -o ufs_era5_replay.out
export NODES=$SLURM_NNODES
# c4 is 36 cores per node, c3 is 32
export corespernode=$SLURM_CPUS_ON_NODE
export machine='gaea'
# for control forecast
if [ $NODES -eq 2 ]; then
export gsi_control_threads=1
export control_threads=1
export control_proc=72
export write_groups=4 # write groups for control forecast.
export write_tasks=1
export layout="3,2" # layout_x,layout_y (total # mpi tasks = $layout_x*$layout_y*6=($fg_proc/$fg_threads) - $write_tasks*$write_groups)
export nprocs_cpl=36
export nprocs_atm=40
export nprocs_ice=8
export nprocs_ocn=24
elif [ $NODES -eq 11 ]; then # 0.25 degree setup
export gsi_control_threads=4
export control_threads=1
export control_proc=396
export write_groups=4 # write groups for control forecast.
export write_tasks=9
export layout="6,6" # layout_x,layout_y (total # mpi tasks = $layout_x*$layout_y*6=($fg_proc/$fg_threads) - $write_tasks*$write_groups)
export nprocs_cpl=216 # layout*6
export nprocs_atm=252 # nprocs_cpl + write_tasks*write_groups
export nprocs_ice=36
export nprocs_ocn=108
elif [ $NODES -eq 25 ]; then # 0.25 degree setup
export gsi_control_threads=4
export control_threads=1
export control_proc=900
export write_groups=4 # write groups for control forecast.
export write_tasks=36
export layout="12,6" # layout_x,layout_y (total # mpi tasks = $layout_x*$layout_y*6=($fg_proc/$fg_threads) - $write_tasks*$write_groups)
export nprocs_cpl=432 # layout*6
export nprocs_atm=576 # nprocs_cpl + write_tasks*write_groups
export nprocs_ice=72
export nprocs_ocn=252
elif [ $NODES -eq 27 ]; then # 0.25 degree setup
export gsi_control_threads=6
export control_threads=1
export control_proc=972
export write_groups=4 # write groups for control forecast.
export write_tasks=27 # 3 nodes
export layout="12,8" # layout_x,layout_y (total # mpi tasks = $layout_x*$layout_y*6=($fg_proc/$fg_threads) - $write_tasks*$write_groups)
export nprocs_cpl=576 # layout*6 16 nodes
export nprocs_atm=684 # nprocs_cpl + write_tasks*write_groups
export nprocs_ice=72 # 2 nodes (total 22)
export nprocs_ocn=216 # 6 nodes (total 28)
elif [ $NODES -eq 48 ]; then # 0.25 degree setup
export gsi_control_threads=6
export control_threads=1
export control_proc=1728
export write_groups=4
export write_tasks=54
export layout="12,16"
export nprocs_cpl=1152 # layout*6
export nprocs_atm=1368 # nprocs_cpl + write_tasks*write_groups
export nprocs_ice=72
export nprocs_ocn=288
elif [ $NODES -eq 96 ]; then # 0.25 degree setup
export gsi_control_threads=6
export control_threads=2
export control_proc=3456
export write_groups=4
export write_tasks=54
export layout="12,16"
export nprocs_cpl=1152 # layout*6
export nprocs_atm=1368 # nprocs_cpl + write_tasks*write_groups
export nprocs_ice=72
export nprocs_ocn=288
else
echo "processor layout for $NODES nodes not set"
exit 1
fi