don't execute any mpi_info/mpiname in the path

During MPI setup, the gmxManageMPI.cmake script uses mpi_info/mpiname to
check for and warn about potentially problematic versions. However,
executing these binatries without any path can lead to false positive
warnings e.g. in case if the MPI installation in used does not provide
mpi_info, but another MPI installation's mpi_info is in the path
(which is the case with MacPorts OpenMPI + Xcode's MPI).

To avoid these false positives we don't execute any other
mpi_info/mpiname but the ones found at the same path where the MPI
compiler wrapper resides (if any).

Change-Id: Icd2091dd952f4a140b92045f95a8d0187c1a354f
Add option to install libcudart

New option INSTALL_CUDART_LIB installs libcudart and adds it to cpack archive.
Would be good to enable option by default for cpack but I can't find a
way to do so.

Change-Id: I1ce7fe84a9c2c2d9ef0ee0962b871db9fa065607
Merge "don't execute any mpi_info/mpiname in the path" into release-4-6
Clarification of mdp_opt, add nstexpand defaults & checks

Change-Id: If96973674ba9618256a6454d8f12a3d982ce00e2
Merge "Add option to install libcudart" into release-4-6
Merge "Clarification of mdp_opt, add nstexpand defaults & checks" into release-4-6
Fix cmake error if compiler starts with blank line

Change-Id: Id6579e4c7260fe9359ae43f9931662b29a17e7b9
detect externally set CPU affinity

Try to preserve externally set CPU affinity instead of silently
overriding it. If CPU affinity is set externally, e.g. by taskset or
some OpenMP library we don't check for, disable internal CPU affinity
and warn the user. This only works on Linux as it uses the sched.h CPU
set interface which is GNU feature.

Change-Id: Ie5f292fb1f29e07a3275429688c5d79398564979
auto-set nvcc host compiler with FindMPI detection

Distinguish between MPI build that use MPI compiler wrapper and FindMPI
as as in the latter case the CMAKE_C_COMPILER can be used safely as the
CUDA compiler's CPU backend.

Additional minor changes in cmake/gmxManageNvccConfig.cmake:
- added more detailed explanation on some strange things done in order
  to please nvcc;
- bumped icc gcc compatibility version to 4.5 with CUDA <=v4.1;
- added explanation on CUDA code generation;
- typos fixed.

Change-Id: Ia82bc63c129ac897ce88175f919b4f034e7ce665
Obey DSO standard

Compiling the template in recent fedora will lead to:
ld: note: 'sin@@GLIBC_2.2.5' is defined in DSO libm.so, so
try adding it to the linker command line
Hence we move -lm from Libs.private to Libs

Change-Id: I5e2c59bf62f950d06f3c708d22f6d2289babcacf
Infrastructure for new group kernels, and new C kernels

This patch implements a new selection mechanism for nonbonded
kernels, as well as modifications of the neighborsearching to allow
long-range lists to be used every step (for rlist!=rcoul!=rvdw),
which is necessary for PP-PME load balancing. We can also evaluate
long-range interactions at steps that are arbitrary divisors of
nstlist. Kernels are now selected from text strings describing
desired options, which makes it much easier to have different
kernels for different architectures and gradually add kernels for
commonly used cases without implementing all combinations of
features. There is also a new kernel generator and flexible
preprocessor written in python. This is only executed by developers,
and the generated kernels are therefor included in the git tree
after discussions. The actual kernels are now written in plain C
with slightly more advanced preprocessor options allowing loops. The
listed (1,4) nonbonded interactions now use their own code rather
than executing a complete kernel call for each pair, which saves
a lot of overhead. The old c kernels have been adapted to continue
working, but addres kernels are disabled by this patch. Subsequent
patches will start adding back the kernels (one per architecture),
and also the addres kernels. The group kernels now support arbitrary
combinations of switch and shift for most interactions (but the
might be run in the generic kernel), and there are new kernels
specifically designed for Ewald direct space interactions as well as
force-only kernels.

Change-Id: Iab142bcc2e6d914ca127b4caa6a07b604549cb13
Relocated logic of simple-vs-GPU Ewald table generation

I think this approach is cleaner than passing multiple arguments
down a call stack from pme_load_bal().

Change-Id: I45655312c5a9866e6fce73049e72acd70c184398
Allow rcoulomb=rlistlong for PME with nstcalclr=1

This patch allows mdp files to set a VdW cutoff shorter than the
coulomb cutoff, even when not using potential modifiers for PME.
While this might come in handy in some cases, it is also needed for
the new kernel tests.

Change-Id: I4bef433a47a685f4f839b12b473047057608354d
Fixed bug in the new switch-modified interactions in C kernels

Fixed an error in the switch application formula, and another
table-related bug for PME interactions using the switch modifier
just introduced when only forces were calculated. This will not
have affected any other code unless you dug in the source and
tested the new switch modifiers the last 12h.

Change-Id: Ie323f45f2ce60ff1aacc2cccd9b395826f39cdf8
Merge "Relocated logic of simple-vs-GPU Ewald table generation" into release-4-6
Merge "auto-set nvcc host compiler with FindMPI detection" into release-4-6
Merge "Fixed bug in the new switch-modified interactions in C kernels" into release-4-6
also preferentiate .lib with GMX_PREFER_STATIC_LIBS

On Mac OS X GMX_PREFER_STATIC_LIBS was enabled by caca171. On Mac OS X
.lib is also used as suffix for static archives (as well as .a), this
commits adds .lib to the preferred library suffixes.

Change-Id: I39e8df212355f6b199de4f93abd29275babdfe96
only use CPU_COUNT if it's available

The external affinity detection implemented by a6e1181 uses CPU_COUNT
from sched.h for a consistency check, but this macro is only available
with glibc 2.6 and later. Hence, a check for this macro was needed to
avoid issues with glibc <2.6

Change-Id: I6088972e9a5aabefb2b3fa3b38ac8d4ba32662f7
Merge "only use CPU_COUNT if it's available" into release-4-6