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

Fixup small kernel situation #3110

Merged
merged 1 commit into from
Nov 14, 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
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ::check_values_disp(const uview_2d<const Spack>& qv, const uview_2d<const Spack>
using ExeSpace = typename KT::ExeSpace;
const Int nk_pack = ekat::npack<Spack>(nk);
const auto policy = ekat::ExeSpaceUtils<ExeSpace>::get_default_team_policy(nj, nk_pack);

Kokkos::parallel_for(
"p3_check_values",
policy, KOKKOS_LAMBDA(const MemberType& team) {
Expand All @@ -32,4 +32,3 @@ ::check_values_disp(const uview_2d<const Spack>& qv, const uview_2d<const Spack>

} // namespace p3
} // namespace scream

Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ::cloud_sedimentation_disp(
}

cloud_sedimentation(
ekat::subview(qc_incld, i), ekat::subview(rho, i), ekat::subview(inv_rho, i), ekat::subview(cld_frac_l, i),
ekat::subview(qc_incld, i), ekat::subview(rho, i), ekat::subview(inv_rho, i), ekat::subview(cld_frac_l, i),
ekat::subview(acn, i), ekat::subview(inv_dz, i), dnu, team, workspace,
nk, ktop, kbot, kdir, dt, inv_dt, do_predict_nc,
ekat::subview(qc, i), ekat::subview(nc, i), ekat::subview(nc_incld, i), ekat::subview(mu_c, i), ekat::subview(lamc, i), ekat::subview(qc_tend, i),
Expand All @@ -60,4 +60,3 @@ ::cloud_sedimentation_disp(

} // namespace p3
} // namespace scream

10 changes: 5 additions & 5 deletions components/eamxx/src/physics/p3/disp/p3_rain_sed_impl_disp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ ::rain_sedimentation_disp(

// Rain sedimentation: (adaptive substepping)
rain_sedimentation(
ekat::subview(rho, i), ekat::subview(inv_rho, i), ekat::subview(rhofacr, i), ekat::subview(cld_frac_r, i),
ekat::subview(inv_dz, i), ekat::subview(qr_incld, i),
team, workspace, vn_table_vals, vm_table_vals, nk, ktop, kbot, kdir, dt, inv_dt,
ekat::subview(qr, i), ekat::subview(nr, i), ekat::subview(nr_incld, i), ekat::subview(mu_r, i),
ekat::subview(lamr, i), ekat::subview(precip_liq_flux, i),
ekat::subview(rho, i), ekat::subview(inv_rho, i), ekat::subview(rhofacr, i), ekat::subview(cld_frac_r, i),
ekat::subview(inv_dz, i), ekat::subview(qr_incld, i),
team, workspace, vn_table_vals, vm_table_vals, nk, ktop, kbot, kdir, dt, inv_dt,
ekat::subview(qr, i), ekat::subview(nr, i), ekat::subview(nr_incld, i), ekat::subview(mu_r, i),
ekat::subview(lamr, i), ekat::subview(precip_liq_flux, i),
ekat::subview(qr_tend, i), ekat::subview(nr_tend, i), precip_liq_surf(i), runtime_options);
});

Expand Down
17 changes: 5 additions & 12 deletions components/eamxx/src/physics/p3/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,22 +77,15 @@ endif()
# If small kernels are ON, we don't need a separate executable to test them.
# Also, we never want to generate baselines with this separate executable
if (NOT SCREAM_P3_SMALL_KERNELS AND NOT SCREAM_ONLY_GENERATE_BASELINES)
CreateUnitTest(p3_sk_tests "${P3_TESTS_SRCS}"
# Note: Only the p3_main test does something different when
# small kernels are on. The SK dispatch routines are mostly trivial
# and it's not worth adding tons of test infrastructure to support
# BFB unit tests for these.
CreateUnitTest(p3_sk_tests "p3_main_unit_tests.cpp"
LIBS p3_sk p3_test_infra
EXE_ARGS "--args ${BASELINE_FILE_ARG}"
THREADS 1 ${SCREAM_TEST_MAX_THREADS} ${SCREAM_TEST_THREAD_INC}
LABELS "p3_sk;physics")

# Make sure that a diff in the two implementation triggers a failed test (in debug only)
# No need to run lots of different thread counts.
if (SCREAM_ENABLE_BASELINE_TESTS)
CreateUnitTest (p3_sk_tests_fail p3_rain_sed_unit_tests.cpp
LIBS p3_sk p3_test_infra
EXE_ARGS "--args ${BASELINE_FILE_ARG}"
COMPILER_CXX_DEFS SCREAM_FORCE_RUN_DIFF
LABELS "p3_sk;physics;fail"
${FORCE_RUN_DIFF_FAILS})
endif()
endif()

CreateUnitTest(p3_run_and_cmp "p3_run_and_cmp.cpp"
Expand Down
Loading