NCAR / wrf_hydro_nwm_public

WRF-Hydro model code
https://ral.ucar.edu/projects/wrf_hydro
Other
181 stars 139 forks source link

mpi abort for clean return to shell #564

Closed jmccreight closed 3 years ago

jmccreight commented 3 years ago

TYPE: bug fix

KEYWORDS: stop abort noahmp hang

SOURCE: James McCreight NCAR

DESCRIPTION OF CHANGES: NoahMP calls "wrf_abort" but the subroutine doesnt finalize MPI and so MPI dosent return to the shell, it just hangs in this situation. I have a case where I need to be able to cause the abort and get the program to return, so i stole the code from https://github.com/NCAR/wrf_hydro_nwm_public/blob/7cf193b9ea3be508895e129d28cda87baa17dd37/trunk/NDHMS/MPP/mpp_land.F#L2495 it's short. it works under gnu.

ISSUE: The GitHub Issue that this PR addresses. For issue number 123, it would be:

Fixes #563 

TESTS CONDUCTED: I have a reproducible case that can be run if desired. I ran it and it worked under gnu.

NOTES:

Checklist

Merging the PR depends on following checklist being completed. Add X between each of the square brackets if they are completed in the PR itself. If a bullet is not relevant to you, please comment on why below the bullet.

This should be reviewed by @rcabell @scrasmussen, i just dashed together a solution.