Bug #2274
Mega - Flops accounting
Description
In the .log file there is a section called Mega-Flops accounting.
Here the "NB VdW [V&F]" counts also the polarization interactions (core-shell model) even though it should not.
Even for 0 steps and niter = 0 it counts 1 polarization interaction per particle in the system.
The error seems to be in the ifunc.cpp file, where a zero is hard-coded (zero is assigned via enum to "NB VdW [V&F]").
This way the number of polarization interactions ends up in the category of "NB VdW [V&F]".
Associated revisions
History
#1 Updated by Mark Abraham about 2 years ago
I'm not sure if we have a relevant category to which accumulate? David or Justin, do you happen to know?
#2 Updated by David van der Spoel about 2 years ago
The relevant field in ifunc.cpp is 0 for F_POLARIZE and F_ANHARM_POL, this is used to index the nrnb struct. I can make a fix, but what branch should it be in? This is not crucial so maybe just in master?
#3 Updated by Mark Abraham about 2 years ago
David van der Spoel wrote:
The relevant field in ifunc.cpp is 0 for F_POLARIZE and F_ANHARM_POL, this is used to index the nrnb struct. I can make a fix, but what branch should it be in? This is not crucial so maybe just in master?
Indeed, not critical. release-2016 is still open for fixes for anything, but master is fine too
#4 Updated by David van der Spoel about 2 years ago
While we're at it, I found this mathematics with indices into an enum in mdlib/sim_util.cpp:
inc_nrnb(nrnb, enr_nbnxn_kernel_ljc-eNR_NBNXN_LJ_RF+eNR_NBNXN_RF,
inc_nrnb(nrnb, eNR_NBNXN_ADD_LJ_FSW+((flags & GMX_FORCE_ENERGY) ? 1 : 0),
inc_nrnb(nrnb, eNR_NBNXN_ADD_LJ_PSW+((flags & GMX_FORCE_ENERGY) ? 1 : 0),
inc_nrnb(nrnb, eNR_NBNXN_ADD_LJ_EWALD+((flags & GMX_FORCE_ENERGY) ? 1 : 0),
especially the top one is interesting :)
#5 Updated by David van der Spoel about 2 years ago
There are already eNRNB terms for eNR_POLARIZE and eNR_ANHARM_POL.
eNR_UREY_BRADLEY, eNR_CROSS_BOND_BOND, eNR_CROSS_BOND_ANGLE are missing too.
#6 Updated by Gerrit Code Review Bot about 2 years ago
Gerrit received a related patchset '1' for Issue #2274.
Uploader: David van der Spoel (davidvanderspoel@gmail.com)
Change-Id: gromacs~release-2016~Ic0b05d30eb5fdfeb7f3e822b42ec7ca4cda58bc5
Gerrit URL: https://gerrit.gromacs.org/7049
#7 Updated by David van der Spoel about 2 years ago
- Status changed from New to Resolved
Applied in changeset bd8f4371d44e61849405a1262502b57c11cb5d3a.
#8 Updated by Szilárd Páll about 2 years ago
- Assignee set to David van der Spoel
- Target version set to 2016.5
#9 Updated by Erik Lindahl almost 2 years ago
- Status changed from Resolved to Closed
Fixed missing entries in nrnb arrays.
Some nrnb index entries were missing in the interaction_function
array, others were zero leading to that the wrong megaflops
accounting was printed.
Fixes #2274
Change-Id: Ic0b05d30eb5fdfeb7f3e822b42ec7ca4cda58bc5