Skip to content

Commit

Permalink
silence some warnings that only happen on GPUs
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Jul 6, 2023
1 parent 939f998 commit 61261c0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/driver/Castro.H
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,8 @@ public:
///
bool oversubscribing() { // NOLINT(readability-convert-member-functions-to-static)
#ifdef AMREX_USE_GPU
return (amrex::MultiFab::queryMemUsage("AmrLevel_Level_" + std::to_string(level)) >= amrex::Gpu::Device::totalGlobalMem());
return (amrex::MultiFab::queryMemUsage("AmrLevel_Level_" + std::to_string(level)) >=
static_cast<decltype(amrex::MultiFab::queryMemUsage)>(amrex::Gpu::Device::totalGlobalMem()));
#else
return false;
#endif
Expand Down
2 changes: 2 additions & 0 deletions Source/hydro/advection_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,8 @@ Castro::do_enforce_minimum_density(const Box& bx,
GeometryData geomdata = geom.data();
#endif

amrex::ignore_unused(verbose);

amrex::ParallelFor(bx,
[=] AMREX_GPU_HOST_DEVICE (int i, int j, int k)
{
Expand Down
2 changes: 2 additions & 0 deletions Source/hydro/trace_ppm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ Castro::trace_ppm(const Box& bx,
Real hdt = 0.5_rt * dt;
Real dtdx = dt / dx[idir];

#ifndef AMREX_USE_GPU
auto lo = bx.loVect3d();
auto hi = bx.hiVect3d();
#endif

auto vlo = vbx.loVect3d();
auto vhi = vbx.hiVect3d();
Expand Down

0 comments on commit 61261c0

Please sign in to comment.