Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Src/Particle/AMReX_NeighborParticles.H
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ protected:
ParticleCopyPlan neighbor_copy_plan;

amrex::PODVector<char, PolymorphicArenaAllocator<char> > snd_buffer;
amrex::Gpu::DeviceVector<char> rcv_buffer;
amrex::PODVector<char, PolymorphicArenaAllocator<char> > rcv_buffer;

Gpu::PinnedVector<char> pinned_snd_buffer;
Gpu::PinnedVector<char> pinned_rcv_buffer;
Expand Down
4 changes: 4 additions & 0 deletions Src/Particle/AMReX_NeighborParticlesGPUImpl.H
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@ updateNeighborsGPU (bool boundary_neighbors_only)
}

clearNeighbors();

snd_buffer.setArena(The_Comms_Arena());
rcv_buffer.setArena(The_Comms_Arena());

packBuffer(*this, neighbor_copy_op, neighbor_copy_plan, snd_buffer);
if (ParallelDescriptor::UseGpuAwareMpi())
{
Expand Down
4 changes: 3 additions & 1 deletion Src/Particle/AMReX_ParticleContainerI.H
Original file line number Diff line number Diff line change
Expand Up @@ -1355,7 +1355,9 @@ ParticleContainer_impl<ParticleType, NArrayReal, NArrayInt, Allocator, CellAssig
h_redistribute_real_comp, local);

amrex::PODVector<char, PolymorphicArenaAllocator<char> > snd_buffer;
Gpu::DeviceVector<char> rcv_buffer;
amrex::PODVector<char, PolymorphicArenaAllocator<char> > rcv_buffer;
snd_buffer.setArena(The_Comms_Arena());
rcv_buffer.setArena(The_Comms_Arena());

packBuffer(*this, op, plan, snd_buffer);

Expand Down