alexxy/gromacs.git
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 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

5 years agoImplement PaddedVector
Mark Abraham [Mon, 17 Sep 2018 14:17:50 +0000 (16:17 +0200)]
Implement PaddedVector

Implements a vector-like container that maintains padding such that
SIMD memory operations will always use initialized memory. All use of
the padded form data takes place via an ArrayRef, so that this is
explicit at the point of creation of the view. The PaddedArrayRef view
creates some safety through strong typing, also.

Increased the timeout for TSAN tests, which now take longer. Since
there are now two special case configurations for testing where we
permit a longer timeout, simplified the way we implement the increase
for the OpenCL case.

Fixes #2642

Change-Id: Ibcafe161689f4a02f7aa6fd0410edec47300264e

5 years agoWorkaround for ICC postsubmit bug
Paul Bauer [Wed, 3 Oct 2018 16:46:31 +0000 (18:46 +0200)]
Workaround for ICC postsubmit bug

Disables the death test that is currently failing in post-submit
for intel.

I also saw that another test dies in the trajectoryanalysis suit,
and that a number of builds failed with internal compiler errors.
But I'm at a loss about the reason there.

Change-Id: I9a9eaebb7120dc24e671a4c32b31372a17e02518

5 years agoMore updates to test matrix
Mark Abraham [Fri, 5 Oct 2018 16:09:59 +0000 (18:09 +0200)]
More updates to test matrix

Tested icc 19 and cuda 10 with no GPU

Also fixed recent issue introduced for clang+nvcc

Refs #2629

Change-Id: I194568c7fd32743f64fde9690f64250d715f7ba9

5 years agoFix make test
Mark Abraham [Sun, 7 Oct 2018 11:16:32 +0000 (13:16 +0200)]
Fix make test

Since pdb2gmx tests are no longer supported in the regressiontests
repo, stop calling them, because it produces a spurious failure.

Change-Id: If8e3b858c66c77069b01b8bebe040f60441f1b64

5 years agoUse new GPU slave for AMD OpenCL verify runs
Szilárd Páll [Sat, 19 May 2018 00:36:44 +0000 (02:36 +0200)]
Use new GPU slave for AMD OpenCL verify runs

With this we switch to the AMDGPU-PRO stack, a lot newer hardware
(Radeon RX 560) on the new bs-gpu01 slave.

Refs #2629

Change-Id: Ib2c5e14e5d89665130ae8d6c749c3230ccfe72a9

5 years agoTest with gcc 8 and cuda 10
Mark Abraham [Wed, 3 Oct 2018 22:01:25 +0000 (00:01 +0200)]
Test with gcc 8 and cuda 10

They're not supported together but we can efficiently update the
testing matrix just once.

Now using the internal XDR on Darwin because gcc 8 warns about casts
that are technically invalid because of the way xdrproc_t is defined
on Darwin, but not a problem in practice.

Refs #2629

Change-Id: Ia6e272cb208ad8f79c8655199aafc95007d2a605

5 years agoCheck log and other files differently during appending restart
Mark Abraham [Tue, 25 Sep 2018 19:34:17 +0000 (21:34 +0200)]
Check log and other files differently during appending restart

We need to do different operations on the log file than the other
files, so it makes sense to separate those aspects of its handling,
while calling a common function for those that are common. That will
also prepare to clean up the opening of the log file in Mdrunner, so
we can do it in only one place.

Checked all the offsets were valid before doing any file operations.

Used a bit less preprocessing, too.

Refs #2651

Change-Id: I23cfba550b57d169c021d72618341ff017a3e7de

5 years agoAdd update groups to DD atom displacement
Berk Hess [Fri, 21 Sep 2018 14:32:14 +0000 (16:32 +0200)]
Add update groups to DD atom displacement

When using update groups, the DD cell size is limited by the
displacement of centers of geometry of update groups raher than
the displacement of atoms. This allows for smaller DD cells.

Change-Id: I3bf840d09d2ce770bd049c33624e577f7aa3b6a7

5 years agoChange to test TSAN with clang and libomp
Mark Abraham [Tue, 2 Oct 2018 09:48:59 +0000 (11:48 +0200)]
Change to test TSAN with clang and libomp

This permits openmp and simd to be tested with ThreadSanitizer

Used more of the safe gatherLoadUTranspose, since that is required
for Jenkins to pass.

Change-Id: I262a5e61b715679e23cee641cf3be553714644ce

5 years agoFix multiple bugs detected on Windows
Roland Schulz [Sun, 30 Sep 2018 19:09:03 +0000 (12:09 -0700)]
Fix multiple bugs detected on Windows

Change-Id: Ibcc1bcedcb292a0ec8f05069733adb2d127ddc5e

5 years agoOCL: Make variables const
Roland Schulz [Fri, 11 May 2018 04:27:52 +0000 (21:27 -0700)]
OCL: Make variables const

Change-Id: If191903b25389c62ade7193f8ebc909c7dbd740c

5 years agoAdd gmxapi::System.
M. Eric Irrgang [Fri, 28 Sep 2018 09:42:26 +0000 (12:42 +0300)]
Add gmxapi::System.

Allow a client to hold an abstract representation of a simulation system
described by a TPR input file. This is part of a series of changes to
allow MD simulations to be configured and launched through a high-level
API.

Supports gmxapi milestone 4

Refs #2605

Change-Id: I6a292a3fe91556d06b9c384b1480c891decffd3f

5 years agoUpdate test matrices with new GPU specifiers
Szilárd Páll [Tue, 4 Sep 2018 21:18:21 +0000 (23:18 +0200)]
Update test matrices with new GPU specifiers

Separates software stack and hardware requirement specification; the
latter is done using the new gpuhw=vendor syntax.

Note that OpenCL version specified is for now ignored (cmake support
in follow-up commit).

Refs #2161

Change-Id: Ia1dfb175b2d47579577c5588a71d8b69a1bff07b

5 years agoUse subgroup for warp_any and CJ4 prefetch
Roland Schulz [Sun, 29 Apr 2018 21:19:26 +0000 (14:19 -0700)]
Use subgroup for warp_any and CJ4 prefetch

Change-Id: I548d669d0125084d3b6533ad072e758ff9fe5cc1

5 years agoMake AVX2 pass TSAN
Berk Hess [Fri, 28 Sep 2018 12:19:22 +0000 (14:19 +0200)]
Make AVX2 pass TSAN

TSAN builds complain about the LINCS code because it reads (and
ignores) one extra element per rvec when gathering rvecs on x86.

Change-Id: Id2da42e3dd2a1ac66b892c503b053b6a6c716a1a

5 years agoReplace CUDA call deprecated in CUDA 10
Mark Abraham [Wed, 3 Oct 2018 19:22:48 +0000 (21:22 +0200)]
Replace CUDA call deprecated in CUDA 10

Change-Id: I0cb52f3b3a9d58ff4d0d3914e6a8855ea78b9594

5 years agoExtract helper functions for preparing for appending
Mark Abraham [Tue, 25 Sep 2018 13:41:02 +0000 (15:41 +0200)]
Extract helper functions for preparing for appending

This simplifies code so we can handle the log file pointer better.

Refs #2651

Change-Id: Ifa3114d125e89bf22081b05c5e739693c996f01b

5 years agoSimplify EM usage of mdebin
Mark Abraham [Thu, 6 Sep 2018 15:08:12 +0000 (17:08 +0200)]
Simplify EM usage of mdebin

t_state is not the source of any data we write to mdebin during EM,
so we can pass nullptr. Same for the box.

dh/dl output is not produced from EM, so no need to pass them from
the inputrec either.

Change-Id: If87f673671d665d9b3169d174b2c5d9e6f7e3436

5 years agoAdd note to avoid constraints=all-bonds
Berk Hess [Tue, 2 Oct 2018 19:03:30 +0000 (21:03 +0200)]
Add note to avoid constraints=all-bonds

grompp will now issue a note when using constraints=all-bonds with
Amber, CHARMM and OPLS-aa when using a time step smaller than 2.6 fs
and no virtual sites.

Change-Id: Ibe7a9989f202ad6072af156bd0f146a26d775c2c

5 years agoUse fast returns in md5 computation
Mark Abraham [Fri, 28 Sep 2018 13:27:33 +0000 (15:27 +0200)]
Use fast returns in md5 computation

This logic is easier to follow than a recycled ret integer

Change-Id: Idc47cdae3d0453f1645a82582b13c86aa8eadcb8

5 years agoChange acceptable precision in minimizer test
Paul Bauer [Wed, 3 Oct 2018 17:56:42 +0000 (19:56 +0200)]
Change acceptable precision in minimizer test

Changed to allow post-submit to pass on the ARM machines.

Change-Id: I8f7e37e5c00578c62b184d69bf699610e0dc1f34

5 years agoAllow using COM of previous step as PBC reference
Magnus Lundborg [Thu, 5 Jul 2018 11:59:46 +0000 (13:59 +0200)]
Allow using COM of previous step as PBC reference

Add an option, when pulling, to use the COM of the group of
the previous step, to calculate PBC jumps, instead of a reference
atom, which can sometimes move a lot during the simulation. When
there is no previous step (when the COM of the previous step is
not set) use the COM based on the reference atom. The COM of the
previous step is written to the checkpoint.

Fixes #2625

Change-Id: I6120b76a15f92167753463326125428f822848ab

5 years agoAdd end-to-end tests of energy minimization
Mark Abraham [Tue, 4 Sep 2018 19:08:11 +0000 (21:08 +0200)]
Add end-to-end tests of energy minimization

Reformed CMakeLists.txt so that we have fewer issues running into
timeouts for each test run from ctest. This means the energy
minimization tests are reasonble to run in OpenCL configurations.

Added some convenience overloads of test infrastructure.

Change-Id: I3b21afb30a3367963d9921950f0dac17a66f15d1

5 years agoDisable GMXAPI when only building mdrun
Paul Bauer [Wed, 3 Oct 2018 11:45:58 +0000 (13:45 +0200)]
Disable GMXAPI when only building mdrun

GMXAPI depends intrinsicly on the different modules in the libgromacs
library and does not function without them. To make sure it can only be
used when it can actually work, it has been now disabled when only mdrun
is being build.

Fixes #2663

Change-Id: I9cc50a0196aec921ff3e40ad6eca837dfa3e281b

5 years agoAdd gmxapi::Context.
M. Eric Irrgang [Fri, 28 Sep 2018 13:55:46 +0000 (16:55 +0300)]
Add gmxapi::Context.

The Context holds the details necessary to launch work in a given
environment. A runtime session is launched using the configured details
of a Context implementation and the object bindings configured by the
user (managed by the Context).

Part of a sequence of changes introducing gmxapi classes System,
Context, Session, and Workflow.

Supports gmxapi milestone 5

Refs: #2587

Change-Id: I75baed9b5c856f284bc2c2370ef284319e95f13e

5 years agoCombine private sections of Mdrunner definition.
M. Eric Irrgang [Fri, 28 Sep 2018 20:04:18 +0000 (23:04 +0300)]
Combine private sections of Mdrunner definition.

Move the private default constructor to be with the other private
declarations in the gmx::Mdrunner class definition to improve
readability. Minor reorganization should have no functional change.

Change-Id: I3875b5d3fa6b574f7b2c629469f4ad5fb3650b19

5 years agoBasic modernization of md5 handling
Mark Abraham [Fri, 28 Sep 2018 13:03:58 +0000 (15:03 +0200)]
Basic modernization of md5 handling

No logic changes here. Removed some dead code.  Used some
std::array. Renamed some variables per style.

Change-Id: Ib98ec2a579a47a7ce3fa7d1c946cc18084118504

5 years agoMove mdrun mainFunction to client code.
M. Eric Irrgang [Tue, 11 Sep 2018 10:01:50 +0000 (13:01 +0300)]
Move mdrun mainFunction to client code.

supports gmxapi milestone 4, described at #2605

API clients need to be able to initialize and run MD simulations with
calls from separate code blocks or even translation units. Also, we
need clear distinctions between a pre-launch master Mdrunner and the
non-master Mdrunner threads.

In this change:

* Insert a Builder on which to develop the distinction between user
  interface and implementation code. User interface is handled in
  Director code, while the Builder and code further down the mdrun call
  stack should be user interface agnostic (i.e. not CLI-centric).
* Introduces a Context object to hold some resources. (see milestone 5
  and issue #2587)
* Prepare for more stateful Mdrunner objects, documenting resources in
  need of clearer management, describing future use cases and possible
  implementation details.
* Make Mdrunner non-copyable and not constructable by clients. Worker
  threads can initialize a new Mdrunner from the master instance with
  cloneOnSpawnedThread.
* Clarify parameter setting for spawned Mdrunner threads.
* Begin to encapsulate filename options available to client code from
  the actual client code.
* Remove extraneous variables `nfile` and `fnm`.

Later changes will:

* Separate Mdrunner into Launcher and Worker at mdrunner() call so that
  tMPI runner does not look reentrant.
* Hide data and clarify ownership / modernize memory management /
  clarify the subjects of the Builder `add` operations.
* Clarify separation of user interface from API parameters.
* Flesh out SimulationContext and related classes.

Refs #2605

Change-Id: I1db1d34b07ec0f8ba5f246ab763c74ad9eafe8f3

5 years agoAdd test data for gmxapi.
M. Eric Irrgang [Thu, 23 Aug 2018 17:30:14 +0000 (20:30 +0300)]
Add test data for gmxapi.

Build input file for a small system for basic gmxapi testing.

These test files either come from the mdrun tests or from manipulation
of that data. With access to test data and API tools to manipulate
input configurations, these files can be moved or removed.

Relates to gmxapi milestone 20 as described in issue #2585

Change-Id: I0eeb1d15120d3eb5309ec38c57e4e6f60097885a

5 years agoAdd gmxapi exceptions.
M. Eric Irrgang [Thu, 23 Aug 2018 17:35:58 +0000 (20:35 +0300)]
Add gmxapi exceptions.

Establish a base class and a couple of specific exceptions that may be
encountered by an API client. Distinct from gmx::GromacsException to
minimize coupling between GROMACS core and gmxapi at this stage of
development. It is an error for gmxapi operations to emit a
gmx::GromacsException because it is not easily caught by client code
using gmxapi/exceptions.h. The exception hierarchy should be merged in
the future, but until then, gmxapi implementation code should catch and
either usefully handle GromacsExceptions for the client or translate it
to something the client can catch.

Change-Id: I24042f71f77fac827bde3b2df1c3c1121befe9b5

5 years agoRemove unnecessary clearing in gmxcpp
Berk Hess [Tue, 2 Oct 2018 18:39:39 +0000 (20:39 +0200)]
Remove unnecessary clearing in gmxcpp

Change-Id: Ibc86e930e3e9acc01eb13e8c9b7fef6f648ca9e1

5 years agoConvert gmx_cpp to C++
Berk Hess [Tue, 2 Oct 2018 09:39:30 +0000 (11:39 +0200)]
Convert gmx_cpp to C++

This change in only refactorting inside gmxcpp.cpp.
No functional changes, except that all functions are now threadsafe
and whitespace is removd in find_directive() instead of in
process_directive().

TODO: Replace the linked list and handle swapping by a simple list.
TODO: The caller should not own the line string.

Change-Id: I4f95f5b1a2189fd58c2c7ee4329e84ada9f20811

5 years agoFix include formatting in gmxapi
Paul Bauer [Mon, 1 Oct 2018 10:38:31 +0000 (12:38 +0200)]
Fix include formatting in gmxapi

A source file triggered the reformatting in check source, fixed now.

Change-Id: Ica8a7905cbd76680b197a1912a032a32f46ef4a8

5 years agoAdd gmxapi::Status.
M. Eric Irrgang [Thu, 23 Aug 2018 17:34:48 +0000 (20:34 +0300)]
Add gmxapi::Status.

The class is very minimal, but provides a placeholder so
that other API operations have a stable return value. It
is used in cases where some other return value has no
obvious choice or is not implemented.

Relates to gmxapi milestone 17. Refs #2610.

Change-Id: I23675b4f3bd022ea6986b2e95ca838185327a8b7

5 years agoUse subgroup shuffle for reduction
Roland Schulz [Thu, 26 Apr 2018 05:25:40 +0000 (22:25 -0700)]
Use subgroup shuffle for reduction

Change-Id: I121821e70836111adccd0619db992037af6bee3c

5 years agoUpdate DD cutoffs for update groups
Berk Hess [Tue, 18 Sep 2018 12:11:42 +0000 (14:11 +0200)]
Update DD cutoffs for update groups

Due to the distance between atoms to the center of geometry of the
update group they belong to, there is now a difference between
atom-atom, domain-domain and atom-domain cutoffs.
Also adds the cutoff versus box check for update groups.

Change-Id: I474cd1371a1fac22f26b80adcc235bfb10764d34

5 years agoReduce mdrun tests using group scheme
Mark Abraham [Mon, 1 Oct 2018 06:48:01 +0000 (08:48 +0200)]
Reduce mdrun tests using group scheme

Made a legacy test binary for the remaining test cases (those for TPI)
so that we can start running the others also with OpenMP.

Made ctest run Verlet-scheme tests by default with 2 OpenMP threads.
Later we can make this work better, but first we need something
running.

Change the name of the OpenMP thread count selection option to be
consistent with mdrun.

Change-Id: Id8203bf5cf2870975fda35dcf91bfd4e601afbe7

5 years agoNarrow scope of ICC compiler work-around
Roland Schulz [Tue, 2 Oct 2018 02:15:23 +0000 (19:15 -0700)]
Narrow scope of ICC compiler work-around

Only Update 0 is affected. Neither 2017 or 2019 is.

Change-Id: Id29125e4f77709cf60e73c7708a3b80ba50b93be

5 years agoFix gcc-8 warnings about strings
Mark Abraham [Thu, 27 Sep 2018 18:41:49 +0000 (20:41 +0200)]
Fix gcc-8 warnings about strings

A bunch of slightly risky string handling is now safer or simpler.

Refs #2645

Change-Id: I0e02a34ecf7be16135e406ba2aaefab8a6e6ba39

5 years agoChange get_atom_index to return int
Paul Bauer [Sat, 29 Sep 2018 09:21:41 +0000 (11:21 +0200)]
Change get_atom_index to return int

Needed for writing with atom indices obtained directly from the
mtop helper function.

Change-Id: I502ad45d8237ff3f4162d3fa2083192f019254d5

5 years agoAdd release notes for removing non-reproducible aspects
Mark Abraham [Mon, 1 Oct 2018 14:34:51 +0000 (16:34 +0200)]
Add release notes for removing non-reproducible aspects

Recent change didn't have release notes, and should.

Change-Id: Ibdc3a8e3e7b9a36182946c94d3148802f24ceb22