Closed GiovanniBussi closed 4 months ago
Attention: Patch coverage is 82.70677%
with 23 lines
in your changes are missing coverage. Please review.
Project coverage is 84.16%. Comparing base (
93c5969
) to head (fbef9de
).:exclamation: Current head fbef9de differs from pull request most recent head b45b0ae. Consider uploading reports for the commit b45b0ae to get more accurate results
Files | Patch % | Lines |
---|---|---|
src/tools/Grid.cpp | 80.99% | 23 Missing :warning: |
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I extensively optimized the Grid code. Specifically:
std::array
with sizemaxdim
rather thanstd::vector
, and rewriting overloads for some functions so that it is possible to pass a pair(pointer,size)
. In this way I can use them to act on vectors or arrays without other changes. I guess most of this code could be simplified using something similar to C++20span
to do the conversion, without replicating all functions.small_vector
. This is the number of neighbors (2^dim
), which might be too large to fit in stack. The code will automatically place it on heap whendim>4
template<unsigned dimension_> class Accelerator
). The code is a bit messy and probably I need to add more documentation.I want to go back and revise the code before mering. Meanwhile I post the results that I could obtain on my INTEL macbook.
Test 1 - update
The first test is representative of cases where the PACE is relatively low, so that the cost is mostly in adding new Gaussians. Here I get a significant speedup (more than 50%). I see a significant speedup also in using
sum_hills
on a large file (not shown). I expect this to also help when restarting simulations with many Gaussians. The speedup is mostly in theUpdate
phase, but from the timings it can be seen that alsoCalculating
is faster.Command:
plumed.dat:
Results:
Test 2 - calculate
The second test is representative of cases where the PACE is larger so that the cost is mostly in evaluating the potential. Here the speedup is limited but measurable, and is in the
Calculating
phase.Command
plumed.dat:
Results: