From a85ce562e0cc294a3b8da94f0cdb68461aa8a0df Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Wed, 14 May 2025 21:15:53 -0600 Subject: [PATCH 01/22] Update ekat submodule --- externals/ekat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externals/ekat b/externals/ekat index 4ea5148a2473..3278cd743c0a 160000 --- a/externals/ekat +++ b/externals/ekat @@ -1 +1 @@ -Subproject commit 4ea5148a24734b745e898fba94ea6483dce1c36c +Subproject commit 3278cd743c0a01f4bd94a310ec46884040225700 From fec260a95caad0bbadfc385f4f3528590949a21b Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Mon, 21 Jul 2025 10:30:01 -0600 Subject: [PATCH 02/22] Update haero submodule --- externals/haero | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externals/haero b/externals/haero index 3b229835f00d..091124c40ce6 160000 --- a/externals/haero +++ b/externals/haero @@ -1 +1 @@ -Subproject commit 3b229835f00d246980522b7c5e519b82324ce175 +Subproject commit 091124c40ce63b1ec7549fa6c6a27528ba7d049b From 4decdff1b08a06c61118efc58e08ad5a8c36b6d7 Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Mon, 21 Jul 2025 10:30:39 -0600 Subject: [PATCH 03/22] Update mam4xx submodule --- externals/mam4xx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externals/mam4xx b/externals/mam4xx index f2dfccaa9a86..248a8e4da06f 160000 --- a/externals/mam4xx +++ b/externals/mam4xx @@ -1 +1 @@ -Subproject commit f2dfccaa9a86f58359b1bf170e372f7a7bf0ee09 +Subproject commit 248a8e4da06ff8a3b3e1953a470d97415ad97c18 From c40978ad989d72b5518982495287f189677096c8 Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Mon, 21 Jul 2025 10:32:52 -0600 Subject: [PATCH 04/22] EAMxx: cmake mods for new ekat configuration --- components/eam/src/physics/crm/pam/external | 2 +- components/eamxx/CMakeLists.txt | 20 +++++++++---------- components/eamxx/cmake/ScreamUtils.cmake | 4 ++-- components/eamxx/src/share/CMakeLists.txt | 3 ++- components/eamxx/src/share/io/CMakeLists.txt | 2 +- .../src/share/util/eamxx_test_session.cpp | 2 +- .../eamxx/tests/meta-tests/CMakeLists.txt | 6 +++--- .../test_level_check/CMakeLists.txt | 6 +++--- 8 files changed, 23 insertions(+), 22 deletions(-) diff --git a/components/eam/src/physics/crm/pam/external b/components/eam/src/physics/crm/pam/external index 0166f7896b38..4f65fc04c624 160000 --- a/components/eam/src/physics/crm/pam/external +++ b/components/eam/src/physics/crm/pam/external @@ -1 +1 @@ -Subproject commit 0166f7896b380d43588176e073e20f991df6c497 +Subproject commit 4f65fc04c624988baf06efda56fc4e0f528c0835 diff --git a/components/eamxx/CMakeLists.txt b/components/eamxx/CMakeLists.txt index 8a85d3cbb80c..17fd51db9273 100644 --- a/components/eamxx/CMakeLists.txt +++ b/components/eamxx/CMakeLists.txt @@ -237,9 +237,6 @@ set(SCREAM_FPE ${DEFAULT_FPE} CACHE BOOL "Enable floating point error exception" option (SCREAM_ENABLE_GETRUSAGE "Whether getrusage can be used to get memory usage." OFF) option (SCREAM_ENABLE_STATM "Whether /proc/self/statm can be used to get memory usage." OFF) -# Whether to disable warnings from tpls. -set (SCREAM_DISABLE_TPL_WARNINGS ON CACHE BOOL "") - # Dycore settings set(DEFAULT_SCREAM_DYNAMICS_DYCORE "NONE") if (SCREAM_CIME_BUILD AND SCREAM_DYN_TARGET STREQUAL "theta-l_kokkos") @@ -462,6 +459,8 @@ endif() # Configure all tpls and subfolders # #################################################################### +set (EKAT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../externals/ekat) + if (DEFINED ENV{SCREAM_FAKE_ONLY}) # We don't really need to build ekat, but we do need to configure the test-launcher @@ -486,8 +485,6 @@ if (DEFINED ENV{SCREAM_FAKE_ONLY}) set (TEST_LAUNCHER_ON_GPU False) endif() - set (EKAT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../externals/ekat) - if (EKAT_ENABLE_MPI) find_package(MPI REQUIRED COMPONENTS C) @@ -516,11 +513,14 @@ if (DEFINED ENV{SCREAM_FAKE_ONLY}) endif() else() - include(EkatBuildEkat) - BuildEkat(PREFIX "SCREAM" - ENABLE_TESTS OFF - ENABLE_FPE ON - ENABLE_FPE_DEFAULT_MASK OFF) + # Enable all EKAT packages + set(EKAT_ENABLE_KOKKOS ON) + set(EKAT_ENABLE_PACK ON) + set(EKAT_ENABLE_ALGORITHM ON) + set(EKAT_ENABLE_LOGGING ON) + set(EKAT_ENABLE_YAML_PARSER ON) + set(EKAT_DISABLE_TPL_WARNINGS ON) + add_subdirectory(${EKAT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/externals/ekat) endif() # Set compiler-specific flags diff --git a/components/eamxx/cmake/ScreamUtils.cmake b/components/eamxx/cmake/ScreamUtils.cmake index 44e3e79ce0d5..13bdd67b89da 100644 --- a/components/eamxx/cmake/ScreamUtils.cmake +++ b/components/eamxx/cmake/ScreamUtils.cmake @@ -81,14 +81,14 @@ set(SCREAM_CUT_TEST_MV_ARGS ${CUT_TEST_MV_ARGS}) # # Scream always excludes the ekat test session since it has its own -list(REMOVE_ITEM SCREAM_CUT_EXEC_OPTIONS EXCLUDE_TEST_SESSION) +list(REMOVE_ITEM SCREAM_CUT_EXEC_OPTIONS USER_DEFINED_TEST_SESSION) ############################################################################### function(CreateUnitTestExec exec_name test_srcs) ############################################################################### # Call Ekat function, with a couple of extra params EkatCreateUnitTestExec("${exec_name}" "${test_srcs}" ${ARGN} - EXCLUDE_TEST_SESSION LIBS scream_share scream_test_support) + USER_DEFINED_TEST_SESSION LIBS scream_share scream_test_support) endfunction(CreateUnitTestExec) ############################################################################### diff --git a/components/eamxx/src/share/CMakeLists.txt b/components/eamxx/src/share/CMakeLists.txt index 8970495f8b05..95670ed40f13 100644 --- a/components/eamxx/src/share/CMakeLists.txt +++ b/components/eamxx/src/share/CMakeLists.txt @@ -167,7 +167,8 @@ if (EAMXX_ENABLE_PYTHON) target_compile_definitions (scream_share PUBLIC EAMXX_HAS_PYTHON) endif() -target_link_libraries(scream_share PUBLIC ekat pioc) +target_link_libraries(scream_share PUBLIC ekat::AllLibs pioc) + target_compile_options(scream_share PUBLIC $<$:${SCREAM_Fortran_FLAGS}> ) diff --git a/components/eamxx/src/share/io/CMakeLists.txt b/components/eamxx/src/share/io/CMakeLists.txt index fbbd00f23b6a..e0df76ba8812 100644 --- a/components/eamxx/src/share/io/CMakeLists.txt +++ b/components/eamxx/src/share/io/CMakeLists.txt @@ -11,7 +11,7 @@ add_library(eamxx_scorpio_interface eamxx_scorpio_types.cpp eamxx_scorpio_interface.cpp ) -target_link_libraries(eamxx_scorpio_interface PUBLIC ekat) +target_link_libraries(eamxx_scorpio_interface PUBLIC ekat::AllLibs) target_link_libraries(eamxx_scorpio_interface PRIVATE pioc) target_include_directories(eamxx_scorpio_interface PUBLIC ${SCREAM_BIN_DIR}/src # For eamxx_config.h diff --git a/components/eamxx/src/share/util/eamxx_test_session.cpp b/components/eamxx/src/share/util/eamxx_test_session.cpp index 841fc8043ed9..5a19345f9453 100644 --- a/components/eamxx/src/share/util/eamxx_test_session.cpp +++ b/components/eamxx/src/share/util/eamxx_test_session.cpp @@ -9,7 +9,7 @@ * work, you MUST define these functions in a cpp file. Your implementation should * likely call EKAT's session initialization/finalization, but are allowed to do * additional work. - * When calling EkatCreateUnitTest, you must specify the option EXCLUDE_TEST_SESSION, + * When calling EkatCreateUnitTest, you must specify the option USER_DEFINED_TEST_SESSION, * which will prevent Ekat from linking in this file (avoiding multiple definition * of these routines). */ diff --git a/components/eamxx/tests/meta-tests/CMakeLists.txt b/components/eamxx/tests/meta-tests/CMakeLists.txt index b583d5ef825e..3d9aebc7a9d1 100644 --- a/components/eamxx/tests/meta-tests/CMakeLists.txt +++ b/components/eamxx/tests/meta-tests/CMakeLists.txt @@ -11,17 +11,17 @@ include(ScreamUtils) # the test executable). # Test to ensure that a build failure is detected by our testing scripts -EkatCreateUnitTest(build_fail build_fail.cpp EXCLUDE_MAIN_CPP EXCLUDE_TEST_SESSION +EkatCreateUnitTest(build_fail build_fail.cpp EXCLUDE_MAIN_CPP USER_DEFINED_TEST_SESSION LABELS "fail") # Test to ensure that a test failure is detected by our testing scripts -EkatCreateUnitTest(test_fail test_fail.cpp EXCLUDE_MAIN_CPP EXCLUDE_TEST_SESSION +EkatCreateUnitTest(test_fail test_fail.cpp EXCLUDE_MAIN_CPP USER_DEFINED_TEST_SESSION LABELS "fail") # Tests to ensure the testing infrastructure is correctly spreading # concurrent tests across the available resources if (SCREAM_TEST_MAX_TOTAL_THREADS GREATER_EQUAL 16) - EkatCreateUnitTestExec(resource_spread resource_spread.cpp EXCLUDE_MAIN_CPP EXCLUDE_TEST_SESSION) + EkatCreateUnitTestExec(resource_spread resource_spread.cpp EXCLUDE_MAIN_CPP USER_DEFINED_TEST_SESSION) # When scripts-tests builds this folder, they are not building Ekat (or even Kokkos). # So we must add openmp to the compiler/linker flags manually diff --git a/components/eamxx/tests/meta-tests/test_level_check/CMakeLists.txt b/components/eamxx/tests/meta-tests/test_level_check/CMakeLists.txt index 18f94c286b10..dd50c14acf91 100644 --- a/components/eamxx/tests/meta-tests/test_level_check/CMakeLists.txt +++ b/components/eamxx/tests/meta-tests/test_level_check/CMakeLists.txt @@ -1,8 +1,8 @@ include(ScreamUtils) -EkatCreateUnitTestExec(at_unit at_unit.cpp EXCLUDE_MAIN_CPP EXCLUDE_TEST_SESSION) -EkatCreateUnitTestExec(nightly_unit nightly_unit.cpp EXCLUDE_MAIN_CPP EXCLUDE_TEST_SESSION) -EkatCreateUnitTestExec(experimental_unit experimental_unit.cpp EXCLUDE_MAIN_CPP EXCLUDE_TEST_SESSION) +EkatCreateUnitTestExec(at_unit at_unit.cpp EXCLUDE_MAIN_CPP USER_DEFINED_TEST_SESSION) +EkatCreateUnitTestExec(nightly_unit nightly_unit.cpp EXCLUDE_MAIN_CPP USER_DEFINED_TEST_SESSION) +EkatCreateUnitTestExec(experimental_unit experimental_unit.cpp EXCLUDE_MAIN_CPP USER_DEFINED_TEST_SESSION) CreateUnitTestFromExec(at_unit at_unit) CreateUnitTestFromExec(nightly_unit nightly_unit MINIMUM_TEST_LEVEL ${SCREAM_TEST_LEVEL_NIGHTLY}) From 89fac5f9c0c6542b5171ba31893001ca154df3c4 Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Tue, 1 Jul 2025 17:00:45 -0600 Subject: [PATCH 05/22] EAMxx: first set of mods to adapt to new Ekat Mostly changing includes, to remove ekat/*/ from the filename path, and removing includes not needed --- .../eamxx/src/control/atmosphere_driver.cpp | 10 ++++---- .../eamxx/src/control/atmosphere_driver.hpp | 6 ++--- .../atmosphere_surface_coupling_exporter.cpp | 4 +-- .../atmosphere_surface_coupling_exporter.hpp | 3 ++- .../atmosphere_surface_coupling_importer.cpp | 4 +-- .../atmosphere_surface_coupling_importer.hpp | 5 ++-- .../eamxx/src/control/tests/ad_tests.cpp | 4 +-- .../src/control/tests/dummy_atm_proc.hpp | 2 -- .../eamxx/src/diagnostics/field_at_height.cpp | 4 +-- .../eamxx/src/diagnostics/field_at_level.cpp | 2 +- .../diagnostics/field_at_pressure_level.cpp | 6 ++--- .../diagnostics/field_at_pressure_level.hpp | 2 -- .../src/diagnostics/relative_humidity.cpp | 2 ++ .../src/diagnostics/tests/aodvis_test.cpp | 1 + .../diagnostics/tests/atm_density_test.cpp | 2 +- .../tests/dry_static_energy_test.cpp | 2 +- .../src/diagnostics/tests/exner_test.cpp | 2 +- .../tests/field_at_pressure_level_tests.cpp | 4 +-- .../tests/longwave_cloud_forcing_tests.cpp | 2 +- .../diagnostics/tests/number_paths_tests.cpp | 1 - .../tests/potential_temperature_test.cpp | 2 +- .../tests/precip_surf_mass_flux_tests.cpp | 1 - .../tests/relative_humidity_tests.cpp | 2 +- .../tests/sea_level_pressure_test.cpp | 3 +-- .../tests/shortwave_cloud_forcing_tests.cpp | 2 +- .../surf_upward_latent_heat_flux_tests.cpp | 3 +-- .../tests/virtual_temperature_test.cpp | 2 +- .../eamxx/src/diagnostics/wind_speed.cpp | 2 -- .../eamxx/src/diagnostics/zonal_avg.cpp | 2 +- .../dynamics/homme/eamxx_homme_fv_phys.cpp | 10 ++++---- .../homme/eamxx_homme_process_interface.cpp | 25 ++++++++++--------- .../homme/eamxx_homme_process_interface.hpp | 10 ++------ .../dynamics/homme/homme_dynamics_helpers.hpp | 2 +- .../dynamics/homme/homme_grids_manager.cpp | 2 +- .../homme/interface/eamxx_homme_interface.hpp | 4 +-- .../homme/physics_dynamics_remapper.cpp | 4 +-- .../homme/physics_dynamics_remapper.hpp | 2 +- .../src/dynamics/homme/tests/dyn_grid_io.cpp | 6 ++--- .../homme/tests/homme_pd_remap_tests.cpp | 6 ++--- .../eamxx/src/mct_coupling/ScreamContext.hpp | 3 ++- .../mct_coupling/eamxx_cxx_f90_interface.cpp | 11 ++++---- .../cld_fraction/cld_fraction_functions.hpp | 4 +-- .../cld_fraction/cld_fraction_main_impl.hpp | 3 ++- .../eamxx_cld_fraction_process_interface.cpp | 4 +-- .../eamxx_cld_fraction_process_interface.hpp | 3 ++- .../eamxx/src/physics/cosp/eamxx_cosp.cpp | 9 +++---- .../eamxx/src/physics/cosp/eamxx_cosp.hpp | 3 ++- .../eamxx/src/physics/gw/gw_functions.hpp | 6 ++--- .../gw/tests/gw_gw_beres_src_tests.cpp | 4 +-- .../physics/gw/tests/gw_gw_cm_src_tests.cpp | 4 +-- .../tests/gw_gw_convect_gw_sources_tests.cpp | 4 +-- .../gw_gw_convect_project_winds_tests.cpp | 4 +-- .../gw/tests/gw_gw_diff_tend_tests.cpp | 4 +-- .../gw/tests/gw_gw_drag_prof_tests.cpp | 4 +-- .../physics/gw/tests/gw_gw_ediff_tests.cpp | 4 +-- .../gw/tests/gw_gw_front_gw_sources_tests.cpp | 4 +-- .../tests/gw_gw_front_project_winds_tests.cpp | 4 +-- .../gw/tests/gw_gw_heating_depth_tests.cpp | 4 +-- .../physics/gw/tests/gw_gw_oro_src_tests.cpp | 4 +-- .../src/physics/gw/tests/gw_gw_prof_tests.cpp | 4 +-- .../gw/tests/gw_gw_storm_speed_tests.cpp | 4 +-- ...tress_profiles_and_diffusivities_tests.cpp | 4 +-- ...endencies_from_stress_divergence_tests.cpp | 4 +-- .../gw/tests/gw_gwd_precalc_rhoi_tests.cpp | 4 +-- .../gw/tests/gw_gwd_project_tau_tests.cpp | 4 +-- .../gw_momentum_energy_conservation_tests.cpp | 4 +-- .../physics/gw/tests/infra/gw_test_data.cpp | 7 +++--- .../gw/tests/infra/gw_unit_tests_common.hpp | 6 ++--- .../eamxx_iop_forcing_process_interface.hpp | 6 ++--- .../physics/mam/eamxx_mam_aci_functions.hpp | 3 ++- .../mam/eamxx_mam_aci_process_interface.cpp | 2 +- .../eamxx_mam_dry_deposition_functions.hpp | 2 +- .../eamxx_mam_optics_process_interface.cpp | 4 +-- .../eamxx_mam_optics_process_interface.hpp | 6 +++-- .../mam/mam_aerosol_optics_read_tables.hpp | 3 ++- .../eamxx/src/physics/mam/mam_coupling.hpp | 2 +- .../mam/readfiles/find_season_index_utils.hpp | 1 - .../mam/readfiles/tracer_reader_utils.hpp | 3 ++- .../eamxx_ml_correction_process_interface.cpp | 4 +-- .../eamxx_ml_correction_process_interface.hpp | 4 +-- .../eamxx_nudging_process_interface.cpp | 4 +-- .../eamxx_nudging_process_interface.hpp | 2 +- .../p3/disp/p3_check_values_impl_disp.cpp | 5 ++-- .../p3/disp/p3_cloud_sed_impl_disp.cpp | 4 +-- .../physics/p3/disp/p3_ice_sed_impl_disp.cpp | 4 +-- .../src/physics/p3/disp/p3_main_impl_disp.cpp | 4 +-- .../p3/disp/p3_main_impl_part1_disp.cpp | 3 +-- .../p3/disp/p3_main_impl_part2_disp.cpp | 4 +-- .../p3/disp/p3_main_impl_part3_disp.cpp | 3 +-- .../physics/p3/disp/p3_rain_sed_impl_disp.cpp | 4 +-- .../physics/p3/eamxx_p3_process_interface.cpp | 4 +-- .../physics/p3/eamxx_p3_process_interface.hpp | 3 ++- .../src/physics/p3/impl/p3_main_impl.hpp | 2 +- .../physics/p3/impl/p3_main_impl_part1.hpp | 2 +- .../physics/p3/impl/p3_main_impl_part2.hpp | 2 +- .../physics/p3/impl/p3_main_impl_part3.hpp | 2 +- .../eamxx/src/physics/p3/p3_functions.hpp | 6 ++--- .../src/physics/p3/tests/infra/p3_data.cpp | 2 +- .../physics/p3/tests/infra/p3_ic_cases.cpp | 2 +- .../physics/p3/tests/infra/p3_main_wrap.cpp | 2 +- .../physics/p3/tests/infra/p3_test_data.cpp | 6 ++--- .../p3/tests/p3_autoconversion_unit_tests.cpp | 6 ++--- .../p3_back_to_cell_average_unit_tests.cpp | 6 ++--- ...lc_liq_relaxation_timescale_unit_tests.cpp | 6 ++--- .../tests/p3_calc_rime_density_unit_tests.cpp | 6 ++--- .../p3/tests/p3_check_values_unit_tests.cpp | 6 ++--- .../p3_cldliq_imm_freezing_unit_tests.cpp | 6 ++--- .../p3/tests/p3_cloud_rain_acc_unit_tests.cpp | 6 ++--- .../p3/tests/p3_cloud_sed_unit_tests.cpp | 6 ++--- .../tests/p3_droplet_self_coll_unit_tests.cpp | 6 ++--- .../physics/p3/tests/p3_dsd2_unit_tests.cpp | 6 ++--- .../p3/tests/p3_evaporate_rain_unit_tests.cpp | 6 ++--- .../physics/p3/tests/p3_find_unit_tests.cpp | 5 ++-- .../p3_ice_cldliq_wet_growth_unit_tests.cpp | 6 ++--- .../p3/tests/p3_ice_collection_unit_tests.cpp | 1 - .../p3_ice_deposition_sublimation_tests.cpp | 7 +++--- .../p3/tests/p3_ice_melting_unit_tests.cpp | 6 ++--- .../p3/tests/p3_ice_nucleation_unit_tests.cpp | 6 ++--- ...p3_ice_relaxation_timescale_unit_tests.cpp | 6 ++--- .../p3/tests/p3_ice_sed_unit_tests.cpp | 6 ++--- .../p3_ice_supersat_conservation_tests.cpp | 6 ++--- .../p3/tests/p3_ice_tables_unit_tests.cpp | 6 ++--- .../p3_incloud_mixingratios_unit_tests.cpp | 6 ++--- .../physics/p3/tests/p3_main_unit_tests.cpp | 6 ++--- .../p3/tests/p3_nc_conservation_tests.cpp | 6 ++--- .../p3/tests/p3_ni_conservation_tests.cpp | 6 ++--- .../p3/tests/p3_nr_conservation_tests.cpp | 6 ++--- .../p3_prevent_liq_supersaturation_tests.cpp | 8 +++--- .../tests/p3_rain_imm_freezing_unit_tests.cpp | 6 ++--- .../p3/tests/p3_rain_sed_unit_tests.cpp | 6 ++--- .../tests/p3_rain_self_collection_tests.cpp | 6 ++--- .../src/physics/p3/tests/p3_run_and_cmp.cpp | 9 +++---- ...p3_subgrid_variance_scaling_unit_tests.cpp | 4 +-- .../physics/p3/tests/p3_table3_unit_tests.cpp | 6 +---- .../src/physics/p3/tests/p3_unit_tests.cpp | 7 ++---- .../physics/p3/tests/p3_upwind_unit_tests.cpp | 1 - .../physics/rrtmgp/eamxx_rrtmgp_interface.hpp | 6 ++--- .../rrtmgp/eamxx_rrtmgp_process_interface.cpp | 2 +- .../rrtmgp/eamxx_rrtmgp_process_interface.hpp | 6 +++-- .../rrtmgp/tests/generate_baseline.cpp | 2 +- .../src/physics/rrtmgp/tests/rrtmgp_tests.cpp | 2 +- .../eamxx/src/physics/share/eamxx_trcmix.cpp | 2 +- .../src/physics/share/physics_constants.hpp | 4 +-- .../src/physics/share/physics_functions.hpp | 4 +-- .../eamxx/src/physics/share/physics_share.cpp | 4 +-- .../src/physics/share/physics_test_data.cpp | 4 +-- .../src/physics/share/physics_test_data.hpp | 6 ++--- .../tests/physics_saturation_run_and_cmp.cpp | 5 ++-- .../tests/physics_test_data_unit_tests.cpp | 1 - .../shoc/disp/shoc_assumed_pdf_disp.cpp | 2 +- .../physics/shoc/disp/shoc_check_tke_disp.cpp | 2 +- .../shoc_compute_shoc_temperature_disp.cpp | 2 +- .../disp/shoc_compute_shoc_vapor_disp.cpp | 2 +- .../shoc/disp/shoc_diag_obklen_disp.cpp | 2 +- .../shoc_diag_second_shoc_moments_disp.cpp | 2 +- .../shoc_diag_third_shoc_moments_disp.cpp | 2 +- .../shoc/disp/shoc_energy_fixer_disp.cpp | 2 +- .../shoc/disp/shoc_energy_integrals_disp.cpp | 2 +- .../src/physics/shoc/disp/shoc_grid_disp.cpp | 2 +- .../physics/shoc/disp/shoc_length_disp.cpp | 2 +- .../physics/shoc/disp/shoc_pblintd_disp.cpp | 2 +- .../src/physics/shoc/disp/shoc_tke_disp.cpp | 2 +- .../shoc/disp/shoc_update_host_dse_disp.cpp | 2 +- .../shoc_update_prognostics_implicit_disp.cpp | 2 +- .../shoc/eamxx_shoc_process_interface.cpp | 3 ++- .../shoc/eamxx_shoc_process_interface.hpp | 3 ++- .../src/physics/shoc/impl/shoc_main_impl.hpp | 2 +- .../shoc/impl/shoc_tridiag_solver_impl.hpp | 3 ++- .../eamxx/src/physics/shoc/shoc_functions.hpp | 4 +-- .../physics/shoc/tests/infra/shoc_data.cpp | 5 ++-- .../shoc/tests/infra/shoc_ic_cases.cpp | 3 ++- .../shoc/tests/infra/shoc_main_wrap.cpp | 4 +-- .../shoc/tests/infra/shoc_main_wrap.hpp | 2 +- .../shoc/tests/infra/shoc_test_data.cpp | 3 +-- .../tests/infra/shoc_unit_tests_common.hpp | 2 -- .../shoc/tests/shoc_assumed_pdf_tests.cpp | 3 --- .../shoc/tests/shoc_brunt_length_tests.cpp | 3 --- .../shoc/tests/shoc_check_length_tests.cpp | 3 --- .../shoc/tests/shoc_check_tke_tests.cpp | 3 --- .../shoc/tests/shoc_clip_third_moms_tests.cpp | 3 --- .../tests/shoc_compute_diag_third_tests.cpp | 3 --- .../shoc_compute_shoc_temperature_tests.cpp | 3 --- .../tests/shoc_compute_shoc_vapor_tests.cpp | 2 -- .../shoc/tests/shoc_diag_obklen_tests.cpp | 3 --- .../tests/shoc_diag_second_mom_srf_test.cpp | 3 --- .../shoc_diag_second_mom_ubycond_test.cpp | 3 --- ...shoc_diag_second_moments_lbycond_tests.cpp | 2 -- .../tests/shoc_diag_second_moments_tests.cpp | 2 -- .../shoc_diag_second_shoc_moments_tests.cpp | 2 -- .../shoc/tests/shoc_diag_third_tests.cpp | 4 --- .../tests/shoc_eddy_diffusivities_tests.cpp | 3 --- .../shoc/tests/shoc_energy_fixer_tests.cpp | 3 --- .../shoc/tests/shoc_energy_integral_tests.cpp | 3 --- .../tests/shoc_energy_update_dse_tests.cpp | 3 --- .../physics/shoc/tests/shoc_grid_tests.cpp | 3 --- .../shoc/tests/shoc_impli_comp_tmpi_tests.cpp | 3 --- .../tests/shoc_impli_dp_inverse_tests.cpp | 3 --- .../shoc/tests/shoc_l_inf_length_tests.cpp | 3 --- .../physics/shoc/tests/shoc_length_tests.cpp | 3 --- .../shoc/tests/shoc_linear_interp_tests.cpp | 3 --- .../physics/shoc/tests/shoc_main_tests.cpp | 2 -- .../shoc/tests/shoc_mix_length_tests.cpp | 3 --- .../tests/shoc_pblintd_check_pblh_tests.cpp | 2 -- .../tests/shoc_pblintd_cldcheck_tests.cpp | 4 --- .../shoc/tests/shoc_pblintd_height_tests.cpp | 2 -- .../shoc/tests/shoc_pblintd_init_pot_test.cpp | 3 --- .../tests/shoc_pblintd_surf_temp_tests.cpp | 2 -- .../physics/shoc/tests/shoc_pblintd_tests.cpp | 2 -- .../tests/shoc_pdf_compute_buoyflux_tests.cpp | 3 --- .../tests/shoc_pdf_compute_cloudvar_tests.cpp | 3 --- .../tests/shoc_pdf_compute_liqflux_tests.cpp | 3 --- .../shoc/tests/shoc_pdf_compute_qs_tests.cpp | 3 --- .../shoc/tests/shoc_pdf_compute_s_tests.cpp | 3 --- .../tests/shoc_pdf_compute_sgsliq_tests.cpp | 3 --- .../shoc/tests/shoc_pdf_computetemp_tests.cpp | 3 --- .../tests/shoc_pdf_inplume_corr_tests.cpp | 3 --- .../tests/shoc_pdf_qw_parameters_tests.cpp | 3 --- .../tests/shoc_pdf_thl_parameters_tests.cpp | 3 --- .../shoc/tests/shoc_pdf_tildetoreal_tests.cpp | 3 --- .../tests/shoc_pdf_vv_parameters_tests.cpp | 3 --- .../physics/shoc/tests/shoc_run_and_cmp.cpp | 2 -- .../src/physics/shoc/tests/shoc_tests.cpp | 2 -- .../shoc/tests/shoc_tke_adv_sgs_tke_tests.cpp | 3 --- .../shoc/tests/shoc_tke_column_stab_tests.cpp | 3 --- .../tests/shoc_tke_isotropic_ts_tests.cpp | 3 --- .../shoc/tests/shoc_tke_shr_prod_tests.cpp | 3 --- .../src/physics/shoc/tests/shoc_tke_tests.cpp | 3 --- .../physics/shoc/tests/shoc_unit_tests.cpp | 3 --- ...shoc_update_prognostics_implicit_tests.cpp | 2 -- .../shoc/tests/shoc_varorcovar_tests.cpp | 3 --- .../shoc_vd_shoc_decomp_and_solve_tests.cpp | 2 -- .../shoc/tests/shoc_vertflux_tests.cpp | 3 --- .../spa/eamxx_spa_process_interface.cpp | 4 +-- .../tms/eamxx_tms_process_interface.cpp | 4 +-- .../tms/eamxx_tms_process_interface.hpp | 3 ++- .../physics/tms/tests/compute_tms_tests.cpp | 6 ++--- .../physics/tms/tests/infra/tms_test_data.cpp | 3 --- .../tms/tests/infra/tms_unit_tests_common.hpp | 1 - .../eamxx/src/physics/tms/tms_functions.hpp | 6 ++--- .../physics/zm/eamxx_zm_process_interface.cpp | 3 ++- .../physics/zm/eamxx_zm_process_interface.hpp | 3 ++- .../physics/zm/tests/infra/zm_test_data.cpp | 5 +--- .../zm/tests/infra/zm_unit_tests_common.hpp | 3 ++- .../physics/zm/tests/zm_test_find_mse_max.cpp | 4 +-- .../eamxx/src/physics/zm/zm_functions.hpp | 4 +-- .../eamxx/src/python/libpyeamxx/pyatmproc.hpp | 2 +- .../src/python/libpyeamxx/pyeamxx_ext.cpp | 2 +- .../src/python/libpyeamxx/pyeamxx_ext.hpp | 2 +- .../src/python/libpyeamxx/pyparamlist.hpp | 2 +- .../share/atm_process/ATMBufferManager.hpp | 3 ++- .../src/share/atm_process/IOPDataManager.cpp | 4 +-- .../src/share/atm_process/IOPDataManager.hpp | 4 +-- .../src/share/atm_process/SCDataManager.hpp | 3 ++- .../share/atm_process/atmosphere_process.cpp | 2 +- .../share/atm_process/atmosphere_process.hpp | 14 +++++------ .../atm_process/atmosphere_process_dag.hpp | 5 ++-- .../atm_process/atmosphere_process_group.cpp | 4 +-- .../atm_process/atmosphere_process_group.hpp | 2 +- .../atm_process/atmosphere_process_hash.cpp | 3 ++- .../atm_process/atmosphere_process_utils.hpp | 2 +- .../eamxx/src/share/eamxx_pysession.cpp | 3 ++- components/eamxx/src/share/eamxx_types.hpp | 6 ++--- components/eamxx/src/share/field/field.hpp | 4 +-- .../src/share/field/field_alloc_prop.hpp | 4 +-- .../src/share/field/field_group_info.hpp | 2 +- .../eamxx/src/share/field/field_header.cpp | 2 +- .../eamxx/src/share/field/field_header.hpp | 4 +-- .../src/share/field/field_identifier.cpp | 3 ++- .../src/share/field/field_identifier.hpp | 6 ++--- .../eamxx/src/share/field/field_impl.hpp | 2 +- .../src/share/field/field_impl_details.hpp | 2 +- .../eamxx/src/share/field/field_layout.cpp | 2 +- .../eamxx/src/share/field/field_layout.hpp | 6 ++--- .../eamxx/src/share/field/field_pyutils.hpp | 2 +- .../eamxx/src/share/field/field_tag.hpp | 2 +- .../eamxx/src/share/field/field_tracking.hpp | 6 ++--- .../src/share/field/field_utils_impl.hpp | 2 +- .../eamxx/src/share/grid/abstract_grid.cpp | 2 +- .../eamxx/src/share/grid/abstract_grid.hpp | 4 +-- .../src/share/grid/grid_import_export.hpp | 3 ++- .../eamxx/src/share/grid/grids_manager.hpp | 10 ++++---- .../share/grid/mesh_free_grids_manager.cpp | 2 +- .../share/grid/mesh_free_grids_manager.hpp | 2 +- .../eamxx/src/share/grid/point_grid.cpp | 1 - .../eamxx/src/share/grid/point_grid.hpp | 5 ++-- .../share/grid/remap/abstract_remapper.hpp | 8 +++--- .../share/grid/remap/coarsening_remapper.cpp | 2 +- .../grid/remap/horiz_interp_remapper_base.cpp | 2 +- .../grid/remap/horiz_interp_remapper_data.hpp | 2 +- .../grid/remap/refining_remapper_p2p.cpp | 2 +- .../grid/remap/refining_remapper_p2p.hpp | 2 +- .../grid/remap/refining_remapper_rma.cpp | 2 +- .../grid/remap/refining_remapper_rma.hpp | 2 +- .../share/grid/remap/vertical_remapper.cpp | 6 ++--- .../share/grid/remap/vertical_remapper.hpp | 2 +- components/eamxx/src/share/grid/se_grid.cpp | 2 +- .../eamxx/src/share/io/eamxx_io_control.hpp | 2 +- .../src/share/io/eamxx_io_file_specs.hpp | 2 +- .../eamxx/src/share/io/eamxx_io_utils.hpp | 4 +-- .../src/share/io/eamxx_output_manager.cpp | 6 ++--- .../src/share/io/eamxx_output_manager.hpp | 7 +++--- .../src/share/io/eamxx_scorpio_interface.cpp | 6 +++-- .../src/share/io/eamxx_scorpio_interface.hpp | 4 +-- .../src/share/io/eamxx_scorpio_types.cpp | 2 +- .../eamxx/src/share/io/scorpio_input.cpp | 2 +- .../eamxx/src/share/io/scorpio_input.hpp | 4 +-- .../eamxx/src/share/io/scorpio_output.cpp | 6 ++--- .../eamxx/src/share/io/scorpio_output.hpp | 5 ++-- .../eamxx/src/share/io/scorpio_scm_input.cpp | 2 +- .../eamxx/src/share/io/scorpio_scm_input.hpp | 2 +- .../eamxx/src/share/io/tests/io_basic.cpp | 9 +++---- .../eamxx/src/share/io/tests/io_diags.cpp | 9 +++---- .../eamxx/src/share/io/tests/io_filled.cpp | 9 +++---- .../eamxx/src/share/io/tests/io_monthly.cpp | 9 +++---- .../eamxx/src/share/io/tests/io_packed.cpp | 9 +++---- .../src/share/io/tests/io_remap_test.cpp | 2 ++ .../eamxx/src/share/io/tests/io_se_grid.cpp | 8 +++--- .../src/share/io/tests/output_restart.cpp | 4 +-- .../io/tests/scorpio_interface_tests.cpp | 1 - .../field_within_interval_check.cpp | 2 +- .../field_within_interval_check.hpp | 2 -- .../share/property_checks/property_check.cpp | 2 +- .../share/property_checks/property_check.hpp | 2 +- .../src/share/tests/atm_process_tests.cpp | 7 +++--- .../eamxx/src/share/tests/column_ops.cpp | 7 +++--- .../eamxx/src/share/tests/combine_ops.cpp | 2 +- .../tests/common_physics_functions_tests.cpp | 2 +- .../tests/eamxx_time_interpolation_tests.cpp | 2 +- .../eamxx/src/share/tests/field_tests.cpp | 8 +++--- .../eamxx/src/share/tests/field_utils.cpp | 6 ++--- .../eamxx/src/share/tests/grid_tests.cpp | 2 +- .../eamxx/src/share/tests/property_checks.cpp | 4 +-- .../eamxx/src/share/tests/subfield_tests.cpp | 2 -- .../eamxx/src/share/util/eamxx_ad_test.cpp | 4 +-- .../src/share/util/eamxx_array_utils.hpp | 3 ++- .../eamxx/src/share/util/eamxx_bfbhash.hpp | 4 +-- .../eamxx/src/share/util/eamxx_column_ops.hpp | 16 ++++++------ .../src/share/util/eamxx_combine_ops.hpp | 6 ++--- .../eamxx/src/share/util/eamxx_data_type.hpp | 2 +- .../eamxx/src/share/util/eamxx_deep_copy.hpp | 4 +-- .../src/share/util/eamxx_family_tracking.hpp | 4 +-- .../share/util/eamxx_setup_random_test.hpp | 3 ++- .../eamxx/src/share/util/eamxx_time_stamp.cpp | 3 ++- .../eamxx/src/share/util/eamxx_timing.hpp | 2 +- .../eamxx/src/share/util/eamxx_utils.hpp | 6 ++--- .../tests/generic/fail_check/kokkos_fail.cpp | 4 +-- .../homme_shoc_cld_spa_p3_rrtmgp_pg2_dp.cpp | 3 ++- .../ml_correction_standalone.cpp | 2 +- .../tests/single-process/p3/p3_bfb_hash.cpp | 3 ++- .../rrtmgp/rrtmgp_standalone.cpp | 4 +-- .../rrtmgp/rrtmgp_standalone_unit.cpp | 4 +-- .../surface_coupling/surface_coupling.cpp | 6 ++--- .../tests/single-process/zm/zm_standalone.cpp | 2 +- 353 files changed, 552 insertions(+), 794 deletions(-) diff --git a/components/eamxx/src/control/atmosphere_driver.cpp b/components/eamxx/src/control/atmosphere_driver.cpp index 4b2b114e88ef..2522f0fe3eea 100644 --- a/components/eamxx/src/control/atmosphere_driver.cpp +++ b/components/eamxx/src/control/atmosphere_driver.cpp @@ -14,11 +14,11 @@ #include "share/io/eamxx_io_utils.hpp" #include "share/property_checks/mass_and_energy_column_conservation_check.hpp" -#include "ekat/ekat_assert.hpp" -#include "ekat/util/ekat_string_utils.hpp" -#include "ekat/ekat_parameter_list.hpp" -#include "ekat/ekat_parse_yaml_file.hpp" -#include "ekat/std_meta/ekat_std_utils.hpp" +#include +#include +#include +#include +#include // The global variable fvphyshack is used to help the initial pgN implementation // work around some current AD constraints. Search the code for "fvphyshack" to diff --git a/components/eamxx/src/control/atmosphere_driver.hpp b/components/eamxx/src/control/atmosphere_driver.hpp index 99b53717ef12..355c781337fe 100644 --- a/components/eamxx/src/control/atmosphere_driver.hpp +++ b/components/eamxx/src/control/atmosphere_driver.hpp @@ -12,9 +12,9 @@ #include "share/atm_process/SCDataManager.hpp" #include "share/atm_process/IOPDataManager.hpp" -#include "ekat/logging/ekat_logger.hpp" -#include "ekat/mpi/ekat_comm.hpp" -#include "ekat/ekat_parameter_list.hpp" +#include +#include +#include #include diff --git a/components/eamxx/src/control/atmosphere_surface_coupling_exporter.cpp b/components/eamxx/src/control/atmosphere_surface_coupling_exporter.cpp index dec8622f525c..9ed0b6d445fd 100644 --- a/components/eamxx/src/control/atmosphere_surface_coupling_exporter.cpp +++ b/components/eamxx/src/control/atmosphere_surface_coupling_exporter.cpp @@ -1,7 +1,7 @@ #include "atmosphere_surface_coupling_exporter.hpp" -#include "ekat/ekat_assert.hpp" -#include "ekat/util/ekat_units.hpp" +#include +#include #include diff --git a/components/eamxx/src/control/atmosphere_surface_coupling_exporter.hpp b/components/eamxx/src/control/atmosphere_surface_coupling_exporter.hpp index 05862a523b44..8542398269c3 100644 --- a/components/eamxx/src/control/atmosphere_surface_coupling_exporter.hpp +++ b/components/eamxx/src/control/atmosphere_surface_coupling_exporter.hpp @@ -9,7 +9,8 @@ #include "share/atm_process/ATMBufferManager.hpp" #include "share/atm_process/SCDataManager.hpp" -#include +#include + #include namespace scream diff --git a/components/eamxx/src/control/atmosphere_surface_coupling_importer.cpp b/components/eamxx/src/control/atmosphere_surface_coupling_importer.cpp index 3be8a3613f23..1345befbcd2a 100644 --- a/components/eamxx/src/control/atmosphere_surface_coupling_importer.cpp +++ b/components/eamxx/src/control/atmosphere_surface_coupling_importer.cpp @@ -3,8 +3,8 @@ #include "share/property_checks/field_within_interval_check.hpp" #include "physics/share/physics_constants.hpp" -#include "ekat/ekat_assert.hpp" -#include "ekat/util/ekat_units.hpp" +#include +#include #include diff --git a/components/eamxx/src/control/atmosphere_surface_coupling_importer.hpp b/components/eamxx/src/control/atmosphere_surface_coupling_importer.hpp index 6cf04c4166d2..97c7ab4859e5 100644 --- a/components/eamxx/src/control/atmosphere_surface_coupling_importer.hpp +++ b/components/eamxx/src/control/atmosphere_surface_coupling_importer.hpp @@ -1,11 +1,12 @@ #ifndef SCREAM_IMPORTER_HPP #define SCREAM_IMPORTER_HPP +#include "surface_coupling_utils.hpp" + #include "share/atm_process/atmosphere_process.hpp" -#include "ekat/ekat_parameter_list.hpp" #include "share/atm_process/SCDataManager.hpp" -#include "surface_coupling_utils.hpp" +#include #include diff --git a/components/eamxx/src/control/tests/ad_tests.cpp b/components/eamxx/src/control/tests/ad_tests.cpp index cd19e2a6fd76..e09f14b40d88 100644 --- a/components/eamxx/src/control/tests/ad_tests.cpp +++ b/components/eamxx/src/control/tests/ad_tests.cpp @@ -4,8 +4,8 @@ #include "share/atm_process/atmosphere_process_group.hpp" #include "share/field/field_utils.hpp" -#include "ekat/ekat_parameter_list.hpp" -#include "ekat/ekat_parse_yaml_file.hpp" +#include +#include #include diff --git a/components/eamxx/src/control/tests/dummy_atm_proc.hpp b/components/eamxx/src/control/tests/dummy_atm_proc.hpp index 83a340ec74be..331e606bd14d 100644 --- a/components/eamxx/src/control/tests/dummy_atm_proc.hpp +++ b/components/eamxx/src/control/tests/dummy_atm_proc.hpp @@ -2,8 +2,6 @@ #include "share/atm_process/atmosphere_process.hpp" -#include "ekat/ekat_pack.hpp" - namespace scream { // === A dummy atm process, on Physics grid === // diff --git a/components/eamxx/src/diagnostics/field_at_height.cpp b/components/eamxx/src/diagnostics/field_at_height.cpp index db780f5a79fd..f44b4eb7e727 100644 --- a/components/eamxx/src/diagnostics/field_at_height.cpp +++ b/components/eamxx/src/diagnostics/field_at_height.cpp @@ -1,7 +1,7 @@ #include "diagnostics/field_at_height.hpp" -#include "ekat/std_meta/ekat_std_utils.hpp" -#include "ekat/util/ekat_units.hpp" +#include +#include namespace { diff --git a/components/eamxx/src/diagnostics/field_at_level.cpp b/components/eamxx/src/diagnostics/field_at_level.cpp index b842429a8d6e..092cd8e2e2f3 100644 --- a/components/eamxx/src/diagnostics/field_at_level.cpp +++ b/components/eamxx/src/diagnostics/field_at_level.cpp @@ -1,6 +1,6 @@ #include "diagnostics/field_at_level.hpp" -#include "ekat/std_meta/ekat_std_utils.hpp" +#include namespace scream { diff --git a/components/eamxx/src/diagnostics/field_at_pressure_level.cpp b/components/eamxx/src/diagnostics/field_at_pressure_level.cpp index c8ccfac3cb18..d44704ab5341 100644 --- a/components/eamxx/src/diagnostics/field_at_pressure_level.cpp +++ b/components/eamxx/src/diagnostics/field_at_pressure_level.cpp @@ -1,9 +1,9 @@ #include "diagnostics/field_at_pressure_level.hpp" #include "share/util/eamxx_universal_constants.hpp" -#include "ekat/std_meta/ekat_std_utils.hpp" -#include "ekat/util/ekat_upper_bound.hpp" -#include "ekat/util/ekat_units.hpp" +#include +#include +#include namespace scream { diff --git a/components/eamxx/src/diagnostics/field_at_pressure_level.hpp b/components/eamxx/src/diagnostics/field_at_pressure_level.hpp index 70bc704455e1..6a6f687b331e 100644 --- a/components/eamxx/src/diagnostics/field_at_pressure_level.hpp +++ b/components/eamxx/src/diagnostics/field_at_pressure_level.hpp @@ -3,8 +3,6 @@ #include "share/atm_process/atmosphere_diagnostic.hpp" -#include - namespace scream { diff --git a/components/eamxx/src/diagnostics/relative_humidity.cpp b/components/eamxx/src/diagnostics/relative_humidity.cpp index 6ff6b5160d90..9557c9bff96f 100644 --- a/components/eamxx/src/diagnostics/relative_humidity.cpp +++ b/components/eamxx/src/diagnostics/relative_humidity.cpp @@ -2,6 +2,8 @@ #include "physics/share/physics_functions.hpp" // also for ETI not on GPUs #include "physics/share/physics_saturation_impl.hpp" +#include + namespace scream { diff --git a/components/eamxx/src/diagnostics/tests/aodvis_test.cpp b/components/eamxx/src/diagnostics/tests/aodvis_test.cpp index 47cdb8fbb088..bba86648a058 100644 --- a/components/eamxx/src/diagnostics/tests/aodvis_test.cpp +++ b/components/eamxx/src/diagnostics/tests/aodvis_test.cpp @@ -6,6 +6,7 @@ #include "share/grid/mesh_free_grids_manager.hpp" #include "share/util/eamxx_setup_random_test.hpp" #include "share/util/eamxx_universal_constants.hpp" + namespace scream { std::shared_ptr create_gm(const ekat::Comm &comm, const int ncols, diff --git a/components/eamxx/src/diagnostics/tests/atm_density_test.cpp b/components/eamxx/src/diagnostics/tests/atm_density_test.cpp index ae7d51646ce5..257ee6a271c3 100644 --- a/components/eamxx/src/diagnostics/tests/atm_density_test.cpp +++ b/components/eamxx/src/diagnostics/tests/atm_density_test.cpp @@ -10,9 +10,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/ekat_pack.hpp" #include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" +#include #include diff --git a/components/eamxx/src/diagnostics/tests/dry_static_energy_test.cpp b/components/eamxx/src/diagnostics/tests/dry_static_energy_test.cpp index 01bf64ada41f..d4bcbdae50b9 100644 --- a/components/eamxx/src/diagnostics/tests/dry_static_energy_test.cpp +++ b/components/eamxx/src/diagnostics/tests/dry_static_energy_test.cpp @@ -10,9 +10,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/ekat_pack.hpp" #include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" +#include #include diff --git a/components/eamxx/src/diagnostics/tests/exner_test.cpp b/components/eamxx/src/diagnostics/tests/exner_test.cpp index 6c9781742a27..063800609a5f 100644 --- a/components/eamxx/src/diagnostics/tests/exner_test.cpp +++ b/components/eamxx/src/diagnostics/tests/exner_test.cpp @@ -10,9 +10,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/ekat_pack.hpp" #include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" +#include #include diff --git a/components/eamxx/src/diagnostics/tests/field_at_pressure_level_tests.cpp b/components/eamxx/src/diagnostics/tests/field_at_pressure_level_tests.cpp index e5c491774a25..991bcded9a39 100644 --- a/components/eamxx/src/diagnostics/tests/field_at_pressure_level_tests.cpp +++ b/components/eamxx/src/diagnostics/tests/field_at_pressure_level_tests.cpp @@ -1,13 +1,13 @@ #include "catch2/catch.hpp" -#include "ekat/ekat_pack_utils.hpp" - #include "diagnostics/field_at_pressure_level.hpp" #include "share/grid/mesh_free_grids_manager.hpp" #include "share/field/field_utils.hpp" #include "share/util/eamxx_setup_random_test.hpp" +#include + namespace scream { const int packsize = SCREAM_SMALL_PACK_SIZE; diff --git a/components/eamxx/src/diagnostics/tests/longwave_cloud_forcing_tests.cpp b/components/eamxx/src/diagnostics/tests/longwave_cloud_forcing_tests.cpp index 163f058fbfad..9ad0d815a594 100644 --- a/components/eamxx/src/diagnostics/tests/longwave_cloud_forcing_tests.cpp +++ b/components/eamxx/src/diagnostics/tests/longwave_cloud_forcing_tests.cpp @@ -10,9 +10,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/ekat_pack.hpp" #include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" +#include #include diff --git a/components/eamxx/src/diagnostics/tests/number_paths_tests.cpp b/components/eamxx/src/diagnostics/tests/number_paths_tests.cpp index 0d697b02c083..c95580294967 100644 --- a/components/eamxx/src/diagnostics/tests/number_paths_tests.cpp +++ b/components/eamxx/src/diagnostics/tests/number_paths_tests.cpp @@ -2,7 +2,6 @@ #include "catch2/catch.hpp" #include "diagnostics/register_diagnostics.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" #include "physics/share/physics_constants.hpp" #include "share/field/field_utils.hpp" diff --git a/components/eamxx/src/diagnostics/tests/potential_temperature_test.cpp b/components/eamxx/src/diagnostics/tests/potential_temperature_test.cpp index b53d5fa6db6f..0fb9c0f3806a 100644 --- a/components/eamxx/src/diagnostics/tests/potential_temperature_test.cpp +++ b/components/eamxx/src/diagnostics/tests/potential_temperature_test.cpp @@ -10,9 +10,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/ekat_pack.hpp" #include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" +#include #include diff --git a/components/eamxx/src/diagnostics/tests/precip_surf_mass_flux_tests.cpp b/components/eamxx/src/diagnostics/tests/precip_surf_mass_flux_tests.cpp index 0062aad8036f..b26ea36e0ab8 100644 --- a/components/eamxx/src/diagnostics/tests/precip_surf_mass_flux_tests.cpp +++ b/components/eamxx/src/diagnostics/tests/precip_surf_mass_flux_tests.cpp @@ -8,7 +8,6 @@ #include "share/util/eamxx_setup_random_test.hpp" #include "share/field/field_utils.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" namespace scream { diff --git a/components/eamxx/src/diagnostics/tests/relative_humidity_tests.cpp b/components/eamxx/src/diagnostics/tests/relative_humidity_tests.cpp index 336e5a65d0b5..340e0f35eb5d 100644 --- a/components/eamxx/src/diagnostics/tests/relative_humidity_tests.cpp +++ b/components/eamxx/src/diagnostics/tests/relative_humidity_tests.cpp @@ -11,9 +11,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/ekat_pack.hpp" #include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" +#include #include diff --git a/components/eamxx/src/diagnostics/tests/sea_level_pressure_test.cpp b/components/eamxx/src/diagnostics/tests/sea_level_pressure_test.cpp index 1af55e171b89..b907afc6f78c 100644 --- a/components/eamxx/src/diagnostics/tests/sea_level_pressure_test.cpp +++ b/components/eamxx/src/diagnostics/tests/sea_level_pressure_test.cpp @@ -10,9 +10,8 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" +#include #include diff --git a/components/eamxx/src/diagnostics/tests/shortwave_cloud_forcing_tests.cpp b/components/eamxx/src/diagnostics/tests/shortwave_cloud_forcing_tests.cpp index c8ce28c43cdc..f86f100d8472 100644 --- a/components/eamxx/src/diagnostics/tests/shortwave_cloud_forcing_tests.cpp +++ b/components/eamxx/src/diagnostics/tests/shortwave_cloud_forcing_tests.cpp @@ -10,9 +10,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/ekat_pack.hpp" #include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" +#include #include diff --git a/components/eamxx/src/diagnostics/tests/surf_upward_latent_heat_flux_tests.cpp b/components/eamxx/src/diagnostics/tests/surf_upward_latent_heat_flux_tests.cpp index ec650ab52105..5f6787fe7ea9 100644 --- a/components/eamxx/src/diagnostics/tests/surf_upward_latent_heat_flux_tests.cpp +++ b/components/eamxx/src/diagnostics/tests/surf_upward_latent_heat_flux_tests.cpp @@ -9,9 +9,8 @@ #include "share/util/eamxx_setup_random_test.hpp" #include "share/field/field_utils.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" -#include "ekat/logging/ekat_logger.hpp" +#include namespace scream { diff --git a/components/eamxx/src/diagnostics/tests/virtual_temperature_test.cpp b/components/eamxx/src/diagnostics/tests/virtual_temperature_test.cpp index 3dbcdf983d78..0489ddaec54c 100644 --- a/components/eamxx/src/diagnostics/tests/virtual_temperature_test.cpp +++ b/components/eamxx/src/diagnostics/tests/virtual_temperature_test.cpp @@ -10,9 +10,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/ekat_pack.hpp" #include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" +#include #include diff --git a/components/eamxx/src/diagnostics/wind_speed.cpp b/components/eamxx/src/diagnostics/wind_speed.cpp index d3379a433dd9..9e1485fb713d 100644 --- a/components/eamxx/src/diagnostics/wind_speed.cpp +++ b/components/eamxx/src/diagnostics/wind_speed.cpp @@ -1,7 +1,5 @@ #include "diagnostics/wind_speed.hpp" -#include - namespace scream { diff --git a/components/eamxx/src/diagnostics/zonal_avg.cpp b/components/eamxx/src/diagnostics/zonal_avg.cpp index 71056613ff59..ebfeeaeab2db 100644 --- a/components/eamxx/src/diagnostics/zonal_avg.cpp +++ b/components/eamxx/src/diagnostics/zonal_avg.cpp @@ -2,7 +2,7 @@ #include "share/field/field_utils.hpp" -#include +#include namespace scream { diff --git a/components/eamxx/src/dynamics/homme/eamxx_homme_fv_phys.cpp b/components/eamxx/src/dynamics/homme/eamxx_homme_fv_phys.cpp index cd56f52af4ba..70492e6e135b 100644 --- a/components/eamxx/src/dynamics/homme/eamxx_homme_fv_phys.cpp +++ b/components/eamxx/src/dynamics/homme/eamxx_homme_fv_phys.cpp @@ -14,11 +14,11 @@ #include "dynamics/homme/homme_dimensions.hpp" // Ekat includes -#include "ekat/ekat_assert.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/ekat_pack_kokkos.hpp" -#include "ekat/ekat_pack_utils.hpp" +#include +#include +#include +#include +#include extern "C" void gfr_init_hxx(); diff --git a/components/eamxx/src/dynamics/homme/eamxx_homme_process_interface.cpp b/components/eamxx/src/dynamics/homme/eamxx_homme_process_interface.cpp index dcf48aef7eee..9c65384e46d9 100644 --- a/components/eamxx/src/dynamics/homme/eamxx_homme_process_interface.cpp +++ b/components/eamxx/src/dynamics/homme/eamxx_homme_process_interface.cpp @@ -34,14 +34,14 @@ #include "share/property_checks/field_lower_bound_check.hpp" // Ekat includes -#include "ekat/ekat_assert.hpp" -#include "ekat/kokkos//ekat_subview_utils.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/ekat_pack_kokkos.hpp" -#include "ekat/ekat_scalar_traits.hpp" -#include "ekat/util/ekat_units.hpp" -#include "ekat/ekat_pack_utils.hpp" -#include "ekat/ekat_workspace.hpp" +#include +#include +#include +#include +#include +#include +#include +#include namespace scream { @@ -1052,10 +1052,11 @@ void HommeDynamics::restart_homme_state () { void HommeDynamics::initialize_homme_state () { // Some types - using ColOps = ColumnOps; - using PF = PhysicsFunctions; - using ESU = ekat::ExeSpaceUtils; - using EOS = Homme::EquationOfState; + using ColOps = ColumnOps; + using PF = PhysicsFunctions; + using ESU = ekat::ExeSpaceUtils; + using EOS = Homme::EquationOfState; + using WorkspaceMgr = ekat::WorkspaceManager; const auto& rgn = m_cgll_grid->name(); diff --git a/components/eamxx/src/dynamics/homme/eamxx_homme_process_interface.hpp b/components/eamxx/src/dynamics/homme/eamxx_homme_process_interface.hpp index f256e1a6e0c0..18fd15b3f243 100644 --- a/components/eamxx/src/dynamics/homme/eamxx_homme_process_interface.hpp +++ b/components/eamxx/src/dynamics/homme/eamxx_homme_process_interface.hpp @@ -4,9 +4,8 @@ #include "share/atm_process/atmosphere_process.hpp" #include "share/grid/remap/abstract_remapper.hpp" -#include "ekat/ekat_parameter_list.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/ekat_workspace.hpp" +#include +#include #include @@ -25,8 +24,6 @@ class HommeDynamics : public AtmosphereProcess { // Define some types needed by class using Pack = ekat::Pack; - using IntPack = ekat::Pack; - using Mask = ekat::Mask; using KT = KokkosTypes; template @@ -40,9 +37,6 @@ class HommeDynamics : public AtmosphereProcess template using uview_2d = ekat::Unmanaged>; - using WorkspaceMgr = ekat::WorkspaceManager; - using Workspace = WorkspaceMgr::Workspace; - public: // Constructor(s) and Destructor diff --git a/components/eamxx/src/dynamics/homme/homme_dynamics_helpers.hpp b/components/eamxx/src/dynamics/homme/homme_dynamics_helpers.hpp index 12f7c5e27d6b..857423b7aac1 100644 --- a/components/eamxx/src/dynamics/homme/homme_dynamics_helpers.hpp +++ b/components/eamxx/src/dynamics/homme/homme_dynamics_helpers.hpp @@ -3,7 +3,7 @@ #include "Context.hpp" -#include "ekat/ekat_scalar_traits.hpp" +#include // Homme includes #include "Types.hpp" diff --git a/components/eamxx/src/dynamics/homme/homme_grids_manager.cpp b/components/eamxx/src/dynamics/homme/homme_grids_manager.cpp index 8b7b3cf2d221..c8feae9ed4d9 100644 --- a/components/eamxx/src/dynamics/homme/homme_grids_manager.cpp +++ b/components/eamxx/src/dynamics/homme/homme_grids_manager.cpp @@ -20,7 +20,7 @@ #include "homme_dimensions.hpp" #include "PhysicalConstants.hpp" -#include "ekat/std_meta/ekat_std_utils.hpp" +#include namespace scream { diff --git a/components/eamxx/src/dynamics/homme/interface/eamxx_homme_interface.hpp b/components/eamxx/src/dynamics/homme/interface/eamxx_homme_interface.hpp index 496472b54c0f..a9c99a0b2668 100644 --- a/components/eamxx/src/dynamics/homme/interface/eamxx_homme_interface.hpp +++ b/components/eamxx/src/dynamics/homme/interface/eamxx_homme_interface.hpp @@ -8,8 +8,8 @@ #include "Context.hpp" #include "mpi/Comm.hpp" -#include "ekat/mpi/ekat_comm.hpp" -#include "ekat/ekat_assert.hpp" +#include +#include #include #include diff --git a/components/eamxx/src/dynamics/homme/physics_dynamics_remapper.cpp b/components/eamxx/src/dynamics/homme/physics_dynamics_remapper.cpp index bdc877ed19f7..492cd537e7e4 100644 --- a/components/eamxx/src/dynamics/homme/physics_dynamics_remapper.cpp +++ b/components/eamxx/src/dynamics/homme/physics_dynamics_remapper.cpp @@ -13,8 +13,8 @@ #include "share/grid/se_grid.hpp" #include "share/util/eamxx_utils.hpp" -#include "ekat/ekat_pack_utils.hpp" -#include "ekat/ekat_assert.hpp" +#include +#include namespace { diff --git a/components/eamxx/src/dynamics/homme/physics_dynamics_remapper.hpp b/components/eamxx/src/dynamics/homme/physics_dynamics_remapper.hpp index a652fa3feb19..af0ab70417f9 100644 --- a/components/eamxx/src/dynamics/homme/physics_dynamics_remapper.hpp +++ b/components/eamxx/src/dynamics/homme/physics_dynamics_remapper.hpp @@ -5,7 +5,7 @@ #include "share/grid/remap/abstract_remapper.hpp" -#include "ekat/ekat_pack.hpp" +#include namespace Homme { class BoundaryExchange; diff --git a/components/eamxx/src/dynamics/homme/tests/dyn_grid_io.cpp b/components/eamxx/src/dynamics/homme/tests/dyn_grid_io.cpp index a9eccb68a6a6..dacad88d6cae 100644 --- a/components/eamxx/src/dynamics/homme/tests/dyn_grid_io.cpp +++ b/components/eamxx/src/dynamics/homme/tests/dyn_grid_io.cpp @@ -15,9 +15,9 @@ #include "share/util/eamxx_setup_random_test.hpp" #include "share/util/eamxx_time_stamp.hpp" -#include "ekat/util/ekat_units.hpp" -#include "ekat/ekat_parameter_list.hpp" -#include "ekat/mpi/ekat_comm.hpp" +#include +#include +#include extern "C" { // These are specific C/F calls for these tests (i.e., not part of eamxx_homme_interface.hpp) diff --git a/components/eamxx/src/dynamics/homme/tests/homme_pd_remap_tests.cpp b/components/eamxx/src/dynamics/homme/tests/homme_pd_remap_tests.cpp index aca44bad167b..1e514d7f11b8 100644 --- a/components/eamxx/src/dynamics/homme/tests/homme_pd_remap_tests.cpp +++ b/components/eamxx/src/dynamics/homme/tests/homme_pd_remap_tests.cpp @@ -13,9 +13,9 @@ #include "dynamics/homme/homme_dimensions.hpp" #include "dynamics/homme/homme_grids_manager.hpp" -#include "ekat/mpi/ekat_comm.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_test_utils.hpp" +#include +#include +#include #include #include diff --git a/components/eamxx/src/mct_coupling/ScreamContext.hpp b/components/eamxx/src/mct_coupling/ScreamContext.hpp index 8b40134a0834..90ef22a8573c 100644 --- a/components/eamxx/src/mct_coupling/ScreamContext.hpp +++ b/components/eamxx/src/mct_coupling/ScreamContext.hpp @@ -1,7 +1,8 @@ #ifndef SCREAM_CONTEXT_HPP #define SCREAM_CONTEXT_HPP -#include "ekat/std_meta/ekat_std_any.hpp" +#include + #include #include diff --git a/components/eamxx/src/mct_coupling/eamxx_cxx_f90_interface.cpp b/components/eamxx/src/mct_coupling/eamxx_cxx_f90_interface.cpp index f62e60fc827a..639052e0346b 100644 --- a/components/eamxx/src/mct_coupling/eamxx_cxx_f90_interface.cpp +++ b/components/eamxx/src/mct_coupling/eamxx_cxx_f90_interface.cpp @@ -15,11 +15,12 @@ #include "share/eamxx_config.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_parse_yaml_file.hpp" -#include "ekat/logging/ekat_logger.hpp" -#include "ekat/mpi/ekat_comm.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/ekat_assert.hpp" +#include +#include +#include +#include +#include +#include #if defined(MPINIT_WORKAROUND) && (MPINIT_WORKAROUND == 1) #include diff --git a/components/eamxx/src/physics/cld_fraction/cld_fraction_functions.hpp b/components/eamxx/src/physics/cld_fraction/cld_fraction_functions.hpp index b805706da2c5..902548c9189c 100644 --- a/components/eamxx/src/physics/cld_fraction/cld_fraction_functions.hpp +++ b/components/eamxx/src/physics/cld_fraction/cld_fraction_functions.hpp @@ -3,8 +3,8 @@ #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack_kokkos.hpp" -#include "ekat/ekat_workspace.hpp" +#include +#include namespace scream { namespace cld_fraction { diff --git a/components/eamxx/src/physics/cld_fraction/cld_fraction_main_impl.hpp b/components/eamxx/src/physics/cld_fraction/cld_fraction_main_impl.hpp index 0e593acd7d7b..81ea8cba234b 100644 --- a/components/eamxx/src/physics/cld_fraction/cld_fraction_main_impl.hpp +++ b/components/eamxx/src/physics/cld_fraction/cld_fraction_main_impl.hpp @@ -2,7 +2,8 @@ #define CLD_FRACTION_MAIN_IMPL_HPP #include "physics/cld_fraction/cld_fraction_functions.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" + +#include namespace scream { namespace cld_fraction { diff --git a/components/eamxx/src/physics/cld_fraction/eamxx_cld_fraction_process_interface.cpp b/components/eamxx/src/physics/cld_fraction/eamxx_cld_fraction_process_interface.cpp index 392ba83d5796..5212ca3c4c59 100644 --- a/components/eamxx/src/physics/cld_fraction/eamxx_cld_fraction_process_interface.cpp +++ b/components/eamxx/src/physics/cld_fraction/eamxx_cld_fraction_process_interface.cpp @@ -1,8 +1,8 @@ #include "eamxx_cld_fraction_process_interface.hpp" #include "share/property_checks/field_within_interval_check.hpp" -#include "ekat/ekat_assert.hpp" -#include "ekat/util/ekat_units.hpp" +#include +#include #include diff --git a/components/eamxx/src/physics/cld_fraction/eamxx_cld_fraction_process_interface.hpp b/components/eamxx/src/physics/cld_fraction/eamxx_cld_fraction_process_interface.hpp index ec3092d46a3c..12951bcb8cd3 100644 --- a/components/eamxx/src/physics/cld_fraction/eamxx_cld_fraction_process_interface.hpp +++ b/components/eamxx/src/physics/cld_fraction/eamxx_cld_fraction_process_interface.hpp @@ -3,7 +3,8 @@ #include "physics/cld_fraction/cld_fraction_functions.hpp" #include "share/atm_process/atmosphere_process.hpp" -#include "ekat/ekat_parameter_list.hpp" + +#include #include diff --git a/components/eamxx/src/physics/cosp/eamxx_cosp.cpp b/components/eamxx/src/physics/cosp/eamxx_cosp.cpp index 5fa1e6ff205b..cdc691a59dcf 100644 --- a/components/eamxx/src/physics/cosp/eamxx_cosp.cpp +++ b/components/eamxx/src/physics/cosp/eamxx_cosp.cpp @@ -1,13 +1,12 @@ #include "eamxx_cosp.hpp" #include "cosp_functions.hpp" -#include "share/property_checks/field_within_interval_check.hpp" #include "physics/share/physics_constants.hpp" - -#include "ekat/ekat_assert.hpp" -#include "ekat/util/ekat_units.hpp" - +#include "share/property_checks/field_within_interval_check.hpp" #include "share/field/field_utils.hpp" +#include +#include + #include namespace scream diff --git a/components/eamxx/src/physics/cosp/eamxx_cosp.hpp b/components/eamxx/src/physics/cosp/eamxx_cosp.hpp index 70cf76da4a4a..45ea9bb0777d 100644 --- a/components/eamxx/src/physics/cosp/eamxx_cosp.hpp +++ b/components/eamxx/src/physics/cosp/eamxx_cosp.hpp @@ -3,7 +3,8 @@ #include "share/atm_process/atmosphere_process.hpp" #include "share/util/eamxx_common_physics_functions.hpp" -#include "ekat/ekat_parameter_list.hpp" + +#include #include diff --git a/components/eamxx/src/physics/gw/gw_functions.hpp b/components/eamxx/src/physics/gw/gw_functions.hpp index 4128207b8b20..e560a3b9f572 100644 --- a/components/eamxx/src/physics/gw/gw_functions.hpp +++ b/components/eamxx/src/physics/gw/gw_functions.hpp @@ -5,9 +5,9 @@ #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack_kokkos.hpp" -#include "ekat/ekat_workspace.hpp" -#include "ekat/ekat_parameter_list.hpp" +#include +#include +#include namespace scream { namespace gw { diff --git a/components/eamxx/src/physics/gw/tests/gw_gw_beres_src_tests.cpp b/components/eamxx/src/physics/gw/tests/gw_gw_beres_src_tests.cpp index 67bc3095e5d6..e32cb4725b5f 100644 --- a/components/eamxx/src/physics/gw/tests/gw_gw_beres_src_tests.cpp +++ b/components/eamxx/src/physics/gw/tests/gw_gw_beres_src_tests.cpp @@ -1,13 +1,13 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "physics/gw/gw_functions.hpp" #include "physics/gw/tests/infra/gw_test_data.hpp" #include "gw_unit_tests_common.hpp" +#include + namespace scream { namespace gw { namespace unit_test { diff --git a/components/eamxx/src/physics/gw/tests/gw_gw_cm_src_tests.cpp b/components/eamxx/src/physics/gw/tests/gw_gw_cm_src_tests.cpp index b448964281bf..cd106ee0389f 100644 --- a/components/eamxx/src/physics/gw/tests/gw_gw_cm_src_tests.cpp +++ b/components/eamxx/src/physics/gw/tests/gw_gw_cm_src_tests.cpp @@ -1,13 +1,13 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "physics/gw/gw_functions.hpp" #include "physics/gw/tests/infra/gw_test_data.hpp" #include "gw_unit_tests_common.hpp" +#include + namespace scream { namespace gw { namespace unit_test { diff --git a/components/eamxx/src/physics/gw/tests/gw_gw_convect_gw_sources_tests.cpp b/components/eamxx/src/physics/gw/tests/gw_gw_convect_gw_sources_tests.cpp index a8a9cf5864e6..01b3b228ef44 100644 --- a/components/eamxx/src/physics/gw/tests/gw_gw_convect_gw_sources_tests.cpp +++ b/components/eamxx/src/physics/gw/tests/gw_gw_convect_gw_sources_tests.cpp @@ -1,13 +1,13 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "physics/gw/gw_functions.hpp" #include "physics/gw/tests/infra/gw_test_data.hpp" #include "gw_unit_tests_common.hpp" +#include + namespace scream { namespace gw { namespace unit_test { diff --git a/components/eamxx/src/physics/gw/tests/gw_gw_convect_project_winds_tests.cpp b/components/eamxx/src/physics/gw/tests/gw_gw_convect_project_winds_tests.cpp index e4ac6bce0ba4..334ab6e0df73 100644 --- a/components/eamxx/src/physics/gw/tests/gw_gw_convect_project_winds_tests.cpp +++ b/components/eamxx/src/physics/gw/tests/gw_gw_convect_project_winds_tests.cpp @@ -1,13 +1,13 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "physics/gw/gw_functions.hpp" #include "physics/gw/tests/infra/gw_test_data.hpp" #include "gw_unit_tests_common.hpp" +#include + namespace scream { namespace gw { namespace unit_test { diff --git a/components/eamxx/src/physics/gw/tests/gw_gw_diff_tend_tests.cpp b/components/eamxx/src/physics/gw/tests/gw_gw_diff_tend_tests.cpp index 33f058c57b0c..e931fc377216 100644 --- a/components/eamxx/src/physics/gw/tests/gw_gw_diff_tend_tests.cpp +++ b/components/eamxx/src/physics/gw/tests/gw_gw_diff_tend_tests.cpp @@ -1,13 +1,13 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "physics/gw/gw_functions.hpp" #include "physics/gw/tests/infra/gw_test_data.hpp" #include "gw_unit_tests_common.hpp" +#include + namespace scream { namespace gw { namespace unit_test { diff --git a/components/eamxx/src/physics/gw/tests/gw_gw_drag_prof_tests.cpp b/components/eamxx/src/physics/gw/tests/gw_gw_drag_prof_tests.cpp index 3ed41e3b86e1..ab22ac0206da 100644 --- a/components/eamxx/src/physics/gw/tests/gw_gw_drag_prof_tests.cpp +++ b/components/eamxx/src/physics/gw/tests/gw_gw_drag_prof_tests.cpp @@ -1,13 +1,13 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "physics/gw/gw_functions.hpp" #include "physics/gw/tests/infra/gw_test_data.hpp" #include "gw_unit_tests_common.hpp" +#include + namespace scream { namespace gw { namespace unit_test { diff --git a/components/eamxx/src/physics/gw/tests/gw_gw_ediff_tests.cpp b/components/eamxx/src/physics/gw/tests/gw_gw_ediff_tests.cpp index 71a4db213d0e..ed6b4157d8b7 100644 --- a/components/eamxx/src/physics/gw/tests/gw_gw_ediff_tests.cpp +++ b/components/eamxx/src/physics/gw/tests/gw_gw_ediff_tests.cpp @@ -1,13 +1,13 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "physics/gw/gw_functions.hpp" #include "physics/gw/tests/infra/gw_test_data.hpp" #include "gw_unit_tests_common.hpp" +#include + namespace scream { namespace gw { namespace unit_test { diff --git a/components/eamxx/src/physics/gw/tests/gw_gw_front_gw_sources_tests.cpp b/components/eamxx/src/physics/gw/tests/gw_gw_front_gw_sources_tests.cpp index a01e18ffd151..29b452652f2f 100644 --- a/components/eamxx/src/physics/gw/tests/gw_gw_front_gw_sources_tests.cpp +++ b/components/eamxx/src/physics/gw/tests/gw_gw_front_gw_sources_tests.cpp @@ -1,13 +1,13 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "physics/gw/gw_functions.hpp" #include "physics/gw/tests/infra/gw_test_data.hpp" #include "gw_unit_tests_common.hpp" +#include + namespace scream { namespace gw { namespace unit_test { diff --git a/components/eamxx/src/physics/gw/tests/gw_gw_front_project_winds_tests.cpp b/components/eamxx/src/physics/gw/tests/gw_gw_front_project_winds_tests.cpp index ae4ff7060080..92a9d64431bf 100644 --- a/components/eamxx/src/physics/gw/tests/gw_gw_front_project_winds_tests.cpp +++ b/components/eamxx/src/physics/gw/tests/gw_gw_front_project_winds_tests.cpp @@ -1,13 +1,13 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "physics/gw/gw_functions.hpp" #include "physics/gw/tests/infra/gw_test_data.hpp" #include "gw_unit_tests_common.hpp" +#include + namespace scream { namespace gw { namespace unit_test { diff --git a/components/eamxx/src/physics/gw/tests/gw_gw_heating_depth_tests.cpp b/components/eamxx/src/physics/gw/tests/gw_gw_heating_depth_tests.cpp index b120316e86a2..c2762376f0af 100644 --- a/components/eamxx/src/physics/gw/tests/gw_gw_heating_depth_tests.cpp +++ b/components/eamxx/src/physics/gw/tests/gw_gw_heating_depth_tests.cpp @@ -1,13 +1,13 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "physics/gw/gw_functions.hpp" #include "physics/gw/tests/infra/gw_test_data.hpp" #include "gw_unit_tests_common.hpp" +#include + namespace scream { namespace gw { namespace unit_test { diff --git a/components/eamxx/src/physics/gw/tests/gw_gw_oro_src_tests.cpp b/components/eamxx/src/physics/gw/tests/gw_gw_oro_src_tests.cpp index 7bceca8e1553..4d98eb09cbbb 100644 --- a/components/eamxx/src/physics/gw/tests/gw_gw_oro_src_tests.cpp +++ b/components/eamxx/src/physics/gw/tests/gw_gw_oro_src_tests.cpp @@ -1,13 +1,13 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "physics/gw/gw_functions.hpp" #include "physics/gw/tests/infra/gw_test_data.hpp" #include "gw_unit_tests_common.hpp" +#include + namespace scream { namespace gw { namespace unit_test { diff --git a/components/eamxx/src/physics/gw/tests/gw_gw_prof_tests.cpp b/components/eamxx/src/physics/gw/tests/gw_gw_prof_tests.cpp index 8cce12ff8427..03532392eb0b 100644 --- a/components/eamxx/src/physics/gw/tests/gw_gw_prof_tests.cpp +++ b/components/eamxx/src/physics/gw/tests/gw_gw_prof_tests.cpp @@ -1,13 +1,13 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "physics/gw/gw_functions.hpp" #include "physics/gw/tests/infra/gw_test_data.hpp" #include "gw_unit_tests_common.hpp" +#include + namespace scream { namespace gw { namespace unit_test { diff --git a/components/eamxx/src/physics/gw/tests/gw_gw_storm_speed_tests.cpp b/components/eamxx/src/physics/gw/tests/gw_gw_storm_speed_tests.cpp index 796b76d76c22..dfc0d4d47e86 100644 --- a/components/eamxx/src/physics/gw/tests/gw_gw_storm_speed_tests.cpp +++ b/components/eamxx/src/physics/gw/tests/gw_gw_storm_speed_tests.cpp @@ -1,13 +1,13 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "physics/gw/gw_functions.hpp" #include "physics/gw/tests/infra/gw_test_data.hpp" #include "gw_unit_tests_common.hpp" +#include + namespace scream { namespace gw { namespace unit_test { diff --git a/components/eamxx/src/physics/gw/tests/gw_gwd_compute_stress_profiles_and_diffusivities_tests.cpp b/components/eamxx/src/physics/gw/tests/gw_gwd_compute_stress_profiles_and_diffusivities_tests.cpp index 8fd29b06d3e2..9d216c54dd72 100644 --- a/components/eamxx/src/physics/gw/tests/gw_gwd_compute_stress_profiles_and_diffusivities_tests.cpp +++ b/components/eamxx/src/physics/gw/tests/gw_gwd_compute_stress_profiles_and_diffusivities_tests.cpp @@ -1,13 +1,13 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "physics/gw/gw_functions.hpp" #include "physics/gw/tests/infra/gw_test_data.hpp" #include "gw_unit_tests_common.hpp" +#include + namespace scream { namespace gw { namespace unit_test { diff --git a/components/eamxx/src/physics/gw/tests/gw_gwd_compute_tendencies_from_stress_divergence_tests.cpp b/components/eamxx/src/physics/gw/tests/gw_gwd_compute_tendencies_from_stress_divergence_tests.cpp index bfb5e6da9ded..c7c6a2684164 100644 --- a/components/eamxx/src/physics/gw/tests/gw_gwd_compute_tendencies_from_stress_divergence_tests.cpp +++ b/components/eamxx/src/physics/gw/tests/gw_gwd_compute_tendencies_from_stress_divergence_tests.cpp @@ -1,13 +1,13 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "physics/gw/gw_functions.hpp" #include "physics/gw/tests/infra/gw_test_data.hpp" #include "gw_unit_tests_common.hpp" +#include + namespace scream { namespace gw { namespace unit_test { diff --git a/components/eamxx/src/physics/gw/tests/gw_gwd_precalc_rhoi_tests.cpp b/components/eamxx/src/physics/gw/tests/gw_gwd_precalc_rhoi_tests.cpp index 60ad07074c1b..c09eaa191fc7 100644 --- a/components/eamxx/src/physics/gw/tests/gw_gwd_precalc_rhoi_tests.cpp +++ b/components/eamxx/src/physics/gw/tests/gw_gwd_precalc_rhoi_tests.cpp @@ -1,13 +1,13 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "physics/gw/gw_functions.hpp" #include "physics/gw/tests/infra/gw_test_data.hpp" #include "gw_unit_tests_common.hpp" +#include + namespace scream { namespace gw { namespace unit_test { diff --git a/components/eamxx/src/physics/gw/tests/gw_gwd_project_tau_tests.cpp b/components/eamxx/src/physics/gw/tests/gw_gwd_project_tau_tests.cpp index 6ef430c1231d..956d9221ee21 100644 --- a/components/eamxx/src/physics/gw/tests/gw_gwd_project_tau_tests.cpp +++ b/components/eamxx/src/physics/gw/tests/gw_gwd_project_tau_tests.cpp @@ -1,13 +1,13 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "physics/gw/gw_functions.hpp" #include "physics/gw/tests/infra/gw_test_data.hpp" #include "gw_unit_tests_common.hpp" +#include + namespace scream { namespace gw { namespace unit_test { diff --git a/components/eamxx/src/physics/gw/tests/gw_momentum_energy_conservation_tests.cpp b/components/eamxx/src/physics/gw/tests/gw_momentum_energy_conservation_tests.cpp index fbe2eea51a04..5f9069718107 100644 --- a/components/eamxx/src/physics/gw/tests/gw_momentum_energy_conservation_tests.cpp +++ b/components/eamxx/src/physics/gw/tests/gw_momentum_energy_conservation_tests.cpp @@ -1,13 +1,13 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "physics/gw/gw_functions.hpp" #include "physics/gw/tests/infra/gw_test_data.hpp" #include "gw_unit_tests_common.hpp" +#include + namespace scream { namespace gw { namespace unit_test { diff --git a/components/eamxx/src/physics/gw/tests/infra/gw_test_data.cpp b/components/eamxx/src/physics/gw/tests/infra/gw_test_data.cpp index 4a62466a6e07..edfeca6b5dec 100644 --- a/components/eamxx/src/physics/gw/tests/infra/gw_test_data.cpp +++ b/components/eamxx/src/physics/gw/tests/infra/gw_test_data.cpp @@ -1,9 +1,8 @@ #include "gw_test_data.hpp" -#include "ekat/kokkos/ekat_kokkos_types.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" -#include "ekat/ekat_pack_kokkos.hpp" -#include "ekat/ekat_assert.hpp" +#include +#include +#include #include diff --git a/components/eamxx/src/physics/gw/tests/infra/gw_unit_tests_common.hpp b/components/eamxx/src/physics/gw/tests/infra/gw_unit_tests_common.hpp index a03fbde1ff5d..2a6d69a1b9ac 100644 --- a/components/eamxx/src/physics/gw/tests/infra/gw_unit_tests_common.hpp +++ b/components/eamxx/src/physics/gw/tests/infra/gw_unit_tests_common.hpp @@ -1,12 +1,12 @@ #ifndef GW_UNIT_TESTS_COMMON_HPP #define GW_UNIT_TESTS_COMMON_HPP -#include "share/eamxx_types.hpp" -#include "share/util/eamxx_setup_random_test.hpp" #include "gw_functions.hpp" -#include "ekat/util/ekat_test_utils.hpp" #include "gw_test_data.hpp" +#include "share/eamxx_types.hpp" +#include "share/util/eamxx_setup_random_test.hpp" + #include #include diff --git a/components/eamxx/src/physics/iop_forcing/eamxx_iop_forcing_process_interface.hpp b/components/eamxx/src/physics/iop_forcing/eamxx_iop_forcing_process_interface.hpp index 5698889c9018..01c70e0aa34e 100644 --- a/components/eamxx/src/physics/iop_forcing/eamxx_iop_forcing_process_interface.hpp +++ b/components/eamxx/src/physics/iop_forcing/eamxx_iop_forcing_process_interface.hpp @@ -1,15 +1,15 @@ #ifndef SCREAM_IOP_FORCING_HPP #define SCREAM_IOP_FORCING_HPP -#include "ekat/ekat_parameter_list.hpp" -#include "ekat/ekat_workspace.hpp" - #include "share/atm_process/atmosphere_process.hpp" #include "share/atm_process/ATMBufferManager.hpp" #include "share/util/eamxx_column_ops.hpp" #include "physics/share/physics_constants.hpp" +#include +#include + #include namespace scream diff --git a/components/eamxx/src/physics/mam/eamxx_mam_aci_functions.hpp b/components/eamxx/src/physics/mam/eamxx_mam_aci_functions.hpp index 39671a00a08d..87d3f6347c3b 100644 --- a/components/eamxx/src/physics/mam/eamxx_mam_aci_functions.hpp +++ b/components/eamxx/src/physics/mam/eamxx_mam_aci_functions.hpp @@ -1,10 +1,11 @@ #ifndef EAMXX_MAM_ACI_FUNCTION_HPP #define EAMXX_MAM_ACI_FUNCTION_HPP -#include #include #include +#include + namespace scream { namespace { diff --git a/components/eamxx/src/physics/mam/eamxx_mam_aci_process_interface.cpp b/components/eamxx/src/physics/mam/eamxx_mam_aci_process_interface.cpp index fbea6536ebd8..6648849f0852 100644 --- a/components/eamxx/src/physics/mam/eamxx_mam_aci_process_interface.cpp +++ b/components/eamxx/src/physics/mam/eamxx_mam_aci_process_interface.cpp @@ -6,7 +6,7 @@ // For EKAT units package #include -#include "ekat/util/ekat_units.hpp" +#include /* ----------------------------------------------------------------- NOTES: diff --git a/components/eamxx/src/physics/mam/eamxx_mam_dry_deposition_functions.hpp b/components/eamxx/src/physics/mam/eamxx_mam_dry_deposition_functions.hpp index 93c085c8c1f4..a8f085d89df3 100644 --- a/components/eamxx/src/physics/mam/eamxx_mam_dry_deposition_functions.hpp +++ b/components/eamxx/src/physics/mam/eamxx_mam_dry_deposition_functions.hpp @@ -1,11 +1,11 @@ #ifndef EAMXX_MAM_DRY_DEPOSITION_FUNCTIONS_HPP #define EAMXX_MAM_DRY_DEPOSITION_FUNCTIONS_HPP -#include #include #include #include +#include namespace scream { namespace { diff --git a/components/eamxx/src/physics/mam/eamxx_mam_optics_process_interface.cpp b/components/eamxx/src/physics/mam/eamxx_mam_optics_process_interface.cpp index ca6e0d1949f0..e15729298bf1 100644 --- a/components/eamxx/src/physics/mam/eamxx_mam_optics_process_interface.cpp +++ b/components/eamxx/src/physics/mam/eamxx_mam_optics_process_interface.cpp @@ -1,12 +1,12 @@ -#include #include #include #include -#include "eamxx_config.h" // for SCREAM_CIME_BUILD #include "share/grid/point_grid.hpp" #include "share/io/scorpio_input.hpp" +#include + namespace scream { MAMOptics::MAMOptics(const ekat::Comm &comm, const ekat::ParameterList ¶ms) diff --git a/components/eamxx/src/physics/mam/eamxx_mam_optics_process_interface.hpp b/components/eamxx/src/physics/mam/eamxx_mam_optics_process_interface.hpp index 5989d4206940..5b0c62fa8de2 100644 --- a/components/eamxx/src/physics/mam/eamxx_mam_optics_process_interface.hpp +++ b/components/eamxx/src/physics/mam/eamxx_mam_optics_process_interface.hpp @@ -1,14 +1,16 @@ #ifndef EAMXX_MAM_OPTICS_HPP #define EAMXX_MAM_OPTICS_HPP -#include -#include #include #include #include #include #include #include + +#include +#include + #include #ifndef KOKKOS_ENABLE_CUDA diff --git a/components/eamxx/src/physics/mam/mam_aerosol_optics_read_tables.hpp b/components/eamxx/src/physics/mam/mam_aerosol_optics_read_tables.hpp index fc7444c467d0..6c70deeccfa0 100644 --- a/components/eamxx/src/physics/mam/mam_aerosol_optics_read_tables.hpp +++ b/components/eamxx/src/physics/mam/mam_aerosol_optics_read_tables.hpp @@ -1,7 +1,6 @@ #ifndef MAM_AEROSOL_OPTICS_READ_TABLES_HPP #define MAM_AEROSOL_OPTICS_READ_TABLES_HPP -#include "ekat/ekat_parameter_list.hpp" #include "mam_coupling.hpp" #include "share/field/field_manager.hpp" #include "share/grid/abstract_grid.hpp" @@ -9,6 +8,8 @@ #include "share/io/eamxx_scorpio_interface.hpp" #include "share/io/scorpio_input.hpp" +#include + // later to mam_coupling.hpp namespace scream::mam_coupling { diff --git a/components/eamxx/src/physics/mam/mam_coupling.hpp b/components/eamxx/src/physics/mam/mam_coupling.hpp index 59de1ca07788..37e658f44f0c 100644 --- a/components/eamxx/src/physics/mam/mam_coupling.hpp +++ b/components/eamxx/src/physics/mam/mam_coupling.hpp @@ -1,7 +1,7 @@ #ifndef MAM_COUPLING_HPP #define MAM_COUPLING_HPP -#include +#include #include #include #include diff --git a/components/eamxx/src/physics/mam/readfiles/find_season_index_utils.hpp b/components/eamxx/src/physics/mam/readfiles/find_season_index_utils.hpp index a52a6247d119..fe40cf80cba2 100644 --- a/components/eamxx/src/physics/mam/readfiles/find_season_index_utils.hpp +++ b/components/eamxx/src/physics/mam/readfiles/find_season_index_utils.hpp @@ -1,7 +1,6 @@ #ifndef EAMXX_MAM_FIND_SEASON_INDEX_UTILS #define EAMXX_MAM_FIND_SEASON_INDEX_UTILS -#include #include #include "share/io/eamxx_scorpio_interface.hpp" diff --git a/components/eamxx/src/physics/mam/readfiles/tracer_reader_utils.hpp b/components/eamxx/src/physics/mam/readfiles/tracer_reader_utils.hpp index caf0d3812ec3..3fe4532a6837 100644 --- a/components/eamxx/src/physics/mam/readfiles/tracer_reader_utils.hpp +++ b/components/eamxx/src/physics/mam/readfiles/tracer_reader_utils.hpp @@ -2,7 +2,6 @@ #define EAMXX_MAM_TRACER_READER_UTILS #include -#include #include "share/grid/point_grid.hpp" #include "share/grid/remap/coarsening_remapper.hpp" @@ -13,6 +12,8 @@ #include "share/util/eamxx_time_stamp.hpp" #include "share/util/eamxx_time_interpolation.hpp" +#include + namespace scream::mam_coupling { using namespace ShortFieldTagsNames; diff --git a/components/eamxx/src/physics/ml_correction/eamxx_ml_correction_process_interface.cpp b/components/eamxx/src/physics/ml_correction/eamxx_ml_correction_process_interface.cpp index 0983d7e1dc7a..2fa76057570e 100644 --- a/components/eamxx/src/physics/ml_correction/eamxx_ml_correction_process_interface.cpp +++ b/components/eamxx/src/physics/ml_correction/eamxx_ml_correction_process_interface.cpp @@ -1,6 +1,6 @@ #include "eamxx_ml_correction_process_interface.hpp" -#include "ekat/ekat_assert.hpp" -#include "ekat/util/ekat_units.hpp" +#include +#include #include "share/field/field_utils.hpp" #include "physics/share/physics_constants.hpp" #include "share/property_checks/field_lower_bound_check.hpp" diff --git a/components/eamxx/src/physics/ml_correction/eamxx_ml_correction_process_interface.hpp b/components/eamxx/src/physics/ml_correction/eamxx_ml_correction_process_interface.hpp index c692c7ae25ac..6028bf2d1c08 100644 --- a/components/eamxx/src/physics/ml_correction/eamxx_ml_correction_process_interface.hpp +++ b/components/eamxx/src/physics/ml_correction/eamxx_ml_correction_process_interface.hpp @@ -7,8 +7,8 @@ #include #include #include "share/atm_process/atmosphere_process.hpp" -#include "ekat/ekat_parameter_list.hpp" -#include "ekat/util/ekat_lin_interp.hpp" +#include +#include #include "share/io/eamxx_output_manager.hpp" #include "share/io/scorpio_output.hpp" #include "share/io/scorpio_input.hpp" diff --git a/components/eamxx/src/physics/nudging/eamxx_nudging_process_interface.cpp b/components/eamxx/src/physics/nudging/eamxx_nudging_process_interface.cpp index 6beca643ef5a..db138c88c0ed 100644 --- a/components/eamxx/src/physics/nudging/eamxx_nudging_process_interface.cpp +++ b/components/eamxx/src/physics/nudging/eamxx_nudging_process_interface.cpp @@ -5,9 +5,9 @@ #include "share/util/eamxx_utils.hpp" #include "share/io/eamxx_scorpio_interface.hpp" -#include -#include #include +#include +#include namespace scream { diff --git a/components/eamxx/src/physics/nudging/eamxx_nudging_process_interface.hpp b/components/eamxx/src/physics/nudging/eamxx_nudging_process_interface.hpp index 604360b8dc2b..c834629030d8 100644 --- a/components/eamxx/src/physics/nudging/eamxx_nudging_process_interface.hpp +++ b/components/eamxx/src/physics/nudging/eamxx_nudging_process_interface.hpp @@ -6,7 +6,7 @@ #include "share/util/eamxx_time_interpolation.hpp" #include "share/grid/remap/abstract_remapper.hpp" -#include +#include #include namespace scream diff --git a/components/eamxx/src/physics/p3/disp/p3_check_values_impl_disp.cpp b/components/eamxx/src/physics/p3/disp/p3_check_values_impl_disp.cpp index 5bac83064778..da15ae74cf09 100644 --- a/components/eamxx/src/physics/p3/disp/p3_check_values_impl_disp.cpp +++ b/components/eamxx/src/physics/p3/disp/p3_check_values_impl_disp.cpp @@ -1,7 +1,6 @@ - - #include "p3_functions.hpp" // for ETI only but harmless for GPU -#include "ekat/kokkos/ekat_subview_utils.hpp" + +#include namespace scream { namespace p3 { diff --git a/components/eamxx/src/physics/p3/disp/p3_cloud_sed_impl_disp.cpp b/components/eamxx/src/physics/p3/disp/p3_cloud_sed_impl_disp.cpp index 4b528663d236..5aa11a03bcbc 100644 --- a/components/eamxx/src/physics/p3/disp/p3_cloud_sed_impl_disp.cpp +++ b/components/eamxx/src/physics/p3/disp/p3_cloud_sed_impl_disp.cpp @@ -1,6 +1,6 @@ - #include "p3_functions.hpp" // for ETI only but harmless for GPU -#include "ekat/kokkos/ekat_subview_utils.hpp" + +#include namespace scream { namespace p3 { diff --git a/components/eamxx/src/physics/p3/disp/p3_ice_sed_impl_disp.cpp b/components/eamxx/src/physics/p3/disp/p3_ice_sed_impl_disp.cpp index 16e04fee6ab8..add6c3ff3a0a 100644 --- a/components/eamxx/src/physics/p3/disp/p3_ice_sed_impl_disp.cpp +++ b/components/eamxx/src/physics/p3/disp/p3_ice_sed_impl_disp.cpp @@ -1,6 +1,6 @@ - #include "p3_functions.hpp" // for ETI only but harmless for GPU -#include "ekat/kokkos/ekat_subview_utils.hpp" + +#include namespace scream { namespace p3 { diff --git a/components/eamxx/src/physics/p3/disp/p3_main_impl_disp.cpp b/components/eamxx/src/physics/p3/disp/p3_main_impl_disp.cpp index 8d88935e1fb3..fb9eda98efce 100644 --- a/components/eamxx/src/physics/p3/disp/p3_main_impl_disp.cpp +++ b/components/eamxx/src/physics/p3/disp/p3_main_impl_disp.cpp @@ -1,8 +1,8 @@ - #include "p3_functions.hpp" // for ETI only but harmless for GPU #include "physics/share/physics_functions.hpp" // also for ETI not on GPUs #include "physics/share/physics_saturation_impl.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" + +#include namespace scream { namespace p3 { diff --git a/components/eamxx/src/physics/p3/disp/p3_main_impl_part1_disp.cpp b/components/eamxx/src/physics/p3/disp/p3_main_impl_part1_disp.cpp index b2d3276dc067..8de187f2d2d8 100644 --- a/components/eamxx/src/physics/p3/disp/p3_main_impl_part1_disp.cpp +++ b/components/eamxx/src/physics/p3/disp/p3_main_impl_part1_disp.cpp @@ -1,9 +1,8 @@ - #include "p3_functions.hpp" // for ETI only but harmless for GPU #include "physics/share/physics_functions.hpp" // also for ETI not on GPUs #include "physics/share/physics_saturation_impl.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include namespace scream { namespace p3 { diff --git a/components/eamxx/src/physics/p3/disp/p3_main_impl_part2_disp.cpp b/components/eamxx/src/physics/p3/disp/p3_main_impl_part2_disp.cpp index bceaaa98f46e..0b489881358a 100644 --- a/components/eamxx/src/physics/p3/disp/p3_main_impl_part2_disp.cpp +++ b/components/eamxx/src/physics/p3/disp/p3_main_impl_part2_disp.cpp @@ -1,6 +1,6 @@ - #include "p3_functions.hpp" // for ETI only but harmless for GPU -#include "ekat/kokkos/ekat_subview_utils.hpp" + +#include namespace scream { namespace p3 { diff --git a/components/eamxx/src/physics/p3/disp/p3_main_impl_part3_disp.cpp b/components/eamxx/src/physics/p3/disp/p3_main_impl_part3_disp.cpp index 10e7c911c5da..f62238579d5d 100644 --- a/components/eamxx/src/physics/p3/disp/p3_main_impl_part3_disp.cpp +++ b/components/eamxx/src/physics/p3/disp/p3_main_impl_part3_disp.cpp @@ -1,9 +1,8 @@ - #include "p3_functions.hpp" // for ETI only but harmless for GPU #include "physics/share/physics_functions.hpp" // also for ETI not on GPUs #include "physics/share/physics_saturation_impl.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include namespace scream { namespace p3 { diff --git a/components/eamxx/src/physics/p3/disp/p3_rain_sed_impl_disp.cpp b/components/eamxx/src/physics/p3/disp/p3_rain_sed_impl_disp.cpp index a1b38afe8edd..fe4be4103bf0 100644 --- a/components/eamxx/src/physics/p3/disp/p3_rain_sed_impl_disp.cpp +++ b/components/eamxx/src/physics/p3/disp/p3_rain_sed_impl_disp.cpp @@ -1,6 +1,6 @@ - #include "p3_functions.hpp" // for ETI only but harmless for GPU -#include "ekat/kokkos/ekat_subview_utils.hpp" + +#include namespace scream { namespace p3 { diff --git a/components/eamxx/src/physics/p3/eamxx_p3_process_interface.cpp b/components/eamxx/src/physics/p3/eamxx_p3_process_interface.cpp index bb9dbebcc074..48128e979642 100644 --- a/components/eamxx/src/physics/p3/eamxx_p3_process_interface.cpp +++ b/components/eamxx/src/physics/p3/eamxx_p3_process_interface.cpp @@ -3,8 +3,8 @@ #include "p3_functions.hpp" #include "eamxx_p3_process_interface.hpp" -#include "ekat/ekat_assert.hpp" -#include "ekat/util/ekat_units.hpp" +#include +#include #include diff --git a/components/eamxx/src/physics/p3/eamxx_p3_process_interface.hpp b/components/eamxx/src/physics/p3/eamxx_p3_process_interface.hpp index cbe858f5e148..eec8dbaacc48 100644 --- a/components/eamxx/src/physics/p3/eamxx_p3_process_interface.hpp +++ b/components/eamxx/src/physics/p3/eamxx_p3_process_interface.hpp @@ -2,10 +2,11 @@ #define SCREAM_P3_MICROPHYSICS_HPP #include "share/atm_process/atmosphere_process.hpp" -#include "ekat/ekat_parameter_list.hpp" #include "physics/p3/p3_functions.hpp" #include "share/util/eamxx_common_physics_functions.hpp" +#include + #include namespace scream diff --git a/components/eamxx/src/physics/p3/impl/p3_main_impl.hpp b/components/eamxx/src/physics/p3/impl/p3_main_impl.hpp index ce08ae5b31cd..96772e12ab19 100644 --- a/components/eamxx/src/physics/p3/impl/p3_main_impl.hpp +++ b/components/eamxx/src/physics/p3/impl/p3_main_impl.hpp @@ -5,7 +5,7 @@ #include "physics/share/physics_functions.hpp" // also for ETI not on GPUs #include "physics/share/physics_saturation_impl.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include namespace scream { namespace p3 { diff --git a/components/eamxx/src/physics/p3/impl/p3_main_impl_part1.hpp b/components/eamxx/src/physics/p3/impl/p3_main_impl_part1.hpp index 4842ea7a4a8f..6e07bc62ded5 100644 --- a/components/eamxx/src/physics/p3/impl/p3_main_impl_part1.hpp +++ b/components/eamxx/src/physics/p3/impl/p3_main_impl_part1.hpp @@ -5,7 +5,7 @@ #include "physics/share/physics_functions.hpp" // also for ETI not on GPUs #include "physics/share/physics_saturation_impl.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include namespace scream { namespace p3 { diff --git a/components/eamxx/src/physics/p3/impl/p3_main_impl_part2.hpp b/components/eamxx/src/physics/p3/impl/p3_main_impl_part2.hpp index 0dd90df6e9aa..a6557b3bc2c0 100644 --- a/components/eamxx/src/physics/p3/impl/p3_main_impl_part2.hpp +++ b/components/eamxx/src/physics/p3/impl/p3_main_impl_part2.hpp @@ -5,7 +5,7 @@ #include "physics/share/physics_functions.hpp" // also for ETI not on GPUs #include "physics/share/physics_saturation_impl.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include namespace scream { namespace p3 { diff --git a/components/eamxx/src/physics/p3/impl/p3_main_impl_part3.hpp b/components/eamxx/src/physics/p3/impl/p3_main_impl_part3.hpp index 72bc7e8f577e..81ae70d44fba 100644 --- a/components/eamxx/src/physics/p3/impl/p3_main_impl_part3.hpp +++ b/components/eamxx/src/physics/p3/impl/p3_main_impl_part3.hpp @@ -5,7 +5,7 @@ #include "physics/share/physics_functions.hpp" // also for ETI not on GPUs #include "physics/share/physics_saturation_impl.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include namespace scream { namespace p3 { diff --git a/components/eamxx/src/physics/p3/p3_functions.hpp b/components/eamxx/src/physics/p3/p3_functions.hpp index 54be2c572ab8..e06da87922e2 100644 --- a/components/eamxx/src/physics/p3/p3_functions.hpp +++ b/components/eamxx/src/physics/p3/p3_functions.hpp @@ -5,9 +5,9 @@ #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack_kokkos.hpp" -#include "ekat/ekat_workspace.hpp" -#include "ekat/ekat_parameter_list.hpp" +#include +#include +#include namespace scream { namespace p3 { diff --git a/components/eamxx/src/physics/p3/tests/infra/p3_data.cpp b/components/eamxx/src/physics/p3/tests/infra/p3_data.cpp index e745a5eed1b0..41f636ae6fe9 100644 --- a/components/eamxx/src/physics/p3/tests/infra/p3_data.cpp +++ b/components/eamxx/src/physics/p3/tests/infra/p3_data.cpp @@ -2,7 +2,7 @@ #include "physics_constants.hpp" #include "p3_ic_cases.hpp" -#include "ekat/ekat_assert.hpp" +#include using scream::Real; using scream::Int; diff --git a/components/eamxx/src/physics/p3/tests/infra/p3_ic_cases.cpp b/components/eamxx/src/physics/p3/tests/infra/p3_ic_cases.cpp index 977d70b62153..163f736444dd 100644 --- a/components/eamxx/src/physics/p3/tests/infra/p3_ic_cases.cpp +++ b/components/eamxx/src/physics/p3/tests/infra/p3_ic_cases.cpp @@ -1,7 +1,7 @@ #include "p3_ic_cases.hpp" #include "physics_constants.hpp" -#include "ekat/ekat_assert.hpp" +#include namespace scream { namespace p3 { diff --git a/components/eamxx/src/physics/p3/tests/infra/p3_main_wrap.cpp b/components/eamxx/src/physics/p3/tests/infra/p3_main_wrap.cpp index 16266f2479bb..3b73c3548d65 100644 --- a/components/eamxx/src/physics/p3/tests/infra/p3_main_wrap.cpp +++ b/components/eamxx/src/physics/p3/tests/infra/p3_main_wrap.cpp @@ -4,7 +4,7 @@ #include "physics_constants.hpp" #include "p3_ic_cases.hpp" -#include "ekat/ekat_assert.hpp" +#include using scream::Real; using scream::Int; diff --git a/components/eamxx/src/physics/p3/tests/infra/p3_test_data.cpp b/components/eamxx/src/physics/p3/tests/infra/p3_test_data.cpp index a3646e739152..50d05594dedd 100644 --- a/components/eamxx/src/physics/p3/tests/infra/p3_test_data.cpp +++ b/components/eamxx/src/physics/p3/tests/infra/p3_test_data.cpp @@ -1,10 +1,10 @@ #include "p3_test_data.hpp" -#include "ekat/kokkos/ekat_kokkos_types.hpp" #include "p3_data.hpp" #include "ekat/kokkos/ekat_kokkos_utils.hpp" -#include "ekat/ekat_pack_kokkos.hpp" -#include "ekat/ekat_assert.hpp" +#include +#include +#include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_autoconversion_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_autoconversion_unit_tests.cpp index 6bb2fbd06069..034beb390d9a 100644 --- a/components/eamxx/src/physics/p3/tests/p3_autoconversion_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_autoconversion_unit_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_back_to_cell_average_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_back_to_cell_average_unit_tests.cpp index 162aff05dddb..2a153a8020af 100644 --- a/components/eamxx/src/physics/p3/tests/p3_back_to_cell_average_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_back_to_cell_average_unit_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_calc_liq_relaxation_timescale_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_calc_liq_relaxation_timescale_unit_tests.cpp index 3219d6534409..cad68b1ae9e5 100644 --- a/components/eamxx/src/physics/p3/tests/p3_calc_liq_relaxation_timescale_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_calc_liq_relaxation_timescale_unit_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_calc_rime_density_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_calc_rime_density_unit_tests.cpp index 4dd31c60c2f6..e547742617dc 100644 --- a/components/eamxx/src/physics/p3/tests/p3_calc_rime_density_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_calc_rime_density_unit_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_check_values_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_check_values_unit_tests.cpp index 4f720587ac30..822709872590 100644 --- a/components/eamxx/src/physics/p3/tests/p3_check_values_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_check_values_unit_tests.cpp @@ -1,14 +1,12 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" #include "p3_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_cldliq_imm_freezing_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_cldliq_imm_freezing_unit_tests.cpp index 20536b809402..d35474afbf3d 100644 --- a/components/eamxx/src/physics/p3/tests/p3_cldliq_imm_freezing_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_cldliq_imm_freezing_unit_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_cloud_rain_acc_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_cloud_rain_acc_unit_tests.cpp index 8860f86de072..1f80f4dabfc1 100644 --- a/components/eamxx/src/physics/p3/tests/p3_cloud_rain_acc_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_cloud_rain_acc_unit_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_cloud_sed_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_cloud_sed_unit_tests.cpp index a8badfdca133..82b14abc6fa5 100644 --- a/components/eamxx/src/physics/p3/tests/p3_cloud_sed_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_cloud_sed_unit_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_droplet_self_coll_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_droplet_self_coll_unit_tests.cpp index b11a20fa81c2..812926892197 100644 --- a/components/eamxx/src/physics/p3/tests/p3_droplet_self_coll_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_droplet_self_coll_unit_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_dsd2_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_dsd2_unit_tests.cpp index c43be419ac00..2ab0a6821569 100644 --- a/components/eamxx/src/physics/p3/tests/p3_dsd2_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_dsd2_unit_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_evaporate_rain_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_evaporate_rain_unit_tests.cpp index e27fc781b0f7..9a76342d49e1 100644 --- a/components/eamxx/src/physics/p3/tests/p3_evaporate_rain_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_evaporate_rain_unit_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + namespace scream { namespace p3 { namespace unit_test { diff --git a/components/eamxx/src/physics/p3/tests/p3_find_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_find_unit_tests.cpp index de88a48f8335..017db5423e26 100644 --- a/components/eamxx/src/physics/p3/tests/p3_find_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_find_unit_tests.cpp @@ -1,13 +1,12 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" #include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_ice_cldliq_wet_growth_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_ice_cldliq_wet_growth_unit_tests.cpp index 822e1ee5cb29..4adc2ebb58c3 100644 --- a/components/eamxx/src/physics/p3/tests/p3_ice_cldliq_wet_growth_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_ice_cldliq_wet_growth_unit_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_ice_collection_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_ice_collection_unit_tests.cpp index 26ed89e30466..8000eb49c2ef 100644 --- a/components/eamxx/src/physics/p3/tests/p3_ice_collection_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_ice_collection_unit_tests.cpp @@ -1,7 +1,6 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" #include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" diff --git a/components/eamxx/src/physics/p3/tests/p3_ice_deposition_sublimation_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_ice_deposition_sublimation_tests.cpp index e904a03aa983..da5b7789e17b 100644 --- a/components/eamxx/src/physics/p3/tests/p3_ice_deposition_sublimation_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_ice_deposition_sublimation_tests.cpp @@ -1,13 +1,12 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" -#include "physics/share/physics_constants.hpp" #include "p3_unit_tests_common.hpp" +#include "physics/share/physics_constants.hpp" +#include "share/eamxx_types.hpp" + namespace scream { namespace p3 { namespace unit_test { diff --git a/components/eamxx/src/physics/p3/tests/p3_ice_melting_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_ice_melting_unit_tests.cpp index 0a7da5e09bd3..b33d8d575952 100644 --- a/components/eamxx/src/physics/p3/tests/p3_ice_melting_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_ice_melting_unit_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_ice_nucleation_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_ice_nucleation_unit_tests.cpp index 0c074252951b..8ccecaafe6d1 100644 --- a/components/eamxx/src/physics/p3/tests/p3_ice_nucleation_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_ice_nucleation_unit_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_ice_relaxation_timescale_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_ice_relaxation_timescale_unit_tests.cpp index 8d613191fd24..f2373176c0b4 100644 --- a/components/eamxx/src/physics/p3/tests/p3_ice_relaxation_timescale_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_ice_relaxation_timescale_unit_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_ice_sed_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_ice_sed_unit_tests.cpp index d08bd158750e..94bd2e337273 100644 --- a/components/eamxx/src/physics/p3/tests/p3_ice_sed_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_ice_sed_unit_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_ice_supersat_conservation_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_ice_supersat_conservation_tests.cpp index 106442ac1330..e77816140b7a 100644 --- a/components/eamxx/src/physics/p3/tests/p3_ice_supersat_conservation_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_ice_supersat_conservation_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + namespace scream { namespace p3 { namespace unit_test { diff --git a/components/eamxx/src/physics/p3/tests/p3_ice_tables_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_ice_tables_unit_tests.cpp index ffa2870ea9ba..425923a6bae4 100644 --- a/components/eamxx/src/physics/p3/tests/p3_ice_tables_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_ice_tables_unit_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_incloud_mixingratios_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_incloud_mixingratios_unit_tests.cpp index 4c708b1a2ebc..13525403b334 100644 --- a/components/eamxx/src/physics/p3/tests/p3_incloud_mixingratios_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_incloud_mixingratios_unit_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_main_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_main_unit_tests.cpp index f61b6de0e1f2..ad4b16c93ff0 100644 --- a/components/eamxx/src/physics/p3/tests/p3_main_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_main_unit_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_nc_conservation_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_nc_conservation_tests.cpp index 57328125a24d..7c6adaaf793f 100644 --- a/components/eamxx/src/physics/p3/tests/p3_nc_conservation_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_nc_conservation_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + namespace scream { namespace p3 { namespace unit_test { diff --git a/components/eamxx/src/physics/p3/tests/p3_ni_conservation_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_ni_conservation_tests.cpp index 73eb1f701727..3ae10c06372c 100644 --- a/components/eamxx/src/physics/p3/tests/p3_ni_conservation_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_ni_conservation_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + namespace scream { namespace p3 { namespace unit_test { diff --git a/components/eamxx/src/physics/p3/tests/p3_nr_conservation_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_nr_conservation_tests.cpp index 71da12e9fc0d..8ebbb19e5a89 100644 --- a/components/eamxx/src/physics/p3/tests/p3_nr_conservation_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_nr_conservation_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + namespace scream { namespace p3 { namespace unit_test { diff --git a/components/eamxx/src/physics/p3/tests/p3_prevent_liq_supersaturation_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_prevent_liq_supersaturation_tests.cpp index 3b4286ded126..047652b5fd58 100644 --- a/components/eamxx/src/physics/p3/tests/p3_prevent_liq_supersaturation_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_prevent_liq_supersaturation_tests.cpp @@ -1,14 +1,12 @@ #include "catch2/catch.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" -#include "share/eamxx_types.hpp" -#include "physics/share/physics_functions.hpp" - #include "p3_unit_tests_common.hpp" +#include "physics/share/physics_functions.hpp" +#include "share/eamxx_types.hpp" + namespace scream { namespace p3 { namespace unit_test { diff --git a/components/eamxx/src/physics/p3/tests/p3_rain_imm_freezing_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_rain_imm_freezing_unit_tests.cpp index e6403cd7fe40..8e504bb7ad28 100644 --- a/components/eamxx/src/physics/p3/tests/p3_rain_imm_freezing_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_rain_imm_freezing_unit_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_rain_sed_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_rain_sed_unit_tests.cpp index 4b702fcd4ab7..6f1710283571 100644 --- a/components/eamxx/src/physics/p3/tests/p3_rain_sed_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_rain_sed_unit_tests.cpp @@ -1,14 +1,12 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" #include "p3_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_rain_self_collection_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_rain_self_collection_tests.cpp index cb1d94b7f81d..8c9a9dbcc8a8 100644 --- a/components/eamxx/src/physics/p3/tests/p3_rain_self_collection_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_rain_self_collection_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_run_and_cmp.cpp b/components/eamxx/src/physics/p3/tests/p3_run_and_cmp.cpp index bf67b2a929a1..489a8f952e48 100644 --- a/components/eamxx/src/physics/p3/tests/p3_run_and_cmp.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_run_and_cmp.cpp @@ -1,13 +1,10 @@ -#include "share/eamxx_types.hpp" -#include "share/eamxx_session.hpp" -#include "share/util/eamxx_utils.hpp" - #include "p3_main_wrap.hpp" #include "p3_test_data.hpp" #include "p3_ic_cases.hpp" -#include "ekat/util/ekat_test_utils.hpp" -#include "ekat/ekat_assert.hpp" +#include "share/eamxx_types.hpp" +#include "share/eamxx_session.hpp" +#include "share/util/eamxx_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_subgrid_variance_scaling_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_subgrid_variance_scaling_unit_tests.cpp index 671b87a1fa19..7356bb028cb1 100644 --- a/components/eamxx/src/physics/p3/tests/p3_subgrid_variance_scaling_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_subgrid_variance_scaling_unit_tests.cpp @@ -1,13 +1,13 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" #include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_table3_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_table3_unit_tests.cpp index 11021d2b16a6..6fd3f6ab396f 100644 --- a/components/eamxx/src/physics/p3/tests/p3_table3_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_table3_unit_tests.cpp @@ -1,15 +1,11 @@ #include "catch2/catch.hpp" #include "p3_unit_tests_common.hpp" - #include "p3_functions.hpp" #include "p3_test_data.hpp" #include "p3_data.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" +#include "share/eamxx_types.hpp" #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_unit_tests.cpp index d69c88bfeba8..852d14541f37 100644 --- a/components/eamxx/src/physics/p3/tests/p3_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_unit_tests.cpp @@ -1,14 +1,11 @@ #include "catch2/catch.hpp" -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" -#include "ekat/util/ekat_arch.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" - #include "p3_unit_tests_common.hpp" +#include "share/eamxx_types.hpp" + #include #include #include diff --git a/components/eamxx/src/physics/p3/tests/p3_upwind_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_upwind_unit_tests.cpp index 99bc60776020..4b5bd28647cc 100644 --- a/components/eamxx/src/physics/p3/tests/p3_upwind_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_upwind_unit_tests.cpp @@ -7,7 +7,6 @@ #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" #include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/ekat_pack_kokkos.hpp" diff --git a/components/eamxx/src/physics/rrtmgp/eamxx_rrtmgp_interface.hpp b/components/eamxx/src/physics/rrtmgp/eamxx_rrtmgp_interface.hpp index af0d935f4bcc..4a3e7e28cba5 100644 --- a/components/eamxx/src/physics/rrtmgp/eamxx_rrtmgp_interface.hpp +++ b/components/eamxx/src/physics/rrtmgp/eamxx_rrtmgp_interface.hpp @@ -17,9 +17,9 @@ #include "physics/share/physics_constants.hpp" -#include "ekat/mpi/ekat_comm.hpp" -#include "ekat/logging/ekat_logger.hpp" -#include "ekat/util/ekat_math_utils.hpp" +#include +#include +#include #include "Kokkos_Random.hpp" diff --git a/components/eamxx/src/physics/rrtmgp/eamxx_rrtmgp_process_interface.cpp b/components/eamxx/src/physics/rrtmgp/eamxx_rrtmgp_process_interface.cpp index 9801c6d6201c..ef8e586ae307 100644 --- a/components/eamxx/src/physics/rrtmgp/eamxx_rrtmgp_process_interface.cpp +++ b/components/eamxx/src/physics/rrtmgp/eamxx_rrtmgp_process_interface.cpp @@ -10,7 +10,7 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/util/eamxx_column_ops.hpp" -#include "ekat/ekat_assert.hpp" +#include #include "cpp/rrtmgp/mo_gas_concentrations.h" diff --git a/components/eamxx/src/physics/rrtmgp/eamxx_rrtmgp_process_interface.hpp b/components/eamxx/src/physics/rrtmgp/eamxx_rrtmgp_process_interface.hpp index 674000223a99..f22e4c32c248 100644 --- a/components/eamxx/src/physics/rrtmgp/eamxx_rrtmgp_process_interface.hpp +++ b/components/eamxx/src/physics/rrtmgp/eamxx_rrtmgp_process_interface.hpp @@ -4,8 +4,10 @@ #include "cpp/rrtmgp/mo_gas_concentrations.h" #include "physics/rrtmgp/eamxx_rrtmgp_interface.hpp" #include "share/atm_process/atmosphere_process.hpp" -#include "ekat/ekat_parameter_list.hpp" -#include "ekat/util/ekat_string_utils.hpp" + +#include +#include + #include namespace scream { diff --git a/components/eamxx/src/physics/rrtmgp/tests/generate_baseline.cpp b/components/eamxx/src/physics/rrtmgp/tests/generate_baseline.cpp index 6b58b27c7249..a482a0d0eacb 100644 --- a/components/eamxx/src/physics/rrtmgp/tests/generate_baseline.cpp +++ b/components/eamxx/src/physics/rrtmgp/tests/generate_baseline.cpp @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include diff --git a/components/eamxx/src/physics/rrtmgp/tests/rrtmgp_tests.cpp b/components/eamxx/src/physics/rrtmgp/tests/rrtmgp_tests.cpp index 811a3bc61ddf..5f3786ddca11 100644 --- a/components/eamxx/src/physics/rrtmgp/tests/rrtmgp_tests.cpp +++ b/components/eamxx/src/physics/rrtmgp/tests/rrtmgp_tests.cpp @@ -7,7 +7,7 @@ #include "cpp/rrtmgp/mo_gas_concentrations.h" #include "examples/all-sky/mo_garand_atmos_io.h" -#include "ekat/util/ekat_test_utils.hpp" +#include #include #include diff --git a/components/eamxx/src/physics/share/eamxx_trcmix.cpp b/components/eamxx/src/physics/share/eamxx_trcmix.cpp index 3daf7c26d6b7..75461f9f39bf 100644 --- a/components/eamxx/src/physics/share/eamxx_trcmix.cpp +++ b/components/eamxx/src/physics/share/eamxx_trcmix.cpp @@ -1,8 +1,8 @@ #include "eamxx_trcmix.hpp" #include "physics_constants.hpp" -#include "ekat/util/ekat_math_utils.hpp" #include "ekat/kokkos/ekat_kokkos_utils.hpp" +#include #include diff --git a/components/eamxx/src/physics/share/physics_constants.hpp b/components/eamxx/src/physics/share/physics_constants.hpp index a02005e3497f..f9ff800be240 100644 --- a/components/eamxx/src/physics/share/physics_constants.hpp +++ b/components/eamxx/src/physics/share/physics_constants.hpp @@ -3,9 +3,7 @@ #include "share/eamxx_types.hpp" -#include "ekat/util/ekat_string_utils.hpp" -#include "ekat/ekat_scalar_traits.hpp" -#include "ekat/logging/ekat_logger.hpp" +#include #include diff --git a/components/eamxx/src/physics/share/physics_functions.hpp b/components/eamxx/src/physics/share/physics_functions.hpp index 73853a1f4e93..d9620266d020 100644 --- a/components/eamxx/src/physics/share/physics_functions.hpp +++ b/components/eamxx/src/physics/share/physics_functions.hpp @@ -5,8 +5,8 @@ #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack_kokkos.hpp" -#include "ekat/ekat_workspace.hpp" +#include +#include namespace scream { namespace physics { diff --git a/components/eamxx/src/physics/share/physics_share.cpp b/components/eamxx/src/physics/share/physics_share.cpp index ba5b3ab6c713..146344a14a43 100644 --- a/components/eamxx/src/physics/share/physics_share.cpp +++ b/components/eamxx/src/physics/share/physics_share.cpp @@ -1,8 +1,6 @@ #include "physics_share.hpp" -#include "ekat/ekat_assert.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" -#include "ekat/ekat_pack_kokkos.hpp" +#include #include diff --git a/components/eamxx/src/physics/share/physics_test_data.cpp b/components/eamxx/src/physics/share/physics_test_data.cpp index 163740d188bd..dde577f3261c 100644 --- a/components/eamxx/src/physics/share/physics_test_data.cpp +++ b/components/eamxx/src/physics/share/physics_test_data.cpp @@ -1,8 +1,6 @@ #include "physics_test_data.hpp" -#include "ekat/ekat_assert.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" -#include "ekat/ekat_pack_kokkos.hpp" +#include namespace scream { diff --git a/components/eamxx/src/physics/share/physics_test_data.hpp b/components/eamxx/src/physics/share/physics_test_data.hpp index 92f5c0193808..4a53210a454a 100644 --- a/components/eamxx/src/physics/share/physics_test_data.hpp +++ b/components/eamxx/src/physics/share/physics_test_data.hpp @@ -6,9 +6,9 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/util/ekat_math_utils.hpp" -#include "ekat/ekat_assert.hpp" -#include "ekat/util/ekat_test_utils.hpp" +#include +#include +#include #include #include diff --git a/components/eamxx/src/physics/share/tests/physics_saturation_run_and_cmp.cpp b/components/eamxx/src/physics/share/tests/physics_saturation_run_and_cmp.cpp index bfb0fe21299b..13a4d394ecc2 100644 --- a/components/eamxx/src/physics/share/tests/physics_saturation_run_and_cmp.cpp +++ b/components/eamxx/src/physics/share/tests/physics_saturation_run_and_cmp.cpp @@ -9,9 +9,8 @@ #include "share/eamxx_session.hpp" #include "share/util/eamxx_utils.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_test_utils.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" +#include +#include #include #include diff --git a/components/eamxx/src/physics/share/tests/physics_test_data_unit_tests.cpp b/components/eamxx/src/physics/share/tests/physics_test_data_unit_tests.cpp index 3375844ec266..8541b043126b 100644 --- a/components/eamxx/src/physics/share/tests/physics_test_data_unit_tests.cpp +++ b/components/eamxx/src/physics/share/tests/physics_test_data_unit_tests.cpp @@ -3,7 +3,6 @@ #include "physics/share/physics_test_data.hpp" #include "share/eamxx_types.hpp" #include "physics_unit_tests_common.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "share/util/eamxx_setup_random_test.hpp" namespace scream { diff --git a/components/eamxx/src/physics/shoc/disp/shoc_assumed_pdf_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_assumed_pdf_disp.cpp index d4cdeef88829..7c3ec17be334 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_assumed_pdf_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_assumed_pdf_disp.cpp @@ -1,6 +1,6 @@ #include "shoc_functions.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include namespace scream { namespace shoc { diff --git a/components/eamxx/src/physics/shoc/disp/shoc_check_tke_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_check_tke_disp.cpp index b93ae598d1c7..917f2ce74166 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_check_tke_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_check_tke_disp.cpp @@ -1,6 +1,6 @@ #include "shoc_functions.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include namespace scream { namespace shoc { diff --git a/components/eamxx/src/physics/shoc/disp/shoc_compute_shoc_temperature_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_compute_shoc_temperature_disp.cpp index 22c5e918826e..0344a4dbce1c 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_compute_shoc_temperature_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_compute_shoc_temperature_disp.cpp @@ -1,6 +1,6 @@ #include "shoc_functions.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include namespace scream { namespace shoc { diff --git a/components/eamxx/src/physics/shoc/disp/shoc_compute_shoc_vapor_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_compute_shoc_vapor_disp.cpp index 1bf41ba20dd6..80d2d893e218 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_compute_shoc_vapor_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_compute_shoc_vapor_disp.cpp @@ -1,6 +1,6 @@ #include "shoc_functions.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include namespace scream { namespace shoc { diff --git a/components/eamxx/src/physics/shoc/disp/shoc_diag_obklen_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_diag_obklen_disp.cpp index ce25f1078790..fbb13b82dd7e 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_diag_obklen_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_diag_obklen_disp.cpp @@ -1,6 +1,6 @@ #include "shoc_functions.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include namespace scream { namespace shoc { diff --git a/components/eamxx/src/physics/shoc/disp/shoc_diag_second_shoc_moments_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_diag_second_shoc_moments_disp.cpp index 98410db99e25..77cc7f2bfb0e 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_diag_second_shoc_moments_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_diag_second_shoc_moments_disp.cpp @@ -1,6 +1,6 @@ #include "shoc_functions.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include namespace scream { namespace shoc { diff --git a/components/eamxx/src/physics/shoc/disp/shoc_diag_third_shoc_moments_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_diag_third_shoc_moments_disp.cpp index 048fac215c3f..1baf16e70373 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_diag_third_shoc_moments_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_diag_third_shoc_moments_disp.cpp @@ -1,6 +1,6 @@ #include "shoc_functions.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include namespace scream { namespace shoc { diff --git a/components/eamxx/src/physics/shoc/disp/shoc_energy_fixer_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_energy_fixer_disp.cpp index 78c8caa27038..359f113c733e 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_energy_fixer_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_energy_fixer_disp.cpp @@ -1,6 +1,6 @@ #include "shoc_functions.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include namespace scream { namespace shoc { diff --git a/components/eamxx/src/physics/shoc/disp/shoc_energy_integrals_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_energy_integrals_disp.cpp index 1e053bcd2119..fc5949fda315 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_energy_integrals_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_energy_integrals_disp.cpp @@ -1,6 +1,6 @@ #include "shoc_functions.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include namespace scream { namespace shoc { diff --git a/components/eamxx/src/physics/shoc/disp/shoc_grid_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_grid_disp.cpp index 6dea3e0fcd65..0c8d97a4bcf8 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_grid_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_grid_disp.cpp @@ -1,6 +1,6 @@ #include "shoc_functions.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include namespace scream { namespace shoc { diff --git a/components/eamxx/src/physics/shoc/disp/shoc_length_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_length_disp.cpp index 9dce33ca846b..26cc4e430f7b 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_length_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_length_disp.cpp @@ -1,6 +1,6 @@ #include "shoc_functions.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include namespace scream { namespace shoc { diff --git a/components/eamxx/src/physics/shoc/disp/shoc_pblintd_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_pblintd_disp.cpp index d0c17269f3dd..e0789473a3e7 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_pblintd_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_pblintd_disp.cpp @@ -1,6 +1,6 @@ #include "shoc_functions.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include namespace scream { namespace shoc { diff --git a/components/eamxx/src/physics/shoc/disp/shoc_tke_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_tke_disp.cpp index 240509b59d01..9aa61879e149 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_tke_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_tke_disp.cpp @@ -1,6 +1,6 @@ #include "shoc_functions.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include namespace scream { namespace shoc { diff --git a/components/eamxx/src/physics/shoc/disp/shoc_update_host_dse_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_update_host_dse_disp.cpp index 33ba48708ff9..84ba583f491c 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_update_host_dse_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_update_host_dse_disp.cpp @@ -1,6 +1,6 @@ #include "shoc_functions.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include namespace scream { namespace shoc { diff --git a/components/eamxx/src/physics/shoc/disp/shoc_update_prognostics_implicit_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_update_prognostics_implicit_disp.cpp index 1649ac1c401d..7da84f984bd4 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_update_prognostics_implicit_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_update_prognostics_implicit_disp.cpp @@ -1,6 +1,6 @@ #include "shoc_functions.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include namespace scream { namespace shoc { diff --git a/components/eamxx/src/physics/shoc/eamxx_shoc_process_interface.cpp b/components/eamxx/src/physics/shoc/eamxx_shoc_process_interface.cpp index e22209869e08..db83b9460c38 100644 --- a/components/eamxx/src/physics/shoc/eamxx_shoc_process_interface.cpp +++ b/components/eamxx/src/physics/shoc/eamxx_shoc_process_interface.cpp @@ -1,4 +1,3 @@ -#include "ekat/ekat_assert.hpp" #include "physics/shoc/eamxx_shoc_process_interface.hpp" #include "share/property_checks/field_lower_bound_check.hpp" @@ -6,6 +5,8 @@ #include "eamxx_config.h" // for SCREAM_CIME_BUILD +#include + namespace scream { diff --git a/components/eamxx/src/physics/shoc/eamxx_shoc_process_interface.hpp b/components/eamxx/src/physics/shoc/eamxx_shoc_process_interface.hpp index 2b7c737a864e..e7beb5de024a 100644 --- a/components/eamxx/src/physics/shoc/eamxx_shoc_process_interface.hpp +++ b/components/eamxx/src/physics/shoc/eamxx_shoc_process_interface.hpp @@ -2,11 +2,12 @@ #define SCREAM_SHOC_MACROPHYSICS_HPP #include "share/atm_process/atmosphere_process.hpp" -#include "ekat/ekat_parameter_list.hpp" #include "physics/shoc/shoc_functions.hpp" #include "share/util/eamxx_common_physics_functions.hpp" #include "share/atm_process/ATMBufferManager.hpp" +#include + #include namespace scream diff --git a/components/eamxx/src/physics/shoc/impl/shoc_main_impl.hpp b/components/eamxx/src/physics/shoc/impl/shoc_main_impl.hpp index c00ac82fded6..985038f74be0 100644 --- a/components/eamxx/src/physics/shoc/impl/shoc_main_impl.hpp +++ b/components/eamxx/src/physics/shoc/impl/shoc_main_impl.hpp @@ -3,7 +3,7 @@ #include "shoc_functions.hpp" // for ETI only but harmless for GPU -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include #include diff --git a/components/eamxx/src/physics/shoc/impl/shoc_tridiag_solver_impl.hpp b/components/eamxx/src/physics/shoc/impl/shoc_tridiag_solver_impl.hpp index abf814185da2..1ec45e481d70 100644 --- a/components/eamxx/src/physics/shoc/impl/shoc_tridiag_solver_impl.hpp +++ b/components/eamxx/src/physics/shoc/impl/shoc_tridiag_solver_impl.hpp @@ -2,7 +2,8 @@ #define SHOC_TRIDIAG_SOLVER_IMPL_HPP #include "shoc_functions.hpp" // for ETI only but harmless for GPU -#include "ekat/util/ekat_tridiag.hpp" + +#include namespace scream { namespace shoc { diff --git a/components/eamxx/src/physics/shoc/shoc_functions.hpp b/components/eamxx/src/physics/shoc/shoc_functions.hpp index 77abf3ceaf23..33b30e56d067 100644 --- a/components/eamxx/src/physics/shoc/shoc_functions.hpp +++ b/components/eamxx/src/physics/shoc/shoc_functions.hpp @@ -6,8 +6,8 @@ #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack_kokkos.hpp" -#include "ekat/ekat_workspace.hpp" +#include +#include namespace scream { namespace shoc { diff --git a/components/eamxx/src/physics/shoc/tests/infra/shoc_data.cpp b/components/eamxx/src/physics/shoc/tests/infra/shoc_data.cpp index 553a88f121b6..cfbb4471e0d4 100644 --- a/components/eamxx/src/physics/shoc/tests/infra/shoc_data.cpp +++ b/components/eamxx/src/physics/shoc/tests/infra/shoc_data.cpp @@ -1,8 +1,9 @@ #include "shoc_data.hpp" -#include "physics_constants.hpp" #include "shoc_ic_cases.hpp" -#include "ekat/ekat_assert.hpp" +#include "physics_constants.hpp" + +#include using scream::Real; using scream::Int; diff --git a/components/eamxx/src/physics/shoc/tests/infra/shoc_ic_cases.cpp b/components/eamxx/src/physics/shoc/tests/infra/shoc_ic_cases.cpp index 59e57f5591c5..e551ef3d8498 100644 --- a/components/eamxx/src/physics/shoc/tests/infra/shoc_ic_cases.cpp +++ b/components/eamxx/src/physics/shoc/tests/infra/shoc_ic_cases.cpp @@ -1,6 +1,7 @@ #include "shoc_ic_cases.hpp" #include "physics_constants.hpp" -#include "ekat/ekat_assert.hpp" + +#include namespace scream { namespace shoc { diff --git a/components/eamxx/src/physics/shoc/tests/infra/shoc_main_wrap.cpp b/components/eamxx/src/physics/shoc/tests/infra/shoc_main_wrap.cpp index 0266b1e6b4bb..f227f5bd0225 100644 --- a/components/eamxx/src/physics/shoc/tests/infra/shoc_main_wrap.cpp +++ b/components/eamxx/src/physics/shoc/tests/infra/shoc_main_wrap.cpp @@ -1,10 +1,10 @@ #include "shoc_main_wrap.hpp" #include "shoc_data.hpp" #include "shoc_test_data.hpp" -#include "physics_constants.hpp" #include "shoc_ic_cases.hpp" +#include "physics_constants.hpp" -#include "ekat/ekat_assert.hpp" +#include using scream::Real; using scream::Int; diff --git a/components/eamxx/src/physics/shoc/tests/infra/shoc_main_wrap.hpp b/components/eamxx/src/physics/shoc/tests/infra/shoc_main_wrap.hpp index d4e1f71fa3f4..20f6078d875a 100644 --- a/components/eamxx/src/physics/shoc/tests/infra/shoc_main_wrap.hpp +++ b/components/eamxx/src/physics/shoc/tests/infra/shoc_main_wrap.hpp @@ -12,7 +12,7 @@ namespace shoc { struct FortranData; // Run SHOC subroutines, populating inout and out fields of d. -ekat::Int shoc_main(FortranData& d); +int shoc_main(FortranData& d); // Test SHOC by running initial conditions for a number of steps and comparing // against reference data. If gen_plot_scripts is true, Python scripts are diff --git a/components/eamxx/src/physics/shoc/tests/infra/shoc_test_data.cpp b/components/eamxx/src/physics/shoc/tests/infra/shoc_test_data.cpp index b0089997aa53..20d36a069218 100644 --- a/components/eamxx/src/physics/shoc/tests/infra/shoc_test_data.cpp +++ b/components/eamxx/src/physics/shoc/tests/infra/shoc_test_data.cpp @@ -2,10 +2,9 @@ #include "shoc_data.hpp" -#include "ekat/ekat_assert.hpp" #include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/ekat_pack_kokkos.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include #include "share/util/eamxx_deep_copy.hpp" diff --git a/components/eamxx/src/physics/shoc/tests/infra/shoc_unit_tests_common.hpp b/components/eamxx/src/physics/shoc/tests/infra/shoc_unit_tests_common.hpp index e8b86f303912..aebb06b1de48 100644 --- a/components/eamxx/src/physics/shoc/tests/infra/shoc_unit_tests_common.hpp +++ b/components/eamxx/src/physics/shoc/tests/infra/shoc_unit_tests_common.hpp @@ -3,9 +3,7 @@ #include "shoc_functions.hpp" #include "share/eamxx_types.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/util/ekat_test_utils.hpp" #include "physics/share/physics_test_data.hpp" namespace scream { diff --git a/components/eamxx/src/physics/shoc/tests/shoc_assumed_pdf_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_assumed_pdf_tests.cpp index a821cee9237c..217a88a6f6b6 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_assumed_pdf_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_assumed_pdf_tests.cpp @@ -7,9 +7,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_brunt_length_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_brunt_length_tests.cpp index 9218461c4838..16035641c8e0 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_brunt_length_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_brunt_length_tests.cpp @@ -8,9 +8,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_check_length_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_check_length_tests.cpp index 0ca6882388f9..baf4b1de6dea 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_check_length_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_check_length_tests.cpp @@ -7,9 +7,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_check_tke_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_check_tke_tests.cpp index 745683b3222f..70727b177647 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_check_tke_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_check_tke_tests.cpp @@ -7,9 +7,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_clip_third_moms_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_clip_third_moms_tests.cpp index 5027ec16713b..63b9abdf668d 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_clip_third_moms_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_clip_third_moms_tests.cpp @@ -7,9 +7,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_compute_diag_third_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_compute_diag_third_tests.cpp index 8f01135a12e4..0021ecfc2949 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_compute_diag_third_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_compute_diag_third_tests.cpp @@ -7,9 +7,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_compute_shoc_temperature_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_compute_shoc_temperature_tests.cpp index e254c4ad9319..b51fe4ba4ded 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_compute_shoc_temperature_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_compute_shoc_temperature_tests.cpp @@ -7,9 +7,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_compute_shoc_vapor_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_compute_shoc_vapor_tests.cpp index ef79a84162eb..72288f6e233d 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_compute_shoc_vapor_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_compute_shoc_vapor_tests.cpp @@ -1,8 +1,6 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "shoc_functions.hpp" #include "shoc_test_data.hpp" #include "share/util/eamxx_setup_random_test.hpp" diff --git a/components/eamxx/src/physics/shoc/tests/shoc_diag_obklen_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_diag_obklen_tests.cpp index 0067ce0cfe2c..1ae753f12ef3 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_diag_obklen_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_diag_obklen_tests.cpp @@ -7,9 +7,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_diag_second_mom_srf_test.cpp b/components/eamxx/src/physics/shoc/tests/shoc_diag_second_mom_srf_test.cpp index 4e5f2fb4a3b5..fa6f33d39574 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_diag_second_mom_srf_test.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_diag_second_mom_srf_test.cpp @@ -8,9 +8,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_diag_second_mom_ubycond_test.cpp b/components/eamxx/src/physics/shoc/tests/shoc_diag_second_mom_ubycond_test.cpp index 0da46c0b246b..0c8c11037696 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_diag_second_mom_ubycond_test.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_diag_second_mom_ubycond_test.cpp @@ -8,9 +8,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" //#include "share/eamxx_types.hpp" #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_diag_second_moments_lbycond_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_diag_second_moments_lbycond_tests.cpp index 938b67e3457e..623a7252bcd3 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_diag_second_moments_lbycond_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_diag_second_moments_lbycond_tests.cpp @@ -1,8 +1,6 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "shoc_functions.hpp" #include "shoc_test_data.hpp" #include "share/util/eamxx_setup_random_test.hpp" diff --git a/components/eamxx/src/physics/shoc/tests/shoc_diag_second_moments_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_diag_second_moments_tests.cpp index c219ce7155d6..88882380aa8e 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_diag_second_moments_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_diag_second_moments_tests.cpp @@ -1,8 +1,6 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "shoc_functions.hpp" #include "shoc_test_data.hpp" #include "share/util/eamxx_setup_random_test.hpp" diff --git a/components/eamxx/src/physics/shoc/tests/shoc_diag_second_shoc_moments_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_diag_second_shoc_moments_tests.cpp index b62eb28b14c2..6c1dcac2ad0a 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_diag_second_shoc_moments_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_diag_second_shoc_moments_tests.cpp @@ -1,8 +1,6 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "shoc_functions.hpp" #include "shoc_test_data.hpp" #include "share/util/eamxx_setup_random_test.hpp" diff --git a/components/eamxx/src/physics/shoc/tests/shoc_diag_third_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_diag_third_tests.cpp index 4f59c6429e1a..4a9103256642 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_diag_third_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_diag_third_tests.cpp @@ -7,10 +7,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" - #include #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_eddy_diffusivities_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_eddy_diffusivities_tests.cpp index e60e08c05d99..1a2058a54aae 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_eddy_diffusivities_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_eddy_diffusivities_tests.cpp @@ -7,9 +7,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_energy_fixer_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_energy_fixer_tests.cpp index eff81fae1a0a..0035fbc0d7cb 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_energy_fixer_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_energy_fixer_tests.cpp @@ -9,9 +9,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_energy_integral_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_energy_integral_tests.cpp index 585f74fe5497..ee954f90ec68 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_energy_integral_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_energy_integral_tests.cpp @@ -8,9 +8,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_energy_update_dse_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_energy_update_dse_tests.cpp index 2845712542d4..9e39d24918ce 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_energy_update_dse_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_energy_update_dse_tests.cpp @@ -8,9 +8,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_grid_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_grid_tests.cpp index 7f98bac1e123..7dc0150a6a10 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_grid_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_grid_tests.cpp @@ -9,9 +9,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_impli_comp_tmpi_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_impli_comp_tmpi_tests.cpp index 300f2fe85967..1206dfbed2a0 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_impli_comp_tmpi_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_impli_comp_tmpi_tests.cpp @@ -7,9 +7,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_impli_dp_inverse_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_impli_dp_inverse_tests.cpp index 5e8c4941a0a8..4f3de0c0b717 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_impli_dp_inverse_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_impli_dp_inverse_tests.cpp @@ -7,9 +7,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_l_inf_length_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_l_inf_length_tests.cpp index c1501addbc7c..a03a04568bbd 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_l_inf_length_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_l_inf_length_tests.cpp @@ -7,9 +7,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" -#include "ekat/util/ekat_arch.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_length_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_length_tests.cpp index f38f5e4b1dff..8032b0127f7e 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_length_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_length_tests.cpp @@ -7,9 +7,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_linear_interp_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_linear_interp_tests.cpp index 084eaa95e362..267d1e94327c 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_linear_interp_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_linear_interp_tests.cpp @@ -8,9 +8,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_main_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_main_tests.cpp index 220d284d4afa..bf7fdaae1536 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_main_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_main_tests.cpp @@ -1,8 +1,6 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "shoc_functions.hpp" #include "shoc_test_data.hpp" #include "share/util/eamxx_setup_random_test.hpp" diff --git a/components/eamxx/src/physics/shoc/tests/shoc_mix_length_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_mix_length_tests.cpp index 22989b0b86aa..d82d9894328c 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_mix_length_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_mix_length_tests.cpp @@ -7,9 +7,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_pblintd_check_pblh_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_pblintd_check_pblh_tests.cpp index 9962df6cd48d..9ecd4a037d01 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_pblintd_check_pblh_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_pblintd_check_pblh_tests.cpp @@ -1,8 +1,6 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "shoc_functions.hpp" #include "shoc_test_data.hpp" #include "share/util/eamxx_setup_random_test.hpp" diff --git a/components/eamxx/src/physics/shoc/tests/shoc_pblintd_cldcheck_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_pblintd_cldcheck_tests.cpp index 746685617a7d..e1e394e214b5 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_pblintd_cldcheck_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_pblintd_cldcheck_tests.cpp @@ -8,10 +8,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" - #include #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_pblintd_height_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_pblintd_height_tests.cpp index 382a26046457..63a529e588c1 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_pblintd_height_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_pblintd_height_tests.cpp @@ -1,8 +1,6 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "shoc_functions.hpp" #include "shoc_test_data.hpp" #include "share/util/eamxx_setup_random_test.hpp" diff --git a/components/eamxx/src/physics/shoc/tests/shoc_pblintd_init_pot_test.cpp b/components/eamxx/src/physics/shoc/tests/shoc_pblintd_init_pot_test.cpp index a6e6f19f63a3..b73339b102fe 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_pblintd_init_pot_test.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_pblintd_init_pot_test.cpp @@ -8,9 +8,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_pblintd_surf_temp_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_pblintd_surf_temp_tests.cpp index 833d0c40fbbb..2c56b71618ec 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_pblintd_surf_temp_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_pblintd_surf_temp_tests.cpp @@ -1,8 +1,6 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "shoc_functions.hpp" #include "shoc_test_data.hpp" #include "share/util/eamxx_setup_random_test.hpp" diff --git a/components/eamxx/src/physics/shoc/tests/shoc_pblintd_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_pblintd_tests.cpp index 4f0772620728..973bd8ad193f 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_pblintd_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_pblintd_tests.cpp @@ -1,8 +1,6 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "shoc_functions.hpp" #include "shoc_test_data.hpp" #include "share/util/eamxx_setup_random_test.hpp" diff --git a/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_buoyflux_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_buoyflux_tests.cpp index d1a6f119aa09..d068988b55ba 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_buoyflux_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_buoyflux_tests.cpp @@ -6,9 +6,6 @@ #include "physics/share/physics_constants.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_cloudvar_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_cloudvar_tests.cpp index 75e68bfc5d58..647d741737ee 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_cloudvar_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_cloudvar_tests.cpp @@ -6,9 +6,6 @@ #include "physics/share/physics_constants.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_liqflux_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_liqflux_tests.cpp index 8155c30d7e92..8bcd59cb0dc9 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_liqflux_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_liqflux_tests.cpp @@ -6,9 +6,6 @@ #include "physics/share/physics_constants.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_qs_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_qs_tests.cpp index b13fd4027040..66aace1e2926 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_qs_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_qs_tests.cpp @@ -6,9 +6,6 @@ #include "physics/share/physics_constants.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_s_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_s_tests.cpp index ecdbfca52d33..1983aeecbf9c 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_s_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_s_tests.cpp @@ -6,9 +6,6 @@ #include "physics/share/physics_constants.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_sgsliq_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_sgsliq_tests.cpp index cf40400dda57..f47cc7a83d13 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_sgsliq_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_pdf_compute_sgsliq_tests.cpp @@ -6,9 +6,6 @@ #include "physics/share/physics_constants.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_pdf_computetemp_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_pdf_computetemp_tests.cpp index 2b881423b25e..9d6513ce936c 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_pdf_computetemp_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_pdf_computetemp_tests.cpp @@ -6,9 +6,6 @@ #include "physics/share/physics_constants.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_pdf_inplume_corr_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_pdf_inplume_corr_tests.cpp index e08c111a1210..bd2809f86eef 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_pdf_inplume_corr_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_pdf_inplume_corr_tests.cpp @@ -6,9 +6,6 @@ #include "physics/share/physics_constants.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_pdf_qw_parameters_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_pdf_qw_parameters_tests.cpp index 1e7e25419e5c..6b3385c2f86f 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_pdf_qw_parameters_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_pdf_qw_parameters_tests.cpp @@ -6,9 +6,6 @@ #include "physics/share/physics_constants.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_pdf_thl_parameters_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_pdf_thl_parameters_tests.cpp index a595c40be539..32af7d7049d3 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_pdf_thl_parameters_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_pdf_thl_parameters_tests.cpp @@ -6,9 +6,6 @@ #include "physics/share/physics_constants.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_pdf_tildetoreal_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_pdf_tildetoreal_tests.cpp index 38ec2e9123e7..8ed811192af2 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_pdf_tildetoreal_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_pdf_tildetoreal_tests.cpp @@ -6,9 +6,6 @@ #include "physics/share/physics_constants.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_pdf_vv_parameters_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_pdf_vv_parameters_tests.cpp index 546a7a6c952b..fd18d3f05fdb 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_pdf_vv_parameters_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_pdf_vv_parameters_tests.cpp @@ -6,9 +6,6 @@ #include "physics/share/physics_constants.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_run_and_cmp.cpp b/components/eamxx/src/physics/shoc/tests/shoc_run_and_cmp.cpp index 0912429656e7..6a24a2cfe8d5 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_run_and_cmp.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_run_and_cmp.cpp @@ -6,8 +6,6 @@ #include "share/eamxx_session.hpp" #include "share/util/eamxx_utils.hpp" -#include "ekat/util/ekat_test_utils.hpp" -#include "ekat/ekat_assert.hpp" #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_tests.cpp index 1884c0e34587..720771d2ee81 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_tests.cpp @@ -3,8 +3,6 @@ #include "shoc_main_wrap.hpp" #include "shoc_ic_cases.hpp" -#include "ekat/util/ekat_test_utils.hpp" - namespace { TEST_CASE("FortranData", "shoc") { diff --git a/components/eamxx/src/physics/shoc/tests/shoc_tke_adv_sgs_tke_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_tke_adv_sgs_tke_tests.cpp index 91b73b285eff..6f63e7f7e0fb 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_tke_adv_sgs_tke_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_tke_adv_sgs_tke_tests.cpp @@ -7,9 +7,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_tke_column_stab_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_tke_column_stab_tests.cpp index bccc93015968..c7573af4702b 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_tke_column_stab_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_tke_column_stab_tests.cpp @@ -7,9 +7,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_tke_isotropic_ts_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_tke_isotropic_ts_tests.cpp index 9fddc5367c7a..2b4febc00450 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_tke_isotropic_ts_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_tke_isotropic_ts_tests.cpp @@ -7,9 +7,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_tke_shr_prod_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_tke_shr_prod_tests.cpp index c64ff4663f30..530cf602220b 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_tke_shr_prod_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_tke_shr_prod_tests.cpp @@ -7,9 +7,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_tke_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_tke_tests.cpp index 57849632c786..d9352ad0847c 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_tke_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_tke_tests.cpp @@ -7,9 +7,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_unit_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_unit_tests.cpp index fdde2658e769..0f746ab9acdb 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_unit_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_unit_tests.cpp @@ -7,9 +7,6 @@ #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" -#include "ekat/util/ekat_arch.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_update_prognostics_implicit_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_update_prognostics_implicit_tests.cpp index dff3486b12f5..ca84b62878f1 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_update_prognostics_implicit_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_update_prognostics_implicit_tests.cpp @@ -1,8 +1,6 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "shoc_functions.hpp" #include "shoc_test_data.hpp" #include "share/util/eamxx_setup_random_test.hpp" diff --git a/components/eamxx/src/physics/shoc/tests/shoc_varorcovar_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_varorcovar_tests.cpp index 8ee9250adf8f..1d0da812a4eb 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_varorcovar_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_varorcovar_tests.cpp @@ -9,9 +9,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/shoc/tests/shoc_vd_shoc_decomp_and_solve_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_vd_shoc_decomp_and_solve_tests.cpp index 4b220b290ec6..ab73d903de06 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_vd_shoc_decomp_and_solve_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_vd_shoc_decomp_and_solve_tests.cpp @@ -1,8 +1,6 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "shoc_functions.hpp" #include "shoc_test_data.hpp" #include "share/util/eamxx_setup_random_test.hpp" diff --git a/components/eamxx/src/physics/shoc/tests/shoc_vertflux_tests.cpp b/components/eamxx/src/physics/shoc/tests/shoc_vertflux_tests.cpp index 190c08c57614..28af24a66fd7 100644 --- a/components/eamxx/src/physics/shoc/tests/shoc_vertflux_tests.cpp +++ b/components/eamxx/src/physics/shoc/tests/shoc_vertflux_tests.cpp @@ -7,9 +7,6 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include diff --git a/components/eamxx/src/physics/spa/eamxx_spa_process_interface.cpp b/components/eamxx/src/physics/spa/eamxx_spa_process_interface.cpp index aa97a011c50d..6704e512e04a 100644 --- a/components/eamxx/src/physics/spa/eamxx_spa_process_interface.cpp +++ b/components/eamxx/src/physics/spa/eamxx_spa_process_interface.cpp @@ -4,8 +4,8 @@ #include "share/io/eamxx_scorpio_interface.hpp" #include "share/property_checks/field_within_interval_check.hpp" -#include -#include +#include +#include namespace scream { diff --git a/components/eamxx/src/physics/tms/eamxx_tms_process_interface.cpp b/components/eamxx/src/physics/tms/eamxx_tms_process_interface.cpp index 20fea6e8cb9b..787c2acebdd1 100644 --- a/components/eamxx/src/physics/tms/eamxx_tms_process_interface.cpp +++ b/components/eamxx/src/physics/tms/eamxx_tms_process_interface.cpp @@ -2,8 +2,8 @@ #include "physics/tms/tms_functions.hpp" -#include "ekat/ekat_assert.hpp" -#include "ekat/util/ekat_units.hpp" +#include +#include #include diff --git a/components/eamxx/src/physics/tms/eamxx_tms_process_interface.hpp b/components/eamxx/src/physics/tms/eamxx_tms_process_interface.hpp index 589b392a972f..757f1fe5c280 100644 --- a/components/eamxx/src/physics/tms/eamxx_tms_process_interface.hpp +++ b/components/eamxx/src/physics/tms/eamxx_tms_process_interface.hpp @@ -4,7 +4,8 @@ #include "physics/tms/tms_functions.hpp" #include "share/atm_process/atmosphere_process.hpp" #include "share/util/eamxx_common_physics_functions.hpp" -#include "ekat/ekat_parameter_list.hpp" + +#include #include diff --git a/components/eamxx/src/physics/tms/tests/compute_tms_tests.cpp b/components/eamxx/src/physics/tms/tests/compute_tms_tests.cpp index d22352b4e255..4c6254023180 100644 --- a/components/eamxx/src/physics/tms/tests/compute_tms_tests.cpp +++ b/components/eamxx/src/physics/tms/tests/compute_tms_tests.cpp @@ -1,13 +1,11 @@ #include "catch2/catch.hpp" #include "tms_unit_tests_common.hpp" - -#include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "tms_functions.hpp" #include "tms_test_data.hpp" + #include "share/util/eamxx_setup_random_test.hpp" +#include "share/eamxx_types.hpp" namespace scream { namespace tms { diff --git a/components/eamxx/src/physics/tms/tests/infra/tms_test_data.cpp b/components/eamxx/src/physics/tms/tests/infra/tms_test_data.cpp index 67227fb95db2..2af5d85bfc2f 100644 --- a/components/eamxx/src/physics/tms/tests/infra/tms_test_data.cpp +++ b/components/eamxx/src/physics/tms/tests/infra/tms_test_data.cpp @@ -1,9 +1,6 @@ #include "tms_test_data.hpp" -#include "ekat/ekat_assert.hpp" #include "ekat/kokkos/ekat_kokkos_utils.hpp" -#include "ekat/ekat_pack_kokkos.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" #include "share/util/eamxx_deep_copy.hpp" diff --git a/components/eamxx/src/physics/tms/tests/infra/tms_unit_tests_common.hpp b/components/eamxx/src/physics/tms/tests/infra/tms_unit_tests_common.hpp index 8377e8e57bde..ec24f8bb6605 100644 --- a/components/eamxx/src/physics/tms/tests/infra/tms_unit_tests_common.hpp +++ b/components/eamxx/src/physics/tms/tests/infra/tms_unit_tests_common.hpp @@ -3,7 +3,6 @@ #include "tms_functions.hpp" #include "share/eamxx_types.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "physics/share/physics_test_data.hpp" namespace scream { diff --git a/components/eamxx/src/physics/tms/tms_functions.hpp b/components/eamxx/src/physics/tms/tms_functions.hpp index 767fbb66dc4b..b373eddd7934 100644 --- a/components/eamxx/src/physics/tms/tms_functions.hpp +++ b/components/eamxx/src/physics/tms/tms_functions.hpp @@ -5,9 +5,9 @@ #include "share/eamxx_types.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" -#include "ekat/ekat_pack_kokkos.hpp" -#include "ekat/ekat_workspace.hpp" +#include +#include +#include namespace scream { namespace tms { diff --git a/components/eamxx/src/physics/zm/eamxx_zm_process_interface.cpp b/components/eamxx/src/physics/zm/eamxx_zm_process_interface.cpp index 1abe6a5bf064..f5773d38bb6a 100644 --- a/components/eamxx/src/physics/zm/eamxx_zm_process_interface.cpp +++ b/components/eamxx/src/physics/zm/eamxx_zm_process_interface.cpp @@ -1,12 +1,13 @@ #include "eamxx_config.h" -#include "ekat/ekat_assert.hpp" #include "share/property_checks/field_lower_bound_check.hpp" #include "share/property_checks/field_within_interval_check.hpp" #include "eamxx_zm_process_interface.hpp" #include "physics/share/physics_constants.hpp" +#include + namespace scream { diff --git a/components/eamxx/src/physics/zm/eamxx_zm_process_interface.hpp b/components/eamxx/src/physics/zm/eamxx_zm_process_interface.hpp index 24e5182e4d7d..447df0471f1c 100644 --- a/components/eamxx/src/physics/zm/eamxx_zm_process_interface.hpp +++ b/components/eamxx/src/physics/zm/eamxx_zm_process_interface.hpp @@ -2,9 +2,10 @@ #define EAMXX_ZM_PROCESS_INTERFACE_HPP #include "share/atm_process/atmosphere_process.hpp" -#include "ekat/ekat_parameter_list.hpp" #include "physics/zm/zm_functions.hpp" +#include + namespace scream { diff --git a/components/eamxx/src/physics/zm/tests/infra/zm_test_data.cpp b/components/eamxx/src/physics/zm/tests/infra/zm_test_data.cpp index 900475cd97d7..1d87c8110169 100644 --- a/components/eamxx/src/physics/zm/tests/infra/zm_test_data.cpp +++ b/components/eamxx/src/physics/zm/tests/infra/zm_test_data.cpp @@ -1,9 +1,6 @@ #include "zm_test_data.hpp" -#include "ekat/kokkos/ekat_kokkos_types.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" -#include "ekat/ekat_pack_kokkos.hpp" -#include "ekat/ekat_assert.hpp" +#include #include diff --git a/components/eamxx/src/physics/zm/tests/infra/zm_unit_tests_common.hpp b/components/eamxx/src/physics/zm/tests/infra/zm_unit_tests_common.hpp index ca03e26ccc7e..c903c1a6a0f8 100644 --- a/components/eamxx/src/physics/zm/tests/infra/zm_unit_tests_common.hpp +++ b/components/eamxx/src/physics/zm/tests/infra/zm_unit_tests_common.hpp @@ -4,9 +4,10 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" #include "zm_functions.hpp" -#include "ekat/util/ekat_test_utils.hpp" #include "zm_test_data.hpp" +#include + #include #include diff --git a/components/eamxx/src/physics/zm/tests/zm_test_find_mse_max.cpp b/components/eamxx/src/physics/zm/tests/zm_test_find_mse_max.cpp index c72202e2bb69..387143f0a378 100644 --- a/components/eamxx/src/physics/zm/tests/zm_test_find_mse_max.cpp +++ b/components/eamxx/src/physics/zm/tests/zm_test_find_mse_max.cpp @@ -1,14 +1,14 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "physics/zm/zm_functions.hpp" #include "physics/zm/tests/infra/zm_test_data.hpp" #include "physics/zm/tests/infra/zm_test_data_functions.hpp" #include "zm_unit_tests_common.hpp" +#include + namespace scream { namespace zm { namespace unit_test { diff --git a/components/eamxx/src/physics/zm/zm_functions.hpp b/components/eamxx/src/physics/zm/zm_functions.hpp index 9187c60edd7c..39508525e5b3 100644 --- a/components/eamxx/src/physics/zm/zm_functions.hpp +++ b/components/eamxx/src/physics/zm/zm_functions.hpp @@ -5,8 +5,8 @@ #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack_kokkos.hpp" -#include "ekat/ekat_workspace.hpp" +#include +#include namespace scream { namespace zm { diff --git a/components/eamxx/src/python/libpyeamxx/pyatmproc.hpp b/components/eamxx/src/python/libpyeamxx/pyatmproc.hpp index b17a7b87b464..2c562a6b21ee 100644 --- a/components/eamxx/src/python/libpyeamxx/pyatmproc.hpp +++ b/components/eamxx/src/python/libpyeamxx/pyatmproc.hpp @@ -10,7 +10,7 @@ #include "pyparamlist.hpp" #include "pyeamxx_ext.hpp" -#include +#include #include #include diff --git a/components/eamxx/src/python/libpyeamxx/pyeamxx_ext.cpp b/components/eamxx/src/python/libpyeamxx/pyeamxx_ext.cpp index 16288392fa43..3c2c1f06959c 100644 --- a/components/eamxx/src/python/libpyeamxx/pyeamxx_ext.cpp +++ b/components/eamxx/src/python/libpyeamxx/pyeamxx_ext.cpp @@ -5,7 +5,7 @@ #include "pyparamlist.hpp" #include "pyutils.hpp" -#include +#include #include diff --git a/components/eamxx/src/python/libpyeamxx/pyeamxx_ext.hpp b/components/eamxx/src/python/libpyeamxx/pyeamxx_ext.hpp index 781c195919dd..5cd6ec5ceadc 100644 --- a/components/eamxx/src/python/libpyeamxx/pyeamxx_ext.hpp +++ b/components/eamxx/src/python/libpyeamxx/pyeamxx_ext.hpp @@ -7,7 +7,7 @@ #include "share/grid/grids_manager.hpp" -#include +#include namespace scream { diff --git a/components/eamxx/src/python/libpyeamxx/pyparamlist.hpp b/components/eamxx/src/python/libpyeamxx/pyparamlist.hpp index 8da57a24bd35..e1e6d201c42e 100644 --- a/components/eamxx/src/python/libpyeamxx/pyparamlist.hpp +++ b/components/eamxx/src/python/libpyeamxx/pyparamlist.hpp @@ -1,7 +1,7 @@ #ifndef PYPARAMLIST_HPP #define PYPARAMLIST_HPP -#include +#include #include #include diff --git a/components/eamxx/src/share/atm_process/ATMBufferManager.hpp b/components/eamxx/src/share/atm_process/ATMBufferManager.hpp index c5e8ea7554e0..c48ba3998dab 100644 --- a/components/eamxx/src/share/atm_process/ATMBufferManager.hpp +++ b/components/eamxx/src/share/atm_process/ATMBufferManager.hpp @@ -2,7 +2,8 @@ #define SCREAM_ATM_BUFFERS_MANAGER_HPP #include "share/eamxx_types.hpp" -#include "ekat/ekat_assert.hpp" + +#include namespace scream { diff --git a/components/eamxx/src/share/atm_process/IOPDataManager.cpp b/components/eamxx/src/share/atm_process/IOPDataManager.cpp index 52dbffe7ebd5..6a923741f8b8 100644 --- a/components/eamxx/src/share/atm_process/IOPDataManager.cpp +++ b/components/eamxx/src/share/atm_process/IOPDataManager.cpp @@ -4,8 +4,8 @@ #include "share/io/eamxx_scorpio_interface.hpp" #include "share/atm_process/IOPDataManager.hpp" -#include "ekat/ekat_assert.hpp" -#include "ekat/util/ekat_lin_interp.hpp" +#include +#include #include diff --git a/components/eamxx/src/share/atm_process/IOPDataManager.hpp b/components/eamxx/src/share/atm_process/IOPDataManager.hpp index 9ba67ca12647..7a439550ed59 100644 --- a/components/eamxx/src/share/atm_process/IOPDataManager.hpp +++ b/components/eamxx/src/share/atm_process/IOPDataManager.hpp @@ -7,10 +7,10 @@ #include "share/grid/remap/abstract_remapper.hpp" #include "share/util/eamxx_time_stamp.hpp" -#include "ekat/ekat_parameter_list.hpp" #include "ekat/ekat_pack.hpp" -#include "ekat/mpi/ekat_comm.hpp" #include "ekat/kokkos/ekat_kokkos_utils.hpp" +#include +#include namespace scream { namespace control { diff --git a/components/eamxx/src/share/atm_process/SCDataManager.hpp b/components/eamxx/src/share/atm_process/SCDataManager.hpp index 6d73030d66e6..709656d184ed 100644 --- a/components/eamxx/src/share/atm_process/SCDataManager.hpp +++ b/components/eamxx/src/share/atm_process/SCDataManager.hpp @@ -2,7 +2,8 @@ #define SCREAM_SC_DATA_MANAGER_HPP #include "share/eamxx_types.hpp" -#include "ekat/ekat_assert.hpp" + +#include namespace scream { diff --git a/components/eamxx/src/share/atm_process/atmosphere_process.cpp b/components/eamxx/src/share/atm_process/atmosphere_process.cpp index f7f615e0347e..1594f45d535b 100644 --- a/components/eamxx/src/share/atm_process/atmosphere_process.cpp +++ b/components/eamxx/src/share/atm_process/atmosphere_process.cpp @@ -11,7 +11,7 @@ namespace py = pybind11; #endif -#include "ekat/ekat_assert.hpp" +#include #include #include diff --git a/components/eamxx/src/share/atm_process/atmosphere_process.hpp b/components/eamxx/src/share/atm_process/atmosphere_process.hpp index 937585f184b0..74a05fbfe15a 100644 --- a/components/eamxx/src/share/atm_process/atmosphere_process.hpp +++ b/components/eamxx/src/share/atm_process/atmosphere_process.hpp @@ -13,13 +13,13 @@ #include "share/field/field_group.hpp" #include "share/grid/grids_manager.hpp" -#include "ekat/mpi/ekat_comm.hpp" -#include "ekat/ekat_parameter_list.hpp" -#include "ekat/util/ekat_factory.hpp" -#include "ekat/util/ekat_string_utils.hpp" -#include "ekat/std_meta/ekat_std_enable_shared_from_this.hpp" -#include "ekat/std_meta/ekat_std_any.hpp" -#include "ekat/logging/ekat_logger.hpp" +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/components/eamxx/src/share/atm_process/atmosphere_process_dag.hpp b/components/eamxx/src/share/atm_process/atmosphere_process_dag.hpp index 52a0f9d8cd96..52f74867b79e 100644 --- a/components/eamxx/src/share/atm_process/atmosphere_process_dag.hpp +++ b/components/eamxx/src/share/atm_process/atmosphere_process_dag.hpp @@ -1,11 +1,12 @@ #ifndef SCREAM_ATMOSPHERE_PROCESS_DAG_HPP #define SCREAM_ATMOSPHERE_PROCESS_DAG_HPP -#include -#include #include "share/atm_process/atmosphere_process_group.hpp" #include "share/field/field_group.hpp" +#include +#include + namespace scream { class AtmProcDAG { diff --git a/components/eamxx/src/share/atm_process/atmosphere_process_group.cpp b/components/eamxx/src/share/atm_process/atmosphere_process_group.cpp index abc9f0d93753..9402c70c63fd 100644 --- a/components/eamxx/src/share/atm_process/atmosphere_process_group.cpp +++ b/components/eamxx/src/share/atm_process/atmosphere_process_group.cpp @@ -3,8 +3,8 @@ #include "share/property_checks/field_nan_check.hpp" -#include "ekat/std_meta/ekat_std_utils.hpp" -#include "ekat/util/ekat_string_utils.hpp" +#include +#include #include diff --git a/components/eamxx/src/share/atm_process/atmosphere_process_group.hpp b/components/eamxx/src/share/atm_process/atmosphere_process_group.hpp index 3d7dfab35252..9f049474c5c0 100644 --- a/components/eamxx/src/share/atm_process/atmosphere_process_group.hpp +++ b/components/eamxx/src/share/atm_process/atmosphere_process_group.hpp @@ -5,7 +5,7 @@ #include "share/property_checks/mass_and_energy_column_conservation_check.hpp" #include "control/surface_coupling_utils.hpp" -#include "ekat/ekat_parameter_list.hpp" +#include #include #include diff --git a/components/eamxx/src/share/atm_process/atmosphere_process_hash.cpp b/components/eamxx/src/share/atm_process/atmosphere_process_hash.cpp index f39d78d0ebda..ef5943e49934 100644 --- a/components/eamxx/src/share/atm_process/atmosphere_process_hash.cpp +++ b/components/eamxx/src/share/atm_process/atmosphere_process_hash.cpp @@ -2,7 +2,8 @@ #include "share/field/field_utils.hpp" #include "share/util/eamxx_array_utils.hpp" #include "share/util/eamxx_bfbhash.hpp" -#include "ekat/ekat_assert.hpp" + +#include #include #include diff --git a/components/eamxx/src/share/atm_process/atmosphere_process_utils.hpp b/components/eamxx/src/share/atm_process/atmosphere_process_utils.hpp index 7ffa759a3423..e1c78104e672 100644 --- a/components/eamxx/src/share/atm_process/atmosphere_process_utils.hpp +++ b/components/eamxx/src/share/atm_process/atmosphere_process_utils.hpp @@ -1,7 +1,7 @@ #ifndef SCREAM_ATMOSPHERE_PROCESS_UTILS_HPP #define SCREAM_ATMOSPHERE_PROCESS_UTILS_HPP -#include "ekat/ekat_assert.hpp" +#include #include diff --git a/components/eamxx/src/share/eamxx_pysession.cpp b/components/eamxx/src/share/eamxx_pysession.cpp index 8ac469cd52e4..40012f38b579 100644 --- a/components/eamxx/src/share/eamxx_pysession.cpp +++ b/components/eamxx/src/share/eamxx_pysession.cpp @@ -1,6 +1,7 @@ #include -#include +#include +#include #include #include diff --git a/components/eamxx/src/share/eamxx_types.hpp b/components/eamxx/src/share/eamxx_types.hpp index ec5a424f3f80..c082a7704add 100644 --- a/components/eamxx/src/share/eamxx_types.hpp +++ b/components/eamxx/src/share/eamxx_types.hpp @@ -1,15 +1,15 @@ #ifndef SCREAM_TYPES_HPP #define SCREAM_TYPES_HPP -#include "ekat/ekat.hpp" -#include "ekat/kokkos/ekat_kokkos_types.hpp" #include "eamxx_config.h" +#include + namespace scream { // Scalar types -using ekat::Int; +using Int = int; #ifdef SCREAM_DOUBLE_PRECISION using Real = double; #else diff --git a/components/eamxx/src/share/field/field.hpp b/components/eamxx/src/share/field/field.hpp index 72c216fb8492..3056f7788cfb 100644 --- a/components/eamxx/src/share/field/field.hpp +++ b/components/eamxx/src/share/field/field.hpp @@ -5,8 +5,8 @@ #include "share/util/eamxx_combine_ops.hpp" #include "share/eamxx_types.hpp" -#include "ekat/std_meta/ekat_std_type_traits.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include +#include #include // For std::shared_ptr #include diff --git a/components/eamxx/src/share/field/field_alloc_prop.hpp b/components/eamxx/src/share/field/field_alloc_prop.hpp index a6396bcb7539..068ca86bb75b 100644 --- a/components/eamxx/src/share/field/field_alloc_prop.hpp +++ b/components/eamxx/src/share/field/field_alloc_prop.hpp @@ -4,8 +4,8 @@ #include "share/field/field_layout.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_scalar_traits.hpp" -#include "ekat/ekat_assert.hpp" +#include +#include #include #include diff --git a/components/eamxx/src/share/field/field_group_info.hpp b/components/eamxx/src/share/field/field_group_info.hpp index b8631a21692c..1e96d99e4b4c 100644 --- a/components/eamxx/src/share/field/field_group_info.hpp +++ b/components/eamxx/src/share/field/field_group_info.hpp @@ -1,7 +1,7 @@ #ifndef SCREAM_FIELD_GROUP_INFO_HPP #define SCREAM_FIELD_GROUP_INFO_HPP -#include +#include #include #include diff --git a/components/eamxx/src/share/field/field_header.cpp b/components/eamxx/src/share/field/field_header.cpp index 7b874f18c433..6f563dbdb5f5 100644 --- a/components/eamxx/src/share/field/field_header.cpp +++ b/components/eamxx/src/share/field/field_header.cpp @@ -1,6 +1,6 @@ #include "share/field/field_header.hpp" -#include "ekat/std_meta/ekat_std_utils.hpp" +#include namespace scream { diff --git a/components/eamxx/src/share/field/field_header.hpp b/components/eamxx/src/share/field/field_header.hpp index 2b6852f7fcaf..41de4b4c0d57 100644 --- a/components/eamxx/src/share/field/field_header.hpp +++ b/components/eamxx/src/share/field/field_header.hpp @@ -6,9 +6,9 @@ #include "share/field/field_alloc_prop.hpp" #include "share/util/eamxx_family_tracking.hpp" #include "share/eamxx_types.hpp" - #include "share/util/eamxx_time_stamp.hpp" -#include "ekat/std_meta/ekat_std_any.hpp" + +#include #include #include diff --git a/components/eamxx/src/share/field/field_identifier.cpp b/components/eamxx/src/share/field/field_identifier.cpp index 207846b342b7..f1fe26d0b2ec 100644 --- a/components/eamxx/src/share/field/field_identifier.cpp +++ b/components/eamxx/src/share/field/field_identifier.cpp @@ -1,5 +1,6 @@ #include "share/field/field_identifier.hpp" -#include "ekat/util/ekat_string_utils.hpp" + +#include namespace scream { diff --git a/components/eamxx/src/share/field/field_identifier.hpp b/components/eamxx/src/share/field/field_identifier.hpp index d7127bd0c645..bd3c3803fdfd 100644 --- a/components/eamxx/src/share/field/field_identifier.hpp +++ b/components/eamxx/src/share/field/field_identifier.hpp @@ -4,9 +4,9 @@ #include "share/field/field_layout.hpp" #include "share/util/eamxx_data_type.hpp" -#include "ekat/util/ekat_string_utils.hpp" -#include "ekat/util/ekat_units.hpp" -#include "ekat/util/ekat_meta_utils.hpp" +#include +#include +#include #include diff --git a/components/eamxx/src/share/field/field_impl.hpp b/components/eamxx/src/share/field/field_impl.hpp index 249606c916bc..4d70bb052df2 100644 --- a/components/eamxx/src/share/field/field_impl.hpp +++ b/components/eamxx/src/share/field/field_impl.hpp @@ -6,7 +6,7 @@ #include "share/util/eamxx_array_utils.hpp" #include "share/util/eamxx_universal_constants.hpp" -#include +#include namespace scream { diff --git a/components/eamxx/src/share/field/field_impl_details.hpp b/components/eamxx/src/share/field/field_impl_details.hpp index 2965513a135a..32ddb7e64447 100644 --- a/components/eamxx/src/share/field/field_impl_details.hpp +++ b/components/eamxx/src/share/field/field_impl_details.hpp @@ -1,7 +1,7 @@ #ifndef SCREAM_FIELD_IMPL_DETAILS_HPP #define SCREAM_FIELD_IMPL_DETAILS_HPP -#include +#include #include diff --git a/components/eamxx/src/share/field/field_layout.cpp b/components/eamxx/src/share/field/field_layout.cpp index 74a47e5a24f5..e43ec9c71f68 100644 --- a/components/eamxx/src/share/field/field_layout.cpp +++ b/components/eamxx/src/share/field/field_layout.cpp @@ -1,6 +1,6 @@ #include "field_layout.hpp" -#include +#include namespace scream { diff --git a/components/eamxx/src/share/field/field_layout.hpp b/components/eamxx/src/share/field/field_layout.hpp index fd4a665c32fe..db9f01215aa8 100644 --- a/components/eamxx/src/share/field/field_layout.hpp +++ b/components/eamxx/src/share/field/field_layout.hpp @@ -4,9 +4,9 @@ #include "share/field/field_tag.hpp" #include "share/eamxx_types.hpp" -#include -#include -#include +#include +#include +#include #include #include diff --git a/components/eamxx/src/share/field/field_pyutils.hpp b/components/eamxx/src/share/field/field_pyutils.hpp index 1ea400506fce..377df9c5f19c 100644 --- a/components/eamxx/src/share/field/field_pyutils.hpp +++ b/components/eamxx/src/share/field/field_pyutils.hpp @@ -4,7 +4,7 @@ #include "share/field/field.hpp" #include "share/eamxx_pysession.hpp" -#include +#include #include #include diff --git a/components/eamxx/src/share/field/field_tag.hpp b/components/eamxx/src/share/field/field_tag.hpp index 673208d6ae86..54085df21b5f 100644 --- a/components/eamxx/src/share/field/field_tag.hpp +++ b/components/eamxx/src/share/field/field_tag.hpp @@ -1,7 +1,7 @@ #ifndef SCREAM_FIELD_TAG_HPP #define SCREAM_FIELD_TAG_HPP -#include "ekat/ekat_assert.hpp" +#include #include #include diff --git a/components/eamxx/src/share/field/field_tracking.hpp b/components/eamxx/src/share/field/field_tracking.hpp index d9969c258d35..4ab9ccf2efb4 100644 --- a/components/eamxx/src/share/field/field_tracking.hpp +++ b/components/eamxx/src/share/field/field_tracking.hpp @@ -6,9 +6,9 @@ #include "share/util/eamxx_time_stamp.hpp" #include "share/util/eamxx_family_tracking.hpp" -#include "ekat/util/ekat_string_utils.hpp" -#include "ekat/std_meta/ekat_std_utils.hpp" -#include "ekat/ekat_assert.hpp" +#include +#include +#include #include // For std::weak_ptr #include diff --git a/components/eamxx/src/share/field/field_utils_impl.hpp b/components/eamxx/src/share/field/field_utils_impl.hpp index 47bc50f18835..df8745a619b5 100644 --- a/components/eamxx/src/share/field/field_utils_impl.hpp +++ b/components/eamxx/src/share/field/field_utils_impl.hpp @@ -3,9 +3,9 @@ #include "share/field/field.hpp" -#include "ekat/mpi/ekat_comm.hpp" #include "ekat/kokkos/ekat_kokkos_utils.hpp" +#include #include #include diff --git a/components/eamxx/src/share/grid/abstract_grid.cpp b/components/eamxx/src/share/grid/abstract_grid.cpp index 9368f1ef0624..34d5ed1a464f 100644 --- a/components/eamxx/src/share/grid/abstract_grid.cpp +++ b/components/eamxx/src/share/grid/abstract_grid.cpp @@ -2,7 +2,7 @@ #include "share/field/field_utils.hpp" -#include +#include #include #include diff --git a/components/eamxx/src/share/grid/abstract_grid.hpp b/components/eamxx/src/share/grid/abstract_grid.hpp index cc75c2767ffe..55650d5e8b3a 100644 --- a/components/eamxx/src/share/grid/abstract_grid.hpp +++ b/components/eamxx/src/share/grid/abstract_grid.hpp @@ -1,12 +1,12 @@ #ifndef SCREAM_ABSTRACT_GRID_HPP #define SCREAM_ABSTRACT_GRID_HPP -#include "ekat/std_meta/ekat_std_enable_shared_from_this.hpp" #include "share/grid/grid_utils.hpp" #include "share/field/field_layout.hpp" #include "share/field/field.hpp" -#include "ekat/mpi//ekat_comm.hpp" +#include +#include #include #include diff --git a/components/eamxx/src/share/grid/grid_import_export.hpp b/components/eamxx/src/share/grid/grid_import_export.hpp index c9ad03104470..4257f7eb7df5 100644 --- a/components/eamxx/src/share/grid/grid_import_export.hpp +++ b/components/eamxx/src/share/grid/grid_import_export.hpp @@ -5,7 +5,8 @@ #include "share/eamxx_types.hpp" // For KokkosTypes #include "share/util/eamxx_utils.hpp" // For check_mpi_call -#include +#include + #include // We do some direct MPI calls #include #include diff --git a/components/eamxx/src/share/grid/grids_manager.hpp b/components/eamxx/src/share/grid/grids_manager.hpp index 3928ff4d38ea..e622633aaa48 100644 --- a/components/eamxx/src/share/grid/grids_manager.hpp +++ b/components/eamxx/src/share/grid/grids_manager.hpp @@ -5,11 +5,11 @@ #include "share/grid/remap/abstract_remapper.hpp" #include "share/grid/remap/identity_remapper.hpp" -#include "ekat/util/ekat_factory.hpp" -#include "ekat/util/ekat_string_utils.hpp" -#include "ekat/ekat_parameter_list.hpp" -#include "ekat/ekat_assert.hpp" -#include "ekat/mpi/ekat_comm.hpp" +#include +#include +#include +#include +#include #include #include diff --git a/components/eamxx/src/share/grid/mesh_free_grids_manager.cpp b/components/eamxx/src/share/grid/mesh_free_grids_manager.cpp index 679b0de347de..0e0f49549235 100644 --- a/components/eamxx/src/share/grid/mesh_free_grids_manager.cpp +++ b/components/eamxx/src/share/grid/mesh_free_grids_manager.cpp @@ -8,7 +8,7 @@ #include "physics/share/physics_constants.hpp" -#include "ekat/std_meta/ekat_std_utils.hpp" +#include #include #include diff --git a/components/eamxx/src/share/grid/mesh_free_grids_manager.hpp b/components/eamxx/src/share/grid/mesh_free_grids_manager.hpp index c36fc1ba40e5..54b40e242d01 100644 --- a/components/eamxx/src/share/grid/mesh_free_grids_manager.hpp +++ b/components/eamxx/src/share/grid/mesh_free_grids_manager.hpp @@ -3,7 +3,7 @@ #include "share/grid/grids_manager.hpp" -#include "ekat/mpi/ekat_comm.hpp" +#include namespace scream { diff --git a/components/eamxx/src/share/grid/point_grid.cpp b/components/eamxx/src/share/grid/point_grid.cpp index 7346020fa3e7..de3c41312a06 100644 --- a/components/eamxx/src/share/grid/point_grid.cpp +++ b/components/eamxx/src/share/grid/point_grid.cpp @@ -1,5 +1,4 @@ #include "share/grid/point_grid.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "physics/share/physics_constants.hpp" #include diff --git a/components/eamxx/src/share/grid/point_grid.hpp b/components/eamxx/src/share/grid/point_grid.hpp index 736ce6ab6ac0..492fe3f32e68 100644 --- a/components/eamxx/src/share/grid/point_grid.hpp +++ b/components/eamxx/src/share/grid/point_grid.hpp @@ -1,11 +1,12 @@ #ifndef SCREAM_POINT_GRID_HPP #define SCREAM_POINT_GRID_HPP -#include #include "share/grid/abstract_grid.hpp" #include "share/eamxx_types.hpp" -#include "ekat/mpi/ekat_comm.hpp" +#include + +#include namespace scream { diff --git a/components/eamxx/src/share/grid/remap/abstract_remapper.hpp b/components/eamxx/src/share/grid/remap/abstract_remapper.hpp index c935db5fd586..1e892b2567d4 100644 --- a/components/eamxx/src/share/grid/remap/abstract_remapper.hpp +++ b/components/eamxx/src/share/grid/remap/abstract_remapper.hpp @@ -4,10 +4,10 @@ #include "share/field/field.hpp" #include "share/grid/abstract_grid.hpp" -#include "ekat/util/ekat_factory.hpp" -#include "ekat/util/ekat_string_utils.hpp" -#include "ekat/std_meta/ekat_std_utils.hpp" -#include "ekat/ekat_parameter_list.hpp" +#include +#include +#include +#include namespace scream { diff --git a/components/eamxx/src/share/grid/remap/coarsening_remapper.cpp b/components/eamxx/src/share/grid/remap/coarsening_remapper.cpp index c0d6040bc5d1..7713680d0608 100644 --- a/components/eamxx/src/share/grid/remap/coarsening_remapper.cpp +++ b/components/eamxx/src/share/grid/remap/coarsening_remapper.cpp @@ -6,7 +6,7 @@ #include "share/field/field.hpp" #include -#include +#include #include diff --git a/components/eamxx/src/share/grid/remap/horiz_interp_remapper_base.cpp b/components/eamxx/src/share/grid/remap/horiz_interp_remapper_base.cpp index 29a51fa21368..510821573108 100644 --- a/components/eamxx/src/share/grid/remap/horiz_interp_remapper_base.cpp +++ b/components/eamxx/src/share/grid/remap/horiz_interp_remapper_base.cpp @@ -5,7 +5,7 @@ #include "share/io/scorpio_input.hpp" #include -#include +#include #include namespace scream diff --git a/components/eamxx/src/share/grid/remap/horiz_interp_remapper_data.hpp b/components/eamxx/src/share/grid/remap/horiz_interp_remapper_data.hpp index 760c3604701a..d62afd0877a8 100644 --- a/components/eamxx/src/share/grid/remap/horiz_interp_remapper_data.hpp +++ b/components/eamxx/src/share/grid/remap/horiz_interp_remapper_data.hpp @@ -4,7 +4,7 @@ #include "share/grid/abstract_grid.hpp" #include "share/grid/remap/abstract_remapper.hpp" -#include +#include #include #include diff --git a/components/eamxx/src/share/grid/remap/refining_remapper_p2p.cpp b/components/eamxx/src/share/grid/remap/refining_remapper_p2p.cpp index eebbc168d905..34e9c81c63cb 100644 --- a/components/eamxx/src/share/grid/remap/refining_remapper_p2p.cpp +++ b/components/eamxx/src/share/grid/remap/refining_remapper_p2p.cpp @@ -6,7 +6,7 @@ #include "share/util/eamxx_utils.hpp" #include -#include +#include #include diff --git a/components/eamxx/src/share/grid/remap/refining_remapper_p2p.hpp b/components/eamxx/src/share/grid/remap/refining_remapper_p2p.hpp index d56c2e62e864..a0d14226ac9d 100644 --- a/components/eamxx/src/share/grid/remap/refining_remapper_p2p.hpp +++ b/components/eamxx/src/share/grid/remap/refining_remapper_p2p.hpp @@ -5,7 +5,7 @@ #include "share/grid/remap/horiz_interp_remapper_base.hpp" #include "eamxx_config.h" -#include "ekat/ekat_pack.hpp" +#include #include diff --git a/components/eamxx/src/share/grid/remap/refining_remapper_rma.cpp b/components/eamxx/src/share/grid/remap/refining_remapper_rma.cpp index 1831994d0fd4..f4ad86256d27 100644 --- a/components/eamxx/src/share/grid/remap/refining_remapper_rma.cpp +++ b/components/eamxx/src/share/grid/remap/refining_remapper_rma.cpp @@ -4,7 +4,7 @@ #include "share/io/scorpio_input.hpp" #include -#include +#include #include diff --git a/components/eamxx/src/share/grid/remap/refining_remapper_rma.hpp b/components/eamxx/src/share/grid/remap/refining_remapper_rma.hpp index 31562b2a2b6a..b47c6174d496 100644 --- a/components/eamxx/src/share/grid/remap/refining_remapper_rma.hpp +++ b/components/eamxx/src/share/grid/remap/refining_remapper_rma.hpp @@ -6,7 +6,7 @@ #include "share/util/eamxx_utils.hpp" #include "eamxx_config.h" -#include "ekat/ekat_pack.hpp" +#include #include diff --git a/components/eamxx/src/share/grid/remap/vertical_remapper.cpp b/components/eamxx/src/share/grid/remap/vertical_remapper.cpp index fadc49fdc560..f7e21a1af441 100644 --- a/components/eamxx/src/share/grid/remap/vertical_remapper.cpp +++ b/components/eamxx/src/share/grid/remap/vertical_remapper.cpp @@ -7,10 +7,10 @@ #include "share/util/eamxx_universal_constants.hpp" #include "share/io/eamxx_scorpio_interface.hpp" -#include #include -#include -#include +#include +#include +#include #include diff --git a/components/eamxx/src/share/grid/remap/vertical_remapper.hpp b/components/eamxx/src/share/grid/remap/vertical_remapper.hpp index f011c110430b..9f719dfd60e3 100644 --- a/components/eamxx/src/share/grid/remap/vertical_remapper.hpp +++ b/components/eamxx/src/share/grid/remap/vertical_remapper.hpp @@ -3,7 +3,7 @@ #include "share/grid/remap/abstract_remapper.hpp" -#include +#include namespace scream { diff --git a/components/eamxx/src/share/grid/se_grid.cpp b/components/eamxx/src/share/grid/se_grid.cpp index 284191a69daa..a1a62ddda6c4 100644 --- a/components/eamxx/src/share/grid/se_grid.cpp +++ b/components/eamxx/src/share/grid/se_grid.cpp @@ -1,7 +1,7 @@ #include "share/grid/se_grid.hpp" #include "share/field/field_utils.hpp" -#include +#include namespace scream { diff --git a/components/eamxx/src/share/io/eamxx_io_control.hpp b/components/eamxx/src/share/io/eamxx_io_control.hpp index 955417d02976..962a5cd47d63 100644 --- a/components/eamxx/src/share/io/eamxx_io_control.hpp +++ b/components/eamxx/src/share/io/eamxx_io_control.hpp @@ -3,7 +3,7 @@ #include "share/util/eamxx_time_stamp.hpp" -#include +#include #include diff --git a/components/eamxx/src/share/io/eamxx_io_file_specs.hpp b/components/eamxx/src/share/io/eamxx_io_file_specs.hpp index 27b203c513a8..47ddbbf9b5c6 100644 --- a/components/eamxx/src/share/io/eamxx_io_file_specs.hpp +++ b/components/eamxx/src/share/io/eamxx_io_file_specs.hpp @@ -5,7 +5,7 @@ #include "share/io/eamxx_io_utils.hpp" #include "share/util/eamxx_time_stamp.hpp" -#include +#include #include #include diff --git a/components/eamxx/src/share/io/eamxx_io_utils.hpp b/components/eamxx/src/share/io/eamxx_io_utils.hpp index 76480546f6de..05fe8771f620 100644 --- a/components/eamxx/src/share/io/eamxx_io_utils.hpp +++ b/components/eamxx/src/share/io/eamxx_io_utils.hpp @@ -6,8 +6,8 @@ #include "share/atm_process/atmosphere_diagnostic.hpp" #include "share/grid/abstract_grid.hpp" -#include -#include +#include +#include #include #include diff --git a/components/eamxx/src/share/io/eamxx_output_manager.cpp b/components/eamxx/src/share/io/eamxx_output_manager.cpp index f19440da3b2b..1581870b9418 100644 --- a/components/eamxx/src/share/io/eamxx_output_manager.cpp +++ b/components/eamxx/src/share/io/eamxx_output_manager.cpp @@ -5,9 +5,9 @@ #include "share/util/eamxx_timing.hpp" #include "share/eamxx_config.hpp" -#include "ekat/ekat_parameter_list.hpp" -#include "ekat/mpi/ekat_comm.hpp" -#include "ekat/util/ekat_string_utils.hpp" +#include +#include +#include #include #include diff --git a/components/eamxx/src/share/io/eamxx_output_manager.hpp b/components/eamxx/src/share/io/eamxx_output_manager.hpp index 474e4fd8144f..0e4732b4cb57 100644 --- a/components/eamxx/src/share/io/eamxx_output_manager.hpp +++ b/components/eamxx/src/share/io/eamxx_output_manager.hpp @@ -11,10 +11,9 @@ #include "share/grid/grids_manager.hpp" #include "share/util/eamxx_time_stamp.hpp" -#include "ekat/logging/ekat_logger.hpp" -#include "ekat/mpi/ekat_comm.hpp" -#include "ekat/ekat_parameter_list.hpp" -#include "ekat/ekat_parse_yaml_file.hpp" +#include +#include +#include namespace scream { diff --git a/components/eamxx/src/share/io/eamxx_scorpio_interface.cpp b/components/eamxx/src/share/io/eamxx_scorpio_interface.cpp index 15be1e9c5c41..1a2b36aa0e71 100644 --- a/components/eamxx/src/share/io/eamxx_scorpio_interface.cpp +++ b/components/eamxx/src/share/io/eamxx_scorpio_interface.cpp @@ -3,11 +3,13 @@ #include "eamxx_config.h" -#include -#include +#include +#include +#include #include +#include #include namespace scream { diff --git a/components/eamxx/src/share/io/eamxx_scorpio_interface.hpp b/components/eamxx/src/share/io/eamxx_scorpio_interface.hpp index 5734c651d547..122268137d5c 100644 --- a/components/eamxx/src/share/io/eamxx_scorpio_interface.hpp +++ b/components/eamxx/src/share/io/eamxx_scorpio_interface.hpp @@ -3,8 +3,8 @@ #include "eamxx_scorpio_types.hpp" -#include -#include +#include +#include #include #include diff --git a/components/eamxx/src/share/io/eamxx_scorpio_types.cpp b/components/eamxx/src/share/io/eamxx_scorpio_types.cpp index 317306f5239b..dcdbf98b52d1 100644 --- a/components/eamxx/src/share/io/eamxx_scorpio_types.cpp +++ b/components/eamxx/src/share/io/eamxx_scorpio_types.cpp @@ -1,6 +1,6 @@ #include "eamxx_scorpio_types.hpp" -#include +#include namespace scream { namespace scorpio { diff --git a/components/eamxx/src/share/io/scorpio_input.cpp b/components/eamxx/src/share/io/scorpio_input.cpp index 4b9b5252b0ab..50405a06fe0f 100644 --- a/components/eamxx/src/share/io/scorpio_input.cpp +++ b/components/eamxx/src/share/io/scorpio_input.cpp @@ -3,7 +3,7 @@ #include "share/field/field_utils.hpp" #include "share/io/eamxx_scorpio_interface.hpp" -#include +#include #include #include diff --git a/components/eamxx/src/share/io/scorpio_input.hpp b/components/eamxx/src/share/io/scorpio_input.hpp index 3aae6ab49468..4832104b6abb 100644 --- a/components/eamxx/src/share/io/scorpio_input.hpp +++ b/components/eamxx/src/share/io/scorpio_input.hpp @@ -4,8 +4,8 @@ #include "share/field/field_manager.hpp" #include "share/grid/abstract_grid.hpp" -#include "ekat/ekat_parameter_list.hpp" -#include "ekat/logging/ekat_logger.hpp" +#include +#include /* The AtmosphereInput class handles all input streams to SCREAM. * It is important to note that there does not exist an InputManager, diff --git a/components/eamxx/src/share/io/scorpio_output.cpp b/components/eamxx/src/share/io/scorpio_output.cpp index 66cb6f7b6c5c..365667072a33 100644 --- a/components/eamxx/src/share/io/scorpio_output.cpp +++ b/components/eamxx/src/share/io/scorpio_output.cpp @@ -6,9 +6,9 @@ #include "share/util/eamxx_timing.hpp" #include "share/field/field_utils.hpp" -#include -#include -#include +#include +#include +#include #include diff --git a/components/eamxx/src/share/io/scorpio_output.hpp b/components/eamxx/src/share/io/scorpio_output.hpp index 70257e25cc50..4a0f153369d9 100644 --- a/components/eamxx/src/share/io/scorpio_output.hpp +++ b/components/eamxx/src/share/io/scorpio_output.hpp @@ -10,8 +10,9 @@ #include "share/util/eamxx_utils.hpp" #include "share/atm_process/atmosphere_diagnostic.hpp" -#include "ekat/ekat_parameter_list.hpp" -#include "ekat/mpi/ekat_comm.hpp" +#include +#include + /* The AtmosphereOutput class handles an output stream in SCREAM. * Typical usage is to register an AtmosphereOutput object with the OutputManager (see eamxx_output_manager.hpp * diff --git a/components/eamxx/src/share/io/scorpio_scm_input.cpp b/components/eamxx/src/share/io/scorpio_scm_input.cpp index 7016c9e534ce..0989fd908de4 100644 --- a/components/eamxx/src/share/io/scorpio_scm_input.cpp +++ b/components/eamxx/src/share/io/scorpio_scm_input.cpp @@ -4,7 +4,7 @@ #include "share/io/eamxx_scorpio_interface.hpp" #include "share/grid/point_grid.hpp" -#include +#include #include diff --git a/components/eamxx/src/share/io/scorpio_scm_input.hpp b/components/eamxx/src/share/io/scorpio_scm_input.hpp index 44b54043dcad..10508591bb49 100644 --- a/components/eamxx/src/share/io/scorpio_scm_input.hpp +++ b/components/eamxx/src/share/io/scorpio_scm_input.hpp @@ -3,7 +3,7 @@ #include "share/grid/abstract_grid.hpp" -#include +#include namespace scream { diff --git a/components/eamxx/src/share/io/tests/io_basic.cpp b/components/eamxx/src/share/io/tests/io_basic.cpp index 98f92c89bd98..86abae7c611f 100644 --- a/components/eamxx/src/share/io/tests/io_basic.cpp +++ b/components/eamxx/src/share/io/tests/io_basic.cpp @@ -14,11 +14,10 @@ #include "share/util/eamxx_time_stamp.hpp" #include "share/eamxx_types.hpp" -#include "ekat/util/ekat_units.hpp" -#include "ekat/ekat_parameter_list.hpp" -#include "ekat/ekat_assert.hpp" -#include "ekat/mpi/ekat_comm.hpp" -#include "ekat/util/ekat_test_utils.hpp" +#include +#include +#include +#include #include #include diff --git a/components/eamxx/src/share/io/tests/io_diags.cpp b/components/eamxx/src/share/io/tests/io_diags.cpp index 4f9b10e88ab1..477a5702f487 100644 --- a/components/eamxx/src/share/io/tests/io_diags.cpp +++ b/components/eamxx/src/share/io/tests/io_diags.cpp @@ -15,11 +15,10 @@ #include "share/util/eamxx_time_stamp.hpp" #include "share/eamxx_types.hpp" -#include "ekat/util/ekat_units.hpp" -#include "ekat/ekat_parameter_list.hpp" -#include "ekat/ekat_assert.hpp" -#include "ekat/mpi/ekat_comm.hpp" -#include "ekat/util/ekat_test_utils.hpp" +#include +#include +#include +#include #include #include diff --git a/components/eamxx/src/share/io/tests/io_filled.cpp b/components/eamxx/src/share/io/tests/io_filled.cpp index 4257338f31d5..435d5df8c8a5 100644 --- a/components/eamxx/src/share/io/tests/io_filled.cpp +++ b/components/eamxx/src/share/io/tests/io_filled.cpp @@ -15,11 +15,10 @@ #include "share/util/eamxx_time_stamp.hpp" #include "share/eamxx_types.hpp" -#include "ekat/util/ekat_units.hpp" -#include "ekat/ekat_parameter_list.hpp" -#include "ekat/ekat_assert.hpp" -#include "ekat/mpi/ekat_comm.hpp" -#include "ekat/util/ekat_test_utils.hpp" +#include +#include +#include +#include #include #include diff --git a/components/eamxx/src/share/io/tests/io_monthly.cpp b/components/eamxx/src/share/io/tests/io_monthly.cpp index da7a7708b9ec..c97afcc6888e 100644 --- a/components/eamxx/src/share/io/tests/io_monthly.cpp +++ b/components/eamxx/src/share/io/tests/io_monthly.cpp @@ -14,11 +14,10 @@ #include "share/util/eamxx_time_stamp.hpp" #include "share/eamxx_types.hpp" -#include "ekat/util/ekat_units.hpp" -#include "ekat/ekat_parameter_list.hpp" -#include "ekat/ekat_assert.hpp" -#include "ekat/mpi/ekat_comm.hpp" -#include "ekat/util/ekat_test_utils.hpp" +#include +#include +#include +#include #include #include diff --git a/components/eamxx/src/share/io/tests/io_packed.cpp b/components/eamxx/src/share/io/tests/io_packed.cpp index a780618f4e10..dba2738939cc 100644 --- a/components/eamxx/src/share/io/tests/io_packed.cpp +++ b/components/eamxx/src/share/io/tests/io_packed.cpp @@ -13,11 +13,10 @@ #include "share/util/eamxx_time_stamp.hpp" #include "share/eamxx_types.hpp" -#include "ekat/util/ekat_units.hpp" -#include "ekat/ekat_parameter_list.hpp" -#include "ekat/ekat_assert.hpp" -#include "ekat/mpi/ekat_comm.hpp" -#include "ekat/util/ekat_test_utils.hpp" +#include +#include +#include +#include #include #include diff --git a/components/eamxx/src/share/io/tests/io_remap_test.cpp b/components/eamxx/src/share/io/tests/io_remap_test.cpp index 82ec9201e0ea..b043df9b2f0d 100644 --- a/components/eamxx/src/share/io/tests/io_remap_test.cpp +++ b/components/eamxx/src/share/io/tests/io_remap_test.cpp @@ -9,6 +9,8 @@ #include "share/grid/mesh_free_grids_manager.hpp" +#include + namespace { using namespace scream; diff --git a/components/eamxx/src/share/io/tests/io_se_grid.cpp b/components/eamxx/src/share/io/tests/io_se_grid.cpp index b4013ec79753..ee722fdf5b76 100644 --- a/components/eamxx/src/share/io/tests/io_se_grid.cpp +++ b/components/eamxx/src/share/io/tests/io_se_grid.cpp @@ -15,10 +15,10 @@ #include "share/util/eamxx_time_stamp.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/util/ekat_units.hpp" -#include "ekat/io/ekat_yaml.hpp" -#include "ekat/ekat_parameter_list.hpp" +#include +#include +#include +#include namespace { diff --git a/components/eamxx/src/share/io/tests/output_restart.cpp b/components/eamxx/src/share/io/tests/output_restart.cpp index 0b1fd7fcab01..9047ed3dfe72 100644 --- a/components/eamxx/src/share/io/tests/output_restart.cpp +++ b/components/eamxx/src/share/io/tests/output_restart.cpp @@ -17,9 +17,7 @@ #include "share/eamxx_types.hpp" -#include "ekat/ekat_parameter_list.hpp" -#include "ekat/util/ekat_string_utils.hpp" -#include "ekat/util/ekat_test_utils.hpp" +#include #include #include diff --git a/components/eamxx/src/share/io/tests/scorpio_interface_tests.cpp b/components/eamxx/src/share/io/tests/scorpio_interface_tests.cpp index 85fa8a9612da..e01d0d7eeab4 100644 --- a/components/eamxx/src/share/io/tests/scorpio_interface_tests.cpp +++ b/components/eamxx/src/share/io/tests/scorpio_interface_tests.cpp @@ -1,7 +1,6 @@ #include #include "share/io/eamxx_scorpio_interface.hpp" -#include namespace scream { diff --git a/components/eamxx/src/share/property_checks/field_within_interval_check.cpp b/components/eamxx/src/share/property_checks/field_within_interval_check.cpp index 23ae05fe53cc..cccb8ee24376 100644 --- a/components/eamxx/src/share/property_checks/field_within_interval_check.cpp +++ b/components/eamxx/src/share/property_checks/field_within_interval_check.cpp @@ -2,7 +2,7 @@ #include "share/util/eamxx_array_utils.hpp" #include "share/field/field_utils.hpp" -#include +#include #include diff --git a/components/eamxx/src/share/property_checks/field_within_interval_check.hpp b/components/eamxx/src/share/property_checks/field_within_interval_check.hpp index 92d42dc837a3..a30053104d65 100644 --- a/components/eamxx/src/share/property_checks/field_within_interval_check.hpp +++ b/components/eamxx/src/share/property_checks/field_within_interval_check.hpp @@ -5,8 +5,6 @@ #include "share/grid/abstract_grid.hpp" #include "share/field/field.hpp" -#include "ekat/util/ekat_math_utils.hpp" - namespace scream { diff --git a/components/eamxx/src/share/property_checks/property_check.cpp b/components/eamxx/src/share/property_checks/property_check.cpp index 073a303ec66a..9fcedfb1c7f1 100644 --- a/components/eamxx/src/share/property_checks/property_check.cpp +++ b/components/eamxx/src/share/property_checks/property_check.cpp @@ -1,6 +1,6 @@ #include "share/property_checks/property_check.hpp" -#include +#include #include #include diff --git a/components/eamxx/src/share/property_checks/property_check.hpp b/components/eamxx/src/share/property_checks/property_check.hpp index 1e891ff787ad..2d47dfa8ba44 100644 --- a/components/eamxx/src/share/property_checks/property_check.hpp +++ b/components/eamxx/src/share/property_checks/property_check.hpp @@ -3,7 +3,7 @@ #include "share/field/field.hpp" -#include +#include #include #include diff --git a/components/eamxx/src/share/tests/atm_process_tests.cpp b/components/eamxx/src/share/tests/atm_process_tests.cpp index 5fad72110a10..fb9a4b307029 100644 --- a/components/eamxx/src/share/tests/atm_process_tests.cpp +++ b/components/eamxx/src/share/tests/atm_process_tests.cpp @@ -13,10 +13,9 @@ #include "share/grid/remap/inverse_remapper.hpp" #include "share/util/eamxx_time_stamp.hpp" -#include "ekat/ekat_parameter_list.hpp" -#include "ekat/ekat_parse_yaml_file.hpp" -#include "ekat/ekat_parameter_list.hpp" -#include "ekat/ekat_scalar_traits.hpp" +#include +#include +#include namespace scream { diff --git a/components/eamxx/src/share/tests/column_ops.cpp b/components/eamxx/src/share/tests/column_ops.cpp index 29aee88ee320..3edfdb440a59 100644 --- a/components/eamxx/src/share/tests/column_ops.cpp +++ b/components/eamxx/src/share/tests/column_ops.cpp @@ -1,10 +1,11 @@ #include -#include "ekat/kokkos/ekat_kokkos_types.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" -#include "ekat/util/ekat_arch.hpp" #include "share/util/eamxx_column_ops.hpp" +#include +#include +#include + namespace { TEST_CASE("column_ops_ps_1") { diff --git a/components/eamxx/src/share/tests/combine_ops.cpp b/components/eamxx/src/share/tests/combine_ops.cpp index e872d6027a0b..2dcf49d6ca23 100644 --- a/components/eamxx/src/share/tests/combine_ops.cpp +++ b/components/eamxx/src/share/tests/combine_ops.cpp @@ -4,7 +4,7 @@ #include "share/util/eamxx_universal_constants.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" +#include #include diff --git a/components/eamxx/src/share/tests/common_physics_functions_tests.cpp b/components/eamxx/src/share/tests/common_physics_functions_tests.cpp index a29909505630..891ae0820e32 100644 --- a/components/eamxx/src/share/tests/common_physics_functions_tests.cpp +++ b/components/eamxx/src/share/tests/common_physics_functions_tests.cpp @@ -6,9 +6,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/util/eamxx_utils.hpp" -#include "ekat/ekat_pack.hpp" #include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" +#include #include diff --git a/components/eamxx/src/share/tests/eamxx_time_interpolation_tests.cpp b/components/eamxx/src/share/tests/eamxx_time_interpolation_tests.cpp index 7698205610a5..afb75791570e 100644 --- a/components/eamxx/src/share/tests/eamxx_time_interpolation_tests.cpp +++ b/components/eamxx/src/share/tests/eamxx_time_interpolation_tests.cpp @@ -12,7 +12,7 @@ #include "share/io/eamxx_output_manager.hpp" -#include "ekat/ekat_parameter_list.hpp" +#include /*----------------------------------------------------------------------------------------------- * Test TimeInterpolation class *-----------------------------------------------------------------------------------------------*/ diff --git a/components/eamxx/src/share/tests/field_tests.cpp b/components/eamxx/src/share/tests/field_tests.cpp index de1f84bfa182..4074b04a4419 100644 --- a/components/eamxx/src/share/tests/field_tests.cpp +++ b/components/eamxx/src/share/tests/field_tests.cpp @@ -1,7 +1,6 @@ #include #include -#include "ekat/kokkos/ekat_subview_utils.hpp" #include "share/field/field_identifier.hpp" #include "share/field/field_header.hpp" #include "share/field/field.hpp" @@ -11,9 +10,10 @@ #include "share/grid/point_grid.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/ekat_pack_utils.hpp" -#include "ekat/util/ekat_test_utils.hpp" +#include +#include +#include +#include namespace { diff --git a/components/eamxx/src/share/tests/field_utils.cpp b/components/eamxx/src/share/tests/field_utils.cpp index d5e96a28d9b8..f80ab8c48bf9 100644 --- a/components/eamxx/src/share/tests/field_utils.cpp +++ b/components/eamxx/src/share/tests/field_utils.cpp @@ -1,7 +1,6 @@ #include #include -#include "ekat/kokkos/ekat_subview_utils.hpp" #include "share/field/field_identifier.hpp" #include "share/field/field_header.hpp" #include "share/field/field.hpp" @@ -11,9 +10,8 @@ #include "share/grid/point_grid.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/ekat_pack_utils.hpp" -#include "ekat/util/ekat_test_utils.hpp" +#include +#include namespace { diff --git a/components/eamxx/src/share/tests/grid_tests.cpp b/components/eamxx/src/share/tests/grid_tests.cpp index dcff0f438142..ea6267c4d6ac 100644 --- a/components/eamxx/src/share/tests/grid_tests.cpp +++ b/components/eamxx/src/share/tests/grid_tests.cpp @@ -7,7 +7,7 @@ #include "share/util/eamxx_setup_random_test.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" +#include #include diff --git a/components/eamxx/src/share/tests/property_checks.cpp b/components/eamxx/src/share/tests/property_checks.cpp index a52101d2d6a3..41cd58d07526 100644 --- a/components/eamxx/src/share/tests/property_checks.cpp +++ b/components/eamxx/src/share/tests/property_checks.cpp @@ -9,9 +9,7 @@ #include "share/grid/point_grid.hpp" #include "share/field/field_utils.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/ekat_pack_utils.hpp" -#include "ekat/util/ekat_test_utils.hpp" +#include namespace { diff --git a/components/eamxx/src/share/tests/subfield_tests.cpp b/components/eamxx/src/share/tests/subfield_tests.cpp index 51e7652a96a0..d1e3442f7967 100644 --- a/components/eamxx/src/share/tests/subfield_tests.cpp +++ b/components/eamxx/src/share/tests/subfield_tests.cpp @@ -5,8 +5,6 @@ #include "share/field/field_utils.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include "ekat/util/ekat_test_utils.hpp" - namespace { TEST_CASE("field", "") { diff --git a/components/eamxx/src/share/util/eamxx_ad_test.cpp b/components/eamxx/src/share/util/eamxx_ad_test.cpp index ba4934788782..92894f80f941 100644 --- a/components/eamxx/src/share/util/eamxx_ad_test.cpp +++ b/components/eamxx/src/share/util/eamxx_ad_test.cpp @@ -10,8 +10,8 @@ #include "share/grid/mesh_free_grids_manager.hpp" // EKAT headers -#include "ekat/ekat_parse_yaml_file.hpp" -#include "ekat/util/ekat_test_utils.hpp" +#include +#include #include diff --git a/components/eamxx/src/share/util/eamxx_array_utils.hpp b/components/eamxx/src/share/util/eamxx_array_utils.hpp index 68b17df721be..229e98cc1ae1 100644 --- a/components/eamxx/src/share/util/eamxx_array_utils.hpp +++ b/components/eamxx/src/share/util/eamxx_array_utils.hpp @@ -3,7 +3,8 @@ #include "share/eamxx_types.hpp" -#include +#include +#include namespace scream { diff --git a/components/eamxx/src/share/util/eamxx_bfbhash.hpp b/components/eamxx/src/share/util/eamxx_bfbhash.hpp index 475f4dfa8810..f3eeed9098cd 100644 --- a/components/eamxx/src/share/util/eamxx_bfbhash.hpp +++ b/components/eamxx/src/share/util/eamxx_bfbhash.hpp @@ -3,8 +3,8 @@ #include -#include -#include +#include +#include namespace scream { namespace bfbhash { diff --git a/components/eamxx/src/share/util/eamxx_column_ops.hpp b/components/eamxx/src/share/util/eamxx_column_ops.hpp index 6e02c0782a6e..8799e34396ae 100644 --- a/components/eamxx/src/share/util/eamxx_column_ops.hpp +++ b/components/eamxx/src/share/util/eamxx_column_ops.hpp @@ -4,14 +4,14 @@ #include "share/util/eamxx_combine_ops.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/ekat_pack_math.hpp" -#include "ekat/ekat_scalar_traits.hpp" -#include "ekat/kokkos/ekat_kokkos_types.hpp" -#include "ekat/ekat_pack_utils.hpp" -#include "ekat/ekat_pack_kokkos.hpp" -#include "ekat/util//ekat_arch.hpp" -#include "ekat/ekat_pack.hpp" +#include +#include +#include +#include +#include +#include +#include +#include #include diff --git a/components/eamxx/src/share/util/eamxx_combine_ops.hpp b/components/eamxx/src/share/util/eamxx_combine_ops.hpp index b4e550eafee3..080409355136 100644 --- a/components/eamxx/src/share/util/eamxx_combine_ops.hpp +++ b/components/eamxx/src/share/util/eamxx_combine_ops.hpp @@ -3,9 +3,9 @@ #include "share/util/eamxx_universal_constants.hpp" -#include -#include -#include +#include +#include +#include // For KOKKOS_INLINE_FUNCTION #include diff --git a/components/eamxx/src/share/util/eamxx_data_type.hpp b/components/eamxx/src/share/util/eamxx_data_type.hpp index 888d1975b26b..00536fcbc8d1 100644 --- a/components/eamxx/src/share/util/eamxx_data_type.hpp +++ b/components/eamxx/src/share/util/eamxx_data_type.hpp @@ -3,7 +3,7 @@ #include "share/util/eamxx_utils.hpp" -#include +#include #include diff --git a/components/eamxx/src/share/util/eamxx_deep_copy.hpp b/components/eamxx/src/share/util/eamxx_deep_copy.hpp index 5c059256d2a6..8df27f5f2390 100644 --- a/components/eamxx/src/share/util/eamxx_deep_copy.hpp +++ b/components/eamxx/src/share/util/eamxx_deep_copy.hpp @@ -1,8 +1,8 @@ #ifndef SCREAM_DEEP_COPY_HPP #define SCREAM_DEEP_COPY_HPP -#include "ekat/kokkos/ekat_kokkos_utils.hpp" -#include "ekat/ekat_assert.hpp" +#include + #include namespace scream { diff --git a/components/eamxx/src/share/util/eamxx_family_tracking.hpp b/components/eamxx/src/share/util/eamxx_family_tracking.hpp index 7845d7c40b59..15d097fd32e0 100644 --- a/components/eamxx/src/share/util/eamxx_family_tracking.hpp +++ b/components/eamxx/src/share/util/eamxx_family_tracking.hpp @@ -1,8 +1,8 @@ #ifndef SCREAM_FAMILY_TRACKING_CLASS #define SCREAM_FAMILY_TRACKING_CLASS -#include "ekat/std_meta/ekat_std_enable_shared_from_this.hpp" -#include "ekat/ekat_assert.hpp" +#include +#include #include #include diff --git a/components/eamxx/src/share/util/eamxx_setup_random_test.hpp b/components/eamxx/src/share/util/eamxx_setup_random_test.hpp index dce1129cddb3..b58b2bee0c3f 100644 --- a/components/eamxx/src/share/util/eamxx_setup_random_test.hpp +++ b/components/eamxx/src/share/util/eamxx_setup_random_test.hpp @@ -2,7 +2,8 @@ #define SCREAM_SETUP_RANDOM_TEST_HPP #include "catch2/catch.hpp" -#include "ekat/mpi/ekat_comm.hpp" + +#include #include #include diff --git a/components/eamxx/src/share/util/eamxx_time_stamp.cpp b/components/eamxx/src/share/util/eamxx_time_stamp.cpp index 2665c293d8dd..ce4aef04c166 100644 --- a/components/eamxx/src/share/util/eamxx_time_stamp.cpp +++ b/components/eamxx/src/share/util/eamxx_time_stamp.cpp @@ -2,7 +2,8 @@ #include "share/util/eamxx_universal_constants.hpp" #include "share/eamxx_config.hpp" -#include "ekat/ekat_assert.hpp" + +#include #include #include diff --git a/components/eamxx/src/share/util/eamxx_timing.hpp b/components/eamxx/src/share/util/eamxx_timing.hpp index 74b947dc4b5e..e4891d1ecc50 100644 --- a/components/eamxx/src/share/util/eamxx_timing.hpp +++ b/components/eamxx/src/share/util/eamxx_timing.hpp @@ -1,7 +1,7 @@ #ifndef SCREAM_TIMING_HPP #define SCREAM_TIMING_HPP -#include +#include #include diff --git a/components/eamxx/src/share/util/eamxx_utils.hpp b/components/eamxx/src/share/util/eamxx_utils.hpp index 2b30a1c471ac..58b821b02c26 100644 --- a/components/eamxx/src/share/util/eamxx_utils.hpp +++ b/components/eamxx/src/share/util/eamxx_utils.hpp @@ -3,9 +3,9 @@ #include "share/eamxx_types.hpp" -#include -#include -#include +#include +#include +#include #include #include diff --git a/components/eamxx/tests/generic/fail_check/kokkos_fail.cpp b/components/eamxx/tests/generic/fail_check/kokkos_fail.cpp index 9306d62db733..50ab00ec909c 100644 --- a/components/eamxx/tests/generic/fail_check/kokkos_fail.cpp +++ b/components/eamxx/tests/generic/fail_check/kokkos_fail.cpp @@ -1,5 +1,5 @@ -#include "ekat/kokkos/ekat_kokkos_types.hpp" -#include "ekat/kokkos/ekat_subview_utils.hpp" +#include +#include #include diff --git a/components/eamxx/tests/multi-process/dynamics_physics/homme_shoc_cld_spa_p3_rrtmgp_pg2_dp/homme_shoc_cld_spa_p3_rrtmgp_pg2_dp.cpp b/components/eamxx/tests/multi-process/dynamics_physics/homme_shoc_cld_spa_p3_rrtmgp_pg2_dp/homme_shoc_cld_spa_p3_rrtmgp_pg2_dp.cpp index 541d5dd207c0..dd74d5824b44 100644 --- a/components/eamxx/tests/multi-process/dynamics_physics/homme_shoc_cld_spa_p3_rrtmgp_pg2_dp/homme_shoc_cld_spa_p3_rrtmgp_pg2_dp.cpp +++ b/components/eamxx/tests/multi-process/dynamics_physics/homme_shoc_cld_spa_p3_rrtmgp_pg2_dp/homme_shoc_cld_spa_p3_rrtmgp_pg2_dp.cpp @@ -15,7 +15,8 @@ #include "control/atmosphere_surface_coupling_importer.hpp" // EKAT headers -#include "ekat/kokkos/ekat_kokkos_types.hpp" +#include +#include TEST_CASE("scream_homme_physics", "scream_homme_physics") { using namespace scream; diff --git a/components/eamxx/tests/single-process/ml_correction/ml_correction_standalone.cpp b/components/eamxx/tests/single-process/ml_correction/ml_correction_standalone.cpp index 769b49b95027..48c26c9b76d3 100644 --- a/components/eamxx/tests/single-process/ml_correction/ml_correction_standalone.cpp +++ b/components/eamxx/tests/single-process/ml_correction/ml_correction_standalone.cpp @@ -4,7 +4,7 @@ #include "physics/register_physics.hpp" #include "share/grid/mesh_free_grids_manager.hpp" -#include +#include #include #include diff --git a/components/eamxx/tests/single-process/p3/p3_bfb_hash.cpp b/components/eamxx/tests/single-process/p3/p3_bfb_hash.cpp index 521299569aad..e3b54d98d4cf 100644 --- a/components/eamxx/tests/single-process/p3/p3_bfb_hash.cpp +++ b/components/eamxx/tests/single-process/p3/p3_bfb_hash.cpp @@ -1,6 +1,7 @@ #include -#include +#include +#include #include diff --git a/components/eamxx/tests/single-process/rrtmgp/rrtmgp_standalone.cpp b/components/eamxx/tests/single-process/rrtmgp/rrtmgp_standalone.cpp index dc8bf9e8c62f..aeff3c1a3a76 100644 --- a/components/eamxx/tests/single-process/rrtmgp/rrtmgp_standalone.cpp +++ b/components/eamxx/tests/single-process/rrtmgp/rrtmgp_standalone.cpp @@ -6,8 +6,8 @@ #include "share/grid/mesh_free_grids_manager.hpp" #include "share/field/field_utils.hpp" -#include "ekat/ekat_parse_yaml_file.hpp" -#include "ekat/util/ekat_test_utils.hpp" +#include +#include #include diff --git a/components/eamxx/tests/single-process/rrtmgp/rrtmgp_standalone_unit.cpp b/components/eamxx/tests/single-process/rrtmgp/rrtmgp_standalone_unit.cpp index bc7c05b517c7..bc16f82df5d3 100644 --- a/components/eamxx/tests/single-process/rrtmgp/rrtmgp_standalone_unit.cpp +++ b/components/eamxx/tests/single-process/rrtmgp/rrtmgp_standalone_unit.cpp @@ -15,9 +15,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" // EKAT headers -#include #include -#include +#include +#include // RRTMGP #include diff --git a/components/eamxx/tests/single-process/surface_coupling/surface_coupling.cpp b/components/eamxx/tests/single-process/surface_coupling/surface_coupling.cpp index 4eab193d3575..7e2b0d44f616 100644 --- a/components/eamxx/tests/single-process/surface_coupling/surface_coupling.cpp +++ b/components/eamxx/tests/single-process/surface_coupling/surface_coupling.cpp @@ -10,8 +10,8 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_setup_random_test.hpp" -#include -#include +#include +#include #include @@ -460,7 +460,7 @@ TEST_CASE("surface-coupling", "") { // Load ad parameter list std::string fname = "input.yaml"; ekat::ParameterList ad_params("Atmosphere Driver"); - parse_yaml_file(fname,ad_params); + ekat::parse_yaml_file(fname,ad_params); // Parameters auto& ts = ad_params.sublist("time_stepping"); diff --git a/components/eamxx/tests/single-process/zm/zm_standalone.cpp b/components/eamxx/tests/single-process/zm/zm_standalone.cpp index cd0ebf552f9a..c395b14e4aaa 100644 --- a/components/eamxx/tests/single-process/zm/zm_standalone.cpp +++ b/components/eamxx/tests/single-process/zm/zm_standalone.cpp @@ -8,7 +8,7 @@ #include "share/grid/mesh_free_grids_manager.hpp" #include "share/atm_process/atmosphere_process.hpp" -#include "ekat/ekat_parse_yaml_file.hpp" +#include #include #include From 72cc74fc294bde90a9de2057f697162111364824 Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Thu, 15 May 2025 09:53:00 -0600 Subject: [PATCH 06/22] EAMxx: scalar traits changes --- .../atmosphere_surface_coupling_exporter.cpp | 10 +++++----- .../homme/eamxx_homme_process_interface.cpp | 5 ++--- .../dynamics/homme/homme_dynamics_helpers.hpp | 14 -------------- .../eamxx_iop_forcing_process_interface.cpp | 4 +++- .../nudging/eamxx_nudging_process_interface.cpp | 2 +- .../src/physics/share/physics_constants.hpp | 4 +++- components/eamxx/src/share/field/field_impl.hpp | 12 ++++++------ .../src/share/grid/mesh_free_grids_manager.cpp | 13 +++++++------ .../src/share/grid/remap/vertical_remapper.cpp | 2 +- .../eamxx/src/share/io/tests/io_se_grid.cpp | 2 +- .../share/property_checks/field_nan_check.cpp | 16 ++++++---------- .../src/share/util/eamxx_data_interpolation.cpp | 2 +- 12 files changed, 36 insertions(+), 50 deletions(-) diff --git a/components/eamxx/src/control/atmosphere_surface_coupling_exporter.cpp b/components/eamxx/src/control/atmosphere_surface_coupling_exporter.cpp index 9ed0b6d445fd..708866ddaa26 100644 --- a/components/eamxx/src/control/atmosphere_surface_coupling_exporter.cpp +++ b/components/eamxx/src/control/atmosphere_surface_coupling_exporter.cpp @@ -87,7 +87,7 @@ void SurfaceCouplingExporter::create_helper_field (const std::string& name, Field f(id); f.get_header().get_alloc_properties().request_allocation(); f.allocate_view(); - f.deep_copy(ekat::ScalarTraits::invalid()); + f.deep_copy(ekat::invalid()); m_helper_fields[name] = f; } @@ -266,7 +266,7 @@ void SurfaceCouplingExporter::initialize_impl (const RunType /* run_type */) ++m_num_from_file_exports; --m_num_from_model_exports; auto& f_helper = m_helper_fields.at(fname); - // We want to add the field as a deep copy so that the helper_fields are automatically updated. + // We want to add the field as a deep copy so that the helper_fields are automatically updated. m_time_interp.add_field(f_helper.alias(rname), true); m_export_from_file_field_names.push_back(fname); } @@ -288,9 +288,9 @@ void SurfaceCouplingExporter::initialize_impl (const RunType /* run_type */) for (size_t ii=0; ii #include #include -#include -#include +#include #include #include #include @@ -773,7 +772,7 @@ create_helper_field (const std::string& name, Field f(id); f.get_header().get_alloc_properties().request_allocation(pack_size); f.allocate_view(); - f.deep_copy(ekat::ScalarTraits::invalid()); + f.deep_copy(ekat::invalid()); m_helper_fields[name] = f; } diff --git a/components/eamxx/src/dynamics/homme/homme_dynamics_helpers.hpp b/components/eamxx/src/dynamics/homme/homme_dynamics_helpers.hpp index 857423b7aac1..241cb02406f7 100644 --- a/components/eamxx/src/dynamics/homme/homme_dynamics_helpers.hpp +++ b/components/eamxx/src/dynamics/homme/homme_dynamics_helpers.hpp @@ -19,20 +19,6 @@ struct ScalarTraits { using inner_traits = ScalarTraits; static constexpr bool is_simd = true; - - static std::string name () { - return "Homme::Scalar"; - } - - KOKKOS_INLINE_FUNCTION - static const value_type quiet_NaN () { - return value_type(inner_traits::quiet_NaN()); - } - - KOKKOS_INLINE_FUNCTION - static const value_type invalid () { - return value_type(inner_traits::invalid()); - } }; } // namespace ekat diff --git a/components/eamxx/src/physics/iop_forcing/eamxx_iop_forcing_process_interface.cpp b/components/eamxx/src/physics/iop_forcing/eamxx_iop_forcing_process_interface.cpp index 58cb8ae5ac07..c677267b738d 100644 --- a/components/eamxx/src/physics/iop_forcing/eamxx_iop_forcing_process_interface.cpp +++ b/components/eamxx/src/physics/iop_forcing/eamxx_iop_forcing_process_interface.cpp @@ -3,6 +3,8 @@ #include "share/field/field_utils.hpp" #include "share/property_checks/field_within_interval_check.hpp" +#include + namespace scream { // ========================================================================================= @@ -111,7 +113,7 @@ void IOPForcing::create_helper_field (const std::string& name, Field f(id); f.get_header().get_alloc_properties().request_allocation(ps); f.allocate_view(); - f.deep_copy(ekat::ScalarTraits::invalid()); + f.deep_copy(ekat::invalid()); m_helper_fields[name] = f; } diff --git a/components/eamxx/src/physics/nudging/eamxx_nudging_process_interface.cpp b/components/eamxx/src/physics/nudging/eamxx_nudging_process_interface.cpp index db138c88c0ed..a89db610cd31 100644 --- a/components/eamxx/src/physics/nudging/eamxx_nudging_process_interface.cpp +++ b/components/eamxx/src/physics/nudging/eamxx_nudging_process_interface.cpp @@ -552,7 +552,7 @@ Field Nudging::create_helper_field (const std::string& name, Field f(id); f.get_header().get_alloc_properties().request_allocation(ps); f.allocate_view(); - f.deep_copy(ekat::ScalarTraits::invalid()); + f.deep_copy(ekat::invalid()); m_helper_fields[name] = f; return m_helper_fields[name]; diff --git a/components/eamxx/src/physics/share/physics_constants.hpp b/components/eamxx/src/physics/share/physics_constants.hpp index f9ff800be240..2514802b5bc9 100644 --- a/components/eamxx/src/physics/share/physics_constants.hpp +++ b/components/eamxx/src/physics/share/physics_constants.hpp @@ -4,7 +4,9 @@ #include "share/eamxx_types.hpp" #include +#include +#include #include namespace scream { @@ -147,7 +149,7 @@ Scalar Constants::get_gas_mol_weight(ci_string gas_name) { } else if (gas_name == "cfc12" ) { return 120.; } - return ekat::ScalarTraits::invalid(); + return ekat::invalid(); } template diff --git a/components/eamxx/src/share/field/field_impl.hpp b/components/eamxx/src/share/field/field_impl.hpp index 4d70bb052df2..a5365415c872 100644 --- a/components/eamxx/src/share/field/field_impl.hpp +++ b/components/eamxx/src/share/field/field_impl.hpp @@ -337,21 +337,21 @@ deep_copy (const ST value) { case DataType::IntType: EKAT_REQUIRE_MSG( (std::is_convertible::value), "Error! Input value type is not convertible to field data type.\n" - " - Input value type: " + ekat::ScalarTraits::name() + "\n" + " - Input value type: " + std::string(typeid(ST).name()) + "\n" " - Field data type : " + e2str(my_data_type) + "\n"); deep_copy_impl(value,*this); // 2nd arg unused break; case DataType::FloatType: EKAT_REQUIRE_MSG( (std::is_convertible::value), "Error! Input value type is not convertible to field data type.\n" - " - Input value type: " + ekat::ScalarTraits::name() + "\n" + " - Input value type: " + std::string(typeid(ST).name()) + "\n" " - Field data type : " + e2str(my_data_type) + "\n"); deep_copy_impl(value,*this); // 2nd arg unused break; case DataType::DoubleType: EKAT_REQUIRE_MSG( (std::is_convertible::value), "Error! Input value type is not convertible to field data type.\n" - " - Input value type: " + ekat::ScalarTraits::name() + "\n" + " - Input value type: " + std::string(typeid(ST).name()) + "\n" " - Field data type : " + e2str(my_data_type) + "\n"); deep_copy_impl(value,*this); // 2nd arg unused break; @@ -372,21 +372,21 @@ deep_copy (const ST value, const Field& mask) case DataType::IntType: EKAT_REQUIRE_MSG( (std::is_convertible::value), "Error! Input value type is not convertible to field data type.\n" - " - Input value type: " + ekat::ScalarTraits::name() + "\n" + " - Input value type: " + std::string(typeid(ST).name()) + "\n" " - Field data type : " + e2str(my_data_type) + "\n"); deep_copy_impl(value,mask); break; case DataType::FloatType: EKAT_REQUIRE_MSG( (std::is_convertible::value), "Error! Input value type is not convertible to field data type.\n" - " - Input value type: " + ekat::ScalarTraits::name() + "\n" + " - Input value type: " + std::string(typeid(ST).name()) + "\n" " - Field data type : " + e2str(my_data_type) + "\n"); deep_copy_impl(value,mask); break; case DataType::DoubleType: EKAT_REQUIRE_MSG( (std::is_convertible::value), "Error! Input value type is not convertible to field data type.\n" - " - Input value type: " + ekat::ScalarTraits::name() + "\n" + " - Input value type: " + std::string(typeid(ST).name()) + "\n" " - Field data type : " + e2str(my_data_type) + "\n"); deep_copy_impl(value,mask); break; diff --git a/components/eamxx/src/share/grid/mesh_free_grids_manager.cpp b/components/eamxx/src/share/grid/mesh_free_grids_manager.cpp index 0e0f49549235..69524ef0c98d 100644 --- a/components/eamxx/src/share/grid/mesh_free_grids_manager.cpp +++ b/components/eamxx/src/share/grid/mesh_free_grids_manager.cpp @@ -159,12 +159,13 @@ add_geo_data (const nonconstgrid_ptr_type& grid) const auto lev = grid->create_geometry_data("lev" , layout_mid, units); auto ilev = grid->create_geometry_data("ilev" , layout_int, units); - lat.deep_copy(ekat::ScalarTraits::invalid()); - lon.deep_copy(ekat::ScalarTraits::invalid()); - hyam.deep_copy(ekat::ScalarTraits::invalid()); - hybm.deep_copy(ekat::ScalarTraits::invalid()); - lev.deep_copy(ekat::ScalarTraits::invalid()); - ilev.deep_copy(ekat::ScalarTraits::invalid()); + const auto invalid = ekat::invalid(); + lat.deep_copy(invalid);; + lon.deep_copy(invalid); + hyam.deep_copy(invalid); + hybm.deep_copy(invalid); + lev.deep_copy(invalid); + ilev.deep_copy(invalid); lat.sync_to_dev(); lon.sync_to_dev(); hyam.sync_to_dev(); diff --git a/components/eamxx/src/share/grid/remap/vertical_remapper.cpp b/components/eamxx/src/share/grid/remap/vertical_remapper.cpp index f7e21a1af441..0277c8b5f4e7 100644 --- a/components/eamxx/src/share/grid/remap/vertical_remapper.cpp +++ b/components/eamxx/src/share/grid/remap/vertical_remapper.cpp @@ -87,7 +87,7 @@ set_extrapolation_type (const ExtrapType etype, const TopBot where) void VerticalRemapper:: set_mask_value (const Real mask_val) { - EKAT_REQUIRE_MSG (not ekat::is_invalid(mask_val), + EKAT_REQUIRE_MSG (not Kokkos::isnan(mask_val), "[VerticalRemapper::set_mask_value] Error! Input mask value must be a valid number.\n"); m_mask_val = mask_val; diff --git a/components/eamxx/src/share/io/tests/io_se_grid.cpp b/components/eamxx/src/share/io/tests/io_se_grid.cpp index ee722fdf5b76..10ec9225d30c 100644 --- a/components/eamxx/src/share/io/tests/io_se_grid.cpp +++ b/components/eamxx/src/share/io/tests/io_se_grid.cpp @@ -80,7 +80,7 @@ TEST_CASE("se_grid_io") const auto fnames = {"field_1", "field_2", "field_3", "field_packed"}; for (const auto& fname : fnames) { auto f = fm1->get_field(fname); - f.deep_copy(ekat::ScalarTraits::invalid()); + f.deep_copy(ekat::invalid()); } // Check fields were written correctly diff --git a/components/eamxx/src/share/property_checks/field_nan_check.cpp b/components/eamxx/src/share/property_checks/field_nan_check.cpp index 0734cdafd8c4..cad653337e1e 100644 --- a/components/eamxx/src/share/property_checks/field_nan_check.cpp +++ b/components/eamxx/src/share/property_checks/field_nan_check.cpp @@ -2,8 +2,6 @@ #include "share/field/field_utils.hpp" #include "share/util//eamxx_array_utils.hpp" -#include "ekat/util/ekat_math_utils.hpp" - namespace scream { @@ -51,7 +49,7 @@ PropertyCheck::ResultAndMsg FieldNaNCheck::check_impl() const { { auto v = f.template get_strided_view(); Kokkos::parallel_reduce(size, KOKKOS_LAMBDA(int i, int& result) { - if (ekat::is_invalid(v(i))) { + if (Kokkos::isnan(v(i))) { result = i; } }, max_t(invalid_idx)); @@ -63,7 +61,7 @@ PropertyCheck::ResultAndMsg FieldNaNCheck::check_impl() const { Kokkos::parallel_reduce(size, KOKKOS_LAMBDA(int idx, int& result) { int i,j; unflatten_idx(idx,extents,i,j); - if (ekat::is_invalid(v(i,j))) { + if (Kokkos::isnan(v(i,j))) { result = idx; } }, max_t(invalid_idx)); @@ -75,7 +73,7 @@ PropertyCheck::ResultAndMsg FieldNaNCheck::check_impl() const { Kokkos::parallel_reduce(size, KOKKOS_LAMBDA(int idx, int& result) { int i,j,k; unflatten_idx(idx,extents,i,j,k); - if (ekat::is_invalid(v(i,j,k))) { + if (Kokkos::isnan(v(i,j,k))) { result = idx; } }, max_t(invalid_idx)); @@ -87,7 +85,7 @@ PropertyCheck::ResultAndMsg FieldNaNCheck::check_impl() const { Kokkos::parallel_reduce(size, KOKKOS_LAMBDA(int idx, int& result) { int i,j,k,l; unflatten_idx(idx,extents,i,j,k,l); - if (ekat::is_invalid(v(i,j,k,l))) { + if (Kokkos::isnan(v(i,j,k,l))) { result = idx; } }, max_t(invalid_idx)); @@ -99,7 +97,7 @@ PropertyCheck::ResultAndMsg FieldNaNCheck::check_impl() const { Kokkos::parallel_reduce(size, KOKKOS_LAMBDA(int idx, int& result) { int i,j,k,l,m; unflatten_idx(idx,extents,i,j,k,l,m); - if (ekat::is_invalid(v(i,j,k,l,m))) { + if (Kokkos::isnan(v(i,j,k,l,m))) { result = idx; } }, max_t(invalid_idx)); @@ -111,7 +109,7 @@ PropertyCheck::ResultAndMsg FieldNaNCheck::check_impl() const { Kokkos::parallel_reduce(size, KOKKOS_LAMBDA(int idx, int& result) { int i,j,k,l,m,n; unflatten_idx(idx,extents,i,j,k,l,m,n); - if (ekat::is_invalid(v(i,j,k,l,m,n))) { + if (Kokkos::isnan(v(i,j,k,l,m,n))) { result = idx; } }, max_t(invalid_idx)); @@ -175,8 +173,6 @@ PropertyCheck::ResultAndMsg FieldNaNCheck::check() const { const auto& f = fields().front(); switch (f.data_type()) { - case DataType::IntType: - return check_impl(); case DataType::FloatType: return check_impl(); case DataType::DoubleType: diff --git a/components/eamxx/src/share/util/eamxx_data_interpolation.cpp b/components/eamxx/src/share/util/eamxx_data_interpolation.cpp index ef58080ca0ef..cad10cbf6137 100644 --- a/components/eamxx/src/share/util/eamxx_data_interpolation.cpp +++ b/components/eamxx/src/share/util/eamxx_data_interpolation.cpp @@ -428,7 +428,7 @@ create_horiz_remappers (const Real iop_lat, const Real iop_lon) EKAT_REQUIRE_MSG (m_horiz_remapper_beg==nullptr, "[DataInterpolation] Error! Horizontal remappers were already setup.\n"); - EKAT_REQUIRE_MSG (not ekat::is_invalid(iop_lat) and not ekat::is_invalid(iop_lon), + EKAT_REQUIRE_MSG (not std::isnan(iop_lat) and not std::isnan(iop_lon), "[DataInterpolation] Error! At least one between iop_lat and iop_lon appears to be invalid.\n" " - iop_lat: " << iop_lat << "\n" " - iop_lon: " << iop_lon << "\n"); From 4662bdd3076d4e118024c133c23597b28ecffdcc Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Thu, 15 May 2025 09:47:41 -0600 Subject: [PATCH 07/22] EAMxx: assert macro related changes --- components/eamxx/src/dynamics/homme/homme_grids_manager.cpp | 2 +- components/eamxx/src/share/atm_process/ATMBufferManager.hpp | 6 +++--- .../src/share/atm_process/atmosphere_process_group.cpp | 5 +++-- .../src/share/atm_process/atmosphere_process_utils.hpp | 2 +- components/eamxx/src/share/util/eamxx_combine_ops.hpp | 1 + 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/components/eamxx/src/dynamics/homme/homme_grids_manager.cpp b/components/eamxx/src/dynamics/homme/homme_grids_manager.cpp index c8feae9ed4d9..503c83ed7db5 100644 --- a/components/eamxx/src/dynamics/homme/homme_grids_manager.cpp +++ b/components/eamxx/src/dynamics/homme/homme_grids_manager.cpp @@ -83,7 +83,7 @@ HommeGridsManager::do_create_remapper (const grid_ptr_type from_grid, return std::make_shared(pd_remapper); } } else { - ekat::error::runtime_abort("Error! P-D remapping only implemented for 'physics_gll' phys grid.\n"); + EKAT_ERROR_MSG("Error! P-D remapping only implemented for 'physics_gll' phys grid.\n"); } return nullptr; } diff --git a/components/eamxx/src/share/atm_process/ATMBufferManager.hpp b/components/eamxx/src/share/atm_process/ATMBufferManager.hpp index c48ba3998dab..fd17ad78fc02 100644 --- a/components/eamxx/src/share/atm_process/ATMBufferManager.hpp +++ b/components/eamxx/src/share/atm_process/ATMBufferManager.hpp @@ -27,8 +27,8 @@ struct ATMBufferManager { // the same time, the total allocation will be the maximum // of each request. void request_bytes (const size_t num_bytes) { - ekat::error::runtime_check(num_bytes%sizeof(Real)==0, - "Error! Must request number of bytes which is divisible by sizeof(Real).\n"); + EKAT_REQUIRE_MSG (num_bytes%sizeof(Real)==0, + "Error! Must request number of bytes which is divisible by sizeof(Real).\n"); const size_t num_reals = num_bytes/sizeof(Real); m_size = std::max(num_reals, m_size); @@ -39,7 +39,7 @@ struct ATMBufferManager { size_t allocated_bytes () const { return m_size*sizeof(Real); } void allocate () { - ekat::error::runtime_check(!m_allocated, "Error! Cannot call 'allocate' more than once.\n"); + EKAT_REQUIRE_MSG (!m_allocated, "Error! Cannot call 'allocate' more than once.\n"); m_buffer = view_1d("",m_size); m_allocated = true; diff --git a/components/eamxx/src/share/atm_process/atmosphere_process_group.cpp b/components/eamxx/src/share/atm_process/atmosphere_process_group.cpp index 9402c70c63fd..641568af1e36 100644 --- a/components/eamxx/src/share/atm_process/atmosphere_process_group.cpp +++ b/components/eamxx/src/share/atm_process/atmosphere_process_group.cpp @@ -5,6 +5,7 @@ #include #include +#include #include @@ -24,9 +25,9 @@ AtmosphereProcessGroup (const ekat::Comm& comm, const ekat::ParameterList& param m_group_schedule_type = ScheduleType::Sequential; } else if (m_params.get("schedule_type") == "parallel") { m_group_schedule_type = ScheduleType::Parallel; - ekat::error::runtime_abort("Error! Parallel schedule not yet implemented.\n"); + EKAT_ERROR_MSG("Error! Parallel schedule not yet implemented.\n"); } else { - ekat::error::runtime_abort("Error! Invalid 'schedule_type'. Available choices are 'parallel' and 'sequential'.\n"); + EKAT_ERROR_MSG("Error! Invalid 'schedule_type'. Available choices are 'parallel' and 'sequential'.\n"); } } else { // Pointless to handle this group as parallel, if only one process is in it diff --git a/components/eamxx/src/share/atm_process/atmosphere_process_utils.hpp b/components/eamxx/src/share/atm_process/atmosphere_process_utils.hpp index e1c78104e672..614c77fd28d8 100644 --- a/components/eamxx/src/share/atm_process/atmosphere_process_utils.hpp +++ b/components/eamxx/src/share/atm_process/atmosphere_process_utils.hpp @@ -30,7 +30,7 @@ inline std::string e2str (const AtmosphereProcessType ap_type) { case AtmosphereProcessType::Group: return "Atmosphere Process Group"; case AtmosphereProcessType::Diagnostic: return "Atmosphere Diagnostic"; default: - ekat::error::runtime_abort("Error! Unrecognized atmosphere process type.\n"); + EKAT_ERROR_MSG("Error! Unrecognized atmosphere process type.\n"); } return "INVALID"; } diff --git a/components/eamxx/src/share/util/eamxx_combine_ops.hpp b/components/eamxx/src/share/util/eamxx_combine_ops.hpp index 080409355136..f23c48f2f984 100644 --- a/components/eamxx/src/share/util/eamxx_combine_ops.hpp +++ b/components/eamxx/src/share/util/eamxx_combine_ops.hpp @@ -6,6 +6,7 @@ #include #include #include +#include // For KOKKOS_INLINE_FUNCTION #include From 28d7a6e642dddb7d41fcb27637888503baa86d9e Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Thu, 15 May 2025 09:50:12 -0600 Subject: [PATCH 08/22] EAMxx: replace ExecSpaceUtils with TeamPolicyFactory and ReductionUtils --- .../eamxx/docs/developer/kokkos_ekat.md | 4 +- components/eamxx/scripts/gen_boiler.py | 9 +- .../atmosphere_surface_coupling_exporter.cpp | 6 +- .../eamxx/src/diagnostics/aerocom_cld.cpp | 10 +- components/eamxx/src/diagnostics/aodvis.cpp | 12 +- .../eamxx/src/diagnostics/atm_backtend.cpp | 2 - .../src/diagnostics/dry_static_energy.cpp | 5 +- .../diagnostics/longwave_cloud_forcing.cpp | 6 +- .../eamxx/src/diagnostics/number_path.cpp | 6 +- .../diagnostics/shortwave_cloud_forcing.cpp | 6 +- .../diagnostics/tests/atm_density_test.cpp | 5 +- .../tests/dry_static_energy_test.cpp | 5 +- .../src/diagnostics/tests/exner_test.cpp | 5 +- .../tests/longwave_cloud_forcing_tests.cpp | 9 +- .../tests/potential_temperature_test.cpp | 5 +- .../tests/relative_humidity_tests.cpp | 5 +- .../tests/shortwave_cloud_forcing_tests.cpp | 5 +- .../diagnostics/tests/vapor_flux_tests.cpp | 6 +- .../tests/virtual_temperature_test.cpp | 5 +- .../diagnostics/tests/water_path_tests.cpp | 6 +- .../eamxx/src/diagnostics/vapor_flux.cpp | 6 +- .../eamxx/src/diagnostics/vert_contract.cpp | 6 +- .../eamxx/src/diagnostics/vertical_layer.cpp | 5 +- .../eamxx/src/diagnostics/water_path.cpp | 6 +- .../eamxx/src/diagnostics/zonal_avg.cpp | 8 +- .../dynamics/homme/eamxx_homme_fv_phys.cpp | 7 +- .../homme/eamxx_homme_process_interface.cpp | 23 ++-- .../homme/eamxx_homme_rayleigh_friction.cpp | 6 +- .../cld_fraction/cld_fraction_main_impl.hpp | 5 +- .../eamxx/src/physics/cosp/eamxx_cosp.cpp | 4 +- .../eamxx_iop_forcing_process_interface.cpp | 16 ++- .../eamxx_iop_forcing_process_interface.hpp | 1 - .../mam/eamxx_mam_aci_process_interface.cpp | 7 +- ...eamxx_mam_constituent_fluxes_interface.cpp | 8 +- .../eamxx_mam_dry_deposition_functions.hpp | 17 +-- ...x_mam_dry_deposition_process_interface.cpp | 6 +- .../eamxx_mam_generic_process_interface.cpp | 10 +- ...mxx_mam_microphysics_process_interface.cpp | 10 +- .../eamxx_mam_optics_process_interface.cpp | 9 +- ...mam_srf_and_online_emissions_functions.hpp | 7 +- ...and_online_emissions_process_interface.cpp | 6 +- .../eamxx_mam_wetscav_process_interface.cpp | 10 +- .../eamxx/src/physics/mam/mam_coupling.hpp | 2 +- .../mam/readfiles/marine_organics_impl.hpp | 8 +- .../mam/readfiles/tracer_reader_utils.hpp | 13 +-- .../src/physics/mam/srf_emission_impl.hpp | 6 +- .../eamxx_ml_correction_process_interface.cpp | 12 +- .../eamxx_nudging_process_interface.cpp | 8 +- .../p3/disp/p3_check_values_impl_disp.cpp | 5 +- .../p3/disp/p3_cloud_sed_impl_disp.cpp | 5 +- .../physics/p3/disp/p3_ice_sed_impl_disp.cpp | 9 +- .../src/physics/p3/disp/p3_main_impl_disp.cpp | 5 +- .../p3/disp/p3_main_impl_part1_disp.cpp | 5 +- .../p3/disp/p3_main_impl_part2_disp.cpp | 5 +- .../p3/disp/p3_main_impl_part3_disp.cpp | 5 +- .../physics/p3/disp/p3_rain_sed_impl_disp.cpp | 5 +- .../physics/p3/eamxx_p3_process_interface.cpp | 13 ++- .../eamxx/src/physics/p3/eamxx_p3_run.cpp | 6 +- .../src/physics/p3/impl/p3_main_impl.hpp | 4 +- .../physics/p3/tests/infra/p3_test_data.cpp | 35 ++++-- .../physics/p3/tests/p3_find_unit_tests.cpp | 7 +- .../p3/tests/p3_ice_collection_unit_tests.cpp | 1 - .../p3/tests/p3_ice_tables_unit_tests.cpp | 2 +- ...p3_subgrid_variance_scaling_unit_tests.cpp | 39 ++++--- .../physics/p3/tests/p3_upwind_unit_tests.cpp | 10 +- .../rrtmgp/eamxx_rrtmgp_process_interface.cpp | 22 ++-- .../eamxx/src/physics/share/eamxx_trcmix.cpp | 4 +- .../shoc/disp/shoc_assumed_pdf_disp.cpp | 4 +- .../physics/shoc/disp/shoc_check_tke_disp.cpp | 4 +- .../shoc_compute_shoc_temperature_disp.cpp | 4 +- .../disp/shoc_compute_shoc_vapor_disp.cpp | 4 +- .../shoc_diag_second_shoc_moments_disp.cpp | 4 +- .../shoc_diag_third_shoc_moments_disp.cpp | 4 +- .../shoc/disp/shoc_energy_fixer_disp.cpp | 4 +- .../shoc/disp/shoc_energy_integrals_disp.cpp | 4 +- .../src/physics/shoc/disp/shoc_grid_disp.cpp | 4 +- .../physics/shoc/disp/shoc_length_disp.cpp | 4 +- .../physics/shoc/disp/shoc_pblintd_disp.cpp | 4 +- .../src/physics/shoc/disp/shoc_tke_disp.cpp | 4 +- .../shoc/disp/shoc_update_host_dse_disp.cpp | 4 +- .../shoc_update_prognostics_implicit_disp.cpp | 4 +- .../shoc/eamxx_shoc_process_interface.cpp | 27 +++-- .../shoc_compute_l_inf_shoc_length_impl.hpp | 12 +- .../shoc/impl/shoc_energy_integrals_impl.hpp | 13 ++- .../impl/shoc_integ_column_stability_impl.hpp | 13 ++- .../src/physics/shoc/impl/shoc_main_impl.hpp | 10 +- .../shoc/tests/infra/shoc_test_data.cpp | 110 ++++++++++++------ .../tms/eamxx_tms_process_interface.cpp | 5 +- .../physics/tms/tests/infra/tms_test_data.cpp | 7 +- .../src/share/atm_process/IOPDataManager.cpp | 14 ++- .../src/share/atm_process/IOPDataManager.hpp | 5 - .../src/share/field/field_utils_impl.hpp | 17 ++- .../share/grid/remap/coarsening_remapper.cpp | 34 +++--- .../grid/remap/horiz_interp_remapper_base.cpp | 10 +- .../grid/remap/refining_remapper_p2p.cpp | 18 +-- .../grid/remap/refining_remapper_rma.cpp | 1 - .../share/grid/remap/vertical_remapper.cpp | 26 ++--- ...s_and_energy_column_conservation_check.cpp | 25 ++-- ...s_and_energy_column_conservation_check.hpp | 3 - .../tests/common_physics_functions_tests.cpp | 6 +- .../share/util/eamxx_data_interpolation.cpp | 6 +- .../rrtmgp/rrtmgp_standalone_unit.cpp | 7 +- .../surface_coupling/surface_coupling.cpp | 10 +- 103 files changed, 596 insertions(+), 380 deletions(-) diff --git a/components/eamxx/docs/developer/kokkos_ekat.md b/components/eamxx/docs/developer/kokkos_ekat.md index 6ebf23ba1aac..078abcbbdfe1 100644 --- a/components/eamxx/docs/developer/kokkos_ekat.md +++ b/components/eamxx/docs/developer/kokkos_ekat.md @@ -242,7 +242,9 @@ will _not_ error out, but race conditions will exist among threads. ### KokkosTypes -### ExeSpaceUtils +### TeamPolicyFactory + +### ReductionUtils ### Vectorization: Packs diff --git a/components/eamxx/scripts/gen_boiler.py b/components/eamxx/scripts/gen_boiler.py index 6d0908521c1c..e25dd9d5e88b 100644 --- a/components/eamxx/scripts/gen_boiler.py +++ b/components/eamxx/scripts/gen_boiler.py @@ -15,13 +15,14 @@ f"""#include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "physics/{phys}/{phys}_functions.hpp" #include "physics/{phys}/tests/infra/{phys}_test_data.hpp" #include "{phys}_unit_tests_common.hpp" +#include +#include + namespace scream {{ namespace {phys} {{ namespace unit_test {{ @@ -1903,7 +1904,7 @@ def gen_cxx_f2c_bind_impl(self, phys, sub, force_arg_data=None): vals_d(btemp_d_1[0]); const Int nk_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = ekat::TeamPolicyFactory::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -2111,7 +2112,7 @@ def gen_cxx_f2c_bind_impl(self, phys, sub, force_arg_data=None): # 4) Get nk_pack and policy, launch kernel # impl += " const Int nk_pack = ekat::npack(nlev);\n" - impl += " const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack);\n" + impl += " const auto policy = ekat::TeamPolicyFactory::get_default_team_policy(shcol, nk_pack);\n" impl += " Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) {\n" impl += " const Int i = team.league_rank();\n\n" diff --git a/components/eamxx/src/control/atmosphere_surface_coupling_exporter.cpp b/components/eamxx/src/control/atmosphere_surface_coupling_exporter.cpp index 708866ddaa26..a8793375578b 100644 --- a/components/eamxx/src/control/atmosphere_surface_coupling_exporter.cpp +++ b/components/eamxx/src/control/atmosphere_surface_coupling_exporter.cpp @@ -1,5 +1,6 @@ #include "atmosphere_surface_coupling_exporter.hpp" +#include #include #include @@ -364,7 +365,8 @@ void SurfaceCouplingExporter::set_from_file_exports() // index query in the below. void SurfaceCouplingExporter::compute_eamxx_exports(const double dt, const bool called_during_initialization) { - using PC = physics::Constants; + using PC = physics::Constants; + using TPF = ekat::TeamPolicyFactory; const auto& p_int = get_field_in("p_int").get_view(); const auto& pseudo_density = get_field_in("pseudo_density").get_view(); @@ -432,7 +434,7 @@ void SurfaceCouplingExporter::compute_eamxx_exports(const double dt, const bool // Preprocess exports auto export_source = m_export_source; - const auto setup_policy = ekat::ExeSpaceUtils::get_thread_range_parallel_scan_team_policy(num_cols, num_levs); + const auto setup_policy = TPF::get_thread_range_parallel_scan_team_policy(num_cols, num_levs); Kokkos::parallel_for(setup_policy, KOKKOS_LAMBDA(const Kokkos::TeamPolicy::member_type& team) { const int i = team.league_rank(); diff --git a/components/eamxx/src/diagnostics/aerocom_cld.cpp b/components/eamxx/src/diagnostics/aerocom_cld.cpp index 2cf70dacad52..d84d3820afa4 100644 --- a/components/eamxx/src/diagnostics/aerocom_cld.cpp +++ b/components/eamxx/src/diagnostics/aerocom_cld.cpp @@ -1,11 +1,11 @@ #include "diagnostics/aerocom_cld.hpp" -#include -#include - #include "diagnostics/aerocom_cld_util.hpp" #include "share/util/eamxx_common_physics_functions.hpp" +#include +#include + namespace scream { AeroComCld::AeroComCld(const ekat::Comm &comm, @@ -98,7 +98,7 @@ void AeroComCld::compute_diagnostic_impl() { */ using KT = KokkosTypes; using MT = typename KT::MemberType; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; using PF = scream::PhysicsFunctions; @@ -124,7 +124,7 @@ void AeroComCld::compute_diagnostic_impl() { auto q_threshold = q_thresh_set(); auto cldfrac_tot_threshold = cldfrac_tot_thresh_set(); - const auto policy = ESU::get_default_team_policy(m_ncols, m_nlevs); + const auto policy = TPF::get_default_team_policy(m_ncols, m_nlevs); const auto out = m_diagnostic_output.get_view(); diff --git a/components/eamxx/src/diagnostics/aodvis.cpp b/components/eamxx/src/diagnostics/aodvis.cpp index 342e3c2f5aa7..0c3f7f806d8c 100644 --- a/components/eamxx/src/diagnostics/aodvis.cpp +++ b/components/eamxx/src/diagnostics/aodvis.cpp @@ -1,9 +1,10 @@ #include "diagnostics/aodvis.hpp" -#include - #include "share/util/eamxx_universal_constants.hpp" +#include +#include + namespace scream { AODVis::AODVis(const ekat::Comm &comm, const ekat::ParameterList ¶ms) @@ -64,7 +65,8 @@ void AODVis::initialize_impl(const RunType /*run_type*/) { void AODVis::compute_diagnostic_impl() { using KT = KokkosTypes; using MT = typename KT::MemberType; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; + using RU = ekat::ReductionUtils; const auto aod = m_diagnostic_output.get_view(); const auto mask = m_diagnostic_output.get_header() @@ -77,7 +79,7 @@ void AODVis::compute_diagnostic_impl() { const auto num_levs = m_nlevs; const auto var_fill_value = m_mask_val; - const auto policy = ESU::get_default_team_policy(m_ncols, m_nlevs); + const auto policy = TPF::get_default_team_policy(m_ncols, m_nlevs); Kokkos::parallel_for( "Compute " + m_diagnostic_output.name(), policy, KOKKOS_LAMBDA(const MT &team) { const int icol = team.league_rank(); @@ -86,7 +88,7 @@ void AODVis::compute_diagnostic_impl() { Kokkos::single(Kokkos::PerTeam(team), [&] { mask(icol) = 0; }); } else { auto tau_icol = ekat::subview(tau_vis, icol); - aod(icol) = ESU::view_reduction(team, 0, num_levs, tau_icol); + aod(icol) = RU::view_reduction(team, 0, num_levs, tau_icol); Kokkos::single(Kokkos::PerTeam(team), [&] { mask(icol) = 1; }); } }); diff --git a/components/eamxx/src/diagnostics/atm_backtend.cpp b/components/eamxx/src/diagnostics/atm_backtend.cpp index 80e2566521ee..f31b3c76158d 100644 --- a/components/eamxx/src/diagnostics/atm_backtend.cpp +++ b/components/eamxx/src/diagnostics/atm_backtend.cpp @@ -1,7 +1,5 @@ #include "diagnostics/atm_backtend.hpp" -#include - #include "share/util/eamxx_universal_constants.hpp" namespace scream { diff --git a/components/eamxx/src/diagnostics/dry_static_energy.cpp b/components/eamxx/src/diagnostics/dry_static_energy.cpp index 20aeb593a365..e2aea7afc9d8 100644 --- a/components/eamxx/src/diagnostics/dry_static_energy.cpp +++ b/components/eamxx/src/diagnostics/dry_static_energy.cpp @@ -1,7 +1,7 @@ #include "diagnostics/dry_static_energy.hpp" #include "share/util/eamxx_common_physics_functions.hpp" -#include +#include namespace scream { @@ -51,8 +51,9 @@ void DryStaticEnergyDiagnostic::compute_diagnostic_impl() { using MemberType = typename KT::MemberType; using PF = PhysicsFunctions; + using TPF = ekat::TeamPolicyFactory; - const auto default_policy = ekat::ExeSpaceUtils::get_thread_range_parallel_scan_team_policy(m_num_cols, m_num_levs); + const auto default_policy = TPF::get_thread_range_parallel_scan_team_policy(m_num_cols, m_num_levs); const auto& dse = m_diagnostic_output.get_view(); const auto& T_mid = get_field_in("T_mid").get_view(); diff --git a/components/eamxx/src/diagnostics/longwave_cloud_forcing.cpp b/components/eamxx/src/diagnostics/longwave_cloud_forcing.cpp index 78350189ffb1..9857125eb426 100644 --- a/components/eamxx/src/diagnostics/longwave_cloud_forcing.cpp +++ b/components/eamxx/src/diagnostics/longwave_cloud_forcing.cpp @@ -1,6 +1,6 @@ #include "diagnostics/longwave_cloud_forcing.hpp" -#include +#include namespace scream { @@ -43,10 +43,10 @@ void LongwaveCloudForcingDiagnostic::set_grids(const std::shared_ptr; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename KT::MemberType; - const auto default_policy = ESU::get_default_team_policy(m_num_cols,1); + const auto default_policy = TPF::get_default_team_policy(m_num_cols,1); const auto& LWCF = m_diagnostic_output.get_view(); const auto& LW_flux_up = get_field_in("LW_flux_up").get_view(); diff --git a/components/eamxx/src/diagnostics/number_path.cpp b/components/eamxx/src/diagnostics/number_path.cpp index 981e2e29a9c1..50acd1b0eb11 100644 --- a/components/eamxx/src/diagnostics/number_path.cpp +++ b/components/eamxx/src/diagnostics/number_path.cpp @@ -1,6 +1,6 @@ #include "diagnostics/number_path.hpp" -#include +#include #include "physics/share/physics_constants.hpp" @@ -62,7 +62,7 @@ void NumberPathDiagnostic::compute_diagnostic_impl() { using PC = scream::physics::Constants; using KT = KokkosTypes; using MT = typename KT::MemberType; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; constexpr Real g = PC::gravit; @@ -72,7 +72,7 @@ void NumberPathDiagnostic::compute_diagnostic_impl() { const auto rho = get_field_in("pseudo_density").get_view(); const auto num_levs = m_num_levs; - const auto policy = ESU::get_default_team_policy(m_num_cols, m_num_levs); + const auto policy = TPF::get_default_team_policy(m_num_cols, m_num_levs); Kokkos::parallel_for( "Compute " + m_kind + name(), policy, KOKKOS_LAMBDA(const MT &team) { const int icol = team.league_rank(); diff --git a/components/eamxx/src/diagnostics/shortwave_cloud_forcing.cpp b/components/eamxx/src/diagnostics/shortwave_cloud_forcing.cpp index 3a4178b541a1..7a3f40875a15 100644 --- a/components/eamxx/src/diagnostics/shortwave_cloud_forcing.cpp +++ b/components/eamxx/src/diagnostics/shortwave_cloud_forcing.cpp @@ -1,6 +1,6 @@ #include "diagnostics/shortwave_cloud_forcing.hpp" -#include +#include namespace scream { @@ -41,10 +41,10 @@ void ShortwaveCloudForcingDiagnostic::set_grids(const std::shared_ptr; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename KT::MemberType; - const auto default_policy = ESU::get_default_team_policy(m_num_cols,1); + const auto default_policy = TPF::get_default_team_policy(m_num_cols,1); const auto& SWCF = m_diagnostic_output.get_view(); const auto& SW_flux_dn = get_field_in("SW_flux_dn").get_view(); diff --git a/components/eamxx/src/diagnostics/tests/atm_density_test.cpp b/components/eamxx/src/diagnostics/tests/atm_density_test.cpp index 257ee6a271c3..6be0f1292640 100644 --- a/components/eamxx/src/diagnostics/tests/atm_density_test.cpp +++ b/components/eamxx/src/diagnostics/tests/atm_density_test.cpp @@ -10,9 +10,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" #include +#include #include @@ -47,6 +47,7 @@ void run(std::mt19937_64& engine) using KT = ekat::KokkosTypes; using ExecSpace = typename KT::ExeSpace; using MemberType = typename KT::MemberType; + using TPF = ekat::TeamPolicyFactory; const int packsize = SCREAM_PACK_SIZE; constexpr int num_levs = packsize*2 + 1; // Number of levels to use for tests, make sure the last pack can also have some empty slots (packsize>1). @@ -59,7 +60,7 @@ void run(std::mt19937_64& engine) auto gm = create_gm(comm,ncols,num_levs); // Kokkos Policy - auto policy = ekat::ExeSpaceUtils::get_default_team_policy(ncols, num_levs); + auto policy = TPF::get_default_team_policy(ncols, num_levs); // Construct random input data using RPDF = std::uniform_real_distribution; diff --git a/components/eamxx/src/diagnostics/tests/dry_static_energy_test.cpp b/components/eamxx/src/diagnostics/tests/dry_static_energy_test.cpp index d4bcbdae50b9..c51c0be1ea9b 100644 --- a/components/eamxx/src/diagnostics/tests/dry_static_energy_test.cpp +++ b/components/eamxx/src/diagnostics/tests/dry_static_energy_test.cpp @@ -10,9 +10,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" #include +#include #include @@ -48,6 +48,7 @@ void run(std::mt19937_64& engine) using ExecSpace = typename KT::ExeSpace; using MemberType = typename KT::MemberType; using view_1d = typename KT::template view_1d; + using TPF = ekat::TeamPolicyFactory; const int packsize = SCREAM_PACK_SIZE; constexpr int num_levs = packsize*2 + 1; // Number of levels to use for tests, make sure the last pack can also have some empty slots (packsize>1). @@ -60,7 +61,7 @@ void run(std::mt19937_64& engine) auto gm = create_gm(comm,ncols,num_levs); // Kokkos Policy - auto policy = ekat::ExeSpaceUtils::get_default_team_policy(ncols, num_levs); + auto policy = TPF::get_default_team_policy(ncols, num_levs); // Construct random input data using RPDF = std::uniform_real_distribution; diff --git a/components/eamxx/src/diagnostics/tests/exner_test.cpp b/components/eamxx/src/diagnostics/tests/exner_test.cpp index 063800609a5f..e7740a68a6a6 100644 --- a/components/eamxx/src/diagnostics/tests/exner_test.cpp +++ b/components/eamxx/src/diagnostics/tests/exner_test.cpp @@ -10,9 +10,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" #include +#include #include @@ -47,6 +47,7 @@ void run(std::mt19937_64& engine) using KT = ekat::KokkosTypes; using ExecSpace = typename KT::ExeSpace; using MemberType = typename KT::MemberType; + using TPF = ekat::TeamPolicyFactory; const int packsize = SCREAM_PACK_SIZE; constexpr int num_levs = packsize*2 + 1; // Number of levels to use for tests, make sure the last pack can also have some empty slots (packsize>1). @@ -59,7 +60,7 @@ void run(std::mt19937_64& engine) auto gm = create_gm(comm,ncols,num_levs); // Kokkos Policy - auto policy = ekat::ExeSpaceUtils::get_default_team_policy(ncols, num_levs); + auto policy = TPF::get_default_team_policy(ncols, num_levs); // Construct random input data using RPDF = std::uniform_real_distribution; diff --git a/components/eamxx/src/diagnostics/tests/longwave_cloud_forcing_tests.cpp b/components/eamxx/src/diagnostics/tests/longwave_cloud_forcing_tests.cpp index 9ad0d815a594..1cac3830113d 100644 --- a/components/eamxx/src/diagnostics/tests/longwave_cloud_forcing_tests.cpp +++ b/components/eamxx/src/diagnostics/tests/longwave_cloud_forcing_tests.cpp @@ -10,9 +10,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" #include +#include #include @@ -48,6 +48,7 @@ void run(std::mt19937_64& engine) using MemberType = typename KT::MemberType; using view_1d = typename KT::template view_1d; using rview_1d = typename KT::template view_1d; + using TPF = ekat::TeamPolicyFactory; const int packsize = SCREAM_PACK_SIZE; constexpr int num_levs = packsize*2 + 1; // Number of levels to use for tests, make sure the last pack can also have some empty slots (packsize>1). @@ -61,7 +62,7 @@ void run(std::mt19937_64& engine) auto gm = create_gm(comm,ncols,num_levs); // Kokkos Policy - auto policy = ekat::ExeSpaceUtils::get_default_team_policy(ncols, num_mid_packs); + auto policy = TPF::get_default_team_policy(ncols, num_mid_packs); // Input (randomized) views view_1d LW_flux_up("LW_flux_up",num_mid_packs), @@ -116,8 +117,8 @@ void run(std::mt19937_64& engine) const auto& LW_flux_up_sub = ekat::subview(LW_flux_up_v,icol); const auto& LW_clrsky_flux_up_sub = ekat::subview(LW_clrsky_flux_up_v,icol); - ekat::genRandArray(dview_as_real(LW_flux_up), engine, pdf_LW_flux_x); - ekat::genRandArray(dview_as_real(LW_clrsky_flux_up), engine, pdf_LW_flux_x); + ekat::genRandArray(dview_as_real(LW_flux_up), engine, pdf_LW_flux_x); + ekat::genRandArray(dview_as_real(LW_clrsky_flux_up), engine, pdf_LW_flux_x); Kokkos::deep_copy(LW_flux_up_sub,LW_flux_up); Kokkos::deep_copy(LW_clrsky_flux_up_sub,LW_clrsky_flux_up); diff --git a/components/eamxx/src/diagnostics/tests/potential_temperature_test.cpp b/components/eamxx/src/diagnostics/tests/potential_temperature_test.cpp index 0fb9c0f3806a..09de413fe270 100644 --- a/components/eamxx/src/diagnostics/tests/potential_temperature_test.cpp +++ b/components/eamxx/src/diagnostics/tests/potential_temperature_test.cpp @@ -10,9 +10,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" #include +#include #include @@ -47,6 +47,7 @@ void run(std::mt19937_64& engine, int int_ptype) using KT = ekat::KokkosTypes; using ExecSpace = typename KT::ExeSpace; using MemberType = typename KT::MemberType; + using TPF = ekat::TeamPolicyFactory; const int packsize = SCREAM_PACK_SIZE; constexpr int num_levs = packsize*2 + 1; // Number of levels to use for tests, make sure the last pack can also have some empty slots (packsize>1). @@ -59,7 +60,7 @@ void run(std::mt19937_64& engine, int int_ptype) auto gm = create_gm(comm,ncols,num_levs); // Kokkos Policy - auto policy = ekat::ExeSpaceUtils::get_default_team_policy(ncols, num_levs); + auto policy = TPF::get_default_team_policy(ncols, num_levs); // Construct random input data using RPDF = std::uniform_real_distribution; diff --git a/components/eamxx/src/diagnostics/tests/relative_humidity_tests.cpp b/components/eamxx/src/diagnostics/tests/relative_humidity_tests.cpp index 340e0f35eb5d..0332718fc56f 100644 --- a/components/eamxx/src/diagnostics/tests/relative_humidity_tests.cpp +++ b/components/eamxx/src/diagnostics/tests/relative_humidity_tests.cpp @@ -11,9 +11,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" #include +#include #include @@ -50,6 +50,7 @@ void run(std::mt19937_64& engine) using MemberType = typename KT::MemberType; using view_1d = typename KT::template view_1d; using rview_1d = typename KT::template view_1d; + using TPF = ekat::TeamPolicyFactory; const int packsize = SCREAM_PACK_SIZE; constexpr int num_levs = packsize*2 + 1; // Number of levels to use for tests, make sure the last pack can also have some empty slots (packsize>1). @@ -63,7 +64,7 @@ void run(std::mt19937_64& engine) auto gm = create_gm(comm,ncols,num_levs); // Kokkos Policy - auto policy = ekat::ExeSpaceUtils::get_default_team_policy(ncols, num_mid_packs); + auto policy = TPF::get_default_team_policy(ncols, num_mid_packs); // Input (randomized) views, device view_1d temperature("temperature",num_mid_packs), diff --git a/components/eamxx/src/diagnostics/tests/shortwave_cloud_forcing_tests.cpp b/components/eamxx/src/diagnostics/tests/shortwave_cloud_forcing_tests.cpp index f86f100d8472..86c4a8f2e1bf 100644 --- a/components/eamxx/src/diagnostics/tests/shortwave_cloud_forcing_tests.cpp +++ b/components/eamxx/src/diagnostics/tests/shortwave_cloud_forcing_tests.cpp @@ -10,9 +10,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" #include +#include #include @@ -48,6 +48,7 @@ void run(std::mt19937_64& engine) using MemberType = typename KT::MemberType; using view_1d = typename KT::template view_1d; using rview_1d = typename KT::template view_1d; + using TPF = ekat::TeamPolicyFactory; const int packsize = SCREAM_PACK_SIZE; constexpr int num_levs = packsize*2 + 1; // Number of levels to use for tests, make sure the last pack can also have some empty slots (packsize>1). @@ -61,7 +62,7 @@ void run(std::mt19937_64& engine) auto gm = create_gm(comm,ncols,num_levs); // Kokkos Policy - auto policy = ekat::ExeSpaceUtils::get_default_team_policy(ncols, num_mid_packs); + auto policy = TPF::get_default_team_policy(ncols, num_mid_packs); // Input (randomized) views view_1d SW_flux_dn("SW_flux_dn",num_mid_packs), diff --git a/components/eamxx/src/diagnostics/tests/vapor_flux_tests.cpp b/components/eamxx/src/diagnostics/tests/vapor_flux_tests.cpp index 87393bdccf92..19803f22c1b4 100644 --- a/components/eamxx/src/diagnostics/tests/vapor_flux_tests.cpp +++ b/components/eamxx/src/diagnostics/tests/vapor_flux_tests.cpp @@ -10,8 +10,8 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" +#include #include @@ -44,7 +44,7 @@ void run(std::mt19937_64& engine) using PC = scream::physics::Constants; using KT = ekat::KokkosTypes; using ExecSpace = typename KT::ExeSpace; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename KT::MemberType; using view_1d = typename KT::template view_1d; @@ -58,7 +58,7 @@ void run(std::mt19937_64& engine) auto gm = create_gm(comm,ncols,num_levs); // Kokkos Policy - auto policy = ESU::get_default_team_policy(ncols, num_levs); + auto policy = TPF::get_default_team_policy(ncols, num_levs); // Input (randomized) views view_1d qv("qv",num_levs), diff --git a/components/eamxx/src/diagnostics/tests/virtual_temperature_test.cpp b/components/eamxx/src/diagnostics/tests/virtual_temperature_test.cpp index 0489ddaec54c..9fc1548ddbf6 100644 --- a/components/eamxx/src/diagnostics/tests/virtual_temperature_test.cpp +++ b/components/eamxx/src/diagnostics/tests/virtual_temperature_test.cpp @@ -10,9 +10,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" #include +#include #include @@ -46,6 +46,7 @@ void run(std::mt19937_64& engine) using KT = ekat::KokkosTypes; using ExecSpace = typename KT::ExeSpace; using MemberType = typename KT::MemberType; + using TPF = ekat::TeamPolicyFactory; const int packsize = SCREAM_PACK_SIZE; constexpr int num_levs = packsize*2 + 1; // Number of levels to use for tests, make sure the last pack can also have some empty slots (packsize>1). @@ -58,7 +59,7 @@ void run(std::mt19937_64& engine) auto gm = create_gm(comm,ncols,num_levs); // Kokkos Policy - auto policy = ekat::ExeSpaceUtils::get_default_team_policy(ncols, num_levs); + auto policy = TPF::get_default_team_policy(ncols, num_levs); // Construct random input data using RPDF = std::uniform_real_distribution; diff --git a/components/eamxx/src/diagnostics/tests/water_path_tests.cpp b/components/eamxx/src/diagnostics/tests/water_path_tests.cpp index 0b6f8c070379..b1a1a8a92146 100644 --- a/components/eamxx/src/diagnostics/tests/water_path_tests.cpp +++ b/components/eamxx/src/diagnostics/tests/water_path_tests.cpp @@ -10,8 +10,8 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" +#include #include @@ -43,7 +43,7 @@ void run(std::mt19937_64& engine) { using PC = scream::physics::Constants; using KT = ekat::KokkosTypes; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename KT::MemberType; using view_1d = typename KT::template view_1d; @@ -59,7 +59,7 @@ void run(std::mt19937_64& engine) auto gm = create_gm(comm,ncols,num_levs); // Kokkos Policy - auto policy = ESU::get_default_team_policy(ncols, num_levs); + auto policy = TPF::get_default_team_policy(ncols, num_levs); // Input (randomized) views view_1d diff --git a/components/eamxx/src/diagnostics/vapor_flux.cpp b/components/eamxx/src/diagnostics/vapor_flux.cpp index 12628aa3011a..f775b055a8b9 100644 --- a/components/eamxx/src/diagnostics/vapor_flux.cpp +++ b/components/eamxx/src/diagnostics/vapor_flux.cpp @@ -1,7 +1,7 @@ #include "diagnostics/vapor_flux.hpp" #include "physics/share/physics_constants.hpp" -#include +#include namespace scream { @@ -56,7 +56,7 @@ void VaporFluxDiagnostic::compute_diagnostic_impl() using PC = scream::physics::Constants; using KT = KokkosTypes; using MT = typename KT::MemberType; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; constexpr Real g = PC::gravit; @@ -66,7 +66,7 @@ void VaporFluxDiagnostic::compute_diagnostic_impl() const auto wind = get_field_in("horiz_winds").get_component(m_component).get_view(); const auto num_levs = m_num_levs; - const auto policy = ESU::get_default_team_policy(m_num_cols, m_num_levs); + const auto policy = TPF::get_default_team_policy(m_num_cols, m_num_levs); Kokkos::parallel_for("Compute " + m_name, policy, KOKKOS_LAMBDA(const MT& team) { const int icol = team.league_rank(); diff --git a/components/eamxx/src/diagnostics/vert_contract.cpp b/components/eamxx/src/diagnostics/vert_contract.cpp index 960dd40e4922..a2a6c2e8651f 100644 --- a/components/eamxx/src/diagnostics/vert_contract.cpp +++ b/components/eamxx/src/diagnostics/vert_contract.cpp @@ -4,6 +4,8 @@ #include "share/field/field_utils.hpp" #include "share/util/eamxx_common_physics_functions.hpp" +#include + namespace scream { VertContractDiag::VertContractDiag(const ekat::Comm &comm, @@ -186,11 +188,11 @@ void VertContractDiag::compute_diagnostic_impl() { // m_weighting.update(get_field_in("dz"), 1.0, 0.0); using KT = KokkosTypes; using MT = typename KT::MemberType; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; using PF = scream::PhysicsFunctions; const int ncols = m_weighting.get_header().get_identifier().get_layout().dim(0); const int nlevs = m_weighting.get_header().get_identifier().get_layout().dim(1); - const auto policy = ESU::get_default_team_policy(ncols, nlevs); + const auto policy = TPF::get_default_team_policy(ncols, nlevs); auto dz_v = m_weighting.get_view(); auto dp_v = get_field_in("pseudo_density").get_view(); diff --git a/components/eamxx/src/diagnostics/vertical_layer.cpp b/components/eamxx/src/diagnostics/vertical_layer.cpp index 2aa2a79456ab..afbb1277c55b 100644 --- a/components/eamxx/src/diagnostics/vertical_layer.cpp +++ b/components/eamxx/src/diagnostics/vertical_layer.cpp @@ -4,6 +4,8 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/util/eamxx_column_ops.hpp" +#include + namespace scream { @@ -164,12 +166,13 @@ void VerticalLayerDiagnostic::do_compute_diagnostic_impl() using KT = KokkosTypes; using MemberType = typename KT::MemberType; using PF = PhysicsFunctions; + using TPF = ekat::TeamPolicyFactory; // To use in column_ops, since we integrate from surface constexpr bool FromTop = false; const auto npacks = ekat::npack(m_num_levs); - const auto policy = ekat::ExeSpaceUtils::get_thread_range_parallel_scan_team_policy(m_num_cols, npacks); + const auto policy = TPF::get_thread_range_parallel_scan_team_policy(m_num_cols, npacks); const auto& T = get_field_in("T_mid").get_view(); const auto& p = get_field_in("p_mid").get_view(); diff --git a/components/eamxx/src/diagnostics/water_path.cpp b/components/eamxx/src/diagnostics/water_path.cpp index 39ebc981a4e7..218767830bf8 100644 --- a/components/eamxx/src/diagnostics/water_path.cpp +++ b/components/eamxx/src/diagnostics/water_path.cpp @@ -1,7 +1,7 @@ #include "diagnostics/water_path.hpp" #include "physics/share/physics_constants.hpp" -#include +#include namespace scream { @@ -62,7 +62,7 @@ void WaterPathDiagnostic::compute_diagnostic_impl() using PC = scream::physics::Constants; using KT = KokkosTypes; using MT = typename KT::MemberType; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; constexpr Real g = PC::gravit; @@ -71,7 +71,7 @@ void WaterPathDiagnostic::compute_diagnostic_impl() const auto rho = get_field_in("pseudo_density").get_view(); const auto num_levs = m_num_levs; - const auto policy = ESU::get_default_team_policy(m_num_cols, m_num_levs); + const auto policy = TPF::get_default_team_policy(m_num_cols, m_num_levs); Kokkos::parallel_for("Compute " + m_kind + name(), policy, KOKKOS_LAMBDA(const MT& team) { const int icol = team.league_rank(); diff --git a/components/eamxx/src/diagnostics/zonal_avg.cpp b/components/eamxx/src/diagnostics/zonal_avg.cpp index ebfeeaeab2db..1d54e6fae2e4 100644 --- a/components/eamxx/src/diagnostics/zonal_avg.cpp +++ b/components/eamxx/src/diagnostics/zonal_avg.cpp @@ -18,12 +18,12 @@ void ZonalAvgDiag::compute_zonal_sum(const Field &result, const Field &field, co using KT = ekat::KokkosTypes; using TeamPolicy = Kokkos::TeamPolicy; using TeamMember = typename TeamPolicy::member_type; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; switch (result_layout.rank()) { case 1: { auto field_view = field.get_view(); auto result_view = result.get_view(); - TeamPolicy team_policy = ESU::get_default_team_policy(num_zonal_bins, ncols); + TeamPolicy team_policy = TPF::get_default_team_policy(num_zonal_bins, ncols); Kokkos::parallel_for( "compute_zonal_sum_" + field.name(), team_policy, KOKKOS_LAMBDA(const TeamMember &tm) { const int lat_i = tm.league_rank(); @@ -43,7 +43,7 @@ void ZonalAvgDiag::compute_zonal_sum(const Field &result, const Field &field, co const int d1 = result_layout.dim(1); auto field_view = field.get_view(); auto result_view = result.get_view(); - TeamPolicy team_policy = ESU::get_default_team_policy(num_zonal_bins * d1, ncols); + TeamPolicy team_policy = TPF::get_default_team_policy(num_zonal_bins * d1, ncols); Kokkos::parallel_for( "compute_zonal_sum_" + field.name(), team_policy, KOKKOS_LAMBDA(const TeamMember &tm) { const int idx = tm.league_rank(); @@ -66,7 +66,7 @@ void ZonalAvgDiag::compute_zonal_sum(const Field &result, const Field &field, co const int d2 = result_layout.dim(2); auto field_view = field.get_view(); auto result_view = result.get_view(); - TeamPolicy team_policy = ESU::get_default_team_policy(num_zonal_bins * d1 * d2, ncols); + TeamPolicy team_policy = TPF::get_default_team_policy(num_zonal_bins * d1 * d2, ncols); Kokkos::parallel_for( "compute_zonal_sum_" + field.name(), team_policy, KOKKOS_LAMBDA(const TeamMember &tm) { const int idx = tm.league_rank(); diff --git a/components/eamxx/src/dynamics/homme/eamxx_homme_fv_phys.cpp b/components/eamxx/src/dynamics/homme/eamxx_homme_fv_phys.cpp index 70492e6e135b..07c1bd0985ba 100644 --- a/components/eamxx/src/dynamics/homme/eamxx_homme_fv_phys.cpp +++ b/components/eamxx/src/dynamics/homme/eamxx_homme_fv_phys.cpp @@ -15,9 +15,9 @@ // Ekat includes #include +#include #include #include -#include #include extern "C" void gfr_init_hxx(); @@ -79,8 +79,9 @@ static void copy_prev (const int ncols, const int npacks, const T_t& T, const uv_t& uv, const FT_t& FT, const FM_t& FM) { using KT = KokkosTypes; - using ESU = ekat::ExeSpaceUtils; - const auto policy = ESU::get_default_team_policy(ncols, npacks); + using TPF = ekat::TeamPolicyFactory; + + const auto policy = TPF::get_default_team_policy(ncols, npacks); Kokkos::parallel_for(policy, KOKKOS_LAMBDA (const KT::MemberType& team) { const int& icol = team.league_rank(); Kokkos::parallel_for(Kokkos::TeamVectorRange(team, npacks), diff --git a/components/eamxx/src/dynamics/homme/eamxx_homme_process_interface.cpp b/components/eamxx/src/dynamics/homme/eamxx_homme_process_interface.cpp index 7ab1331a2968..cdf3074f6185 100644 --- a/components/eamxx/src/dynamics/homme/eamxx_homme_process_interface.cpp +++ b/components/eamxx/src/dynamics/homme/eamxx_homme_process_interface.cpp @@ -35,6 +35,7 @@ // Ekat includes #include +#include #include #include #include @@ -674,6 +675,7 @@ void HommeDynamics::homme_post_process (const double dt) { using ColOps = ColumnOps; using PF = PhysicsFunctions; + using TPF = ekat::TeamPolicyFactory; // Convert VTheta_dp->T, store T,uv, and possibly w in FT, FM, // compute p_int on ref grid. @@ -694,8 +696,7 @@ void HommeDynamics::homme_post_process (const double dt) { const auto nlevs = m_phys_grid->get_num_vertical_levels(); const auto npacks= ekat::npack(nlevs); - using ESU = ekat::ExeSpaceUtils; - const auto policy = ESU::get_thread_range_parallel_scan_team_policy(ncols,npacks); + const auto policy = TPF::get_thread_range_parallel_scan_team_policy(ncols,npacks); // Establish the boundary condition for the TOA const auto& hvcoord = c.get(); @@ -778,6 +779,7 @@ create_helper_field (const std::string& name, } void HommeDynamics::init_homme_views () { + using TPF = ekat::TeamPolicyFactory; const auto& c = Homme::Context::singleton(); auto& params = c.get(); @@ -800,8 +802,7 @@ void HommeDynamics::init_homme_views () { const auto nlevs = m_phys_grid->get_num_vertical_levels(); const auto npacks= ekat::npack(nlevs); - using ESU = ekat::ExeSpaceUtils; - const auto default_policy = ESU::get_default_team_policy(ncols,npacks); + const auto default_policy = TPF::get_default_team_policy(ncols,npacks); // Print homme's parameters, so user can see whether something wasn't set right. // TODO: make Homme::SimulationParams::print accept an ostream. @@ -925,7 +926,7 @@ void HommeDynamics::restart_homme_state () { " - field name: " + f.get_header().get_identifier().name() + "\n"); } - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; using PF = PhysicsFunctions; const auto& dgn = m_dyn_grid->name(); @@ -1027,7 +1028,7 @@ void HommeDynamics::restart_homme_state () { auto p_mid_view = get_field_out("p_mid").get_view(); auto qv_view = qv_prev_ref->get_view(); - const auto policy = ESU::get_default_team_policy(ncols,npacks); + const auto policy = TPF::get_default_team_policy(ncols,npacks); Kokkos::parallel_for(policy, KOKKOS_LAMBDA (const KT::MemberType& team){ const int icol = team.league_rank(); @@ -1053,7 +1054,7 @@ void HommeDynamics::initialize_homme_state () { // Some types using ColOps = ColumnOps; using PF = PhysicsFunctions; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; using EOS = Homme::EquationOfState; using WorkspaceMgr = ekat::WorkspaceManager; @@ -1082,7 +1083,7 @@ void HommeDynamics::initialize_homme_state () { const auto ps_ref = get_field_in("ps",rgn).get_view(); const auto hyai = hvcoord.hybrid_ai; const auto hybi = hvcoord.hybrid_bi; - const auto policy_dp = ESU::get_default_team_policy(ncols, nlevs); + const auto policy_dp = TPF::get_default_team_policy(ncols, nlevs); Kokkos::parallel_for(policy_dp, KOKKOS_LAMBDA (const KT::MemberType& team) { const int icol = team.league_rank(); Kokkos::parallel_for(Kokkos::TeamVectorRange(team,nlevs), @@ -1126,7 +1127,7 @@ void HommeDynamics::initialize_homme_state () { const auto phi_int_view = m_helper_fields.at("phi_int_dyn").get_view(); const auto hyai0 = hvcoord.hybrid_ai0; // Need two temporaries, for pi_mid and pi_int - const auto policy = ESU::get_thread_range_parallel_scan_team_policy(nelem*NGP*NGP,npacks_mid); + const auto policy = TPF::get_thread_range_parallel_scan_team_policy(nelem*NGP*NGP,npacks_mid); WorkspaceMgr wsm(npacks_int,2,policy); Kokkos::parallel_for(policy, KOKKOS_LAMBDA (const KT::MemberType& team) { const int ie = team.league_rank() / (NGP*NGP); @@ -1271,6 +1272,7 @@ copy_dyn_states_to_all_timelevels () { // for now we have two locations where we do this. void HommeDynamics::update_pressure(const std::shared_ptr& grid) { using ColOps = ColumnOps; + using TPF = ekat::TeamPolicyFactory; const auto ncols = grid->get_num_local_dofs(); const auto nlevs = grid->get_num_vertical_levels(); @@ -1290,8 +1292,7 @@ void HommeDynamics::update_pressure(const std::shared_ptr& g const auto p_dry_int_view = get_field_out("p_dry_int").get_view(); const auto p_dry_mid_view = get_field_out("p_dry_mid").get_view(); - using ESU = ekat::ExeSpaceUtils; - const auto policy = ESU::get_thread_range_parallel_scan_team_policy(ncols,npacks); + const auto policy = TPF::get_thread_range_parallel_scan_team_policy(ncols,npacks); Kokkos::parallel_for(policy, KOKKOS_LAMBDA (const KT::MemberType& team) { const int& icol = team.league_rank(); diff --git a/components/eamxx/src/dynamics/homme/eamxx_homme_rayleigh_friction.cpp b/components/eamxx/src/dynamics/homme/eamxx_homme_rayleigh_friction.cpp index b6bcf7653a80..e23080270dd7 100644 --- a/components/eamxx/src/dynamics/homme/eamxx_homme_rayleigh_friction.cpp +++ b/components/eamxx/src/dynamics/homme/eamxx_homme_rayleigh_friction.cpp @@ -6,6 +6,8 @@ // Homme includes #include "dynamics/homme/homme_dimensions.hpp" +#include + namespace scream { void HommeDynamics::rayleigh_friction_init() @@ -54,7 +56,7 @@ void HommeDynamics::rayleigh_friction_init() void HommeDynamics::rayleigh_friction_apply(const Real dt) const { using PF = PhysicsFunctions; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; // If m_raytau0==0, then no Rayleigh friction is applied. Return. if (m_raytau0 == 0) return; @@ -69,7 +71,7 @@ void HommeDynamics::rayleigh_friction_apply(const Real dt) const // local for lambda captures to avoid issues on GPU auto otau = m_otau; - const auto policy = ESU::get_default_team_policy(ncols, npacks); + const auto policy = TPF::get_default_team_policy(ncols, npacks); Kokkos::parallel_for(policy, KOKKOS_LAMBDA (const KT::MemberType& team) { const int& icol = team.league_rank(); diff --git a/components/eamxx/src/physics/cld_fraction/cld_fraction_main_impl.hpp b/components/eamxx/src/physics/cld_fraction/cld_fraction_main_impl.hpp index 81ea8cba234b..223308ba99e3 100644 --- a/components/eamxx/src/physics/cld_fraction/cld_fraction_main_impl.hpp +++ b/components/eamxx/src/physics/cld_fraction/cld_fraction_main_impl.hpp @@ -3,6 +3,7 @@ #include "physics/cld_fraction/cld_fraction_functions.hpp" +#include #include namespace scream { @@ -24,8 +25,10 @@ ::main( const view_2d& tot_cld_frac_4out) { using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; + const Int nk_pack = ekat::npack(nk); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(nj, nk_pack); + const auto policy = TPF::get_default_team_policy(nj, nk_pack); Kokkos::parallel_for( "cld fraction main loop", policy, diff --git a/components/eamxx/src/physics/cosp/eamxx_cosp.cpp b/components/eamxx/src/physics/cosp/eamxx_cosp.cpp index cdc691a59dcf..5846acec38dc 100644 --- a/components/eamxx/src/physics/cosp/eamxx_cosp.cpp +++ b/components/eamxx/src/physics/cosp/eamxx_cosp.cpp @@ -174,10 +174,10 @@ void Cosp::run_impl (const double dt) using KT = KokkosTypes; using ExeSpace = typename KT::ExeSpace; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; using PF = scream::PhysicsFunctions; - const auto scan_policy = ESU::get_thread_range_parallel_scan_team_policy(ncol, nlev); + const auto scan_policy = TPF::get_thread_range_parallel_scan_team_policy(ncol, nlev); const auto g = physics::Constants::gravit; Kokkos::parallel_for(scan_policy, KOKKOS_LAMBDA (const KT::MemberType& team) { const int i = team.league_rank(); diff --git a/components/eamxx/src/physics/iop_forcing/eamxx_iop_forcing_process_interface.cpp b/components/eamxx/src/physics/iop_forcing/eamxx_iop_forcing_process_interface.cpp index c677267b738d..0d77a40de28b 100644 --- a/components/eamxx/src/physics/iop_forcing/eamxx_iop_forcing_process_interface.cpp +++ b/components/eamxx/src/physics/iop_forcing/eamxx_iop_forcing_process_interface.cpp @@ -74,9 +74,11 @@ set_computed_group_impl (const FieldGroup& group) // ========================================================================================= size_t IOPForcing::requested_buffer_size_in_bytes() const { + using TPF = ekat::TeamPolicyFactory; + // Number of bytes needed by the WorkspaceManager passed to shoc_main const int nlevi_packs = ekat::npack(m_num_levs+1); - const auto policy = ESU::get_default_team_policy(m_num_cols, nlevi_packs); + const auto policy = TPF::get_default_team_policy(m_num_cols, nlevi_packs); const size_t wsm_bytes = WorkspaceMgr::get_total_bytes_needed(nlevi_packs, 7+m_num_tracers, policy); return wsm_bytes; @@ -84,6 +86,8 @@ size_t IOPForcing::requested_buffer_size_in_bytes() const // ========================================================================================= void IOPForcing::init_buffers(const ATMBufferManager &buffer_manager) { + using TPF = ekat::TeamPolicyFactory; + EKAT_REQUIRE_MSG(buffer_manager.allocated_bytes() >= requested_buffer_size_in_bytes(), "Error! Buffers size not sufficient.\n"); @@ -93,7 +97,7 @@ void IOPForcing::init_buffers(const ATMBufferManager &buffer_manager) // WSM data m_buffer.wsm_data = mem; - const auto policy = ESU::get_default_team_policy(m_num_cols, nlevi_packs); + const auto policy = TPF::get_default_team_policy(m_num_cols, nlevi_packs); const size_t wsm_npacks = WorkspaceMgr::get_total_bytes_needed(nlevi_packs, 7+m_num_tracers, policy)/sizeof(Pack); mem += wsm_npacks; @@ -120,6 +124,8 @@ void IOPForcing::create_helper_field (const std::string& name, // ========================================================================================= void IOPForcing::initialize_impl (const RunType run_type) { + using TPF = ekat::TeamPolicyFactory; + // Set field property checks for the fields in this process using Interval = FieldWithinIntervalCheck; add_postcondition_check(get_field_out("T_mid"),m_grid,100.0,500.0,false); @@ -130,7 +136,7 @@ void IOPForcing::initialize_impl (const RunType run_type) // Setup WSM for internal local variables const auto nlevi_packs = ekat::npack(m_num_levs+1); - const auto policy = ESU::get_default_team_policy(m_num_cols, nlevi_packs); + const auto policy = TPF::get_default_team_policy(m_num_cols, nlevi_packs); m_workspace_mgr.setup(m_buffer.wsm_data, nlevi_packs, 7+m_num_tracers, policy); // Compute field for horizontal contraction weights (1/num_global_dofs) @@ -330,6 +336,8 @@ iop_apply_coriolis(const MemberType& team, // ========================================================================================= void IOPForcing::run_impl (const double dt) { + using TPF = ekat::TeamPolicyFactory; + // Pack dimensions const auto nlev_packs = ekat::npack(m_num_levs); @@ -389,7 +397,7 @@ void IOPForcing::run_impl (const double dt) } // Team policy and workspace manager for eamxx - const auto policy_iop = ESU::get_default_team_policy(m_num_cols, nlev_packs); + const auto policy_iop = TPF::get_default_team_policy(m_num_cols, nlev_packs); // Reset internal WSM variables. m_workspace_mgr.reset_internals(); diff --git a/components/eamxx/src/physics/iop_forcing/eamxx_iop_forcing_process_interface.hpp b/components/eamxx/src/physics/iop_forcing/eamxx_iop_forcing_process_interface.hpp index 01c70e0aa34e..1f5a4d40395e 100644 --- a/components/eamxx/src/physics/iop_forcing/eamxx_iop_forcing_process_interface.hpp +++ b/components/eamxx/src/physics/iop_forcing/eamxx_iop_forcing_process_interface.hpp @@ -29,7 +29,6 @@ class IOPForcing : public scream::AtmosphereProcess { // Typedefs for process using KT = ekat::KokkosTypes; - using ESU = ekat::ExeSpaceUtils; using Pack = ekat::Pack; using IntPack = ekat::Pack; using Mask = ekat::Mask; diff --git a/components/eamxx/src/physics/mam/eamxx_mam_aci_process_interface.cpp b/components/eamxx/src/physics/mam/eamxx_mam_aci_process_interface.cpp index 6648849f0852..92883b065213 100644 --- a/components/eamxx/src/physics/mam/eamxx_mam_aci_process_interface.cpp +++ b/components/eamxx/src/physics/mam/eamxx_mam_aci_process_interface.cpp @@ -6,7 +6,9 @@ // For EKAT units package #include +#include #include + /* ----------------------------------------------------------------- NOTES: @@ -496,8 +498,9 @@ void MAMAci::initialize_impl(const RunType run_type) { // RUN_IMPL // ================================================================ void MAMAci::run_impl(const double dt) { - const auto scan_policy = ekat::ExeSpaceUtils< - KT::ExeSpace>::get_thread_range_parallel_scan_team_policy(ncol_, nlev_); + using TPF = ekat::TeamPolicyFactory; + + const auto scan_policy = TPF::get_thread_range_parallel_scan_team_policy(ncol_, nlev_); // preprocess input -- needs a scan for the calculation of local derivied // quantities diff --git a/components/eamxx/src/physics/mam/eamxx_mam_constituent_fluxes_interface.cpp b/components/eamxx/src/physics/mam/eamxx_mam_constituent_fluxes_interface.cpp index 70926eed5a49..5afe62c824c2 100644 --- a/components/eamxx/src/physics/mam/eamxx_mam_constituent_fluxes_interface.cpp +++ b/components/eamxx/src/physics/mam/eamxx_mam_constituent_fluxes_interface.cpp @@ -2,6 +2,9 @@ #include #include #include + +#include + namespace scream { // ================================================================ @@ -138,6 +141,8 @@ void MAMConstituentFluxes::initialize_impl(const RunType run_type) { // RUN_IMPL // ================================================================ void MAMConstituentFluxes::run_impl(const double dt) { + using TPF = ekat::TeamPolicyFactory; + // ------------------------------------------------------------------- // (LONG) NOTE: The following code is an adaptation of cflx.F90 code in // E3SM. In EAMxx, all constituents are considered "wet" (or have wet @@ -177,8 +182,7 @@ void MAMConstituentFluxes::run_impl(const double dt) { icol); // in }; // policy - const auto scan_policy = ekat::ExeSpaceUtils< - KT::ExeSpace>::get_thread_range_parallel_scan_team_policy(ncol_, nlev_); + const auto scan_policy = TPF::get_thread_range_parallel_scan_team_policy(ncol_, nlev_); Kokkos::parallel_for("mam_cfi_compute_updraft", scan_policy, lambda); Kokkos::fence(); diff --git a/components/eamxx/src/physics/mam/eamxx_mam_dry_deposition_functions.hpp b/components/eamxx/src/physics/mam/eamxx_mam_dry_deposition_functions.hpp index a8f085d89df3..5f7ac459f81d 100644 --- a/components/eamxx/src/physics/mam/eamxx_mam_dry_deposition_functions.hpp +++ b/components/eamxx/src/physics/mam/eamxx_mam_dry_deposition_functions.hpp @@ -6,6 +6,8 @@ #include #include +#include + namespace scream { namespace { @@ -35,11 +37,12 @@ void compute_tendencies( // work arrays MAMDryDep::view_2d rho_, MAMDryDep::view_4d vlc_dry_, MAMDryDep::view_3d vlc_trb_, MAMDryDep::view_4d vlc_grv_, - MAMDryDep::view_3d dqdt_tmp_, MAMDryDep::view_3d qtracers) { + MAMDryDep::view_3d dqdt_tmp_, MAMDryDep::view_3d qtracers) +{ + using TPF = ekat::TeamPolicyFactory; + static constexpr int num_aero_modes = mam_coupling::num_aero_modes(); - const auto policy = - ekat::ExeSpaceUtils::get_default_team_policy( - ncol, nlev); + const auto policy = TPF::get_default_team_policy(ncol, nlev); // Parallel loop over all the columns Kokkos::parallel_for( @@ -142,9 +145,9 @@ void update_interstitial_mmrs(const MAMDryDep::view_3d ptend_q, const double dt, const int ncol, const int nlev, // output const mam_coupling::AerosolState dry_aero) { - const auto policy = - ekat::ExeSpaceUtils::get_default_team_policy( - ncol, nlev); + using TPF = ekat::TeamPolicyFactory; + + const auto policy = TPF::get_default_team_policy(ncol, nlev); static constexpr int nmodes = mam4::AeroConfig::num_modes(); Kokkos::parallel_for( policy, KOKKOS_LAMBDA(const MAMDryDep::KT::MemberType &team) { diff --git a/components/eamxx/src/physics/mam/eamxx_mam_dry_deposition_process_interface.cpp b/components/eamxx/src/physics/mam/eamxx_mam_dry_deposition_process_interface.cpp index a767ca4f3753..e33bfa5c69af 100644 --- a/components/eamxx/src/physics/mam/eamxx_mam_dry_deposition_process_interface.cpp +++ b/components/eamxx/src/physics/mam/eamxx_mam_dry_deposition_process_interface.cpp @@ -6,6 +6,8 @@ // For reading fractional land use file #include +#include + namespace scream { using FracLandUseFunc = frac_landuse::fracLandUseFunctions; @@ -334,8 +336,8 @@ void MAMDryDep::initialize_impl(const RunType run_type) { // ========================================================================================= void MAMDryDep::run_impl(const double dt) { - const auto scan_policy = ekat::ExeSpaceUtils< - KT::ExeSpace>::get_thread_range_parallel_scan_team_policy(ncol_, nlev_); + using TPF = ekat::TeamPolicyFactory; + const auto scan_policy = TPF::get_thread_range_parallel_scan_team_policy(ncol_, nlev_); // preprocess input -- needs a scan for the calculation of atm height pre_process(wet_aero_, dry_aero_, wet_atm_, dry_atm_); diff --git a/components/eamxx/src/physics/mam/eamxx_mam_generic_process_interface.cpp b/components/eamxx/src/physics/mam/eamxx_mam_generic_process_interface.cpp index 15d8c1afa2bc..88ccba48cc0f 100644 --- a/components/eamxx/src/physics/mam/eamxx_mam_generic_process_interface.cpp +++ b/components/eamxx/src/physics/mam/eamxx_mam_generic_process_interface.cpp @@ -2,6 +2,8 @@ #include #include +#include + namespace scream { // ================================================================ // Constructor @@ -461,8 +463,8 @@ void MAMGenericInterface::pre_process(mam_coupling::AerosolState &wet_aero, mam_coupling::AerosolState &dry_aero, mam_coupling::WetAtmosphere &wet_atm, mam_coupling::DryAtmosphere &dry_atm) { - const auto scan_policy = ekat::ExeSpaceUtils< - KT::ExeSpace>::get_thread_range_parallel_scan_team_policy(ncol_, nlev_); + using TPF = ekat::TeamPolicyFactory; + const auto scan_policy = TPF::get_thread_range_parallel_scan_team_policy(ncol_, nlev_); Kokkos::parallel_for( scan_policy, KOKKOS_LAMBDA(const ThreadTeam &team) { const int i = team.league_rank(); // column index @@ -483,8 +485,8 @@ void MAMGenericInterface::pre_process(mam_coupling::AerosolState &wet_aero, void MAMGenericInterface::post_process(mam_coupling::AerosolState &wet_aero, mam_coupling::AerosolState &dry_aero, mam_coupling::DryAtmosphere &dry_atm) { - const auto scan_policy = ekat::ExeSpaceUtils< - KT::ExeSpace>::get_thread_range_parallel_scan_team_policy(ncol_, nlev_); + using TPF = ekat::TeamPolicyFactory; + const auto scan_policy = TPF::get_thread_range_parallel_scan_team_policy(ncol_, nlev_); Kokkos::parallel_for( scan_policy, KOKKOS_LAMBDA(const ThreadTeam &team) { const int i = team.league_rank(); // column index diff --git a/components/eamxx/src/physics/mam/eamxx_mam_microphysics_process_interface.cpp b/components/eamxx/src/physics/mam/eamxx_mam_microphysics_process_interface.cpp index 172154eefe08..14288f672fbf 100644 --- a/components/eamxx/src/physics/mam/eamxx_mam_microphysics_process_interface.cpp +++ b/components/eamxx/src/physics/mam/eamxx_mam_microphysics_process_interface.cpp @@ -6,6 +6,8 @@ #include "readfiles/find_season_index_utils.hpp" #include "readfiles/photo_table_utils.cpp" +#include + namespace scream { MAMMicrophysics::MAMMicrophysics(const ekat::Comm &comm, @@ -639,8 +641,11 @@ void MAMMicrophysics::initialize_impl(const RunType run_type) { // RUN_IMPL // ================================================================ void MAMMicrophysics::run_impl(const double dt) { + using TPF = ekat::TeamPolicyFactory; + const int ncol = ncol_; const int nlev = nlev_; + //NOTE: get_default_team_policy produces a team size of 96 (nlev=72). // This interface hangs with this team size. Therefore, // let's use a team size of nlev. @@ -648,9 +653,8 @@ void MAMMicrophysics::run_impl(const double dt) { const int team_size=nlev; #else const int team_size=1; -#endif - const auto policy = - ekat::ExeSpaceUtils::get_team_policy_force_team_size(ncol, team_size); +#endif + const auto policy = TPF::get_default_team_policy(ncol, team_size); // preprocess input -- needs a scan for the calculation of atm height pre_process(wet_aero_, dry_aero_, wet_atm_, dry_atm_); diff --git a/components/eamxx/src/physics/mam/eamxx_mam_optics_process_interface.cpp b/components/eamxx/src/physics/mam/eamxx_mam_optics_process_interface.cpp index e15729298bf1..86f06a4f8a1e 100644 --- a/components/eamxx/src/physics/mam/eamxx_mam_optics_process_interface.cpp +++ b/components/eamxx/src/physics/mam/eamxx_mam_optics_process_interface.cpp @@ -5,6 +5,7 @@ #include "share/grid/point_grid.hpp" #include "share/io/scorpio_input.hpp" +#include #include namespace scream { @@ -299,13 +300,13 @@ void MAMOptics::initialize_impl(const RunType run_type) { calsize_data_.initialize(); } void MAMOptics::run_impl(const double dt) { + using TPF = ekat::TeamPolicyFactory; + constexpr Real zero = 0.0; constexpr Real one = 1.0; - const auto policy = - ekat::ExeSpaceUtils::get_default_team_policy(ncol_, nlev_); - const auto scan_policy = ekat::ExeSpaceUtils< - KT::ExeSpace>::get_thread_range_parallel_scan_team_policy(ncol_, nlev_); + const auto policy = TPF::get_default_team_policy(ncol_, nlev_); + const auto scan_policy = TPF::get_thread_range_parallel_scan_team_policy(ncol_, nlev_); // preprocess input -- needs a scan for the calculation of atm height pre_process(wet_aero_, dry_aero_, wet_atm_, dry_atm_); diff --git a/components/eamxx/src/physics/mam/eamxx_mam_srf_and_online_emissions_functions.hpp b/components/eamxx/src/physics/mam/eamxx_mam_srf_and_online_emissions_functions.hpp index 9c01daf8223c..5227e1127112 100644 --- a/components/eamxx/src/physics/mam/eamxx_mam_srf_and_online_emissions_functions.hpp +++ b/components/eamxx/src/physics/mam/eamxx_mam_srf_and_online_emissions_functions.hpp @@ -1,6 +1,8 @@ #ifndef EAMXX_MAM_SRF_AND_ONLINE_EMISSIONS_FUNCTIONS_HPP #define EAMXX_MAM_SRF_AND_ONLINE_EMISSIONS_FUNCTIONS_HPP +#include + namespace scream { namespace { @@ -14,13 +16,12 @@ using const_view_2d = typename KT::template view_2d; //-------- Inititlize gas and aerosol fluxes ------ void init_fluxes(const int &ncol, view_2d &constituent_fluxes) { // input-output + using TPF = ekat::TeamPolicyFactory; constexpr int pcnst = mam4::aero_model::pcnst; const int gas_start_ind = mam4::utils::gasses_start_ind(); - const auto policy = - ekat::ExeSpaceUtils::get_default_team_policy( - ncol, pcnst - gas_start_ind); + const auto policy = TPF::get_default_team_policy(ncol, pcnst - gas_start_ind); // Parallel loop over all the columns Kokkos::parallel_for( diff --git a/components/eamxx/src/physics/mam/eamxx_mam_srf_and_online_emissions_process_interface.cpp b/components/eamxx/src/physics/mam/eamxx_mam_srf_and_online_emissions_process_interface.cpp index 342c0295b015..e195a2479189 100644 --- a/components/eamxx/src/physics/mam/eamxx_mam_srf_and_online_emissions_process_interface.cpp +++ b/components/eamxx/src/physics/mam/eamxx_mam_srf_and_online_emissions_process_interface.cpp @@ -6,6 +6,8 @@ // For reading soil erodibility file #include +#include + namespace scream { // For reading soil erodibility file @@ -358,8 +360,8 @@ void MAMSrfOnlineEmiss::initialize_impl(const RunType run_type) { // RUN_IMPL // ================================================================ void MAMSrfOnlineEmiss::run_impl(const double dt) { - const auto scan_policy = ekat::ExeSpaceUtils< - KT::ExeSpace>::get_thread_range_parallel_scan_team_policy(ncol_, nlev_); + using TPF = ekat::TeamPolicyFactory; + const auto scan_policy = TPF::get_thread_range_parallel_scan_team_policy(ncol_, nlev_); // preprocess input -- needs a scan for the calculation of atm height Kokkos::parallel_for("preprocess", scan_policy, preprocess_); diff --git a/components/eamxx/src/physics/mam/eamxx_mam_wetscav_process_interface.cpp b/components/eamxx/src/physics/mam/eamxx_mam_wetscav_process_interface.cpp index 72677e640698..be1beeb19fdd 100644 --- a/components/eamxx/src/physics/mam/eamxx_mam_wetscav_process_interface.cpp +++ b/components/eamxx/src/physics/mam/eamxx_mam_wetscav_process_interface.cpp @@ -1,5 +1,7 @@ #include "physics/mam/eamxx_mam_wetscav_process_interface.hpp" +#include + /* ----------------------------------------------------------------- NOTES: @@ -335,8 +337,9 @@ void MAMWetscav::initialize_impl(const RunType run_type) { // RUN_IMPL // ================================================================ void MAMWetscav::run_impl(const double dt) { - const auto scan_policy = ekat::ExeSpaceUtils< - KT::ExeSpace>::get_thread_range_parallel_scan_team_policy(ncol_, nlev_); + using TPF = ekat::TeamPolicyFactory; + + const auto scan_policy = TPF::get_thread_range_parallel_scan_team_policy(ncol_, nlev_); // preprocess input -- needs a scan for the calculation of all variables // needed by this process or setting up MAM4xx classes and their objects @@ -409,8 +412,7 @@ void MAMWetscav::run_impl(const double dt) { const auto qaerwat = get_field_out("qaerwat").get_view(); const auto wetdens = get_field_out("wetdens").get_view(); - const auto policy = - ekat::ExeSpaceUtils::get_default_team_policy(ncol_, nlev_); + const auto policy = TPF::get_default_team_policy(ncol_, nlev_); // Making a local copy of 'nlev_' because we cannot use a member of a class // inside a parallel_for. diff --git a/components/eamxx/src/physics/mam/mam_coupling.hpp b/components/eamxx/src/physics/mam/mam_coupling.hpp index 37e658f44f0c..7e7e798e57ac 100644 --- a/components/eamxx/src/physics/mam/mam_coupling.hpp +++ b/components/eamxx/src/physics/mam/mam_coupling.hpp @@ -440,7 +440,7 @@ inline size_t init_buffer(const ATMBufferManager &buffer_manager, // Compute workspace manager size to check used memory vs. requested memory // (if needed) const auto policy = - ekat::ExeSpaceUtils::get_default_team_policy(ncol_, nlev_); + ekat::TeamPolicyFactory::get_default_team_policy(ncol_, nlev_); const int n_wind_slots = ekat::npack(2)*Spack::n; const int n_trac_slots = ekat::npack(m_num_tracers+3)*Spack::n; const int wsm_size = WSM::get_total_bytes_needed(nlevi_packs, diff --git a/components/eamxx/src/physics/mam/readfiles/marine_organics_impl.hpp b/components/eamxx/src/physics/mam/readfiles/marine_organics_impl.hpp index 7ed8ea5574d2..be17730364a4 100644 --- a/components/eamxx/src/physics/mam/readfiles/marine_organics_impl.hpp +++ b/components/eamxx/src/physics/mam/readfiles/marine_organics_impl.hpp @@ -6,6 +6,8 @@ #include "share/io/eamxx_scorpio_interface.hpp" #include "share/util/eamxx_timing.hpp" +#include + namespace scream { namespace marine_organics { @@ -187,7 +189,7 @@ void marineOrganicsFunctions::perform_time_interpolation( const marineOrganicsInput &data_beg, const marineOrganicsInput &data_end, const marineOrganicsOutput &data_out) { using ExeSpace = typename KT::ExeSpace; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; // Gather time stamp info auto &t_now = time_state.t_now; @@ -210,9 +212,7 @@ void marineOrganicsFunctions::perform_time_interpolation( const int nsectors = data_beg.data.nsectors; const int ncols = data_beg.data.ncols; - using ExeSpace = typename KT::ExeSpace; - using ESU = ekat::ExeSpaceUtils; - const auto policy = ESU::get_default_team_policy(ncols, nsectors); + const auto policy = TPF::get_default_team_policy(ncols, nsectors); Kokkos::parallel_for( policy, KOKKOS_LAMBDA(const MemberType &team) { diff --git a/components/eamxx/src/physics/mam/readfiles/tracer_reader_utils.hpp b/components/eamxx/src/physics/mam/readfiles/tracer_reader_utils.hpp index 3fe4532a6837..71e7dc120f54 100644 --- a/components/eamxx/src/physics/mam/readfiles/tracer_reader_utils.hpp +++ b/components/eamxx/src/physics/mam/readfiles/tracer_reader_utils.hpp @@ -1,8 +1,6 @@ #ifndef EAMXX_MAM_TRACER_READER_UTILS #define EAMXX_MAM_TRACER_READER_UTILS -#include - #include "share/grid/point_grid.hpp" #include "share/grid/remap/coarsening_remapper.hpp" #include "share/grid/remap/identity_remapper.hpp" @@ -12,6 +10,7 @@ #include "share/util/eamxx_time_stamp.hpp" #include "share/util/eamxx_time_interpolation.hpp" +#include #include namespace scream::mam_coupling { @@ -21,7 +20,7 @@ using view_1d_host = typename KT::view_1d::HostMirror; using view_2d_host = typename KT::view_2d::HostMirror; using ExeSpace = typename KT::ExeSpace; -using ESU = ekat::ExeSpaceUtils; +using TPF = ekat::TeamPolicyFactory; using C = scream::physics::Constants; using LIV = ekat::LinInterp; @@ -737,7 +736,7 @@ inline void perform_time_interpolation(const TracerTimeState &time_state, const int outer_iters = ncol * num_vars; - const auto policy = ESU::get_default_team_policy(outer_iters, num_vert); + const auto policy = TPF::get_default_team_policy(outer_iters, num_vert); auto delta_t_fraction = (t_now - t_beg) / delta_t; @@ -786,7 +785,7 @@ inline void compute_source_pressure_levels(const view_1d &ps_src, constexpr auto P0 = C::P0; const int ncols = ps_src.extent(0); const int num_vert_packs = p_src.extent(1); - const auto policy = ESU::get_default_team_policy(ncols, num_vert_packs); + const auto policy = TPF::get_default_team_policy(ncols, num_vert_packs); Kokkos::parallel_for( "tracer_compute_p_src_loop", policy, KOKKOS_LAMBDA(const Team &team) { @@ -818,7 +817,7 @@ inline void perform_vertical_interpolation(const view_2d &p_src_c, output_local[ivar] = output[ivar]; } const int outer_iters = ncol * num_vars; - const auto policy_setup = ESU::get_default_team_policy(outer_iters, pver); + const auto policy_setup = TPF::get_default_team_policy(outer_iters, pver); const auto &data = input.data; Kokkos::parallel_for( @@ -853,7 +852,7 @@ inline void perform_vertical_interpolation(const const_view_1d &altitude_int, const int num_vert_packs = num_vertical_lev_target; const int outer_iters = ncols * num_vars; const auto policy_interp = - ESU::get_default_team_policy(outer_iters, num_vert_packs); + TPF::get_default_team_policy(outer_iters, num_vert_packs); // FIXME: Get m2km from emaxx. const Real m2km = 1e-3; const auto &src_x = altitude_int; diff --git a/components/eamxx/src/physics/mam/srf_emission_impl.hpp b/components/eamxx/src/physics/mam/srf_emission_impl.hpp index 7f60f0db6699..ee7b7a228248 100644 --- a/components/eamxx/src/physics/mam/srf_emission_impl.hpp +++ b/components/eamxx/src/physics/mam/srf_emission_impl.hpp @@ -5,6 +5,8 @@ #include "share/grid/remap/refining_remapper_p2p.hpp" #include "share/io/eamxx_scorpio_interface.hpp" +#include + namespace scream::mam_coupling { template std::shared_ptr @@ -120,8 +122,8 @@ void srfEmissFunctions::perform_time_interpolation( const int nsectors = data_beg.data.nsectors; const int ncols = data_beg.data.ncols; using ExeSpace = typename KT::ExeSpace; - using ESU = ekat::ExeSpaceUtils; - const auto policy = ESU::get_default_team_policy(ncols, nsectors); + using TPF = ekat::TeamPolicyFactory; + const auto policy = TPF::get_default_team_policy(ncols, nsectors); Kokkos::parallel_for( policy, KOKKOS_LAMBDA(const MemberType &team) { diff --git a/components/eamxx/src/physics/ml_correction/eamxx_ml_correction_process_interface.cpp b/components/eamxx/src/physics/ml_correction/eamxx_ml_correction_process_interface.cpp index 2fa76057570e..07263c9ec6be 100644 --- a/components/eamxx/src/physics/ml_correction/eamxx_ml_correction_process_interface.cpp +++ b/components/eamxx/src/physics/ml_correction/eamxx_ml_correction_process_interface.cpp @@ -1,10 +1,12 @@ #include "eamxx_ml_correction_process_interface.hpp" -#include -#include -#include "share/field/field_utils.hpp" #include "physics/share/physics_constants.hpp" #include "share/property_checks/field_lower_bound_check.hpp" #include "share/property_checks/field_within_interval_check.hpp" +#include "share/field/field_utils.hpp" + +#include +#include +#include namespace scream { // ========================================================================================= @@ -164,13 +166,13 @@ void MLCorrection::run_impl(const double dt) { using PC = scream::physics::Constants; using KT = KokkosTypes; using MT = typename KT::MemberType; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; const auto &pseudo_density = get_field_in("pseudo_density").get_view(); const auto &precip_liq_surf_mass = get_field_out("precip_liq_surf_mass").get_view(); const auto &precip_ice_surf_mass = get_field_out("precip_ice_surf_mass").get_view(); constexpr Real g = PC::gravit; const auto num_levs = m_num_levs; - const auto policy = ESU::get_default_team_policy(m_num_cols, m_num_levs); + const auto policy = TPF::get_default_team_policy(m_num_cols, m_num_levs); const auto &qv_told = qv_in.get_view(); const auto &qv_tnew = get_field_in("qv").get_view(); diff --git a/components/eamxx/src/physics/nudging/eamxx_nudging_process_interface.cpp b/components/eamxx/src/physics/nudging/eamxx_nudging_process_interface.cpp index a89db610cd31..93787083f361 100644 --- a/components/eamxx/src/physics/nudging/eamxx_nudging_process_interface.cpp +++ b/components/eamxx/src/physics/nudging/eamxx_nudging_process_interface.cpp @@ -5,9 +5,9 @@ #include "share/util/eamxx_utils.hpp" #include "share/io/eamxx_scorpio_interface.hpp" -#include #include #include +#include namespace scream { @@ -322,7 +322,7 @@ void Nudging::run_impl (const double dt) using KT = KokkosTypes; using RangePolicy = typename KT::RangePolicy; using MemberType = typename KT::MemberType; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; using PackT = ekat::Pack; using view_1d = KT::view_1d; using view_2d = KT::view_2d; @@ -437,7 +437,7 @@ void Nudging::run_impl (const double dt) }); }; - auto policy = ESU::get_default_team_policy(ncols,nlevs_src); + auto policy = TPF::get_default_team_policy(ncols,nlevs_src); Kokkos::parallel_for("", policy, copy_3d); }; @@ -476,7 +476,7 @@ void Nudging::run_impl (const double dt) using LI = ekat::LinInterp; const int nlevs_tgt = m_num_levs; LI vert_interp(ncols,nlevs_src+2,nlevs_tgt); - const auto policy_vinterp = ESU::get_default_team_policy(ncols, nlevs_tgt); + const auto policy_vinterp = TPF::get_default_team_policy(ncols, nlevs_tgt); auto p_tgt = get_field_in("p_mid").get_view(); Kokkos::parallel_for("nudging_vert_interp_setup_loop", policy_vinterp, KOKKOS_LAMBDA(const MemberType& team) { diff --git a/components/eamxx/src/physics/p3/disp/p3_check_values_impl_disp.cpp b/components/eamxx/src/physics/p3/disp/p3_check_values_impl_disp.cpp index da15ae74cf09..e418c0e0b171 100644 --- a/components/eamxx/src/physics/p3/disp/p3_check_values_impl_disp.cpp +++ b/components/eamxx/src/physics/p3/disp/p3_check_values_impl_disp.cpp @@ -1,6 +1,7 @@ #include "p3_functions.hpp" // for ETI only but harmless for GPU #include +#include namespace scream { namespace p3 { @@ -13,8 +14,10 @@ ::check_values_disp(const uview_2d& qv, const uview_2d { using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; + const Int nk_pack = ekat::npack(nk); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(nj, nk_pack); + const auto policy = TPF::get_default_team_policy(nj, nk_pack); Kokkos::parallel_for( "p3_check_values", diff --git a/components/eamxx/src/physics/p3/disp/p3_cloud_sed_impl_disp.cpp b/components/eamxx/src/physics/p3/disp/p3_cloud_sed_impl_disp.cpp index 5aa11a03bcbc..701031d0475d 100644 --- a/components/eamxx/src/physics/p3/disp/p3_cloud_sed_impl_disp.cpp +++ b/components/eamxx/src/physics/p3/disp/p3_cloud_sed_impl_disp.cpp @@ -1,6 +1,7 @@ #include "p3_functions.hpp" // for ETI only but harmless for GPU #include +#include namespace scream { namespace p3 { @@ -34,8 +35,10 @@ ::cloud_sedimentation_disp( const uview_1d& hydrometeorsPresent) { using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; + const Int nk_pack = ekat::npack(nk); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(nj, nk_pack); + const auto policy = TPF::get_default_team_policy(nj, nk_pack); // p3_cloud_sedimentation loop Kokkos::parallel_for( "p3_cloud_sedimentation", diff --git a/components/eamxx/src/physics/p3/disp/p3_ice_sed_impl_disp.cpp b/components/eamxx/src/physics/p3/disp/p3_ice_sed_impl_disp.cpp index add6c3ff3a0a..ddf68ee8992c 100644 --- a/components/eamxx/src/physics/p3/disp/p3_ice_sed_impl_disp.cpp +++ b/components/eamxx/src/physics/p3/disp/p3_ice_sed_impl_disp.cpp @@ -1,6 +1,7 @@ #include "p3_functions.hpp" // for ETI only but harmless for GPU #include +#include namespace scream { namespace p3 { @@ -32,8 +33,10 @@ ::ice_sedimentation_disp( const P3Runtime& runtime_options) { using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; + const Int nk_pack = ekat::npack(nk); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(nj, nk_pack); + const auto policy = TPF::get_default_team_policy(nj, nk_pack); // p3_ice_sedimentation loop Kokkos::parallel_for("p3_ice_sedimentation", policy, KOKKOS_LAMBDA(const MemberType& team) { @@ -74,8 +77,10 @@ ::homogeneous_freezing_disp( const uview_1d& hydrometeorsPresent) { using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; + const Int nk_pack = ekat::npack(nk); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(nj, nk_pack); + const auto policy = TPF::get_default_team_policy(nj, nk_pack); // p3_cloud_sedimentation loop Kokkos::parallel_for( "p3_homogeneous", diff --git a/components/eamxx/src/physics/p3/disp/p3_main_impl_disp.cpp b/components/eamxx/src/physics/p3/disp/p3_main_impl_disp.cpp index fb9eda98efce..74762567d601 100644 --- a/components/eamxx/src/physics/p3/disp/p3_main_impl_disp.cpp +++ b/components/eamxx/src/physics/p3/disp/p3_main_impl_disp.cpp @@ -3,6 +3,7 @@ #include "physics/share/physics_saturation_impl.hpp" #include +#include namespace scream { namespace p3 { @@ -34,7 +35,9 @@ ::p3_main_init_disp( const uview_2d& nevapr, const uview_2d& precip_liq_flux, const uview_2d& precip_ice_flux) { using ExeSpace = typename KT::ExeSpace; - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(nj, nk_pack); + using TPF = ekat::TeamPolicyFactory; + + const auto policy = TPF::get_default_team_policy(nj, nk_pack); Kokkos::parallel_for("p3_main_init", policy, KOKKOS_LAMBDA(const MemberType& team) { diff --git a/components/eamxx/src/physics/p3/disp/p3_main_impl_part1_disp.cpp b/components/eamxx/src/physics/p3/disp/p3_main_impl_part1_disp.cpp index 8de187f2d2d8..6189e89b0b73 100644 --- a/components/eamxx/src/physics/p3/disp/p3_main_impl_part1_disp.cpp +++ b/components/eamxx/src/physics/p3/disp/p3_main_impl_part1_disp.cpp @@ -3,6 +3,7 @@ #include "physics/share/physics_saturation_impl.hpp" #include +#include namespace scream { namespace p3 { @@ -62,8 +63,10 @@ ::p3_main_part1_disp( const P3Runtime& runtime_options) { using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; + const Int nk_pack = ekat::npack(nk); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(nj, nk_pack); + const auto policy = TPF::get_default_team_policy(nj, nk_pack); // p3_cloud_sedimentation loop Kokkos::parallel_for("p3_main_part1", policy, KOKKOS_LAMBDA(const MemberType& team) { diff --git a/components/eamxx/src/physics/p3/disp/p3_main_impl_part2_disp.cpp b/components/eamxx/src/physics/p3/disp/p3_main_impl_part2_disp.cpp index 0b489881358a..0aacb073f6e2 100644 --- a/components/eamxx/src/physics/p3/disp/p3_main_impl_part2_disp.cpp +++ b/components/eamxx/src/physics/p3/disp/p3_main_impl_part2_disp.cpp @@ -1,6 +1,7 @@ #include "p3_functions.hpp" // for ETI only but harmless for GPU #include +#include namespace scream { namespace p3 { @@ -108,8 +109,10 @@ ::p3_main_part2_disp( const P3Runtime& runtime_options) { using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; + const Int nk_pack = ekat::npack(nk); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(nj, nk_pack); + const auto policy = TPF::get_default_team_policy(nj, nk_pack); // p3_cloud_sedimentation loop diff --git a/components/eamxx/src/physics/p3/disp/p3_main_impl_part3_disp.cpp b/components/eamxx/src/physics/p3/disp/p3_main_impl_part3_disp.cpp index f62238579d5d..d9d65ece170b 100644 --- a/components/eamxx/src/physics/p3/disp/p3_main_impl_part3_disp.cpp +++ b/components/eamxx/src/physics/p3/disp/p3_main_impl_part3_disp.cpp @@ -3,6 +3,7 @@ #include "physics/share/physics_saturation_impl.hpp" #include +#include namespace scream { namespace p3 { @@ -57,7 +58,9 @@ ::p3_main_part3_disp( const P3Runtime& runtime_options) { using ExeSpace = typename KT::ExeSpace; - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(nj, nk_pack); + using TPF = ekat::TeamPolicyFactory; + + const auto policy = TPF::get_default_team_policy(nj, nk_pack); // p3_cloud_sedimentation loop Kokkos::parallel_for( "p3_main_part3_disp", diff --git a/components/eamxx/src/physics/p3/disp/p3_rain_sed_impl_disp.cpp b/components/eamxx/src/physics/p3/disp/p3_rain_sed_impl_disp.cpp index fe4be4103bf0..83372e57bcf2 100644 --- a/components/eamxx/src/physics/p3/disp/p3_rain_sed_impl_disp.cpp +++ b/components/eamxx/src/physics/p3/disp/p3_rain_sed_impl_disp.cpp @@ -1,6 +1,7 @@ #include "p3_functions.hpp" // for ETI only but harmless for GPU #include +#include namespace scream { namespace p3 { @@ -31,8 +32,10 @@ ::rain_sedimentation_disp( const P3Runtime& runtime_options) { using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; + const Int nk_pack = ekat::npack(nk); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(nj, nk_pack); + const auto policy = TPF::get_default_team_policy(nj, nk_pack); // p3_rain_sedimentation loop Kokkos::parallel_for("p3_rain_sed_disp", policy, KOKKOS_LAMBDA(const MemberType& team) { diff --git a/components/eamxx/src/physics/p3/eamxx_p3_process_interface.cpp b/components/eamxx/src/physics/p3/eamxx_p3_process_interface.cpp index 48128e979642..cd4b743bb676 100644 --- a/components/eamxx/src/physics/p3/eamxx_p3_process_interface.cpp +++ b/components/eamxx/src/physics/p3/eamxx_p3_process_interface.cpp @@ -165,6 +165,8 @@ void P3Microphysics::set_grids(const std::shared_ptr grids_m // ========================================================================================= size_t P3Microphysics::requested_buffer_size_in_bytes() const { + using TPF = ekat::TeamPolicyFactory; + const Int nk_pack = ekat::npack(m_num_levs); const Int nk_pack_p1 = ekat::npack(m_num_levs+1); @@ -179,8 +181,8 @@ size_t P3Microphysics::requested_buffer_size_in_bytes() const m_num_cols*3*sizeof(Real); // Number of Reals needed by the WorkspaceManager passed to p3_main - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(m_num_cols, nk_pack); - const size_t wsm_request = WSM::get_total_bytes_needed(nk_pack_p1, 52, policy); + const auto policy = TPF::get_default_team_policy(m_num_cols, nk_pack); + const size_t wsm_request = WSM::get_total_bytes_needed(nk_pack_p1, 52, policy); return interface_request + wsm_request; } @@ -188,6 +190,8 @@ size_t P3Microphysics::requested_buffer_size_in_bytes() const // ========================================================================================= void P3Microphysics::init_buffers(const ATMBufferManager &buffer_manager) { + using TPF = ekat::TeamPolicyFactory; + EKAT_REQUIRE_MSG(buffer_manager.allocated_bytes() >= requested_buffer_size_in_bytes(), "Error! Buffers size not sufficient.\n"); Real* mem = reinterpret_cast(buffer_manager.get_memory()); @@ -250,7 +254,7 @@ void P3Microphysics::init_buffers(const ATMBufferManager &buffer_manager) // Compute workspace manager size to check used memory // vs. requested memory - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(m_num_cols, nk_pack); + const auto policy = TPF::get_default_team_policy(m_num_cols, nk_pack); const int wsm_size = WSM::get_total_bytes_needed(nk_pack_p1, 52, policy)/sizeof(Spack); s_mem += wsm_size; @@ -261,6 +265,7 @@ void P3Microphysics::init_buffers(const ATMBufferManager &buffer_manager) // ========================================================================================= void P3Microphysics::initialize_impl (const RunType /* run_type */) { + using TPF = ekat::TeamPolicyFactory; // Set property checks for fields in this process add_invariant_check(get_field_out("T_mid"),m_grid,100.0,500.0,false); @@ -512,7 +517,7 @@ void P3Microphysics::initialize_impl (const RunType /* run_type */) } // Setup WSM for internal local variables - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(m_num_cols, nk_pack); + const auto policy = TPF::get_default_team_policy(m_num_cols, nk_pack); workspace_mgr.setup(m_buffer.wsm_data, nk_pack_p1, 52, policy); } diff --git a/components/eamxx/src/physics/p3/eamxx_p3_run.cpp b/components/eamxx/src/physics/p3/eamxx_p3_run.cpp index cf6c316b8cf8..767fac95e64c 100644 --- a/components/eamxx/src/physics/p3/eamxx_p3_run.cpp +++ b/components/eamxx/src/physics/p3/eamxx_p3_run.cpp @@ -1,15 +1,19 @@ #include "physics/p3/eamxx_p3_process_interface.hpp" +#include + namespace scream { void P3Microphysics::run_impl (const double dt) { + using TPF = ekat::TeamPolicyFactory; + // Set the dt for p3 postprocessing p3_postproc.m_dt = dt; // Create policy for pre and post process pfor const auto nlev_packs = ekat::npack(m_num_levs); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(m_num_cols, nlev_packs); + const auto policy = TPF::get_default_team_policy(m_num_cols, nlev_packs); // Assign values to local arrays used by P3, these are now stored in p3_loc. Kokkos::parallel_for( diff --git a/components/eamxx/src/physics/p3/impl/p3_main_impl.hpp b/components/eamxx/src/physics/p3/impl/p3_main_impl.hpp index 96772e12ab19..14f5b2beb2ce 100644 --- a/components/eamxx/src/physics/p3/impl/p3_main_impl.hpp +++ b/components/eamxx/src/physics/p3/impl/p3_main_impl.hpp @@ -6,6 +6,7 @@ #include "physics/share/physics_saturation_impl.hpp" #include +#include namespace scream { namespace p3 { @@ -86,11 +87,12 @@ ::p3_main_internal( Int nk) { using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using ScratchViewType = Kokkos::View; const Int nk_pack = ekat::npack(nk); const auto scratch_size = ScratchViewType::shmem_size(2); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(nj, nk_pack).set_scratch_size(0, Kokkos::PerTeam(scratch_size)); + const auto policy = TPF::get_default_team_policy(nj, nk_pack).set_scratch_size(0, Kokkos::PerTeam(scratch_size)); // load constants into local vars const Scalar inv_dt = 1 / infrastructure.dt; diff --git a/components/eamxx/src/physics/p3/tests/infra/p3_test_data.cpp b/components/eamxx/src/physics/p3/tests/infra/p3_test_data.cpp index 50d05594dedd..c7f0463a1c6f 100644 --- a/components/eamxx/src/physics/p3/tests/infra/p3_test_data.cpp +++ b/components/eamxx/src/physics/p3/tests/infra/p3_test_data.cpp @@ -1,8 +1,8 @@ #include "p3_test_data.hpp" #include "p3_data.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include +#include #include #include @@ -341,6 +341,7 @@ void calc_first_order_upwind_step_host_impl( using view_1d = typename P3F::view_1d; using KT = typename P3F::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename P3F::MemberType; using view_1d_ptr_array = typename P3F::view_1d_ptr_array; using uview_1d = typename P3F::uview_1d; @@ -376,7 +377,7 @@ void calc_first_order_upwind_step_host_impl( } // Call core function from kernel - auto policy = ekat::ExeSpaceUtils::get_default_team_policy(1, nk_pack); + auto policy = TPF::get_default_team_policy(1, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { view_1d_ptr_array fluxes_ptr, vs_ptr, qnx_ptr; for (int i = 0; i < N; ++i) { @@ -407,6 +408,7 @@ void generalized_sedimentation_host_impl( using view_1ds = typename P3F::view_1d; using KT = typename P3F::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename P3F::MemberType; using view_1d_ptr_array = typename P3F::view_1d_ptr_array; using uview_1d = typename P3F::uview_1d; @@ -449,7 +451,7 @@ void generalized_sedimentation_host_impl( } // Call core function from kernel - auto policy = ekat::ExeSpaceUtils::get_default_team_policy(1, nk_pack); + auto policy = TPF::get_default_team_policy(1, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { view_1d_ptr_array fluxes_ptr, vs_ptr, qnx_ptr; for (int i = 0; i < N; ++i) { @@ -536,6 +538,7 @@ void cloud_sedimentation_host( using view_1d = typename P3F::view_1d; using KT = typename P3F::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename P3F::MemberType; EKAT_REQUIRE_MSG(kts == 1, "kts must be 1, got " << kts); @@ -573,7 +576,7 @@ void cloud_sedimentation_host( nc_tend_d (temp_d[12]); // Call core function from kernel - auto policy = ekat::ExeSpaceUtils::get_default_team_policy(1, nk_pack); + auto policy = TPF::get_default_team_policy(1, nk_pack); ekat::WorkspaceManager wsm(rho_d.extent(0), 4, policy); Kokkos::parallel_reduce(policy, KOKKOS_LAMBDA(const MemberType& team, Real& precip_liq_surf_k) { @@ -604,6 +607,7 @@ void ice_sedimentation_host( using view_1d = typename P3F::view_1d; using KT = typename P3F::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename P3F::MemberType; EKAT_REQUIRE_MSG(kts == 1, "kts must be 1, got " << kts); @@ -642,7 +646,7 @@ void ice_sedimentation_host( // Call core function from kernel auto ice_table_vals = P3F::p3_init().ice_table_vals; - auto policy = ekat::ExeSpaceUtils::get_default_team_policy(1, nk_pack); + auto policy = TPF::get_default_team_policy(1, nk_pack); ekat::WorkspaceManager wsm(rho_d.extent(0), 6, policy); Real my_precip_ice_surf = 0; Kokkos::parallel_reduce(policy, KOKKOS_LAMBDA(const MemberType& team, Real& precip_ice_surf_k) { @@ -676,6 +680,7 @@ void rain_sedimentation_host( using view_1d = typename P3F::view_1d; using KT = typename P3F::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename P3F::MemberType; EKAT_REQUIRE_MSG(kts == 1, "kts must be 1, got " << kts); @@ -717,7 +722,7 @@ void rain_sedimentation_host( auto tables = P3F::p3_init(); auto vn_table_vals = tables.vn_table_vals; auto vm_table_vals = tables.vm_table_vals; - auto policy = ekat::ExeSpaceUtils::get_default_team_policy(1, nk_pack); + auto policy = TPF::get_default_team_policy(1, nk_pack); ekat::WorkspaceManager wsm(rho_d.extent(0), 4, policy); Real my_precip_liq_surf = 0; Kokkos::parallel_reduce(policy, KOKKOS_LAMBDA(const MemberType& team, Real& precip_liq_surf_k) { @@ -751,6 +756,7 @@ void homogeneous_freezing_host( using view_1d = typename P3F::view_1d; using KT = typename P3F::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename P3F::MemberType; EKAT_REQUIRE_MSG(kts == 1, "kts must be 1, got " << kts); @@ -785,7 +791,7 @@ void homogeneous_freezing_host( th_atm_d (temp_d[current_index++]); // Call core function from kernel - auto policy = ekat::ExeSpaceUtils::get_default_team_policy(1, nk_pack); + auto policy = TPF::get_default_team_policy(1, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { P3F::homogeneous_freezing( @@ -810,6 +816,7 @@ void check_values_host(Real* qv, Real* temp, Int kstart, Int kend, using suview_1d = typename P3F::uview_1d; using KT = typename P3F::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename P3F::MemberType; EKAT_REQUIRE_MSG(kend > kstart, @@ -826,7 +833,7 @@ void check_values_host(Real* qv, Real* temp, Int kstart, Int kend, view_1d qv_d(cvd_d[0]), temp_d(cvd_d[1]), col_loc_d(cvd_d[2]); suview_1d ucol_loc_d(reinterpret_cast(col_loc_d.data()), 3); - auto policy = ekat::ExeSpaceUtils::get_default_team_policy(1, nk_pack); + auto policy = TPF::get_default_team_policy(1, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { P3F::check_values(qv_d, temp_d, kstart, kend, timestepcount, force_abort, source_ind, team, @@ -852,6 +859,7 @@ void p3_main_part1_host( using bview_1d = typename P3F::view_1d; using KT = typename P3F::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename P3F::MemberType; EKAT_REQUIRE_MSG(kts == 1, "kts must be 1, got " << kts); @@ -915,7 +923,7 @@ void p3_main_part1_host( // Call core function from kernel bview_1d bools_d("bools", 2); - auto policy = ekat::ExeSpaceUtils::get_default_team_policy(1, nk_pack); + auto policy = TPF::get_default_team_policy(1, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { P3F::p3_main_part1( @@ -968,6 +976,7 @@ void p3_main_part2_host( using bview_1d = typename P3F::view_1d; using KT = typename P3F::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename P3F::MemberType; EKAT_REQUIRE_MSG(kts == 1, "kts must be 1, got " << kts); @@ -1103,7 +1112,7 @@ void p3_main_part2_host( const auto collect_table_vals = tables.collect_table_vals; const auto revap_table_vals = tables.revap_table_vals; bview_1d bools_d("bools", 1); - auto policy = ekat::ExeSpaceUtils::get_default_team_policy(1, nk_pack); + auto policy = TPF::get_default_team_policy(1, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { P3F::p3_main_part2( @@ -1175,6 +1184,7 @@ void p3_main_part3_host( using view_1d = typename P3F::view_1d; using KT = typename P3F::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename P3F::MemberType; EKAT_REQUIRE_MSG(kts == 1, "kts must be 1, got " << kts); @@ -1238,7 +1248,7 @@ void p3_main_part3_host( auto tables = P3F::p3_init(); const auto dnu = tables.dnu_table_vals; const auto ice_table_vals = tables.ice_table_vals; - auto policy = ekat::ExeSpaceUtils::get_default_team_policy(1, nk_pack); + auto policy = TPF::get_default_team_policy(1, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { P3F::p3_main_part3(team, nk_pack, max_total_ni, dnu, ice_table_vals, @@ -1281,6 +1291,7 @@ Int p3_main_host( using Spack = typename P3F::Spack; using KT = typename P3F::KT; + using TPF = ekat::TeamPolicyFactory; using view_2d = typename P3F::view_2d; using sview_1d = typename P3F::view_1d; using sview_2d = typename P3F::view_2d; @@ -1489,7 +1500,7 @@ Int p3_main_host( P3F::P3Runtime runtime_options{740.0e3}; // Create local workspace - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(nj, nk_pack); + const auto policy = TPF::get_default_team_policy(nj, nk_pack); ekat::WorkspaceManager workspace_mgr(nk_pack, 52, policy); auto elapsed_microsec = P3F::p3_main(runtime_options, prog_state, diag_inputs, diag_outputs, infrastructure, diff --git a/components/eamxx/src/physics/p3/tests/p3_find_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_find_unit_tests.cpp index 017db5423e26..82c012b919b0 100644 --- a/components/eamxx/src/physics/p3/tests/p3_find_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_find_unit_tests.cpp @@ -1,12 +1,13 @@ #include "catch2/catch.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" #include "p3_unit_tests_common.hpp" #include "share/eamxx_types.hpp" +#include + #include #include #include @@ -25,6 +26,8 @@ struct UnitWrap::UnitTest::TestFind : public UnitWrap::UnitTest::Base { void run() { + using TPF = ekat::TeamPolicyFactory; + const int max_threads = #ifdef KOKKOS_ENABLE_OPENMP Kokkos::OpenMP().concurrency() @@ -57,7 +60,7 @@ void run() Kokkos::deep_copy(qr_not_present, mirror_qrnp); for (int team_size : {1, max_threads}) { - const auto policy = ekat::ExeSpaceUtils::get_team_policy_force_team_size(1, team_size); + const auto policy = TPF::get_team_policy_force_team_size(1, team_size); int errs_for_this_ts = 0; Kokkos::parallel_reduce("unittest_find_top_bottom", diff --git a/components/eamxx/src/physics/p3/tests/p3_ice_collection_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_ice_collection_unit_tests.cpp index 8000eb49c2ef..5631882b7e95 100644 --- a/components/eamxx/src/physics/p3/tests/p3_ice_collection_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_ice_collection_unit_tests.cpp @@ -1,7 +1,6 @@ #include "catch2/catch.hpp" #include "share/eamxx_types.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "p3_functions.hpp" #include "p3_test_data.hpp" diff --git a/components/eamxx/src/physics/p3/tests/p3_ice_tables_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_ice_tables_unit_tests.cpp index 425923a6bae4..4ab72b3fcf1a 100644 --- a/components/eamxx/src/physics/p3/tests/p3_ice_tables_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_ice_tables_unit_tests.cpp @@ -289,7 +289,7 @@ struct UnitWrap::UnitTest::TestTableIce : public UnitWrap::UnitTest::Base init_table_linear_dimension(ice_table_vals, 0); int nerr = 0; - TeamPolicy policy(ekat::ExeSpaceUtils::get_default_team_policy(ice_table_vals.extent(0), ice_table_vals.extent(1))); + TeamPolicy policy(ekat::TeamPolicyFactory::get_default_team_policy(ice_table_vals.extent(0), ice_table_vals.extent(1))); Kokkos::parallel_reduce("TestTableIce::run", policy, KOKKOS_LAMBDA(const MemberType& team, int& errors) { //int i = team.league_rank(); Kokkos::parallel_for(Kokkos::TeamVectorRange(team, ice_table_vals.extent(1)), [&] (const int& j) { diff --git a/components/eamxx/src/physics/p3/tests/p3_subgrid_variance_scaling_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_subgrid_variance_scaling_unit_tests.cpp index 7356bb028cb1..b78a41a240f8 100644 --- a/components/eamxx/src/physics/p3/tests/p3_subgrid_variance_scaling_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_subgrid_variance_scaling_unit_tests.cpp @@ -2,12 +2,12 @@ #include "p3_functions.hpp" #include "p3_test_data.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" - #include "p3_unit_tests_common.hpp" #include "share/eamxx_types.hpp" +#include + #include #include #include @@ -21,6 +21,7 @@ namespace unit_test { template struct UnitWrap::UnitTest::TestP3SubgridVarianceScaling : public UnitWrap::UnitTest::Base { + using TPF = ekat::TeamPolicyFactory; //----------------------------------------------------------------- void run_bfb_tests() { @@ -45,31 +46,31 @@ struct UnitWrap::UnitTest::TestP3SubgridVarianceScaling : public UnitWrap::Un for (Int i = 0; i < 3; ++i) { // loop over exponents for (Int j = 0; j < 16; ++j) { // loop over relvars - // Get baseline solution - // ---------------------------------- + // Get baseline solution + // ---------------------------------- if (this->m_baseline_action == COMPARE) { impl::read_scalars(Base::m_ifile,baseline_scaling); } - // Get C++ solution - // ---------------------------------- + // Get C++ solution + // ---------------------------------- - //Make scalar copies so available on device - Scalar expon = expons[i]; - Scalar relvar = relvars[j]; + //Make scalar copies so available on device + Scalar expon = expons[i]; + Scalar relvar = relvars[j]; - RangePolicy my_policy(0,1); - Kokkos::parallel_for(my_policy,KOKKOS_LAMBDA(int /* i */){ - Spack scalings = Functions::subgrid_variance_scaling(Spack(relvar),expon ); + RangePolicy my_policy(0,1); + Kokkos::parallel_for(my_policy,KOKKOS_LAMBDA(int /* i */){ + Spack scalings = Functions::subgrid_variance_scaling(Spack(relvar),expon ); - //all elements of scalings are identical. just copy 1 back to host. - scaling_device(0) = scalings[0]; - }); + //all elements of scalings are identical. just copy 1 back to host. + scaling_device(0) = scalings[0]; + }); - // Copy results back to host - Kokkos::deep_copy(scaling_host, scaling_device); + // Copy results back to host + Kokkos::deep_copy(scaling_host, scaling_device); - // Validate results + // Validate results if (SCREAM_BFB_TESTING && this->m_baseline_action == COMPARE) { REQUIRE(baseline_scaling == scaling_host(0) ); } @@ -161,7 +162,7 @@ struct UnitWrap::UnitTest::TestP3SubgridVarianceScaling : public UnitWrap::Un int nerr = 0; //functions below use Spack size <16 but can't deal w/ exceptions on GPU, so do it here. - TeamPolicy policy(ekat::ExeSpaceUtils::get_default_team_policy(1, 1)); + auto policy = TPF::get_default_team_policy(1, 1); Kokkos::parallel_reduce("SGSvarScaling::run", policy, KOKKOS_LAMBDA(const MemberType& /* team */, int& errors) { errors = 0; diff --git a/components/eamxx/src/physics/p3/tests/p3_upwind_unit_tests.cpp b/components/eamxx/src/physics/p3/tests/p3_upwind_unit_tests.cpp index 4b5bd28647cc..7d65b054c86e 100644 --- a/components/eamxx/src/physics/p3/tests/p3_upwind_unit_tests.cpp +++ b/components/eamxx/src/physics/p3/tests/p3_upwind_unit_tests.cpp @@ -1,14 +1,12 @@ #include "catch2/catch.hpp" #include "p3_unit_tests_common.hpp" - #include "p3_functions.hpp" #include "p3_test_data.hpp" #include "share/eamxx_types.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" -#include "ekat/ekat_pack_kokkos.hpp" +#include #include #include @@ -37,6 +35,8 @@ struct UnitWrap::UnitTest::TestUpwind : public UnitWrap::UnitTest::Base { void run_phys() { using ekat::repack; + using TPF = ekat::TeamPolicyFactory; + constexpr auto SPS = SCREAM_SMALL_PACK_SIZE; static const Int nfield = 2; @@ -93,7 +93,7 @@ void run_phys() Kokkos::parallel_for(Kokkos::TeamVectorRange(team, npack), set_fields); team.team_barrier(); }; - Kokkos::parallel_for(ekat::ExeSpaceUtils::get_default_team_policy(1, npack), + Kokkos::parallel_for(TPF::get_default_team_policy(1, npack), init_fields); const auto sflux = scalarize(flux[1]); @@ -187,7 +187,7 @@ void run_phys() if (r_max1 > r_max0 + 10*eps) ++nerr; }; Int lnerr; - Kokkos::parallel_reduce(ekat::ExeSpaceUtils::get_default_team_policy(1, npack), + Kokkos::parallel_reduce(TPF::get_default_team_policy(1, npack), step, lnerr); nerr += lnerr; Kokkos::fence(); diff --git a/components/eamxx/src/physics/rrtmgp/eamxx_rrtmgp_process_interface.cpp b/components/eamxx/src/physics/rrtmgp/eamxx_rrtmgp_process_interface.cpp index ef8e586ae307..67991afadfdc 100644 --- a/components/eamxx/src/physics/rrtmgp/eamxx_rrtmgp_process_interface.cpp +++ b/components/eamxx/src/physics/rrtmgp/eamxx_rrtmgp_process_interface.cpp @@ -10,6 +10,7 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/util/eamxx_column_ops.hpp" +#include #include #include "cpp/rrtmgp/mo_gas_concentrations.h" @@ -19,6 +20,7 @@ namespace scream { using KT = KokkosTypes; using ExeSpace = KT::ExeSpace; using MemberType = KT::MemberType; +using TPF = ekat::TeamPolicyFactory; namespace { @@ -714,7 +716,7 @@ void RRTMGPRadiation::run_impl (const double dt) { if (name == "h2o") { // h2o is (wet) mass mixing ratio in FM, otherwise known as "qv", which we've already read in above // Convert to vmr - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(m_ncol, m_nlay); + const auto policy = TPF::get_default_team_policy(m_ncol, m_nlay); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const int icol = team.league_rank(); Kokkos::parallel_for(Kokkos::TeamVectorRange(team, nlay), [&] (const int& k) { @@ -730,7 +732,7 @@ void RRTMGPRadiation::run_impl (const double dt) { ); // Back out volume mixing ratios const auto air_mol_weight = PC::MWdry; - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(m_ncol, m_nlay); + const auto policy = TPF::get_default_team_policy(m_ncol, m_nlay); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const int i = team.league_rank(); Kokkos::parallel_for(Kokkos::TeamVectorRange(team, nlay), [&] (const int& k) { @@ -843,7 +845,7 @@ void RRTMGPRadiation::run_impl (const double dt) { } Kokkos::deep_copy(mu0_k,h_mu0); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(ncol, m_nlay); + const auto policy = TPF::get_default_team_policy(ncol, m_nlay); TIMED_KERNEL( Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const int i = team.league_rank(); @@ -969,7 +971,7 @@ void RRTMGPRadiation::run_impl (const double dt) { auto lwp_k = m_buffer.lwp_k; auto iwp_k = m_buffer.iwp_k; if (not do_subcol_sampling) { - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(ncol, m_nlay); + const auto policy = TPF::get_default_team_policy(ncol, m_nlay); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const int i = team.league_rank(); const int icol = i + beg; @@ -983,7 +985,7 @@ void RRTMGPRadiation::run_impl (const double dt) { }); }); } else { - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(ncol, m_nlay); + const auto policy = TPF::get_default_team_policy(ncol, m_nlay); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const int i = team.league_rank(); const int icol = i + beg; @@ -1000,7 +1002,7 @@ void RRTMGPRadiation::run_impl (const double dt) { interface_t::mixing_ratio_to_cloud_mass(qi_k, cldfrac_tot_k, p_del_k, iwp_k); // Convert to g/m2 (needed by RRTMGP) { - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(ncol, m_nlay); + const auto policy = TPF::get_default_team_policy(ncol, m_nlay); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const int i = team.league_rank(); Kokkos::parallel_for(Kokkos::TeamVectorRange(team, nlay), [&] (const int& k) { @@ -1057,7 +1059,7 @@ void RRTMGPRadiation::run_impl (const double dt) { lw_flux_up_k, lw_flux_dn_k, p_del_k, lw_heating_k ); { - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(ncol, m_nlay); + const auto policy = TPF::get_default_team_policy(ncol, m_nlay); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const int idx = team.league_rank(); const int icol = idx+beg; @@ -1133,7 +1135,7 @@ void RRTMGPRadiation::run_impl (const double dt) { ); // Copy output data back to FieldManager - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(ncol, m_nlay); + const auto policy = TPF::get_default_team_policy(ncol, m_nlay); TIMED_KERNEL( Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const int i = team.league_rank(); @@ -1190,7 +1192,7 @@ void RRTMGPRadiation::run_impl (const double dt) { // across timesteps to conserve energy. const int ncols = m_ncol; const int nlays = m_nlay; - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(ncols, nlays); + const auto policy = TPF::get_default_team_policy(ncols, nlays); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const int i = team.league_rank(); Kokkos::parallel_for(Kokkos::TeamVectorRange(team, nlays), [&] (const int& k) { @@ -1214,7 +1216,7 @@ void RRTMGPRadiation::run_impl (const double dt) { const int ncols = m_ncol; const int nlays = m_nlay; - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(ncols, nlays); + const auto policy = TPF::get_default_team_policy(ncols, nlays); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const int icol = team.league_rank(); diff --git a/components/eamxx/src/physics/share/eamxx_trcmix.cpp b/components/eamxx/src/physics/share/eamxx_trcmix.cpp index 75461f9f39bf..b17b07460665 100644 --- a/components/eamxx/src/physics/share/eamxx_trcmix.cpp +++ b/components/eamxx/src/physics/share/eamxx_trcmix.cpp @@ -1,7 +1,7 @@ #include "eamxx_trcmix.hpp" #include "physics_constants.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" +#include #include #include @@ -50,7 +50,7 @@ void trcmix( {"cfc12",{rmwf12*f12vmr, 0.4000, 0.00222, 0.5 , 0.024444 }} }; - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(ncols, nlevs); + const auto policy = ekat::TeamPolicyFactory::get_default_team_policy(ncols, nlevs); if (name == "o2" || name == "co2") { const auto val = name == "o2" ? C::o2mmr : rmwco2 * co2vmr; diff --git a/components/eamxx/src/physics/shoc/disp/shoc_assumed_pdf_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_assumed_pdf_disp.cpp index 7c3ec17be334..bb38950b2dd5 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_assumed_pdf_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_assumed_pdf_disp.cpp @@ -1,6 +1,7 @@ #include "shoc_functions.hpp" #include +#include namespace scream { namespace shoc { @@ -36,9 +37,10 @@ ::shoc_assumed_pdf_disp( const view_2d& shoc_ql2) { using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; const auto nlev_packs = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_packs); + const auto policy = TPF::get_default_team_policy(shcol, nlev_packs); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); diff --git a/components/eamxx/src/physics/shoc/disp/shoc_check_tke_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_check_tke_disp.cpp index 917f2ce74166..4e33f94758b3 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_check_tke_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_check_tke_disp.cpp @@ -1,6 +1,7 @@ #include "shoc_functions.hpp" #include +#include namespace scream { namespace shoc { @@ -13,9 +14,10 @@ ::check_tke_disp( const view_2d& tke) { using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; const auto nlev_packs = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_packs); + const auto policy = TPF::get_default_team_policy(shcol, nlev_packs); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); diff --git a/components/eamxx/src/physics/shoc/disp/shoc_compute_shoc_temperature_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_compute_shoc_temperature_disp.cpp index 0344a4dbce1c..eafe5db29791 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_compute_shoc_temperature_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_compute_shoc_temperature_disp.cpp @@ -1,6 +1,7 @@ #include "shoc_functions.hpp" #include +#include namespace scream { namespace shoc { @@ -16,9 +17,10 @@ ::compute_shoc_temperature_disp( const view_2d& tabs) { using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; const auto nlev_packs = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_packs); + const auto policy = TPF::get_default_team_policy(shcol, nlev_packs); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); diff --git a/components/eamxx/src/physics/shoc/disp/shoc_compute_shoc_vapor_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_compute_shoc_vapor_disp.cpp index 80d2d893e218..a28ba2b73f16 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_compute_shoc_vapor_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_compute_shoc_vapor_disp.cpp @@ -1,6 +1,7 @@ #include "shoc_functions.hpp" #include +#include namespace scream { namespace shoc { @@ -15,9 +16,10 @@ ::compute_shoc_vapor_disp( const view_2d& qv) { using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; const auto nlev_packs = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_packs); + const auto policy = TPF::get_default_team_policy(shcol, nlev_packs); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); diff --git a/components/eamxx/src/physics/shoc/disp/shoc_diag_second_shoc_moments_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_diag_second_shoc_moments_disp.cpp index 77cc7f2bfb0e..4d757a57e5cf 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_diag_second_shoc_moments_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_diag_second_shoc_moments_disp.cpp @@ -1,6 +1,7 @@ #include "shoc_functions.hpp" #include +#include namespace scream { namespace shoc { @@ -41,9 +42,10 @@ ::diag_second_shoc_moments_disp( const view_2d& w_sec) { using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; const auto nlev_packs = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_packs); + const auto policy = TPF::get_default_team_policy(shcol, nlev_packs); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); diff --git a/components/eamxx/src/physics/shoc/disp/shoc_diag_third_shoc_moments_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_diag_third_shoc_moments_disp.cpp index 1baf16e70373..fe4cada4a8be 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_diag_third_shoc_moments_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_diag_third_shoc_moments_disp.cpp @@ -1,6 +1,7 @@ #include "shoc_functions.hpp" #include +#include namespace scream { namespace shoc { @@ -28,9 +29,10 @@ ::diag_third_shoc_moments_disp( const view_2d& w3) { using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; const auto nlev_packs = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_packs); + const auto policy = TPF::get_default_team_policy(shcol, nlev_packs); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); diff --git a/components/eamxx/src/physics/shoc/disp/shoc_energy_fixer_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_energy_fixer_disp.cpp index 359f113c733e..4eb8c3aa3fcf 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_energy_fixer_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_energy_fixer_disp.cpp @@ -1,6 +1,7 @@ #include "shoc_functions.hpp" #include +#include namespace scream { namespace shoc { @@ -32,9 +33,10 @@ ::shoc_energy_fixer_disp( const view_2d& host_dse) { using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; const auto nlev_packs = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_packs); + const auto policy = TPF::get_default_team_policy(shcol, nlev_packs); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); diff --git a/components/eamxx/src/physics/shoc/disp/shoc_energy_integrals_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_energy_integrals_disp.cpp index fc5949fda315..b5a56855194e 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_energy_integrals_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_energy_integrals_disp.cpp @@ -1,6 +1,7 @@ #include "shoc_functions.hpp" #include +#include namespace scream { namespace shoc { @@ -22,9 +23,10 @@ ::shoc_energy_integrals_disp( const view_1d& wl_b) { using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; const auto nlev_packs = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_packs); + const auto policy = TPF::get_default_team_policy(shcol, nlev_packs); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); diff --git a/components/eamxx/src/physics/shoc/disp/shoc_grid_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_grid_disp.cpp index 0c8d97a4bcf8..fb5ea120c1f9 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_grid_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_grid_disp.cpp @@ -1,6 +1,7 @@ #include "shoc_functions.hpp" #include +#include namespace scream { namespace shoc { @@ -19,9 +20,10 @@ ::shoc_grid_disp( const view_2d& rho_zt) { using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; const auto nlev_packs = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_packs); + const auto policy = TPF::get_default_team_policy(shcol, nlev_packs); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); diff --git a/components/eamxx/src/physics/shoc/disp/shoc_length_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_length_disp.cpp index 26cc4e430f7b..d2f2e197d3c9 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_length_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_length_disp.cpp @@ -1,6 +1,7 @@ #include "shoc_functions.hpp" #include +#include namespace scream { namespace shoc { @@ -26,9 +27,10 @@ ::shoc_length_disp( const view_2d& shoc_mix) { using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; const auto nlev_packs = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_packs); + const auto policy = TPF::get_default_team_policy(shcol, nlev_packs); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); diff --git a/components/eamxx/src/physics/shoc/disp/shoc_pblintd_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_pblintd_disp.cpp index e0789473a3e7..68dfb9d05847 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_pblintd_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_pblintd_disp.cpp @@ -1,6 +1,7 @@ #include "shoc_functions.hpp" #include +#include namespace scream { namespace shoc { @@ -27,9 +28,10 @@ ::pblintd_disp( const view_1d& pblh) { using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; const auto nlev_packs = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_packs); + const auto policy = TPF::get_default_team_policy(shcol, nlev_packs); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); diff --git a/components/eamxx/src/physics/shoc/disp/shoc_tke_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_tke_disp.cpp index 9aa61879e149..bded4f89289a 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_tke_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_tke_disp.cpp @@ -1,6 +1,7 @@ #include "shoc_functions.hpp" #include +#include namespace scream { namespace shoc { @@ -38,9 +39,10 @@ ::shoc_tke_disp( const view_2d& isotropy) { using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; const auto nlev_packs = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_packs); + const auto policy = TPF::get_default_team_policy(shcol, nlev_packs); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); diff --git a/components/eamxx/src/physics/shoc/disp/shoc_update_host_dse_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_update_host_dse_disp.cpp index 84ba583f491c..37c0fa344f48 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_update_host_dse_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_update_host_dse_disp.cpp @@ -1,6 +1,7 @@ #include "shoc_functions.hpp" #include +#include namespace scream { namespace shoc { @@ -18,9 +19,10 @@ ::update_host_dse_disp( const view_2d& host_dse) { using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; const auto nlev_packs = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_packs); + const auto policy = TPF::get_default_team_policy(shcol, nlev_packs); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); diff --git a/components/eamxx/src/physics/shoc/disp/shoc_update_prognostics_implicit_disp.cpp b/components/eamxx/src/physics/shoc/disp/shoc_update_prognostics_implicit_disp.cpp index 7da84f984bd4..cf9ba6201c74 100644 --- a/components/eamxx/src/physics/shoc/disp/shoc_update_prognostics_implicit_disp.cpp +++ b/components/eamxx/src/physics/shoc/disp/shoc_update_prognostics_implicit_disp.cpp @@ -1,6 +1,7 @@ #include "shoc_functions.hpp" #include +#include namespace scream { namespace shoc { @@ -34,9 +35,10 @@ ::update_prognostics_implicit_disp( const view_2d& v_wind) { using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; const auto nlev_packs = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_packs); + const auto policy = TPF::get_default_team_policy(shcol, nlev_packs); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); diff --git a/components/eamxx/src/physics/shoc/eamxx_shoc_process_interface.cpp b/components/eamxx/src/physics/shoc/eamxx_shoc_process_interface.cpp index db83b9460c38..3253c908193a 100644 --- a/components/eamxx/src/physics/shoc/eamxx_shoc_process_interface.cpp +++ b/components/eamxx/src/physics/shoc/eamxx_shoc_process_interface.cpp @@ -6,6 +6,8 @@ #include "eamxx_config.h" // for SCREAM_CIME_BUILD #include +#include +#include namespace scream { @@ -147,6 +149,8 @@ set_computed_group_impl (const FieldGroup& group) // ========================================================================================= size_t SHOCMacrophysics::requested_buffer_size_in_bytes() const { + using TPF = ekat::TeamPolicyFactory; + const int nlev_packs = ekat::npack(m_num_levs); const int nlevi_packs = ekat::npack(m_num_levs+1); const int num_tracer_packs = ekat::npack(m_num_tracers); @@ -159,7 +163,7 @@ size_t SHOCMacrophysics::requested_buffer_size_in_bytes() const Buffer::num_2d_vector_tr*m_num_cols*num_tracer_packs*sizeof(Spack); // Number of Reals needed by the WorkspaceManager passed to shoc_main - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(m_num_cols, nlev_packs); + const auto policy = TPF::get_default_team_policy(m_num_cols, nlev_packs); const int n_wind_slots = ekat::npack(2)*Spack::n; const int n_trac_slots = ekat::npack(m_num_tracers+3)*Spack::n; const size_t wsm_request= WSM::get_total_bytes_needed(nlevi_packs, 14+(n_wind_slots+n_trac_slots), policy); @@ -170,6 +174,8 @@ size_t SHOCMacrophysics::requested_buffer_size_in_bytes() const // ========================================================================================= void SHOCMacrophysics::init_buffers(const ATMBufferManager &buffer_manager) { + using TPF = ekat::TeamPolicyFactory; + EKAT_REQUIRE_MSG(buffer_manager.allocated_bytes() >= requested_buffer_size_in_bytes(), "Error! Buffers size not sufficient.\n"); Real* mem = reinterpret_cast(buffer_manager.get_memory()); @@ -235,7 +241,7 @@ void SHOCMacrophysics::init_buffers(const ATMBufferManager &buffer_manager) // Compute workspace manager size to check used memory // vs. requested memory - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(m_num_cols, nlev_packs); + const auto policy = TPF::get_default_team_policy(m_num_cols, nlev_packs); const int n_wind_slots = ekat::npack(2)*Spack::n; const int n_trac_slots = ekat::npack(m_num_tracers+3)*Spack::n; const int wsm_size = WSM::get_total_bytes_needed(nlevi_packs, 14+(n_wind_slots+n_trac_slots), policy)/sizeof(Spack); @@ -248,6 +254,8 @@ void SHOCMacrophysics::init_buffers(const ATMBufferManager &buffer_manager) // ========================================================================================= void SHOCMacrophysics::initialize_impl (const RunType run_type) { + using TPF = ekat::TeamPolicyFactory; + // Gather runtime options runtime_options.lambda_low = m_params.get("lambda_low"); runtime_options.lambda_high = m_params.get("lambda_high"); @@ -437,7 +445,7 @@ void SHOCMacrophysics::initialize_impl (const RunType run_type) const auto nlevi_packs = ekat::npack(m_num_levs+1); const int n_wind_slots = ekat::npack(2)*Spack::n; const int n_trac_slots = ekat::npack(m_num_tracers+3)*Spack::n; - const auto default_policy = ekat::ExeSpaceUtils::get_default_team_policy(m_num_cols, nlev_packs); + const auto default_policy = TPF::get_default_team_policy(m_num_cols, nlev_packs); workspace_mgr.setup(m_buffer.wsm_data, nlevi_packs, 14+(n_wind_slots+n_trac_slots), default_policy); // Calculate pref_mid, and use that to calculate @@ -481,13 +489,15 @@ void SHOCMacrophysics::initialize_impl (const RunType run_type) // ========================================================================================= void SHOCMacrophysics::run_impl (const double dt) { + using TPF = ekat::TeamPolicyFactory; + EKAT_REQUIRE_MSG (dt<=300, "Error! SHOC is intended to run with a timestep no longer than 5 minutes.\n" " Please, reduce timestep (perhaps increasing subcycling iterations).\n"); const auto nlev_packs = ekat::npack(m_num_levs); - const auto scan_policy = ekat::ExeSpaceUtils::get_thread_range_parallel_scan_team_policy(m_num_cols, nlev_packs); - const auto default_policy = ekat::ExeSpaceUtils::get_default_team_policy(m_num_cols, nlev_packs); + const auto scan_policy = TPF::get_thread_range_parallel_scan_team_policy(m_num_cols, nlev_packs); + const auto default_policy = TPF::get_default_team_policy(m_num_cols, nlev_packs); // Preprocessing of SHOC inputs. Kernel contains a parallel_scan, // so a special TeamPolicy is required. @@ -594,6 +604,9 @@ void SHOCMacrophysics::apply_turbulent_mountain_stress() void SHOCMacrophysics::check_flux_state_consistency(const double dt) { using PC = scream::physics::Constants; + using RU = ekat::ReductionUtils; + using TPF = ekat::TeamPolicyFactory; + const Real gravit = PC::gravit; const Real qmin = 1e-12; // minimum permitted constituent concentration (kg/kg) @@ -605,7 +618,7 @@ void SHOCMacrophysics::check_flux_state_consistency(const double dt) const auto nlev_packs = ekat::npack(nlevs); const auto last_pack_idx = (nlevs-1)/Spack::n; const auto last_pack_entry = (nlevs-1)%Spack::n; - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(m_num_cols, nlev_packs); + const auto policy = TPF::get_default_team_policy(m_num_cols, nlev_packs); Kokkos::parallel_for("check_flux_state_consistency", policy, KOKKOS_LAMBDA (const KT::MemberType& team) { @@ -626,7 +639,7 @@ void SHOCMacrophysics::check_flux_state_consistency(const double dt) auto tracer_mass = [&](const int k) { return qv_i(k)*pseudo_density_i(k); }; - Real mm = ekat::ExeSpaceUtils::view_reduction(team, 0, nlevs, tracer_mass); + Real mm = RU::view_reduction(team, 0, nlevs, tracer_mass); EKAT_KERNEL_ASSERT_MSG(mm >= cc, "Error! Total mass of column vapor should be greater than mass of surf_evap.\n"); diff --git a/components/eamxx/src/physics/shoc/impl/shoc_compute_l_inf_shoc_length_impl.hpp b/components/eamxx/src/physics/shoc/impl/shoc_compute_l_inf_shoc_length_impl.hpp index c08bfde2d925..52f11899a9db 100644 --- a/components/eamxx/src/physics/shoc/impl/shoc_compute_l_inf_shoc_length_impl.hpp +++ b/components/eamxx/src/physics/shoc/impl/shoc_compute_l_inf_shoc_length_impl.hpp @@ -3,6 +3,8 @@ #include "shoc_functions.hpp" // for ETI only but harmless for GPU +#include + namespace scream { namespace shoc { @@ -17,18 +19,18 @@ ::compute_l_inf_shoc_length( const uview_1d& tke, Scalar& l_inf) { - using ExeSpaceUtils = ekat::ExeSpaceUtils; + using RU = ekat::ReductionUtils; // Compute numerator - Scalar numer = ExeSpaceUtils::view_reduction(team,0,nlev, - [&] (const int k) -> Spack { + Scalar numer = RU::view_reduction(team,0,nlev, + [&] (const int k) -> Spack { return ekat::sqrt(tke(k))*zt_grid(k)*dz_zt(k); }); team.team_barrier(); // see comment in shoc_energy_integrals_impl.hpp // Compute denominator - Scalar denom = ExeSpaceUtils::view_reduction(team,0,nlev, - [&] (const int k) -> Spack { + Scalar denom = RU::view_reduction(team,0,nlev, + [&] (const int k) -> Spack { return ekat::sqrt(tke(k))*dz_zt(k); }); team.team_barrier(); diff --git a/components/eamxx/src/physics/shoc/impl/shoc_energy_integrals_impl.hpp b/components/eamxx/src/physics/shoc/impl/shoc_energy_integrals_impl.hpp index 7f8bbc135439..558f2663d6ce 100644 --- a/components/eamxx/src/physics/shoc/impl/shoc_energy_integrals_impl.hpp +++ b/components/eamxx/src/physics/shoc/impl/shoc_energy_integrals_impl.hpp @@ -3,6 +3,8 @@ #include "shoc_functions.hpp" // for ETI only but harmless for GPU +#include + namespace scream { namespace shoc { @@ -23,7 +25,8 @@ ::shoc_energy_integrals( Scalar& wv_int, Scalar& wl_int) { - using ExeSpaceUtils = ekat::ExeSpaceUtils; + using RU = ekat::ReductionUtils; + const auto ggr = C::gravit; // The team_barriers protect what we think is unexpected behavior in @@ -39,28 +42,28 @@ ::shoc_energy_integrals( // Kokkos::parallel_reduce calls acting on doubles and saw the same results. // Compute se_int - se_int = ExeSpaceUtils::view_reduction(team,0,nlev, + se_int = RU::view_reduction(team,0,nlev, [&] (const int k) -> Spack { return host_dse(k)*pdel(k)/ggr; }); team.team_barrier(); // Compute ke_int - ke_int = ExeSpaceUtils::view_reduction(team,0,nlev, + ke_int = RU::view_reduction(team,0,nlev, [&] (const int k) -> Spack { return sp(0.5)*(ekat::square(u_wind(k))+ekat::square(v_wind(k)))*pdel(k)/ggr; }); team.team_barrier(); // Compute wv_int - wv_int = ExeSpaceUtils::view_reduction(team,0,nlev, + wv_int = RU::view_reduction(team,0,nlev, [&] (const int k) -> Spack { return (rtm(k)-rcm(k))*pdel(k)/ggr; }); team.team_barrier(); // Compute wl_int - wl_int = ExeSpaceUtils::view_reduction(team,0,nlev, + wl_int = RU::view_reduction(team,0,nlev, [&] (const int k) -> Spack { return rcm(k)*pdel(k)/ggr; }); diff --git a/components/eamxx/src/physics/shoc/impl/shoc_integ_column_stability_impl.hpp b/components/eamxx/src/physics/shoc/impl/shoc_integ_column_stability_impl.hpp index 18b57ac98ffa..9274d79745b0 100644 --- a/components/eamxx/src/physics/shoc/impl/shoc_integ_column_stability_impl.hpp +++ b/components/eamxx/src/physics/shoc/impl/shoc_integ_column_stability_impl.hpp @@ -3,6 +3,8 @@ #include "shoc_functions.hpp" // for ETI only but harmless for GPU +#include + namespace scream { namespace shoc { @@ -17,13 +19,13 @@ ::integ_column_stability( const uview_1d& brunt, Scalar& brunt_int) { + using RU = ekat::ReductionUtils; + //Lower troposphere pressure [Pa] static constexpr Scalar troppres = 80000; - using ExeSpaceUtils = ekat::ExeSpaceUtils; - - brunt_int = ExeSpaceUtils::view_reduction(team,0,nlev, - [&] (const int k) -> Spack { + brunt_int = RU::view_reduction(team,0,nlev, + [&] (const int k) -> Spack { //calculate only when pressure is > troposphere pressure auto press_gt_troppress = (pres(k) > troppres); @@ -32,8 +34,7 @@ ::integ_column_stability( return_val.set(press_gt_troppress, dz_zt(k) * brunt(k));// compute brunt_int for each column return return_val ; - - }); + }); } } // namespace shoc diff --git a/components/eamxx/src/physics/shoc/impl/shoc_main_impl.hpp b/components/eamxx/src/physics/shoc/impl/shoc_main_impl.hpp index 985038f74be0..2e123e2faf1c 100644 --- a/components/eamxx/src/physics/shoc/impl/shoc_main_impl.hpp +++ b/components/eamxx/src/physics/shoc/impl/shoc_main_impl.hpp @@ -3,6 +3,7 @@ #include "shoc_functions.hpp" // for ETI only but harmless for GPU +#include #include #include @@ -21,13 +22,15 @@ Int Functions::shoc_init( const Int& ntop_shoc, const view_1d& pref_mid) { + using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; + // This function calculates the maximum number of levels // in pbl from surface - using ExeSpace = typename KT::ExeSpace; view_1d npbl_d("npbl",1); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(1, 1); + const auto policy = TPF::get_default_team_policy(1, 1); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Scalar pblmaxp = SC::pblmaxp; @@ -626,10 +629,11 @@ Int Functions::shoc_main( #ifndef SCREAM_SHOC_SMALL_KERNELS using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; // SHOC main loop const auto nlev_packs = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_packs); + const auto policy = TPF::get_default_team_policy(shcol, nlev_packs); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); diff --git a/components/eamxx/src/physics/shoc/tests/infra/shoc_test_data.cpp b/components/eamxx/src/physics/shoc/tests/infra/shoc_test_data.cpp index 20d36a069218..8daffe296da0 100644 --- a/components/eamxx/src/physics/shoc/tests/infra/shoc_test_data.cpp +++ b/components/eamxx/src/physics/shoc/tests/infra/shoc_test_data.cpp @@ -2,8 +2,7 @@ #include "shoc_data.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" -#include "ekat/ekat_pack_kokkos.hpp" +#include #include #include "share/util/eamxx_deep_copy.hpp" @@ -321,6 +320,7 @@ void calc_shoc_varorcovar_host(Int shcol, Int nlev, Int nlevi, Real tunefac, using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; static constexpr Int num_arrays = 6; @@ -342,7 +342,7 @@ void calc_shoc_varorcovar_host(Int shcol, Int nlev, Int nlevi, Real tunefac, varorcovar_d(temp_d[5]); const Int nk_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = TPF::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -371,6 +371,7 @@ void calc_shoc_vertflux_host(Int shcol, Int nlev, Int nlevi, Real *tkh_zi, using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; static constexpr Int num_arrays = 4; @@ -390,7 +391,7 @@ void calc_shoc_vertflux_host(Int shcol, Int nlev, Int nlevi, Real *tkh_zi, vertflux_d(temp_d[3]); const Int nk_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = TPF::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -501,6 +502,7 @@ void update_host_dse_host(Int shcol, Int nlev, Real* thlm, Real* shoc_ql, Real* using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; std::vector temp_1d_d(1); @@ -521,7 +523,7 @@ void update_host_dse_host(Int shcol, Int nlev, Real* thlm, Real* shoc_ql, Real* host_dse_d (temp_2d_d[4]); const Int nk_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = TPF::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -552,6 +554,7 @@ void compute_diag_third_shoc_moment_host(Int shcol, Int nlev, Int nlevi, bool sh using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; std::vector temp_d(11); @@ -586,7 +589,7 @@ void compute_diag_third_shoc_moment_host(Int shcol, Int nlev, Int nlevi, bool sh w3_d (temp_d[10]); const Int nk_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = TPF::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -622,6 +625,7 @@ void shoc_pblintd_init_pot_host(Int shcol, Int nlev, Real *thl, Real* ql, Real* using view_2d = typename SHOC::view_2d; using KT = typename SHOC::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHOC::MemberType; static constexpr Int num_arrays = 3; @@ -636,7 +640,7 @@ void shoc_pblintd_init_pot_host(Int shcol, Int nlev, Real *thl, Real* ql, Real* view_2d thv_d("thv", shcol, nlev); const Int nlev_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_pack); + const auto policy = TPF::get_default_team_policy(shcol, nlev_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -663,6 +667,7 @@ void compute_shoc_mix_shoc_length_host(Int nlev, Int shcol, bool shoc_1p5tke, Re using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; std::vector temp_1d_d(1); @@ -685,7 +690,7 @@ void compute_shoc_mix_shoc_length_host(Int nlev, Int shcol, bool shoc_1p5tke, Re shoc_mix_d (temp_2d_d[5]); const Int nk_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = TPF::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -715,6 +720,7 @@ void check_tke_host(Int shcol, Int nlev, Real* tke) using view_2d = typename SHOC::view_2d; using KT = typename SHOC::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHOC::MemberType; std::vector temp_2d_d(1); @@ -726,7 +732,7 @@ void check_tke_host(Int shcol, Int nlev, Real* tke) tke_d(temp_2d_d[0]); const Int nk_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = TPF::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -748,6 +754,7 @@ void linear_interp_host(Real* x1, Real* x2, Real* y1, Real* y2, Int km1, Int km2 using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; std::vector temp_2d_d(3); @@ -765,7 +772,7 @@ void linear_interp_host(Real* x1, Real* x2, Real* y1, Real* y2, Int km1, Int km2 y2_d("y2_d", ncol, km2); const Int nk_pack = ekat::npack(km1); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(ncol, nk_pack); + const auto policy = TPF::get_default_team_policy(ncol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -791,6 +798,7 @@ void clipping_diag_third_shoc_moments_host(Int nlevi, Int shcol, Real *w_sec_zi, using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; // Sync to device @@ -802,7 +810,7 @@ void clipping_diag_third_shoc_moments_host(Int nlevi, Int shcol, Real *w_sec_zi, w3_d (temp_d[1]); const Int nk_pack = ekat::npack(nlevi); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = TPF::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -829,6 +837,7 @@ void shoc_energy_integrals_host(Int shcol, Int nlev, Real *host_dse, Real *pdel, using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; std::vector temp_d(6); @@ -854,7 +863,7 @@ void shoc_energy_integrals_host(Int shcol, Int nlev, Real *host_dse, Real *pdel, wl_int_d("wl_int", shcol); const Int nk_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = TPF::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -957,6 +966,7 @@ void diag_second_moments_host(Int shcol, Int nlev, Int nlevi, bool shoc_1p5tke, using view_2d = typename SHOC::view_2d; using KT = typename SHOC::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHOC::MemberType; std::vector dim1_array(20, shcol); @@ -999,7 +1009,7 @@ void diag_second_moments_host(Int shcol, Int nlev, Int nlevi, bool shoc_1p5tke, tk_zi_2d("tk_zi", shcol, nlevi_packs); const Int nk_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = TPF::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); // Hardcode runtime options for F90 @@ -1059,8 +1069,9 @@ void diag_second_shoc_moments_host(Int shcol, Int nlev, Int nlevi, bool shoc_1p5 using view_2d = typename SHOC::view_2d; using KT = typename SHOC::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHOC::MemberType; - using view_1d = typename SHOC::view_1d; + using view_1d = typename SHOC::view_1d; std::vector temp_1d(4); ScreamDeepCopy::copy_to_device({wthl_sfc, wqw_sfc, uw_sfc, vw_sfc}, shcol, temp_1d); @@ -1108,7 +1119,7 @@ void diag_second_shoc_moments_host(Int shcol, Int nlev, Int nlevi, bool shoc_1p5 const Int nlev_packs = ekat::npack(nlev); const Int nlevi_packs = ekat::npack(nlevi); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_packs); + const auto policy = TPF::get_default_team_policy(shcol, nlev_packs); // Local variable workspace ekat::WorkspaceManager workspace_mgr(nlevi_packs, 3, policy); @@ -1174,6 +1185,7 @@ void compute_brunt_shoc_length_host(Int nlev, Int nlevi, Int shcol, Real* dz_zt, using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; std::vector temp_d(4); @@ -1191,7 +1203,7 @@ void compute_brunt_shoc_length_host(Int nlev, Int nlevi, Int shcol, Real* dz_zt, brunt_d (temp_d[3]); const Int nk_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = TPF::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -1219,6 +1231,7 @@ void compute_l_inf_shoc_length_host(Int nlev, Int shcol, Real *zt_grid, Real *dz using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; // Sync to device @@ -1236,7 +1249,7 @@ void compute_l_inf_shoc_length_host(Int nlev, Int shcol, Real *zt_grid, Real *dz l_inf_d("l_inf", shcol); const Int nk_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = TPF::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -1266,6 +1279,7 @@ void check_length_scale_shoc_length_host(Int nlev, Int shcol, Real* host_dx, Rea using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; // Sync to device @@ -1282,7 +1296,7 @@ void check_length_scale_shoc_length_host(Int nlev, Int shcol, Real* host_dx, Rea shoc_mix_d(temp_2d_d[0]); const Int nk_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = TPF::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -1405,6 +1419,7 @@ void shoc_length_host(Int shcol, Int nlev, Int nlevi, bool shoc_1p5tke, Real* ho using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; std::vector temp_1d_d(2); @@ -1435,7 +1450,7 @@ void shoc_length_host(Int shcol, Int nlev, Int nlevi, bool shoc_1p5tke, Real* ho const Int nlev_packs = ekat::npack(nlev); const Int nlevi_packs = ekat::npack(nlevi); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_packs); + const auto policy = TPF::get_default_team_policy(shcol, nlev_packs); // Local variable workspace ekat::WorkspaceManager workspace_mgr(nlevi_packs, 1, policy); @@ -1485,6 +1500,7 @@ void shoc_energy_fixer_host(Int shcol, Int nlev, Int nlevi, Real dtime, Int nadv using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; std::vector temp_1d_d(10); @@ -1524,7 +1540,7 @@ void shoc_energy_fixer_host(Int shcol, Int nlev, Int nlevi, Real dtime, Int nadv const Int nlev_packs = ekat::npack(nlev); const Int nlevi_packs = ekat::npack(nlevi); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_packs); + const auto policy = TPF::get_default_team_policy(shcol, nlev_packs); // Local variable workspace ekat::WorkspaceManager workspace_mgr(nlevi_packs, 1, policy); @@ -1570,6 +1586,7 @@ void compute_shoc_vapor_host(Int shcol, Int nlev, Real* qw, Real* ql, Real* qv) using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; static constexpr Int num_arrays = 3; @@ -1585,7 +1602,7 @@ void compute_shoc_vapor_host(Int shcol, Int nlev, Real* qw, Real* ql, Real* qv) qv_d(temp_d[2]); const Int nk_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = TPF::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -1616,6 +1633,7 @@ void update_prognostics_implicit_host(Int shcol, Int nlev, Int nlevi, Int num_tr using view_3d = typename SHF::view_3d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; static constexpr Int num_2d_arrays = 13; @@ -1664,7 +1682,7 @@ void update_prognostics_implicit_host(Int shcol, Int nlev, Int nlevi, Int num_tr // Local variables const Int nlev_packs = ekat::npack(nlev); const Int nlevi_packs = ekat::npack(nlevi); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_packs); + const auto policy = TPF::get_default_team_policy(shcol, nlev_packs); // CXX version of shoc qtracers is the transpose of the fortran version. view_3d qtracers_cxx_d("",shcol,num_tracer,nlev_packs); @@ -1750,6 +1768,7 @@ void diag_third_shoc_moments_host(Int shcol, Int nlev, Int nlevi, bool shoc_1p5t using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; std::vector temp_d(12); @@ -1781,7 +1800,7 @@ void diag_third_shoc_moments_host(Int shcol, Int nlev, Int nlevi, bool shoc_1p5t // Local variables const Int nlev_packs = ekat::npack(nlev); const Int nlevi_packs = ekat::npack(nlevi); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_packs); + const auto policy = TPF::get_default_team_policy(shcol, nlev_packs); // Local variable workspace ekat::WorkspaceManager workspace_mgr(nlevi_packs, 4, policy); @@ -1827,6 +1846,7 @@ void adv_sgs_tke_host(Int nlev, Int shcol, Real dtime, bool shoc_1p5tke, Real* s using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; static constexpr Int num_arrays = 7; @@ -1849,7 +1869,7 @@ void adv_sgs_tke_host(Int nlev, Int shcol, Real dtime, bool shoc_1p5tke, Real* s a_diss_d (temp_d[5]); //out const Int nk_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = TPF::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -1882,6 +1902,7 @@ void shoc_assumed_pdf_host(Int shcol, Int nlev, Int nlevi, Real* thetal, Real* q using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; static constexpr Int num_arrays = 18; @@ -1919,7 +1940,7 @@ void shoc_assumed_pdf_host(Int shcol, Int nlev, Int nlevi, Real* thetal, Real* q shoc_ql2_d(temp_d[17]); const Int nlev_packs = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_packs); + const auto policy = TPF::get_default_team_policy(shcol, nlev_packs); // Local variable workspace ekat::WorkspaceManager workspace_mgr(nlev_packs, 6, policy); @@ -1975,6 +1996,7 @@ void compute_shr_prod_host(Int nlevi, Int nlev, Int shcol, Real* dz_zi, Real* u_ using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; static constexpr Int num_arrays = 4; @@ -1996,7 +2018,7 @@ void compute_shr_prod_host(Int nlevi, Int nlev, Int shcol, Real* dz_zi, Real* u_ sterm_d (temp_d[3]); const Int nk_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = TPF::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -2024,6 +2046,7 @@ void compute_tmpi_host(Int nlevi, Int shcol, Real dtime, Real *rho_zi, Real *dz_ using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; static constexpr Int num_arrays = 3; @@ -2039,7 +2062,7 @@ void compute_tmpi_host(Int nlevi, Int shcol, Real dtime, Real *rho_zi, Real *dz_ tmpi_d(temp_d[2]); const Int nk_pack = ekat::npack(nlevi); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = TPF::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -2066,6 +2089,7 @@ void integ_column_stability_host(Int nlev, Int shcol, Real *dz_zt, using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; static constexpr Int num_arrays = 3; @@ -2084,7 +2108,7 @@ void integ_column_stability_host(Int nlev, Int shcol, Real *dz_zt, view_1d brunt_int_d("brunt_int", shcol); const Int nk_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = TPF::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -2118,6 +2142,7 @@ void isotropic_ts_host(Int nlev, Int shcol, Real* brunt_int, Real* tke, using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; std::vector temp_1d(1); // for 1d array @@ -2141,7 +2166,7 @@ void isotropic_ts_host(Int nlev, Int shcol, Real* brunt_int, Real* tke, isotropy_d(temp_2d[3]); const Int nk_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = TPF::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -2178,6 +2203,7 @@ void dp_inverse_host(Int nlev, Int shcol, Real *rho_zt, Real *dz_zt, Real *rdp_z using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; static constexpr Int num_arrays = 3; @@ -2193,7 +2219,7 @@ void dp_inverse_host(Int nlev, Int shcol, Real *rho_zt, Real *dz_zt, Real *rdp_z rdp_zt_d(temp_d[2]); const Int nk_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = TPF::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -2240,6 +2266,7 @@ Int shoc_main_host(Int shcol, Int nlev, Int nlevi, Real dtime, Int nadv, Int npb using view_2d = typename SHF::view_2d; using view_3d = typename SHF::view_3d; using ExeSpace = typename SHF::KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; // Initialize Kokkos views, sync to device @@ -2347,7 +2374,7 @@ Int shoc_main_host(Int shcol, Int nlev, Int nlevi, Real dtime, Int nadv, Int npb const auto qtracers_cxx_d_s = ekat::scalarize(qtracers_cxx_d); const auto qtracers_f90_d_s = ekat::scalarize(qtracers_f90_d); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_packs); + const auto policy = TPF::get_default_team_policy(shcol, nlev_packs); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); Kokkos::parallel_for(Kokkos::TeamThreadRange(team, nlev), [&] (const Int& k) { @@ -2483,6 +2510,7 @@ void pblintd_height_host(Int shcol, Int nlev, Int npbl, Real* z, Real* u, Real* using bview_1d = typename SHOC::view_1d; using view_2d = typename SHOC::view_2d; using ExeSpace = typename SHOC::KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHOC::MemberType; std::vector views_2d(5); @@ -2505,7 +2533,7 @@ void pblintd_height_host(Int shcol, Int nlev, Int npbl, Real* z, Real* u, Real* bview_1d check_1d (views_bool_1d[0]); const Int nlev_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_pack); + const auto policy = TPF::get_default_team_policy(shcol, nlev_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -2545,6 +2573,7 @@ void vd_shoc_decomp_and_solve_host(Int shcol, Int nlev, Int nlevi, Int num_rhs, using view_3d = typename SHF::view_3d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; static constexpr Int num_1d_arrays = 1; @@ -2581,7 +2610,7 @@ void vd_shoc_decomp_and_solve_host(Int shcol, Int nlev, Int nlevi, Int num_rhs, var_d(temp_3d_d[0]); const Int nk_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = TPF::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -2612,6 +2641,7 @@ void shoc_grid_host(Int shcol, Int nlev, Int nlevi, Real* zt_grid, Real* zi_grid using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; static constexpr Int num_2d_arrays = 6; @@ -2634,7 +2664,7 @@ void shoc_grid_host(Int shcol, Int nlev, Int nlevi, Real* zt_grid, Real* zi_grid rho_zt_d(temp_2d_d[5]); const Int nk_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = TPF::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -2664,6 +2694,7 @@ void eddy_diffusivities_host(Int nlev, Int shcol, bool shoc_1p5tke, Real* pblh, using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; static constexpr Int num_1d_arrays = 1; @@ -2692,7 +2723,7 @@ void eddy_diffusivities_host(Int nlev, Int shcol, bool shoc_1p5tke, Real* pblh, tk_d(temp_2d_d[7]); const Int nk_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = TPF::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); @@ -2822,6 +2853,7 @@ void pblintd_host(Int shcol, Int nlev, Int nlevi, Int npbl, Real* z, Real* zi, R using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; static constexpr Int num_1d_arrays = 3; @@ -2857,7 +2889,7 @@ void pblintd_host(Int shcol, Int nlev, Int nlevi, Int npbl, Real* z, Real* zi, R cldn_d(temp_2d_d[7]); const Int nlev_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_pack); + const auto policy = TPF::get_default_team_policy(shcol, nlev_pack); // Local variable workspace ekat::WorkspaceManager workspace_mgr(nlev_pack, 2, policy); @@ -2904,6 +2936,7 @@ void shoc_tke_host(Int shcol, Int nlev, Int nlevi, Real dtime, bool shoc_1p5tke, using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; static constexpr Int num_1d_arrays = 1; @@ -2943,7 +2976,7 @@ void shoc_tke_host(Int shcol, Int nlev, Int nlevi, Real dtime, bool shoc_1p5tke, const Int nlev_packs = ekat::npack(nlev); const Int nlevi_packs = ekat::npack(nlevi); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nlev_packs); + const auto policy = TPF::get_default_team_policy(shcol, nlev_packs); // Local variable workspace ekat::WorkspaceManager workspace_mgr(nlevi_packs, 3, policy); @@ -3000,6 +3033,7 @@ void compute_shoc_temperature_host(Int shcol, Int nlev, Real *thetal, Real *ql, using view_2d = typename SHF::view_2d; using KT = typename SHF::KT; using ExeSpace = typename KT::ExeSpace; + using TPF = ekat::TeamPolicyFactory; using MemberType = typename SHF::MemberType; static constexpr Int num_arrays = 4; @@ -3016,7 +3050,7 @@ void compute_shoc_temperature_host(Int shcol, Int nlev, Real *thetal, Real *ql, tabs_d(temp_d[3]); const Int nk_pack = ekat::npack(nlev); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(shcol, nk_pack); + const auto policy = TPF::get_default_team_policy(shcol, nk_pack); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const Int i = team.league_rank(); diff --git a/components/eamxx/src/physics/tms/eamxx_tms_process_interface.cpp b/components/eamxx/src/physics/tms/eamxx_tms_process_interface.cpp index 787c2acebdd1..e91b7cbcc29a 100644 --- a/components/eamxx/src/physics/tms/eamxx_tms_process_interface.cpp +++ b/components/eamxx/src/physics/tms/eamxx_tms_process_interface.cpp @@ -2,6 +2,7 @@ #include "physics/tms/tms_functions.hpp" +#include #include #include @@ -67,6 +68,8 @@ void TurbulentMountainStress::initialize_impl (const RunType /* run_type */) // ========================================================================================= void TurbulentMountainStress::run_impl (const double /* dt */) { + using TPF = ekat::TeamPolicyFactory; + // Helper views const auto pseudo_density = get_field_in("pseudo_density").get_view(); const auto qv = get_field_in("qv").get_view(); @@ -91,7 +94,7 @@ void TurbulentMountainStress::run_impl (const double /* dt */) const int nlevs = m_nlevs; const int nlev_packs = ekat::npack(nlevs); // calculate_z_int contains a team-level parallel_scan, which requires a special policy - const auto scan_policy = ekat::ExeSpaceUtils::get_thread_range_parallel_scan_team_policy(ncols, nlev_packs); + const auto scan_policy = TPF::get_thread_range_parallel_scan_team_policy(ncols, nlev_packs); Kokkos::parallel_for(scan_policy, KOKKOS_LAMBDA (const TMSFunctions::KT::MemberType& team) { const int i = team.league_rank(); diff --git a/components/eamxx/src/physics/tms/tests/infra/tms_test_data.cpp b/components/eamxx/src/physics/tms/tests/infra/tms_test_data.cpp index 2af5d85bfc2f..3e274f35591d 100644 --- a/components/eamxx/src/physics/tms/tests/infra/tms_test_data.cpp +++ b/components/eamxx/src/physics/tms/tests/infra/tms_test_data.cpp @@ -1,9 +1,9 @@ #include "tms_test_data.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" - #include "share/util/eamxx_deep_copy.hpp" +#include + #include using scream::Real; @@ -28,6 +28,7 @@ void compute_tms_f(int ncols, int nlevs, using view_3d = typename TMSFunc::view_3d; using ExeSpace = typename TMSFunc::KT::ExeSpace; using MemberType = typename TMSFunc::KT::MemberType; + using TPF = ekat::TeamPolicyFactory; // Initialize Kokkos views, sync to device std::vector temp_d_1d(2); @@ -55,7 +56,7 @@ void compute_tms_f(int ncols, int nlevs, const auto nlev_packs = ekat::npack(nlevs); view_3d horiz_wind_d("horiz_wind_d", ncols, 2, nlev_packs); view_2d_s tau_d("tau_d", ncols, 2); - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(ncols, nlev_packs); + const auto policy = TPF::get_default_team_policy(ncols, nlev_packs); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const int i = team.league_rank(); tau_d(i, 0) = taux_d(i); diff --git a/components/eamxx/src/share/atm_process/IOPDataManager.cpp b/components/eamxx/src/share/atm_process/IOPDataManager.cpp index 6a923741f8b8..0897699b0620 100644 --- a/components/eamxx/src/share/atm_process/IOPDataManager.cpp +++ b/components/eamxx/src/share/atm_process/IOPDataManager.cpp @@ -5,6 +5,8 @@ #include "share/atm_process/IOPDataManager.hpp" #include +#include +#include #include #include @@ -68,6 +70,8 @@ void IOPDataManager:: initialize_iop_file(const util::TimeStamp& run_t0, int model_nlevs) { + using Pack = ekat::Pack; + EKAT_REQUIRE_MSG(m_params.isParameter("iop_file"), "Error! Using IOP requires defining an iop_file parameter.\n"); @@ -368,6 +372,10 @@ read_fields_from_file_for_iop (const std::string& file_name, void IOPDataManager:: read_iop_file_data (const util::TimeStamp& current_ts) { + using TPF = ekat::TeamPolicyFactory; + using Pack = ekat::Pack; + using Pack1d = ekat::Pack; + // Query to see if we need to load data from IOP file. // If we are still in the time interval as the previous // read from iop file, there is no need to reload data. @@ -557,7 +565,7 @@ read_iop_file_data (const util::TimeStamp& current_ts) const auto total_nlevs = field.get_header().get_identifier().get_layout().dim(0); ekat::LinInterp vert_interp(1, nlevs_input, nlevs_output); - const auto policy = ESU::get_default_team_policy(1, total_nlevs); + const auto policy = TPF::get_default_team_policy(1, total_nlevs); Kokkos::parallel_for(policy, KOKKOS_LAMBDA (const KT::MemberType& team) { const auto x_src = Kokkos::subview(iop_file_pres_v, Kokkos::pair(iop_file_start,iop_file_end)); const auto x_tgt = Kokkos::subview(model_pres_v, Kokkos::pair(model_start,model_end)); @@ -616,6 +624,8 @@ read_iop_file_data (const util::TimeStamp& current_ts) void IOPDataManager:: set_fields_from_iop_data(const field_mgr_ptr field_mgr, const std::string& grid_name) { + using TPF = ekat::TeamPolicyFactory; + if (m_params.get("zero_non_iop_tracers") && field_mgr->has_group("tracers", grid_name)) { // Zero out all tracers before setting iop tracers (if requested) field_mgr->get_field_group("tracers", grid_name).m_monolithic_field->deep_copy(0); @@ -686,7 +696,7 @@ set_fields_from_iop_data(const field_mgr_ptr field_mgr, const std::string& grid_ // Loop over all columns and copy IOP field values to FM views const auto ncols = field_mgr->get_grids_manager()->get_grid(grid_name)->get_num_local_dofs(); const auto nlevs = field_mgr->get_grids_manager()->get_grid(grid_name)->get_num_vertical_levels(); - const auto policy = ESU::get_default_team_policy(ncols, nlevs); + const auto policy = TPF::get_default_team_policy(ncols, nlevs); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const KT::MemberType& team) { const auto icol = team.league_rank(); diff --git a/components/eamxx/src/share/atm_process/IOPDataManager.hpp b/components/eamxx/src/share/atm_process/IOPDataManager.hpp index 7a439550ed59..5b79e4ed35b8 100644 --- a/components/eamxx/src/share/atm_process/IOPDataManager.hpp +++ b/components/eamxx/src/share/atm_process/IOPDataManager.hpp @@ -7,8 +7,6 @@ #include "share/grid/remap/abstract_remapper.hpp" #include "share/util/eamxx_time_stamp.hpp" -#include "ekat/ekat_pack.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include #include @@ -23,9 +21,6 @@ class IOPDataManager using grid_ptr = std::shared_ptr; using KT = ekat::KokkosTypes; - using ESU = ekat::ExeSpaceUtils; - using Pack = ekat::Pack; - using Pack1d = ekat::Pack; template using view_1d = KT::template view_1d; diff --git a/components/eamxx/src/share/field/field_utils_impl.hpp b/components/eamxx/src/share/field/field_utils_impl.hpp index df8745a619b5..8bb1a6867c4e 100644 --- a/components/eamxx/src/share/field/field_utils_impl.hpp +++ b/components/eamxx/src/share/field/field_utils_impl.hpp @@ -3,9 +3,8 @@ #include "share/field/field.hpp" - -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include +#include #include #include @@ -309,11 +308,10 @@ void perturb (Field& f, template void horiz_contraction(const Field &f_out, const Field &f_in, const Field &weight, const ekat::Comm *comm) { - using KT = ekat::KokkosTypes; using RangePolicy = Kokkos::RangePolicy; using TeamPolicy = Kokkos::TeamPolicy; using TeamMember = typename TeamPolicy::member_type; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; auto l_out = f_out.get_header().get_identifier().get_layout(); auto l_in = f_in.get_header().get_identifier().get_layout(); @@ -335,7 +333,7 @@ void horiz_contraction(const Field &f_out, const Field &f_in, auto v_in = f_in.get_view(); auto v_out = f_out.get_view(); const int d1 = l_in.dim(1); - auto p = ESU::get_default_team_policy(d1, ncols); + auto p = TPF::get_default_team_policy(d1, ncols); Kokkos::parallel_for( f_out.name(), p, KOKKOS_LAMBDA(const TeamMember &tm) { const int j = tm.league_rank(); @@ -349,7 +347,7 @@ void horiz_contraction(const Field &f_out, const Field &f_in, auto v_out = f_out.get_view(); const int d1 = l_in.dim(1); const int d2 = l_in.dim(2); - auto p = ESU::get_default_team_policy(d1 * d2, ncols); + auto p = TPF::get_default_team_policy(d1 * d2, ncols); Kokkos::parallel_for( f_out.name(), p, KOKKOS_LAMBDA(const TeamMember &tm) { const int idx = tm.league_rank(); @@ -379,11 +377,10 @@ void horiz_contraction(const Field &f_out, const Field &f_in, template void vert_contraction(const Field &f_out, const Field &f_in, const Field &weight) { - using KT = ekat::KokkosTypes; using RangePolicy = Kokkos::RangePolicy; using TeamPolicy = Kokkos::TeamPolicy; using TeamMember = typename TeamPolicy::member_type; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; auto l_out = f_out.get_header().get_identifier().get_layout(); auto l_in = f_in.get_header().get_identifier().get_layout(); @@ -416,7 +413,7 @@ void vert_contraction(const Field &f_out, const Field &f_in, const Field &weight auto v_in = f_in.get_view(); auto v_out = f_out.get_view(); const int d0 = l_in.dim(0); - auto p = ESU::get_default_team_policy(d0, nlevs); + auto p = TPF::get_default_team_policy(d0, nlevs); Kokkos::parallel_for( f_out.name(), p, KOKKOS_LAMBDA(const TeamMember &tm) { const int i = tm.league_rank(); @@ -433,7 +430,7 @@ void vert_contraction(const Field &f_out, const Field &f_in, const Field &weight auto v_out = f_out.get_view(); const int d0 = l_in.dim(0); const int d1 = l_in.dim(1); - auto p = ESU::get_default_team_policy(d0 * d1, nlevs); + auto p = TPF::get_default_team_policy(d0 * d1, nlevs); Kokkos::parallel_for( f_out.name(), p, KOKKOS_LAMBDA(const TeamMember &tm) { const int idx = tm.league_rank(); diff --git a/components/eamxx/src/share/grid/remap/coarsening_remapper.cpp b/components/eamxx/src/share/grid/remap/coarsening_remapper.cpp index 7713680d0608..c138d872b07b 100644 --- a/components/eamxx/src/share/grid/remap/coarsening_remapper.cpp +++ b/components/eamxx/src/share/grid/remap/coarsening_remapper.cpp @@ -5,7 +5,7 @@ #include "share/io/scorpio_input.hpp" #include "share/field/field.hpp" -#include +#include #include #include @@ -254,7 +254,7 @@ rescale_masked_fields (const Field& x, const Field& mask) const { using RangePolicy = typename KT::RangePolicy; using MemberType = typename KT::MemberType; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; using Pack = ekat::Pack; using PackInfo = ekat::PackInfo; @@ -301,7 +301,7 @@ rescale_masked_fields (const Field& x, const Field& mask) const mask_2d = mask.get_view(); } const int dim1 = PackInfo::num_packs(layout.dim(1)); - auto policy = ESU::get_default_team_policy(ncols,dim1); + auto policy = TPF::get_default_team_policy(ncols,dim1); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const auto icol = team.league_rank(); @@ -343,7 +343,7 @@ rescale_masked_fields (const Field& x, const Field& mask) const } const int dim1 = layout.dim(1); const int dim2 = PackInfo::num_packs(layout.dim(2)); - auto policy = ESU::get_default_team_policy(ncols,dim1*dim2); + auto policy = TPF::get_default_team_policy(ncols,dim1*dim2); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const auto icol = team.league_rank(); @@ -392,7 +392,7 @@ rescale_masked_fields (const Field& x, const Field& mask) const const int dim1 = layout.dim(1); const int dim2 = layout.dim(2); const int dim3 = PackInfo::num_packs(layout.dim(3)); - auto policy = ESU::get_default_team_policy(ncols,dim1*dim2*dim3); + auto policy = TPF::get_default_team_policy(ncols,dim1*dim2*dim3); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const auto icol = team.league_rank(); @@ -436,7 +436,7 @@ local_mat_vec (const Field& x, const Field& y, const Field& mask) const { using RangePolicy = typename KT::RangePolicy; using MemberType = typename KT::MemberType; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; using Pack = ekat::Pack; using PackInfo = ekat::PackInfo; @@ -484,7 +484,7 @@ local_mat_vec (const Field& x, const Field& y, const Field& mask) const mask_2d = mask.get_view(); } const int dim1 = PackInfo::num_packs(src_layout.dim(1)); - auto policy = ESU::get_default_team_policy(nrows,dim1); + auto policy = TPF::get_default_team_policy(nrows,dim1); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const auto row = team.league_rank(); @@ -520,7 +520,7 @@ local_mat_vec (const Field& x, const Field& y, const Field& mask) const } const int dim1 = src_layout.dim(1); const int dim2 = PackInfo::num_packs(src_layout.dim(2)); - auto policy = ESU::get_default_team_policy(nrows,dim1*dim2); + auto policy = TPF::get_default_team_policy(nrows,dim1*dim2); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const auto row = team.league_rank(); @@ -559,7 +559,7 @@ local_mat_vec (const Field& x, const Field& y, const Field& mask) const const int dim1 = src_layout.dim(1); const int dim2 = src_layout.dim(2); const int dim3 = PackInfo::num_packs(src_layout.dim(3)); - auto policy = ESU::get_default_team_policy(nrows,dim1*dim2*dim3); + auto policy = TPF::get_default_team_policy(nrows,dim1*dim2*dim3); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const auto row = team.league_rank(); @@ -592,7 +592,7 @@ void CoarseningRemapper::pack_and_send () { using RangePolicy = typename KT::RangePolicy; using MemberType = typename KT::MemberType; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; const int num_send_gids = m_ov_coarse_grid->get_num_local_dofs(); const auto pid_lid_start = m_send_pid_lids_start; @@ -628,7 +628,7 @@ void CoarseningRemapper::pack_and_send () { auto v = f.get_view(); const int dim1 = fl.dim(1); - auto policy = ESU::get_default_team_policy(num_send_gids,dim1); + auto policy = TPF::get_default_team_policy(num_send_gids,dim1); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team){ const int i = team.league_rank(); @@ -648,7 +648,7 @@ void CoarseningRemapper::pack_and_send () auto v = f.get_view(); const int dim1 = fl.dim(1); const int dim2 = fl.dim(2); - auto policy = ESU::get_default_team_policy(num_send_gids,dim1*dim2); + auto policy = TPF::get_default_team_policy(num_send_gids,dim1*dim2); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team){ const int i = team.league_rank(); @@ -671,7 +671,7 @@ void CoarseningRemapper::pack_and_send () const int dim1 = fl.dim(1); const int dim2 = fl.dim(2); const int dim3 = fl.dim(3); - auto policy = ESU::get_default_team_policy(num_send_gids,dim1*dim2*dim3); + auto policy = TPF::get_default_team_policy(num_send_gids,dim1*dim2*dim3); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team){ const int i = team.league_rank(); @@ -729,7 +729,7 @@ void CoarseningRemapper::recv_and_unpack () using RangePolicy = typename KT::RangePolicy; using MemberType = typename KT::MemberType; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; const int num_tgt_dofs = m_tgt_grid->get_num_local_dofs(); @@ -769,7 +769,7 @@ void CoarseningRemapper::recv_and_unpack () { auto v = f.get_view(); const int dim1 = fl.dim(1); - auto policy = ESU::get_default_team_policy(num_tgt_dofs,dim1); + auto policy = TPF::get_default_team_policy(num_tgt_dofs,dim1); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team){ const int lid = team.league_rank(); @@ -791,7 +791,7 @@ void CoarseningRemapper::recv_and_unpack () auto v = f.get_view(); const int dim1 = fl.dim(1); const int dim2 = fl.dims().back(); - auto policy = ESU::get_default_team_policy(num_tgt_dofs,dim2*dim1); + auto policy = TPF::get_default_team_policy(num_tgt_dofs,dim2*dim1); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team){ const int lid = team.league_rank(); @@ -818,7 +818,7 @@ void CoarseningRemapper::recv_and_unpack () const int dim1 = fl.dim(1); const int dim2 = fl.dim(2); const int dim3 = fl.dim(3); - auto policy = ESU::get_default_team_policy(num_tgt_dofs,dim1*dim2*dim3); + auto policy = TPF::get_default_team_policy(num_tgt_dofs,dim1*dim2*dim3); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team){ const int lid = team.league_rank(); diff --git a/components/eamxx/src/share/grid/remap/horiz_interp_remapper_base.cpp b/components/eamxx/src/share/grid/remap/horiz_interp_remapper_base.cpp index 510821573108..2e2029e02d3d 100644 --- a/components/eamxx/src/share/grid/remap/horiz_interp_remapper_base.cpp +++ b/components/eamxx/src/share/grid/remap/horiz_interp_remapper_base.cpp @@ -4,7 +4,7 @@ #include "share/grid/grid_import_export.hpp" #include "share/io/scorpio_input.hpp" -#include +#include #include #include @@ -155,7 +155,7 @@ local_mat_vec (const Field& x, const Field& y) const { using RangePolicy = typename KT::RangePolicy; using MemberType = typename KT::MemberType; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; using Pack = ekat::Pack; using PackInfo = ekat::PackInfo; @@ -196,7 +196,7 @@ local_mat_vec (const Field& x, const Field& y) const auto x_view = x.get_view(); auto y_view = y.get_view< Pack**>(); const int dim1 = PackInfo::num_packs(src_layout.dim(1)); - auto policy = ESU::get_default_team_policy(nrows,dim1); + auto policy = TPF::get_default_team_policy(nrows,dim1); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const auto row = team.league_rank(); @@ -219,7 +219,7 @@ local_mat_vec (const Field& x, const Field& y) const auto y_view = y.get_view< Pack***>(); const int dim1 = src_layout.dim(1); const int dim2 = PackInfo::num_packs(src_layout.dim(2)); - auto policy = ESU::get_default_team_policy(nrows,dim1*dim2); + auto policy = TPF::get_default_team_policy(nrows,dim1*dim2); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const auto row = team.league_rank(); @@ -245,7 +245,7 @@ local_mat_vec (const Field& x, const Field& y) const const int dim1 = src_layout.dim(1); const int dim2 = src_layout.dim(2); const int dim3 = PackInfo::num_packs(src_layout.dim(3)); - auto policy = ESU::get_default_team_policy(nrows,dim1*dim2*dim3); + auto policy = TPF::get_default_team_policy(nrows,dim1*dim2*dim3); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const auto row = team.league_rank(); diff --git a/components/eamxx/src/share/grid/remap/refining_remapper_p2p.cpp b/components/eamxx/src/share/grid/remap/refining_remapper_p2p.cpp index 34e9c81c63cb..dd7cb47de5ef 100644 --- a/components/eamxx/src/share/grid/remap/refining_remapper_p2p.cpp +++ b/components/eamxx/src/share/grid/remap/refining_remapper_p2p.cpp @@ -5,7 +5,7 @@ #include "share/io/scorpio_input.hpp" #include "share/util/eamxx_utils.hpp" -#include +#include #include #include @@ -173,7 +173,7 @@ void RefiningRemapperP2P::pack_and_send () { using RangePolicy = typename KT::RangePolicy; using TeamMember = typename KT::MemberType; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; auto export_pids = m_imp_exp->export_pids(); auto export_lids = m_imp_exp->export_lids(); @@ -211,7 +211,7 @@ void RefiningRemapperP2P::pack_and_send () { const auto v = f.get_view(); const int dim1 = fl.dim(1); - auto policy = ESU::get_default_team_policy(num_exports,dim1); + auto policy = TPF::get_default_team_policy(num_exports,dim1); auto pack = KOKKOS_LAMBDA(const TeamMember& team) { const int iexp = team.league_rank(); const int icol = export_lids(iexp); @@ -236,7 +236,7 @@ void RefiningRemapperP2P::pack_and_send () const int dim1 = fl.dim(1); const int dim2 = fl.dim(2); const int f_col_size = dim1*dim2; - auto policy = ESU::get_default_team_policy(num_exports,dim1*dim2); + auto policy = TPF::get_default_team_policy(num_exports,dim1*dim2); auto pack = KOKKOS_LAMBDA(const TeamMember& team) { const int iexp = team.league_rank(); const int icol = export_lids(iexp); @@ -264,7 +264,7 @@ void RefiningRemapperP2P::pack_and_send () const int dim2 = fl.dim(2); const int dim3 = fl.dim(3); const int f_col_size = dim1*dim2*dim3; - auto policy = ESU::get_default_team_policy(num_exports,dim1*dim2*dim3); + auto policy = TPF::get_default_team_policy(num_exports,dim1*dim2*dim3); auto pack = KOKKOS_LAMBDA(const TeamMember& team) { const int iexp = team.league_rank(); const int icol = export_lids(iexp); @@ -321,7 +321,7 @@ void RefiningRemapperP2P::recv_and_unpack () using RangePolicy = typename KT::RangePolicy; using TeamMember = typename KT::MemberType; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; auto import_pids = m_imp_exp->import_pids(); auto import_lids = m_imp_exp->import_lids(); @@ -359,7 +359,7 @@ void RefiningRemapperP2P::recv_and_unpack () { auto v = f.get_view(); const int dim1 = fl.dim(1); - auto policy = ESU::get_default_team_policy(num_imports,dim1); + auto policy = TPF::get_default_team_policy(num_imports,dim1); auto unpack = KOKKOS_LAMBDA (const TeamMember& team) { const int idx = team.league_rank(); const int pid = import_pids(idx); @@ -384,7 +384,7 @@ void RefiningRemapperP2P::recv_and_unpack () const int dim1 = fl.dim(1); const int dim2 = fl.dim(2); const int f_col_size = dim1*dim2; - auto policy = ESU::get_default_team_policy(num_imports,dim1*dim2); + auto policy = TPF::get_default_team_policy(num_imports,dim1*dim2); auto unpack = KOKKOS_LAMBDA (const TeamMember& team) { const int idx = team.league_rank(); const int pid = import_pids(idx); @@ -412,7 +412,7 @@ void RefiningRemapperP2P::recv_and_unpack () const int dim2 = fl.dim(2); const int dim3 = fl.dim(3); const int f_col_size = dim1*dim2*dim3; - auto policy = ESU::get_default_team_policy(num_imports,dim1*dim2*dim3); + auto policy = TPF::get_default_team_policy(num_imports,dim1*dim2*dim3); auto unpack = KOKKOS_LAMBDA (const TeamMember& team) { const int idx = team.league_rank(); const int pid = import_pids(idx); diff --git a/components/eamxx/src/share/grid/remap/refining_remapper_rma.cpp b/components/eamxx/src/share/grid/remap/refining_remapper_rma.cpp index f4ad86256d27..5efb3d7c9f2f 100644 --- a/components/eamxx/src/share/grid/remap/refining_remapper_rma.cpp +++ b/components/eamxx/src/share/grid/remap/refining_remapper_rma.cpp @@ -3,7 +3,6 @@ #include "share/grid/point_grid.hpp" #include "share/io/scorpio_input.hpp" -#include #include #include diff --git a/components/eamxx/src/share/grid/remap/vertical_remapper.cpp b/components/eamxx/src/share/grid/remap/vertical_remapper.cpp index 0277c8b5f4e7..8d5305f2a6c8 100644 --- a/components/eamxx/src/share/grid/remap/vertical_remapper.cpp +++ b/components/eamxx/src/share/grid/remap/vertical_remapper.cpp @@ -7,8 +7,8 @@ #include "share/util/eamxx_universal_constants.hpp" #include "share/io/eamxx_scorpio_interface.hpp" -#include #include +#include #include #include @@ -479,9 +479,9 @@ void VerticalRemapper:: setup_lin_interp (const ekat::LinInterp& lin_interp, const Field& p_src, const Field& p_tgt) const { - using LI_t = ekat::LinInterp; - using ESU = ekat::ExeSpaceUtils; - using PackT = ekat::Pack; + using LI_t = ekat::LinInterp; + using TPF = ekat::TeamPolicyFactory; + using PackT = ekat::Pack; using view2d = typename KokkosTypes::view; using view1d = typename KokkosTypes::view; @@ -516,7 +516,7 @@ setup_lin_interp (const ekat::LinInterp& lin_interp, const int ncols = m_src_grid->get_num_local_dofs(); const int nlevs_tgt = m_tgt_grid->get_num_vertical_levels(); const int npacks_tgt = ekat::PackInfo::num_packs(nlevs_tgt); - auto policy = ESU::get_default_team_policy(ncols,npacks_tgt); + auto policy = TPF::get_default_team_policy(ncols,npacks_tgt); Kokkos::parallel_for("VerticalRemapper::interp_setup",policy,lambda); Kokkos::fence(); } @@ -529,9 +529,9 @@ apply_vertical_interpolation(const ekat::LinInterp& lin_interp, { // Note: if Packsize==1, we grab packs of size 1, which are for sure // compatible with the allocation - using LI_t = ekat::LinInterp; - using PackT = ekat::Pack; - using ESU = ekat::ExeSpaceUtils; + using LI_t = ekat::LinInterp; + using PackT = ekat::Pack; + using TPF = ekat::TeamPolicyFactory; using view2d = typename KokkosTypes::view; using view1d = typename KokkosTypes::view; @@ -562,7 +562,7 @@ apply_vertical_interpolation(const ekat::LinInterp& lin_interp, { auto f_src_v = f_src.get_view(); auto f_tgt_v = f_tgt.get_view< PackT**>(); - auto policy = ESU::get_default_team_policy(ncols,npacks_tgt); + auto policy = TPF::get_default_team_policy(ncols,npacks_tgt); auto lambda = KOKKOS_LAMBDA(typename LI_t::MemberType const& team) { const int icol = team.league_rank(); @@ -587,7 +587,7 @@ apply_vertical_interpolation(const ekat::LinInterp& lin_interp, auto f_src_v = f_src.get_view(); auto f_tgt_v = f_tgt.get_view< PackT***>(); const int ncomps = f_tgt_l.get_vector_dim(); - auto policy = ESU::get_default_team_policy(ncols*ncomps,npacks_tgt); + auto policy = TPF::get_default_team_policy(ncols*ncomps,npacks_tgt); auto lambda = KOKKOS_LAMBDA(typename LI_t::MemberType const& team) { @@ -624,7 +624,7 @@ extrapolate (const Field& f_src, const Field& p_tgt, const Real mask_val) const { - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; using view2d = typename KokkosTypes::view; using view1d = typename KokkosTypes::view; @@ -659,7 +659,7 @@ extrapolate (const Field& f_src, { auto f_src_v = f_src.get_view(); auto f_tgt_v = f_tgt.get_view< Real**>(); - auto policy = ESU::get_default_team_policy(ncols,nlevs_tgt); + auto policy = TPF::get_default_team_policy(ncols,nlevs_tgt); using MemberType = typename decltype(policy)::member_type; auto lambda = KOKKOS_LAMBDA(const MemberType& team) @@ -710,7 +710,7 @@ extrapolate (const Field& f_src, auto f_src_v = f_src.get_view(); auto f_tgt_v = f_tgt.get_view< Real***>(); const int ncomps = f_tgt_l.get_vector_dim(); - auto policy = ESU::get_default_team_policy(ncols*ncomps,nlevs_tgt); + auto policy = TPF::get_default_team_policy(ncols*ncomps,nlevs_tgt); using MemberType = typename decltype(policy)::member_type; auto lambda = KOKKOS_LAMBDA(const MemberType& team) diff --git a/components/eamxx/src/share/property_checks/mass_and_energy_column_conservation_check.cpp b/components/eamxx/src/share/property_checks/mass_and_energy_column_conservation_check.cpp index 4821f37024fb..67bcb9031c47 100644 --- a/components/eamxx/src/share/property_checks/mass_and_energy_column_conservation_check.cpp +++ b/components/eamxx/src/share/property_checks/mass_and_energy_column_conservation_check.cpp @@ -2,6 +2,9 @@ #include "physics/share/physics_constants.hpp" #include "share/field/field_utils.hpp" +#include +#include + #include namespace scream @@ -52,6 +55,8 @@ MassAndEnergyColumnConservationCheck (const std::shared_ptr& void MassAndEnergyColumnConservationCheck::compute_current_mass () { + using TPF = ekat::TeamPolicyFactory; + auto mass = m_current_mass; const auto ncols = m_num_cols; const auto nlevs = m_num_levs; @@ -62,7 +67,7 @@ void MassAndEnergyColumnConservationCheck::compute_current_mass () const auto qi = m_fields.at("qi").get_view(); const auto qr = m_fields.at("qr").get_view(); - const auto policy = ExeSpaceUtils::get_default_team_policy(ncols, nlevs); + const auto policy = TPF::get_default_team_policy(ncols, nlevs); Kokkos::parallel_for(policy, KOKKOS_LAMBDA (const KT::MemberType& team) { const int i = team.league_rank(); @@ -78,6 +83,8 @@ void MassAndEnergyColumnConservationCheck::compute_current_mass () void MassAndEnergyColumnConservationCheck::compute_current_energy () { + using TPF = ekat::TeamPolicyFactory; + auto energy = m_current_energy; const auto ncols = m_num_cols; const auto nlevs = m_num_levs; @@ -91,7 +98,7 @@ void MassAndEnergyColumnConservationCheck::compute_current_energy () const auto ps = m_fields.at("ps").get_view(); const auto phis = m_fields.at("phis").get_view(); - const auto policy = ExeSpaceUtils::get_default_team_policy(ncols, nlevs); + const auto policy = TPF::get_default_team_policy(ncols, nlevs); Kokkos::parallel_for(policy, KOKKOS_LAMBDA (const KT::MemberType& team) { const int i = team.league_rank(); @@ -140,7 +147,8 @@ PropertyCheck::ResultAndMsg MassAndEnergyColumnConservationCheck::check() const maxloc_value_t maxloc_energy; // Mass error calculation - const auto policy = ExeSpaceUtils::get_default_team_policy(ncols, nlevs); + using TPF = ekat::TeamPolicyFactory; + const auto policy = TPF::get_default_team_policy(ncols, nlevs); Kokkos::parallel_reduce(policy, KOKKOS_LAMBDA (const KT::MemberType& team, maxloc_value_t& result) { const int i = team.league_rank(); @@ -289,11 +297,12 @@ compute_total_mass_on_column (const KT::MemberType& team, const uview_1d& qr) { using PC = scream::physics::Constants; + using RU = ekat::ReductionUtils; const Real gravit = PC::gravit; - return ExeSpaceUtils::parallel_reduce(team, 0, nlevs, - [&] (const int lev, Real& local_mass) { + return RU::parallel_reduce(team, 0, nlevs, + [&] (const int lev, Real& local_mass) { local_mass += (qv(lev)+ qc(lev)+ qi(lev)+ @@ -326,14 +335,16 @@ compute_total_energy_on_column (const KT::MemberType& team, const Real phis) { using PC = scream::physics::Constants; + using RU = ekat::ReductionUtils; + const Real LatVap = PC::LatVap; const Real LatIce = PC::LatIce; const Real gravit = PC::gravit; const Real Cpair = PC::Cpair; Real total_energy = - ExeSpaceUtils::parallel_reduce(team, 0, nlevs, - [&] (const int lev, Real& local_energy) { + RU::parallel_reduce(team, 0, nlevs, + [&] (const int lev, Real& local_energy) { const auto u2 = horiz_winds(0,lev)*horiz_winds(0,lev); const auto v2 = horiz_winds(1,lev)*horiz_winds(1,lev); diff --git a/components/eamxx/src/share/property_checks/mass_and_energy_column_conservation_check.hpp b/components/eamxx/src/share/property_checks/mass_and_energy_column_conservation_check.hpp index cd15cb4e0aa4..31a2908e3759 100644 --- a/components/eamxx/src/share/property_checks/mass_and_energy_column_conservation_check.hpp +++ b/components/eamxx/src/share/property_checks/mass_and_energy_column_conservation_check.hpp @@ -5,8 +5,6 @@ #include "share/grid/abstract_grid.hpp" #include "share/field/field.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" - namespace scream { // This property check ensures that energy has been conserved. @@ -14,7 +12,6 @@ namespace scream { class MassAndEnergyColumnConservationCheck: public PropertyCheck { using KT = KokkosTypes; - using ExeSpaceUtils = ekat::ExeSpaceUtils; template using view_1d = typename KT::template view_1d; diff --git a/components/eamxx/src/share/tests/common_physics_functions_tests.cpp b/components/eamxx/src/share/tests/common_physics_functions_tests.cpp index 891ae0820e32..021dd6774352 100644 --- a/components/eamxx/src/share/tests/common_physics_functions_tests.cpp +++ b/components/eamxx/src/share/tests/common_physics_functions_tests.cpp @@ -6,9 +6,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/util/eamxx_utils.hpp" -#include "ekat/kokkos/ekat_kokkos_utils.hpp" #include "ekat/util/ekat_test_utils.hpp" #include +#include #include @@ -180,10 +180,10 @@ void run(std::mt19937_64& engine) using KT = ekat::KokkosTypes; using ExecSpace = typename KT::ExeSpace; - using TeamPolicy = typename KT::TeamPolicy; using MemberType = typename KT::MemberType; using view_1d = typename KT::template view_1d; using rview_1d = typename KT::template view_1d; + using TPF = ekat::TeamPolicyFactory; static constexpr auto Rd = PC::RD; static constexpr auto cp = PC::CP; @@ -419,7 +419,7 @@ void run(std::mt19937_64& engine) REQUIRE( !Check::approx_equal(PF::calculate_vmr_from_mmr(o2_mol,qv0,tmp),vmr0,test_tol) ); // --------- Run tests on full columns of data ----------- // - TeamPolicy policy(ekat::ExeSpaceUtils::get_default_team_policy(1, 1)); + auto policy = TPF::get_default_team_policy(1, 1); Kokkos::parallel_for("test_universal_physics", policy, KOKKOS_LAMBDA(const MemberType& team) { // Compute density(dp,dz) diff --git a/components/eamxx/src/share/util/eamxx_data_interpolation.cpp b/components/eamxx/src/share/util/eamxx_data_interpolation.cpp index cad10cbf6137..f2eea2743bf7 100644 --- a/components/eamxx/src/share/util/eamxx_data_interpolation.cpp +++ b/components/eamxx/src/share/util/eamxx_data_interpolation.cpp @@ -11,6 +11,8 @@ #include "share/util/eamxx_universal_constants.hpp" #include "physics/share/physics_constants.hpp" +#include + #include #include #include @@ -94,7 +96,7 @@ void DataInterpolation::run (const util::TimeStamp& ts) using KT = KokkosTypes; using ExeSpace = typename KT::ExeSpace; using MemberType = typename KT::MemberType; - using ESU = ekat::ExeSpaceUtils; + using TPF = ekat::TeamPolicyFactory; using C = scream::physics::Constants; using PT = ekat::Pack; @@ -107,7 +109,7 @@ void DataInterpolation::run (const util::TimeStamp& ts) const int ncols = ps_v.extent(0); const int num_vert_packs = p_v.extent(1); - const auto policy = ESU::get_default_team_policy(ncols, num_vert_packs); + const auto policy = TPF::get_default_team_policy(ncols, num_vert_packs); Kokkos::parallel_for("spa_compute_p_src_loop", policy, KOKKOS_LAMBDA (const MemberType& team) { diff --git a/components/eamxx/tests/single-process/rrtmgp/rrtmgp_standalone_unit.cpp b/components/eamxx/tests/single-process/rrtmgp/rrtmgp_standalone_unit.cpp index bc16f82df5d3..dd8ba8a67810 100644 --- a/components/eamxx/tests/single-process/rrtmgp/rrtmgp_standalone_unit.cpp +++ b/components/eamxx/tests/single-process/rrtmgp/rrtmgp_standalone_unit.cpp @@ -15,8 +15,8 @@ #include "share/util/eamxx_common_physics_functions.hpp" // EKAT headers -#include #include +#include #include // RRTMGP @@ -37,6 +37,7 @@ using namespace scream; using namespace scream::control; using KT = KokkosTypes; using ExeSpace = KT::ExeSpace; +using TPF = ekat::TeamPolicyFactory; using MemberType = KT::MemberType; using PC = scream::physics::Constants; @@ -255,7 +256,7 @@ TEST_CASE("rrtmgp_scream_standalone_k", "") { // Gather molecular weights of all the active gases in the test for conversion // to mass-mixing-ratio. { - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(ncol, nlay); + const auto policy = TPF::get_default_team_policy(ncol, nlay); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const int i = team.league_rank(); @@ -320,7 +321,7 @@ TEST_CASE("rrtmgp_scream_standalone_k", "") { auto lw_flux_up_test = real2dk("lw_flux_up_test", ncol, nlay+1); auto lw_flux_dn_test = real2dk("lw_flux_dn_test", ncol, nlay+1); { - const auto policy = ekat::ExeSpaceUtils::get_default_team_policy(ncol, nlay); + const auto policy = TPF::get_default_team_policy(ncol, nlay); Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) { const int i = team.league_rank(); diff --git a/components/eamxx/tests/single-process/surface_coupling/surface_coupling.cpp b/components/eamxx/tests/single-process/surface_coupling/surface_coupling.cpp index 7e2b0d44f616..6a84f1f8a05d 100644 --- a/components/eamxx/tests/single-process/surface_coupling/surface_coupling.cpp +++ b/components/eamxx/tests/single-process/surface_coupling/surface_coupling.cpp @@ -12,6 +12,7 @@ #include #include +#include #include @@ -301,8 +302,10 @@ void test_exports(const FieldManager& fm, const int dt, const bool called_directly_after_init = false) { - using PF = PhysicsFunctions; - using PC = physics::Constants; + using PF = PhysicsFunctions; + using PC = physics::Constants; + using ExeSpace = typename KokkosTypes::ExeSpace; + using TPF = ekat::TeamPolicyFactory; // Some computed fields rely on calculations that are done in the AD. // Recompute here and verify that they were exported correctly. @@ -329,8 +332,7 @@ void test_exports(const FieldManager& fm, KokkosTypes::view_1d Faxa_rainl("Faxa_rainl", ncols); KokkosTypes::view_1d Faxa_snowl("Faxa_snowl", ncols); - const auto setup_policy = - ekat::ExeSpaceUtils::ExeSpace>::get_thread_range_parallel_scan_team_policy(ncols, nlevs); + const auto setup_policy = TPF::get_thread_range_parallel_scan_team_policy(ncols, nlevs); Kokkos::parallel_for(setup_policy, KOKKOS_LAMBDA(const Kokkos::TeamPolicy::ExeSpace>::member_type& team) { const int i = team.league_rank(); From dab0514c64b2318a1b7432f36f7a2994ac43aaae Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Thu, 15 May 2025 09:59:43 -0600 Subject: [PATCH 09/22] EAMxx: session changes --- components/eamxx/src/share/eamxx_config.cpp | 11 ++++++++--- components/eamxx/src/share/eamxx_session.cpp | 11 ++++++----- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/components/eamxx/src/share/eamxx_config.cpp b/components/eamxx/src/share/eamxx_config.cpp index e3e7cc2f9a3f..ef916fd230e7 100644 --- a/components/eamxx/src/share/eamxx_config.cpp +++ b/components/eamxx/src/share/eamxx_config.cpp @@ -2,14 +2,19 @@ #include "eamxx_session.hpp" #include "eamxx_types.hpp" -#include "ekat/util/ekat_arch.hpp" -#include "ekat/ekat_assert.hpp" +#include +#include +#include +#include namespace scream { std::string eamxx_config_string() { std::string config = "\n-------- EKAT CONFIGS --------\n\n"; - config += ekat::ekat_config_string(); + config += ekat::active_avx_string (); + config += ekat::compiler_id_string (); + config += ekat::fpe_config_string (); + config += ekat::kokkos_config_string(); config += "\n-------- SCREAM CONFIGS --------\n\n"; config += " sizeof(Real) = " + std::to_string(sizeof(Real)) + "\n"; config += " default pack size = " + std::to_string(SCREAM_PACK_SIZE) + "\n"; diff --git a/components/eamxx/src/share/eamxx_session.cpp b/components/eamxx/src/share/eamxx_session.cpp index 9021a360d3dd..d520ec1c9198 100644 --- a/components/eamxx/src/share/eamxx_session.cpp +++ b/components/eamxx/src/share/eamxx_session.cpp @@ -1,8 +1,9 @@ #include "eamxx_session.hpp" #include "eamxx_config.hpp" -#include "ekat/ekat_assert.hpp" -#include "ekat/ekat_session.hpp" +#include +#include +#include #include #include @@ -20,7 +21,7 @@ int get_default_fpes () { } void initialize_eamxx_session (bool print_config) { - ekat::initialize_ekat_session(print_config); + ekat::initialize_kokkos_session(print_config); // Make sure scream only has its FPEs ekat::disable_all_fpes(); @@ -31,7 +32,7 @@ void initialize_eamxx_session (bool print_config) { } void initialize_eamxx_session (int argc, char **argv, bool print_config) { - ekat::initialize_ekat_session(argc,argv,print_config); + ekat::initialize_kokkos_session(argc,argv,print_config); // Make sure scream only has its FPEs ekat::disable_all_fpes(); @@ -43,7 +44,7 @@ void initialize_eamxx_session (int argc, char **argv, bool print_config) { extern "C" { void finalize_eamxx_session () { - ekat::finalize_ekat_session(); + ekat::finalize_kokkos_session(); } } // extern "C" From a5f3b6eb91aa0951e750a3d1c890fc1803686e16 Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Thu, 15 May 2025 12:28:21 -0600 Subject: [PATCH 10/22] EAMxx: fix includes to get genRandArray for views --- components/eamxx/src/diagnostics/tests/atm_density_test.cpp | 2 +- .../eamxx/src/diagnostics/tests/dry_static_energy_test.cpp | 2 +- components/eamxx/src/diagnostics/tests/exner_test.cpp | 2 +- .../src/diagnostics/tests/longwave_cloud_forcing_tests.cpp | 2 +- components/eamxx/src/diagnostics/tests/number_paths_tests.cpp | 3 ++- .../eamxx/src/diagnostics/tests/potential_temperature_test.cpp | 2 +- .../src/diagnostics/tests/precip_surf_mass_flux_tests.cpp | 2 +- .../eamxx/src/diagnostics/tests/relative_humidity_tests.cpp | 2 +- .../eamxx/src/diagnostics/tests/sea_level_pressure_test.cpp | 2 +- .../src/diagnostics/tests/shortwave_cloud_forcing_tests.cpp | 2 +- .../diagnostics/tests/surf_upward_latent_heat_flux_tests.cpp | 2 +- components/eamxx/src/diagnostics/tests/vapor_flux_tests.cpp | 2 +- .../eamxx/src/diagnostics/tests/virtual_temperature_test.cpp | 2 +- components/eamxx/src/diagnostics/tests/water_path_tests.cpp | 2 +- .../eamxx/src/share/tests/common_physics_functions_tests.cpp | 2 +- 15 files changed, 16 insertions(+), 15 deletions(-) diff --git a/components/eamxx/src/diagnostics/tests/atm_density_test.cpp b/components/eamxx/src/diagnostics/tests/atm_density_test.cpp index 6be0f1292640..f90ee09e8c4e 100644 --- a/components/eamxx/src/diagnostics/tests/atm_density_test.cpp +++ b/components/eamxx/src/diagnostics/tests/atm_density_test.cpp @@ -10,9 +10,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/util/ekat_test_utils.hpp" #include #include +#include #include diff --git a/components/eamxx/src/diagnostics/tests/dry_static_energy_test.cpp b/components/eamxx/src/diagnostics/tests/dry_static_energy_test.cpp index c51c0be1ea9b..41f8923ce34b 100644 --- a/components/eamxx/src/diagnostics/tests/dry_static_energy_test.cpp +++ b/components/eamxx/src/diagnostics/tests/dry_static_energy_test.cpp @@ -10,9 +10,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/util/ekat_test_utils.hpp" #include #include +#include #include diff --git a/components/eamxx/src/diagnostics/tests/exner_test.cpp b/components/eamxx/src/diagnostics/tests/exner_test.cpp index e7740a68a6a6..b2040288e626 100644 --- a/components/eamxx/src/diagnostics/tests/exner_test.cpp +++ b/components/eamxx/src/diagnostics/tests/exner_test.cpp @@ -10,9 +10,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/util/ekat_test_utils.hpp" #include #include +#include #include diff --git a/components/eamxx/src/diagnostics/tests/longwave_cloud_forcing_tests.cpp b/components/eamxx/src/diagnostics/tests/longwave_cloud_forcing_tests.cpp index 1cac3830113d..8d409a8b2b1f 100644 --- a/components/eamxx/src/diagnostics/tests/longwave_cloud_forcing_tests.cpp +++ b/components/eamxx/src/diagnostics/tests/longwave_cloud_forcing_tests.cpp @@ -10,9 +10,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/util/ekat_test_utils.hpp" #include #include +#include #include diff --git a/components/eamxx/src/diagnostics/tests/number_paths_tests.cpp b/components/eamxx/src/diagnostics/tests/number_paths_tests.cpp index c95580294967..a8a271020ac4 100644 --- a/components/eamxx/src/diagnostics/tests/number_paths_tests.cpp +++ b/components/eamxx/src/diagnostics/tests/number_paths_tests.cpp @@ -2,7 +2,6 @@ #include "catch2/catch.hpp" #include "diagnostics/register_diagnostics.hpp" -#include "ekat/util/ekat_test_utils.hpp" #include "physics/share/physics_constants.hpp" #include "share/field/field_utils.hpp" #include "share/grid/mesh_free_grids_manager.hpp" @@ -10,6 +9,8 @@ #include "share/util/eamxx_setup_random_test.hpp" #include "share/util/eamxx_utils.hpp" +#include + namespace scream { std::shared_ptr create_gm(const ekat::Comm &comm, const int ncols, diff --git a/components/eamxx/src/diagnostics/tests/potential_temperature_test.cpp b/components/eamxx/src/diagnostics/tests/potential_temperature_test.cpp index 09de413fe270..c08bc0a0e8d6 100644 --- a/components/eamxx/src/diagnostics/tests/potential_temperature_test.cpp +++ b/components/eamxx/src/diagnostics/tests/potential_temperature_test.cpp @@ -10,9 +10,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/util/ekat_test_utils.hpp" #include #include +#include #include diff --git a/components/eamxx/src/diagnostics/tests/precip_surf_mass_flux_tests.cpp b/components/eamxx/src/diagnostics/tests/precip_surf_mass_flux_tests.cpp index b26ea36e0ab8..45e374fac518 100644 --- a/components/eamxx/src/diagnostics/tests/precip_surf_mass_flux_tests.cpp +++ b/components/eamxx/src/diagnostics/tests/precip_surf_mass_flux_tests.cpp @@ -8,7 +8,7 @@ #include "share/util/eamxx_setup_random_test.hpp" #include "share/field/field_utils.hpp" -#include "ekat/util/ekat_test_utils.hpp" +#include namespace scream { diff --git a/components/eamxx/src/diagnostics/tests/relative_humidity_tests.cpp b/components/eamxx/src/diagnostics/tests/relative_humidity_tests.cpp index 0332718fc56f..5c4e6904b158 100644 --- a/components/eamxx/src/diagnostics/tests/relative_humidity_tests.cpp +++ b/components/eamxx/src/diagnostics/tests/relative_humidity_tests.cpp @@ -11,9 +11,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/util/ekat_test_utils.hpp" #include #include +#include #include diff --git a/components/eamxx/src/diagnostics/tests/sea_level_pressure_test.cpp b/components/eamxx/src/diagnostics/tests/sea_level_pressure_test.cpp index b907afc6f78c..da041ee8c353 100644 --- a/components/eamxx/src/diagnostics/tests/sea_level_pressure_test.cpp +++ b/components/eamxx/src/diagnostics/tests/sea_level_pressure_test.cpp @@ -10,8 +10,8 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/util/ekat_test_utils.hpp" #include +#include #include diff --git a/components/eamxx/src/diagnostics/tests/shortwave_cloud_forcing_tests.cpp b/components/eamxx/src/diagnostics/tests/shortwave_cloud_forcing_tests.cpp index 86c4a8f2e1bf..43c6e45a5f74 100644 --- a/components/eamxx/src/diagnostics/tests/shortwave_cloud_forcing_tests.cpp +++ b/components/eamxx/src/diagnostics/tests/shortwave_cloud_forcing_tests.cpp @@ -10,9 +10,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/util/ekat_test_utils.hpp" #include #include +#include #include diff --git a/components/eamxx/src/diagnostics/tests/surf_upward_latent_heat_flux_tests.cpp b/components/eamxx/src/diagnostics/tests/surf_upward_latent_heat_flux_tests.cpp index 5f6787fe7ea9..652f72cfbb24 100644 --- a/components/eamxx/src/diagnostics/tests/surf_upward_latent_heat_flux_tests.cpp +++ b/components/eamxx/src/diagnostics/tests/surf_upward_latent_heat_flux_tests.cpp @@ -9,8 +9,8 @@ #include "share/util/eamxx_setup_random_test.hpp" #include "share/field/field_utils.hpp" -#include "ekat/util/ekat_test_utils.hpp" #include +#include namespace scream { diff --git a/components/eamxx/src/diagnostics/tests/vapor_flux_tests.cpp b/components/eamxx/src/diagnostics/tests/vapor_flux_tests.cpp index 19803f22c1b4..f8c18d564efb 100644 --- a/components/eamxx/src/diagnostics/tests/vapor_flux_tests.cpp +++ b/components/eamxx/src/diagnostics/tests/vapor_flux_tests.cpp @@ -10,8 +10,8 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/util/ekat_test_utils.hpp" #include +#include #include diff --git a/components/eamxx/src/diagnostics/tests/virtual_temperature_test.cpp b/components/eamxx/src/diagnostics/tests/virtual_temperature_test.cpp index 9fc1548ddbf6..12c099f55bcd 100644 --- a/components/eamxx/src/diagnostics/tests/virtual_temperature_test.cpp +++ b/components/eamxx/src/diagnostics/tests/virtual_temperature_test.cpp @@ -10,9 +10,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/util/ekat_test_utils.hpp" #include #include +#include #include diff --git a/components/eamxx/src/diagnostics/tests/water_path_tests.cpp b/components/eamxx/src/diagnostics/tests/water_path_tests.cpp index b1a1a8a92146..334908c3a10a 100644 --- a/components/eamxx/src/diagnostics/tests/water_path_tests.cpp +++ b/components/eamxx/src/diagnostics/tests/water_path_tests.cpp @@ -10,8 +10,8 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/field/field_utils.hpp" -#include "ekat/util/ekat_test_utils.hpp" #include +#include #include diff --git a/components/eamxx/src/share/tests/common_physics_functions_tests.cpp b/components/eamxx/src/share/tests/common_physics_functions_tests.cpp index 021dd6774352..6ce25318194b 100644 --- a/components/eamxx/src/share/tests/common_physics_functions_tests.cpp +++ b/components/eamxx/src/share/tests/common_physics_functions_tests.cpp @@ -6,9 +6,9 @@ #include "share/util/eamxx_common_physics_functions.hpp" #include "share/util/eamxx_utils.hpp" -#include "ekat/util/ekat_test_utils.hpp" #include #include +#include #include From 5343874f1395fe3a6cfeb872dfde3086014a9fbb Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Thu, 15 May 2025 13:52:36 -0600 Subject: [PATCH 11/22] EAMxx: avoid building test-only code as part of regular libs In particular, physics_test_data.hpp only belongs in testing. So add those sources to scream_test_support target and link the test support target against unit tests --- components/eamxx/src/physics/gw/tests/infra/CMakeLists.txt | 2 +- components/eamxx/src/physics/p3/tests/infra/CMakeLists.txt | 4 ++-- components/eamxx/src/physics/share/CMakeLists.txt | 6 +++++- .../eamxx/src/physics/shoc/tests/infra/CMakeLists.txt | 2 +- components/eamxx/src/physics/tms/tests/infra/CMakeLists.txt | 2 +- components/eamxx/src/physics/zm/tests/infra/CMakeLists.txt | 2 +- components/eamxx/src/share/CMakeLists.txt | 1 + 7 files changed, 12 insertions(+), 7 deletions(-) diff --git a/components/eamxx/src/physics/gw/tests/infra/CMakeLists.txt b/components/eamxx/src/physics/gw/tests/infra/CMakeLists.txt index 482df5fd0858..608e22dcbd80 100644 --- a/components/eamxx/src/physics/gw/tests/infra/CMakeLists.txt +++ b/components/eamxx/src/physics/gw/tests/infra/CMakeLists.txt @@ -4,5 +4,5 @@ set(INFRA_SRCS ) add_library(gw_test_infra ${INFRA_SRCS}) -target_link_libraries(gw_test_infra gw) +target_link_libraries(gw_test_infra PUBLIC gw scream_test_support) target_include_directories(gw_test_infra PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/components/eamxx/src/physics/p3/tests/infra/CMakeLists.txt b/components/eamxx/src/physics/p3/tests/infra/CMakeLists.txt index 6f7093a33ec7..34fb3994d6b1 100644 --- a/components/eamxx/src/physics/p3/tests/infra/CMakeLists.txt +++ b/components/eamxx/src/physics/p3/tests/infra/CMakeLists.txt @@ -7,9 +7,9 @@ set(INFRA_SRCS #crusher change if (Kokkos_ENABLE_HIP) -set_source_files_properties(p3_test_data.cpp PROPERTIES COMPILE_FLAGS -O0) + set_source_files_properties(p3_test_data.cpp PROPERTIES COMPILE_FLAGS -O0) endif() add_library(p3_test_infra ${INFRA_SRCS}) -target_link_libraries(p3_test_infra p3) +target_link_libraries(p3_test_infra PUBLIC p3 scream_test_support) target_include_directories(p3_test_infra PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/components/eamxx/src/physics/share/CMakeLists.txt b/components/eamxx/src/physics/share/CMakeLists.txt index 18ff3844ea59..c955dcf5fadb 100644 --- a/components/eamxx/src/physics/share/CMakeLists.txt +++ b/components/eamxx/src/physics/share/CMakeLists.txt @@ -1,7 +1,6 @@ set(PHYSICS_SHARE_SRCS physics_share_f2c.F90 physics_share.cpp - physics_test_data.cpp eamxx_trcmix.cpp ) @@ -22,6 +21,11 @@ target_include_directories(physics_share PUBLIC target_link_libraries(physics_share scream_share) if (NOT SCREAM_LIB_ONLY) + + target_sources(scream_test_support PRIVATE + physics_test_data.cpp + ) + add_subdirectory(tests) endif() diff --git a/components/eamxx/src/physics/shoc/tests/infra/CMakeLists.txt b/components/eamxx/src/physics/shoc/tests/infra/CMakeLists.txt index 0c0c75ca6aa8..fbcd06277366 100644 --- a/components/eamxx/src/physics/shoc/tests/infra/CMakeLists.txt +++ b/components/eamxx/src/physics/shoc/tests/infra/CMakeLists.txt @@ -6,5 +6,5 @@ set(INFRA_SRCS ) add_library(shoc_test_infra ${INFRA_SRCS}) -target_link_libraries(shoc_test_infra shoc) +target_link_libraries(shoc_test_infra PUBLIC shoc scream_test_support) target_include_directories(shoc_test_infra PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/components/eamxx/src/physics/tms/tests/infra/CMakeLists.txt b/components/eamxx/src/physics/tms/tests/infra/CMakeLists.txt index 2c0cc0a47419..e6e529990d04 100644 --- a/components/eamxx/src/physics/tms/tests/infra/CMakeLists.txt +++ b/components/eamxx/src/physics/tms/tests/infra/CMakeLists.txt @@ -3,5 +3,5 @@ set(INFRA_SRCS ) add_library(tms_test_infra ${INFRA_SRCS}) -target_link_libraries(tms_test_infra tms) +target_link_libraries(tms_test_infra PUBLIC tms scream_test_support) target_include_directories(tms_test_infra PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/components/eamxx/src/physics/zm/tests/infra/CMakeLists.txt b/components/eamxx/src/physics/zm/tests/infra/CMakeLists.txt index 0744dbb97cf7..368b4cd3bf1f 100644 --- a/components/eamxx/src/physics/zm/tests/infra/CMakeLists.txt +++ b/components/eamxx/src/physics/zm/tests/infra/CMakeLists.txt @@ -4,5 +4,5 @@ set(INFRA_SRCS ) add_library(zm_test_infra ${INFRA_SRCS}) -target_link_libraries(zm_test_infra zm) +target_link_libraries(zm_test_infra zm scream_test_support) target_include_directories(zm_test_infra PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/components/eamxx/src/share/CMakeLists.txt b/components/eamxx/src/share/CMakeLists.txt index 95670ed40f13..bdb2a06a29d5 100644 --- a/components/eamxx/src/share/CMakeLists.txt +++ b/components/eamxx/src/share/CMakeLists.txt @@ -224,6 +224,7 @@ if (NOT SCREAM_LIB_ONLY) util/eamxx_test_session.cpp ) target_link_libraries(scream_test_support PUBLIC scream_share scream_io) + target_include_directories (scream_test_support PUBLIC ${EKAT_SOURCE_DIR}/extern/Catch2/single_include) add_subdirectory(tests) endif() From 2dc444d7c3dd2df3b0794922eb2ae821be8cfcc1 Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Mon, 19 May 2025 17:49:49 -0600 Subject: [PATCH 12/22] EAMxx: fix query-cf-database target --- components/eamxx/scripts/query-cf-database/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/eamxx/scripts/query-cf-database/CMakeLists.txt b/components/eamxx/scripts/query-cf-database/CMakeLists.txt index 5a46c400bb5a..d2ad0705c243 100644 --- a/components/eamxx/scripts/query-cf-database/CMakeLists.txt +++ b/components/eamxx/scripts/query-cf-database/CMakeLists.txt @@ -11,5 +11,4 @@ target_compile_definitions(query-cf-database PUBLIC CF_SCREAM_NAME_FILE=${CF_SCREAM_NAME_FILE}) find_package (ekat HINTS ${EKAT_ROOT}) -find_package (yaml-cpp HINTS ${YAML_CPP_ROOT}) -target_link_libraries(query-cf-database ekat yaml-cpp) +target_link_libraries(query-cf-database ekat::AllLibs) From d9d485a973196b265fa135d5c02d01dd022b15ec Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Mon, 19 May 2025 17:57:09 -0600 Subject: [PATCH 13/22] Update PAM configuration and PAM submodule --- components/eam/src/physics/crm/pam/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/eam/src/physics/crm/pam/CMakeLists.txt b/components/eam/src/physics/crm/pam/CMakeLists.txt index e2a8f76918b2..ab6e61ee58b4 100644 --- a/components/eam/src/physics/crm/pam/CMakeLists.txt +++ b/components/eam/src/physics/crm/pam/CMakeLists.txt @@ -69,7 +69,6 @@ endif() if (PAM_SCREAM_USE_CXX) - set(EKAT_ENABLE_YAML_PARSER OFF CACHE BOOL "" FORCE) add_subdirectory(external/physics/scream_cxx_p3_shoc) add_subdirectory(external/physics/scream_cxx_interfaces) # add these here to allow driver to intialize P3 @@ -126,7 +125,7 @@ target_compile_options(pam_driver PUBLIC ) if (PAM_SCREAM_USE_CXX) - target_link_libraries(pam_driver pam_core physics dynamics pam_scream_cxx_interfaces ekat p3 shoc physics_share scream_share) + target_link_libraries(pam_driver pam_core physics dynamics pam_scream_cxx_interfaces ekat::AllLibs p3 shoc physics_share scream_share) else() target_link_libraries(pam_driver pam_core physics dynamics ) endif() From 19009255ab5b6bfbe55a06f3284c993d46f0a01d Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Thu, 22 May 2025 15:10:49 -0600 Subject: [PATCH 14/22] EAMxx: switch from ekat::any to std::any --- .../eamxx/src/control/atmosphere_driver.cpp | 22 ++++++++-------- .../homme/eamxx_homme_process_interface.cpp | 14 +++++----- .../eamxx/src/mct_coupling/ScreamContext.hpp | 13 +++++----- .../share/atm_process/atmosphere_process.hpp | 9 +++---- .../eamxx/src/share/field/field_header.cpp | 2 +- .../eamxx/src/share/field/field_header.hpp | 26 +++++++++---------- .../src/share/io/eamxx_output_manager.cpp | 24 ++++++++--------- .../src/share/io/eamxx_output_manager.hpp | 4 +-- 8 files changed, 54 insertions(+), 60 deletions(-) diff --git a/components/eamxx/src/control/atmosphere_driver.cpp b/components/eamxx/src/control/atmosphere_driver.cpp index 2522f0fe3eea..4f6404de7751 100644 --- a/components/eamxx/src/control/atmosphere_driver.cpp +++ b/components/eamxx/src/control/atmosphere_driver.cpp @@ -957,21 +957,21 @@ void AtmosphereDriver::restart_model () const auto& name = it.first; auto& any = it.second; - if (any.isType()) { - ekat::any_cast(any) = scorpio::get_attribute(filename,"GLOBAL",name); - } else if (any.isType()) { - ekat::any_cast(any) = scorpio::get_attribute(filename,"GLOBAL",name); - } else if (any.isType()) { - ekat::any_cast(any) = scorpio::get_attribute(filename,"GLOBAL",name); - } else if (any.isType()) { - ekat::any_cast(any) = scorpio::get_attribute(filename,"GLOBAL",name); - } else if (any.isType()) { - ekat::any_cast(any) = scorpio::get_attribute(filename,"GLOBAL",name); + if (any.type()==typeid(int)) { + std::any_cast(any) = scorpio::get_attribute(filename,"GLOBAL",name); + } else if (any.type()==typeid(std::int64_t)) { + std::any_cast(any) = scorpio::get_attribute(filename,"GLOBAL",name); + } else if (any.type()==typeid(float)) { + std::any_cast(any) = scorpio::get_attribute(filename,"GLOBAL",name); + } else if (any.type()==typeid(double)) { + std::any_cast(any) = scorpio::get_attribute(filename,"GLOBAL",name); + } else if (any.type()==typeid(std::string)) { + std::any_cast(any) = scorpio::get_attribute(filename,"GLOBAL",name); } else { EKAT_ERROR_MSG ( "Error! Unrecognized/unsupported concrete type for restart extra data.\n" " - extra data name : " + name + "\n" - " - extra data typeid: " + any.content().type().name() + "\n"); + " - extra data typeid: " + std::string(any.type().name()) + "\n"); } } diff --git a/components/eamxx/src/dynamics/homme/eamxx_homme_process_interface.cpp b/components/eamxx/src/dynamics/homme/eamxx_homme_process_interface.cpp index cdf3074f6185..2a5e0a24e23b 100644 --- a/components/eamxx/src/dynamics/homme/eamxx_homme_process_interface.cpp +++ b/components/eamxx/src/dynamics/homme/eamxx_homme_process_interface.cpp @@ -52,9 +52,7 @@ HommeDynamics::HommeDynamics (const ekat::Comm& comm, const ekat::ParameterList& // This class needs Homme's context, so register as a user HommeContextUser::singleton().add_user(); - ekat::any homme_nsteps; - homme_nsteps.reset(-1); - m_restart_extra_data["homme_nsteps"] = homme_nsteps; + m_restart_extra_data["homme_nsteps"] = std::make_any(-1); if (!is_parallel_inited_f90()) { // While we're here, we can init homme's parallel session @@ -507,7 +505,7 @@ void HommeDynamics::run_impl (const double dt) // Update nstep in the restart extra data, so it can be written to restart if needed. const auto& tl = c.get(); - auto& nstep = ekat::any_cast(m_restart_extra_data["homme_nsteps"]); + auto& nstep = std::any_cast(m_restart_extra_data["homme_nsteps"]); nstep = tl.nstep; // Post process Homme's output, to produce what the rest of Atm expects @@ -942,9 +940,9 @@ void HommeDynamics::restart_homme_state () { auto& tl = c.get(); // For BFB restarts, set nstep counter in Homme's TimeLevel to match the restarted value. - const auto& nstep = ekat::any_ptr_cast(m_restart_extra_data["homme_nsteps"]); - tl.nstep = *nstep; - set_homme_param("num_steps",*nstep); + const auto& nstep = std::any_cast(m_restart_extra_data["homme_nsteps"]); + tl.nstep = nstep; + set_homme_param("num_steps",nstep); constexpr int NGP = HOMMEXX_NP; const int nlevs = m_phys_grid->get_num_vertical_levels(); @@ -1121,7 +1119,7 @@ void HommeDynamics::initialize_homme_state () { const int n0 = tl.n0; const int n0_qdp = tl.n0_qdp; - ekat::any_cast(m_restart_extra_data["homme_nsteps"]) = tl.nstep; + std::any_cast(m_restart_extra_data["homme_nsteps"]) = tl.nstep; const auto phis_dyn_view = m_helper_fields.at("phis_dyn").get_view(); const auto phi_int_view = m_helper_fields.at("phi_int_dyn").get_view(); diff --git a/components/eamxx/src/mct_coupling/ScreamContext.hpp b/components/eamxx/src/mct_coupling/ScreamContext.hpp index 90ef22a8573c..50c9138b282c 100644 --- a/components/eamxx/src/mct_coupling/ScreamContext.hpp +++ b/components/eamxx/src/mct_coupling/ScreamContext.hpp @@ -1,9 +1,8 @@ #ifndef SCREAM_CONTEXT_HPP #define SCREAM_CONTEXT_HPP -#include - #include +#include #include namespace scream @@ -24,9 +23,9 @@ class ScreamContext EKAT_REQUIRE_MSG(m_objects.find(key)==m_objects.end(),"Error! Object with key '" + (std::string)key.name() + "' was already created in the scream context.\n"); auto& obj = m_objects[key]; - obj.template reset(args...); + obj = std::make_any(args...); - return ekat::any_cast(obj); + return std::any_cast(obj); } template @@ -36,7 +35,7 @@ class ScreamContext "Error! Object with key '" + (std::string)key.name() + "' not found in the scream context.\n"); const auto& obj = m_objects.at(key); - return ekat::any_cast(obj); + return std::any_cast(obj); } template @@ -46,7 +45,7 @@ class ScreamContext "Error! Object with key '" + (std::string)key.name() + "' not found in the scream context.\n"); auto& obj = m_objects.at(key); - return ekat::any_cast(obj); + return std::any_cast(obj); } void clean_up () { @@ -63,7 +62,7 @@ class ScreamContext template static key_type getKey() { return std::type_index(typeid(T)); } - std::map m_objects; + std::map m_objects; }; inline void cleanup_singleton() { diff --git a/components/eamxx/src/share/atm_process/atmosphere_process.hpp b/components/eamxx/src/share/atm_process/atmosphere_process.hpp index 74a05fbfe15a..db78b62e4f61 100644 --- a/components/eamxx/src/share/atm_process/atmosphere_process.hpp +++ b/components/eamxx/src/share/atm_process/atmosphere_process.hpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include @@ -264,11 +263,11 @@ class AtmosphereProcess : public ekat::enable_shared_from_this ekat::any + // - these maps are: data_name -> std::any // - the data_name is unique across the whole atm // The AD will take care of ensuring these are written/read to/from restart files. - const strmap_t& get_restart_extra_data () const { return m_restart_extra_data; } - strmap_t& get_restart_extra_data () { return m_restart_extra_data; } + const strmap_t& get_restart_extra_data () const { return m_restart_extra_data; } + strmap_t& get_restart_extra_data () { return m_restart_extra_data; } // Boolean that dictates whether or not the conservation checks are run for this process bool has_column_conservation_check () { return m_column_conservation_check_data.has_check; } @@ -507,7 +506,7 @@ class AtmosphereProcess : public ekat::enable_shared_from_this m_atm_logger; // Extra data needed for restart - strmap_t m_restart_extra_data; + strmap_t m_restart_extra_data; // Use at your own risk. Motivation: Free up device memory for a field that is // no longer used, such as a field read in the ICs used only to initialize diff --git a/components/eamxx/src/share/field/field_header.cpp b/components/eamxx/src/share/field/field_header.cpp index 6f563dbdb5f5..8b78aaf03787 100644 --- a/components/eamxx/src/share/field/field_header.cpp +++ b/components/eamxx/src/share/field/field_header.cpp @@ -19,7 +19,7 @@ FieldHeader::FieldHeader (const identifier_type& id) void FieldHeader:: set_extra_data (const std::string& key, - const ekat::any& data, + const std::any& data, const bool throw_if_existing) { if (throw_if_existing) { diff --git a/components/eamxx/src/share/field/field_header.hpp b/components/eamxx/src/share/field/field_header.hpp index 41de4b4c0d57..d1be722c4366 100644 --- a/components/eamxx/src/share/field/field_header.hpp +++ b/components/eamxx/src/share/field/field_header.hpp @@ -8,9 +8,8 @@ #include "share/eamxx_types.hpp" #include "share/util/eamxx_time_stamp.hpp" -#include - #include +#include #include #include // For std::shared_ptr and std::weak_ptr @@ -38,7 +37,7 @@ class FieldHeader : public FamilyTracking { using identifier_type = FieldIdentifier; using tracking_type = FieldTracking; - using extra_data_type = std::map; + using extra_data_type = std::map; // Constructor(s) FieldHeader (const FieldHeader&) = default; @@ -49,15 +48,14 @@ class FieldHeader : public FamilyTracking { // Set extra data void set_extra_data (const std::string& key, - const ekat::any& data, + const std::any& data, const bool throw_if_existing = false); template void set_extra_data (const std::string& key, const T& data, const bool throw_if_existing = false) { - ekat::any data_any; - data_any.reset(data); + std::any data_any(data);; set_extra_data(key,data_any,throw_if_existing); } @@ -127,15 +125,15 @@ get_extra_data (const std::string& key) const "Error! Extra data not found in field header.\n" " - field name: " + m_identifier.name() + "\n" " - extra data: " + key + "\n"); - auto a = m_extra_data->at(key); - EKAT_REQUIRE_MSG ( a.isType(), + const auto& a = m_extra_data->at(key); + EKAT_REQUIRE_MSG ( a.type()==typeid(T), "Error! Attempting to access extra data using the wrong type.\n" " - field name : " + m_identifier.name() + "\n" " - extra data : " + key + "\n" - " - actual type : " + std::string(a.content().type().name()) + "\n" + " - actual type : " + std::string(a.type().name()) + "\n" " - requested type: " + std::string(typeid(T).name()) + ".\n"); - return ekat::any_cast(a); + return std::any_cast(a); } template @@ -146,15 +144,15 @@ get_extra_data (const std::string& key) "Error! Extra data not found in field header.\n" " - field name: " + m_identifier.name() + "\n" " - extra data: " + key + "\n"); - auto a = m_extra_data->at(key); - EKAT_REQUIRE_MSG ( a.isType(), + auto& a = m_extra_data->at(key); + EKAT_REQUIRE_MSG ( a.type()==typeid(T), "Error! Attempting to access extra data using the wrong type.\n" " - field name : " + m_identifier.name() + "\n" " - extra data : " + key + "\n" - " - actual type : " + std::string(a.content().type().name()) + "\n" + " - actual type : " + std::string(a.type().name()) + "\n" " - requested type: " + std::string(typeid(T).name()) + ".\n"); - return ekat::any_cast(a); + return std::any_cast(a); } inline bool FieldHeader:: diff --git a/components/eamxx/src/share/io/eamxx_output_manager.cpp b/components/eamxx/src/share/io/eamxx_output_manager.cpp index 1581870b9418..d3b9f462f656 100644 --- a/components/eamxx/src/share/io/eamxx_output_manager.cpp +++ b/components/eamxx/src/share/io/eamxx_output_manager.cpp @@ -296,7 +296,7 @@ setup (const std::shared_ptr& field_mgr, } void OutputManager:: -add_global (const std::string& name, const ekat::any& global) { +add_global (const std::string& name, const std::any& global) { EKAT_REQUIRE_MSG (m_globals.find(name)==m_globals.end(), "Error! Global attribute was already set in this output manager.\n" " - global att name: " + name + "\n"); @@ -541,21 +541,21 @@ void OutputManager::run(const util::TimeStamp& timestamp) for (const auto& it : m_globals) { const auto& name = it.first; const auto& any = it.second; - if (any.isType()) { - set_attribute(filespecs.filename,"GLOBAL",name,ekat::any_cast(any)); - } else if (any.isType()) { - set_attribute(filespecs.filename,"GLOBAL",name,ekat::any_cast(any)); - } else if (any.isType()) { - set_attribute(filespecs.filename,"GLOBAL",name,ekat::any_cast(any)); - } else if (any.isType()) { - set_attribute(filespecs.filename,"GLOBAL",name,ekat::any_cast(any)); - } else if (any.isType()) { - set_attribute(filespecs.filename,"GLOBAL",name,ekat::any_cast(any)); + if (any.type()==typeid(int)) { + set_attribute(filespecs.filename,"GLOBAL",name,std::any_cast(any)); + } else if (any.type()==typeid(std::int64_t)) { + set_attribute(filespecs.filename,"GLOBAL",name,std::any_cast(any)); + } else if (any.type()==typeid(float)) { + set_attribute(filespecs.filename,"GLOBAL",name,std::any_cast(any)); + } else if (any.type()==typeid(double)) { + set_attribute(filespecs.filename,"GLOBAL",name,std::any_cast(any)); + } else if (any.type()==typeid(std::string)) { + set_attribute(filespecs.filename,"GLOBAL",name,std::any_cast(any)); } else { EKAT_ERROR_MSG ( "Error! Invalid concrete type for IO global.\n" " - global name: " + it.first + "\n" - " - type id : " + any.content().type().name() + "\n"); + " - type id : " + std::string(any.type().name()) + "\n"); } } diff --git a/components/eamxx/src/share/io/eamxx_output_manager.hpp b/components/eamxx/src/share/io/eamxx_output_manager.hpp index 0e4732b4cb57..e5af1dec13ff 100644 --- a/components/eamxx/src/share/io/eamxx_output_manager.hpp +++ b/components/eamxx/src/share/io/eamxx_output_manager.hpp @@ -63,7 +63,7 @@ class OutputManager public: using fm_type = FieldManager; using gm_type = GridsManager; - using globals_map_t = std::map; + using globals_map_t = std::map; // Constructor(s) & Destructor OutputManager() = default; @@ -105,7 +105,7 @@ class OutputManager void set_logger(const std::shared_ptr& atm_logger) { m_atm_logger = atm_logger; } - void add_global (const std::string& name, const ekat::any& global); + void add_global (const std::string& name, const std::any& global); void init_timestep (const util::TimeStamp& start_of_step, const Real dt); void run (const util::TimeStamp& current_ts); From ec904f3d781756826e6e2d2f1516aef775d5d789 Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Thu, 22 May 2025 15:11:41 -0600 Subject: [PATCH 15/22] EAMxx: switch from ekat::enable_shared_from_this to the std version --- .../eamxx/src/dynamics/homme/homme_grids_manager.cpp | 2 -- .../src/share/atm_process/atmosphere_diagnostic.hpp | 4 +--- .../src/share/atm_process/atmosphere_process.hpp | 8 +++----- components/eamxx/src/share/field/field.cpp | 3 +-- components/eamxx/src/share/field/field_header.cpp | 12 ++++++------ components/eamxx/src/share/field/field_header.hpp | 9 --------- components/eamxx/src/share/field/field_tracking.hpp | 11 ----------- components/eamxx/src/share/grid/abstract_grid.hpp | 2 +- .../eamxx/src/share/grid/mesh_free_grids_manager.cpp | 1 - components/eamxx/src/share/grid/point_grid.cpp | 1 - .../eamxx/src/share/util/eamxx_family_tracking.hpp | 3 +-- 11 files changed, 13 insertions(+), 43 deletions(-) diff --git a/components/eamxx/src/dynamics/homme/homme_grids_manager.cpp b/components/eamxx/src/dynamics/homme/homme_grids_manager.cpp index 503c83ed7db5..05b498d52289 100644 --- a/components/eamxx/src/dynamics/homme/homme_grids_manager.cpp +++ b/components/eamxx/src/dynamics/homme/homme_grids_manager.cpp @@ -147,7 +147,6 @@ void HommeGridsManager::build_dynamics_grid () { const int nlev = get_nlev_f90(); auto dyn_grid = std::make_shared("dynamics",nlelem,HOMMEXX_NP,nlev,m_comm); - dyn_grid->setSelfPointer(dyn_grid); const auto layout2d = dyn_grid->get_2d_scalar_layout(); const Units rad (Units::nondimensional(),"rad"); @@ -215,7 +214,6 @@ build_physics_grid (const ci_string& type, const ci_string& rebalance) { const int nlcols = get_num_local_columns_f90 (pg_code % 10); auto phys_grid = std::make_shared(name,nlcols,nlev,m_comm); - phys_grid->setSelfPointer(phys_grid); // Create the gids, coords, area views using namespace ShortFieldTagsNames; diff --git a/components/eamxx/src/share/atm_process/atmosphere_diagnostic.hpp b/components/eamxx/src/share/atm_process/atmosphere_diagnostic.hpp index 718a0cbea44f..8e64c439dc0d 100644 --- a/components/eamxx/src/share/atm_process/atmosphere_diagnostic.hpp +++ b/components/eamxx/src/share/atm_process/atmosphere_diagnostic.hpp @@ -94,9 +94,7 @@ using AtmosphereDiagnosticFactory = template inline std::shared_ptr create_atmosphere_diagnostic (const ekat::Comm& comm, const ekat::ParameterList& p) { - auto ptr = std::make_shared(comm,p); - ptr->setSelfPointer(ptr); - return ptr; + return std::make_shared(comm,p); } } //namespace scream diff --git a/components/eamxx/src/share/atm_process/atmosphere_process.hpp b/components/eamxx/src/share/atm_process/atmosphere_process.hpp index db78b62e4f61..bbe05cd3d733 100644 --- a/components/eamxx/src/share/atm_process/atmosphere_process.hpp +++ b/components/eamxx/src/share/atm_process/atmosphere_process.hpp @@ -17,12 +17,12 @@ #include #include #include -#include #include #include #include #include +#include #include #include @@ -70,7 +70,7 @@ namespace scream * to override the get_internal_fields method. */ -class AtmosphereProcess : public ekat::enable_shared_from_this +class AtmosphereProcess : public std::enable_shared_from_this { public: using TimeStamp = util::TimeStamp; @@ -672,9 +672,7 @@ using AtmosphereProcessFactory = template inline std::shared_ptr create_atmosphere_process (const ekat::Comm& comm, const ekat::ParameterList& p) { - auto ptr = std::make_shared(comm,p); - ptr->setSelfPointer(ptr); - return ptr; + return std::make_shared(comm,p); } } // namespace scream diff --git a/components/eamxx/src/share/field/field.cpp b/components/eamxx/src/share/field/field.cpp index 4678e51de3f0..766603faa802 100644 --- a/components/eamxx/src/share/field/field.cpp +++ b/components/eamxx/src/share/field/field.cpp @@ -6,9 +6,8 @@ namespace scream Field:: Field (const identifier_type& id) - : m_header (create_header(id)) { - // Nothing to do here + m_header = std::make_shared(id); } Field diff --git a/components/eamxx/src/share/field/field_header.cpp b/components/eamxx/src/share/field/field_header.cpp index 8b78aaf03787..daf50ae52e21 100644 --- a/components/eamxx/src/share/field/field_header.cpp +++ b/components/eamxx/src/share/field/field_header.cpp @@ -6,8 +6,8 @@ namespace scream { FieldHeader::FieldHeader (const identifier_type& id) : m_identifier (id) - , m_tracking (create_tracking()) { + m_tracking = std::make_shared(); m_alloc_prop = std::make_shared(get_type_size(id.data_type())); m_extra_data = std::make_shared(); @@ -33,7 +33,7 @@ set_extra_data (const std::string& key, } std::shared_ptr FieldHeader::alias(const std::string& name) const { - auto fh = create_header(get_identifier().alias(name)); + auto fh = std::make_shared(get_identifier().alias(name)); if (get_parent() != nullptr) { // If we're aliasing, we MUST keep track of the parent fh->create_parent_child_link(get_parent()); @@ -76,11 +76,11 @@ create_subfield_header (const FieldIdentifier& id, "Error! Invalid pointer for parent header.\n"); // Create header, and set up parent/child - auto fh = create_header(id); + auto fh = std::make_shared(id); fh->create_parent_child_link(parent); // Create tracking, and set up parent/child - fh->m_tracking = create_tracking(); + fh->m_tracking = std::make_shared(); fh->m_tracking->create_parent_child_link(parent->get_tracking_ptr()); if (parent->get_tracking().get_time_stamp().is_valid()) { fh->m_tracking->update_time_stamp(parent->get_tracking().get_time_stamp()); @@ -104,11 +104,11 @@ create_subfield_header(const FieldIdentifier& id, "Error! Slice indices are invalid (non-increasing).\n"); // Create header, and set up parent/child - auto fh = create_header(id); + auto fh = std::make_shared(id); fh->create_parent_child_link(parent); // Create tracking, and set up parent/child - fh->m_tracking = create_tracking(); + fh->m_tracking = std::make_shared(); fh->m_tracking->create_parent_child_link(parent->get_tracking_ptr()); if (parent->get_tracking().get_time_stamp().is_valid()) { fh->m_tracking->update_time_stamp(parent->get_tracking().get_time_stamp()); diff --git a/components/eamxx/src/share/field/field_header.hpp b/components/eamxx/src/share/field/field_header.hpp index d1be722c4366..125b53f72704 100644 --- a/components/eamxx/src/share/field/field_header.hpp +++ b/components/eamxx/src/share/field/field_header.hpp @@ -161,15 +161,6 @@ has_extra_data (const std::string& key) const return m_extra_data->find(key)!=m_extra_data->end(); } -// Use this free function to exploit features of enable_from_this -template -inline std::shared_ptr -create_header(const Args&... args) { - auto ptr = std::make_shared(args...); - ptr->setSelfPointer(ptr); - return ptr; -} - // Use this free function to create a header for a field that // is the subfield of another field, that is, for something // that (in matlab syntax) looks like sf = f(:,1,:) diff --git a/components/eamxx/src/share/field/field_tracking.hpp b/components/eamxx/src/share/field/field_tracking.hpp index 4ab9ccf2efb4..8e9f3c1fb202 100644 --- a/components/eamxx/src/share/field/field_tracking.hpp +++ b/components/eamxx/src/share/field/field_tracking.hpp @@ -93,17 +93,6 @@ class FieldTracking : public FamilyTracking { std::set m_groups; }; -// Use this free function to exploit features of enable_shared_from_this, -// as well as features from FamilyTracking. -template -inline std::shared_ptr -create_tracking(const Args&... args) { - auto ptr = std::make_shared(args...); - ptr->setSelfPointer(ptr); - return ptr; -} - - } // namespace scream #endif // SCREAM_FIELD_TRACKING_HPP diff --git a/components/eamxx/src/share/grid/abstract_grid.hpp b/components/eamxx/src/share/grid/abstract_grid.hpp index 55650d5e8b3a..2250b7514b07 100644 --- a/components/eamxx/src/share/grid/abstract_grid.hpp +++ b/components/eamxx/src/share/grid/abstract_grid.hpp @@ -38,7 +38,7 @@ namespace scream * like spatial dimension or "physical" rank. */ -class AbstractGrid : public ekat::enable_shared_from_this +class AbstractGrid : public std::enable_shared_from_this { public: // TODO: use int64_t? int? template class on gid_type? diff --git a/components/eamxx/src/share/grid/mesh_free_grids_manager.cpp b/components/eamxx/src/share/grid/mesh_free_grids_manager.cpp index 69524ef0c98d..5fc6b179a97d 100644 --- a/components/eamxx/src/share/grid/mesh_free_grids_manager.cpp +++ b/components/eamxx/src/share/grid/mesh_free_grids_manager.cpp @@ -68,7 +68,6 @@ build_se_grid (const std::string& name, ekat::ParameterList& params) // Create the grid std::shared_ptr se_grid; se_grid = std::make_shared(name,num_local_elems,num_gp,num_vertical_levels,m_comm); - se_grid->setSelfPointer(se_grid); // Set up the degrees of freedom. auto dof_gids = se_grid->get_dofs_gids(); diff --git a/components/eamxx/src/share/grid/point_grid.cpp b/components/eamxx/src/share/grid/point_grid.cpp index de3c41312a06..14db5488937b 100644 --- a/components/eamxx/src/share/grid/point_grid.cpp +++ b/components/eamxx/src/share/grid/point_grid.cpp @@ -160,7 +160,6 @@ create_point_grid (const std::string& grid_name, } auto grid = std::make_shared(grid_name,num_my_cols,num_vertical_lev,comm); - grid->setSelfPointer(grid); auto dofs_gids = grid->get_dofs_gids(); auto h_dofs_gids = dofs_gids.get_view(); diff --git a/components/eamxx/src/share/util/eamxx_family_tracking.hpp b/components/eamxx/src/share/util/eamxx_family_tracking.hpp index 15d097fd32e0..719a0928d01e 100644 --- a/components/eamxx/src/share/util/eamxx_family_tracking.hpp +++ b/components/eamxx/src/share/util/eamxx_family_tracking.hpp @@ -1,7 +1,6 @@ #ifndef SCREAM_FAMILY_TRACKING_CLASS #define SCREAM_FAMILY_TRACKING_CLASS -#include #include #include @@ -38,7 +37,7 @@ namespace scream */ template -class FamilyTracking : public ekat::enable_shared_from_this +class FamilyTracking : public std::enable_shared_from_this { public: using derived_type = DerivedType; From 666ebf530aee4947d85e605a99aa5fec8d5a716c Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Thu, 22 May 2025 15:40:40 -0600 Subject: [PATCH 16/22] EAMxx: minor cleanup in homme dyn helpers --- .../eamxx/src/dynamics/homme/homme_dynamics_helpers.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/eamxx/src/dynamics/homme/homme_dynamics_helpers.hpp b/components/eamxx/src/dynamics/homme/homme_dynamics_helpers.hpp index 241cb02406f7..0603084678c1 100644 --- a/components/eamxx/src/dynamics/homme/homme_dynamics_helpers.hpp +++ b/components/eamxx/src/dynamics/homme/homme_dynamics_helpers.hpp @@ -36,14 +36,14 @@ struct HommeContextUser { Homme::Context::singleton().finalize_singleton(); } } - int get_counter () const { return counter; } + static HommeContextUser& singleton() { static HommeContextUser hcu; return hcu; } private: - HommeContextUser () : counter(0) {} - int counter; + HommeContextUser () = default; + int counter = 0; }; } // namespace scream From 4b34051594e60e15d920cf54f6a4268429806b1b Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Wed, 28 May 2025 14:06:10 -0600 Subject: [PATCH 17/22] EAMxx: fix mdlinter issue in docs --- components/eamxx/docs/developer/kokkos_ekat.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/eamxx/docs/developer/kokkos_ekat.md b/components/eamxx/docs/developer/kokkos_ekat.md index 078abcbbdfe1..cf9cbba18eab 100644 --- a/components/eamxx/docs/developer/kokkos_ekat.md +++ b/components/eamxx/docs/developer/kokkos_ekat.md @@ -57,8 +57,7 @@ where run-time dimensions). E.g., a 2D view of doubles will have `DataType = double**`. There is also an ability to define compile-time dimensions by using `[]`, see - [Kokkos wiki section on views] - ( Date: Thu, 29 May 2025 17:29:14 -0600 Subject: [PATCH 18/22] EAMxx: fix ekat config print --- components/eamxx/src/share/eamxx_config.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/eamxx/src/share/eamxx_config.cpp b/components/eamxx/src/share/eamxx_config.cpp index ef916fd230e7..0bc789ef0379 100644 --- a/components/eamxx/src/share/eamxx_config.cpp +++ b/components/eamxx/src/share/eamxx_config.cpp @@ -11,9 +11,8 @@ namespace scream { std::string eamxx_config_string() { std::string config = "\n-------- EKAT CONFIGS --------\n\n"; - config += ekat::active_avx_string (); - config += ekat::compiler_id_string (); - config += ekat::fpe_config_string (); + config += "Active AVX settings: " + ekat::active_avx_string () + "\n"; + config += "Compiler Id: " + ekat::compiler_id_string () + "\n"; config += ekat::kokkos_config_string(); config += "\n-------- SCREAM CONFIGS --------\n\n"; config += " sizeof(Real) = " + std::to_string(sizeof(Real)) + "\n"; From 197500dd92ebb9953b8b8b5ff910c369176c91e9 Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Mon, 21 Jul 2025 18:25:17 -0600 Subject: [PATCH 19/22] EAMxx: fix usage of std::any for restart data in atm procs --- components/eamxx/src/control/atmosphere_driver.cpp | 2 +- .../homme/eamxx_homme_process_interface.cpp | 9 ++++----- .../src/share/atm_process/atmosphere_process.hpp | 6 +++--- .../eamxx/src/share/io/eamxx_output_manager.cpp | 14 +++++++------- .../eamxx/src/share/io/eamxx_output_manager.hpp | 4 ++-- 5 files changed, 17 insertions(+), 18 deletions(-) diff --git a/components/eamxx/src/control/atmosphere_driver.cpp b/components/eamxx/src/control/atmosphere_driver.cpp index 4f6404de7751..5e0e19efba11 100644 --- a/components/eamxx/src/control/atmosphere_driver.cpp +++ b/components/eamxx/src/control/atmosphere_driver.cpp @@ -955,7 +955,7 @@ void AtmosphereDriver::restart_model () for (auto& it : m_atm_process_group->get_restart_extra_data()) { const auto& name = it.first; - auto& any = it.second; + auto& any = *it.second; if (any.type()==typeid(int)) { std::any_cast(any) = scorpio::get_attribute(filename,"GLOBAL",name); diff --git a/components/eamxx/src/dynamics/homme/eamxx_homme_process_interface.cpp b/components/eamxx/src/dynamics/homme/eamxx_homme_process_interface.cpp index 2a5e0a24e23b..37b176b89741 100644 --- a/components/eamxx/src/dynamics/homme/eamxx_homme_process_interface.cpp +++ b/components/eamxx/src/dynamics/homme/eamxx_homme_process_interface.cpp @@ -52,7 +52,7 @@ HommeDynamics::HommeDynamics (const ekat::Comm& comm, const ekat::ParameterList& // This class needs Homme's context, so register as a user HommeContextUser::singleton().add_user(); - m_restart_extra_data["homme_nsteps"] = std::make_any(-1); + m_restart_extra_data["homme_nsteps"] = std::make_shared(std::make_any(-1)); if (!is_parallel_inited_f90()) { // While we're here, we can init homme's parallel session @@ -505,8 +505,7 @@ void HommeDynamics::run_impl (const double dt) // Update nstep in the restart extra data, so it can be written to restart if needed. const auto& tl = c.get(); - auto& nstep = std::any_cast(m_restart_extra_data["homme_nsteps"]); - nstep = tl.nstep; + std::any_cast(*m_restart_extra_data["homme_nsteps"]) = tl.nstep; // Post process Homme's output, to produce what the rest of Atm expects Kokkos::fence(); @@ -940,7 +939,7 @@ void HommeDynamics::restart_homme_state () { auto& tl = c.get(); // For BFB restarts, set nstep counter in Homme's TimeLevel to match the restarted value. - const auto& nstep = std::any_cast(m_restart_extra_data["homme_nsteps"]); + const auto& nstep = std::any_cast(*m_restart_extra_data["homme_nsteps"]); tl.nstep = nstep; set_homme_param("num_steps",nstep); @@ -1119,7 +1118,7 @@ void HommeDynamics::initialize_homme_state () { const int n0 = tl.n0; const int n0_qdp = tl.n0_qdp; - std::any_cast(m_restart_extra_data["homme_nsteps"]) = tl.nstep; + std::any_cast(*m_restart_extra_data["homme_nsteps"]) = tl.nstep; const auto phis_dyn_view = m_helper_fields.at("phis_dyn").get_view(); const auto phi_int_view = m_helper_fields.at("phi_int_dyn").get_view(); diff --git a/components/eamxx/src/share/atm_process/atmosphere_process.hpp b/components/eamxx/src/share/atm_process/atmosphere_process.hpp index bbe05cd3d733..950b40667a73 100644 --- a/components/eamxx/src/share/atm_process/atmosphere_process.hpp +++ b/components/eamxx/src/share/atm_process/atmosphere_process.hpp @@ -266,8 +266,8 @@ class AtmosphereProcess : public std::enable_shared_from_this // - these maps are: data_name -> std::any // - the data_name is unique across the whole atm // The AD will take care of ensuring these are written/read to/from restart files. - const strmap_t& get_restart_extra_data () const { return m_restart_extra_data; } - strmap_t& get_restart_extra_data () { return m_restart_extra_data; } + const strmap_t>& get_restart_extra_data () const { return m_restart_extra_data; } + strmap_t>& get_restart_extra_data () { return m_restart_extra_data; } // Boolean that dictates whether or not the conservation checks are run for this process bool has_column_conservation_check () { return m_column_conservation_check_data.has_check; } @@ -506,7 +506,7 @@ class AtmosphereProcess : public std::enable_shared_from_this std::shared_ptr m_atm_logger; // Extra data needed for restart - strmap_t m_restart_extra_data; + strmap_t> m_restart_extra_data; // Use at your own risk. Motivation: Free up device memory for a field that is // no longer used, such as a field read in the ICs used only to initialize diff --git a/components/eamxx/src/share/io/eamxx_output_manager.cpp b/components/eamxx/src/share/io/eamxx_output_manager.cpp index d3b9f462f656..e043ea9e80fa 100644 --- a/components/eamxx/src/share/io/eamxx_output_manager.cpp +++ b/components/eamxx/src/share/io/eamxx_output_manager.cpp @@ -296,7 +296,7 @@ setup (const std::shared_ptr& field_mgr, } void OutputManager:: -add_global (const std::string& name, const std::any& global) { +add_global (const std::string& name, const std::shared_ptr& global) { EKAT_REQUIRE_MSG (m_globals.find(name)==m_globals.end(), "Error! Global attribute was already set in this output manager.\n" " - global att name: " + name + "\n"); @@ -540,17 +540,17 @@ void OutputManager::run(const util::TimeStamp& timestamp) // Write all stored globals for (const auto& it : m_globals) { const auto& name = it.first; - const auto& any = it.second; + const auto& any = *it.second; if (any.type()==typeid(int)) { - set_attribute(filespecs.filename,"GLOBAL",name,std::any_cast(any)); + set_attribute(filespecs.filename,"GLOBAL",name,std::any_cast(any)); } else if (any.type()==typeid(std::int64_t)) { - set_attribute(filespecs.filename,"GLOBAL",name,std::any_cast(any)); + set_attribute(filespecs.filename,"GLOBAL",name,std::any_cast(any)); } else if (any.type()==typeid(float)) { - set_attribute(filespecs.filename,"GLOBAL",name,std::any_cast(any)); + set_attribute(filespecs.filename,"GLOBAL",name,std::any_cast(any)); } else if (any.type()==typeid(double)) { - set_attribute(filespecs.filename,"GLOBAL",name,std::any_cast(any)); + set_attribute(filespecs.filename,"GLOBAL",name,std::any_cast(any)); } else if (any.type()==typeid(std::string)) { - set_attribute(filespecs.filename,"GLOBAL",name,std::any_cast(any)); + set_attribute(filespecs.filename,"GLOBAL",name,std::any_cast(any)); } else { EKAT_ERROR_MSG ( "Error! Invalid concrete type for IO global.\n" diff --git a/components/eamxx/src/share/io/eamxx_output_manager.hpp b/components/eamxx/src/share/io/eamxx_output_manager.hpp index e5af1dec13ff..b226caeccdf4 100644 --- a/components/eamxx/src/share/io/eamxx_output_manager.hpp +++ b/components/eamxx/src/share/io/eamxx_output_manager.hpp @@ -63,7 +63,7 @@ class OutputManager public: using fm_type = FieldManager; using gm_type = GridsManager; - using globals_map_t = std::map; + using globals_map_t = std::map>; // Constructor(s) & Destructor OutputManager() = default; @@ -105,7 +105,7 @@ class OutputManager void set_logger(const std::shared_ptr& atm_logger) { m_atm_logger = atm_logger; } - void add_global (const std::string& name, const std::any& global); + void add_global (const std::string& name, const std::shared_ptr& global); void init_timestep (const util::TimeStamp& start_of_step, const Real dt); void run (const util::TimeStamp& current_ts); From 9707168da366911954854f1fd1ccb9e7081f485b Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Tue, 29 Jul 2025 15:15:35 -0600 Subject: [PATCH 20/22] EAMxx: fix usage of ekat::device_to_host in shoc --- .../eamxx/src/physics/shoc/tests/infra/shoc_test_data.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/eamxx/src/physics/shoc/tests/infra/shoc_test_data.cpp b/components/eamxx/src/physics/shoc/tests/infra/shoc_test_data.cpp index 8daffe296da0..c823aaa15eca 100644 --- a/components/eamxx/src/physics/shoc/tests/infra/shoc_test_data.cpp +++ b/components/eamxx/src/physics/shoc/tests/infra/shoc_test_data.cpp @@ -2680,7 +2680,7 @@ void shoc_grid_host(Int shcol, Int nlev, Int nlevi, Real* zt_grid, Real* zi_grid // Sync back to host std::vector inout_views = {dz_zt_d, dz_zi_d, rho_zt_d}; - ekat::device_to_host({dz_zt, dz_zi, rho_zt}, {shcol, shcol, shcol}, {nlev, nlevi, nlev}, inout_views); + ekat::device_to_host({dz_zt, dz_zi, rho_zt}, std::vector{shcol, shcol, shcol}, std::vector{nlev, nlevi, nlev}, inout_views); } void eddy_diffusivities_host(Int nlev, Int shcol, bool shoc_1p5tke, Real* pblh, Real* zt_grid, Real* tabs, Real* shoc_mix, Real* sterm_zt, From 878c029b9754f5fe24e9b90e383c6301f2814447 Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Tue, 29 Jul 2025 15:52:29 -0600 Subject: [PATCH 21/22] EAMxx: set EKAT test options if EKAT_ENABLE_TESTS=ON Make sure we match settings of eamxx --- components/eamxx/CMakeLists.txt | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/components/eamxx/CMakeLists.txt b/components/eamxx/CMakeLists.txt index 17fd51db9273..abb31aab8940 100644 --- a/components/eamxx/CMakeLists.txt +++ b/components/eamxx/CMakeLists.txt @@ -514,12 +514,27 @@ if (DEFINED ENV{SCREAM_FAKE_ONLY}) else() # Enable all EKAT packages - set(EKAT_ENABLE_KOKKOS ON) - set(EKAT_ENABLE_PACK ON) - set(EKAT_ENABLE_ALGORITHM ON) - set(EKAT_ENABLE_LOGGING ON) - set(EKAT_ENABLE_YAML_PARSER ON) + set(EKAT_ENABLE_ALL_PACKAGES ON) set(EKAT_DISABLE_TPL_WARNINGS ON) + + # Disable tests by default (user can override via -D EKAT_ENABLE_TESTS=ON) + set (EKAT_ENABLE_TESTS OFF) + + # Ensure testing options are consistent with EAMxx settings (threads, ranks, packs, etc) + set (EKAT_TEST_MAX_THREADS ${SCREAM_TEST_MAX_THREADS} CACHE STRING "Max number of threads for tests") + set (EKAT_TEST_THREAD_INC ${SCREAM_TEST_THREAD_INC} CACHE STRING "Thread count increment for threaded tests") + set (EKAT_TEST_MAX_RANKS ${SCREAM_TEST_MAX_RANKS} CACHE STRING "Max number of ranks for tests") + set (EKAT_TEST_PACK_SIZE ${SCREAM_PACK_SIZE} CACHE STRING + " The number of scalars in a pack::Pack and Mask. Larger packs have good performance on conditional-free loops due to improved caching.") + + if (SCREAM_DOUBLE_PRECISION) + set (EKAT_TEST_SINGLE_PRECISION OFF) + set (EKAT_TEST_DOUBLE_PRECISION ON) + else() + set (EKAT_TEST_SINGLE_PRECISION ON) + set (EKAT_TEST_DOUBLE_PRECISION OFF) + endif() + add_subdirectory(${EKAT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/externals/ekat) endif() From 340ba08cf35cdb845c65329f179b78100d4f0de0 Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Fri, 1 Aug 2025 13:03:21 -0600 Subject: [PATCH 22/22] Update ekat to bring in hot fix --- externals/ekat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externals/ekat b/externals/ekat index 3278cd743c0a..e6130c563891 160000 --- a/externals/ekat +++ b/externals/ekat @@ -1 +1 @@ -Subproject commit 3278cd743c0a01f4bd94a310ec46884040225700 +Subproject commit e6130c563891fd8dc12461e983f8340ad7cd4747