Skip to content

Commit

Permalink
Correct MaxMax initialization. (#1506)
Browse files Browse the repository at this point in the history
  • Loading branch information
AMLattanzi authored Mar 18, 2024
1 parent adf6d2c commit 057fe5f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Source/Initialization/ERF_init_from_wrfinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,11 +483,8 @@ verify_terrain_top_boundary (const Real& z_top,
{
int nboxes = NC_PH_fab.size();
for (int idx = 0; idx < nboxes; idx++) {
Gpu::HostVector <Real> MaxMax_h(2);
Gpu::DeviceVector<Real> MaxMax_d;
MaxMax_d.resize(2);
MaxMax_h.push_back(-1.0e16);
MaxMax_h.push_back(-1.0e16);
Gpu::HostVector <Real> MaxMax_h(2,-1.0e16);
Gpu::DeviceVector<Real> MaxMax_d(2);
#ifdef AMREX_USE_GPU
Gpu::htod_memcpy_async(MaxMax_d.data(), MaxMax_h.data(), sizeof(Real)*2);
#else
Expand Down

0 comments on commit 057fe5f

Please sign in to comment.