diff options
author | 2020-10-02 23:15:32 +0200 | |
---|---|---|
committer | 2020-10-02 14:15:32 -0700 | |
commit | b8e6dbf8cedf3192604231a7ce80f20cd2d1fee5 (patch) | |
tree | 6a7bc95dcd0a043c87c91e85ee8505d6ed781e71 /Source/Particles/PhysicalParticleContainer.cpp | |
parent | 5d661dc137e078e0b94fa72b794bab487ecd5b43 (diff) | |
download | WarpX-b8e6dbf8cedf3192604231a7ce80f20cd2d1fee5.tar.gz WarpX-b8e6dbf8cedf3192604231a7ce80f20cd2d1fee5.tar.zst WarpX-b8e6dbf8cedf3192604231a7ce80f20cd2d1fee5.zip |
Split resampling TinyProfiler entry into 2 (#1390)
Diffstat (limited to 'Source/Particles/PhysicalParticleContainer.cpp')
-rw-r--r-- | Source/Particles/PhysicalParticleContainer.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 28e0ca703..107ac10bd 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -2000,8 +2000,20 @@ PhysicalParticleContainer::getIonizationFunc (const WarpXParIter& pti, void PhysicalParticleContainer::resample (const int timestep) { + // In heavily load imbalanced simulations, MPI processes with few particles will spend most of + // the time at the MPI synchronization in TotalNumberOfParticles(). Having two profiler entries + // here is thus useful to avoid confusing time spent waiting for other processes with time + // spent doing actual resampling. + WARPX_PROFILE_VAR_NS("MultiParticleContainer::doResampling::MPI_synchronization", + blp_resample_synchronization); + WARPX_PROFILE_VAR_NS("MultiParticleContainer::doResampling::ActualResampling", + blp_resample_actual); + + WARPX_PROFILE_VAR_START(blp_resample_synchronization); const amrex::Real global_numparts = TotalNumberOfParticles(); + WARPX_PROFILE_VAR_STOP(blp_resample_synchronization); + WARPX_PROFILE_VAR_START(blp_resample_actual); if (m_resampler.triggered(timestep, global_numparts)) { amrex::Print() << "Resampling " << species_name << ".\n"; @@ -2013,6 +2025,7 @@ void PhysicalParticleContainer::resample (const int timestep) } } } + WARPX_PROFILE_VAR_STOP(blp_resample_actual); } |