Mark Abraham [Mon, 31 Oct 2016 11:39:40 +0000 (12:39 +0100)]
Merge branch release-2016
Trivial conflicts for version number and the fix for gmx
wham duplicated in each branch.
Change-Id: I0ba030398cc2d3679841000a40db6e8a3f7b68cb
Teemu Murtola [Wed, 26 Oct 2016 18:44:12 +0000 (21:44 +0300)]
Support normalizing values in KeyValueTree
Make it possible to normalize values stored in a KeyValueTree to match
an Options structure. This makes the types etc. consistent in the tree.
This is mainly useful for reducing variability in tpr files for better
forward/backward compatibility management, but can also be nice for
producing consistent mdp output files from grompp (if we want to keep
that feature).
Change-Id: Ib5ea03faaa690c84076c1ada0c0a08ddf9a1a128
Roland Schulz [Fri, 21 Oct 2016 10:17:38 +0000 (03:17 -0700)]
Replace qsort/bsearch with std::sort/lower_bound
Change-Id: Ic8dc3d86f9738751e463065a012ff1adc02bdf7c
Berk Hess [Tue, 21 Jun 2016 10:00:24 +0000 (12:00 +0200)]
Add gmx dump option for printing parameters
For comparing topologies of the same system with different force
fields it can be very useful to print bonded parameters instead
of the parameter type index.
Change-Id: I06a3b65b695ace4de1491f2d58abb6b7e752693d
Mark Abraham [Fri, 28 Oct 2016 21:18:02 +0000 (23:18 +0200)]
Bumped version to prepare for next patch release
Change-Id: I5f72d87d3b0ed4c06edade7188471ea12ed31046
Mark Abraham [Tue, 25 Oct 2016 09:35:54 +0000 (11:35 +0200)]
Version 2016.1
Bumped regressiontests hash and minor soversion as usual.
Change-Id: I339d70a29553be8662a2a5d3ebb1a11d8361af34
Berk Hess [Tue, 11 Oct 2016 20:08:02 +0000 (22:08 +0200)]
DLB can now turn off, when slower
Under certain conditions, especially with (shared) GPUs, DLB can
decrease the performance. We now measure the cycles per step before
turning on DLB. When the running average of cycles per step with DLB
gets above the average without DLB, we turn off DLB. We then measure
again without DLB. DLB can then turn on again. If we turn on DLB of
DLB multiple times in close succesion and we measure performance loss,
we keep DLB off for the remainder of the run. This procedure ensures
that the performance will never deteriorate due to DLB.
Updated and expanded the DLB section in the manual.
Change-Id: I6e0291c1a41adf6da94fae46d36e0fcb95585a02
Szilárd Páll [Tue, 25 Oct 2016 17:33:30 +0000 (19:33 +0200)]
GPU-related additions to the install/user guide
Additions:
- clarification of OpenCL compile- and run-time dependencies;
- rewrote info about OpenCL-enabled run requirements / peculiarities;
- added section on reducing overheads in GPU runs (related to both
CUDA and OpenCL).
Change-Id: I310ab5605b46b4ed90db87d4ce022005c9b26419
Berk Hess [Tue, 4 Oct 2016 07:39:37 +0000 (09:39 +0200)]
Fix DLB timing with CUDA and OpenCL
With OpenCL the time for the local non-bonded to finish on the GPU
was ignored in the dynamic load balancing. This change lets OpenCL
take the same code path as CUDA.
Also the cycle wait limit of 50 Kcycles was far too small for both
CUDA and OpenCL. It now 2 Mcyles, based on measurements.
Note that with OpenCL we should have access to accurate host and
device timing (unlike with CUDA), but we will not use that in
a release branch.
Change-Id: I5b401fdeae7ab0b426a33baf01a3dbeb7d0d924e
Szilárd Páll [Tue, 25 Oct 2016 23:29:01 +0000 (01:29 +0200)]
Make -cl-fast-relaxed-math default
The change makes fastmath default and changes the previous env-var
trigger to GMX_OCL_DISABLE_FASTMATH to allow disabling it for testing.
It is known to be faster on all supported platforms (and we use it in
CUDA too) and it has been planned to be enabled for the r'16 release.
Change-Id: I8d196c9a14785ff43aae144ed95c3cb29241c83b
Szilárd Páll [Tue, 25 Oct 2016 22:52:37 +0000 (00:52 +0200)]
Add GMX_DISABLE_GPU_TIMING env var
It disables timing for both CUDA and OpenCL so on the long run
it can replace both.
Change-Id: I3556d87c135eba2e24935e77a0d608b72219b284
Teemu Murtola [Fri, 30 Sep 2016 19:17:22 +0000 (22:17 +0300)]
Electric field mdp parsing using options
Make the module declare a structured set of options, as well as a
transform from a flat mdp structure to this set of options.
Use these for assigning the input values, instead of passing t_inpfile
directly.
There is one regression introduced here: values not specified in the mdp
file are no longer automatically inserted with defaults, and comments
related to the electric field input values are lost. With just the
electric field affected, this should not be a big deal, but that can
limit adoption of this approach until we can solve it (preferably, by
changing the mdp format to something where it is easier).
Change-Id: Ic71275f3533f06ce6fee64983c7e1686b782fb9b
Teemu Murtola [Fri, 21 Oct 2016 14:17:32 +0000 (17:17 +0300)]
Support for default values from Options to KeyValueTree
Make it possible to copy default values from an Options structure to a
KeyValueTreeObject for values that are not present in the original tree.
Also, sort the tree values in the order they are present in the Options
object.
Basic things work, but this will require some generalization in the
future.
Change-Id: If1dd59a11d34af19e16712de12fee705c9b814f2
Aleksei Iupinov [Mon, 24 Oct 2016 10:58:27 +0000 (12:58 +0200)]
Treat CUDA files as C++ during cppcheck
CUDA sources (*.cu) were treated as plain C for cppcheck purposes,
but should be treated as C++.
Some outdated CUDA suppressions removed.
Change-Id: I26fb768464660da1e569dda6d844a63ee2823313
Mark Abraham [Fri, 21 Oct 2016 21:12:04 +0000 (23:12 +0200)]
Update install guide
Some recent traffic on gmx-users suggested some
improvements.
Change-Id: Iaaf116ebf582755a466048aed1cd30bc123dc817
Teemu Murtola [Thu, 20 Oct 2016 16:04:15 +0000 (19:04 +0300)]
Clean up option (default) value access
Currently, the only user for valueCount() and formatValue() in
OptionInfo was actually interested in the default values, and limiting
access to the default values only makes the responsibilities clearer.
So replace both methods with a single method that returns just the
default values. The internal implementation currently places some
limitations on when this can actually be called, but that should not be
a problem for current or future uses.
Change-Id: I3e68ce397ec3f40f62ececad4ee6b87d0ecc790e
Roland Schulz [Fri, 21 Oct 2016 14:06:08 +0000 (07:06 -0700)]
Suppress cppcheck warning
Change-Id: I7b212df760c3dfb0020c41f9050e70d8c4be7b48
Mark Abraham [Tue, 18 Oct 2016 15:32:06 +0000 (17:32 +0200)]
Update cppcheck support to 1.76.1
Suppressed some classes of warnings where cppcheck was systematically
failing (for at least some source files). Added assert statements
to cover others.
Propagated some const correctness.
Replaced some block_* macros with templated functions in a header
that we re-use in a few places.
The gmx_arpack and lapack issues were inherited from the original
FORTRAN.
The simd/support.cpp issue is a bug that is fixed in release-2016.
Removed some unnecessary stderr output.
Noted TODOs for further cleanup.
Change-Id: Ia93690e3dbd529ef27e5b7f8331d12a2f7d34766
Teemu Murtola [Mon, 10 Oct 2016 15:59:13 +0000 (18:59 +0300)]
Serialization support for KeyValueTree
Implement serialization of KeyValueTree objects to xdr files for use in
storing inputrec values using this format.
There is a C++ ISerializer interface in between to support testing, but
in the future, this could possibly be replaced with more direct xdr
serialization. However, our current gmx_system_xdr.cpp does not support
in-memory serialization, which would be a requirement for broadcasting
the data structure, so the ISerializer can provide a useful abstraction
also for this.
Change-Id: I6836d8e7f725c364336e09745052521eccf331ce
Mark Abraham [Sun, 16 Oct 2016 21:58:10 +0000 (23:58 +0200)]
Upgrade coverage matrix.
Add support for CUDA 8.0, and migrate responsibilities. This will have
the side effect of actually using bs_nix1204 again for testing master,
because it is the only GPU slave that currently has CUDA
8.0. bs_nix1310 still has the CUDA 6.5 job, and some non-GPU jobs.
Removed specification of cmake-3.5.2 which isn't necessary to be
sure that we check in pre-submit testing.
Change-Id: I559189e74f366fa1523fa6a8ad650471df4fcfb3
Mark Abraham [Tue, 18 Oct 2016 15:16:02 +0000 (17:16 +0200)]
Fix SIMD suggestion for VMX
Change-Id: Iebf55611512bf02d2a1a5780a1d6c05ce4b16023
Erik Lindahl [Sun, 21 Feb 2016 21:31:01 +0000 (22:31 +0100)]
New classes for spline interpolation tables
Quadratic and cubic spline tables can be constructed either
from analytical functions or numerical vector input, and they
can contain an arbitrary number of functions as multi-tables.
Spacing is optimized to achieve the requested precision.
To make the class more generic it works with functions and
derivatives, and avoids worrying about swapping signs to get
forces. The interpolation functions are templated and will also
work with SIMD, without exposing any table internals.
Change-Id: If75f52b0601ad4b396d3cef74b5bbbe81ba91753
Teemu Murtola [Wed, 12 Oct 2016 17:09:26 +0000 (20:09 +0300)]
Support option assignment from different precision
Make it possible to assign a value from float to DoubleOption and from
double to FloatOption. This is needed to support tpr serialization for
cases where the code reading the file is different precision than what
wrote it.
Change-Id: Ib2268b343e4abbe70868d0d60b66559b8052c239
Teemu Murtola [Sun, 9 Oct 2016 18:33:06 +0000 (21:33 +0300)]
Add support for reading values from refdata
This is the easiest way to support tests in child changes for
serialization. Some alternative approach may be possible in the future,
when the serialization approach matures, but I seem to recall there have
been requests for this functionality also in other contexts. There is
some less-than-ideal behavior (in particular, a newly created test fails
if it uses this functionality, and only succeeds when you actually
create the reference data).
Also add support for a separate type of unsigned char reference values,
to support serialization tests.
Change-Id: I35ee9d43a0737a342f756cda0e7a789273ce1d9e
Teemu Murtola [Sun, 2 Oct 2016 18:26:16 +0000 (21:26 +0300)]
Improved error handling for KeyValueTree operations
Support an error handler for operations involving KeyValueTrees to allow
for better error messages during mdp parsing.
Change-Id: I3738b956baafe7a4ecb96ec6f9e4729541d74bf8
Berk Hess [Sat, 15 Oct 2016 08:52:06 +0000 (10:52 +0200)]
Move energyhistory_t out of t_state
We have three different types of states in mdrun:
1) the microstate of the system we are simulating
2) history information for output
3) the state of the simulation machinery in mdrun
The struct energyhistory_t clearly belongs to 2) and is therefore
moved out of t_state, which should eventually only contain 1).
TODO: Consider what to do with the other structs in t_state that
(also) store history rather than the state of the simulated system.
Note: reverts recent commit
ec827264
Part of #2059.
Change-Id: Ie84a19efcd0a170c0aaafe18c06275b7fb15244a
Teemu Murtola [Tue, 12 Apr 2016 17:53:43 +0000 (20:53 +0300)]
Improved address sanitizer support
Use support in CTest 3.1+ for parsing ASAN output. Work around various
bugs in CTest to make this actually work. Remove an OS X workaround,
since it does not appear necessary with a recent XCode toolchain.
Use newer clang to get LeakSanitizer.
Change-Id: I37002bffd653e04b52ba340a97d2806851f692b8
Teemu Murtola [Sat, 15 Oct 2016 03:11:17 +0000 (06:11 +0300)]
Work around memory leak in t_state
Use std::shared_ptr for t_state.enerhist, which should have the same
semantics as the earlier plain pointer, but ensure that the memory gets
eventually freed.
Change-Id: Ibe291261eb4997035a5165130ee01d309a1dc395
Teemu Murtola [Fri, 14 Oct 2016 18:32:35 +0000 (21:32 +0300)]
Fix most memory leaks recently introduced
- Do not overwrite memory allocated in init_mtop() when creating
molecules in selection tests.
- Add function to properly deallocate t_topology and gmx_mtop_t when
gmx_mtop_t_to_t_topology(..., false) has been called.
- Free all memory in done_mtop().
These should be enough to (again) make the unit tests free of memory
leaks, except that t_state.enerhist is leaked in a few places. That
requires more complicated handling.
Change-Id: I84b853b9cb8a11c0458ea4f29316a83a41d7ae22
Berk Hess [Thu, 18 Aug 2016 20:40:48 +0000 (22:40 +0200)]
Apply Berendsen P-couple at nstpcouple steps
Berendsen pressure coupling was applied at step%nstpcouple=1. Since
there is no need for this, this is changed to step%nstpcouple=0.
This also simplifies the P-coupling management.
Note that this change prevents continuation from old checkpoint files
for Berendsen P-couple runs, since the step-1 pressure is removed.
Change-Id: I5e2e6b1a1d5cb347ebdd6c1a402b41280bedff68
David van der Spoel [Fri, 14 Oct 2016 06:41:25 +0000 (08:41 +0200)]
Fixes some memory leaks associated with testing applied forces
Fixes memory leaks associated with the electric
field test. Implemented a done_commrec function.
There may be need for a done_domdec as well but
that falls outside the scope of this patch.
Change-Id: Ib86629bb7959b064b6ac3a57d4bb96e2dd3bfe94
Teemu Murtola [Thu, 29 Sep 2016 18:44:49 +0000 (21:44 +0300)]
Use gmx_mtop_t in selections, part 3
Convert remainder of the selection code to use gmx_mtop_t.
Part of #1862.
Change-Id: Icb1c4a30cc5456e64ed2d73f93ca4a7d6dbfbfbd
Teemu Murtola [Tue, 21 Jun 2016 18:42:59 +0000 (21:42 +0300)]
Use gmx_mtop_t in selections, part 2
Use gmx_mtop_t throughout low-level selection routines, i.e.,
centerofmass.cpp, poscalc.cpp, and indexutil.cpp. Adapt test code,
which is now using gmx_mtop_t throughout as well.
In places where gmx_mtop_t is actually accessed, the changes are as
local as possible. In most cases, some additional restructuring could
give better performance and/or much clearer code, but that is outside
the scope of this change.
Part of #1862.
Change-Id: Icc99432bddec04a325aef733df56571d709130fb
Teemu Murtola [Tue, 21 Jun 2016 18:42:59 +0000 (21:42 +0300)]
Use gmx_mtop_t in selections, part 2
Use gmx_mtop_t throughout low-level selection routines, i.e.,
centerofmass.cpp, poscalc.cpp, and indexutil.cpp. Adapt test code,
which is now using gmx_mtop_t throughout as well.
In places where gmx_mtop_t is actually accessed, the changes are as
local as possible. In most cases, some additional restructuring could
give better performance and/or much clearer code, but that is outside
the scope of this change.
Part of #1862.
Change-Id: Icc99432bddec04a325aef733df56571d709130fb
Berk Hess [Thu, 13 Oct 2016 12:28:36 +0000 (14:28 +0200)]
Extend mtop_lookup.h
Added three lookup functions that will be used in the selection code.
Harmonized the functions by making all functions that look up
a single object return a reference.
Replaced uses of mtopGetAtomParameters() that only used the mass
(which is nearly all) by mtopGetAtomMass().
Change-Id: Ibbe9729502038cd1f863433ce03a80dc544e4003
Teemu Murtola [Sun, 2 Oct 2016 04:58:38 +0000 (07:58 +0300)]
Add back-mapping to KeyValueTreeTransform
Add ability to map paths from the output structure of the transform back
to the original structure, which will be useful for error messages.
Change-Id: I9dded5a517fa72177219294596e5c23bec7785ce
Teemu Murtola [Thu, 15 Sep 2016 19:08:02 +0000 (22:08 +0300)]
Update bundled TNG
This commit bundles
6e41191016 from the TNG repo.
Required TNG 1.7.10 in future, which is the first version to include
support for the build system features used here.
Update the build system to use imported targets and interface properties
that TNG now provides. Add support for building TNG that also bundles
zlib, which reduces the dependency footprint of GROMACS, which is
important for portability and ease of installation.
Refs #1908.
Change-Id: Ibc94d5a9470136331045738f105634ec95fdb455
Teemu Murtola [Sun, 2 Oct 2016 05:20:12 +0000 (08:20 +0300)]
Getter for mapped paths from KeyValueTreeTransform
This allows identifying which values the transform will use. In the
long run, this may be replaced with another mechanism (or removed
altogether), but for now, this makes it easier to do piecewise
transition from old mdp parsing to using KeyValueTree and options.
Currently, the values are returned in alphabetical order, but subsequent
work may need this in the order the rules are added. That will be easy
to change internally to the transform.
Change-Id: I3f225ce4f693644e5ac17685f0a887eec02807a8
James W. Barnett [Tue, 11 Oct 2016 13:09:55 +0000 (08:09 -0500)]
Set maxwarn to INT_MAX if GMX_MAXCONSTRWARN < 0
maxwarn is set to the value of the environmental variable
GMX_MAXCONSTRWARN, and we tell users to set that variable to -1 to have
no maximum. This condition was not being checked, so when set to -1 just
1 SETTLE warning was enough to halt the program. This commit fixes
that behavior by setting maxwarn to INT_MAX if GMX_MAXCONSTRWARN is -1
(or any other negative number).
Fixes #2058.
Change-Id: Ie6e2cb57f8402dd9a327f72f7fad36db19b8bb68
Teemu Murtola [Mon, 20 Jun 2016 17:59:30 +0000 (20:59 +0300)]
Use gmx_mtop_t in selections, part 1
Make the C++ analysis framework (and insert-molecules, which is also
using selections) use a gmx_mtop_t as the initial internal format to
load the topology, and make SelectionCollection::setTopology() use an
mtop. Adapt tests. One test is disabled as it is much easier to
re-enable it after the next step in the conversion process than in this
intermediate state.
Internally, the mtop structure is still converted to t_topology for use
in lower levels and in the tool code.
This change also makes it possible to convert the analysis tools and gmx
insert-molecules to use gmx_mtop_t independently from changes in the
selection code.
Part of #1862.
Change-Id: I3ce03c6524b27f0f44168890ac1a4a491da52a4c
Teemu Murtola [Fri, 17 Jun 2016 05:49:40 +0000 (08:49 +0300)]
Wrap sel. method evaluation parameters to struct
This removes about 1/3 of t_topology instances in the selection code,
reducing the number of lines that need to be changed when switching to
gmx_mtop_t.
Also make most of the contents const.
Related to #1862.
Change-Id: Idcd71bc578a6daa4644f049a31f84e74717c258a
Mark Abraham [Wed, 12 Oct 2016 12:01:18 +0000 (14:01 +0200)]
Make regressiontests updater build work for master branch
Forgot to resolve this TODO in the merge.
Change-Id: I5ec487e5335ca34509ee1c0fc5f8b841d1718d0d
Berk Hess [Wed, 12 Oct 2016 14:35:21 +0000 (16:35 +0200)]
Fixed exception in usused result
Change
f2854f89 introduced an code path in NPT_energy() of which
the result is, as of yet, unused. Here MassQ->Winv was uninitialized.
This could cause tests to fail with a floating point exception.
Change-Id: I7973336fb34ed50e7eb87da63af964058fd1aef0
Berk Hess [Mon, 10 Oct 2016 07:08:05 +0000 (09:08 +0200)]
Fixed print bug in gmx wham
Change-Id: I1957d1213498c25dff0f9257a51aa89af8cf03b8
Berk Hess [Mon, 15 Aug 2016 09:51:56 +0000 (11:51 +0200)]
Refactor NPT energy calculation
The NPT conserved energy quantity calculation is now managed by
a single function with separate functions for each thermo- and
barostat.
Change-Id: Id7cf431e4da78bffe33caaddb0a7c806c9c29091
Berk Hess [Mon, 14 Dec 2015 14:18:40 +0000 (15:18 +0100)]
Restructure leap-frog integrators
There are now 2 template function for MD leap-frog integration
instead of 4 branches in multiple functions.
In addition to invmass, mdatoms now contains invMassPerDim.
invMassPerDim is set to zero for encode frozen dimensions, so LF
update functions no longer need to check the freeze groups.
Also removed the conditionals for vsites and shells in the LF update
functions. Their velocities are now set to zero at startup.
A template function for the most common leap-frog integrator setups
allows for full SIMD acceleration, at least for AVX with gcc5.
Changed dt from double to real in the update, since we need far less
than real precision.
Changed calculation of alpha for VV to real, as it is passed as real.
Fixed multiple time stepping with Parrinello-Rahman and Nose-Hoover.
Fixes #2031.
Fixes #2032.
Change-Id: Iae5e787f1338b99c2338c9d0c1f14e90393e9252
James W. Barnett [Tue, 11 Oct 2016 16:07:36 +0000 (11:07 -0500)]
fix typo
Change-Id: Iee8170173b5c4f02361e588260985d7ddf24f198
Mark Abraham [Sat, 8 Oct 2016 23:35:10 +0000 (01:35 +0200)]
Update for FFTW 3.3.5
The auto-download now gets FFTW 3.3.5 and builds it properly,
including with --enable-vsx when GMX_SIMD is set to VSX, i.e. for
Power8, and --enable-avx512 when GMX_SIMD is any of the AVX flavours
(which is safe on non-512 now, works on KNL, and is presumed useful
for future AVX512 architectures).
Note that 3.3.5 does not automatically add avx and sse support if
configured with --enable-avx2, so changed the documentation
accordingly.
Change-Id: I2a48ec1cb4f812dcae18870e0afcaf1120da251b
Teemu Murtola [Mon, 20 Jun 2016 17:55:59 +0000 (20:55 +0300)]
Support concurrent t_topology and gmx_mtop_t use
Make gmx_mtop_t_to_t_topology() take a boolean flag that specifies
whether to free memory from mtop or not. This makes it possible to
convert an mtop to a t_topology and then use both in subsequent code.
This in turn makes a piecewise conversion from t_topology to gmx_mtop_t
possible.
Using these two concurrently currently always leads to memory leaks, but
these should mostly be temporary during the conversion, and can be
sorted out separately if necessary.
Part of #1862.
Change-Id: Iccd6039c2226d1dc617963878e5640bb53f09ad6
Teemu Murtola [Wed, 15 Jun 2016 17:26:14 +0000 (20:26 +0300)]
Check atom mass availability in selections
Check for the availability of atom masses before using them in
selections, and give fatal errors early instead of asserts when
accessing the masses. Try to load the masses on demand if not
available.
Change-Id: If288d2b3920b92c6994aee8b7ff96c85ce3f6cb8
Berk Hess [Tue, 27 Sep 2016 12:50:05 +0000 (14:50 +0200)]
Speed up mtop_util atom lookup
The lookup of atom indices and properties on global atom index have
been sped up by moving functions to a new header file mtop_lookup.h
and by storing start and end global atom indices in gmx_mtop_t.
Another performance improvement is that the previous molblock index is
used as starting value for the next search.
The atom+residue lookup function now also returns the reside index.
This change also simplifies the code, since we no longer need a lookup
data structure.
A large number of files are touched because the t_atom return pointer
is changed to const also in the atomloop functions.
Change-Id: I185b8c2e614604e9561190dd5e447077d88933ca
Mark Abraham [Mon, 10 Oct 2016 22:49:37 +0000 (00:49 +0200)]
Merge "Merge branch release-2016"
Aleksei Iupinov [Mon, 10 Oct 2016 10:28:54 +0000 (12:28 +0200)]
Fix trivial PME memory leaks
This fixes still not all, but most of the memory leaks.
Change-Id: Iccd4ec5432df845665fedad411ac8fc83898c767
Mark Abraham [Sun, 9 Oct 2016 21:46:47 +0000 (23:46 +0200)]
Merge branch release-2016
Resolutions straightforward apart from the question about the
correctness of the gmx_wham fix in release-2016 branch.
Change-Id: I908a9a6d8f5767da49c3f00495beeec2a4f95ca7
Szilárd Páll [Mon, 26 Sep 2016 22:10:48 +0000 (00:10 +0200)]
Correct kernel launch bounds for CUDA sm_60
The GP100 architecture has half the SM size (64 ALUs) compared to 5.x
hence 64 threads/block already achieves maximum occupancy and the
incorrectly tweaked launch configuration is not optimal. This change
reverts the incorrectly increased block size in
cc4214a.
Change-Id: I9be10acfb3650c778401d04dfcd52aa200f78ff4
Berk Hess [Tue, 7 Jun 2016 14:03:47 +0000 (16:03 +0200)]
Add readConfAndTopology
readConfAndTopology will replace read_tps_conf, reading to gmx_mtop_t
instead of to the deprecated t_topology struct.
With requireMasses=TRUE, read_tps_conf will generate a fatal error when
an atom is not found in the mass database, as it was originally
intended, since we don't want to calculate with incorrect masses.
The availability of masses is signaled by the haveMass bool in t_atoms.
The trajectory analysis framework now works with optional masses.
This is done by not requiring masses and attempting to look up masses
from the database when they were not present in the structure file.
Refs #1862.
Change-Id: I045649fa458a08415fd319c568d15ad514a30a9f
Mark Abraham [Thu, 15 Sep 2016 15:29:27 +0000 (16:29 +0100)]
Add script for Jenkins regressiontest update job
This job can generate regressiontests reference data. Intended to be
triggered on regressiontests change that lacks some reference data,
either because it's a new test case, or the old data was deleted in
that patch. Jenkins will build the code, run the test harness to
generate new reference data and attempt to add it to the git index.
If files were added, then update the commit and push it back to
gerrit.
The actual implementation is in the releng repository.
When merging to master branch, update the gcc version to 4.8.
Change-Id: I70542022af00773f58646c617fbf818cdf8f577e
David van der Spoel [Mon, 23 Nov 2015 22:32:48 +0000 (23:32 +0100)]
Modularize electric field handling
Move external electric field code to a C++ class where only a single
place in the code is responsible for initializing it, and everything
else operates only on relatively general interaces. Details of the
electric field stuff is encapsulated within the class.
Moved the files into new directory applied-forces.
Added manual section for electric fields.
The interfaces may need more generalization to support more complicated
modules like the pull code, but that is better done when actually moving
those parts to this approach. Various considerations are documented in
mdmodules.h and inputrect.h.
Part of #1972.
Change-Id: I513632c74a8fae28b5f1087a3b5781791a2627bd
Berk Hess [Wed, 5 Oct 2016 19:47:43 +0000 (21:47 +0200)]
Changed fr->f_novirsum to PaddedRVecVector
Commit
74474d6f forgot to also change f_novirsum in t_forcerec
to PaddedRvecVector.
Change-Id: Ib8880d904dbad4049e6e2cee08fa74e2a17911a2
Teemu Murtola [Sat, 1 Oct 2016 04:53:34 +0000 (07:53 +0300)]
Support different key matching in KeyValueTreeTransform
Support case-insensitive and mdp-style dash-insensitive string
matching in KeyValueTreeTransform. Required to use this for mdp
transformations.
Change-Id: I20661f721880e26844f0c38a7582c26f376e6a62
Teemu Murtola [Wed, 5 Oct 2016 18:24:16 +0000 (20:24 +0200)]
Merge "Merge branch release-5-1 into release-2016" into release-2016
Mark Abraham [Mon, 3 Oct 2016 15:09:57 +0000 (17:09 +0200)]
Merge branch release-5-1 into release-2016
Change-Id: I38cba3159387519af07195a5995b0986dac5a2d6
Mark Abraham [Mon, 3 Oct 2016 10:00:52 +0000 (12:00 +0200)]
Replace use of deprecated readdir_r
clang 3.8+ warn about the deprecation of readdir_r. The main issue
here is support for concurrent access to the same directory stream,
which is never something GROMACS is likely to do. Currently the only
use is implementing enumerateFilesWithExtension which is used
single-threaded by pdb2gmx for discovering force fields in the
database. So we can replace the use of readdir_r with readdir, which
is simpler, and offers other advantages listed in man readdir_r.
Documented the new restriction on the interface of
DirectoryEnumerator. There are no current uses of nextFile that
would be affected by the change.
Change-Id: I0b80554493ff80e8857f0431192e22cfe7db5b22
Justin Lemkul [Mon, 3 Oct 2016 11:32:58 +0000 (07:32 -0400)]
Fix incorrect charge in HISE.
Revision
1a60bdbfb5e6b11e52783a6afa26e615f15f1be0 introduced an
incorrect charge on HISE CG, which leads to a fractional charge
on the residue. Any simulation with this charge will be wrong.
Fixes #2013
Change-Id: I9f80daf3dda2cd71715d4e15d6c868c6e47b48cc
Philip Loche [Wed, 28 Sep 2016 11:49:13 +0000 (13:49 +0200)]
EW3DC for non-neutral systems
Add the corrections to force and energy according to
Ballenegger, Arnold, and Cerdà, J. Chem. Phys. 131, 094107 2009
(http://dx.doi.org/10.1063/1.
3216473).
Added a warning in grompp for charged systems with Ewald.
Added a ref to Hub2014a too to help users change their mind.
Change-Id: I96a2ab51fede9b448d4c725d703faf71342e7346
Berk Hess [Fri, 30 Sep 2016 14:41:15 +0000 (16:41 +0200)]
Fix inputrec initialization in 4 tools
Commit
41e0f9cc changed t_inputrec initialization to a factory,
but forgot to convert 4 tools that had t_inputrec on the stack
(and thus all segv).
Change-Id: I0d75d7e62d66f5ff8d02d6970229db18a40a9d65
Berk Hess [Tue, 6 Sep 2016 09:32:58 +0000 (11:32 +0200)]
Use std::vector in t_state
Changed x, v and cg_p pointers in t_state to PaddedRVecVector.
PaddedRVecVector is currently std::vector<RVec> and is always
sized with one element extra for 4-wide SIMD (gather) loads.
But this will be replaced by a proper class.
t_state is now freed by the default destructor with some issues:
* ekinstate_t is fully converted to std::vector in a child change
* state struct of special algorithms still need conversion
Changes to t_state propagate over large parts of the core code.
This change extracts rvec pointers at intermediate levels to
make this single change manageable.
The state in EM also needed to be updated, which led to a lot
of changes in minimize.cpp, especially to do_lbfgs() which was not
yet converted to use em_state_t.
Change-Id: Ib6ead1f13741ead8dbeeddd118ecdd4bf1cc6584
Berk Hess [Wed, 8 Jun 2016 11:40:59 +0000 (13:40 +0200)]
Add flags for optional t_atoms entries
Instead of checking for (non-)NULL pointer, we can now determine
the presence of optional entries in t_atoms using booleans.
Moved the mass generation from confio.cpp to a function in atoms.cpp.
Most changes are caused by checking havePdbInfo iso pdbinfo!=NULL.
Change-Id: I6e2c8ffaa2240056f34da4c93f1713c40a00f391
Jochen Hub [Thu, 21 Jul 2016 10:03:40 +0000 (12:03 +0200)]
Fixed bug in gmx wham for reading pullx files.
Because the order of columns in the pullx files has changed recently, gmx wham
did not pick the reaction coordinate from pullx.xvg if the COM of the pull
groups were written. gmx wham was tested with various pull options and geometries.
Change-Id: If487e0493992c76649dc9a596c8df56d331abf22
David van der Spoel [Mon, 12 Sep 2016 11:15:20 +0000 (13:15 +0200)]
Fixed script xplor2gmx.pl to work with GMXDATA
Change-Id: I25c8857cfdd992679f3be9a6ab59c9a74c0df0c8
David van der Spoel [Tue, 20 Sep 2016 19:03:44 +0000 (21:03 +0200)]
Fixes issue with Release build in correlation functions.
Introduced build-type dependent code in the manyautocorrelation.cpp
but without the corresponding ifdef in the test. Now the test fails
in Release type. Error introduced in commit
Ief04a37de3d3bc9695603f025517ce169bf9e49a
Change-Id: I4ceffbe309c848f730d733421a2c95052ef04794
Teemu Murtola [Sat, 24 Sep 2016 18:57:16 +0000 (21:57 +0300)]
Fix default nice level in mdrun-only build
Now an mdrun-only build should default to zero nice level, the same as
'gmx mdrun' in a normal build.
Change-Id: I50dcf3be93bdba0d03bf6816c15c7c6729db0005
Berk Hess [Mon, 19 Sep 2016 13:52:16 +0000 (15:52 +0200)]
Fix gcc warning in AlignedAllocator
Both gcc4.8 and gcc5 warn about an unused parameter,
despite the gmx_unused qualifier.
Change-Id: I0896a4ea8c9cb94af90a1f72ae4d6a593a082c33
Berk Hess [Mon, 12 Sep 2016 08:49:06 +0000 (10:49 +0200)]
Remove state duplication in serial runs
Without domain decomposition the local and global state should be
identical. This is easier to ensure with a pointer copy and this also
uses less memory than copying all data. It also gets rid of copy code.
Change-Id: Idad2748a83290b8506e03bb699ebede4d5987dcb
David van der Spoel [Tue, 21 Jun 2016 11:34:24 +0000 (13:34 +0200)]
Made correlation function routine use std::vector
In order to clean up the correlation function routine presented
the data as std::vector<std::vector<real> > rather than real **.
manyautocorrelation.cpp does not use snew and friends more.
Routine throws gmx::InconsistentInputError when the input is
inconsistent.
Change-Id: Ief04a37de3d3bc9695603f025517ce169bf9e49a
Roland Schulz [Fri, 16 Sep 2016 00:45:33 +0000 (17:45 -0700)]
Fix math-test false positive
Depending on the accuracy of the floating point division, the
input of the test function could be 1ulp too large or too small.
If it was too large the result of the test function wasn't
within 4ulp and the test failed.
Change-Id: Ia322b136d1db9b25c7c733e4067f927a4c77e372
Roland Schulz [Fri, 16 Sep 2016 01:14:49 +0000 (18:14 -0700)]
Better optimized ICC release flags
Add those flags included in -fast which both helps performance
and are appropriate for GROMACS.
The flags included in -fast for Linux we weren't using were:
-ipo, -no-prec-div, -static, -fimf-domain-exclusion=15
Full static depends on static libraries to be installed and thus
will not always work. IPO increases compile time by a huge factor.
We do require that extreme values (e.g. large negative arguments
to exp and large positive to erfc) are computed correctly.
This leaves -no-prec-div -fimf-domain-exclusion=14 -static-intel
as safe and useful flags for GROMACS.
Change-Id: Ifbee69431841e3051c95f0b4c0ad204aac965c4e
Berk Hess [Fri, 16 Sep 2016 07:38:24 +0000 (09:38 +0200)]
Fixed unused variables in domdec.cpp
Fixed unused variables in domdec.cpp when configured without MPI.
Change-Id: I844ab59e16eb2fbde97ed3893ba6dea5679dca34
Berk Hess [Fri, 16 Sep 2016 11:40:25 +0000 (13:40 +0200)]
Merge branch release-2016
Change-Id: I0c8c02d4fbd56042ad77e7b646323b2570d06c7c
Berk Hess [Wed, 10 Aug 2016 10:23:03 +0000 (12:23 +0200)]
Made distance restraints work with threads and DD
The NMR distance restraints use several buffers for summing distances
that were indexed based on the index of the thread+domain local ilist
force atoms. This gives incorrect results with OpenMP and/or domain
decomposition. Using the type index for the restraint and a domain-
local, but not thread-local index for the pair resolves these issues.
The are now only two limitations left:
* Time-averaged restraint don't work with DD.
* Multiple copies of molecules in the same system without ensemble
averaging does not work with DD.
Fixes #1117.
Fixes #1989.
Fixes #2029.
Change-Id: Ic51230aa19a4640caca29a7d7ff471e30a3d9f09
Aleksei Iupinov [Tue, 13 Sep 2016 12:50:11 +0000 (14:50 +0200)]
Move the PME Ewald coefficients to the PME structure
Ewald coefficients no longer get passed every step to gmx_pme_do().
Instead, they are passed to gmx_pme_(re)init,
as they only change together with the grid size, not every MD step.
Change-Id: Iea75063cf060317e3f0fcfd147431520b6c83a90
Berk Hess [Thu, 8 Sep 2016 14:24:40 +0000 (16:24 +0200)]
Moved expanded ensemble history to pointer in t_state
Data of special modules such as expanded ensemble should be stored
in pointers in t_state. This is also needed for converting t_state
to C++ without converting all special modules at the same time.
Change-Id: I22e5a939638ac318eb8167fee5f1097c1f1981e0
Roland Schulz [Thu, 1 Sep 2016 21:15:42 +0000 (14:15 -0700)]
Tidy: modernize-use-emplace
run-clang-tidy.py -checks=modernize-use-emplace -header-filter=.* -fix -j80
http://llvm.org/releases/3.9.0/tools/clang/tools/extra/docs/clang-tidy/checks/modernize-use-emplace.html
Change-Id: I57a17487837f7afacc915d1c3cbf13c802c2a83c
Berk Hess [Thu, 8 Sep 2016 13:27:05 +0000 (15:27 +0200)]
Change ED and swapstate to pointers in t_state
Data of special modules such as ED and swapstate should be stored in
pointers in t_state.
This is also needed for converting t_state to C++ without converting
all special modules at the same time.
Change-Id: If8c7cb197f325ccf113aeebd807491ebd5a7b169
Mark Abraham [Wed, 31 Aug 2016 21:42:34 +0000 (23:42 +0200)]
Preliminary clean up of NVML code
Restructured logic so that it's simpler - there's multiple reasons why
we might not be able to change clocks, so now we just return after any
check that fails. No functionality changes here.
nvml_initialized does not need to persist.
Reading driver and runtime version is not needed.
Fixed some spelling.
Noted TODOs for subsequent cleanup.
Change-Id: I5e4cf73a470e60f53f098f7d28742403111f7da0
Berk Hess [Wed, 7 Sep 2016 07:58:57 +0000 (09:58 +0200)]
Add const to thread-MPI functions
Added const qualifiers to send buffer pointers for Several thread-MPI
functions. This is required by the MPI 2 standard and allows us to
use more const qualifiers in the GROMACS communication code.
Note that internally thread-MPI does not distinguish send and receive
buffers, so we need cast away the const.
Change-Id: I0fe03fd92325b9030c8584349c958deb20b30bfd
Vedran Miletić [Wed, 31 Aug 2016 18:52:46 +0000 (20:52 +0200)]
Document wallcycle counters and subcounters
List the available counters and explain how they are used. For subcounters,
explain the difference to counters and mention how to enable them.
Change-Id: Id5ce0e99b37a899f84d10b799840abad27d15c9c
Teemu Murtola [Sun, 11 Sep 2016 06:04:03 +0000 (09:04 +0300)]
Fix various memory leaks
These leaks are reported when building and running the tests with
LeakSanitizer (ignoring regression tests and tests marked as integration
tests).
- Free memory on 'gmx help -export completion' paths, which also fixes
all 'gmx help <module>' paths.
- Free all memory in genconf on exit to make the gmxpreprocess tests not
leak memory.
- Add settle_free() to free memory properly in mdlib tests.
- Add missing sfree in done_state() (fixes leaks in read_tps_conf() for
tpr files).
- Add missing virtual destructor in IOptionValueStore (various leaks
from correct destructors not getting called).
- Free the final symbol in selection parser in case the parsing ends
after the maximum number of selections has already been provided.
- Add missing frees in selection test helper for atom type strings.
Change-Id: I0d796033ce3b30cda0a18743a28f4d3133fd477f
Vedran Miletić [Tue, 30 Aug 2016 18:18:13 +0000 (20:18 +0200)]
Print OpenCL error string instead of error code
Change-Id: I00871b7f295373d8497a13d0bc3cbd0c0ff99668
Berk Hess [Wed, 7 Sep 2016 08:53:29 +0000 (10:53 +0200)]
Remove continuation from convert_tpr
Removed the obsolote option of convert_tpr to write a tpr file for
continuation using a trajectory and energy file. This is superseded
by checkpointing.
Change-Id: I46c49621a8cca247d5a9429961d85e6028fefb14
Aleksei Iupinov [Fri, 15 Apr 2016 14:34:12 +0000 (16:34 +0200)]
Fix PME data destructor not being called
The existing function gmx_pme_destroy is now being called at MD run end.
Erroneous memory freeing has been fixed.
Added freeing of pme_atomcomm_t.
Change-Id: I8761d2dbc168ec9d4e0e042fec788e39fb3e3ae5
Mark Abraham [Thu, 8 Sep 2016 10:40:51 +0000 (12:40 +0200)]
Merge branch release-5-1 into release-2016
Trivial conflicts in minimize.cpp from bug fix in same region that now
has exceptions caught within an OpenMP region.
Change-Id: I8b3c269a2afd7d4967e0f7310c96af6022533ddd
Mark Abraham [Thu, 8 Sep 2016 08:07:13 +0000 (10:07 +0200)]
Bumped patch number to prepare for future 5.1.5 release
Change-Id: I37e3120ec8ab257f0aeb1cf137dff27391e0689f
Mark Abraham [Wed, 7 Sep 2016 12:39:33 +0000 (14:39 +0200)]
Version 5.1.4
Bumped SOVERSION_MINOR and REGRESSIONTEST_HASH
Change-Id: Ib8404367c7ac15e0de567bf103f5ceb5d4dd5091
Mark Abraham [Mon, 5 Sep 2016 15:49:22 +0000 (17:49 +0200)]
Removed HIS1 from oplsaa and charmm definitions
HIS1 is intended for linking with heme, which oplsaa doesn't
define. charmm converts HIS1 to HSD in its .r2b.
This makes the recent fix for oplsaa HISD "consistent" with HIS1.
Fixes #2047
Refs #2049
Change-Id: Ibc0463c779e76689dc7ef65e48aedc716de9e032
Mark Abraham [Mon, 5 Sep 2016 15:32:19 +0000 (17:32 +0200)]
Fix LYN charges in amber03
These charges now match those found in AMBER 14 and 16. The
validation of the AMBER ports was done with AMBER 8.0, and
this fix was made afterwards in
http://ambermd.org/bugfixes/8.0/bugfix.19 (and perhaps LYN wasn't
in the validation set).
Fixes #2046.
Change-Id: Ibcaab337b527a44e42d5a7c68f71ef4fde2acf66
Mark Abraham [Tue, 6 Sep 2016 13:57:00 +0000 (15:57 +0200)]
Fix amber03 HIP charges
These were changed in Nov 2005, and now match AmberTools 16
Fixes #2050
Change-Id: I191b60c6acd2f521b3481578114ff48fca0979e5
Teemu Murtola [Mon, 30 May 2016 19:56:22 +0000 (22:56 +0300)]
Clean up CTest test management
- Add explicit timeouts to CTest tests. These should work better than
the current Jenkins timeout: it should produce better JUnit test
reports, and should catch also tests that end up in an infinite loop
printing stuff. The timeouts are still quite generous, since at least
the coverage run can take a while.
- Use a more easily extensible and better encapsulated mechanism for
producing the messages about missing tests with 'make check'.
- Abort if running a non-MPI test binary with MPI instead of trying to
run it on the master rank, since it might deadlock.
- Clean up the macros used to register CTest tests and use a clearer set
of test labels, and move more logic into src/testutils/CMakeLists.txt.
- Resolve various TODOs.
Change-Id: Ia1370d99eabd5839682832e8c3c60668a667cdde
Erik Lindahl [Fri, 5 Aug 2016 10:05:26 +0000 (12:05 +0200)]
Bump oldest cmake, compiler and CUDA versions required
For release 2017 we now require gcc-4.8.1, clang-3.3 and icc-15, so we
can rely on full C++11 support. We now also require CUDA-6.5 and
CMake-3.4.3. This in turn means we can remove some older cmake tests,
and since many users won't read the install guide there are now
version tests that produce fatal errors during CMake configuration for
compiler versions we know are too old.
Various hacks and workarounds in source and build system can
now be removed.
Fixed error in previous definition of GMX_ALIGNED
Updated C++11 compatibility tests in line with code we are now using.
Fixed that hwloc includes were not treated as system headers.
Treated including thread-MPI and TNG header files as system paths, to
be consistent with how we'd treat them if we were using external
versions of these.
Fixed icc 16 warnings in lapack routines.
Fixes #2012.
Change-Id: I36e02379a985b22c72f0f06481c65cae6e780c02
Mark Abraham [Mon, 27 Jun 2016 17:18:12 +0000 (19:18 +0200)]
Work around glibc 2.23 with CUDA
Note: Cherry-pick of
e2cd2e2e from the 2016 branch.
Fixes #2022
Change-Id: Id9881efb3f26af341b9c89b4bd1f983a2149c9e4