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
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