alexxy/gromacs.git
8 years agoMerge release-5-0 into release-5-1
Mark Abraham [Wed, 11 Nov 2015 15:50:05 +0000 (16:50 +0100)]
Merge release-5-0 into release-5-1

Change-Id: I292a7eab69893472723338b44b4653f725f7294f

8 years agoBump patch version to prepare for 5.1.2
Mark Abraham [Tue, 10 Nov 2015 15:16:38 +0000 (16:16 +0100)]
Bump patch version to prepare for 5.1.2

Change-Id: Iefe307be5b3085555e7850566111dc2903b686db

8 years agoCorrect LINCS dHdl contribution
Berk Hess [Mon, 9 Nov 2015 14:52:10 +0000 (15:52 +0100)]
Correct LINCS dHdl contribution

The LINCS constraint contribution to dH/dlambda was missing a factor
1/delta_t^2 and thus orders of magnitude too small.

Fixes #1851

Change-Id: I864726d9a86a34207d2a02ad0803874fbfb33966

8 years agoVersion 5.1.1
Mark Abraham [Fri, 30 Oct 2015 09:24:06 +0000 (10:24 +0100)]
Version 5.1.1

Bumpd SOVERSION_MINOR and REGRESSIONTEST_MD5SUM per policy

Documented the two historical values of SOVERSION_MAJOR

Change-Id: I50662a762a1af9a39f94ec9a18e0afe48cb8424d

8 years agoTweak NVML-related messages
Szilard Pall [Wed, 21 Oct 2015 00:06:43 +0000 (02:06 +0200)]
Tweak NVML-related messages

Reworded and added hints related to fixing/working around the issues
presented to the user.

Change-Id: I1e6fc424404aca71ca1ae2788a06541e202b8184

8 years agoFix intermolecular interactions with small mols
Berk Hess [Mon, 2 Nov 2015 09:33:43 +0000 (10:33 +0100)]
Fix intermolecular interactions with small mols

Fixed intermolecular interactions not being assigned with domain
decomposition for system with only single charge group molecules.

Change-Id: I49e55d0461c4b1f92077d047072c31b22a5b397b

8 years agoFix signal type
Szilard Pall [Mon, 2 Nov 2015 00:23:09 +0000 (01:23 +0100)]
Fix signal type

The signal array type has been changed from into to char, but this can
not safely hold the negative values associated with the signaling
indicating to stop at next step. This has likely led to broken
signaling on platforms where the char implementation does not use a
signed 8-bit integer. To fix this issue "signed char" is used now.

Change-Id: If2ca213c979815ff3ab868cb0f7c8281abc2be50

8 years agoSuppress warnings when we have OpenCL 2.0 support
Mark Abraham [Wed, 28 Oct 2015 15:03:47 +0000 (16:03 +0100)]
Suppress warnings when we have OpenCL 2.0 support

OpenCL 2.0 headers apply deprecation compiler attributes to various
functions present in earlier OpenCL versions. We have to use those
functions because we support OpenCL 1.1. So we use the OpenCL
mechanism to declare our intention, which suppresses the compiler
warnings.

Change-Id: I237b8bdd88fe575e127436b078da6d0c83d44d87

8 years agoAvoid using incompatible NVML version
Szilard Pall [Thu, 8 Oct 2015 15:20:29 +0000 (17:20 +0200)]
Avoid using incompatible NVML version

This change introduces a check on the NVML API version in order to avoid
compilation issues when old driver/NVML versions are picked up.

Moved macro handling NVML errors to the only file they are issued.

Made the requirement for including nvml.h in gpu_utils.cu explicit.

Refactored handling of clock support so that we don't have to compile
three different ways merely to detect syntax errors.

Fixes #1838

Change-Id: Ibb7a9f7cc80aa9e9476a455d0b6192451a038088

8 years agoQuiet FindNVML
Szilard Pall [Wed, 21 Oct 2015 19:13:12 +0000 (21:13 +0200)]
Quiet FindNVML

Eliminates the note about unsuccessful NVML detection that appears
after the first cmake run.

Change-Id: I1c1cd979d51cfff18f36fe361574ad97056a225c

8 years agoUse include_directories(SYSTEM ...) consistently
Teemu Murtola [Sun, 18 Oct 2015 03:13:57 +0000 (06:13 +0300)]
Use include_directories(SYSTEM ...) consistently

Apparently, at least some compilers treat -isystem differently from -I
in that no matter what the order on the command line is, -I always takes
precedence.  This means that some of the
  include_directories(BEFORE SYSTEM ...)
did not work correctly, and in particular GMX_EXTERNAL_BOOST=OFF was
broken.  Likely also #1539 was (again) broken.

Make all includes that come from outside the source tree use SYSTEM, so
that the include directory for internal boost still takes precedence
over them.

Fixes #1844.

Change-Id: Ib536c24a0d13c6538f78daac145dc8d38135819d

8 years agoMerge "Merge release-5-0 into release-5-1" into release-5-1
Erik Lindahl [Thu, 22 Oct 2015 13:13:00 +0000 (15:13 +0200)]
Merge "Merge release-5-0 into release-5-1" into release-5-1

8 years agoFix cycle subcounters
Mark Abraham [Sat, 17 Oct 2015 10:24:56 +0000 (12:24 +0200)]
Fix cycle subcounters

The MPI receive buffer has to be as long as the send buffer, but the
problem can only be seen if you compile with the subcounters on.

Refs #1821

Change-Id: I3326db7f0b07ee76a8f029ac58825ea4f3b0b401

8 years agoRemoved dihedrals from GLY .rtp entry.
Justin Lemkul [Thu, 15 Oct 2015 11:40:40 +0000 (07:40 -0400)]
Removed dihedrals from GLY .rtp entry.

This is the only FF file that uses these dihedrals for GLY,
which prevent the generation of a topology involving GLY-PRO
because of the assumption that +H exists. Removing all explicit
[dihedrals] to conform to the same format as all other AMBER FF.

Change-Id: Iccce7d7d8351390ebea717f161e17a4179e15077

8 years agoAdd CUDA nvcc >=7.0 support
Szilárd Páll [Tue, 29 Sep 2015 00:06:09 +0000 (02:06 +0200)]
Add CUDA nvcc >=7.0 support

With CUDA 7.x, there is a few % performance benefit to using sm_52
arch as target instead of JIT-ed compute_50, mostly relevant with
the newly released v7.5 (as v7.0 has other regressions which make it
slower).

This change adds a single new target architecture (5.2) and changes
the virtual architecture included in the binary from 5.0 to 5.2 with
new enough nvcc to make 5.1.x versions future-proof when new hardware is
released.

Change-Id: I062cc48a151da3ab15b0508f4ebd59d95880ae9a

8 years agoCorrect CUDA version comparisons
Szilárd Páll [Mon, 28 Sep 2015 23:48:39 +0000 (01:48 +0200)]
Correct CUDA version comparisons

CMake's VERSION_LESS/GREATER operator does component-by-component
integer comparison and hence, the dummy CUDA version values with
".999"'s (used to work around the lack of <=/>= were)
resulted in incorrect conditionals.
As a result some binary code has not been generated. The conditional
has now been changed to avoid dummy version numbers.

Change-Id: Id7aad6b0c5eb4d98e37eb096b1f4dd5e02a07932

8 years agoFixed nbnxn_4xN performance regression
Berk Hess [Tue, 13 Oct 2015 13:54:58 +0000 (15:54 +0200)]
Fixed nbnxn_4xN performance regression

Commit 8e92fd67 changed the 2xNN kernel to use gmx_simd_blendnotzero_r
and the 4xN kernel to use gmx_simd_blendv_r. Making the 4xN kernel
consistent with the 2xNN kernel improves the performance with AVX2
with 4% and 3% for the RF and PME kernels, respectively.

Change-Id: Iac334865c2b2340493639300d07e7ab9c78e129f

8 years agoFix reset error message
Szilard Pall [Thu, 15 Oct 2015 00:53:36 +0000 (02:53 +0200)]
Fix reset error message

The '%' preceding the format specifier was missing.

Change-Id: I160b1036ba7daae72fe127f4644b9f4940effdc9

8 years agoMerge release-5-0 into release-5-1
Mark Abraham [Wed, 14 Oct 2015 15:10:46 +0000 (17:10 +0200)]
Merge release-5-0 into release-5-1

Change-Id: I6cdeb2f67b4a0f6c84db9ca086b5600c47320cf0

8 years agoVersion bumps after release
Mark Abraham [Wed, 14 Oct 2015 15:06:18 +0000 (17:06 +0200)]
Version bumps after release

Change-Id: Ic5e45220d2b44bcf74e66a32990d3ff1eb39722c

8 years agoVersion 5.0.7
Mark Abraham [Wed, 7 Oct 2015 16:00:27 +0000 (18:00 +0200)]
Version 5.0.7

Removed -dev tags from versions. Bumped regressiontest hash.

Change-Id: I48dc392775665ed43553e0c8c7b2da76d3224b2e

8 years agoMake bash completions work with bash --posix
Teemu Murtola [Wed, 14 Oct 2015 03:58:56 +0000 (06:58 +0300)]
Make bash completions work with bash --posix

Replace dashes in generated function names with underscores.

Related to #1840.

Change-Id: I0c74ba16f552f55900f99f11aa01ae830350f93c

8 years agoMerge branch release-4-6 into release-5-0
Mark Abraham [Tue, 13 Oct 2015 14:43:26 +0000 (16:43 +0200)]
Merge branch release-4-6 into release-5-0

Change-Id: I7c730d296a7ee100cc8dd697a53f6ce3d7068614

8 years agoFix for lack of COM removal for md-vv
Michael Shirts [Sat, 23 May 2015 02:31:11 +0000 (22:31 -0400)]
Fix for lack of COM removal for md-vv

At some point, we seemed to have lost COM removal for md-vv! Currently, putting in into 4.6,
will need to be merged forward.  Replaces https://gerrit.gromacs.org/#/c/4467/, which was
first checked into master, rather than 4.6.

Fixes #1651

Change-Id: I7776f4ad9b5b9458f294171f52b3581a04691250

8 years agoFix bugs with intermol interactions and DD
Berk Hess [Fri, 11 Sep 2015 15:26:23 +0000 (17:26 +0200)]
Fix bugs with intermol interactions and DD

Fixed two array access issues with the combination of intermolecular
interactions with domain decomposition when special bonded
communication was used. This could not lead to silent errors.
Added intermolecular interactions to the DD maximum distance check.
Disabled (fatal error) the above combination with charge groups.

Also fixed longest 2-body interaction distance print in case the
longest distance is in an exclusion.

Fixes #1820

Change-Id: Ic48d313edbc9779219832a185a903627f39b3102

8 years agoFixed FFTW detection status message location
Mark Abraham [Wed, 7 Oct 2015 09:45:34 +0000 (11:45 +0200)]
Fixed FFTW detection status message location

Change-Id: If1814c3c59c0f93e01b3a91843ecd102103d938d

8 years agoMerge release-5-0 into release-5-1
Mark Abraham [Mon, 5 Oct 2015 19:36:02 +0000 (21:36 +0200)]
Merge release-5-0 into release-5-1

Conflicts:
cmake/gmxManageFFTLibraries.cmake
Fixes from release-5-0 goes in only one branch of the refactoring in
release-5-1 that separate the own-fftw build from an installed-fftw
build.

docs/manual/monster.bib
Insertions in both branches, both retained

src/gromacs/gmxana/gmx_wham.cpp
Fixed formatting of copyrighted years.

src/programs/mdrun/mdrun.cpp
Relocation of please_cite() calls was adjacent to removal of bSepPot,
trivial resolution

Change-Id: I9d6116534775906d74ddbd45925176a21b5afcd9

8 years agoFix FindFFTW behaviour
Mark Abraham [Tue, 22 Sep 2015 14:46:08 +0000 (16:46 +0200)]
Fix FindFFTW behaviour

FFTW 3.3.5 with --enable-avx* will enable any useful 128-bit
SIMD flavours by default. (See Erik's 579cec9a6 in their repo.) Our
detection code will observe this, and will be silent.

With earlier FFTW, if we're doing a GROMACS AVX build, and we have
FFTW SIMD, and not SSE(2) SIMD, then we want to warn the user to
reconfigure FFTW to add SSE support. Made this behaviour correct, and
minimized the necessary infrastructure for it.

Added detection support for some other SIMD-support symbols that
are present in the FFTW repo for upcoming hardware.

Fixes #1809

Change-Id: If586250895664581316505a5595da7442e789f8d

8 years agoFix mdrun -nb auto -rerun with GPU and energy groups
Mark Abraham [Tue, 15 Sep 2015 10:01:41 +0000 (12:01 +0200)]
Fix mdrun -nb auto -rerun with GPU and energy groups

inputrec was being used after calloc, but before being read from the
.tpr file. This meant mdrun -nb auto -rerun behaved as if -nb gpu has
been used (gave a fatal error).

Moved the code that regulates whether GPUs are supported (e.g. with
Verlet+energy groups) into the new function
nbnxn_gpu_acceleration_supported(), so it can be used consistently
with other such checks. Split the old nbnxn_acceleration_supported()
into nbnxn_gpu_acceleration_supported() and nbnxn_simd_supported(),
which seems a bit simpler given that the old code was called twice,
with different constant values for bGPU.

Made the thread-MPI launch code aware of bUseGPU, so that we can call
nbnxn_gpu_acceleration_supported once and do all the things correctly.

The fatal error for mdrun -nb gpu -rerun with energy groups is now
issued by SIMMASTER in runner.cpp, rather than in md.cpp.

Despite appearances, this change doesn't alter much mdrun behaviour,
except as mentioned for -rerun, and that GPU detection is now run
for mdrun -rerun when we will not end up using those GPUs.

Fixes #1823

Change-Id: I324d23ce98b0041dad148db8eac744c5dd5f66fb

8 years agoFix -seltype option for C++ tools
Teemu Murtola [Fri, 25 Sep 2015 09:39:57 +0000 (12:39 +0300)]
Fix -seltype option for C++ tools

Because of a misthought in the logic of how to check whether onlyAtoms()
was specified for all SelectionOptions, the -seltype option was never
enabled for any tool (since 5.0).

Change-Id: I365afdc53524f0a237654a603be1c051b8e55dc9

8 years agoFixed a bug in computational electrophysiology with DD
Carsten Kutzner [Mon, 28 Sep 2015 13:09:57 +0000 (15:09 +0200)]
Fixed a bug in computational electrophysiology with DD

With domain decomposition, the non-master nodes did not correctly
compute the center of "broken" water molecules chosen for position exchanges.
This would lead to a crash soon after such a water was exchanged with
an ion. The problem was in the init_swapcoords() routine, which passed
an empty box vector on the non-master nodes and therefore got the
wrong PBC information except on master.

Change-Id: I94715e0dfb58a206e27f45a6ab149c7b808d06c1

8 years agoFixes bug in the computation of Coefficient of Thermal Expansion
David van der Spoel [Fri, 18 Sep 2015 15:11:57 +0000 (17:11 +0200)]
Fixes bug in the computation of Coefficient of Thermal Expansion

Between release-4-6 and release-5 an bug was introduced calling the
routine analyse_ener with the wrong flag. The flag bFluct can be set
to subtract the average before computing the ACF (which is a remnant
from old code which is being fixed in patch
https://gerrit.gromacs.org/#/c/4310/).
As a result of the incorrect usage of this flag to analyse_ener the stored
energy would be modified yielding an incorrect
Coefficient of Thermal Expansion. (By passing the -nmol option which is needed
for fluctuation property calculations the wrong option would be activated).
Change-Id: I303206c3118c2d5bb499ba4c04a94fe9de2c7992

8 years agoFix reaction-field warning message
Mark Abraham [Sat, 26 Sep 2015 10:20:43 +0000 (12:20 +0200)]
Fix reaction-field warning message

The whole-function scope of err_buf combines with the inexpressive
macro CHECK to mean that we can give a warning using the error message
of the previous check.

Change-Id: Id9882994eee5ee5a0844f4adfb5d29a0042d51d5

8 years agoFix broken OpenCL detection
Szilard Pall [Wed, 16 Sep 2015 13:50:51 +0000 (15:50 +0200)]
Fix broken OpenCL detection

The OpenCL device compatibility test broke in c66e8fa for all platforms
other than OS X. This change makes the OpenCL code functional again.

Change-Id: Iebb015549e952c24ccb8c2118721a11064e036f2

8 years agoFix OpenCL build
Szilard Pall [Tue, 15 Sep 2015 20:03:04 +0000 (22:03 +0200)]
Fix OpenCL build

A spurious semicolon in CMake code broke the OpenCL build
which this changes fixes.

Fixes #1824

Change-Id: I38a7d343184aff61718be43e17f23bec3c1eee4d

8 years agoDetect incorrect cycle counting
Berk Hess [Mon, 14 Sep 2015 13:01:48 +0000 (15:01 +0200)]
Detect incorrect cycle counting

When threads are not pinned to cores, the wallcycle counting can get
messed up on machines where the cycle counters are not synchronized
between the cores. Since it's difficult to detect thread pinning on
all architectures and without pinning the counting can be correct on
synchronized machines, we try to detect incorrect counters. We only
detect negative cycle counts, but that should catch nearly all cases.
When we deteced an invalid count, we ignore the cycles counted and do
not print the cycle accounting table. Dynamic load balancing is never
disabled, because a few incorrect load measurements do not cause
problems here.

Fixes #1821

Change-Id: I076ad685a043f1f0b913a9b089ebea43a62534f5

8 years agoAdd GROMACS 5 paper to paper lists
Mark Abraham [Fri, 28 Aug 2015 19:05:34 +0000 (21:05 +0200)]
Add GROMACS 5 paper to paper lists

Also call to please_cite, and cite both recent papers
in the reference manual

Change-Id: I5e7a81690a1d0fbea0147d8a2a5f281f7b5d4aab

8 years agoAvoid integer overflow in gmx_wham by using gmx_int64_t.
Béla Voß [Thu, 27 Aug 2015 11:34:16 +0000 (13:34 +0200)]
Avoid integer overflow in gmx_wham by using gmx_int64_t.

somce gmx_wham internally uses femtoseconds, a cast to int can lead to
overflows in microsecond timescale simulations.

Change-Id: Ib7589c3c1ce47b29b3ada458b85bf577b41996d1

8 years agoHarden FindSphinx.cmake
Mark Abraham [Wed, 19 Aug 2015 14:05:54 +0000 (16:05 +0200)]
Harden FindSphinx.cmake

If execute_process failed somehow, then SPHINX_VERSION_OUTPUT_VARIABLE
could be empty. If so, we want the detection to work, and to report
that a valid Sphinx was not found. This changes makes sure the
string() command is valid CMake.

Change-Id: I0d6f483d15776402504c77689b5228b094dd605f

8 years agoFix for expanded ensemble.
Michael Shirts [Tue, 18 Aug 2015 01:44:27 +0000 (19:44 -0600)]
Fix for expanded ensemble.

The frequency of evaluation of lambda-dependent free energies was
not being adjusted to short frequencies of expanded ensemble calculations; it was just
being set again to the frequency of calculating the energies in the dhdl file.

Not caught previously since nstdhdl and nstexpanded were the same in previous tests.

Change-Id: Ia4bca7d035fec0bf80131a14007442f1e38f60f1

8 years agoBump patch version to prepare for 5.1.1
Mark Abraham [Fri, 14 Aug 2015 13:14:19 +0000 (15:14 +0200)]
Bump patch version to prepare for 5.1.1

Change-Id: I1baa0f3adc26ed85b186086c7536c76c9b090b30

8 years agoVersion 5.1
Mark Abraham [Thu, 13 Aug 2015 11:33:23 +0000 (13:33 +0200)]
Version 5.1

Removed "-rc1" tag per policy. Bumped regressiontest hash.

Documented when LIBRARY_SOVERSION_MAJOR should typically be increased.

Change-Id: I98dc8206669724702f391de29bf68ed240bb1b48

8 years agoMake mdrun -nt work again
Berk Hess [Wed, 12 Aug 2015 12:23:37 +0000 (14:23 +0200)]
Make mdrun -nt work again

Moved several thread count checks and assignments to a new
check_and_update_hw_opt_3 to clarify the options processing.
Also reorganized the PME thread count checks to avoid unclear
error messages for corner cases.

Renamed bOMP to bHasOmpSupport for clarity.

Converted assert calls to GMX_RELEASE_ASSERT (and added new ones).

Fixes #1803.

Change-Id: I35005d60d4981fa7c223449aaa53b663d4d13e1d

8 years agoAvoid segmentation fault in gmx chi.
Justin Lemkul [Fri, 14 Aug 2015 00:28:21 +0000 (20:28 -0400)]
Avoid segmentation fault in gmx chi.

If a system containing a custom residue is being analyzed, gmx chi
would seg fault if that residue was not in residuetypes.dat. This
can occur, for instance, when the topology is created in some
directory and analysis in another, or if the analysis is done on
a different machine.

Fixes #1802

Change-Id: I85df855381c8e233020fd1e1f73165d4e1215ab9

8 years agoMake it easier to find selection help
Mark Abraham [Thu, 13 Aug 2015 12:10:33 +0000 (14:10 +0200)]
Make it easier to find selection help

Now the command-line reference part of the user guide has a TOC entry
that has the magic work "selection" in it.

Fixes #1805

Change-Id: Ib99840ab1f3fd72a52f28ffa1e06ee1242fa4310

8 years agoMake it easier to find selection help
Mark Abraham [Thu, 13 Aug 2015 11:59:58 +0000 (13:59 +0200)]
Make it easier to find selection help

Fixes #1805

Change-Id: Ie09baa75601f6ba3e8e514f78e3bae34e7327f86

8 years agoRe-enable multi-GPU support in OpenCL for thread MPI
Mark Abraham [Wed, 12 Aug 2015 12:50:17 +0000 (14:50 +0200)]
Re-enable multi-GPU support in OpenCL for thread MPI

There was no known problem with thread MPI when I disabled it. Real
MPI segfaults at context creation time with the AMD runtime and more
than one rank on a node. Made this possible, and updated docs.

Also updated some other docs and OpenCL TODOs.

Change-Id: I32a4eb5e02176999587feff7a2754f40029adaa8

8 years agoDocumentation fixes
Mark Abraham [Tue, 11 Aug 2015 15:41:40 +0000 (17:41 +0200)]
Documentation fixes

Change-Id: Ifc9fbcc6ed8214154915120067c080826d108b3f

8 years agoadd clFlush to kick of OpenCL work
Szilard Pall [Wed, 22 Jul 2015 15:06:01 +0000 (17:06 +0200)]
add clFlush to kick of OpenCL work

The OpenCL standard specifies clFlush as a necessary step which issues
all enqueued commands ensuring CPU-GPU concurrency which otherwise is
not guaranteed. For this reason three flushes are added to dispatch work
in the queue.

Additionally the specs (v1.2 sec 5.13) state that a flush is required in
the inter-stream synchronization case.

In total four flushes are added, their overhead seems to be small.

Fixes #1784

Change-Id: Ia287998c2716e21708979d6e8d261f853e39d4ef

8 years agoAvoid FP exception with empty .mdp file
Mark Abraham [Wed, 12 Aug 2015 18:18:31 +0000 (20:18 +0200)]
Avoid FP exception with empty .mdp file

The default value for nsteps is zero, which used to lead to division
by zero in the above case. Refactored to avoid that.

Added a basic test case for grompp with an empty .mdp file (which
causes all default settings to be used). It is not optimal that the
mdrun integration test machinery is recycled for this, but
re-implementing or refactoring that to avoid the ugliness is not great
for a release branch.

Noted some TODOs. Renamed some variables for clarity.

Change-Id: I5c98c4f460f658277490b11f7fb5629d6fa84a08

8 years agoAdd documentation for energygrps with GPUs
Mark Abraham [Wed, 12 Aug 2015 20:31:08 +0000 (22:31 +0200)]
Add documentation for energygrps with GPUs

There's other documentation for this, but it's hard to cross-reference
everything.

Change-Id: I400f5cd8179428d0c0c340efd6314404e273be43

8 years agoAdd to author lists
Mark Abraham [Tue, 11 Aug 2015 12:49:48 +0000 (14:49 +0200)]
Add to author lists

In particular, Jiri implemented much of the NVML support in GROMACS 5,
and has made other contributions to the GROMACS CUDA support over the
years.

Change-Id: I605eea83c50ccd2516779ecbe9397d00324dc40b

8 years agoPrevent AMD OpenCL on OS X prior to 10.10.4
Erik Lindahl [Wed, 5 Aug 2015 15:48:44 +0000 (17:48 +0200)]
Prevent AMD OpenCL on OS X prior to 10.10.4

OS X release 10.9.x has been confirmed to produce invalid OpenCL
kernels for AMD (but correct for NVIDIA), and we have tested that
it is fixed in 10.10.4. The fix might actually have appeared
already in 10.10.3, but it's not worth tracking down the exact
point since 10.10.5 is already out.
This change will issue a CMake warning when compiling GROMACS
on earlier OS X releases, and at runtime we check the version
again and mark AMD GPUs as incompatible.

Also fixed docs about the length of time JIT compilation takes
on AMD.

Refs #1783

Change-Id: I0202faea60c39daae6621d2bb9ba828aab5532a0

8 years agoFix for processors being offline on Arm
Erik Lindahl [Fri, 7 Aug 2015 21:19:48 +0000 (23:19 +0200)]
Fix for processors being offline on Arm

Use the number of configured rather than online CPUs.
We will still get a warning about failures when trying to
pin to offline CPUs, which hurts performance slightly.
To fix this, we also check if there is a mismatch between
configured and online processors and warn the user that
they should force all their processors online
for better performance.

Change-Id: Iebdf0d5b820edcd7d06859a2b814adf06589ef96

8 years agoAbort if PME tuning is active and counters reset
Mark Abraham [Fri, 7 Aug 2015 22:21:16 +0000 (00:21 +0200)]
Abort if PME tuning is active and counters reset

Triggering counter reset (in various ways) could happen at a
non-nstlist step, which provokes a software inconsistency error in
5.1. This is reveals that all recent releases have permitted reset
while tuning was active, which is useless and potentially wrong.

Introduced a getter pme_loadbal_is_active, so that the fatal error
can be issued when conditions for counter reset are satisfied
and PME load balancing is still active.

Noted a TODO to have the load-balancing module use its own getter in
future; such a refactoring is probably fine, but worth avoiding in a
bugfix branch. Noted a TODO to make a counter-reset module, consider
alternative solutions to #1781, and other clean-up. Documented some
stuff.

Fixes #1781

Change-Id: I912e3da837bd32280f295ad98cc6b8170f4d2d81

8 years agoFix some stuff in user and install guide
James W. Barnett [Thu, 6 Aug 2015 16:20:21 +0000 (11:20 -0500)]
Fix some stuff in user and install guide

Some code was not showing up correctly. Remove prompt ('%') for some
code. Add gmx prefix where missing. Fixed some typos.

Change-Id: I7e2352e340547e4eb5794b8de323fce540709a89

8 years agoRequire tune_pme to take -mdrun parameter
Mark Abraham [Fri, 7 Aug 2015 21:40:18 +0000 (23:40 +0200)]
Require tune_pme to take -mdrun parameter

The transition away from many binaries in 5.0, and the removal of
symlinks in 5.1 mean there is even less chance that a sensible default
command line for calling mdrun can be provided. In general, mdrun
might be in either precision, with or without MPI, with or without
some custom suffix, inside the wrapper binary or from an mdrun-only
build, or from a custom directory.

Thus, the user is now required to say what command to call to run the
simulation they want to optimize. The MDRUN environment variable
remains as an undocumented and deprecated convenience feature for 5.1.

Fixes #1754

Change-Id: Ia2c278732ef2a79d7304967b230149eca4597888

8 years agoMerge branch release-5-0 into release-5-1
Mark Abraham [Sat, 8 Aug 2015 13:56:03 +0000 (15:56 +0200)]
Merge branch release-5-0 into release-5-1

No conflicts

Change-Id: I551220310b529542d4cc3635815101cf53b325ec

8 years agoFix some phrases that were not appearing in manual
James W. Barnett [Thu, 6 Aug 2015 13:44:24 +0000 (08:44 -0500)]
Fix some phrases that were not appearing in manual

Some phrases were in the index tag in the manual and not being
actually displayed. For example, "\index{potential function}s" only
displayed the letter "s". This should be "potential
functions\index{potential function}". This adds the appropriate
phrases next to the index tag.

Change-Id: Ia8e308f00a2542c1ee8c52fb017ba38926407876

8 years agoFix docs of ftypes of dihedrals
Mark Abraham [Thu, 6 Aug 2015 21:12:39 +0000 (23:12 +0200)]
Fix docs of ftypes of dihedrals

The ftype indices for restricted dihedrals and combined
bending-torsion interactions were documented the wrong way around.

Fixes #1796

Change-Id: I5d3c52cc0f326c9e379efe50d0841940d51e4894

8 years agoFix FindNVML.cmake
Mark Abraham [Wed, 5 Aug 2015 13:31:09 +0000 (15:31 +0200)]
Fix FindNVML.cmake

Change-Id: I4ed1a1ba20e74b9fb2bd0abbafc87caedc0c1c2f

8 years agoAvoid using C++11-specific data() of std::vector
Erik Lindahl [Wed, 5 Aug 2015 19:27:22 +0000 (21:27 +0200)]
Avoid using C++11-specific data() of std::vector

Replaced the data() method of std::vector with the
adress of the first element.

Change-Id: I9b6340b4823fb65c7f284a5e8c972caaa24930b1

8 years agoFix thread-affinity checking
Mark Abraham [Tue, 7 Jul 2015 12:11:11 +0000 (14:11 +0200)]
Fix thread-affinity checking

Merge commit e3d1a22325113 introduced HAVE_SCHED_AFFINITY to master
after it was renamed from HAVE_SCHED_GETAFFINITY in 8b7f2d16750 in
release-5-0. But in master, another use of HAVE_SCHED_GETAFFINITY had
already occured in 15d71933ab5, and we didn't notice the problem in
the merge. Found while converting the source file to C++ in master,
when compilers complained about the unused symbols. More good reasons
for -Wundef, -Wunused, C++ conversions, and minimizing refactoring in
release branches.

Change-Id: Idbdf03de3da87bd76be29c8e1c96045531cd3c4e

8 years agoFix em dash in new reference
Mark Abraham [Wed, 5 Aug 2015 15:29:13 +0000 (17:29 +0200)]
Fix em dash in new reference

This sometimes gets rendered badly

Change-Id: I2f6570cecb66777270c099b272b296c16800a43d

8 years agoFix PGI compiler flag
Erik Lindahl [Wed, 5 Aug 2015 15:57:08 +0000 (17:57 +0200)]
Fix PGI compiler flag

Work around compiler crashes by removing inter-procedural analysis.
Removed the extra -fastsse option which is identical to the -fast
option already added for release build types. Updated the warning
about not recommending PGI for now.

Change-Id: I0a43e19f3035a44330d8d32bb557639357100aa8

8 years agoMerge release-5-0 into release-5-1
Mark Abraham [Tue, 4 Aug 2015 12:31:06 +0000 (14:31 +0200)]
Merge release-5-0 into release-5-1

Change-Id: If110ea29e1756bf6c0b18d3d3852ee4099641ea1

8 years agoFix use of wrongly-named GCC minor-version variable
Mark Abraham [Mon, 3 Aug 2015 14:08:19 +0000 (16:08 +0200)]
Fix use of wrongly-named GCC minor-version variable

Change-Id: I878eec93f09077b7410c95183bb462c9ddf1c50b

8 years agoFix possible linking of libxml2 to zlib
Mark Abraham [Mon, 3 Aug 2015 13:56:40 +0000 (15:56 +0200)]
Fix possible linking of libxml2 to zlib

Not all linking scenarios can do the right thing with a naked -lz, so
we should use the zlib that was already found, which will be a full
path to the library.

Change-Id: Ie63278ea4db2c16bcf92aaa804530da7996ab6f1

8 years agoMerge branch release-5-0 into release-5-1
Mark Abraham [Sun, 26 Jul 2015 11:51:46 +0000 (13:51 +0200)]
Merge branch release-5-0 into release-5-1

Conflicts:
CMakeLists.txt
Version numbering management code has moved to new home, nothing
needs to change here from the bumps to numbering in release-5-0
branch.

Change-Id: I8e45709c83d5c181900cca50b2ccba489630bbe7

8 years agoStop mdrun printing potentially undefined value
Mark Abraham [Tue, 7 Jul 2015 12:45:06 +0000 (14:45 +0200)]
Stop mdrun printing potentially undefined value

Variable pv is only defined with conditions that need not be identical
with the presence of pressure coupling. Definitely compilers aren't
sure about it.

Change-Id: I80670e12b799c7f476caa565ef7ce9c3e38b0686

8 years agoVersion bumps after new release
Mark Abraham [Sun, 26 Jul 2015 09:31:00 +0000 (11:31 +0200)]
Version bumps after new release

Change-Id: Icfa27c2f62f4eb83cc57102e8b9239e1d8891e38

8 years agoVersion 5.0.6
Mark Abraham [Fri, 24 Jul 2015 13:57:42 +0000 (15:57 +0200)]
Version 5.0.6

Removed -dev tags from versions. Bumped regressiontest hash.

Change-Id: Ie86dd0d7a375c3fc86d59f59494c03bf350fde38

8 years agoMerge release-5-0 into release-5-1
Teemu Murtola [Mon, 20 Jul 2015 04:15:46 +0000 (07:15 +0300)]
Merge release-5-0 into release-5-1

Conflicts:
    src/gromacs/gmxpreprocess/grompp.c (adjacent changes, took both)

Additionally, added a declaration for a variable in sasa.cpp that had
been removed from enclosing scopes.

Change-Id: I15c10ef00416aa1f791a58b97d79669efab9a1c5

8 years agoUpdate advice about grompp -t
Mark Abraham [Mon, 13 Jul 2015 12:16:42 +0000 (14:16 +0200)]
Update advice about grompp -t

grompp -t state.cpt does not copy coupling-algorithm state from a .cpt
into the new .tpr, even though it can still do so from grompp -e.

Refs #1775

Change-Id: I8c4d68fc8d3750b79f30c0f77115c80e1f3cf9b3

8 years agoFixed gmx sasa output residue numbering
Carlo Camilloni [Thu, 16 Jul 2015 14:16:47 +0000 (16:16 +0200)]
Fixed gmx sasa output residue numbering

gmx sasa with -or was writing the wrong residue numbers

Change-Id: I52b13f1eeec2ee028e5ec580139c0290df7b69c9

8 years agoFix incorrect warning about only using single core
Erik Lindahl [Mon, 13 Jul 2015 10:10:29 +0000 (12:10 +0200)]
Fix incorrect warning about only using single core

check_resource_division_efficiency() warned that only
a single core could be used, even when one of
thread-MPI or OpenMP support was present, but not both.

Fixes #1776.

Change-Id: I6ac98954c2ef74ed860750627f7a1b9f0710561e

8 years agoRemoved information about obsolete .edo file format
Carsten Kutzner [Wed, 15 Jul 2015 13:31:59 +0000 (15:31 +0200)]
Removed information about obsolete .edo file format

Essential dynamics output is written to edsam.xvg file since version 4.6

Change-Id: I0daca58fab1ebc953e8799de7e1667c4956b460e

8 years agoImplement zsh shell completions.
James W. Barnett [Tue, 14 Jul 2015 23:24:40 +0000 (18:24 -0500)]
Implement zsh shell completions.

zsh completions when gmx prefix was used were not implemented. Use zsh builtin
bashcompinit to use the bash completions. Remove 'shopt -s extglob'
from gmx-completion.bash and place it in GMXRC.bash, since it is incompatible
with zsh. gmx-completion.bash and gmx-completion-gmx.bash can now be used for
completions in both bash and zsh.

Change-Id: Ib8f3cf0535d39e91a6b31933f41aa7548755b351

8 years agoUpdate example old mdp file in user guide.
James W. Barnett [Mon, 13 Jul 2015 02:29:39 +0000 (21:29 -0500)]
Update example old mdp file in user guide.

Update mdp file in user guide. Remove obsolete parameters, and choose parameters
that will not give error and warning by default. Also remove the contents of
mdout.mdp, since the user can easily retrieve that with the given command, and
the file is now much larger. Add note on parameters being dependent on force
fields. Fixes #1774.

Change-Id: I2d5f1cfcf933275f95352c25891ee0792944212c

8 years agoFix spelling errors in user guide.
James W. Barnett [Mon, 13 Jul 2015 15:18:37 +0000 (10:18 -0500)]
Fix spelling errors in user guide.

Fix spelling errors in user guide. Also update spelling to American
English, only because that is what is used in the manual and in other
documentation (e.g.,  neighbour -> neighbor).

Change-Id: Ib11d5be727bef88750a8aa45f2592d10aabb929e

8 years agoFix -deffnm -multi[dir]
Teemu Murtola [Thu, 9 Jul 2015 14:21:15 +0000 (17:21 +0300)]
Fix -deffnm -multi[dir]

Make -deffnm work even when all other functionality in
FileNameOptionManager is disabled (which happens with -multi and
-multidir).  Add a test for the broken case.

Fixes #1769.

Change-Id: I0f729eaa1ab6e9a4a25d1d121cbfe5b5b2673e4b

8 years agoMerge release-5-0 into release-5-1
Roland Schulz [Wed, 8 Jul 2015 07:35:13 +0000 (03:35 -0400)]
Merge release-5-0 into release-5-1

Conflicts:
src/gromacs/gmxana/gmx_dos.c

Change-Id: I06208bcafb880b9bac3f45050d709fae5eab9a9d

8 years agoGive bTypePerturbed a valid initial value
Mark Abraham [Tue, 7 Jul 2015 13:08:54 +0000 (15:08 +0200)]
Give bTypePerturbed a valid initial value

Commit a6ae71b202 didn't do this correctly, so FEP with LJPME has had
broken PME load estimates (only).

Change-Id: I88235c34b499e6dfca650138d66cdc17bd40afb4

8 years agoFix grompp .edr IO estimate for free-energy calcs
Mark Abraham [Tue, 7 Jul 2015 12:30:51 +0000 (14:30 +0200)]
Fix grompp .edr IO estimate for free-energy calcs

This has been wrong since it was introduced in c7a82654f. It doesn't
really matter, except that the variable is unused and converting to
C++ complains about it.

Change-Id: I8e13a07e2680cfe5b69fac170d500b235a5ba113

8 years agoMerge release-4-6 into release-5-0
Roland Schulz [Wed, 8 Jul 2015 07:28:27 +0000 (03:28 -0400)]
Merge release-4-6 into release-5-0

Change-Id: I25fea1226adfaa332c5c7b0630e99031266178f4

8 years agoFirst 5.1 release candidate
Mark Abraham [Mon, 29 Jun 2015 22:49:57 +0000 (00:49 +0200)]
First 5.1 release candidate

Change-Id: I89776d6dd4d170d4f259fa8ee761cf4f6878cbe0

8 years agoFix too small GPU pair count estimates
Berk Hess [Wed, 1 Jul 2015 13:46:40 +0000 (15:46 +0200)]
Fix too small GPU pair count estimates

For triclinic unit-cells with DD the non-local cluster pair count
estimate was too high, especially for thin local domains, due to an
incorrect estimate of the cluster size. Since the pair count estimate
for the local pair-list was determined as a total minus a non-local
estimate, the local estimate could get negative and cause exceptions.
Fixed the cluster size estimate and added a lower limit for the local
size estimate.

Fixes #1762.

Change-Id: I3489550968f66bc03ba4e6056017a58eba37f7cc

8 years agoFix bug in GPU list balancing
Berk Hess [Sat, 4 Jul 2015 08:18:05 +0000 (10:18 +0200)]
Fix bug in GPU list balancing

The function split_sci_entry could produce empty lists. This seems
not to have caused incorrect results, only slight extra processing
of empty workunits in the CUDA kernel. Incorrect Coulomb energies
could appear for empty lists with shift=CENTRAL, but that does not
seem to happen.

Refs #1767.

Change-Id: I0b0ff0a450734d4863f1e9636ff5741d4f1a68da

8 years agoFix DD DLB state issue
Berk Hess [Thu, 2 Jul 2015 14:03:34 +0000 (16:03 +0200)]
Fix DD DLB state issue

The introduction of DLB locking for PME load balancing added another
DLB state, which was stored in a third variable. These variables
were not always all properly checked. Simplified the code by merging
these three state variables into one. In added there was a fourth
variable (bGridJump) is gmx_domdec_t, this is replaced by calls to
a functions returning is DLB is on.

Refs #1760.

Change-Id: I80d499149e4e5bfd689e76208384a8ba61e2842a

8 years agoFix bug in GPU list balancing
Berk Hess [Fri, 3 Jul 2015 20:28:52 +0000 (22:28 +0200)]
Fix bug in GPU list balancing

The function split_sci_entry could produce empty lists, which can
cause illegal memory access or incorrect energies. Before commit
6106367b this bug was never triggered, since nsp_max was never smaller
than a full cj4 entry. But 6106367b introduced a but that could
produce negative nsp_max.

Fixes #1767.

Change-Id: I2007cf6851f94f4f2ca62f609a0628725014dbe7

8 years agoFix copy-paste bug in gmx distance
Teemu Murtola [Sat, 4 Jul 2015 17:45:11 +0000 (20:45 +0300)]
Fix copy-paste bug in gmx distance

The -oxyz option did not behave properly (the computed values should be
fine, but the behavior of where the output goes can be unpredictable).

Change-Id: Idcd389c3809189f85a630094b9aaea6d61a5f954

8 years agoObey OpenMP thread count limit with tMPI
Berk Hess [Thu, 2 Jul 2015 08:09:43 +0000 (10:09 +0200)]
Obey OpenMP thread count limit with tMPI

With thread-MPI mdrun would choose the number of OpenMP threads so
that the maximal number of hardware threads was used. When the number
of ranks was limited by the system size, this led to too high OpenMP
thread counts which lowered the efficiency. Now a limit is imposed.
Also updated some comments and renamed constants and bNTOptSet.

Change-Id: I830b5a3f2fd28f87acfbcf982103b62fc3e45758

8 years agoFix two PME DLB trigger issues
Berk Hess [Wed, 1 Jul 2015 13:04:13 +0000 (15:04 +0200)]
Fix two PME DLB trigger issues

Dynamic load balancing got triggered while locked by PME load
balancing, because a check was placed incorrectly.
PME load balancing would never trigger with separate PME ranks
because a comparison was inverted.

Fixes #1760.
Fixes #1763.

Change-Id: I75eeb32423b864f84bfd45ecb61d169b473ed74a

8 years agoFix ThreadMPI GPU assumptions
Mark Abraham [Thu, 2 Jul 2015 14:57:10 +0000 (16:57 +0200)]
Fix ThreadMPI GPU assumptions

The OpenCL implementation introduces the constraint of one GPU per
node, but thread-MPI still assumed any compatible GPU was available
for use and thus should have a rank.

Consolidated the configure-time constants behind some API functions so
that we can use the same behaviour in the various setup code.

Added a warning message that the OpenCL implementation has to waste a
GPU, stopped showing another warning message related to wasting
GPUs when the OpenCL implemenation forces this, and improved
another message to clarify why gmx mdrun -ntmpi 2 won't work
with OpenCL.

Also fixed a few references to thread-MPI threads that are better
called thread-MPI ranks.

Change-Id: I4664c49786ebd26a53cbf5e1c26df79649ba4f5f

8 years agoCorrect grompp pull warning message
Berk Hess [Thu, 2 Jul 2015 12:05:26 +0000 (14:05 +0200)]
Correct grompp pull warning message

A warning full pull-coord?-groups referred to pull-coord?-geometry
instead. This is fixed by changing the order of proceses the pull
options, which better reflects the dependencies. Also reordered
the options in the mdp manual.

Change-Id: I6309d021282156cd3409af35bcfa38dc2cab1c67

8 years agoFix OpenCL compilation errors.
Szilard Pall [Wed, 1 Jul 2015 14:49:09 +0000 (16:49 +0200)]
Fix OpenCL compilation errors.

Fixes a typo in a structure. Also fixes an incorrect
variable name only visible on OS X.

Fixes #1765

Change-Id: I0ee0f61da1f036163aa85f719ef9ceb0dab06868

8 years agoRemove status messages about Sphinx detection
Teemu Murtola [Wed, 1 Jul 2015 03:21:41 +0000 (06:21 +0300)]
Remove status messages about Sphinx detection

Make FindSphinx.cmake and FindPythonModule.cmake respect the QUIET
option, and pass that to find_package() to not print out information on
every CMake run.  Most people will not care whether these are found or
not, and being silent in all cases is the same approach as is used for
Doxygen.

In master, it could be useful to change at least some of the documentation
build rules such that they require GMX_DEVELOPER_BUILD to be set, and
that could also enable messages about not finding the components needed
for the documentation build, but that is outside the scope of this
change.

Fixes part of #1761 and #1764.

Change-Id: I196f5e66c94fe4247ae28bd230a469acbaad939a

8 years agoFix inconsistent OpenMP automation
Berk Hess [Tue, 30 Jun 2015 19:22:01 +0000 (21:22 +0200)]
Fix inconsistent OpenMP automation

The thread MPI single rank max thread count for non-Intel was 6,
this was smaller than the max allowed MPI+OpenMP thread count of 8,
which caused setups to be generated that did not pass the check.
Increased 6 to 8 and added an assertion.

Change-Id: I13787616d7c667cba3245da4f5b5c3a1a6a1206d

8 years agoDocument how to add and use NVML support
Mark Abraham [Mon, 20 Apr 2015 22:13:17 +0000 (00:13 +0200)]
Document how to add and use NVML support

Change-Id: I8ca7c5d1b163a78559a048ca6cc5b099f34c6cd6

8 years agoAvoid GPU data race also with OpenCL
Mark Abraham [Mon, 29 Jun 2015 22:32:52 +0000 (00:32 +0200)]
Avoid GPU data race also with OpenCL

Implements the same change to non-local stream synchronization as now
used for CUDA.

Fixes #1756

Change-Id: I720edc0951f97dcff0bd477084fff45a149f01d9