Skip to content

Commit

Permalink
Enable parallel metp jobs and fix race condition with the gfscleanup …
Browse files Browse the repository at this point in the history
…job (#2907)

This brings in a change to EMC_verif-global that offsets the start time
of parallel instances when running metp jobs. This prevents Python from
attempting to create the same directory in multiple instances.
Simultaneously, this also fixes an issue with the `gfscleanup` job
potentially running before the `metp` jobs.
Resolves #2906
Resolves #2899
  • Loading branch information
DavidHuber-NOAA committed Sep 27, 2024
1 parent a694cf1 commit a443fd1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion parm/archive/enkf.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ enkf:
{% else %}
{% set steps = ["eobs", "eupd"] %}
{% for mem in range(1, nmem_ens + 1) %}
{% do steps.append("eomg_mem{{ '%03d' % mem }}") %}
{% do steps.append("eomg_mem" ~ '%03d' % mem) %}
{% endfor %}
{% endif %}
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions parm/config/gfs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -988,8 +988,8 @@ case ${step} in
threads_per_task=1
walltime_gdas="03:00:00"
walltime_gfs="06:00:00"
ntasks=1
tasks_per_node=1
ntasks=4
tasks_per_node=4
export memory="80G"
;;

Expand Down
2 changes: 1 addition & 1 deletion sorc/verif-global.fd
8 changes: 6 additions & 2 deletions workflow/rocoto/gfs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,8 +855,8 @@ def fcst(self):
try:
task = fcst_map[self.app_config.mode]()
except KeyError:
raise NotImplementedError(f'{self.app_config.mode} is not a valid type.\n' +
'Currently supported forecast types are:\n' +
raise NotImplementedError(f'{self.app_config.mode} is not a valid type.\n'
f'Currently supported forecast types are:\n'
f'{" | ".join(fcst_map.keys())}')

return task
Expand Down Expand Up @@ -2330,6 +2330,10 @@ def cleanup(self):
dep_dict = {'type': 'task', 'name': f'{self.run}npoess_pgrb2_0p5deg'}
deps.append(rocoto.add_dependency(dep_dict))

if self.app_config.do_metp and self.run in ['gfs']:
dep_dict = {'type': 'metatask', 'name': f'{self.run}metp'}
deps.append(rocoto.add_dependency(dep_dict))

dependencies = rocoto.create_dependency(dep_condition='and', dep=deps)

resources = self.get_resource('cleanup')
Expand Down

0 comments on commit a443fd1

Please sign in to comment.