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

+Fix myStats global indexing segmentation faults #565

Closed

Conversation

Hallberg-NOAA
Copy link
Member

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 variables 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.

  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.
@Hallberg-NOAA Hallberg-NOAA added the bug Something isn't working label Feb 8, 2024
Copy link

codecov bot commented Feb 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 37.16%. Comparing base (6153d97) to head (38ddfb6).

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.
📢 Have feedback on the report? Share it here.

kshedstrom and others added 4 commits March 9, 2024 10:43
 - 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.
@marshallward
Copy link
Member

Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/22554 ✔️

@marshallward
Copy link
Member

marshallward commented Mar 9, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants