diff options
author | 2023-05-05 15:48:05 -0700 | |
---|---|---|
committer | 2023-05-05 15:48:05 -0700 | |
commit | b1ad3c03ffce1dbfdfb38fd4709fb0f63bc9ec8b (patch) | |
tree | 800df07910fe4d4102ce4a4a215c66dc959347f8 /Source/Utils/Interpolate.cpp | |
parent | b590b2051c17f34ec735c1e4b8df3cddd0936ae5 (diff) | |
download | WarpX-b1ad3c03ffce1dbfdfb38fd4709fb0f63bc9ec8b.tar.gz WarpX-b1ad3c03ffce1dbfdfb38fd4709fb0f63bc9ec8b.tar.zst WarpX-b1ad3c03ffce1dbfdfb38fd4709fb0f63bc9ec8b.zip |
More Managed Memory Fixes: Diagnostics (#3899)
* Interpolate on GPU
* another fix in Diagnostics
Diffstat (limited to '')
-rw-r--r-- | Source/Utils/Interpolate.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Utils/Interpolate.cpp b/Source/Utils/Interpolate.cpp index 3483284ec..9d20e7485 100644 --- a/Source/Utils/Interpolate.cpp +++ b/Source/Utils/Interpolate.cpp @@ -51,14 +51,15 @@ namespace Interpolate if ( F_fp.is_nodal() ){ amrex::IntVect refinement_vector{AMREX_D_DECL(r_ratio[0], r_ratio[1], r_ratio[2])}; node_bilinear_interp.interp(cfab, 0, ffab, 0, 1, - finebx, refinement_vector, {}, {}, {}, 0, 0, RunOn::Cpu); + finebx, refinement_vector, {}, {}, {}, 0, 0, RunOn::Device); } else { amrex::Abort("Unknown field staggering."); } // Add temporary array to the returned structure const Box& bx = (*interpolated_F)[mfi].box(); - (*interpolated_F)[mfi].plus<RunOn::Host>(ffab, bx, bx, 0, 0, 1); + (*interpolated_F)[mfi].plus<RunOn::Device>(ffab, bx, bx, 0, 0, 1); + amrex::Gpu::streamSynchronize(); } } return interpolated_F; |