Fix malformed CUDA version macro check

The CUDA_VERSION macro check is incorrect in two places. The first is
harmless as it is related to legacy CUDA 3.2 version's reporting. The
second occurrence affects the check that enables stream priorities and
due to the incorrect check, with CUDA 5.5 priorities have not been used.

Fixes #1594

Change-Id: Icf781d41549c39b6b913c11bb11d4dc4e9f3be9c
Enable static anon namespace workaround on pathscale

The pathscale compilers suffer from the same static
anon namespace bug as the intel ones. Since the bug
is no longer Intel-specific, the INTEL_ prefix in
the macro has been removed.

Change-Id: Id87c9386cb831ba43ae05b2006dcfd0f1bf06be8
Remove documentation references to optimize-fft

The functionality was removed before 5.0 was released

Change-Id: I97d55338f7026b0410c4bdec52a42ac8c24016de
Include directive sorter

To facilitate discussion on how we want to sort the includes, the tool
supports a few different styles (with a --style option) that at least
roughly correspond to what has been proposed in #1557 or related
discussions.  Can be removed later when the final style is agreed on.

Having an automatic sorter also allows relatively easily using other
tools that may sort the includes as part of their operation (the
automatic sorter can just be run afterwards).

Made gmxtree.py aware of the location of the list of installer headers,
removing the need to pass the file on the command line.  This simplifies
manual invocation (in particular for the include sorter).

It only sorts a list of consecutive #include lines, possibly separated
by empty lines.  Comments between the lines or #ifdefs are left alone,
and only includes on both sides sorted independently.  This is by
design, as it keeps the script relatively simple, and also allows using
comments or similar to override the sorting for special cases.  Some
manual formatting may be required to make files with heavy use of
conditinal includes to look nice (to move headers to the appropriate
side of the #ifdefs), but after that, the tool should work quite well.

Add a git attribute to allow easily applying the script in combination
with a file list produced by admin/reformat_all.sh, and extend
reformat_all.sh such that it can be be run as
  admin/reformat_all.sh includesort -B=<builddir>
to sort all files with the attribute.

Related to #1557.

Change-Id: I362d7c5131a2e6952bbededfd51da4c4e1fc4a7e
Improve uncrustify.sh return code handling

Apparently, the exit code for the script does not work on Jenkins.
I can only guess whether this is caused by different bash (with some
differences in the support for set -o pipefail) or git versions (with
different behavior of the --exit-code flag in combination with the other
flags), or something else, but these changes seem to make it work.

Apply uncrustify with reformat_all.sh to fix any issues that have been
slipped through so far.

Change-Id: I005eed88f839014f38992826ad7b984b8ad3597e
Fix sorting and doxygen

Change-Id: I3f0124dee1b569275fe2889dedb9778bb3cc6b9d
Run include order check in doc-check

Now the doc-check target also checks that all files conform to the
include ordering produced by the include sorter.

Add support into the include sorter for only checking the ordering
without changing anything, and partially improve things such that the
full contents of the file are no longer required for some parts of the
checking.  There seems to be no performance impact for now from storing
all the file contents in memory, so did not go through this, but the
partial changes also improve readability of the code.
Add support to gmxtree for loading the git attributes, to know which
files not to check for include ordering.

Change-Id: I919850dab2dfa742f9fb5b216cc163bc118082cc
Minor changes to mdrun -h descriptions

Hopefully these are easier to understand. The suggested application
for -pinoffset is covered in the new mdrun performance section
of the user guide, on release-5-0 branch.

Change-Id: I7bc6172a70c39c02f6ca6db17e26b08d2ca3b444
Declare __STDC_*_MACROS in gmxpre.h

These free up code that needs, e.g., GMX_INT64_MAX from hard-to-satisfy
constraints on the include order.  More details in the comments in
gmxpre.h.

Also clarify our requirements for C99 support in the install guide.

Change-Id: I371c3a79244340764b320ae36183dd8926fe0f94
Extend support for float/double tolerances in testing

Comparisons based only on ULP are awkward when comparing quantities
computed in single and double precision when the accuracy of the
algorithm / implementation does not vary significantly with the
precision.  For example, the total energy when using an Ewald method
will vary with precision, but an acceptable result has nothing to do
with the precision in which it is computed.

Add relativeToleranceAsFloatingPoint to permit expressing the tolerance
as a floating-point number to mean a relative tolerance, but the
implementation is still expressed in ULP.  Make the tolerance class
support different tolerances for single and double precision numbers to
allow this, as well as for other flexibility.

Add tests for the various tolerance construction functions.

Chang variables containing ULP values to be gmx_uint64_t.

Change-Id: I25f7ddf8f4f9a5f1317b1cafd0159d8dd7d62b8c
Teach git that some files are binary

This stops things like git grep on short strings finding and showing
diffs from binary files.

Change-Id: I877211accfab3e8132d4cec1f671df790d0500f8
Remove unnecessary cppcheck include-path

Change-Id: I974b3b58818df3815f75a2ba41d8682ad2c77d84
Fix warnings for ICC 15

Also add comment decribing all suppressed warnings

Change-Id: Ib347a2ec1e4b890b8f115c56b1a982f9123a0adf
Valgrind suppression for OS X 10.9

Change-Id: Ib8d0e6c151ed68a0e80d9d724e167e2838556b2c
Merge release-5-0 into master

Change-Id: I862e73932dea368b5bac883eb1bf5725314efd2d
Remove no-inline-max-size and suppress remark

To avoid the remark that inlining isn't possible I added the flag
in d28edf2a07dcf11. This causes slow compile and should be avoided.
Instead suppress the remark.

TODO (for later): Check whether the additional inlining can improve
permance and consider enable it for release build.

Change-Id: I5866fcc5865fb44ca3dca0cf217e0cab2afbea0c
Merge release-5-0 into master

Change-Id: I44d8158c68dd1804b8456c096b86f52a979c0261
Fix shared libs for Mingw

Change-Id: Ib25e6b2a34080632e1d531da3194680cc8c6825b
Add missing quotes

Change-Id: Id7568da106b707365c0b30c58a4b7b321f9181f4
Fix double linkage for tests

cmake automatically adds libraries required by a required library to the
exe linker flags. If the same dependent library is also added for the exe
and it is listed first for the exe, cmake links twice for static libs
(for a cyclic dependency it would be required and cmake can't know).
Under certain conditions (e.g. ICC 15 with static libraries and offload
enabled) this can cause linker errors. We don't have a cyclic dependency
and thus by listing libgromacs after testutils we avoid the potential
problematic double linking. Also fixes that TESTUTILS_LIBS contains
the transitive dependencies, because that is not necessary (they are anyhow
added automatically).

Change-Id: I0327b2dba0538a2c6652c484fd7be7ae4a6cfb5b