Skip to content

Commit

Permalink
Merge branch 'develop' into feature/atmos_upp_com_in_out
Browse files Browse the repository at this point in the history
  • Loading branch information
aerorahul authored Sep 16, 2024
2 parents dddcaa8 + 03ee9f8 commit 970998c
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 6 deletions.
4 changes: 2 additions & 2 deletions env/WCOSS2.env
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,12 @@ elif [[ "${step}" = "postsnd" ]]; then
export OMP_NUM_THREADS=1

export NTHREADS_POSTSND=${NTHREADS1}
export mpmd_opt="-ppn 21 ${mpmd_opt}"

export NTHREADS_POSTSNDCFP=${threads_per_task_postsndcfp:-1}
[[ ${NTHREADS_POSTSNDCFP} -gt ${max_threads_per_task} ]] && export NTHREADS_POSTSNDCFP=${max_threads_per_task}
export APRUN_POSTSNDCFP="${launcher} -np ${ntasks_postsndcfp} ${mpmd_opt}"

export mpmd_opt="-ppn ${tasks_per_node} ${mpmd_opt}"

elif [[ "${step}" = "awips" ]]; then

export NTHREADS_AWIPS=${NTHREADS1}
Expand Down
1 change: 1 addition & 0 deletions parm/config/gefs/config.cleanup
8 changes: 8 additions & 0 deletions parm/config/gefs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,14 @@ case ${step} in
export threads_per_task=1
export memory="4096M"
;;

"cleanup")
export walltime="00:15:00"
export ntasks=1
export tasks_per_node=1
export threads_per_task=1
export memory="4096M"
;;
*)
echo "FATAL ERROR: Invalid job ${step} passed to ${BASH_SOURCE[0]}"
exit 1
Expand Down
18 changes: 16 additions & 2 deletions parm/config/gfs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -1208,9 +1208,23 @@ case ${step} in
"postsnd")
walltime="02:00:00"
export ntasks=141
threads_per_task=6
export tasks_per_node=21
export ntasks_postsndcfp=9
case ${CASE} in
"C768")
tasks_per_node=21
threads_per_task=6
memory="23GB"
;;
"C1152")
tasks_per_node=9
threads_per_task=14
memory="50GB"
;;
*)
tasks_per_node=21
threads_per_task=6
;;
esac
export tasks_per_node_postsndcfp=1
postsnd_req_cores=$(( tasks_per_node * threads_per_task ))
if (( postsnd_req_cores > max_tasks_per_node )); then
Expand Down
4 changes: 2 additions & 2 deletions workflow/applications/gefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def _get_app_configs(self):
"""
Returns the config_files that are involved in gefs
"""
configs = ['stage_ic', 'fcst', 'atmos_products', 'arch']
configs = ['stage_ic', 'fcst', 'atmos_products', 'arch', 'cleanup']

if self.nens > 0:
configs += ['efcs', 'atmos_ensstat']
Expand Down Expand Up @@ -82,6 +82,6 @@ def get_task_names(self):
if self.do_extractvars:
tasks += ['extractvars']

tasks += ['arch']
tasks += ['arch', 'cleanup']

return {f"{self.run}": tasks}
27 changes: 27 additions & 0 deletions workflow/rocoto/gefs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,9 @@ def arch(self):
deps.append(rocoto.add_dependency(dep_dict))
dep_dict = {'type': 'metatask', 'name': 'wave_post_bndpnt_bull'}
deps.append(rocoto.add_dependency(dep_dict))
if self.app_config.do_extractvars:
dep_dict = {'type': 'metatask', 'name': 'extractvars'}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep=deps, dep_condition='and')

resources = self.get_resource('arch')
Expand All @@ -564,3 +567,27 @@ def arch(self):
task = rocoto.create_task(task_dict)

return task

def cleanup(self):
deps = []
dep_dict = {'type': 'task', 'name': 'arch'}
deps.append(rocoto.add_dependency(dep_dict))

dependencies = rocoto.create_dependency(dep=deps)

resources = self.get_resource('cleanup')
task_name = 'cleanup'
task_dict = {'task_name': task_name,
'resources': resources,
'envars': self.envars,
'cycledef': 'gefs',
'dependency': dependencies,
'command': f'{self.HOMEgfs}/jobs/rocoto/cleanup.sh',
'job_name': f'{self.pslot}_{task_name}_@H',
'log': f'{self.rotdir}/logs/@Y@m@d@H/{task_name}.log',
'maxtries': '&MAXTRIES;'
}

task = rocoto.create_task(task_dict)

return task

0 comments on commit 970998c

Please sign in to comment.