-
Notifications
You must be signed in to change notification settings - Fork 55
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 valgrind errors in eamxx_homme_iop.cpp #2859
Conversation
We were running off the end of a couple views.
Mask nudge_level; | ||
for (int p=0; p<Pack::n; ++p) { | ||
const auto lev = k*Pack::n + p; | ||
Mask nudge_level(false); |
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.
I assume I should default this mask to all false?
Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects: Pull Request Auto Testing STARTING (click to expand)Build InformationTest Name: SCREAM_PullRequest_Autotester_Mappy
Jenkins Parameters
Build InformationTest Name: SCREAM_PullRequest_Autotester_Weaver
Jenkins Parameters
Using Repos:
Pull Request Author: jgfouca |
const auto lev = k*Pack::n + p; | ||
Mask nudge_level(false); | ||
int max_size = hyam.size(); | ||
for (int lev=k*Pack::n, p = 0; p < Pack::n && lev < max_size; ++lev, ++p) { | ||
const auto pressure_from_iop = hyam(lev)*ps0 + hybm(lev)*ps_iop; | ||
nudge_level.set(p, pressure_from_iop <= iop_nudge_tq_low*100 |
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.
@bogensch , this looks like a bug. How can pressure ever be both low and high? This and
should be an or
I think.
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.
It's not a bug, just confusing names..... Valid example values: iop_nudge_tq_low = 1000 hPa; iop_nudge_tq_high=700 hPa. Thus low/high refers to the relative position in the atmosphere with respect to the surface rather than the value.
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.
Thanks! Makes sense now.
Status Flag 'Pull Request AutoTester' - Jenkins Testing: all Jobs PASSED Pull Request Auto Testing has PASSED (click to expand)Build InformationTest Name: SCREAM_PullRequest_Autotester_Mappy
Jenkins Parameters
Build InformationTest Name: SCREAM_PullRequest_Autotester_Weaver
Jenkins Parameters
|
We were running off the end of a couple views.
Example from my debugging printing:
JGF lev=79 hyam.size=72, hybm.size=72