Skip to content

Commit ee10788

Browse files
[develop] Add MPI for UFS_FIRE, add a check for incorrectly placed envvars: in config file, remove obsolete FV3_RRFS_v1beta suite (ufs-community#1376)
This PR: * Updates to the latest UFS Weather Model hash, which includes the addition of MPI capability for the CFBM fire model (UFS_FIRE). The MPI parallelization is activated by setting FIRE_NUM_TASKS to a value greater than the default of 1. In addition, a new setting FIRE_GEO_EM_FILE is provided in case the user wants to use an input fire geo_em file with a different name. This supersedes the old FIRE_INPUT_DIR which assumed the filename would be geo_em.d01.nc, though the default values are set so that config files using the old setting will still work as expected * Adds a check for if the user incorrectly places a setting outside of the envvars: section for all config variables. This will work on all sections, not just fire: * Incorporates changes from ufs-community#1375, removing the obsolete FV3_RRFS_v1beta CCPP suite. --------- Co-authored-by: michael.lueken <Michael.Lueken@noaa.gov>
1 parent 5c43d30 commit ee10788

25 files changed

Lines changed: 70 additions & 504 deletions

Externals.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ protocol = git
1212
repo_url = https://github.com/ufs-community/ufs-weather-model
1313
# Specify either a branch name or a hash but not both.
1414
#branch = develop
15-
hash = 826f6ff
15+
hash = 0de77d26
1616
local_path = sorc/ufs-weather-model
1717
required = True
1818

doc/UsersGuide/BuildingRunningTesting/FIRE.rst

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,44 @@ The fire module has the ability to print out additional messages to the log file
9898
fire:
9999
FIRE_PRINT_MSG: 1
100100
101-
The fire module now supports OpenMP parallelization. By default, parallelization is off, but it can be enabled by setting ``OMP_NUM_THREADS_FIRE`` to a value greater than 1. In testing with the default case (200x200 domain) we have observed a 10-25% speedup with ``OMP_NUM_THREADS_FIRE: 2`` vs 1, with only marginal additional speedup for ``OMP_NUM_THREADS_FIRE>2``. However, larger domains may benefit from additional parallel threads.
101+
The fire module supports both OpenMP and MPI parallelization; they can be used individually or together. By default, parallelization is off, but it can be enabled at runtime with the following settings.
102+
103+
OpenMP parallelization can be activated by setting ``OMP_NUM_THREADS_FIRE`` to a value greater than 1.
102104

103105
.. code-block:: console
104106
105107
fire:
106108
OMP_NUM_THREADS_FIRE: 2
107109
110+
MPI parallelization can be activated by setting ``FIRE_NUM_TASKS`` to a value greater than 1.
111+
112+
.. code-block:: console
113+
114+
fire:
115+
FIRE_NUM_TASKS: 2
116+
117+
We tested several combinations of parallelization methods using a 15-hour one-way coupled (ATM->FIRE) forecast; the results are shown in the table below. As a summary, MPI parallelization shows more efficient speedup per core than OpenMP parallelization, though multiple combinations resulted in significant speedup. Scaling from single-core to 2 MPI tasks resulted in nearly linear speedup (45% reduction in wallclock time). It is likely that larger domains will benefit more from additional tasks, both for OpenMP and MPI.
118+
119+
.. list-table:: Tests of different parallelization options with 200x200 3km atmospheric grid, 200x200 100m fire grid
120+
:header-rows: 1
121+
:stub-columns: 1
122+
123+
* - Timings for parallel tests (s)
124+
- MPI 1
125+
- MPI 2
126+
- MPI 4
127+
* - OpenMP 1
128+
- 2820.20
129+
- 1577.75
130+
- 1343.32
131+
* - OpenMP 2
132+
- 2168.50
133+
- 1372.19
134+
- 1334.16
135+
* - OpenMP 4
136+
- 1867.51
137+
- 1373.24
138+
- 1340.81
108139

109140
Additional boundary conditions file
110141
-----------------------------------
@@ -119,7 +150,9 @@ Once the file is acquired/created, you will need to specify its location in your
119150
120151
fire:
121152
envvars:
122-
FIRE_INPUT_DIR: /directory/containing/geo_em/file
153+
FIRE_GEO_EM_FILE: /directory/containing/geo_em/file/geo_em.d01.nc
154+
155+
Note that you can use a different filename if you prefer.
123156

124157
Specifying a fire ignition
125158
---------------------------
@@ -138,7 +171,7 @@ Here is one example of settings that can be specified for a UFS FIRE simulation:
138171
fire:
139172
envvars:
140173
UFS_FIRE: True
141-
FIRE_INPUT_DIR: /home/fire_input
174+
FIRE_GEO_EM_FILE: /home/fire_input/geo_em.d01.nc
142175
DT_FIRE: 0.5
143176
OUTPUT_DT_FIRE: 1800
144177
FIRE_NUM_IGNITIONS: 1

doc/UsersGuide/CustomizingTheWorkflow/ConfigWorkflow.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2130,6 +2130,9 @@ Non-default parameters for the Community Fire Behavior Model (CFBM) in SRW are s
21302130
``FIRE_INPUT_DIR``: (Default: "")
21312131
Directory where fire input file (geo_em.d01.nc) can be found
21322132

2133+
``FIRE_GEO_EM_FILE``: (default: '{{ [fire.envvars.FIRE_INPUT_DIR, "geo_em.d01.nc"]|path_join}}')
2134+
Full path to fire input geo_em netCDF file
2135+
21332136
``DT_FIRE``: (Default: 0.5)
21342137
The fire behavior component’s integration timestep in seconds
21352138

parm/FV3.input.yml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,6 @@
77
# run with.
88
#
99

10-
FV3_RRFS_v1beta:
11-
gfs_physics_nml:
12-
do_deep: False
13-
do_mynnsfclay: True
14-
imfdeepcnv: -1
15-
imfshalcnv: -1
16-
iopt_alb: 2
17-
iopt_btr: 1
18-
iopt_crs: 1
19-
iopt_dveg: 2
20-
iopt_frz: 1
21-
iopt_inf: 1
22-
iopt_rad: 1
23-
iopt_run: 1
24-
iopt_sfc: 1
25-
iopt_snf: 4
26-
iopt_stc: 1
27-
iopt_tbot: 2
28-
iopt_trs: 2
29-
lsm: 2
30-
lsoil_lsm: 4
31-
3210
FV3_WoFS_v0:
3311
gfs_physics_nml:
3412
do_deep: False

parm/diag_table.FV3_RRFS_v1beta

Lines changed: 0 additions & 361 deletions
This file was deleted.

parm/field_table.FV3_RRFS_v1beta

Lines changed: 0 additions & 65 deletions
This file was deleted.

scripts/exregional_make_ics.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ case "${CCPP_PHYS_SUITE}" in
200200
varmap_file="GFSphys_var_map.txt"
201201
;;
202202
#
203-
"FV3_RRFS_v1beta" | \
204203
"FV3_GFS_v15_thompson_mynn_lam3km" | \
205204
"FV3_GFS_v17_p8" | \
206205
"FV3_WoFS_v0" | \

scripts/exregional_make_lbcs.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ case "${CCPP_PHYS_SUITE}" in
194194
varmap_file="GFSphys_var_map.txt"
195195
;;
196196
#
197-
"FV3_RRFS_v1beta" | \
198197
"FV3_GFS_v15_thompson_mynn_lam3km" | \
199198
"FV3_GFS_v17_p8" | \
200199
"FV3_WoFS_v0" | \

scripts/exregional_run_fcst.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ if [ $(boolify "${UFS_FIRE}") = "TRUE" ]; then
831831
$settings"
832832
fi
833833
# Link fire input file
834-
create_symlink_to_file ${FIRE_INPUT_DIR}/geo_em.d01.nc geo_em.d01.nc FALSE
834+
create_symlink_to_file ${FIRE_GEO_EM_FILE} geo_em.d01.nc FALSE
835835
fi
836836
#
837837
#-----------------------------------------------------------------------

sorc/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ if (BUILD_UFS)
3030
if(CPL_AQM)
3131
set(CCPP_SUITES "FV3_GFS_v15p2,FV3_GFS_v16,FV3_GFS_v17_p8")
3232
else()
33-
set(CCPP_SUITES "FV3_GFS_v15p2,FV3_GFS_v16,FV3_GFS_v17_p8,FV3_RRFS_v1beta,FV3_HRRR,FV3_HRRR_gf,FV3_RAP,FV3_GFS_v15_thompson_mynn_lam3km,FV3_WoFS_v0,RRFS_sas")
33+
set(CCPP_SUITES "FV3_GFS_v15p2,FV3_GFS_v16,FV3_GFS_v17_p8,FV3_HRRR,FV3_HRRR_gf,FV3_RAP,FV3_GFS_v15_thompson_mynn_lam3km,FV3_WoFS_v0,RRFS_sas")
3434
endif()
3535
endif()
3636

0 commit comments

Comments
 (0)