Use sysconf(_SC_NPROCESSORS_ONLN)
authorBerk Hess <hess@kth.se>
Wed, 15 Jun 2016 21:38:47 +0000 (23:38 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Mon, 27 Jun 2016 16:00:45 +0000 (18:00 +0200)
commitf16daabd1d8d85ceb11d1b34f7b658664a9cd739
treeb6802799ad97c9cf360bf489cdab5af26d297a2e
parente65c43da16aac8411a27ac1952d1e035c2a095ad
Use sysconf(_SC_NPROCESSORS_ONLN)

If we're not on ARM and sysconf(_SC_NPROCESSORS_ONLN) doesn't match
sysconf(_SC_NPROCESSORS_CONF), we should use the former, as that is
what the correct count on x86 with hyperthreading disabled in the kernel.

Added some comments on assumptions and future possible problems.

Fixes #1991.

Change-Id: Id851b8acfbd6b9a2837e8c0e4340b2267a35a20a
src/gromacs/gmxlib/gmx_detect_hardware.cpp