alexxy/gromacs.git
5 years agoMake PME OpenCL enabled only for AMD devices
Mark Abraham [Mon, 5 Nov 2018 17:53:03 +0000 (18:53 +0100)]
Make PME OpenCL enabled only for AMD devices

Other vendor devices have known issues, but fixes
are not yet complete.

Refs #2702, #2719

Change-Id: I0d443229ffe4cee3bb4029f57502f9c7fba2574d

5 years agoRemove source file with no content
Mark Abraham [Mon, 5 Nov 2018 13:41:32 +0000 (14:41 +0100)]
Remove source file with no content

Visual Studio + icc warns that nothing can link to anything in this
source file.

Also updated the CMake for this module to use our newer idioms.

Fixes #2732

Change-Id: I5cfe81aabc6ee80a6c0044cc219b1a121293aded

5 years agoFix non ascii characters in manual references
Paul Bauer [Mon, 5 Nov 2018 13:18:36 +0000 (14:18 +0100)]
Fix non ascii characters in manual references

Change-Id: I1c50b58df39a1ffca4b4782482da6642ad129556

5 years agoMake QM/MM code always compile
Paul Bauer [Wed, 24 Oct 2018 07:20:15 +0000 (09:20 +0200)]
Make QM/MM code always compile

Brought all the old interfaces back to a state where they can always
compile regardless of the build configuration, and give fatal errors
if used from a configuration that didn't support the method.

When configured, this should work as before, but we have no ability to
test that in Jenkins.

Added some necessary const correctness.

Did QM/MM preparation all in the same place, to simplify runner.cpp

Added deprecation status to release notes.

Refs #2706, #2569

Change-Id: I4a6566c60bfbf27a7b1916be1874b36987fb7da5

5 years agoDisable -Wno-missing-prototypes
Alexey Shvetsov [Mon, 22 Oct 2018 19:22:30 +0000 (22:22 +0300)]
Disable -Wno-missing-prototypes

The warning is valid for C++

The -Wno-missing-prototypes flag is valid for C++ files with clang,
but not with other compilers.

Change-Id: I85aecc92129b6db482ccff3ef5f6af5a8551ace7
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
5 years agoGive more info when trying to build manual
Paul Bauer [Tue, 23 Oct 2018 15:12:37 +0000 (17:12 +0200)]
Give more info when trying to build manual

The manual build would fail with cryptic reasons when Sphinx was not
available because the include was not properly set.

Also set up Sphinx detection to be verbose so that users will have it
easier to see whether they can build the docs or not.

Building the docs will not work now when using Python3.

Add test script to check if ImageMagick convert actually works or not.

Refs #2709

Change-Id: I1c49d683d971a5bf0b0ce217f7e9ecd60603e6e6

5 years agoFix formatting issue
Paul Bauer [Mon, 5 Nov 2018 12:25:04 +0000 (13:25 +0100)]
Fix formatting issue

Clang static analyser complained about extra semi-colons that are fixed
here.

Change-Id: I1e39a0db64aaba88293cb26c87d8d55293797694

5 years agoQuiet unused variable warnings
Mark Abraham [Thu, 1 Nov 2018 14:06:53 +0000 (15:06 +0100)]
Quiet unused variable warnings

gcc 4.8 in debug mode warns about unused manager variables

Change-Id: I84b9729036c929a14550357d82321f7122462e04

5 years agoFix broken update groups
Berk Hess [Sat, 27 Oct 2018 21:19:17 +0000 (23:19 +0200)]
Fix broken update groups

With 2D/3D domain decomposition, atoms in an update group could end
up in different DD cells due to different rounding.
Also added an assertion on atoms in constraint being in the same
cell when atoms are in the reverse top, as that was violated with
this bug.

Fixes #2712

Change-Id: Ic9ea10d6a20c46b89d1fa9e0aacfcc5037903428

5 years agoFully define symbols in restraintpotential.h
M. Eric Irrgang [Thu, 1 Nov 2018 10:40:41 +0000 (13:40 +0300)]
Fully define symbols in restraintpotential.h

External client code (i.e. an MD plugin) is expected to link against
libgmxapi, but not against libgromacs directly. This change allows
client code to implement gmx::IRestraintPotential using only GROMACS
installed headers, without relying on libgromacs to define methods in
gmx::PotentialPointData or gmx::IRestraintPotential.

Fixes #2725

Change-Id: I530c8b74d490645de25c722036be5387a4fc0a61

5 years agoAdd missing blame for restraint module files.
M. Eric Irrgang [Thu, 1 Nov 2018 10:14:18 +0000 (13:14 +0300)]
Add missing blame for restraint module files.

Several files in gromacs/restraint were missing the suggested doxygen
`\author` tag.

Change-Id: I4ad1d86a5a31082fde3346bcb89cd0bbc5bc2e4f

5 years agoDisable ccache by default
Mark Abraham [Sat, 27 Oct 2018 13:10:01 +0000 (15:10 +0200)]
Disable ccache by default

There are too many use cases where build trees might be used on
different nodes where ccache might not be available, or with compilers
that it cannot support to continue to enable it by default. If the
user opts in, then the build system searches for ccache and gives a
fatal error if it is not found, or if the compiler is not supported.

The wrappers used by clang-tidy and clang-analyzer do not work
with ccache, so those configurations issue a fatal error if
ccache is enabled.

Made various minor aspects conform to style for naming cache
variables, use of endif(), etc.

Refs #2688

Change-Id: I55c8d4a8a07ada704c49d4f99c1557a7ab97f353

5 years agoLimit auto assignment of bondeds to GPUs
Berk Hess [Fri, 19 Oct 2018 19:20:40 +0000 (21:20 +0200)]
Limit auto assignment of bondeds to GPUs

When the CPU has no forces to calculatie, we should not assign
bondeds to the GPU. Here we only assign bondeds to the GPU when
the CPU does PME for electrostatics and/or LJ.

Change-Id: I82f3047311bde45c026c78e44adc4985eb07b0e7

5 years agoPin important buffers in CUDA bondeds
Berk Hess [Tue, 16 Oct 2018 08:50:20 +0000 (10:50 +0200)]
Pin important buffers in CUDA bondeds

This allows for asynchronous transfers.

Change-Id: I0f251c17bdd44856bf773641633e8fa78e6be894

5 years agoAdd CUDA bonded kernels
Jonathan Vincent [Mon, 1 Oct 2018 09:59:40 +0000 (02:59 -0700)]
Add CUDA bonded kernels

CUDA bonded kernels are added for the most common bonded and LJ-14
interactions.
The default auto settings of mdrun offloads these interactions
to the GPU when possible.
Currently these interactions are computed in the local or non-local
nbnxn non-bonded streams. We should consider using a separate stream.
This change uses synchronous transfers. A child change will change
these to asynchronous.

Updated release notes and performance guide.

Fixes #2678
Refs #2675

Change-Id: Ifc6d97854cc7afa8526602942ec3b1712ba45bac

5 years agoFix FP exception in energy reduction
Berk Hess [Sat, 27 Oct 2018 21:23:54 +0000 (23:23 +0200)]
Fix FP exception in energy reduction

Energies are now only reduced over ranks when energy are requested.
This avoid FP exceptions due to uninitialized energy buffers.

Change-Id: Ib4130074c5890064446c9f38c10d5caf5622ee70

5 years agoCorrect VV integrator nstcalcenergy use
Berk Hess [Mon, 29 Oct 2018 16:12:46 +0000 (17:12 +0100)]
Correct VV integrator nstcalcenergy use

With velocity Verlet integrators, mdrun would compute energies
which contribute to averages in the energy output and might be
used for expanded ensemble calculcations one step too late.

Fixes #2718
Refs #2714

Change-Id: I67e4d00f7151ec9eb5dab6ca4e87b81ca12236e2

5 years agoCorrect grompp nstexpanded/nstcalcenergy check
Berk Hess [Sun, 28 Oct 2018 19:38:21 +0000 (20:38 +0100)]
Correct grompp nstexpanded/nstcalcenergy check

With expanded ensemble, but without free-energy perturbation, grompp
would not check if nstexpanded was a multiple of nstcalcenergy.
If the latter was not the case, results might have been incorrect.
Also added a check in mdrun to catch old, incorrect tpr files.

Fixes #2714

Change-Id: I554351e2c9873a71efbc6e803134eb744e229f1d

5 years agoAdd equation numbers in reference manual
Paul Bauer [Sat, 27 Oct 2018 14:25:32 +0000 (16:25 +0200)]
Add equation numbers in reference manual

Went through the reference manual and added equation numbers to all
equations, as Sphinx only numbers those with a label.

Also performed some formatting fixes.

Change-Id: If37b3a0a9b9def9b7428bdbd01c13b0b685933a1

5 years agoImprove ccache implementation
Mark Abraham [Sat, 27 Oct 2018 13:24:24 +0000 (15:24 +0200)]
Improve ccache implementation

Renamed the launch-c* scripts to make clear that they are supporting
infrastructure for ccache, so maintainers know what the script is for
without having to read it.

Moved them into the admin directory, which contains other
development-time resources. This also means that these scripts are no
longer in the top-level directory of the unpacked tarball, where they
might confuse users. ccache will still work for builds from the
tarball, however.

Eliminated temporary helper variables that didn't add value to
how we use configure_file().

Renamed GMX_CACHE_.*_COMPILER variables to use CCACHE rather
than CACHE, for consistency.

This change would have broken build trees that used to work with
ccache, because the wrapper scripts may not be regenerated
because the old GMX_CACHE_* variables are defined. But
changing to GMX_CCACHE_* has the side effect of fixing this
because the new variables will be undefined in such build trees.

Change-Id: I3b449251ee06adc8023ac1a58cb98a7b0be9bba5

5 years agoChange Table of contents depth
Paul Bauer [Mon, 29 Oct 2018 10:57:43 +0000 (11:57 +0100)]
Change Table of contents depth

Changes the table of contents depth on the main
GROMACS documentation to only show the headers by default, to reduce
clutter on the main page.

This also addresses the issue in #2716, but I'll keep this up for
discussion as it is a major change to what kind of information is
available at the main documentation page.

Fixes #2716

Change-Id: I699de47c09a9c2ef52de2b29a04c6c7f57759820

5 years agoRename to GMX_OPENCL_NB_CLUSTER_SIZE
Mark Abraham [Sat, 27 Oct 2018 08:26:17 +0000 (10:26 +0200)]
Rename to GMX_OPENCL_NB_CLUSTER_SIZE

The Intel iGPU OpenCL support for NB kernels needs a different cluster
size from the support for AMD and NVIDIA devices. We do use GMX_OCL as
a prefix for various developer-facing aspects of the OpenCL support,
but we shouldn't expose the use of OCL as an abbreviation to users,
given that we use GMX_USE_OPENCL fully written out to control the use
of the OpenCL build configuration.

Change-Id: I9d9b43e2888d77575fc0a781e6c9577c73551b8a

5 years agoUpdates to docs for OpenCL support
Mark Abraham [Thu, 11 Oct 2018 05:20:20 +0000 (07:20 +0200)]
Updates to docs for OpenCL support

Improved recognition of support for Intel devices, and some
organization.

Change-Id: Ia788e3c96fd495c47f7900001a1cac5d9405881e

5 years agoMerge "Merge branch release-2018 into release-2019" into release-2019
Mark Abraham [Fri, 26 Oct 2018 18:47:22 +0000 (20:47 +0200)]
Merge "Merge branch release-2018 into release-2019" into release-2019

5 years agoMerge branch release-2018 into release-2019
Mark Abraham [Fri, 26 Oct 2018 13:47:06 +0000 (15:47 +0200)]
Merge branch release-2018 into release-2019

Restored some text about gmx_enerdata_t fields that got list when
master branch moved some content from forcerec.h into the new
enerdata.h.

Change-Id: I45b956e02d6713190fca456ad0a5948db5001737

5 years agoFix link formatting in developer manual
Paul Bauer [Fri, 26 Oct 2018 12:01:38 +0000 (14:01 +0200)]
Fix link formatting in developer manual

Example used during code development and contribution session.

Change-Id: I636f5947ae6bb149b6510cff23dbc346c7f19775

5 years agoAdd missing mass term to deltaH
Berk Hess [Wed, 24 Oct 2018 06:37:35 +0000 (08:37 +0200)]
Add missing mass term to deltaH

The mass contribution was missing from foreign Hamiltonian difference
output from mdrun used for BAR.

Refs #2703

Change-Id: I415c835e9e1a8473243041be004013af7141a1cc

5 years agoUpdate user documentation overview
Paul Bauer [Fri, 26 Oct 2018 07:17:47 +0000 (09:17 +0200)]
Update user documentation overview

Change-Id: I433c28907d92b9c722772a0e0cb6f227bcfcc9f3

5 years agoIntroduce ArrayRefWithPadding
Mark Abraham [Thu, 18 Oct 2018 08:33:16 +0000 (10:33 +0200)]
Introduce ArrayRefWithPadding

Modules need to access views of memory with and without padding. This
class can be constructed from a PaddedVector, and provides the
capacity to hide the underlying padded container (and allocator),
while being able to obtain ArrayRef with and without padding.

Also updated wording of docs for ArrayRef, and attribution

Fixed issue with shell code using the same pointer for trial and
minimum configuration.

Fixes #2642
Fixes #2705

Change-Id: I45197215342ae011298abc310b877c34f8fab88b

5 years agoChange doc build without image conversion
Paul Bauer [Fri, 19 Oct 2018 08:25:13 +0000 (10:25 +0200)]
Change doc build without image conversion

Changed logic to use selective inclusion so that the manual gets build
without pages with images when images cannot be converted.

Cherry picked from master.

Refs #2692

Change-Id: Id112b2b8f20eb5de3b704bc2b27ab7ce55f035ff

5 years agoUpdate QM gaussian interface
Paul Bauer [Tue, 23 Oct 2018 10:20:00 +0000 (12:20 +0200)]
Update QM gaussian interface

The files had not been touched due to being hidden beneath
the QMMM flag and have thus started to rot.

Updated files and changed functions to reflect current status of the
rest of the code.

Fixes #2706

Change-Id: I2ecd24f3f85f36f704bbd5ba5df3c5faa6a7d6e5

5 years agoFix MPI w/o MPI_IN_PLACE
Paul Bauer [Tue, 23 Oct 2018 13:47:30 +0000 (15:47 +0200)]
Fix MPI w/o MPI_IN_PLACE

Fixes #2708

Change-Id: Ib251797c11cb5aa344bbc2d7083eee18487c4062

5 years agoAdd missing constraint term to deltaH
Berk Hess [Tue, 23 Oct 2018 15:13:58 +0000 (17:13 +0200)]
Add missing constraint term to deltaH

The constraint contribution was missing from foreign Hamiltonian
difference output from mdrun used for BAR.

Refs #2703

Change-Id: I00fb88bed76f9ff03faed7543e90adf163b99f08

5 years agoProperly attribute work and use correct dates for binaryinformation
Joe Jordan [Mon, 22 Oct 2018 16:21:31 +0000 (18:21 +0200)]
Properly attribute work and use correct dates for binaryinformation

Several people contributed over the past year and it seems
their work should be attributed.

Is there anyone else we are forgetting?

Change-Id: I0837815bf0375827822f58291c1a97e332dbea4e

5 years agoPrepare for beta 2
Paul Bauer [Mon, 22 Oct 2018 15:27:24 +0000 (17:27 +0200)]
Prepare for beta 2

Change-Id: I4aa103b3bee382fd9cc0d46f3afbcd21c29020c0

5 years agoGROMACS 2019 first beta release
Paul Bauer [Wed, 10 Oct 2018 09:20:18 +0000 (11:20 +0200)]
GROMACS 2019 first beta release

Change-Id: I50c584c4cc36f0f73ccffdc30ed299b81393a591

5 years agoFix mdrun start/end time print
Berk Hess [Fri, 19 Oct 2018 19:50:33 +0000 (21:50 +0200)]
Fix mdrun start/end time print

Fixes #2704

Change-Id: I2dc4f19edceee718e581369f0b93a81522c1de34

5 years agoDocumentation bug in gmxapi/context.h
M. Eric Irrgang [Fri, 19 Oct 2018 07:05:14 +0000 (09:05 +0200)]
Documentation bug in gmxapi/context.h

Documentation for launch() refers to old behavior. Removed mentioned of
a persistent Status object.

Change-Id: I40ba7bd5fc7fb4896de9be4ce3dd817b1a0467d4

5 years agoRemove unused files in docs/manual
Paul Bauer [Thu, 18 Oct 2018 12:59:40 +0000 (14:59 +0200)]
Remove unused files in docs/manual

Refs #2692

Change-Id: Ib9f0a7079397cb638bc2d7f67b9d450c004a612e

5 years agoFix segmentation fault in gmx helix
Paul Bauer [Wed, 17 Oct 2018 12:47:33 +0000 (14:47 +0200)]
Fix segmentation fault in gmx helix

Changed the logic in tpxio to only try to access the mtop
datastructure if it is actually present.

Fixes #2701

Change-Id: I268af10dc125a57758f5f3e79e4b14a25050b3b3

5 years agoAdd env.var. to disable update groups
Berk Hess [Wed, 17 Oct 2018 20:37:58 +0000 (22:37 +0200)]
Add env.var. to disable update groups

Change-Id: Iba4d9636f2da01fa1bc9e003446621c743fb9114

5 years agoEliminated t_ifunc from t_interaction_function
Mark Abraham [Mon, 15 Oct 2018 16:27:12 +0000 (18:27 +0200)]
Eliminated t_ifunc from t_interaction_function

Declared an equivalent function type within the listed-forces module,
because it is local there.

This eliminates the inappropriate dependency on listed-forces by the
topology module, and also the recently discovered inappropriate
transitive dependency on gmxlib by topology.

Change-Id: I0f818767711cdf3fac88c06e01fac7564e9ccc65

5 years agoMove gmx_ffparams_t to forcefieldparameters
Magnus Lundborg [Mon, 15 Oct 2018 12:55:59 +0000 (14:55 +0200)]
Move gmx_ffparams_t to forcefieldparameters

Change-Id: I4639211f419724bcf3282140c8291e0b1272abe5

5 years agoTask assignment for bonded interactions on CUDA GPUs
Mark Abraham [Thu, 11 Oct 2018 19:53:38 +0000 (21:53 +0200)]
Task assignment for bonded interactions on CUDA GPUs

Made a query function to find whether any interactions of supported
times exist in the global topology, so that we can make efficient
high-level decisions.

Added free for gpuBondedLists pointer.

Minor cleanup in manage-threading.h

Fixes #2679

Change-Id: I0ebbbd33c2cba5808561111b0ec6160bfd2f840d

5 years agoFix compiler issues
Mark Abraham [Tue, 16 Oct 2018 07:08:34 +0000 (09:08 +0200)]
Fix compiler issues

We recently added some extern template declarations to a function
whose argument list was then modified, but gerrit didn't flag the
change as requiring a rebase.

Also fixed mdrun-only build

Change-Id: Ib7aa0d685e881faa2abce628f06aef3d666d260c

5 years agoRemoved support for NVIDIA CC 2.x devices (codename Fermi)
Mark Abraham [Sun, 14 Oct 2018 09:16:39 +0000 (11:16 +0200)]
Removed support for NVIDIA CC 2.x devices (codename Fermi)

These are no longer tested or supported, but it is possible that the
OpenCL version of GROMACS will still run on such old devices.

Various code for configuration, the use of texture objects, the use
of shared memory, and the kernel dispatch is now simpler.

Fixes #2408
Fixes #2410
Fixes #2665

Change-Id: Ia7a00e5d6a97f93cd2768beb7ad56b2cce628a6f

5 years agoImprove robustness of end-to-end testing
Mark Abraham [Tue, 9 Oct 2018 23:20:36 +0000 (01:20 +0200)]
Improve robustness of end-to-end testing

Previously one could choose the number of ranks to run the test binary
with, but e.g. DD errors could exit the binary if an unsuitable number
could be chosen.

Fixes #2680

Change-Id: I5ca165c6a80763083f2db9beec61ad3b4bfbe00d

5 years agoRelease notes for restraint module and gmxapi.
M. Eric Irrgang [Sun, 14 Oct 2018 17:51:16 +0000 (20:51 +0300)]
Release notes for restraint module and gmxapi.

Describe new features supporting gmxapi client code and runtime binding
of restraint code. Add "gmxapi external API" section to install guide.

Refs #2585

Change-Id: I3da0d130b07862abc90387ade781d111ccbcd740

5 years agoCreate ExclusionBlocks
Mark Abraham [Mon, 15 Oct 2018 07:49:00 +0000 (09:49 +0200)]
Create ExclusionBlocks

Moves exclusion modification functionality to the topology module, as
it is not functionality unique to preproceessing.

Renamed t_block2 to ExclusionBlocks, since that is the only use we
currently have for it, and any new use should be using std::vectors
anyway.

Used an assertion for an error that can only triggered by coding bug.

This fixes the broken mdrun-only configuration, found in post-submit
Jenkins testing.

Fixes #2690

Change-Id: I2d0916bc3be1c20d44e1c4e07b53488f2b6971a3

5 years agoDe-duplicating mdrun setup
Mark Abraham [Mon, 8 Oct 2018 23:47:59 +0000 (01:47 +0200)]
De-duplicating mdrun setup

Made the API context setup use LegacyMdrunOptions to keep the two
client setup procedures in step and avoid duplicating code.

Refs #2585

Change-Id: I9909e26a41fd2015667c2f86335c09b6f9708e99

5 years agoEnable output of average pull force and positions.
Magnus Lundborg [Thu, 17 Nov 2016 15:48:57 +0000 (16:48 +0100)]
Enable output of average pull force and positions.

Write pull data to checkpoints to keep a proper average.
Add option whether to write instantaneous or average pull
coordinates and forces, respectively.

Fixes #2626

Change-Id: Id0268e00486028f497463dc13ae8d65a6c5df325

5 years agoIgnore pyenv config file.
M. Eric Irrgang [Mon, 15 Oct 2018 07:57:11 +0000 (10:57 +0300)]
Ignore pyenv config file.

Among other possibilities, [pyenv](https://github.com/pyenv/pyenv)
allows directory-scoped Python installation choices, which can be handy
when developing on the same system for projects with different Python
version requirements. For this, it uses a "hidden" `.python-version`.

Such files should not clutter up `git status` messages or be easily
accidentally included in a commit. This change adds `.python-version`
files to `.gitignore`

Change-Id: I88bbe813966282755097da674cb53d1f88a8e031

5 years agoPreparation for de-duplicating mdrun setup
M. Eric Irrgang [Sun, 14 Oct 2018 12:33:48 +0000 (15:33 +0300)]
Preparation for de-duplicating mdrun setup

Recent work introducing the API extracted MdFilenames and then
essentially duplicated everything else. This commit expands
MdFilenames into LegacyMdrunOptions, and clarified the plan that all
such code needs to become either module-based option handling, or
aspects of SimulationContext suitable for both CLI and API.

This commit introduces the Legacy MdrunOptions struct, so that a
future commit can make it available to the API setup for an mdrun
session. The layout of the changes is intended to minimize the textual
diff for the CLI. Code motion for clarity and also use by the API will
follow.

Removed MdFilenames, made its data a std::vector in
LegacyMdrunOptions, and used it via an ArrayRef. This clarifies that
it is read-only input data supplied by the client.

Change-Id: I3438cfe1ab52eeb2fffbd16f4bd5254b2a74f03f

5 years agoAdd some "to do"s for MDModules and Impl.
M. Eric Irrgang [Mon, 8 Oct 2018 13:46:19 +0000 (16:46 +0300)]
Add some "to do"s for MDModules and Impl.

The intention for the modules_ member in MDModules::Impl was not very
clear. Made some notes about forward directions, given the inconsistent
way we handle the electric field library MDModule and externally
provided modules.

Also, improve readability/formatting of data member declaration.

Change-Id: If3a83209c128dc52bab90cbc322565bc81416871

5 years agoFix compiler warnings
Mark Abraham [Sun, 14 Oct 2018 08:10:46 +0000 (10:10 +0200)]
Fix compiler warnings

clang 6 warned about these.

Change-Id: I4692d1c0e76e8cbe984e22028980956e1bd628d5

5 years agoResolve some linter warnings.
M. Eric Irrgang [Sun, 14 Oct 2018 13:41:42 +0000 (16:41 +0300)]
Resolve some linter warnings.

Local linting (not Jenkins builds) discovered some warnings that are
easily resolved.

* Remove unused variable from gmxapi session resources factory.
* Provide stronger hinting that a pointer is not null

Change-Id: I56f6758884b7f77d5091d273a93ac6bd1495a973

5 years agoFix more clang-6 warnings in CUDA code
Szilárd Páll [Mon, 8 Oct 2018 22:49:16 +0000 (00:49 +0200)]
Fix more clang-6 warnings in CUDA code

Fixes #2681

Change-Id: Ic1e096328687e53ca814034c4c3eb8db40db46df

5 years agoTest signaling facility through session resources.
M. Eric Irrgang [Sat, 13 Oct 2018 11:44:21 +0000 (14:44 +0300)]
Test signaling facility through session resources.

Build a simple MD extension that can optionally issue MD stop signals
when called in the MD loop. Use gmxapi session resources to access the
session signal manager. If initialized to do so, issues the signal when
called to evaluate restraint forces. Tracks the steps on which it is
called.

A toy simulation expects the restraint to be called `nsteps` times if
default constructed or `nstlist` times if initialized to issue signals.

Change-Id: I885cfeb207fd587b7ddd946203bd16ea4713dbf2

5 years agoModernize OpenCL memory allocation flags
Szilárd Páll [Tue, 9 Oct 2018 19:00:12 +0000 (21:00 +0200)]
Modernize OpenCL memory allocation flags

This change correct the memory allocation flags in the nonbonded module
so that these reflect the R/W use on both host- and device-side; the
former is made possible by requiring OpenCL 1.2.

Also improve some lacking error handling.

Refs #2193

Change-Id: Icef4890aa412b811bf189b78ff42ee8ca8c50113

5 years agoClean up gmxapi testsupport output.
M. Eric Irrgang [Sat, 13 Oct 2018 11:59:16 +0000 (14:59 +0300)]
Clean up gmxapi testsupport output.

Silence grompp during CMake preparation of gmxapi test input data. Make
some notes that a better long term solution is necessary.

Fixes #2664

Change-Id: If581edb4e129e75cf40e468a6060b253b4951091

5 years agogmxapi::UsageError
M. Eric Irrgang [Fri, 12 Oct 2018 18:34:27 +0000 (21:34 +0300)]
gmxapi::UsageError

Introduce gmxapi exception UsageError for invalid usage of gmxapi.

getMdrunnerSignal() now throws UsageError instead of asserting on
argument validity.

Change-Id: Ib010a998546ac96a83126ef941822b7e355d0784

5 years agoAllow API access to simulation signals.
M. Eric Irrgang [Thu, 11 Oct 2018 20:55:25 +0000 (23:55 +0300)]
Allow API access to simulation signals.

Refs #2620 for gmxapi milestone 10

Provide API client access to issue stop signals through simulation
Session resources. Stop conditions will be discovered by the simulation
when checked from within the MD loop.

Also relates to #2224 and various other works in progress.

Change-Id: I2815733d3d18bc04685dacbd8f6a3ba56e55b783

5 years agoAdd and enable PME OpenCL
Aleksei Iupinov [Wed, 16 May 2018 11:49:14 +0000 (13:49 +0200)]
Add and enable PME OpenCL

PME OpenCL kernels (spread, gather, solve) are added.
PmeGpuContext is taught to compile them. PME with OpenCL
is enabled everywhere (mdrun, unit tests, integrations tests).

Added preliminary documentation.

Change-Id: Iecf1393ddeb442f9b66ca31100bac9b88f83e52b

5 years agoQuiet compiler warnings
Mark Abraham [Fri, 12 Oct 2018 17:12:17 +0000 (19:12 +0200)]
Quiet compiler warnings

Observed with gcc-4.8 cuda-7.0 in release mode

Change-Id: I6baeafa999fa7c8e1bec5653fa8b6213d804f119

5 years agoUpdated name of intemolecular exclusions function
Viacheslav Bolnykh [Fri, 12 Oct 2018 15:05:49 +0000 (17:05 +0200)]
Updated name of intemolecular exclusions function

A follow-up commit for change I35073ad69752e22968c0e2821e2fdf9f0c465b2a
changes names as it was suggested in the review.

Change-Id: If6b12c1d04973556d85a1c01d6f3cbb9b8b4d5f5

5 years agoDeprecate various functionality in GROMACS 2019
Mark Abraham [Mon, 24 Sep 2018 21:10:58 +0000 (23:10 +0200)]
Deprecate various functionality in GROMACS 2019

Published a deprecation policy.

Updated the release notes to refer also to previously deprecated
features.

Announced intent to change some functionality:
* gmx mdrun -membed options (but not feature)
* gmx mdrun -rerun option (but not feature)
* integrator .mdp field will contain only integrators
* gmx do_dssp to be replaced by gmx dssp
* gmx trjconv and friends to be split and rewritten

List of newly deprecated functionality:
* conversion of aromatic rings to virtual sites
* gmx mdrun -table options (but not feature)
* gmx mdrun -gcom option and feature
* gmx mdrun -nsteps option and feature
* gmx mdrun -nsteps -resetstep -resethway moved to
  a gmx benchmark tool
* gmx mdrun -confout removed

Also updated release notes for functionality removed in GROMACS 2019.

Refs #2495, #1781
Fixes #2569, #1925

Change-Id: I1d00859d0f15409a472984f5a65347a50c71ad17

5 years agoAdd gmxapi session resources.
M. Eric Irrgang [Thu, 11 Oct 2018 20:31:00 +0000 (23:31 +0300)]
Add gmxapi session resources.

Allow simulation support code to access resources from the running
session. Provide some abstraction for resources implemented or
managed differently in different execution environments or API contexts.
Examples of resources are input and output data streams or simulation
control signals.

Support gmxapi milestone 10

Refs #2620

Change-Id: Ic0ed02b876e4d7a253ad75b58cd24593d7e68acf

5 years agoEnable restraints facilities.
M. Eric Irrgang [Tue, 9 Oct 2018 08:30:51 +0000 (11:30 +0300)]
Enable restraints facilities.

Extend gmxapi to allow a client to attach code to an MD simulation
through the restraints framework. Attach any registered restraints
during session launch.

Support gmxapi milestones 7 and 9, described in

Refs #2585

Change-Id: I61f7b52f1490e7692cdf7f14c7f46f8970b1c30a

5 years agoAdd API for adding MDModules / Restraints.
M. Eric Irrgang [Tue, 2 Oct 2018 17:51:42 +0000 (20:51 +0300)]
Add API for adding MDModules / Restraints.

Add gmxapi::MDWorkSpec, which can be passed through MDHolder.
It is a near-term solution until an API Context manager can be
more fully realized. A future implementation should instead
register factories for simulation support code in a Context
that is passed from the client. This would resolve ambiguity
about the purpose of gmxapi::MDWorkSpec versus the more
general gmxapi::Workflow, but in the present form, MDWorkSpec
is a public API class, while Workflow is still an implementation
detail.

Supports gmxapi milestone 7.

Refs #2585

Change-Id: I41fb13646c41b0f6e7690a0cedabd17eb3c47433

5 years agoImplement assigning bondeds to the GPU
Berk Hess [Tue, 9 Oct 2018 19:59:55 +0000 (21:59 +0200)]
Implement assigning bondeds to the GPU

Assigns supported bonded interactions to the GPU and converts
the atom indices to the nbnxn order.

Change-Id: Iab965e305e8eeb3468d95750f2dbdbb1a04e3a61

5 years agoInitialize force vector in PotentialPointData constructor.
M. Eric Irrgang [Fri, 12 Oct 2018 12:11:38 +0000 (15:11 +0300)]
Initialize force vector in PotentialPointData constructor.

A default-constructed PotentialPointData could have uninitialized
data, but it is sometimes helpful to be able to default construct an
object and not worry about whether it is valid. Objects will usually
be constructed with initializing values, but this change updates the
default constructor to avoid surprises.

Change-Id: I9ae87d8bc361da5b3134f05ca8761f25d6ca7646

5 years agoAdd restraints framework.
M. Eric Irrgang [Wed, 3 Oct 2018 08:54:03 +0000 (11:54 +0300)]
Add restraints framework.

Extension code can implement IRestraintPotential and register to
provide MD forces and energy. Client code is not necessarily expected
to implement the interface directly, but likely with the help of
template headers.

Restraint functors should ultimately be retrieved or instantiated from
factory functions in the API Context manager provided to the simulation,
but in the current implementation, registered restraints are made
available during launch through the MdrunnerBuilder.

For sample extension code, see
https://github.com/kassonlab/sample_restraint

Supports gmxapi milestone 9,

Refs #2585

Change-Id: I48d57570721223eacca957c9a0f7ae98163ab6ff

5 years agoImplemented QM/MM workflow inside core GROMACS
Viacheslav Bolnykh [Fri, 5 Jan 2018 17:16:44 +0000 (18:16 +0100)]
Implemented QM/MM workflow inside core GROMACS

Implemented MiMiC integrator along with the generation of
inter-molecular exclusion lists for QM atoms both in serial and parallel
parts of the code

Fixes #2309

Change-Id: I35073ad69752e22968c0e2821e2fdf9f0c465b2a

5 years agoExclude gmxapi source files from include sorting
Mark Abraham [Wed, 3 Oct 2018 22:39:59 +0000 (00:39 +0200)]
Exclude gmxapi source files from include sorting

For now, we are taking no care of such aspects, so the attributes
instruct the include sorter to ignore matching files. The check-source
target suppresses such files in other ways.

Refs #2585

Change-Id: Ib84a89bfa7d5eb54a5a3585d65725fedf98fbab4

5 years agoReinstated quasiharmonic entropy calculation in gmx anaeig.
David van der Spoel [Thu, 4 Oct 2018 07:59:11 +0000 (09:59 +0200)]
Reinstated quasiharmonic entropy calculation in gmx anaeig.

Fixes #2666.

Change-Id: I42b537127c6fcefa90345a444ff6410e527cd0e6

5 years agoAdd gmxapi::Workflow.
M. Eric Irrgang [Tue, 2 Oct 2018 17:14:37 +0000 (20:14 +0300)]
Add gmxapi::Workflow.

Hold a description of simulation work to be performed. Work description
is a dependency graph that allows a Context implementation to configure
and launch an API Session to satisfy data flow constraints. Initial
implementation just provides command-line type input for mdrun in the
form of a TPR filename. A more complete implementation would look more
like the "work specification" described in
https://doi.org/10.1093/bioinformatics/bty484

For more discussion on a full implementation, refer to
https://github.com/kassonlab/gmxapi/issues?q=milestone%3Agmxapi_workspec_0_2+

Refs #2585

Change-Id: I2c9bb99d88a11893201489757453ef25bc35a52

5 years agoAdd gmxapi::Session.
M. Eric Irrgang [Tue, 11 Sep 2018 10:01:50 +0000 (13:01 +0300)]
Add gmxapi::Session.

Allow API client to launch simulation work in a provided Context.
Supports running a simulation from a TPR file.

Support gmxapi milestone 7

Refs #2585

Change-Id: Ie57962a739ae722b1ced8dd75f0037f07be3e1fa

5 years agoFix PaddedVector issues
Mark Abraham [Tue, 9 Oct 2018 15:29:49 +0000 (17:29 +0200)]
Fix PaddedVector issues

The move construction with allocator was producing an empty buffer
upon change of pinning policy for scalar types. A change of allocator
means the implementation of move construction has to be done with a
copy, which is how we intended it to work.

Only PaddedVectors of copyable types can have non-zero size, because
we need to be able to copy elements for the padding region, so the
MoveOnly types in the HostVector tests have to be updated.

Fixes #2642

Change-Id: I646a57b0b0dd727647baa2544a1c5f7f1700661d

5 years agoOpen mdrun log file only once
Mark Abraham [Tue, 25 Sep 2018 14:33:46 +0000 (16:33 +0200)]
Open mdrun log file only once

The log file is now kept open with a t_fileio held RAII style, which
permits the appending restart code to truncate it if needed, so that
we don't have the opening and closing of the checkpoint file being
managed in several places.

Fixes #2651

Change-Id: I6105bf55a9a10aaf15ed2f11ef8955a47743bb91

5 years agoAdd short security notice
Paul Bauer [Tue, 18 Sep 2018 12:19:55 +0000 (14:19 +0200)]
Add short security notice

Cherry picked from master.

Refs #2645

Change-Id: I5fba37bca803c13ee9251aae0aae54c155537890

5 years agoInclude doi strings from zenodo during release
Paul Bauer [Tue, 14 Nov 2017 10:43:31 +0000 (11:43 +0100)]
Include doi strings from zenodo during release

Add functionality to include doi strings
gathered from Zenodo into the release build
source code and manual. Actual registration
of the DOI has to be handled somewhere else.

Change-Id: I1ce4c913c313e56e77e031e742367420e25da36d

5 years agoWrong name for report-methods tool
Paul Bauer [Wed, 10 Oct 2018 15:29:56 +0000 (17:29 +0200)]
Wrong name for report-methods tool

Tool was still named just "report" internally, changed to report-methods
correctly now.

Change-Id: Iedda3a3a00bb732a5a7c75f5c455960f2995e4f4

5 years agogmxapi expects position independent code.
M. Eric Irrgang [Tue, 9 Oct 2018 12:44:37 +0000 (15:44 +0300)]
gmxapi expects position independent code.

By default, do not attempt to build gmxapi when BUILD_SHARED_LIBS=OFF.

Enforce the assumption that libgmxapi is being built as a shared
library against a shared library. The longer term solutions are

 - only build one library
 - allow that library to be built as
   - a shared object library
   - an archive library without position independent code
   - an archive library with position independent code

Change-Id: Ib9a64be765c967e374934067954982891aca0299

5 years agoMove pull output functions to output.cpp
Berk Hess [Wed, 10 Oct 2018 08:31:03 +0000 (10:31 +0200)]
Move pull output functions to output.cpp

This change is only code motion.

Change-Id: I48c48766bc9bd200e8d729529d7d0679c40d1fba

5 years agoSwap custom OpenCL memset kernel for clEnqueueFillBuffer
Szilárd Páll [Tue, 13 Mar 2018 01:46:18 +0000 (02:46 +0100)]
Swap custom OpenCL memset kernel for clEnqueueFillBuffer

The OpenCL 1.2 API provides a function that is now used for clearing the
force buffer.

Refs #2438

Change-Id: I6dedf901f230d2b5f9838f315897186bd4bd55f8

5 years agoMinor refactoring in bonded threading
Berk Hess [Tue, 9 Oct 2018 12:05:26 +0000 (14:05 +0200)]
Minor refactoring in bonded threading

Change-Id: I149992d674c488e9e687b624a73dfef511d6484e

5 years agoUpdate regressiontest ref to download
Szilárd Páll [Mon, 28 May 2018 16:35:19 +0000 (18:35 +0200)]
Update regressiontest ref to download

Was still pointing to the release-2018 branch.

Change-Id: Ideeb429c135e819f71385cfcc7fae458e2b9aafa

5 years agoImplemented changes to preprocessor to work with MiMiC QM/MM
Viacheslav Bolnykh [Fri, 5 Jan 2018 17:16:44 +0000 (18:16 +0100)]
Implemented changes to preprocessor to work with MiMiC QM/MM

Added new integrator "mimic" and updated usage of QMMM-grps to be used
with MiMiC QM/MM. Updated code zeros charges within QM region and
changes bonds to CONNBOND and updates exclusion lists to exclude
non-bonded interactions between quantum atoms

Refs #2308

Change-Id: I34e798ae0c54457dad8f9a8f220482468db34708

5 years agoFix DomdecOptions default
Mark Abraham [Tue, 9 Oct 2018 08:18:12 +0000 (10:18 +0200)]
Fix DomdecOptions default

Interleave is the default when the mdrun option handling is
performed, and this should be consistent. It doesn't cause
a known problem, so far, however.

Change-Id: I7b56a87495f69b47d4c2903aa227d1a7777b86f2

5 years agoFix MSAN errors
Roland Schulz [Tue, 9 Oct 2018 01:00:54 +0000 (18:00 -0700)]
Fix MSAN errors

Refs #2642

Change-Id: I94a649f5bf0fdcc85a826882efa520776de7740a

5 years agoFix compiler warning
Berk Hess [Tue, 9 Oct 2018 06:52:28 +0000 (08:52 +0200)]
Fix compiler warning

Change-Id: I2912def81dc0ba593a63498d1e6bce17fc6e3174

5 years agoEnable update groups
Berk Hess [Wed, 19 Sep 2018 10:51:38 +0000 (12:51 +0200)]
Enable update groups

Also changed the naming of the decomposition unit. Everything was
named charge group, now it can also be atom or atom group.

Update groups are now mentioned in the manual and release notes

Change-Id: Ide81a759aa623be22672583dd5a8bac332c4c904

5 years agoTweak FindFFTW API checks
Szilárd Páll [Sun, 7 Oct 2018 21:16:18 +0000 (23:16 +0200)]
Tweak FindFFTW API checks

FindFFTW.cmake used to check an fftw API function's existance that we
don't even use. This change swaps the check with three checks for
fftw?__plan_many_dft, fftw?_plan_many_dft_r2c, and
fftw?__plan_many_dft_c2r.

Change-Id: I75283359e763ce2c1fdc75a2011166af2a986c95

5 years agoFix clang-6 warnings
Szilárd Páll [Mon, 8 Oct 2018 14:26:33 +0000 (16:26 +0200)]
Fix clang-6 warnings

gmx::RangePartitioning::Block() dose not return a reference, so the loop
variable will anyway be a copy.

Also removed unreachable brake statement.

Change-Id: I66ab5373c8d02977d4094c015bcbabd26b4b4949

5 years agoOCL: Add const to function arguments
Roland Schulz [Mon, 8 Oct 2018 06:15:08 +0000 (23:15 -0700)]
OCL: Add const to function arguments

f1b7d4a51254 added const to variables without also changing
function arguments. This fixes it. Not stricly necessary
(currently only supporting C). Noticed with C++.

Change-Id: I3276ca3f7608571143a608cb2ef28f43d8807964

5 years agoAdd OCL kernel target
Roland Schulz [Wed, 3 Oct 2018 04:25:13 +0000 (21:25 -0700)]
Add OCL kernel target

The object files generated aren't used for anything. The target
is only compiled when manually specificied. Purpose is to show
any compiler warnings.
Requires that the compiler is clang. If clang-tidy is found
also checks with it.

Fixes #2661

Change-Id: I8fde969dde3dd759b4464d28397eee450ab4fa64

5 years agoDisable FPE explicitly for TPI force calculation
Mark Abraham [Wed, 3 Oct 2018 11:44:50 +0000 (13:44 +0200)]
Disable FPE explicitly for TPI force calculation

Our init function for GoogleTest binaries turns on FPE detection,
which is good for the unit tests. But for TPI tests, it is better to
manage the behaviour more explicitly.

Refs #2404

Change-Id: I7b6753f9289a98e154158e7e70aa4019ebfb0d44

5 years agoReplace some NULL with nullptr in CUDA code
Szilárd Páll [Mon, 8 Oct 2018 12:18:43 +0000 (14:18 +0200)]
Replace some NULL with nullptr in CUDA code

Fixes some clang warnings in native CUDA builds.

Change-Id: Ie77c84dc33ae18fde40d5e0b6e2b0a3a3beb15a6

5 years agoFix OCL compiler warnings
Roland Schulz [Wed, 3 Oct 2018 00:08:14 +0000 (17:08 -0700)]
Fix OCL compiler warnings

Related #2661

Change-Id: I715553a40d2d913bd484f455d8e39e46632a8372

5 years agoRemove majority of OCL command line constants
Roland Schulz [Tue, 2 Oct 2018 22:06:52 +0000 (15:06 -0700)]
Remove majority of OCL command line constants

Related #2661

Change-Id: I8a139501bdd4f479183e829ba4c861f36c73afea