avoid mdrun crash when rdtscp is not supported
authorMark Abraham <mark.j.abraham@gmail.com>
Fri, 31 Jan 2014 14:06:20 +0000 (15:06 +0100)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Thu, 20 Feb 2014 17:38:11 +0000 (18:38 +0100)
commita997205edbf8b550904d1c6e9a0fbb2af7727067
tree26b0978eca861b21294fe2ff83012ff150745d1b
parentdd2f13a0570ba46b9126ae14a7088ffb7da6990e
avoid mdrun crash when rdtscp is not supported

When using rdtscp, mdrun now detects at runtime whether the CPU supports
this instruction and if this is not the case, it issues a fatal error
and instructs the user to recompile mdrun for the compute host. Note
that this will happen rarely, only when cross-compiling from a newer
host for a rather old one.

Additionally, when the user manually picks AVX, we also turn on RDTSCP
as all AVX-capable CPUs support it.

Also made CMake advanced cache option for GMX_USE_RDTSCP. This replaces
the previously hidden GMX_DISTRIBUTABLE_BUILD option.

Fixes #1428

Change-Id: I8bc884ef9ea8ea4661626b60490182ae2b302648
CMakeLists.txt
src/gmxlib/gmx_detect_hardware.c