Detect incorrect cycle counting
commit4dd6716e2191896c0577608081414509e41ee07c
authorBerk Hess <hess@kth.se>
Mon, 14 Sep 2015 13:01:48 +0000 (14 15:01 +0200)
committerBerk Hess <hess@kth.se>
Tue, 15 Sep 2015 13:56:45 +0000 (15 15:56 +0200)
tree3350d1472abd4ecbaf07ca1db02d837c29cec094
parentf10f1081b44031b524129934202dc890671ba437
Detect incorrect cycle counting

When threads are not pinned to cores, the wallcycle counting can get
messed up on machines where the cycle counters are not synchronized
between the cores. Since it's difficult to detect thread pinning on
all architectures and without pinning the counting can be correct on
synchronized machines, we try to detect incorrect counters. We only
detect negative cycle counts, but that should catch nearly all cases.
When we deteced an invalid count, we ignore the cycles counted and do
not print the cycle accounting table. Dynamic load balancing is never
disabled, because a few incorrect load measurements do not cause
problems here.

Fixes #1821

Change-Id: I076ad685a043f1f0b913a9b089ebea43a62534f5
src/gromacs/domdec/domdec.cpp
src/gromacs/timing/wallcycle.c