fix(GweInputData): large GWE models throwing stackoverflow error #1999
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.
The following two lines:
this%gwerhos = gwerhos
this%gwecps = gwecps
should have instead used:
this%gwerhos => gwerhos
this%gwecps => gwecps
That discovery led to a number of other fixes since the variables in question were pointers and not copies of data. While in GweInputData.f90, updated it to follow latest style guide. Will adjust other GWE src files in the future.
While running the "Barends" model locally with 200,000 nodes, GWE was crashing with a stackoverflow error while trying to copy an entire array into another array in one line.
Amended this PR with a new smoke test that asserts two neighboring models fail when the density of water is specified differently among the neighbors. Currently, there are no methods for averaging values on either side of the interface. So, the new test first runs and verifies that the simulation runs to completion when the density of water is the same in the two neighbors. Next, the same simulation is run except that the density of water is just a little different in the 'right-hand' model.
The new smoke test should be ready to bring into parallel testing once the following is addressed by @mjr-deltares (lines 512-514ish in
GweGweConnection.f90
- there is a similar comment inGwtGwtConnection.f90
):fprettify