Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: do_non_bonded, capture by reference rather than value #3161

Merged
merged 1 commit into from
Sep 12, 2019

Conversation

RudolfWeeber
Copy link
Contributor

This fixes a performance regression from #3077, I think.
Time per step fro lj benchmark went down from 0.78 to 0.38 ms

@fweik
Copy link
Contributor

fweik commented Sep 12, 2019

@RudolfWeeber was this in a debug built?

@codecov
Copy link

codecov bot commented Sep 12, 2019

Codecov Report

Merging #3161 into python will decrease coverage by <1%.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           python   #3161   +/-   ##
======================================
- Coverage      85%     85%   -1%     
======================================
  Files         526     526           
  Lines       25994   25946   -48     
======================================
- Hits        22118   22066   -52     
- Misses       3876    3880    +4
Impacted Files Coverage Δ
src/core/particle_data.hpp 97% <100%> (ø) ⬆️
src/core/global.cpp 74% <0%> (-7%) ⬇️
...rc/core/electrostatics_magnetostatics/scafacos.cpp 64% <0%> (-6%) ⬇️
src/core/electrostatics_magnetostatics/dipole.cpp 58% <0%> (-6%) ⬇️
src/core/object-in-fluid/oif_global_forces.cpp 80% <0%> (-1%) ⬇️
src/core/grid_based_algorithms/lb.cpp 95% <0%> (-1%) ⬇️
...rc/utils/include/utils/math/triangle_functions.hpp 90% <0%> (-1%) ⬇️
src/core/electrostatics_magnetostatics/p3m.cpp 86% <0%> (-1%) ⬇️
src/core/object-in-fluid/affinity.hpp 0% <0%> (ø) ⬆️
src/core/nonbonded_interactions/gay_berne.cpp 100% <0%> (ø) ⬆️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6b3c8ca...f4f8460. Read the comment docs.

@jngrad
Copy link
Member

jngrad commented Sep 12, 2019

bors r+

bors bot added a commit that referenced this pull request Sep 12, 2019
3155: Fix regressions found by exotic archs r=KaiSzuttor a=jngrad

Part of the [release checklist](https://github.com/espressomd/espresso/wiki/release-checklist#for-all-releases): run tests on exotic architectures and intel compiler.

3161: Core: do_non_bonded, capture by reference rather than value r=jngrad a=RudolfWeeber

This fixes a performance regression from #3077, I think.
Time per step fro lj benchmark went down from 0.78 to 0.38 ms

3162: Cleanup LB global variables r=KaiSzuttor a=jngrad

Follow-up to #2628

Description of changes:
- removed unused global variables in LB code
- cleaned up documentation

Co-authored-by: Jean-Noël Grad <[email protected]>
Co-authored-by: Rudolf Weeber <[email protected]>
@RudolfWeeber
Copy link
Contributor Author

RudolfWeeber commented Sep 12, 2019 via email

@fweik
Copy link
Contributor

fweik commented Sep 12, 2019

Yes, because Particle only has compiler generated special members, so I'd expect it to figure out that the copy does not have side effects...

@fweik
Copy link
Contributor

fweik commented Sep 12, 2019

Btw this should only capture the id, not the whole particle. This would also have avoided the regression...

 std::none_of(p1.el.begin(), p1.el.end(),
                      [id2 = p2.p.identity](int id) { return id2 == id; });

@bors
Copy link
Contributor

bors bot commented Sep 12, 2019

Build succeeded

@bors bors bot merged commit f4f8460 into espressomd:python Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants