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 downsample_mask indexing bugs #567

Merged

Conversation

Hallberg-NOAA
Copy link
Member

Corrected indexing problems in downsample_mask() that would cause masked reduced-resolution diagnostics to work improperly when the model is in symmetric memory mode or when global indexing is used. This involves passing the starting index in memory of the native-grid field being downsampled in all calls to downsample_mask(). In global-indexing mode, this change avoids a series of segmentation faults that stopped the model runs when compiled for debugging. All solutions are bitwise identical in all cases but some down-scaled diagnostics will change in some memory modes, hopefully becoming consistent across all memory modes (although this has yet to be tested in all modes).

  Corrected indexing problems in downsample_mask that would cause masked
reduced-resolution diagnostics to work improperly when the model is in symmetric
memory mode or when global indexing is used.  This involves passing the starting
index in memory of the native-grid field being downsampled in all calls to
downsample_mask.  In global-indexing mode, this change avoids a series of
segmentation faults that stopped the model runs when compiled for debugging.
All solutions are bitwise identical in all cases but some down-scaled
diagnostics will change in some memory modes, hopefully becoming consistent
across all memory modes (although this has yet to be tested in all modes).
@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.11%. Comparing base (d311b1d) to head (94cc014).

Additional details and impacted files
@@             Coverage Diff              @@
##           dev/gfdl     #567      +/-   ##
============================================
- Coverage     37.14%   37.11%   -0.03%     
============================================
  Files           271      271              
  Lines         80734    80670      -64     
  Branches      15061    15047      -14     
============================================
- Hits          29986    29944      -42     
+ Misses        45151    45140      -11     
+ Partials       5597     5586      -11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@marshallward
Copy link
Member

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

@marshallward marshallward merged commit 611f575 into NOAA-GFDL:dev/gfdl Mar 12, 2024
12 checks passed
@Hallberg-NOAA Hallberg-NOAA deleted the downsample_mask_index_fix branch May 10, 2024 21:32
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.

2 participants