From 6f794f2fa7ac618a2dff77a573f973946809bab9 Mon Sep 17 00:00:00 2001 From: "Aaron M. Lattanzi" <103702284+AMLattanzi@users.noreply.github.com> Date: Fri, 7 Jun 2024 11:11:53 -0700 Subject: [PATCH] Release 24.06 and add Weiqun's code for de-fusing kernels in the advection wrapper. (#1637) --- CHANGES | 9 +++++++++ Source/Advection/AdvectionSrcForMom_N.H | 10 +++++++--- Source/Advection/AdvectionSrcForMom_T.H | 10 +++++++--- Submodules/AMReX | 2 +- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index 37eba0439..e6d10a2fd 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,12 @@ +# 24.05 + -- AMReX submodule set to 24.06 release hash (f141191) + + -- SAM microphysics corrections (#1634/#1629) + + -- Open boundaries with viscous terms (#1615) + + -- Incompressible pathway (#1612/#1613) + # 24.05 -- AMReX submodule set to 24.05 release hash (76d09f5) diff --git a/Source/Advection/AdvectionSrcForMom_N.H b/Source/Advection/AdvectionSrcForMom_N.H index b359f6777..e188e6d28 100644 --- a/Source/Advection/AdvectionSrcForMom_N.H +++ b/Source/Advection/AdvectionSrcForMom_N.H @@ -303,21 +303,25 @@ AdvectionSrcForMomWrapper_N (const amrex::Box& bxx, const amrex::Box& bxy, const InterpType_H interp_w_h(w); InterpType_V interp_w_v(w); // Z-MOM WallInterpType interp_w_wall(w); // Z-MOM @ wall - amrex::ParallelFor(bxx, bxy, bxz, + amrex::ParallelFor(bxx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept { rho_u_rhs(i, j, k) = -AdvectionSrcForXMom_N(i, j, k, rho_u, rho_v, rho_w, interp_u_h, interp_u_v, upw_frac_h, upw_frac_v, cellSizeInv, mf_u_inv, mf_v_inv); - }, + }); + + amrex::ParallelFor(bxy, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept { rho_v_rhs(i, j, k) = -AdvectionSrcForYMom_N(i, j, k, rho_u, rho_v, rho_w, interp_v_h, interp_v_v, upw_frac_h, upw_frac_v, cellSizeInv, mf_u_inv, mf_v_inv); - }, + }); + + amrex::ParallelFor(bxz, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept { rho_w_rhs(i, j, k) = -AdvectionSrcForZMom_N(i, j, k, rho_u, rho_v, rho_w, w, diff --git a/Source/Advection/AdvectionSrcForMom_T.H b/Source/Advection/AdvectionSrcForMom_T.H index 2ad130984..1ebd2efef 100644 --- a/Source/Advection/AdvectionSrcForMom_T.H +++ b/Source/Advection/AdvectionSrcForMom_T.H @@ -380,21 +380,25 @@ AdvectionSrcForMomWrapper (const amrex::Box& bxx, const amrex::Box& bxy, const a InterpType_H interp_w_h(w); InterpType_V interp_w_v(w); // Z-MOM WallInterpType interp_w_wall(w); // Z-MOM @ wall - amrex::ParallelFor(bxx, bxy, bxz, + amrex::ParallelFor(bxx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept { rho_u_rhs(i, j, k) = -AdvectionSrcForXMom(i, j, k, rho_u, rho_v, Omega, z_nd, ax, ay, az, detJ, interp_u_h, interp_u_v, upw_frac_h, upw_frac_v, cellSizeInv, mf_u_inv, mf_v_inv); - }, + }); + + amrex::ParallelFor(bxy, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept { rho_v_rhs(i, j, k) = -AdvectionSrcForYMom(i, j, k, rho_u, rho_v, Omega, z_nd, ax, ay, az, detJ, interp_v_h, interp_v_v, upw_frac_h, upw_frac_v, cellSizeInv, mf_u_inv, mf_v_inv); - }, + }); + + amrex::ParallelFor(bxz, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept { rho_w_rhs(i, j, k) = -AdvectionSrcForZMom(i, j, k, rho_u, rho_v, Omega, w, z_nd, ax, ay, az, detJ, diff --git a/Submodules/AMReX b/Submodules/AMReX index af6e77226..f141191fc 160000 --- a/Submodules/AMReX +++ b/Submodules/AMReX @@ -1 +1 @@ -Subproject commit af6e77226cdb1668a8936ee3b35cf0d441409869 +Subproject commit f141191fc73cb22ee649f89569c1778fc910d1fb