Mark Abraham [Tue, 7 Feb 2017 13:27:05 +0000 (14:27 +0100)]
Merge branch release-2016
Minor clashes mostly from nullptr and logger introduction in master
branch. Resolved all in favour of release-2016 logic implemented with
in master-branch functionality.
Change-Id: Ic30ce3b3aadaab6e74f6d9606ca00fb275a6ccb3
Mark Abraham [Tue, 7 Feb 2017 13:22:22 +0000 (14:22 +0100)]
Bumped version to prepare for next patch release
Change-Id: I2a2ee89a0c8123ff870292b418d76afe2d542189
Mark Abraham [Fri, 20 Jan 2017 10:43:43 +0000 (11:43 +0100)]
Introduced system preparation section to user guide
This gives us somewhere we could document the use and limitations of
vdwradii.dat better.
Enchanced documentation of solvate and insert-molecules, similarly.
Refs #2094
Change-Id: I019948472dfc308c1acd74d4fce271ba4d481ead
Mark Abraham [Sun, 5 Feb 2017 20:11:24 +0000 (21:11 +0100)]
Version 2016.2
Bumped regressiontests hash and minor soversion as usual.
Change-Id: Ib005dda4f70e40c79d5911f53c08b1d358fe2948
Berk Hess [Wed, 9 Nov 2016 21:25:53 +0000 (22:25 +0100)]
Add mdp option check with decoupled modes
When atoms involved in an angle with constrained bonds have very
different masses, there can be very weakly coupled dynamics modes.
Default mdp settings are often not sufficiently accurate to obtain
equipartitioning. This change adds a grompp check for this issue.
Part of #2071.
Change-Id: I64323154c38abe23b8d38d9d539d2a713a5c35e0
Mark Abraham [Sun, 5 Feb 2017 20:03:24 +0000 (21:03 +0100)]
Merge branch release-5-1 into release-2016
Resolved conflict in gmx_order in favour of newly
corrected code from release-5-1 branch.
Change-Id: I7ed58873c0629bd33e18dd887d63b6ee8af7e32b
David van der Spoel [Wed, 1 Feb 2017 19:06:25 +0000 (20:06 +0100)]
Fixes SEGV in gmx order.
gmx order used a cumbersome floating point method to compute
an index in a histogram leading to index -1. The present code
is simpler and robust, in fact the old code was likely wrong.
Fixes #2104
Change-Id: Ic3c15917eebe6c4964cd5cb053dfa4f05781cb73
Mark Abraham [Thu, 26 Jan 2017 15:08:46 +0000 (16:08 +0100)]
Remove typedef struct in some mdtypes files
The idiom
typedef struct { /*...*/ } t_foo;
is a C anachronism we use in some places, that permits the use of
t_foo without struct, but inhibits the use of
struct foo;
forward declarations in all headers that include such structs,
etc.
Removed this so that in future, e.g. the interface of IForceProvider
can use these structs in name, rather than resort to hackery on void
pointers (as we do for force reduction buffers for different reasons).
Regenerated the group-scheme kernels, which all now need to refer to
struct t_forcerec because they compile as C.
Change-Id: I5eb07aa018c54cc74df6dfc918b559e84ea996a8
Mark Abraham [Fri, 5 Feb 2016 17:40:28 +0000 (18:40 +0100)]
Clarify use of tau-p and pcoupltype
grompp used to permit "tau-p = 5 5" which is misleading. The recent
fix for #1893 leads to the user receiving a grompp warning, so this
improves the docs to make clear that pressure coupling is not
implemented like temperature coupling (where different time constants
might be used).
Refs #1893
Change-Id: I8328b30a12689795c7af2d12dfc94db11b78a03a
Berk Hess [Thu, 2 Feb 2017 20:54:00 +0000 (21:54 +0100)]
Really fix array of complex in cross_corr
A recent fix in cross_corr did not fix a double precision FFT call
in single precision.
Fixes #2109.
Change-Id: Iefe11508b9e8c5dd255851063ab1e7bd95abe196
Berk Hess [Tue, 31 Jan 2017 15:03:35 +0000 (16:03 +0100)]
Fix array of complex in cross_corr
An array of complex number was created as an array of pointers and
then passed to gmx_fft_1d. This does not work.
Fixes #2109.
Change-Id: If28cf6d3b586615ee4857a89d937f7083287d209
David van der Spoel [Thu, 2 Feb 2017 07:34:55 +0000 (08:34 +0100)]
Only print all dangling atoms with grompp -v
Fixes #2108
Change-Id: I28ec7498e52fb7a3a81ffcd6764e8edd3ae1b367
Mark Abraham [Tue, 31 Jan 2017 14:14:36 +0000 (15:14 +0100)]
Merge branch release-5-1 into release-2016
Change-Id: I5726f23a376f1be0052afdd917537f03f703760e
Mark Abraham [Fri, 27 Jan 2017 15:58:09 +0000 (16:58 +0100)]
Fix multi-domain reruns
3da127 broke multi-domain rerun by failing to consider the
logic within rerun_parallel_comm.
Fixes #2105
Change-Id: I3b38a248a4fba5b3d46f0275add75948ef7a9c53
Mark Abraham [Fri, 20 Jan 2017 15:08:24 +0000 (16:08 +0100)]
Don't print invalid performance data
If mdrun finished before a scheduled reset of the timing information
(e.g. from mdrun -resetstep or mdrun -resethway), then misleading
timing information should not be reported.
Fixes #2041
Change-Id: I4bd4383c924a342c01e9a3f06b521da128f96a35
Aleksei Iupinov [Fri, 2 Dec 2016 13:46:49 +0000 (14:46 +0100)]
PME spline computation and charge spreading tests
Unit tests for PME spline parameter calculation and charge spreading on CPU.
Test 2 grid sizes, PME orders from 3 to 5, normal and triclinic boxes,
configurations of 1, 2 and 13 atoms.
Spline parameters, gridline indices and real-space grid are tested as outputs.
Change-Id: Ie2ece38c407ad957991f428ec2600c33bed9b78a
Szilárd Páll [Mon, 23 Jan 2017 19:22:01 +0000 (20:22 +0100)]
Remove unused argument in GPU kernels
The helper functions of potential switch non-bonded GPU kernels ended up
with leftover C6/C12 arguments which this commit removed.
Change-Id: I99b9c1cbb255bf00c5da56395bd336e7c57e64a0
Aleksei Iupinov [Thu, 19 Jan 2017 13:45:57 +0000 (14:45 +0100)]
Add const qualifier to some PME spread arguments
Change-Id: I4c9f35e84a2b4a09df5b0842c4ec68dbaad35ca1
Mark Abraham [Mon, 7 Nov 2016 11:49:51 +0000 (12:49 +0100)]
Stopped header files including state.h
This reduces the number of source files that depend on state.h from
about 97 to 43, thereby reducing compilation coupling.
Removed depencency of boxutilities on t_state, which didn't seem
useful or necessary.
Change-Id: I72517330909767a5a31975b6d545dc1d8fc8d8a7
David van der Spoel [Sat, 21 Jan 2017 19:01:56 +0000 (20:01 +0100)]
Added reference for dihedral function in OPLS.
The OPLS four-term dihedral function was not described in the
reference listed earlier, so this was updated. Also updated
the reference to the three term dihedral to an older paper.
Change-Id: I3673572335a0fccaf6548c6adf38392af15e7964
Mark Abraham [Sun, 22 Jan 2017 13:56:19 +0000 (14:56 +0100)]
Fixed gmx rmsf -q -oq.
xref was used instead of pdbx in that case, which led to a PDB file
containing B-factors to have the coordinates based on those from the
-s file, rather than -q file. The tool description (and the other
logic) suggests that using -q should be the behaviour, in particular
because the contents of xref were then unused. gmx rmsf -oq was
otherwise fine.
Also fixed where xref was being abused as a temporary vector, which
asks for more such trouble, so improved that (without changing
functionality).
Noted TODO that npdbatoms might not match top.atoms.nr leading to
possible segfaults.
Change-Id: Id2c14fa5ca93c2a8de87f9bfa144a6db38fcc97f
Mark Abraham [Mon, 7 Nov 2016 15:59:59 +0000 (16:59 +0100)]
Removed init_state
Made a simple zero-initializing constructor for t_state and the
structs of some of its members. Called them classes. Later, we might
prefer to require explicit initialization with actual values, so that
tools can detect the use of uninitialized values and find our bugs,
but for now having a constructor is a useful initial step in that
direction.
Extracted some new functions that cover some of the incidental
functionality that was also present in init_state.
Made state.lambda a std::array, thereby removing the need to consider
resizing it, and converted client code to be passed an ArrayRef rather
than hard-code the name of the specific container. This caters for
convenient future refactoring of the underlying storage, and sometimes
needing to implicitly know what the size of the container is.
Passing an ArrayRef by value is consistent with the CppCoreGuidelines,
but has potential for performance impact. Doing this means that a
caller pushes onto the stack a copy of the object (containing two
pointers), rather than previous idioms such as pointer + size, or
pointer + implicit constant size from an enum, or pointer + implicit
size in some other parameter. This could mean an extra argument is
pushed to the stack for the function call, compared with the
alternatives of pushing a pointer to data, pointer to container, or
pointer to ArrayRef. In all cases, the caller has to load the pointer
value via an offset that is known to the compiler, so that aspect is
probably irrelevant. So, we would probably prefer to avoid calling
functions that take such parameters in a tight loop, or where multiple
containers share a common size. But the uses in this patch seem to be
of sufficiently high level to be an acceptable trade of possible
performance for improved maintainability.
Change-Id: I17e7d83cfc89566f76fa9949c425b950ad6aef62
Mark Abraham [Tue, 10 Jan 2017 16:07:41 +0000 (17:07 +0100)]
Initialize GMX_*_LIBRARIES cmake variables earlier
NVML linking got broken by the way the introduction of separate
variables also set them to empty initial values, but did so after
gmxManageGPU.cmake tried to set GMX_EXTRA_LIBRARIES.
Made minor improvements to the documentation
Fixes #2098
Refs #2087
Change-Id: I25116c6caa0d13bf9bb06854c8e3a1e3f7e8afb2
Berk Hess [Fri, 9 Dec 2016 10:19:26 +0000 (11:19 +0100)]
Disallow overwriting of dihedral type 9
It is no longer allowed to repeat blocks of parameter of multiple
lines for dihedrals of type 9. It is also no longer allowed to
override parameters or dihedrals of type 9. Both are too complex
to properly check. It is still allowed to repeat parameters blocks
consisting of a single line.
Repeating a block with the same parameters would lead to incorrect
dihedral potentials and forces.
Fixed bug in arrayref.h interfaces.
Fixes #2077.
Change-Id: I802c6714a9700744df4e6b5ea96e41aa82793388
Roland Schulz [Fri, 20 Jan 2017 08:00:50 +0000 (00:00 -0800)]
Fix missing break in switch
Introduced by
74474d6f
Also make compile with -Wimplicit-fallthrough which is default
with gcc 7.
Change-Id: Ib9f315d2c7d78a3db471350652e29682993398b6
Berk Hess [Fri, 20 Jan 2017 10:27:36 +0000 (11:27 +0100)]
Only predict shells with velocities
For integrators without velocities (EM, NM, BD), shells are now only
predicted for the initial configuration, because velocities are
required for predicting shells at normal integration steps.
Change-Id: If585d2b221a87b829fafa1b9f775a8bd5bc53498
Aleksei Iupinov [Wed, 14 Dec 2016 17:14:13 +0000 (18:14 +0100)]
Simplify gmx_count_gpu_dev_unique()
Simplified counting of GPUs in use.
A redundant call to gmx_gpu_sharing_supported() is also removed,
as it should only be used during the GPU assignment stage.
Change-Id: I203f5b270dc8d1bbb87cb9b847ff9a77b7e703e5
Aleksei Iupinov [Mon, 10 Oct 2016 10:23:10 +0000 (12:23 +0200)]
PME B-Spline moduli computation unit test
Added PME B-spline moduli computation unit test for
failing gracefully (throwing gmx::InconsistentUserInput)
or reproducing results correctly. Some PME memory leaks are fixed;
unique_cptr is used during the PME initialization
to avoid leaks in the failure tests.
Added checks on pme-order and grid size in grompp.
Change-Id: I6be93f94b6b17e901667bbd3d39c967be6cbe77e
Berk Hess [Tue, 17 Jan 2017 13:08:09 +0000 (14:08 +0100)]
Fix PME order and grid size checks
The PME grid size restrictions were not checked in grompp.
Now both grompp and mdrun check the grid size. Both checks are done
with the same minimum grid size independent of DD and OpenMP settings.
Renamed calc_grid to calcFftGrid and let it take the minimum grid size
into account.
Also corrected an assert that checked for pme_order>=4 iso 3.
Change-Id: I57b300f4a413ea2942fa671be67839be7ae16c39
Roland Schulz [Tue, 13 Dec 2016 01:39:52 +0000 (17:39 -0800)]
Add AlignedArray
Add a simd aligned version of std::array to make it easy to use
for simd usage cases.
Change-Id: I0cbaa9838eed28ca9594f4e4a0a7835637ab5513
Berk Hess [Tue, 17 Jan 2017 13:43:43 +0000 (14:43 +0100)]
Correct assert on pme-order
Change-Id: I2468a90d5aa46c84ea78d183327d7245862737c3
Mark Abraham [Sat, 14 Jan 2017 20:58:57 +0000 (21:58 +0100)]
Merge branch release-2016
Retained master branch version of fixes for ICC on windows.
Preserved the fix for
2efc195a97f92 despite refactoring of init_em.
Change-Id: Iae54ac040cb2d72d38b0bf3a0a762a9384e4c02d
Roland Schulz [Fri, 13 Jan 2017 22:37:53 +0000 (14:37 -0800)]
Enable uncrustify for template
Change-Id: I24c99cab4eedf49ad028a5aced280e0766a2b9e1
Roland Schulz [Tue, 10 Jan 2017 20:01:23 +0000 (15:01 -0500)]
Tidy: modernize-use-nullptr
Result of:
run-clang-tidy.py -checks=modernize-use-nullptr -header-filter=.* -fix -j80
git checkout src/external src/gromacs/selection/scanner.cpp src/gromacs/selection/parser.cpp
Fixed in fft5d that MPI_COMM_NULL is used.
Details of check:
http://llvm.org/releases/3.9.0/tools/clang/tools/extra/docs/clang-tidy/checks/modernize-use-nullptr.html
Change-Id: If9f5c6c553659b0ddcc44ac9399d141b21f6f22f
Roland Schulz [Fri, 11 Nov 2016 23:31:06 +0000 (15:31 -0800)]
Fix AVX512 issues in debug mode
- Usage of loadu_p(s|d) could cause memory error.
Was fine with O3 because instruction is fused with broadcast.
- Wrong aligned stack variable. O3 uses register.
Change-Id: I4de8fad35872e83105c5f6461b9f6d4e84f8e648
Mark Abraham [Tue, 20 Dec 2016 05:53:52 +0000 (16:53 +1100)]
Document ISerializer class
Change-Id: I85f84bb2538a8583781a62b8f1789701939b8c69
Roland Schulz [Fri, 21 Oct 2016 19:25:32 +0000 (12:25 -0700)]
Supress ICC 16 on Windows false postives
Change-Id: I7ef020d12a7f0dbbb9e0ddf60bdc6b8a671652b4
Roland Schulz [Thu, 5 Jan 2017 18:06:34 +0000 (10:06 -0800)]
Fix copyright year of previous commit
Change-Id: Ia75e70d23db7ad3e8b17aa167fb35ae3ffd42a91
Berk Hess [Tue, 3 Jan 2017 13:32:47 +0000 (14:32 +0100)]
Fix flat-bottom position restraints + DD + OpenMP
When using flat-bottom position restraints with DD and OpenMP
a (re)allocation was missing, causing a segv.
Fixes #2095.
Change-Id: I03af546a0b8d03a3d384d86a2582a67584e72d46
Aleksei Iupinov [Thu, 5 Jan 2017 14:32:29 +0000 (15:32 +0100)]
Fix compilation with CMAKE_CXX_FLAGS="-Wall -Werror"
Refs #2073
Change-Id: I9223b13e8abd251d56378052ace4fb4e9169a2aa
Roland Schulz [Sun, 13 Nov 2016 23:42:50 +0000 (15:42 -0800)]
Fix unitialized memory access
Also properly check that valid values don't throw
Change-Id: Ice00da7225e49fc5550caeba00be9eb778c737d6
Gerrit Code Review [Thu, 5 Jan 2017 02:13:19 +0000 (03:13 +0100)]
Merge "Merge branch release-5-1 into release-2016" into release-2016
Mark Abraham [Tue, 20 Dec 2016 11:57:54 +0000 (22:57 +1100)]
Stop trying to use objdump --reloc on Mac
Recent Xcode objdump does not support --reloc.
The warning that is based on the output of running objdump was only
implemented to work on Linux-like things, so should not spam the cmake
output on other platforms.
Change-Id: I8fae927e9f4d31de3510269c0d30bd1f10e825e6
Mark Abraham [Wed, 4 Jan 2017 02:05:11 +0000 (03:05 +0100)]
Fix documentation of OptionsVisitor
Change-Id: I343931b42232b124eb7105cd6f5b27350e56bd43
Mark Abraham [Tue, 3 Jan 2017 16:18:42 +0000 (17:18 +0100)]
Merge branch release-5-1 into release-2016
Skipped
9e6144061f4f as instructed by its commit message.
Change-Id: Ie275096b0e99723b56747f46f5ca667d9f84b5f0
Aleksei Iupinov [Thu, 22 Dec 2016 14:13:19 +0000 (15:13 +0100)]
Remove unused member thread_one from the PME spline structure
Change-Id: Ie6e684ddc8e6f392d4a0ba28d745d68f1066e7d9
Mark Abraham [Tue, 20 Dec 2016 05:17:34 +0000 (16:17 +1100)]
Corrected documentation about eigenvalue handling
Some file format docs were out of step with the implementation in
eigio.cpp.
The behaviour of gmx anaeig -eig -eig2 was not properly documented.
Change-Id: I55c4a0ab640f026e6e8a424203d54379e634a5b6
Gerrit Code Review [Tue, 20 Dec 2016 20:34:20 +0000 (21:34 +0100)]
Merge "Merge branch release-2016"
Mark Abraham [Thu, 24 Nov 2016 12:30:20 +0000 (13:30 +0100)]
Improve build system for plugin support
The mdrun-only and prefer-static-libs builds set the default for
BUILD_SHARED_LIBS to off, which silently disabled plugin support.
Converted GMX_LOAD_PLUGINS to tri-state ON/OFF/AUTO so that if the
preconditions for support are not met we can have suitable behaviour
in each case. We now write to the status line only when something
relevant changes, and issue a usefully descriptive fatal error only
when the user's request cannot be satisfied.
Renamed and reimplemented VMD_QUIETLY as EMIT_STATUS_MESSAGES.
Moved the reorganized code to its own source file.
Refs #2082
Change-Id: I0ad2d8423abbc8d8cb409e74325f2b00831644ea
Mark Abraham [Sat, 10 Dec 2016 07:32:32 +0000 (18:32 +1100)]
Sanitize some include headers
readinp.h was being used to acquire dependencies transitively, and was
being used where not required. Used some forward declarations where
suitable. Removed some C-style typedef struct to help with that.
This should help speed up compilation while doing some clean up I am
considering.
Change-Id: Iee7f0e523fdcc4c12d2a6a6e375b6739f63e65c5
Mark Abraham [Tue, 20 Dec 2016 12:03:37 +0000 (23:03 +1100)]
Merge branch release-2016
No conflicts
Change-Id: I175809e0b4f6ebf7dbbe668de66c47c318954b55
M. Eric Irrgang [Wed, 14 Dec 2016 00:21:24 +0000 (19:21 -0500)]
Fix syntax in cmake status message
Change-Id: I9ab793fe7d11e979fbc1cbd5ab3ec8ed6189dbb8
Roland Schulz [Fri, 25 Nov 2016 06:04:08 +0000 (22:04 -0800)]
Add create_unique_with_deleter
A more flexible alternative to unique_cptr. Takes also
non-void deleter functions or lambdas as argument.
Change-Id: I25c1d7d9ed63556cc42230f3da578dc449116d78
Roland Schulz [Thu, 24 Nov 2016 02:02:45 +0000 (18:02 -0800)]
Replace scoped_cptr with unique_cptr
scoped_cptr only exists for historic reasons
Change-Id: Ie77ce22855cbd440bc51d31cf9c1d5d5b30e10eb
Vedran Miletić [Mon, 12 Dec 2016 18:40:57 +0000 (19:40 +0100)]
Improve include sorter error reporting
Change-Id: I5fe5d1ad6a4001cff6ae8a2b109e831c5e3eb433
Mark Abraham [Sat, 10 Dec 2016 03:59:27 +0000 (14:59 +1100)]
Removed support for multiple entries in mdp files
This was never used.
Refs #2074
Change-Id: If97800cc75b809080abb407ec3f9a885c8f95b5c
Mark Abraham [Mon, 12 Dec 2016 03:28:35 +0000 (14:28 +1100)]
Handle warninp correctly in xpm2ps and membed
The code should not (over)write the output file before checking for
errors. For membed, it is useful to require the user to fix issues in
their input file before we unilaterally over-write it.
Called done_warning where it was omitted, which in the case of membed
meant that errors were not fatal when they should be.
Change-Id: I3c87f6bd99691b12d66906df3cc9980373429439
Mark Abraham [Tue, 13 Dec 2016 22:11:00 +0000 (09:11 +1100)]
Fix misleading parallelization docs for gmx wham
Change-Id: I5bbadc4fc9b9af6bcd2a6ea1a848eae262e4fd8c
Berk Hess [Thu, 8 Dec 2016 11:20:23 +0000 (12:20 +0100)]
Add bonded #thread runtime check
Replaced a debug assertion on the number of OpenMP threads not being
larger than GMX_OPENMP_MAX_THREADS by fatal error.
But since the listed forces reduction is actually not required with
listed forces, these are now conditional and mdrun can run with more
than GMX_OPENMP_MAX_THREADS threads.
Fixes #2085.
Change-Id: I7a6049d727924cd0b4df10a3525f9e7aec49c3dc
Teemu Murtola [Mon, 12 Dec 2016 19:39:12 +0000 (21:39 +0200)]
Merge branch release-2016
Conflicts:
cmake/gmxVersionInfo.cmake
Add a suppression for Intel compiler warning in generated code in
scanner.cpp.
Change-Id: I3a6310c433a50202fbc76e53570a491bd3d06544
Teemu Murtola [Sun, 20 Nov 2016 08:02:25 +0000 (10:02 +0200)]
Minor CMake cleanup & modernization
- Our minimum CMake version now supports BYPRODUCTS for
add_custom_target(), which allows simplification of
gmxCustomCommandUtilities.cmake.
- Specify USES_TERMINAL for targets that provide status output for nicer
usability with Ninja.
- Rely on add_custom_command() automatically marking its outputs as
generated.
- Update the minimum required version for building the template to match
the main project.
- Do not unnecessarily put regressiontests MD5 to the cache.
- Fix the branch used for regression tests download for git builds.
Change-Id: Iee9a7e67d694724ad79cce9801bea670ef2f94c8
Teemu Murtola [Thu, 1 Dec 2016 19:18:53 +0000 (21:18 +0200)]
Build scripts for improved release workflow
Add build scripts to support extracting version info from
gmxVersionInfo.cmake, and to update the regressiontests MD5.
Part of #2066
Change-Id: I916439c1be26823b4e366aea4e7fcded6de21659
Mark Abraham [Thu, 8 Dec 2016 16:47:09 +0000 (03:47 +1100)]
Fix logic of TRR reading
Commit
f7d4d019 introduced a bug where TRR reading reaching the end of
the file was indistinguishable from a reading error or a magic-number
error. This is now fixed, restoring the end-of-file behaviour that
existed before
f7d4d019, while retaining the wrong-magic-number
behaviour that it introduced.
Refs #1926
Change-Id: Ic8540846c481f022bc6ae7b774794792c8c7a523
Mark Abraham [Fri, 9 Dec 2016 18:48:26 +0000 (05:48 +1100)]
Remove nxframe from t_trxstatus
This is unused. Probably xframe can go too, once the long-deprecated
read_firstx/read_next_x functions are removed.
Change-Id: Ibf6a4fc3c6e4d598383a1d85baf6303b2944749d
Szilárd Páll [Wed, 2 Nov 2016 23:52:32 +0000 (00:52 +0100)]
Turn off hwloc support when static lib found
Hwloc dependencies are not resolved at CMake time when static
libwloc.a is detected and in most of these cases link-time
errors will prevent building GROMACS. As it is hard for a user to know
how to solve such cryptic errors and hwloc is not a required dependency,
we turn off hwloc support when a static lib is detected. The user can
override this on the cmake command line.
Refs #1919
Change-Id: Ic3917e2e59ee4c291b78ee47150e513ae77ced85
Teemu Murtola [Tue, 6 Dec 2016 19:19:54 +0000 (21:19 +0200)]
Fix and clean up handling of some linking
Split GMX_EXTRA_LIBRARIES to several lists, depending on the intended
use of those libraries. Some of these also need to be linked by code
other than libgromacs, either because they are required by the public
headers (mostly -lm), or because also code outside libgromacs directly
references those libraries (e.g., MPI).
Should fix #2087.
Change-Id: Ie0e211b8f77a932ccd63017ee0743b78361624c4
Berk Hess [Thu, 24 Nov 2016 07:43:17 +0000 (08:43 +0100)]
Made mdrun -pforce terminate with non-finite forces
The mdrun option -pforce would print non-finite forces, but would
not terminate the run if any were found. Now a fatal error is issued.
Change-Id: Ie126904bd45acee4e5999db77e02fbe8b6b39226
Teemu Murtola [Sat, 3 Dec 2016 08:50:56 +0000 (10:50 +0200)]
Fix possible memory error with long selections
If a selection was more than 1000 characters long and there was a
whitespace exactly at the 1000 point, a buffer overflow could occur.
Replaced the buffer with std::string, simplifying the code
significantly. Update the generated code to use a newer flex, which
also removes the need for some suppressions.
Should fix #2086.
Change-Id: I56513bcf5ee99f05ce144461740d0f868be10186
Vedran Miletić [Fri, 16 Sep 2016 13:19:39 +0000 (15:19 +0200)]
Make editconf B-factor attachment more useful in practice
B-factor values will be added to residues unless an index is larger
than the number of residues or an option is specified. Protein residue
indices can start from any number and, in case they start from a large
number, there is no way to add B-factor values to residues.
This patch changes it to add B-factor values to residues unless the
number of B-factor values is larger than the number of residues.
Change-Id: Ifa67d6d6b5dc0f31e5b0d270ce255aece5ac7247
Mark Abraham [Sat, 19 Nov 2016 16:46:56 +0000 (17:46 +0100)]
Consolidate files supporting TNG file I/O
The distinction between mdrun and tools in supporting TNG file formats
isn't useful, and makes it difficult to implement a wrapper type that
will mean GROMACS code depends on tng_trajectory_t only in one
source file.
Change-Id: Iea0d337b6f11599a33c6c8ba3857a31a839f8d59
Mark Abraham [Wed, 7 Dec 2016 04:16:48 +0000 (15:16 +1100)]
Merge branch release-2016
Ignored fix to zlib management for GMX_EXTERNAL_TNG=on because that
was already a feature of the refactoring of TNG management in master
branch.
Change-Id: I8bc7ce196fb0d64685c6957b5055d73ff093d864
David van der Spoel [Mon, 28 Nov 2016 20:12:24 +0000 (21:12 +0100)]
Couple of new quotes
Change-Id: Idf02358ec11092e9d6e3c7e58397ad57bb94f00e
Teemu Murtola [Mon, 5 Dec 2016 19:26:27 +0000 (21:26 +0200)]
Fix use of position variables with plus/merge
If a selection contained a position variable (e.g., 'com of ...') that
was used more than once, and at least one of those uses was with
plus/merge, there were out-of-bounds memory writes. This was caused by
the internal position structure not getting fully initialized.
Incomplete initialization happens in all contexts with such variables,
but only plus/merge (and possibly permute) actually use the values that
remained uninitialized, which caused them to incorrectly compute the
amount of memory required to store the result.
Fixes part of #2086.
Change-Id: I016e796db268a11d557309935c02cbd1bc79a83c
Mark Abraham [Mon, 5 Dec 2016 22:54:01 +0000 (23:54 +0100)]
Fix memory handling in gmx dump of TNG files
Calling code in dump.cpp did not free the memory used in each loop
over different TNG data blocks. This is also more efficiently and
simply done with srenew, along with a final sfree.
Change-Id: I0fbfdc9acf3bc5f498ec3ec9b15da1c59bf4c271
Aleksei Iupinov [Mon, 5 Dec 2016 17:11:54 +0000 (18:11 +0100)]
Stop including parallel_3dfft.h in headers
Change-Id: I21565f240f892e8fa9596675795e47e1f7cd7087
Mark Abraham [Mon, 5 Dec 2016 13:25:54 +0000 (14:25 +0100)]
Remove undue narrowing of integer in TNG reading
This compromised the reading of TNG trajectories with sufficiently
large numbers of frames. Both types are 64-bit integers so we should
just do the obvious thing.
Change-Id: Id8dcaacc35231c6b4737d9924f70da3ac29e7408
Mark Abraham [Mon, 24 Oct 2016 15:45:24 +0000 (17:45 +0200)]
Add INSTALL-dev to aid people doing unusual builds
Occasionally it is useful to build GROMACS other than from an official
release tarball, e.g. when testing a new feature. The contents of this
file will help such people to find the right documentation, without
compromising clarity for normal installations from the tarball.
Change-Id: I38d957fe0d1ca2ba1e509ed30bb93a100f018306
Aleksei Iupinov [Fri, 28 Oct 2016 11:09:51 +0000 (13:09 +0200)]
Move GPU assignment functions into a separate file
2 GPU assignment functions (gmx_select_gpu_ids() and set_gpu_ids())
are moved from detecthardware.cpp to a new file hardwareassign.cpp
to separate the GPU scheduling from GPU detection. They are also renamed
for clarity: set_gpu_ids() to assign_rank_gpu_ids(),
gmx_select_gpu_ids() to gmx_select_rank_gpu_ids().
Related deprecated function print_gpu_detection_stats() is also moved,
and changed to only print errors in case of heterogenous MPI configurations,
like it was intended to.
sprint_gpus() is refactored.
Change-Id: Ieef402954194e747e4c6dc5535e0652b5f862e28
Mark Abraham [Thu, 1 Dec 2016 00:24:48 +0000 (01:24 +0100)]
Fix minor trjconv bug
gmx trjconv -novel -f in.pdb -o out.pdb did not work as was probably
intended, because ftpin had an excessive large scope plus a default
value, and was only set by the -vel path (which fortunately is the
default).
Minimized scope of ftp while I was there.
Change-Id: I6b7dadc109834384f6cfb19f61258fa30d52ef80
Teemu Murtola [Sat, 26 Nov 2016 05:07:00 +0000 (07:07 +0200)]
Additional selection help
- Explain resindex and resnr keywords in selection help.
- Explain how selection-enabled tools treat -s and -f input files.
Fixes #2083
Change-Id: I93e38c46a2bdb35f057688cf29fb3392712c2443
Berk Hess [Tue, 11 Oct 2016 12:16:22 +0000 (14:16 +0200)]
Change spline moduli calculation to double
Even though single precision seems enough, since the spline moduli
are only calculated once per grid, we should do this in double.
Also simplified the code by using the actual spline order, changing
and merged loops and removing a lot of unused variables.
Change-Id: If1bd3741a3efca14e6fefe1f80aa10cc31f84e42
Berk Hess [Fri, 14 Oct 2016 20:12:54 +0000 (22:12 +0200)]
Convert energyhistory_t to use std::vector
This change converts energyhistory_t and its child struct
delta_h_history_t to classes that use std::vector. Thus the init
and done routines and energyhistory.cpp are removed.
Part of #2059.
Change-Id: Ieb1f43d18187d4f8de5a21d043bcddcf6686280d
Berk Hess [Mon, 17 Oct 2016 12:29:52 +0000 (14:29 +0200)]
Use templating in checkpoint.cpp
The low level int, real and double writing routines have been
converted to a single template function. The listing functionality
has been moved to a separate function. Added functions for processing
more std::vector types.
Also fixes a bug causing memory corruption in gmx dump -cp.
Part of #2059.
Change-Id: Ia48e57841c7a2dfaa3aefd1f43f0cdc9c0034119
Mark Abraham [Thu, 17 Nov 2016 23:31:21 +0000 (00:31 +0100)]
Stop including tng_io_fwd.h
The two header files in GROMACS associated with TNG support only need
a forward declaration of the tng_trajectory type, and the typedef
tng_trajectory_t. For a build without TNG, that is all that is
required, because the pointer is never dereferenced. For a build that
uses TNG (whether bundled with GROMACS or installed on the systm), if
TNG no longer declares a type of that name, then compilation will fail
with or without this change.
Thus there is no change in quality of support of TNG from this change.
However, it does avoid a build configuration that does not use TNG
needing to be able to find one. This will be convenient for static
analysis support.
Also removed a useless include of tngio_for_tools.h.
Change-Id: I3438d3e1b0c38a62afec4ea3a7f6e977d6602d96
Aleksei Iupinov [Thu, 10 Nov 2016 12:34:46 +0000 (13:34 +0100)]
Move hardcoded PME grid indexing constants into header
Moved the table size factor of 5 to pme-grid.h as a constexpr.
Also changed the spread code that use the table to use a constexpr
for the offset, which in turn determines the table size.
Change-Id: Ief524e9510c0406f60973800f2e110c361128ef5
David van der Spoel [Thu, 18 Aug 2016 08:04:33 +0000 (10:04 +0200)]
Added first tests of bonded force functions.
Tests for bond_angle and dih_angle functions.
Some tests for bondeds, angles and dihedrals.
Part of #2034
Change-Id: I53835ff6fea98e8163505126d347150b64262770
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.
NOTE: cherry-pick of
b04a53c, skip when merging.
Change-Id: I5f269e609a5a095b93a44f43a6e67a0de40a38c7
Mark Abraham [Mon, 7 Nov 2016 16:54:49 +0000 (17:54 +0100)]
Enhanced ArrayRef
Added a non-explicit constructor also for std::array, so we can
use ArrayRef more often as a view of memory.
Most clients need to know that the storage has a starting pointer, is
contiguous, and has a given size, but doesn't care e.g. whether it can
be resized or inserted into. The interface for such clients should
express that, so we avoid ripples all over the code base when someone
finds a reason to switch between std::vector, std::array or perhaps
something custom.
Change-Id: I98d96281ab324f2c0d3d3188810295d0027e5fe5
Mark Abraham [Mon, 7 Nov 2016 15:58:42 +0000 (16:58 +0100)]
Created paddedvector.h
This permits forcerec.h to not depend on state.h, and creates a stable
location in which to implement e.g. PaddedRVecVector. There are now
about 25 fewer source files that depend on state.h.
Change-Id: I07c443dea45b394773d60f74b036584af5920cf8
Carsten Kutzner [Tue, 27 Sep 2016 09:31:39 +0000 (11:31 +0200)]
Increased the default reset step to 1500 in gmx tune_pme
Commit
785aad1a introduced a gmx_fatal() in mdrun for cases where
cycle counters are reset when PME tuning is still active. In
almost all cases, tuning takes longer than 100 steps (which was
the default at which gmx tune_pme would request mdrun to reset its
counters). This leads to gmx tune_pme reporting that all the
runs failed. Note that the small default of 100 steps was from times
where there was only DLB to account for, but not PME tuning.
With the increased default, this should happen only very rarely.
For future versions it would be nicer to implement a "-benchmarksteps"
command line parameter for mdrun which resets counters exactly after
PME tuning is finished and then performs a requested number of
benchmark MD steps. Refs #1781
Change-Id: Icbcce1ecc8a23d35302c04c9a6be13c06b1be8c8
Mark Abraham [Wed, 16 Nov 2016 15:33:05 +0000 (16:33 +0100)]
Remove unimplemented gmx trjcat -vel
Change-Id: Iae2e46c43b01d46fb0c6f0734c2de309a5395564
Carsten Kutzner [Tue, 15 Nov 2016 14:13:41 +0000 (15:13 +0100)]
Fixed typo in membed.cpp
Fixes #2076
Change-Id: Idcebb45ee85b478d7863ac55eb5cef62a2109bb8
Christoph Junghans [Thu, 3 Nov 2016 18:12:17 +0000 (12:12 -0600)]
cmake: fix build with GMX_EXTERNAL_TNG=ON
tng_set_source_properties is not defined in case of GMX_EXTERNAL_TNG=ON
due to the fact that BuildTNG.cmake never gets included. Also this
call isn't really needed tng doesn't get compile when external anyway.
Change-Id: Id3c7e0da55ce9ef8cf43d2aecaa187e965bf6ad2
Dan Horák [Tue, 8 Nov 2016 10:38:42 +0000 (11:38 +0100)]
Fix x86 conditional
The CpuInfoTest.SupportLevel testcase fails on s390x because wrong
condition in src/gromacs/hardware/tests/cpuinfo.cpp is used. Fixed
this by setting GMX_TARGET_X86 to 0 or 1 in all cases, both for
GROMACS CMake detection and GROMACS build.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=
1390149
Refs #2072
Change-Id: Id50fd65c6228a25f2bb2eca684d680a2b34d2263
Teemu Murtola [Sat, 4 Jun 2016 18:09:22 +0000 (21:09 +0300)]
Add selection-enabled gmx traj
For now, this tool only plots coordinates, velocities, and forces for
selections, so it should provide a full replacement for -ox, -ov, -of,
-com, and -mol from gmx traj.
Clean up implementation in other tools noticed while touching them.
Change-Id: Ia3b0e77353d9183ffc049d1e1fb0253e30332664
Roland Schulz [Fri, 21 Oct 2016 19:25:32 +0000 (12:25 -0700)]
Supress ICC 16 on Windows false postives
Change-Id: I7ef020d12a7f0dbbb9e0ddf60bdc6b8a671652b4
Aleksei Iupinov [Mon, 31 Oct 2016 16:29:41 +0000 (17:29 +0100)]
Remove imatrix type and related unused/erroneous code
Change-Id: I7fd80b7b05cbd3206668168964501856246de0b4
Szilárd Páll [Tue, 1 Nov 2016 11:28:17 +0000 (12:28 +0100)]
Merge "Merge branch release-2016"
Berk Hess [Tue, 1 Nov 2016 11:05:07 +0000 (12:05 +0100)]
Fix time label print in gmx vanhove
Change-Id: Ibf668e46622c2739ae44f950d1bbfadbbb67b276
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 that was duplicated in each branch.
Change-Id: I0ba030398cc2d3679841000a40db6e8a3f7b68cb