Prohibit AVX_256 with buggy gcc 4.6.1

Fixes #1259

Change-Id: I7c523a90ccd0dd8fd3df6cb1914429e22a27ab5d
Added cmake profiling support

Support for using gprof with gromacs executables is added to
allow basic profiling using
gmx command [options]
gprof gmx

Removed explicit -fomit-frame-pointer, since this has been default
behaviour in gcc at most optimization levels since at least version
4.4. This lets "-O3 -pg" in the Profile build-type CFLAGS fight it out
themselves.

Change-Id: I99710f9cdd406f866d663a9610e0e9cccb87c07c
Fixes a complicated bug in g_anaeig.

If the number of frames for a covariance analysis is fewer than the
number of degrees of freedom, g_covar would happily print nonsense
eigenvalues in the eigenval.xvg file. This would then lead g_anaeig
to give NaN entropy values. By limiting the number of output lines in
the eigenvalue file this should be resolved. In addition a warning is
printed.

Change-Id: I01693a0fa9f3ba5b5784543a04d0d88b33a755c2
Unit tests for parse_common_args() file options

Some tests were already there, but extended the set to consider the
paths that check for file existence on the file system.
The tests should now cover most happy paths within parse_file_args().
Many unhappy paths behave quite unintuitively, so they are not tested
to avoid enforcing such unintuitive behavior.

Change-Id: I21c2dc40a3861784d55b6419dd148d6dda26dde5
More elaborate default handling for FileNameOption

- FileNameOption now prefers existing files when completing the default
  basename to a full filename for input options, like t_filenm parsing
  does.
- Add FileNameOptionManager that allows interaction between different
  file-related options.  Use it to add support for -deffnm-like option
  to set a default base name for all FileNameOptions.

To do the above, and make the -deffnm option independent from the
command line order, the default file names are now handled during
Options::finish().  So there are cases when the value returned by a file
name option changes after this call.

Change-Id: I73d3badae5409e9f066f06dec307b2c10ac89bfd
Clean-up gmx_eof

- Changed name to gmx_one_before_eof so that the different
  behavior from feof is obvious.
- Changed one usage of gmx_eof to feof where the std
  behavior is OK
- Moved to confio and made static because it is only
  used there.
- Removed the special treatment for pipes. It was incorrect.
  gmx_before_eof is only used for gro file reading and
  those could not be read from compressed files anyhow.
  Their is no possible correct implemenation for pipes
  (which cannot be seeked) and even if it wouldn't help
  because gro file reading also uses rewind which
  doesn't work for pipes.

Change-Id: I77fd34253817cd591011b8a2ec39ae95ce7b7378
Clean up math/

- Remove some unnecessary includes.
- Remove autoconf remnants.
- Split 3dview.* to 3dview.* for t_3dview and 3dtransforms.* for the
  basic 4-vector operations.
- Rename most mat4/vec4 operations to be more descriptive and make some
  3dview operations static, as they were not used outside the source
  file.
- Add some documentation for 3dtransforms.h (but not for all functions,
  so the file itself is not documented).

This removes some legacyheaders/ dependencies from math/, and allows
moving 3dview.* to programs/view/, which is the only user for them.

Change-Id: Ieb51d1d800c07f053eb5a28dfef2a249d5fcfceb
Move 3dview.* to programs/view/

This is the only place where the t_3dview structure is used, and it
seems quite tailored for this use.

Change-Id: Iee0cb3aae947b2bb3f98763ea91949a560faf602
Clean up matio.*

- Remove unnecessary includes of matio.h.
- Move t_matrix and related type definitions from types/matrix.h to
  matio.h, since this is the only header that needs them, and all users
  also need the contents of that header.
- t_rgb is an exception to the above rule.  Moved that to types/rgb.h
  for now, and adapted other users.
- Remove clear_matrix() as unused.
- Fix a file handle left open in do_dssp.
- Make several functions not declared in matio.h static in matio.cpp.
- Don't use gmx_fio_close() on a handle not opened with gmx_fio_open()
  in readcmap().
- Most of the *cmap() functions are unused (only do_dssp calls one of
  the reading functions, and no one calls the writing functions), but
  left them there for completeness.

Change-Id: Iffc9c9e6d06ce8884e1835c07e9c0f9227412725
Fix indenting of .tpr parameter dump in mdrun log file

This got broken recently in I39550bff60

Fixes #1447

Change-Id: I3e9765e56081d28dd0855d8d8f3fdf39b900993b
Convert gmx_detect_hardware.c to C++

Minor fixes to keep new compilers and static analysis happy. The
change to the return behaviour of sizeof_cuda_dev_info does not
matter, because it is only used if it is non-zero.

Change-Id: If2c9c2676667316637a30af9ead71fb9f77058c2
Add note about correct calling of wallcycle counter

The code could be refactored to use a series of explicit OpenMP
barriers so that the wallcycle_start/stop are more clearly matched,
but that's too hard for now. The comments make it harder for anyone
to misunderstand or mistakenly change the code.

Change-Id: Iec00e50e26a60efe09afb6f5744d401a9d9c06a3
Added a note about unsupported Verlet cutoff + Buckingham.

Refs #1192.

Change-Id: I2da3bf8c768de40531e1ffdf6f8cec73c9e53314
Added a note about using direction-periodic pulling.

Refs #1352.

Change-Id: I867fe1372082063bb221880e8021089f9ded14e7
Improvements to the g_lie help description.

Information was sparse, likely to avoid restating published
protocols, but some expansion was definitely warranted,
given the amount of questions that have recently been
posted to the mailing list and Redmine.

Refs #1353

Change-Id: Ib4057ae671ccac70061498b1d40ebcba84c497ee
Move rmpbc.* to pbcutil/

- Remove unnecessary includes of rmpbc.h.
- Add includes for rmpbc.h in files where it was missing and was
  previously transitively covered through gstat.h (which itself didn't
  need rmpbc.h).
- Some additional include reordering in files that were manually edited.

More PBC-related files will get to this directory in subsequent commits.

Change-Id: I3f3a963bb2444c0899ea24d2d4cd6a58c3077a82
Fix copyright years for new code

These files are new and of code new to GROMACS, so it is
only correct to copyright 2014.

Change-Id: I5d56116f1330fc83380919b111cefa4bf533fb08
Merge t_graph definition into mshift.h

- Remove types/graph.h, and merge its contents into mshift.h.
  This is a natural place for the structure, as the header already
  contains most functions that operate on the graph.
- Make t_graph forward-declarable, and use that in headers that
  previously got t_graph from typedefs.h.
- Add some missing mshift.h includes to source files that now need it.

Some additional cleanup of mshift.h dependencies will be done in
subsequent commits, when the header itself is moved.

Change-Id: Ia8c5817c11474c857a6845810e5e7f5a75f1c47c
Move mshift.* to pbcutil/

- Remove unnecessary includes of mshift.h.
- Replace mshift.h includes in headers with forward declarations of
  t_graph where applicable.
- Add some missing mshift.h includes to source files that were getting
  it transitively from one of the above headers.
- Convert mshift.c to C++ and get rid of macros.h dependency.

Change-Id: Ie0671cd6d683f5092243e5fdcb102641fdb6ecf6
Refactor string handling for GPU usage report

This prepares for future addition of reporting the list of available
compatible GPUs in the auto-selection case, which is needed for gmx
tune-pme to function well. Current outputs are only of IDs of
available GPUs, or IDs of those that will be used. The latter depends
on the number of PP ranks, so it doesn't help gmx tune-pme find out
how to run the optimization. At some point, delegating this kind of
task to hwinfo called from gmx tune-pme might be preferable.

The only functionality changes here are of reporting GPU ids by
referring to them as IDs, and the string of the ones used is of style
"0,1,4" rather than "#0, #1, #4". The use of the template function and
constructing the temporary vector prepares for the next commit.

Change-Id: Ic37989ce2f8e6396f450e1b5457ea7ea70b3849b