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: enable kokkos bounds checks in full_debug standalone build #2830

Merged
merged 5 commits into from
Jun 13, 2024
Merged
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
11 changes: 6 additions & 5 deletions components/eamxx/scripts/test_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,13 @@ def __str__(self):
class DBG(TestProperty):
###############################################################################

CMAKE_ARGS = [("CMAKE_BUILD_TYPE", "Debug"), ("EKAT_DEFAULT_BFB", "True")]

def __init__(self, _):
TestProperty.__init__(
self,
"full_debug",
"debug",
self.CMAKE_ARGS,
[("CMAKE_BUILD_TYPE", "Debug"), ("EKAT_DEFAULT_BFB", "True"),
("Kokkos_ENABLE_DEBUG_BOUNDS_CHECK", "True")]
)

###############################################################################
Expand All @@ -100,7 +99,8 @@ def __init__(self, _):
self,
"full_sp_debug",
"debug single precision",
DBG.CMAKE_ARGS + [("SCREAM_DOUBLE_PRECISION", "False")],
[("CMAKE_BUILD_TYPE", "Debug"), ("EKAT_DEFAULT_BFB", "True"),
("SCREAM_DOUBLE_PRECISION", "False")],
)

###############################################################################
Expand All @@ -112,7 +112,8 @@ def __init__(self, tas):
self,
"debug_nopack_fpe",
"debug pksize=1 floating point exceptions on",
DBG.CMAKE_ARGS + [("SCREAM_PACK_SIZE", "1"), ("SCREAM_FPE","True")],
[("CMAKE_BUILD_TYPE", "Debug"), ("EKAT_DEFAULT_BFB", "True"),
("SCREAM_PACK_SIZE", "1"), ("SCREAM_FPE","True")],
uses_baselines=False,
on_by_default=(tas is not None and not tas.on_cuda())
)
Expand Down
4 changes: 2 additions & 2 deletions components/eamxx/src/diagnostics/tests/aerocom_cld_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ TEST_CASE("aerocom_cld") {

// Case 5a: test independence of ice and liq fractions
cd_v(0, 3) = 1.0;
cd_v(0, 8) = 1.0;
cd_v(0, 9) = 0.2;
cd_v(0, 7) = 1.0;
cd_v(0, 8) = 0.2;
qc.deep_copy(1.0);
qi.deep_copy(0.0); // zero ice!
cd.sync_to_dev();
Expand Down
5 changes: 3 additions & 2 deletions components/eamxx/src/physics/nudging/tests/nudging_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ TEST_CASE("nudging_tests") {
auto fine_h = fine.get_view<Real**,Host>();
auto data_h = data.get_view<Real**,Host>();
const bool is_pmid = data.name()=="p_mid";
const int nlevs_fine = 2*nlevs_data-1;
const int top = 0;
const int bot = nlevs_fine-1;
for (int icol=0; icol<ncols_data; ++icol) {
// Even entries match original data
for (int ilev=0; ilev<nlevs_data; ++ilev) {
Expand All @@ -179,8 +182,6 @@ TEST_CASE("nudging_tests") {
fine_h(icol,2*ilev+1) = (fine_h(icol,2*ilev)+fine_h(icol,2*ilev+2))/2;
}
if (not in_bounds) {
const int top = 0;
const int bot = 2*nlevs_data - 1;
fine_h(icol,top) *= 0.5;
fine_h(icol,bot) *= is_pmid ? 2 : 1;
}
Expand Down
2 changes: 1 addition & 1 deletion externals/ekat