Skip to content

Commit

Permalink
Use The_Comms_Arena in particle communication.
Browse files Browse the repository at this point in the history
  • Loading branch information
atmyers committed Sep 30, 2024
1 parent 08eed95 commit b10711d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
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

0 comments on commit b10711d

Please sign in to comment.