-
Notifications
You must be signed in to change notification settings - Fork 382
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 unused variables in ocean #5610
remove unused variables in ocean #5610
Conversation
@@ -434,9 +430,6 @@ subroutine ocn_vel_tidal_potential_init(domain,err)!{{{ | |||
constituentList(nTidalConstituents)%constituent = 'P1' | |||
end if | |||
|
|||
! set point value in forcing pool just in case | |||
nTidalPotentialConstituents = nTidalConstituents |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sbrus89 please check if I can remove nTidalPotentialConstituents
. It looks like you added it to record information during development. This would never change, so I suspect you don't need it anymore. The gnu compiler seems to think you don't need it either.
@@ -3792,10 +3788,6 @@ | |||
description="Latitude function for tidal constituents: long-period = 3\sin^2(\phi)-1, diurnal = \sin(2\phi), semi-diurnal = \cos^2(\phi)" | |||
packages="tidalPotentialForcingPKG" | |||
/> | |||
<var name="tidalPotentialZMid" type="real" dimensions="nVertLevels nCells Time" units="m" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sbrus89 please verify that I can remove tidalPotentialZMid
. It appears to be a remnant of something during development.
Just a note: These two variables were not actually listed in the
along with 60 other variables in the |
@mark-petersen, wow, thank you for figuring this out! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with great enthusiasm! This has fixed the PR test suite on Perlmutter and Chicoma!
Thanks! It's funny - with all our advanced training, debugging still comes down to a few hours of trial and error. In this case I had to run the case with all the variables in the gigantic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mark-petersen, yes both of these are unused and are development remnants. Thanks for catching this. Sorry for the trouble!
…#5610) Remove unused variables in ocean The variables tidalPotentialZMid and nTidalPotentialConstituents are defined in the Registry but not used for any computations. This tricks the gnu compiler in optimized mode, which removes them internally. The simulation then dies when the i/o references these variables on initialization. Fixes #5609 [BFB]
passes:
merged to next |
merged to master |
The variables
tidalPotentialZMid
andnTidalPotentialConstituents
are defined in the Registry but not used for any computations. This tricks the gnu compiler in optimized mode, which removes them internally. The simulation then dies when the i/o references these variables on initialization. See earlier description at MPAS-Dev/compass#497.With this fix, the standalone MPAS-Ocean tests pass
fixes #5609
[BFB]