Commit 66162ee
authored
Make sure we geometrically grow the capacity of the particle buffers (#6260)
This makes a significant performance difference on a problem setup
@aeriforme gave me. In this simulation, many particles leave the domain
and we need to store them all for analysis.
On development:
```
TinyProfiler total time across processes [min...avg...max]: 4246 ... 4246 ... 4246
-------------------------------------------------------------------------------------------------------------
Name NCalls Excl. Min Excl. Avg Excl. Max Max %
-------------------------------------------------------------------------------------------------------------
ParticleBoundaryBuffer::gatherParticles::resize 8772 3843 3843 3843 90.49%
WarpXOpenPMDPlot::SeriesFlush()() 96 89.46 89.46 89.46 2.11%
ParticleBoundaryBuffer::gatherParticles 256 58.11 58.11 58.11 1.37%
ParticleContainer::addParticles 48 53.54 53.54 53.54 1.26%
ParticleBoundaryBuffer::gatherParticles::filterAndTransform 8772 27.26 27.26 27.26 0.64%
```
This PR:
```
TinyProfiler total time across processes [min...avg...max]: 494.6 ... 494.6 ... 494.6
-------------------------------------------------------------------------------------------------------------
Name NCalls Excl. Min Excl. Avg Excl. Max Max %
-------------------------------------------------------------------------------------------------------------
ParticleBoundaryBuffer::gatherParticles::resize 8754 126.3 126.3 126.3 25.53%
WarpXOpenPMDPlot::SeriesFlush()() 96 90.3 90.3 90.3 18.26%
ParticleContainer::addParticles 48 59.01 59.01 59.01 11.93%
FFT::R2C::forward(in) 1934 27.05 27.05 27.05 5.47%
ParticleBoundaryBuffer::gatherParticles::filterAndTransform 8754 26.8 26.8 26.8 5.42%
```1 parent d9453b5 commit 66162ee
File tree
2 files changed
+16
-4
lines changed- Source/Particles
2 files changed
+16
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
462 | | - | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
463 | 469 | | |
464 | 470 | | |
465 | 471 | | |
| |||
563 | 569 | | |
564 | 570 | | |
565 | 571 | | |
566 | | - | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
567 | 579 | | |
568 | 580 | | |
569 | 581 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
0 commit comments