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

+(*)Improve tracer debugging #162

Merged
merged 4 commits into from
Jul 20, 2022

Conversation

Hallberg-NOAA
Copy link
Member

This PR includes commits that simplify the interface to use the tracer
registry to write checksums, while retaining the old interface, and then uses
these new interfaces in additional checksum calls to help with debugging. It
also corrects a minor problem with that could avoid segmentation faults in
certain cases with y-direction open boundary conditions but no tracer
reservoirs. All answers in the MOM6-examples test suite are bitwise identical,
and it seems very likely that all cases that previously worked will be bitwise
identical.

The commits in this PR include:

  • 4a50417dc (*)Corrected OBC allocated tests in advect_y
  • 1e1f67913 Added tracer debugging checksum calls
  • f4f06749e +Overload MOM_tracer_chksum to use tracer registry

  Overloaded MOM_tracer_chksum and MOM_tracer_chkinv with a simpler interface
that takes the tracer registry as an input argument, rather than requiring that
its elements be unpacked outside of the call.  This was done as an overload to
the existing interface to avoid breaking backward compatibility, but it seems
likely that in due course the older, more complicated interface can be
obsoleted.  All answers are bitwise identical, but there are new interfaces to
provide tracer debugging capabilities.
  Added calls to write tracer checksums from step_MOM_tracer_dyn when
DEBUG=True.  Also updated a number of MOM_tracer_chksum and MOM_tracer_chkinv
calls in MOM_offline_main and MOM_tracer_hor_diff to use the new and streamlined
form of the interfaces.  All answers are bitwise identical, but there are
additional output lines when debugging is enabled.
  Corrected two allocated tests for OBC-related arrays in advect_y, bringing
them into conformity with what was already being done in advect_x.  Given the
nature of these changes, it seems likely that any case that would have worked
before will give bitwise identical answers, but that segmentation faults might
now be avoided in certain configurations using OBCs.
@codecov
Copy link

codecov bot commented Jul 8, 2022

Codecov Report

Merging #162 (2daaf83) into dev/gfdl (2217e63) will decrease coverage by 0.00%.
The diff coverage is 9.09%.

@@             Coverage Diff              @@
##           dev/gfdl     #162      +/-   ##
============================================
- Coverage     33.99%   33.99%   -0.01%     
============================================
  Files           259      259              
  Lines         70248    70267      +19     
  Branches      13016    13023       +7     
============================================
+ Hits          23884    23885       +1     
- Misses        41865    41880      +15     
- Partials       4499     4502       +3     
Impacted Files Coverage Δ
src/core/MOM.F90 44.97% <0.00%> (-0.10%) ⬇️
src/tracer/MOM_offline_main.F90 0.00% <0.00%> (ø)
src/tracer/MOM_tracer_advect.F90 58.18% <0.00%> (ø)
src/tracer/MOM_tracer_hor_diff.F90 71.22% <0.00%> (ø)
src/tracer/MOM_tracer_registry.F90 56.91% <20.00%> (-2.75%) ⬇️

@marshallward
Copy link
Member

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

@marshallward marshallward merged commit 8ddd0c1 into NOAA-GFDL:dev/gfdl Jul 20, 2022
@Hallberg-NOAA Hallberg-NOAA deleted the tracer_checksums branch February 2, 2023 13:26
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.

2 participants