bug fix: disable concurrency in GFS_phys_time_vary_init NetCDF calls #735
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Occasionally, the model will fail in GFS_phys_time_vary.fv3.F90 during the first physics timestep. This is caused by heap corruption earlier, during gfs_phys_time_vary_init. After much debugging, I tracked down the problem.
The NetCDF library is not thread-safe:
We're calling a non-thread-safe library in a threaded region. There are multiple NetCDF calls going concurrently. The fix is to read the NetCDF files one at a time.
Issue(s) addressed
Testing
How were these changes tested?
A failing C768 test case on Hera.
Also, running the regression tests on Hera.
What compilers / HPCs was it tested with?
Intel Hera.
GNU tests on Hera led to network errors at large node counts. This is an unrelated issue. Most likely, it is caused by choosing buggy libraries in Spack Stack.
Are the changes covered by regression tests? (If not, why? Do new tests need to be added?)
Testing this requires running a gigantic test. A hundred fifty nodes at least. It isn't feasible to put that in the regression tests.
Have the ufs-weather-model regression test been run? On what platform?
NOAA Hera.
Will the code updates change regression test baseline? If yes, why? Please show the baseline directory below.
No.
Please commit the regression test log files in your ufs-weather-model branch
Yes.
Dependencies