fixed incorrect 1-4 energies with OpenMP + energy groups
authorBerk Hess <hess@kth.se>
Thu, 15 Nov 2012 10:19:18 +0000 (11:19 +0100)
committerBerk Hess <hess@kth.se>
Thu, 15 Nov 2012 10:19:18 +0000 (11:19 +0100)
commit4bacf5071c211561f70e774e3cae5c62e564b441
treeefb2de3de1490146ccf64809ecf44b41b6f25c2b
parenteb9df725e57e2db39f2593416c44ea05e55bbf24
fixed incorrect 1-4 energies with OpenMP + energy groups

The OpenMP bonded thread data structure allocated too few energy group
elements with more than 1 energy group. This would lead to incorrect
1-4 interaction energies when atoms beyond the first energy group
were involved in 1-4 interactions (but sampling itself was correct).
Potentially this could also lead to memory corruption.
All this could only happen with more than 1 OpenMP thread.

Change-Id: Ib6b91862eaaddaafc0c609961219e01c7be0f9eb
src/mdlib/forcerec.c