From 540deb985881c8f2e4a711194c3d022fd08ae671 Mon Sep 17 00:00:00 2001 From: forrestglines Date: Mon, 24 Jul 2023 09:04:01 -0600 Subject: [PATCH] Workaround for CUDA <=11.6 in first order flux corrections (#77) * Workaround for CUDA 11.6 in first order flux corrections * cpp-py-formatter --------- Co-authored-by: Forrest Glines Co-authored-by: par-hermes --- src/hydro/hydro.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/hydro/hydro.cpp b/src/hydro/hydro.cpp index 40cdd27b..ba903089 100644 --- a/src/hydro/hydro.cpp +++ b/src/hydro/hydro.cpp @@ -961,7 +961,13 @@ TaskStatus CalculateFluxes(std::shared_ptr> &md) { // (multiple calls) versus extra memory usage is. template TaskStatus FirstOrderFluxCorrect(MeshData *u0_data, MeshData *u1_data, - const Real gam0, const Real gam1, const Real beta_dt) { + const Real gam0_, const Real gam1_, + const Real beta_dt_) { + // Work around for CUDA <=11.6 + const Real gam0 = gam0_; + const Real gam1 = gam1_; + const Real beta_dt = beta_dt_; + auto pmb = u0_data->GetBlockData(0)->GetBlockPointer(); IndexRange ib = pmb->cellbounds.GetBoundsI(IndexDomain::interior); IndexRange jb = pmb->cellbounds.GetBoundsJ(IndexDomain::interior);