diff --git a/CMake/SetAmrexOptions.cmake b/CMake/SetAmrexOptions.cmake index 10725ebc..0f133e72 100644 --- a/CMake/SetAmrexOptions.cmake +++ b/CMake/SetAmrexOptions.cmake @@ -43,6 +43,6 @@ if(REMORA_ENABLE_HIP) set(AMReX_GPU_BACKEND HIP CACHE STRING "AMReX GPU type" FORCE) endif() -if(ERF_ENABLE_SYCL) +if(REMORA_ENABLE_SYCL) set(AMReX_GPU_BACKEND SYCL CACHE STRING "AMReX GPU type" FORCE) endif() diff --git a/Exec/Advection/prob.cpp b/Exec/Advection/prob.cpp index 5ee8961c..30d4848b 100644 --- a/Exec/Advection/prob.cpp +++ b/Exec/Advection/prob.cpp @@ -93,7 +93,9 @@ init_custom_prob( AMREX_ALWAYS_ASSERT(bx.length()[2] == khi+1); - ParallelFor(bx, [=, parms=parms] AMREX_GPU_DEVICE(int i, int j, int k) noexcept + auto T0 = m_solverChoice.T0; + auto S0 = m_solverChoice.S0; + ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { const auto prob_lo = geomdata.ProbLo(); const auto prob_hi = geomdata.ProbHi(); @@ -103,7 +105,7 @@ init_custom_prob( state(i, j, k, Temp_comp) = 1.; - state(i,j,k,Temp_comp)=m_solverChoice.T0; //+8.0*std::exp(z/50.0_rt); + state(i,j,k,Temp_comp)=T0; //+8.0*std::exp(z/50.0_rt); // Set scalar = 0 everywhere const Real xcent = 0.5*(prob_lo[0] + prob_hi[0]); @@ -116,7 +118,7 @@ init_custom_prob( const Real radsq = rad*rad; if (l_use_salt) { - state(i,j,k,Salt_comp)= m_solverChoice.S0; + state(i,j,k,Salt_comp)= S0; } state(i, j, k, Scalar_comp) = std::exp(-r2/(2.*radsq)); diff --git a/Exec/DoublyPeriodic/prob.cpp b/Exec/DoublyPeriodic/prob.cpp index d55fafc8..2cc31eff 100644 --- a/Exec/DoublyPeriodic/prob.cpp +++ b/Exec/DoublyPeriodic/prob.cpp @@ -129,7 +129,9 @@ init_custom_prob( AMREX_ALWAYS_ASSERT(bx.length()[2] == khi+1); - ParallelFor(bx, [=, parms=parms] AMREX_GPU_DEVICE(int i, int j, int k) noexcept + auto T0 = m_solverChoice.T0; + auto S0 = m_solverChoice.S0; + ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { const auto prob_lo = geomdata.ProbLo(); const auto prob_hi = geomdata.ProbHi(); @@ -139,9 +141,9 @@ init_custom_prob( state(i, j, k, Temp_comp) = 1.; - state(i,j,k,Temp_comp)=m_solverChoice.T0+8.0*std::exp(z/50.0_rt); + state(i,j,k,Temp_comp)=T0+8.0*std::exp(z/50.0_rt); if (l_use_salt) { - state(i,j,k,Salt_comp)=m_solverChoice.S0; + state(i,j,k,Salt_comp)=S0; } // Set scalar = 0 everywhere diff --git a/Exec/Seamount/prob.cpp b/Exec/Seamount/prob.cpp index 0dd18ab9..863a7603 100644 --- a/Exec/Seamount/prob.cpp +++ b/Exec/Seamount/prob.cpp @@ -100,7 +100,9 @@ init_custom_prob( AMREX_ALWAYS_ASSERT(bx.length()[2] == khi+1); - ParallelFor(bx, [=, parms=parms] AMREX_GPU_DEVICE(int i, int j, int k) noexcept + auto T0 = m_solverChoice.T0; + auto S0 = m_solverChoice.S0; + ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { // Geometry (note we must include these here to get the data on device) // const auto prob_lo = geomdata.ProbLo(); @@ -112,9 +114,9 @@ init_custom_prob( state(i, j, k, Temp_comp) = 1.; - state(i,j,k,Temp_comp)=m_solverChoice.T0+7.5_rt*std::exp(z/1000.0_rt); + state(i,j,k,Temp_comp)=T0+7.5_rt*std::exp(z/1000.0_rt); if (l_use_salt) { - state(i,j,k,Salt_comp)=m_solverChoice.S0; + state(i,j,k,Salt_comp)=S0; } // Set scalar = 0 everywhere