diff --git a/Src/Particle/AMReX_NeighborParticlesGPUImpl.H b/Src/Particle/AMReX_NeighborParticlesGPUImpl.H index b4e50bef7b8..ce0444ac44d 100644 --- a/Src/Particle/AMReX_NeighborParticlesGPUImpl.H +++ b/Src/Particle/AMReX_NeighborParticlesGPUImpl.H @@ -256,7 +256,7 @@ updateNeighborsGPU (bool boundary_neighbors_only) clearNeighbors(); - if (ParallelDescriptor::UseGpuAwareMpi()) { + if (this->use_comms_arena) { snd_buffer.setArena(The_Comms_Arena()); rcv_buffer.setArena(The_Comms_Arena()); } diff --git a/Src/Particle/AMReX_ParticleContainerBase.H b/Src/Particle/AMReX_ParticleContainerBase.H index 433890b1579..0f573b9d163 100644 --- a/Src/Particle/AMReX_ParticleContainerBase.H +++ b/Src/Particle/AMReX_ParticleContainerBase.H @@ -256,6 +256,7 @@ public: static AMREX_EXPORT bool do_tiling; static AMREX_EXPORT IntVect tile_size; static AMREX_EXPORT bool memEfficientSort; + static AMREX_EXPORT bool use_comms_arena; mutable AmrParticleLocator > m_particle_locator; protected: diff --git a/Src/Particle/AMReX_ParticleContainerBase.cpp b/Src/Particle/AMReX_ParticleContainerBase.cpp index 4f0ec83f4cb..b8bd739e43c 100644 --- a/Src/Particle/AMReX_ParticleContainerBase.cpp +++ b/Src/Particle/AMReX_ParticleContainerBase.cpp @@ -10,6 +10,7 @@ using namespace amrex; bool ParticleContainerBase::do_tiling = false; IntVect ParticleContainerBase::tile_size { AMREX_D_DECL(1024000,8,8) }; bool ParticleContainerBase::memEfficientSort = true; +bool ParticleContainerBase::use_comms_arena = false; void ParticleContainerBase::Define (const Geometry & geom, const DistributionMapping & dmap, diff --git a/Src/Particle/AMReX_ParticleContainerI.H b/Src/Particle/AMReX_ParticleContainerI.H index 3bd292973f3..9d749bb3b8f 100644 --- a/Src/Particle/AMReX_ParticleContainerI.H +++ b/Src/Particle/AMReX_ParticleContainerI.H @@ -63,6 +63,7 @@ ParticleContainer_impl > snd_buffer; amrex::PODVector > rcv_buffer; - if (ParallelDescriptor::UseGpuAwareMpi()) { + if (use_comms_arena) { snd_buffer.setArena(The_Comms_Arena()); rcv_buffer.setArena(The_Comms_Arena()); }