Skip to content
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

Merged
merged 13 commits into from
Jul 26, 2021
Merged

Solution to UV sponge restarts #1434

merged 13 commits into from
Jul 26, 2021

Conversation

kshedstrom
Copy link
Collaborator

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.

kshedstrom and others added 9 commits June 10, 2021 15:13
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.
@MJHarrison-GFDL
Copy link
Contributor

This commit has #1429 merged.

Copy link
Collaborator

@Hallberg-NOAA Hallberg-NOAA left a 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.

@Hallberg-NOAA Hallberg-NOAA merged commit 91dabba into mom-ocean:dev/gfdl Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants