-
Notifications
You must be signed in to change notification settings - Fork 65
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
+Fix myStats global indexing segmentation faults #565
Conversation
Revised the interfaces to the myStats routine in the horizontal_regridding module to avoid segmentation faults due to inconsistent horizontal indices and array extents in global indexing mode. Rather than passing in absolute array extents to work on, an ocean grid type is now passed as an argument to myStats, with the new optional full_halo argument used to capture the case where the tracer statistics are being taken over the full data domain. The most frequently encountered problems occurred when the hard-coded debug variable in the horiz_interp_and_extrap_tracer routines are changed from false to true. When global indexing is not used, this revised work exactly as before, but when it is used with global indexing, it avoids segmentation faults that were preventing the model from running in some cases with all debugging enabled.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev/gfdl #565 +/- ##
============================================
- Coverage 37.17% 37.16% -0.01%
============================================
Files 271 271
Lines 80657 80660 +3
Branches 15047 15048 +1
============================================
Hits 29981 29981
- Misses 45102 45105 +3
Partials 5574 5574 ☔ View full report in Codecov by Sentry. |
- It was blowing up with "forrtl: error (65): floating invalid" when accessing dz in the halo at the boundary, but just sometimes. My default layout is trouble while my testing layout of 48 cores is not.
-even for PPM advection and OBCs.
Removed allocated tests for the potentially statically allocated arrays CS%uhtr and CS%vhtr in a newly added line testing whether there are OBCs in use that would require a halo update on these arrays. Even in dynamic memory mode, these arrays are always being allocated, so these tests served no purpose, but in static memory mode they led to compile time errors. All answers are bitwise identical.
Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/22554 ✔️ |
This PR got a bit mangled because I merged in an unsquashed PR which I retroactively squashed. Since it is passing all of our tests, I manually rebased this one into dev/gfdl: 0ff03ae |
Revised the interfaces to the
myStats()
routine in thehorizontal_regridding
module to avoid segmentation faults due to inconsistent horizontal indices and array extents in global indexing mode. Rather than passing in absolute array extents to work on, an ocean grid type is now passed as an argument tomyStats()
, with the new optionalfull_halo
argument used to capture the case where the tracer statistics are being taken over the full data domain. The most frequently encountered problems occurred when the hard-codeddebug
variables in thehoriz_interp_and_extrap_tracer()
routines are changed from false to true. When global indexing is not used, this revised work exactly as before, but when it is used with global indexing, it avoids segmentation faults that were preventing the model from running in some cases with all debugging enabled.