Rename GMX_IS_* to GMX_TARGET_*

This addresses some confusion that developed between release-4-6 and
master with me trying to develop the kernels in master branch so I
could have unit testing support, and then cherry-pick them back.  I
had intended to solve #1269 in a separate commit, but it didn't happen
that way.

As #1269 discusses, the code sometimes needs to know what architecture
is being targetted by the compiler. This information is held in the
GMX_TARGET_X86 and GMX_TARGET_BGQ CMake and preprocessor
variables. Note that this information is distinct from what CPU
acceleration is being used (which might be "None" on either platform).

gmx_cpuid.c needs GMX_TARGET_X86 defined to work correctly on x86, and
is called at configure time (at which time config.h is
unavailable). So, this in CMake is treated via a command-line
definition of GMX_TARGET_X86 when required.

Fixes #1269 (even though I98c5791ec silently did this already)

Change-Id: I94e0756856e7d49ff09a87b8283189976b48ea49
reorganized GPU detection and selection

The GPU selection has been separated from the GPU detection
and now happens after the thread-MPI threads are started.
The GPU user/auto-selected options have been removed from
gmx_hw_info_t, such that it only contains hardware info
and can be passed around as const.
As both the CPU and GPU options structs are now tMPI rank local,
tMPI thread concurrency issues are avoided.
Fixes #1334 #1359

The GPU detection is now skipped with mdrun -nb cpu
CPU acceleration binary/hardware mismatch is now only printed once
to stderr (instead of #MPI-rank times to stdout).
Removed the master_inf_t struct.

Change-Id: If497f611b911808f6d01ca83f41ae288061dd361
removed (harmless) left-over in nbnxn SIMD kernels

This improves performance of PME + p-coupling by about 5%.
With Ewald and virial, the nbnxn SIMD energy kernels were used
(some left-over development code). The plain-C code did not do this.

Change-Id: I039044fcb393bf0bcaa06f38498b2a57d60cf080
GPU detection is done once per physical node

Only one MPI rank in each physical node now run the GPU detection.
The resulting information is broadcasted to the other ranks.
Note that we should also implement this for the CPU detection.
Fixes #1358

Change-Id: I16c6ccc40bd53d96b99d3f6a0abed69cc89136d8
enable GPU sharing among tMPI ranks

It turns out that the only issue preventing sharing GPUs among thread-MPI
threads was that when the thread arriving to free_gpu() first destroys
the context, it is highly likely that the other thread(s) sharing a GPU
with this are still freeing their resources - operation which fails as
soon as the context is destroyed by the "fast" thread.

Simply placing a barrier between the GPU resource freeing and context
destruction solves the issue. However, there is still a very unlikely
concurrency hazard after CUDA texture reference updates (non-bonded
parameter table and coulomb force table initialization). To be on the
safe side, with tMPI a barrier is placed after these operations.

Change-Id: Iac7a39f841ca31a32ab979ee0012cfc18a811d76
corrected dynamic load balancing when sharing GPUs

When sharing GPUs over MPI ranks, the time the GPU is busy might not
reflect the actual load. To make the dynamic load balancing between
domains work correctly, the GPU wait times are now redistributed over
the ranks/domains sharing a GPU.

Change-Id: Id9414e3ef7cc5a73a2b4560a0e10c2ee8ab1257f
fix nbnxn atom sorting with distant bondeds

Atoms communicated for bonded interactions can be beyond the non-local
search grid. Only a single cell extra was accounted for, which could
give inconsistency errors. Now any distance is handled correctly.
Fixes #1379

Change-Id: I7b12efeeab4074f2b356c0d0739105ce38371901
Added rotation to the tests run by ctest

Was forgotten when the rotation tests were added and thus
they weren't run by Jenkins

Change-Id: I27fc51b1314e6377d1e866a8ba4658700cc71cfa
Clarified GPU selection output and mdrun help

The reporting of GPU selection has been confusing when devices are
shared as GPU IDs would show up multiple times in a list of "devices
selected to be used." The reporting has been modified to print the
number of devices selected followed by the GPU to PP rank mapping which
is in fact exactly the previously printed list of IDs.

Additionally, the mdrun help page now explicitly states that the GPU ID
string passed with -gpu_id specifies a per-node GPU to PP rank mapping
and that multiple ranks can share GPUs.

Change-Id: Id98c592c1dd38573df003247281e4edf50debba7
Fix minor things before release

Bumped various version numbers

Trivial fix to install guide

Removed out-of-date gmxfaq.html and links to it, replaced links with
links to up-to-date FAQ

share/html/online.html is generated by mkhtml, so stopped caching it
in the repo.

Change-Id: I52265e1174f6e42a2a9d056c3a1751c1cd5886ac
Bump version after 4.6.4 release

Change-Id: Ied0463a471657e39cb6c4c41d6112f5778ef00d5
Merge branch release-4-6

Conflicts:
	CMakeLists.txt
	cmake/gmxDetectAcceleration.cmake
	cmake/gmxSetBuildInformation.cmake
	include/gpu_utils.h
	include/nbnxn_cuda_data_mgmt.h
	include/string2.h
	src/gromacs/gmxlib/gmx_detect_hardware.c
	src/gromacs/legacyheaders/domdec.h
	src/gromacs/legacyheaders/force.h
	src/gromacs/legacyheaders/gmx_detect_hardware.h
	src/gromacs/legacyheaders/network.h
	src/programs/mdrun/mdrun.cpp
	src/programs/mdrun/runner.c
Resolved in favour of release-4-6, except for details like
the use of gmx_unused and changes to include file locations

	share/html/gmxfaq.html
Deleted as in release-4-6

	share/html/online.html
Retained master version because this file is not generated
in master branch.

Did a little bit of uncrustify on areas that were already changing

Change-Id: I3ecf623a65eb4dac208a239e1b35141d08512483
Merge "Merge branch release-4-6"