-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solution to UV sponge restarts #1434
Conversation
This is required for the u,v sponges to be invariant of tiling. I don't know why, but the problem only showed up for me in a narrow channel in the Bering domain.
The MOM_control_struct is declared and passed as a pointer to a CS (usually allocated anonymously) and treated as if it were a pointer, even though there is currently no real advantage to doing so. After the FMS update, the deallocation of this CS was causing a segmentation fault in the PGI compilers. While the underlying cause was never determined, it is likely due to some automated deallocation of the CS contents, whose addressing became scrambled. This problem can be resolved by moving all of the CS contents to stack, so that the contents are automatically removed upon exiting whatever function it was instantiated. Subsequent calls can reference the local (or parent) stack contents.
- Without this change, the edges don't reproduce on restart due to the h values outside being nonsense.
This commit has #1429 merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the logic of these changes, and they have passed both the TC testing and the pipeline tests (which I ran manually). In particular, the halo update on the input file mask should avoid improperly using data that inadvertently differs between PEs.
However, it should be noted that this PR could change answers in some (unidentified) cases that attempt to use the velocity sponges at open boundary points.
Solution to #1430, sitting on other PRs, hopefully not a problem.
@MJHarrison-GFDL's tips were helpful, not quite all that was required.
I cleaned up the unused tmpT1d stuff from the uv sponges.