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

+Remove in-loop clocks and obsolete params #28

Merged
merged 5 commits into from
Dec 9, 2021

Conversation

Hallberg-NOAA
Copy link
Member

This PR fixes some problems with the model potentially hanging, having a
memory leak, or having output that depends on the contents of an uninitialized
logical. As a part of this change, a run time parameter that is no longer being
used was obsoleted, and because the MOM_parameter_doc files were changing anyway
an additional run-time parameter that does nothing was also obsoleted. All
answers are bitwise identical, but the contents in some MOM_parameter_doc files
change.

The commits in this PR include:

  • f410f3c60 +Obsolete ETA_TOLERANCE_AUX
  • b0963d492 +Set find_salt_root if SHELF_THREE_EQN = .False.
  • eecadd2b3 Deallocate eta_PF_start to avoid a memory leak
  • f3ab52c8b +Remove clocks inside of j-loops

  Removed clocks that were being called from inside of j-loops in two modules.
These are inefficient and can cause the model to hang in some cases if used, and
there are better ways to get timing information at this level.  If there is
interest in the timing breakdown at this level, the code should be restructured
to move the key blocks outside of the j-loops.  The run-time parameter
ALLOW_CLOCKS_IN_OMP_LOOPS is no longer being used so it is now obsoleted. All
answers are bitwise identical, but there are changes to some MOM_parameter_doc
files.
  Added a deallocate call for eta_PF_start in step_MOM_dyn_split_RK2() to
avoid a possible memory leak.  All answers are bitwise identical.
  Set find_salt_root even if SHELF_THREE_EQN = .False. to avoid using an
uninitialized logical to determine which parameters are logged.  Without this
the contents of some MOM_parameter_doc.all files could depend on the state of
uninitialized memory and was compiler dependent in some cases.  All answers are
bitwise identical, but in some cases the contents of MOM_parameter_doc files
could be corrected.
  The runtime parameter ETA_TOLERANCE_AUX was being read but was never used, so
it is being obsoleted.  However, because some experiments were using this and
there are effectively no changes in behavior, a warning will be issued instead
of a fatal error if this parameter is set.  All answers are bitwise identical,
but there are changes to some MOM_parameter_doc files.
@codecov
Copy link

codecov bot commented Dec 5, 2021

Codecov Report

Merging #28 (ddc0a31) into dev/gfdl (e2c81e9) will decrease coverage by 0.01%.
The diff coverage is 60.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##           dev/gfdl      #28      +/-   ##
============================================
- Coverage     29.06%   29.05%   -0.02%     
============================================
  Files           240      240              
  Lines         71319    71293      -26     
============================================
- Hits          20731    20712      -19     
+ Misses        50588    50581       -7     
Impacted Files Coverage Δ
src/core/MOM_dynamics_split_RK2.F90 61.80% <0.00%> (-0.11%) ⬇️
src/ice_shelf/MOM_ice_shelf.F90 0.00% <0.00%> (ø)
...rameterizations/vertical/MOM_regularize_layers.F90 6.28% <ø> (-0.18%) ⬇️
src/diagnostics/MOM_obsolete_params.F90 76.19% <80.00%> (+0.88%) ⬆️
src/core/MOM_continuity_PPM.F90 39.27% <100.00%> (-0.12%) ⬇️
...arameterizations/vertical/MOM_bulk_mixed_layer.F90 32.07% <100.00%> (-0.64%) ⬇️
config_src/infra/FMS1/MOM_cpu_clock_infra.F90 92.30% <0.00%> (-7.70%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e2c81e9...ddc0a31. Read the comment docs.

@marshallward
Copy link
Member

Can you first test if #27 fixes the problem you noticed?

@Hallberg-NOAA Hallberg-NOAA changed the title MOM6: Remove in-loop clocks and obsolete params +Remove in-loop clocks and obsolete params Dec 6, 2021
@Hallberg-NOAA
Copy link
Member Author

The problem that this addresses appears to be intermittent, and it may be dependent on the state of the computer. If I encounter the problem again before this PR is merged in, I will take that opportunity to test #27. However, the issue has not re-occurred in the past few days of running on Gaea.

Regardless of the specific issue with Gaea that prompted these changes, I think that these changes are a good idea.

@marshallward
Copy link
Member

I agree, in-loop clocks have potential to cause a lot of trouble.

@marshallward
Copy link
Member

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

This will require a parameter update due to removal of various clock params.

@marshallward marshallward merged commit ec553aa into NOAA-GFDL:dev/gfdl Dec 9, 2021
@Hallberg-NOAA Hallberg-NOAA deleted the in_loop_clocks branch January 3, 2022 13:36
@Hallberg-NOAA Hallberg-NOAA added the bug Something isn't working label Feb 1, 2022
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