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

EAMxx: fix valgrind failures #6841

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions components/eamxx/scripts/test_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ def __init__(self, tas):
"Release build where tests run through valgrind",
[("CMAKE_BUILD_TYPE", "RelWithDebInfo"),
("EKAT_ENABLE_VALGRIND", "True"),
("SCREAM_PACK_SIZE", "1"),
("SCREAM_TEST_MAX_THREADS", "2")],
uses_baselines=False,
on_by_default=False,
Expand Down
9 changes: 6 additions & 3 deletions components/eamxx/tests/generic/fail_check/valg_fail.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ namespace scream {

TEST_CASE("force_valgrind_err")
{
bool uninit;
bool* uninit = new bool[1];
int i = 0;
if (uninit) {
if (uninit[0]) {
++i;
}
else {
i += 4;
}
REQUIRE(i < 10);
if (i<4) {
printf("less than four\n");
}
delete uninit;
}

} // empty namespace
7 changes: 7 additions & 0 deletions components/homme/src/share/namelist_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,13 @@ subroutine readnl(par)
se_ftype = ftype ! MNL: For non-CAM runs, ftype=0 in control_mod
nsplit = 1
pertlim = 0.0_real_kind
#else
se_partmethod = SFCURVE
se_ne = 0
se_ne_x = 0
se_ne_y = 0
se_lx = 0
se_ly = 0
#endif
sub_case = 1
numnodes = -1
Expand Down
Loading