alexxy/gromacs.git
6 years agoBump required CUDA version to 7.0
Szilárd Páll [Mon, 23 Apr 2018 18:10:59 +0000 (20:10 +0200)]
Bump required CUDA version to 7.0

This simplifies cmake-time requirements as we can now require the same
CUDA version for all cases except MSVC. It also allows us to
unconditionally compile with the cudaLaunchKernel API and remove the
alternative chevron-notation at least in the nonbonded module.

Change-Id: I199f17151cb227fda9d76c1bf0d7fd73f1d31275

6 years agoSeparate PME GPU host-only and host/device data structures
Aleksei Iupinov [Wed, 18 Apr 2018 11:32:56 +0000 (13:32 +0200)]
Separate PME GPU host-only and host/device data structures

This distinction will be necessary with OpenCL.

Change-Id: I042624233e31264acb64f0bbc28c4ff736e50ebd

6 years agoSplit up special topics section in manual
Paul Bauer [Thu, 26 Apr 2018 08:34:09 +0000 (10:34 +0200)]
Split up special topics section in manual

Change-Id: I80cc67a076e7a42022028f05c2c7611c5c8c2768

6 years agoAdd copyFromDeviceBuffer() CUDA/OpenCL implementations
Aleksei Iupinov [Mon, 23 Apr 2018 10:22:35 +0000 (12:22 +0200)]
Add copyFromDeviceBuffer() CUDA/OpenCL implementations

Change-Id: Ib74f0bc65e97d74e09bdac312a90135251f72b60

6 years agoRevert "Tweak PME run mode checks"
Mark Abraham [Sat, 21 Apr 2018 16:51:16 +0000 (18:51 +0200)]
Revert "Tweak PME run mode checks"

This reverts commit 49ca05c7a05209845609c62f122ab7313b19dd39.

Change-Id: I412172df6832eeb0d9c7e03cc0e7e26a7c10439e

6 years agoSplit up topology section in manual
Paul Bauer [Thu, 26 Apr 2018 08:20:11 +0000 (10:20 +0200)]
Split up topology section in manual

Change-Id: Ie7773d15aabe6fdedabacebe5203224028fc4219

6 years agoSplit up algorithms manual page
Paul Bauer [Thu, 26 Apr 2018 07:53:01 +0000 (09:53 +0200)]
Split up algorithms manual page

Change-Id: I47c76d4aa6d6280237d76723604e5b9a1d024c6b

6 years agoAdd page breaks in reference manual
Paul Bauer [Wed, 25 Apr 2018 08:28:30 +0000 (10:28 +0200)]
Add page breaks in reference manual

Added manual page breaks between the different sections of the reference
manual in the LaTeX pdf build.

Change-Id: I6a9f1ae3608867ff683845dfdae16f6f1d795401

6 years agoSplit up Interaction functions manual page
Paul Bauer [Tue, 24 Apr 2018 16:02:12 +0000 (18:02 +0200)]
Split up Interaction functions manual page

First set of patches that split up the individual sections
of the reference manual into smaller pieces.

Also adding comments in CMake which chapters files belong to.

Starting with Interaction function and force fields.

Change-Id: Ia0175f548ef91fe9f39457490cd4087ccbd75f02

6 years agoRefactor SD update
Mark Abraham [Fri, 13 Apr 2018 11:39:31 +0000 (12:39 +0100)]
Refactor SD update

The former use of multiple boolean control variables made the logic
hard to follow. Without constraints, the two parts of the integrator
are fused, which is now expressed explicitly.

This means it is now clear that the second half of the sd update does
not compute anything from the foreces.

Removed some of the vestiges of the way we once had two SD
integrators.

Refs #2423, #1793

Change-Id: I39d4cd0b8568859220b3a592b138f3f4405f8991

6 years agoChange image conversion to only be build once
Paul Bauer [Mon, 23 Apr 2018 15:48:58 +0000 (17:48 +0200)]
Change image conversion to only be build once

Change to CMake so that the image conversion needed for the web version
of the reference manual is only done once.

Also added some comments to specify the changes to USeLatex.cmake
and corrected the usuage of variable names in the cmake scripts.

Change-Id: I1caf09e899467e4de7451892536db967a35814fa

6 years agoRemoved cu_realloc_buffered() in favor of reallocateDeviceBuffer()
Aleksei Iupinov [Fri, 16 Feb 2018 15:12:51 +0000 (16:12 +0100)]
Removed cu_realloc_buffered() in favor of reallocateDeviceBuffer()

Change-Id: I5f0d374f8e7e22505265f3cebc60fe29948ab6e9

6 years agoDeviceBuffer headers are added
Aleksei Iupinov [Tue, 13 Feb 2018 12:08:13 +0000 (13:08 +0100)]
DeviceBuffer headers are added

For now they contain templated versions of GPU memory (re-)allocation
and host-to-device copy routines. The DeviceBuffer declarations
and the freeDeviceBuffer() implementations are moved there as well.
Using those, the GPU pairlist allocation code is made look
mostly the same in CUDA and OpenCL. ocl_realloc_buffered() is
removed; cu_realloc_buffered() is to go next.

Change-Id: Ic724113d7d0ed6b4707d094010e11ccbcd5da3c5

6 years agoFix icc warning in post-submit
Szilárd Páll [Thu, 19 Apr 2018 13:50:25 +0000 (15:50 +0200)]
Fix icc warning in post-submit

icc refuses to understand GMX_UNUSED_VALUE.

Change-Id: Ieca8ad781e6f3bb7908f346a14367dc86ae8b15f

6 years agoAdd post-submit with ARM HPC Toolchain
Szilárd Páll [Fri, 13 Apr 2018 16:25:57 +0000 (18:25 +0200)]
Add post-submit with ARM HPC Toolchain

Using gcc-7 and armclang-18.2.

Change-Id: I0cd310786598b7c980af970849ba0de95b91d2ad

6 years agoTweak PME run mode checks
Szilárd Páll [Tue, 17 Apr 2018 17:51:59 +0000 (19:51 +0200)]
Tweak PME run mode checks

These should allow compile-time evaluation when mdrun is compiled with
GMX_GPU=OFF.

As the CPU-only build can now optimize out quite some code, this also
fixes a gcc 7 warning that an argument of pme_gpu_reduce_outputs()
may be used uninitialized.

Change-Id: I2397e0dc7e4e2f6587d01d94db27072938e85e7d

6 years agoConvert manual from LaTeX to Markup
Paul Bauer [Thu, 26 Oct 2017 13:47:03 +0000 (15:47 +0200)]
Convert manual from LaTeX to Markup

Manual has been automatically converted from *.tex to *.rst using
pandoc (after passing through the conversion script and some manual
hacking of the tex input files).

New rst formatted manual replaces the old one, with the pdf version
now also being generated from the information in the rst files.

Additionally, the eps image files have been converted to pdf and svg file
types to make it easier to automatically include them in the created
manual.

Proper change tracking depends on change
I3986740ab42a4054c4d0f9f67923ebf7a51320d9
and
Ice29bde4d9aa2ec99b416c668c21bef13fdd9d3e

Change-Id: I6702dde7be9cdd4199db2e6a8470698203449e31

6 years agoSecond change tracking commit
Paul Bauer [Tue, 21 Nov 2017 07:22:18 +0000 (08:22 +0100)]
Second change tracking commit

Another intermediate commit to ensure proper change tracking for the work on the reference manual

This commit changes the file names and paths.
It as well changes the image files to svg and pdf, to make the automatic
conversion work better for the child change.

Change-Id: Ice29bde4d9aa2ec99b416c668c21bef13fdd9d3e

6 years agoIntermediate commit to track changes to manual
Paul Bauer [Mon, 6 Nov 2017 15:03:46 +0000 (16:03 +0100)]
Intermediate commit to track changes to manual

This is just an intermediate commit to make sure git properly tracks the
changes to the files for the manual, and is not expected to compile
the manual at all.

This change does the conversion from tex to rst, while keeping the file
names.

The original LaTex inputs are included in a pandoc conversion friendly
format in the orignal-conversion-friendly subfolder, together with the
output from the automatic conversion.

Change-Id: I3986740ab42a4054c4d0f9f67923ebf7a51320d9

6 years agoMinor fix for pre-submit matrix docs
Szilárd Páll [Thu, 13 Jul 2017 15:48:14 +0000 (17:48 +0200)]
Minor fix for pre-submit matrix docs

Fixed comment to avoid confusion as CMake 3.8 did not introduce any new
CUDA feature that we actually do use (and can test).

Change-Id: I9d559a8bc606c14060fb6abbc93465d4d97e838a

6 years agoMove the PME GPU clearing to the end of the step
Szilárd Páll [Wed, 18 Apr 2018 15:59:39 +0000 (17:59 +0200)]
Move the PME GPU clearing to the end of the step

This places the call to the end of the force-compute next to the nbnxn
output clearing also fixing the cycle counting that previously
incorrectly assigned the cost of launching the clearing to the wait for
gather cycle counter.

Change-Id: I63b27a91d88a54d701831edda592b5d6277e3fb9

6 years agoIntroduce gmx_used_in_debug
Mark Abraham [Tue, 10 Apr 2018 11:37:48 +0000 (13:37 +0200)]
Introduce gmx_used_in_debug

Sometimes variables are only used to support assertions or other debug
code. This alternative annotation makes clear that the variable is
used as intended, so that if the value becomes truly unused then we
will be prompted to remove it by a warning from a suitable debug
build, thereby simplifying the code.

Deprecated GMX_UNUSED_VALUE following review discussion.

Change-Id: I39fe11d8062e599ef3e78b80320fe31fb2a503c0

6 years agoDisallow -skip values <= 0 for gmx trjconv.
Viveca Lindahl [Tue, 27 Mar 2018 10:37:33 +0000 (12:37 +0200)]
Disallow -skip values <= 0 for gmx trjconv.

Fixes #2467

Change-Id: Ic8b1892c454100bf4d5668b1c55b33ec6fbff4a2

6 years agoFix legacy topology memory error
Paul Bauer [Mon, 16 Apr 2018 14:16:23 +0000 (16:16 +0200)]
Fix legacy topology memory error

The change to port mtop to c++ has exposed a number of issues in the
legacy topology data structure, where pointers would be copied from a
temporary mtop object to the local topology, and subsequently
invalidated when mtop was correctly free'd.

This change is a bit of wooden mallet applied to the problem, by brute
forcing the assignment of the values that were previously copied by
pointer.

Fixes #2479

Change-Id: I7d702666fa48cb3840f914ee3bd28787d3caeec8

6 years agoShift per-step control logic to do_md
Mark Abraham [Fri, 13 Apr 2018 11:34:36 +0000 (12:34 +0100)]
Shift per-step control logic to do_md

There are multiple reasons why do_md can decide this is the last step,
so we should be consistent about it.

Refs #1793

Change-Id: I46f377630fa12be482ccb532c05d96cfe0537523

6 years agoBreak apart update_constraints
Mark Abraham [Fri, 2 Mar 2018 21:42:06 +0000 (22:42 +0100)]
Break apart update_constraints

There are four distinct kinds of work being done, and never was any
call to update_constraints doing all of them, so it's better to have a
group of functions, each of which do one thing, and the relevant ones
called. This also makes it simpler to express by returning fast that
when we don't have constraints, we do nothing.

Made the logic for whether this is a log or energy step match that of
the main MD loop. The old implementation may not have prepared for the
last step correctly when it was triggered by something other than the
nsteps inputrec value.

Removed a commment mentioning iteration, which is a feature
that was removed a while ago.

Removed some ancient debug dump output.

Refs #2423, #1793

Change-Id: I21c10826721ddc9a79a33b1dc75971a20d0855d9

6 years agoAdd post-submit test with hwloc off
Szilárd Páll [Mon, 9 Apr 2018 18:17:11 +0000 (20:17 +0200)]
Add post-submit test with hwloc off

This tests exercises the internal CPU topology detection code-path.

Change-Id: I2444b95c53b678ae88a66d95dbc93a55f7ed2725

6 years agoMove natoms_mol out of gmx_molblock_t
Berk Hess [Wed, 7 Mar 2018 11:53:39 +0000 (12:53 +0100)]
Move natoms_mol out of gmx_molblock_t

natoms_mol is derived information, so moved to MolecluleBlockIndices.

Change-Id: I10080dc8fd43bac1f1976551d66218fcc1d2c53c

6 years agoUpdated mdrun comparison infrastructure
Mark Abraham [Tue, 29 Dec 2015 17:39:44 +0000 (18:39 +0100)]
Updated mdrun comparison infrastructure

The functionality for running grompp to produce a .tpr file useful for
comparing two mdrun calculations works better as free functions than a
base class. This patch is essentially a rewrite of the interface,
though the core functionality is roughly the same.

Used raw string literals for nicer looking embedded strings.

Refs #1868

Change-Id: I4b5137b34c3da286e344809b71afd985d9c7bfab

6 years agoUse trivalue option for GMX_HWLOC
Szilárd Páll [Tue, 10 Apr 2018 13:28:11 +0000 (15:28 +0200)]
Use trivalue option for GMX_HWLOC

Don't run hwloc detection if GMX_HWLOC=OFF. Separated the value of the
variable set by the user from the specification of the default
behaviour and the selected behaviour.

Change-Id: I70dbe9e40857680dc3987eb8b6820c5ccac96b63

6 years agoMerge branch release-2018
Mark Abraham [Fri, 13 Apr 2018 10:09:09 +0000 (11:09 +0100)]
Merge branch release-2018

Minor conflicts documenting gpuregiontimer_ocl.h, resolved
with a suitable mix from both branches.

Change-Id: I5bb417acaff941f18730f0417c5e46c8f4c2fc1e

6 years agoClean up constraints code
Mark Abraham [Wed, 28 Feb 2018 18:08:14 +0000 (19:08 +0100)]
Clean up constraints code

Moved constraint code into gmx namespace.

Used more forward declarations in both the old and new headers.

Removed typedef from type declarations.

Removed gmx_ prefix from some names, since it is no longer required
and we may as well avoid verbiage.

Renamed some types more consistently with newer coding styles, and
called them class now where they will be one shortly.

Added some const correctness.

Apparently this inspires uncrustify to change positions of some
comments. Go figure.

Replaced all gmx_bool in constraints code with bool.

Maths functions from vec.h (which are not in the top-level namespace)
now need namespace qualifications.

Added and fixed various Doxygen, which is primitive in some cases
where the code was particularly cryptic.

Noted policy on multiple authors within Doxygen comments.

Refs #2423

Change-Id: I41bf3a4b9a4fbbcb3a3a7a27dc922d563abedbcb

6 years agoMake in-source OpenCL kernel path a per-module parameter
Aleksei Iupinov [Thu, 12 Apr 2018 14:31:43 +0000 (16:31 +0200)]
Make in-source OpenCL kernel path a per-module parameter

Change-Id: I19cd66b441fec6ceba74eb648bea3409b6521917

6 years agoRemove use of where(), if DEBUG etc.
Mark Abraham [Fri, 2 Mar 2018 21:08:23 +0000 (22:08 +0100)]
Remove use of where(), if DEBUG etc.

The where() debugging function causes run-time branches in
release-mode builds, and replaces functionality for which one should
use a debugger.

Other such preprocessing clutter should also go away. Since we don't
check whether any of it compiles or produces useful data, we may as
well delete it.

This coincidentally simplifies the call sigatures of some
functionality, too.

Retained some useful essentialdynamics debug code, which is now always
compiled, and written from setup code only at debug level 2.

Refs #2423
Fixes #2122

Change-Id: I2c60c162734f4c2ec1d56153853a36d28e6a66ff

6 years agoRemove CUDA_FUNC macros from many functions in PME GPU
Aleksei Iupinov [Thu, 12 Apr 2018 12:42:48 +0000 (14:42 +0200)]
Remove CUDA_FUNC macros from many functions in PME GPU

As pme-gpu*.cpp files are not compiled during CPU builds anymore,
PME GPU functions that are not exposed to mdrun/tests do not need
to be hidden.

Change-Id: Id39c0bb6e586b508f5bbe8c7501ffd560d3cf14c

6 years agoStop PME GPU code from compiling on non-CUDA builds
Aleksei Iupinov [Tue, 27 Mar 2018 11:18:51 +0000 (13:18 +0200)]
Stop PME GPU code from compiling on non-CUDA builds

On non-CUDA builds: all entrypoints into PME GPU code are
marked as stubs; pme-gpu.cpp and pme-gpu-internal.cpp are
excluded from compiling. Several common functions (such as
check for GPU support at the end of PME initialization)
are moved to pme.cpp, to still work with non-GPU builds.

Change-Id: Iaa9ea7b3e42665c60b788e76510a810457a69f20

6 years agoReorganize energy evaluation for EM
Mark Abraham [Mon, 26 Feb 2018 16:47:24 +0000 (17:47 +0100)]
Reorganize energy evaluation for EM

Used aggregate initialized structs to simplify future refactoring.

Refs #1793, #2423

Change-Id: Iedb8bf3b4cb2d7f238c4b674ce459564a3f76a20

6 years agoPrevent OpenCL timing memory leak
Aleksei Iupinov [Tue, 27 Mar 2018 20:30:43 +0000 (22:30 +0200)]
Prevent OpenCL timing memory leak

Fixes #2470

Change-Id: I4917de697bee7df98da0037e9165e52e660f83a0

6 years agoMinor text edits and fix of broken link in user guide.
Viveca Lindahl [Tue, 10 Apr 2018 13:52:25 +0000 (15:52 +0200)]
Minor text edits and fix of broken link in user guide.

Link to domain decomposition section was broken. Also:
* removed a TODO that was already done
* reordered words in SIMD to make it a definition

Change-Id: I7943e4f59e2de82c2c6e94d15a6089a92f196132

6 years agoConvert gmx_molblock_t to C++
Berk Hess [Wed, 14 Feb 2018 08:46:59 +0000 (09:46 +0100)]
Convert gmx_molblock_t to C++

Changed posres pointers in molblock to std vector.
Also moved the derived helper index data into a separate struct.
That is merged into this change to keep MPI broadcasting simple.
natoms_mol will be moved into the new struct in a child change.

Change-Id: I131fd14ab53cec98800c7e0731d3a92df3f93422

6 years agoSimplified handling of simulation runners
Mark Abraham [Wed, 28 Feb 2018 15:20:03 +0000 (16:20 +0100)]
Simplified handling of simulation runners

Argments to runners are now passed via struct members. That struct is
expected to change over the medium term, as most of its contents
should either be in a container of modules, or data with such a
module. As such, it does not make sense to do a lot of coding to
manage its contents in a sound way. The practical effects of using
this struct are almost the same as the old approach of passing a
forest of arguments - some variables are declared in a scope,
initialized with values, then used once.

The form is chosen so that
* the do_md() etc. functions do not need a large number of useless
  textual changes now
* future changes to names and types of the former parameters do not
  need to be edited in matching way in multiple places of code and
  their doxygen
* we don't need to mark things gmx_unused anywhere

Useless unchecked return values have been removed.

Some excessive includes in integrator.h were removed, which
generates a few minor fixes elsewhere.

Refs #1793

Change-Id: I678598175192c9c68113fdd79fcee17f8e5c504e

6 years agoCreate gromacs/mdrun module and move code there
Mark Abraham [Wed, 28 Feb 2018 14:54:26 +0000 (15:54 +0100)]
Create gromacs/mdrun module and move code there

Improving how we dispatch the work for do_md and friends requires that
they all compile as part of libgromacs (or all outside of it). The
code currently in src/programs/mdrun is there simply because it hasn't
been moved from the old src/kernel layout, rather than through any
clear design, so we should move it now that we have a reason.

Other code from src/programs/mdrun now needs to move into libgromacs
also, but we currently don't have a module for miscellanous mdrun
features, so we're adding to the abuse of mdlib for now.

Refs #1793
Refs #2423

Change-Id: I4f9ad5d0bf6585675472b49b2d5654f588b7214e

6 years agoRefactor cj preload in the nonbonded OpenCL kernels
Szilárd Páll [Tue, 29 Mar 2016 20:20:22 +0000 (22:20 +0200)]
Refactor cj preload in the nonbonded OpenCL kernels

This change hides the implementation detail of preload/load operation in
inline functions configured based on the source flavor.
One of the main benefits is that this corrects the "nowarp" force and
pruning kernels removing a warp assumption (that was violated on
hardware with <32 wide wavefronts).

A step towards correctness on alternative GPU hardware, so
Refs #2030

Change-Id: If88d11df6613eadc9b59e5f03c34bac52df3514b

6 years agoQuiet checkpoint reading
Mark Abraham [Fri, 26 Jan 2018 16:28:01 +0000 (17:28 +0100)]
Quiet checkpoint reading

If reading succeeds, it should write anything of interest to the log
file. If it does not, it should make a fatal error.  Code here might
be run as part of mdrun (possibly in a multi-simulation), or grompp,
or compare, or dump, or eventually from an API caller, so we can't
make assumptions about what should be reported to a terminal.

Removed support for issuing a warning about restarting from very old
checkpoint formats, instead issuing a fatal error. Elsewhere, we
anyway observe that checkpoint restarts across major version
differences are not supported.

Change-Id: Id2b084bf0792a6992931609fb78d4a38a5f255fe

6 years agoMove checkNumberOfBondedInteractions
Pascal Merz [Mon, 19 Mar 2018 18:59:57 +0000 (12:59 -0600)]
Move checkNumberOfBondedInteractions

In task #1868, we will move the rerun functionality from do_md to
a separate function in a new file. As both do_md and the new
do_rerun need access to checkNumberOfBondedInteractions(), it needs
to be moved to a more central location.

Change-Id: Iae0ace11db2f83e5034fdfae21ccac3e7b9e34d1

6 years agoConvert gmx_mtop_t to C++
Berk Hess [Tue, 13 Feb 2018 13:30:22 +0000 (14:30 +0100)]
Convert gmx_mtop_t to C++

gmx_mtop_t now uses std vectors for moltype and molblock.
gmx_mtop_t, gmx_moltype_t and gmx_molblock_t now have constructors
and destructors.
Changed declarations of gmx_mtop_t* to not use a pointer or to use
std::unique_ptr.
Several sub-structs still use C style pointers and will be converted
later.

Change-Id: Iee802e4382a0a389496bb9395389e5926918d0f8

6 years agoRemove leftover mention of twin-range scheme
Mark Abraham [Thu, 29 Mar 2018 12:22:26 +0000 (14:22 +0200)]
Remove leftover mention of twin-range scheme

Also fixed a broken symref to a version number that should
never have been a symref

Change-Id: Id1b10614106748de6ff114ade4b542ac7581f4cf

6 years agoMerge "Merge branch release-2018"
Mark Abraham [Tue, 3 Apr 2018 09:44:09 +0000 (11:44 +0200)]
Merge "Merge branch release-2018"

6 years agoChange warninp filenm to std::string
Berk Hess [Tue, 3 Apr 2018 08:00:15 +0000 (10:00 +0200)]
Change warninp filenm to std::string

This prevent buffer overflows with long filenames.

Fixes #2465

Change-Id: Ifcd264a6b33929f6b369d543c83c16d5378db937

6 years agoDo not calculate COM for pull group 0
Berk Hess [Fri, 23 Mar 2018 10:10:56 +0000 (11:10 +0100)]
Do not calculate COM for pull group 0

Pull group 0 is an absolute reference with coordinates 0,0,0,
so it is clearer to never compute its center of mass.

Refs #2143

Change-Id: Ifa974ab84afe303594c3b65e9567e0568bb151a9

6 years agoMove file opening out of init_pull()
Berk Hess [Fri, 23 Mar 2018 11:14:23 +0000 (12:14 +0100)]
Move file opening out of init_pull()

This is a step towards making a constructor for t_pull.

Change-Id: I24583fa32066503ccfbe0abaef6a412241974b12

6 years agoTweak/enable icc 18 post-submit tests
Szilárd Páll [Mon, 26 Mar 2018 20:18:07 +0000 (22:18 +0200)]
Tweak/enable icc 18 post-submit tests

SIMD was disabled due to #2335

Change-Id: Ia55742958cfbdfb75e96c8d2b0ba5620a57a6f56

6 years agoImproved check of if only forces are computed in do_pairs()
Magnus Lundborg [Thu, 1 Mar 2018 07:39:18 +0000 (08:39 +0100)]
Improved check of if only forces are computed in do_pairs()

Use the check introduced in I67bdb0cba9c6ec20b to see if the
SIMD version can be used.

Change-Id: I3dfd401aa1dc421757bf243809ac85e17a9062b6

6 years agoFix cmake Sphinx detection for versions >1.6.4
Paul Bauer [Wed, 28 Mar 2018 11:33:02 +0000 (13:33 +0200)]
Fix cmake Sphinx detection for versions >1.6.4

The output from sphinx-build --version changed between version 1.6.4 and
1.7.x, leading to the cmake detection script to fail and reporting no
version at all. This fixes detection for both before and after the
change to the output format.

Change-Id: I34e50067f52f8127d137db28e9411420559d44cf

6 years agoSwitch CUDA 9.0/gcc 5 test to CUDA 9.1/gcc 6
Szilárd Páll [Fri, 2 Mar 2018 21:23:06 +0000 (22:23 +0100)]
Switch CUDA 9.0/gcc 5 test to CUDA 9.1/gcc 6

Change-Id: If3e7277243c986ce96bf31de314edb1a255a44a6

6 years agoModularize pull_coord_work_t
Berk Hess [Tue, 13 Mar 2018 20:00:00 +0000 (21:00 +0100)]
Modularize pull_coord_work_t

Organized the 19 members of pull_coord_work_t into 5 sub-groups
and moved some into a new external PullCoordVectorForces struct.
Added a constructor and changed the pointer to coord in pull_t
to std::vector.

Also fixes #2446

Change-Id: I48d176ddbf3f5649f9072aacfb6bcb2d69785f91

6 years agoFree more memory in grompp and mdrun
Mark Abraham [Sun, 11 Mar 2018 18:11:31 +0000 (19:11 +0100)]
Free more memory in grompp and mdrun

This will be increasingly useful as we start adding more GoogleTest
cases that call grompp and mdrun repeatedly.

Refs #1793, #1868

Change-Id: Ic0faaa4c3dec2891d0cdc6166561f8ccd4391f44

6 years agoRemove mols from gmx_mtop_t
Berk Hess [Wed, 14 Feb 2018 14:36:49 +0000 (15:36 +0100)]
Remove mols from gmx_mtop_t

The molecule atom begin/end information in gmx_mtop_t was derived
information. Now the mols struct is removed and the information is
derived when necessary.
Introduced BlockRanges, a C++ verion of t_block.

This is preparation for converison of gmx_mtop_t to C++.

Change-Id: I1717a101de82354a7f9cf14fd7f43c7227e554ef

6 years agoMerge branch release-2018
Mark Abraham [Wed, 28 Mar 2018 11:19:26 +0000 (13:19 +0200)]
Merge branch release-2018

Some meaningful conflicts in init_multisim associated with multisim
fixes and clarifications in release-2018 combining with reorganization
in master branch.

Preserved the master-branch pre-submit matrix, since all branches have
separate changes that cope with gpu_id=2 no longer being valid.

Change-Id: Idefe4f1ec3bbbc76dfedf03a81abef8233328de2

6 years agoClarified mdp options relating to bonds
Mark Abraham [Tue, 27 Mar 2018 19:39:34 +0000 (21:39 +0200)]
Clarified mdp options relating to bonds

Change-Id: Iffcaaaf1fc6c707c8f644da18cf03e28d2137557

6 years agoMore gcc-8 fixes for POWER
Mark Abraham [Tue, 20 Mar 2018 07:39:37 +0000 (08:39 +0100)]
More gcc-8 fixes for POWER

Fixes #2421

Change-Id: I43c13df3a217d0f2154dca0ef215efd9cd27474a

6 years agominor fix to flag strings for gmx potential
Joe Jordan [Thu, 22 Mar 2018 08:59:25 +0000 (09:59 +0100)]
minor fix to flag strings for gmx potential

Change-Id: I2dadc8d74888dc2ebcd4fcf71e275c21fdd23cd6

6 years agoUpdated to prepare for 2018.2 release
Mark Abraham [Wed, 21 Mar 2018 15:04:44 +0000 (16:04 +0100)]
Updated to prepare for 2018.2 release

Change-Id: I1c72e8a3ac1b6b2e29b39c2d52bad5b87a884912

6 years agoAdded cool quote.
Viveca Lindahl [Thu, 22 Mar 2018 09:36:31 +0000 (10:36 +0100)]
Added cool quote.

Change-Id: I89d86d788f45f0d9124f5d00133709de83a73f38

6 years agoRenamed entropy.* to thermochemistry.*
David van der Spoel [Tue, 20 Mar 2018 21:04:42 +0000 (22:04 +0100)]
Renamed entropy.* to thermochemistry.*

This is a content-less patch to get the renaming history
correct in git.
Change-Id: I34f1d15f2e9136962b1718a60863b3b20a66fda5

6 years agoVersion 2018.1
Mark Abraham [Fri, 23 Feb 2018 13:20:17 +0000 (14:20 +0100)]
Version 2018.1

Change-Id: I3285c77fc557c1a6f34796c4bfb4843846b0d8a5

6 years agoMerge "Merge branch release-2016 into release-2018" into release-2018
Mark Abraham [Wed, 21 Mar 2018 11:07:16 +0000 (12:07 +0100)]
Merge "Merge branch release-2016 into release-2018" into release-2018

6 years agoUpdate release notes for 2018.1
Mark Abraham [Tue, 27 Feb 2018 16:10:15 +0000 (17:10 +0100)]
Update release notes for 2018.1

Change-Id: Ia60d523647e1915856ae3b00a0cb9eacd939fc56

6 years agoMerge branch release-2016 into release-2018
Mark Abraham [Tue, 20 Mar 2018 22:17:51 +0000 (23:17 +0100)]
Merge branch release-2016 into release-2018

Conflict in pre-submit matrix, kept 2018 content that already
has the same logical change made.

Change-Id: I40b2db8d149388bed07471fcdb8082b0fc92b9b5

6 years agoDocument matrix_convert function in PBC
Vedran Miletić [Tue, 20 Mar 2018 11:27:45 +0000 (12:27 +0100)]
Document matrix_convert function in PBC

The brief documentation was in place, but the documentation of the
function parameters was missing. This patch adds it and also fixes
incorrect Doxygen syntax at pbc_dx_d.

Change-Id: Ic897911bf4b8866bb7c4dc3aea982493cc03874c

6 years agoFix gmx dump AWH formatting issue
Berk Hess [Tue, 20 Mar 2018 12:19:01 +0000 (13:19 +0100)]
Fix gmx dump AWH formatting issue

A comma was missing in the list of AWH checkpoint entry string
which caused the naming to be messed up in the gmx dump output.

Change-Id: I85d0722236f3f9559c1117fdcee39766d04b424d

6 years agoUpdate use of gpu_id in Jenkins
Mark Abraham [Tue, 20 Mar 2018 11:50:17 +0000 (12:50 +0100)]
Update use of gpu_id in Jenkins

We plan to remove one of the GPUs from the slave that had three, so we
need to update the testing configurations. The new configuration might
balance load a little better.

Refs #2408, #2410

Change-Id: I3b5d9c8702c021f0676ea3ca12f9e7f1d3317ed1

6 years agoDisallow single simulation with multisim
Berk Hess [Mon, 19 Mar 2018 13:33:47 +0000 (14:33 +0100)]
Disallow single simulation with multisim

To avoid many untested code paths, we, at least temporarily,
disable a single simulation with mdrun -multisim and -multidir.

Refs #2448

Change-Id: I9befdb677f3c77bcc6dc0c77abc3478f0b83ba8d

6 years agoUpdate use of gpu_id in Jenkins
Mark Abraham [Tue, 20 Mar 2018 11:51:56 +0000 (12:51 +0100)]
Update use of gpu_id in Jenkins

We plan to remove one of the GPUs from the slave that had three, so we
need to update the testing configurations. The new configuration might
balance load a little better.

Refs #2408, #2410

Change-Id: Ie253ef07998cf45c5fc2e118a5394f0817e66f75

6 years agoUpdate use of gpu_id in Jenkins
Mark Abraham [Sun, 18 Mar 2018 19:34:53 +0000 (20:34 +0100)]
Update use of gpu_id in Jenkins

We plan to remove one of the GPUs from the slave that had three, so we
need to update the testing configurations. The new configuration might
balance load a little better.

Refs #2408, #2410

Change-Id: Ia63cb701049a02ad86fdd9f9c03388cd11a14bcc

6 years agoClarify the mdrun GPU options docs
Aleksei Iupinov [Thu, 1 Mar 2018 22:32:03 +0000 (23:32 +0100)]
Clarify the mdrun GPU options docs

Refs #2359

Change-Id: If112077a59f875ffb1c689b2ac67dad7cdf2adb9

6 years agoAdd helper function to make a vector from an ArrayRef
Mark Abraham [Tue, 6 Mar 2018 09:53:19 +0000 (10:53 +0100)]
Add helper function to make a vector from an ArrayRef

This syntactic sugar makes it easy to make a vector with a copy of the
contents.

Change-Id: Ib51c8a1d88aee7ca35fe1715d6f094b60e90e0b2

6 years agoFix VSX SIMD with gcc 8
Mark Abraham [Fri, 16 Mar 2018 21:21:48 +0000 (22:21 +0100)]
Fix VSX SIMD with gcc 8

gcc 8 apparently generates different code for the former GROMACS
code, which seems buggy. See
https://bugzilla.redhat.com/show_bug.cgi?id=1556989#c3
and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84907

Fixes #2421

Change-Id: I31492cd582b785cdfb42e8b999a165a7339ce4be

6 years agoOnly free topology when allocated
Paul Bauer [Wed, 14 Mar 2018 09:15:42 +0000 (10:15 +0100)]
Only free topology when allocated

Fix trjconv so that the topology only gets free'd when it has been
previously allocated.

Fixes #2430

Change-Id: Idc9a4219d988e1794ef86f7cc79f0d00750394ca

6 years agoAdd a basic TPI sanity test
Aleksei Iupinov [Thu, 1 Feb 2018 16:16:52 +0000 (17:16 +0100)]
Add a basic TPI sanity test

The floating point exceptions are for now toggled off
in the test body instead of mdrun itself.

Refs #2391

Change-Id: I41b584f4753b9b0e126256a94c1304f0a870aa73

6 years agoStop gmx_feenableexcept() from returning previous exception settings on Apple
Aleksei Iupinov [Fri, 16 Mar 2018 10:18:47 +0000 (11:18 +0100)]
Stop gmx_feenableexcept() from returning previous exception settings on Apple

This makes the function return value unambiguous.

Change-Id: I3e64e769b27fb0fa59b650d18b2fd099a9181025

6 years agoSplit off entropy calculation to separate file.
David van der Spoel [Fri, 29 Dec 2017 20:56:09 +0000 (21:56 +0100)]
Split off entropy calculation to separate file.

The calculation of the quasiharmonic entropy or the one
through the Schlitter formula has some popularity. In
order to allow computation from a normal mode analysis
as well as from a PCA (essential dynamics analysis) the
code was split off into a separate file. Proper documentation
and five tests are provided as well. Minor cleanups
were done as well.

Change-Id: Ic5e4feab6a304946947d6e69be75c06b46aff75c

6 years agoCorrect PMF sign error in AWH bias sharing
Berk Hess [Fri, 16 Mar 2018 10:00:41 +0000 (11:00 +0100)]
Correct PMF sign error in AWH bias sharing

Recent commit 229c8f63 was though to fix a sign error in
the calculation of the deconvolution of the AWH PMF when sharing
the bias over multiple simulations, but this sign was misplaced.

Fixes #2439

Change-Id: I67ec06ff4d832a857467b58b362f9f6f88671aa8

6 years agoFix recent mdrun signaling bug
Berk Hess [Thu, 15 Mar 2018 17:09:55 +0000 (18:09 +0100)]
Fix recent mdrun signaling bug

Recent commit e4deba12 accidentally negated the locality condition
for signaling checkpoint and termination in mdrun.

Fixes #2457

Change-Id: I1b7a4c26637766a44cad2581c9c9ec420aa4ab6e

6 years agoRestore the lost mc_temp check in grompp
Aleksei Iupinov [Tue, 23 Jan 2018 11:45:04 +0000 (12:45 +0100)]
Restore the lost mc_temp check in grompp

The expression for checking whether the reference temperature
is defined is moved into a helper function.

Change-Id: Ib331f52e8031a5e5d7c32234cfe936024c49ac28

6 years agoFix virial with external pull potential and MPI
Berk Hess [Thu, 15 Mar 2018 10:25:50 +0000 (11:25 +0100)]
Fix virial with external pull potential and MPI

When using an external pull potential with domain decomposition,
currently this is only used by AWH, the virial contribution would
be multiplied with the number of MPI ranks.

Fixes #2455

Change-Id: I61452fb9eca6e68fea3256cc25b39033a9c5d8e7

6 years agoImprove inter-simulation signaling
Berk Hess [Wed, 14 Mar 2018 10:59:53 +0000 (11:59 +0100)]
Improve inter-simulation signaling

Use a single boolean for controlling inter-simulation signaling.
This would have prevented issue #2447.
Introduce an inter-simulating signaling frequency. This both
simplifies the code and significantly reduces communiation overhead
for many simulations and/or many ranks per simulation.
Correct the terminimation step print with replica exchange.

Refs #2440 and #2447

Change-Id: I8ed50c5b11564d9a967bcacb15c4fcd3be05caea

6 years agoMake a persistent physical node communicator
Mark Abraham [Thu, 25 Jan 2018 14:47:35 +0000 (15:47 +0100)]
Make a persistent physical node communicator

Rather than make and re-make this communicator multiple times for for
almost all common run configurations, build one, and keep it in a
place distinct from commrec (which has too many responsibilities
already).

Note that the master thread-MPI rank builds a fake one initially,
because MPI is not yet initialized, then coordinates to build the real
one with the newly launched threads. However that communicator is not
actually used until after the execution paths have re-joined.

Simplifies IThreadAffinityAccess while retaining the ability to test
the affinity-setting logic without requiring specific attributes of
the node. Note that some of the tests already required that a
particular MPI environment exists.

Change-Id: Ie0800b07a65f9579ddc8af8f418cd14b85671de7

6 years agoFix mdrun signalling with AWH bias sharing
Berk Hess [Wed, 14 Mar 2018 08:32:23 +0000 (09:32 +0100)]
Fix mdrun signalling with AWH bias sharing

The recent commit 717fd5b8, which should have fixed issue #2440,
disabled checkpointing and termination by disabled signalling
between AWH runs that share a bias.

Fixes #2447
Refs #2440

Change-Id: Ic80ea07cfa1bde1b31fa9d660f00492b794b000f

6 years agoFix COM pulling with external potential with #ranks>32
Berk Hess [Mon, 12 Mar 2018 15:54:04 +0000 (16:54 +0100)]
Fix COM pulling with external potential with #ranks>32

With more than 32 PP-ranks, the pull code could use only a subset
of the PP-ranks. This change forces all ranks to do pulling when
external potentials are present (currently only used by AWH).

Fixes #2441

Change-Id: I8501024b7961600ec79f3707e239ddf25525aa79

6 years agoFix pull bug with geometry=direction-periodic
Berk Hess [Tue, 13 Mar 2018 13:59:19 +0000 (14:59 +0100)]
Fix pull bug with geometry=direction-periodic

When doing COM pulling with geometry direction-periodic,
the reference location needs to be used to compute the current
distance. This reference was taken from the previous step instead
of the current. In practice this only caused issues at restarts
when the distance was more than half the box length.

Fixes #2446

Change-Id: Ie0c0341ad8c6ce1e78951270cab27ecaf95d65eb

6 years agoAdd AWH fixes to release notes
Berk Hess [Tue, 13 Mar 2018 13:18:45 +0000 (14:18 +0100)]
Add AWH fixes to release notes

Change-Id: I17531da77495367b0e62b4e0b0e912bbd16659f9

6 years agoAdd more const to uses of t_commrec and t_inputrec
Mark Abraham [Mon, 26 Feb 2018 16:47:02 +0000 (17:47 +0100)]
Add more const to uses of t_commrec and t_inputrec

Also removed some pointless struct keywords.

Refs #2423

Change-Id: Iacc008fb11a31646e798364e253de322c16ccaee

6 years agoRequire OpenCL 1.2
Szilárd Páll [Tue, 13 Mar 2018 02:24:58 +0000 (03:24 +0100)]
Require OpenCL 1.2

This commit bumps the requirement and removes OpenCL 1.1 API
compatibility support.

Refs #2438

Change-Id: Iaedf5fbdfd24a2d020983847815c2c21bac0f74c

6 years agoFix AWH ensemble checkpointing
Berk Hess [Mon, 12 Mar 2018 15:43:53 +0000 (16:43 +0100)]
Fix AWH ensemble checkpointing

AWH multi-runs with shared bias could terminate at different steps
leading to checkpointing from which continuation was impossible.

Fixes #2440.

Change-Id: I728c6aea9d030fcfad04efc6082309dafe3408bd

6 years agoFix AWH deconvolution when sharing a bias
Berk Hess [Mon, 12 Mar 2018 20:36:07 +0000 (21:36 +0100)]
Fix AWH deconvolution when sharing a bias

When sharing an AWH bias over multiple simulations, the PMF output
was garbage due to a missing minus sign in the reduction.
Note that this only affected the PMF output, not the sampling.

Fixes #2439

Change-Id: I688cda045f5e757e58b392d64384705b3ac73a17

6 years agoIntroduce constrain_shake
Mark Abraham [Wed, 21 Feb 2018 15:02:46 +0000 (16:02 +0100)]
Introduce constrain_shake

Also move various functions and fields of general constraint code and
data to the SHAKE code and data structures. Made some use of inputrec
const, to suit later changes.

Change-Id: I09b7a719b58f8f8192762431edc139674eaf23ae

6 years agoFix clang 6.0 with CUDA 9.0
Szilárd Páll [Mon, 12 Mar 2018 23:23:07 +0000 (00:23 +0100)]
Fix clang 6.0 with CUDA 9.0

This enables clang 6.0 CUDA build for sm_70 and works around an issue
which seems to affect sm_37 support.

Fixes #2443

Change-Id: Ib9c52e4a3a8ac1e05e851c8166eec4a6b5df4825

6 years agoMerge "Merge branch release-2018"
Mark Abraham [Tue, 13 Mar 2018 08:52:50 +0000 (09:52 +0100)]
Merge "Merge branch release-2018"

6 years agoAvoid icc-specific -march=core-avx2 flag with gcc/clang
Szilárd Páll [Wed, 15 Nov 2017 19:48:50 +0000 (20:48 +0100)]
Avoid icc-specific -march=core-avx2 flag with gcc/clang

This change makes sure that the -march=core-avx2 icc-specific
optimization flag is only used for Intel compilers. It is not only
unnecessary for gcc/clang but also undocumented (and not proven to be
useful, actually potentually harmful with gcc <=6, measured 1-3% lower
perf.).

Change-Id: Ic2f05554ea6e460c53fa307fc1da3de1b6868e2f