alexxy/gromacs.git
4 years agoUse ListOfLists in gmx_mtop_t and gmx_localtop_t
Berk Hess [Fri, 6 Dec 2019 09:11:55 +0000 (10:11 +0100)]
Use ListOfLists in gmx_mtop_t and gmx_localtop_t

This change uses ListOfLists for exclusions in gmx_mtop_t and
gmx_localtop_t. Exclusions in t_topolgy as well as other atom
and index lists still use t_blocka.

Change-Id: Idfd532ad2a4b19d68e60b05dbd0a3082650ec20a

4 years agoFix issues in ListOfLists
Berk Hess [Fri, 13 Dec 2019 07:19:35 +0000 (08:19 +0100)]
Fix issues in ListOfLists

Fix enable_if function compilation issue for non-arithmetic types.
Extend tests of ListOfLists with non-POD type.
Fix ARM gcc-5 narrowing conversion warnings for arm post-submit.

Change-Id: I0c0129fd881c84d366c1745ee3d9e3a8caf8633e

4 years agoIgnore build host for CI builds
Paul Bauer [Fri, 13 Dec 2019 15:51:44 +0000 (16:51 +0100)]
Ignore build host for CI builds

When moving the CMake build directory between hosts a warning was
generated. This does not integrate well with containerized CI.

Change-Id: If0a775ab86d25a7d5646e824243892320d4ddbe3

4 years agoSet correct dependency for doc build on gmxapi
Paul Bauer [Fri, 13 Dec 2019 15:50:21 +0000 (16:50 +0100)]
Set correct dependency for doc build on gmxapi

When building the documentation with the python package, we need to know
about the symbols in the package when building docs for e.g. the pdf
manual.

Change-Id: Ia9a248da5746a5d90736cd3f3aa345fe8ffd0c79

4 years agoFix compiler warning about extra ;
Paul Bauer [Fri, 13 Dec 2019 15:50:01 +0000 (16:50 +0100)]
Fix compiler warning about extra ;

Change-Id: I9718ab9d9772dfc7251bc1eb175be59544b2c2cb

4 years agoAdd class ListOfLists
Berk Hess [Sun, 8 Dec 2019 22:06:01 +0000 (23:06 +0100)]
Add class ListOfLists

This is a replacement for t_blocka, i.e. a performance optimized
implementation of a list of lists. It only allows appending a list
at the end of the list of lists.

Change-Id: Ib4b7f5f0e57b82c939f53e9805dc16e9d76db22b

4 years agoMerge "Merge branch 'origin/release-2020' into master"
Mark Abraham [Thu, 12 Dec 2019 19:42:34 +0000 (20:42 +0100)]
Merge "Merge branch 'origin/release-2020' into master"

4 years agoMerge branch 'origin/release-2020' into master
Paul Bauer [Sat, 7 Dec 2019 18:02:33 +0000 (19:02 +0100)]
Merge branch 'origin/release-2020' into master

Resolved Conflicts:
cmake/gmxVersionInfo.cmake
src/gromacs/mdlib/lincs_cuda.cuh

Change-Id: Ic184065c27cd13c5871db73b3aeed03b76a1f50c

4 years agoUpdate Gitlab CI to latest fixes
Paul Bauer [Tue, 10 Dec 2019 16:47:59 +0000 (17:47 +0100)]
Update Gitlab CI to latest fixes

Results from corresponding pipeline can be found here:
https://gitlab.com/gromacs/gromacs-testing/pipelines/102059398

Change-Id: I4aa58f5b4afe1a4a794d1120553aa6e706d04151

4 years agoTest parallel mpi only with openmp
Paul Bauer [Tue, 10 Dec 2019 10:11:26 +0000 (11:11 +0100)]
Test parallel mpi only with openmp

Can time out in other conditions
Found while working on Gitlab CI

Refs #3232

Change-Id: I7cf62ed913d2bc8c88317a674b0594dbe54ba394

4 years agoAvoid unnecessary reinterpret_cast of coordinates buffer
Artem Zhmurov [Fri, 6 Dec 2019 12:05:06 +0000 (13:05 +0100)]
Avoid unnecessary reinterpret_cast of coordinates buffer

The DeviceBuffer<float> is first casted to rvec* and than to void*.
This change eliminates first cast and passes the buffer directly.

Change-Id: I4381ce3a495ef728fd5be45aa3b65be580a6aa49

4 years agoHopefully final gitlab CI fix
Paul Bauer [Mon, 9 Dec 2019 16:47:26 +0000 (17:47 +0100)]
Hopefully final gitlab CI fix

Change-Id: I3af8815810e453f2013f8678529e8139e832e13b

4 years agoMove doc build in gitlab to post-test stage
Paul Bauer [Mon, 9 Dec 2019 12:35:55 +0000 (13:35 +0100)]
Move doc build in gitlab to post-test stage

Will mean that a failure in doc build will not stop testing of otherwise
working code.

Change-Id: I86bf5bf4803ca16d251bbc2fd46dc28c4603aceb

4 years agoEven more gitlab CI fixes
Paul Bauer [Mon, 9 Dec 2019 15:42:25 +0000 (16:42 +0100)]
Even more gitlab CI fixes

Change-Id: I43b030c468e1b6381a9ae47e28d52526713009e8

4 years agoMore fixes to gitlab CI files
Paul Bauer [Mon, 9 Dec 2019 10:58:46 +0000 (11:58 +0100)]
More fixes to gitlab CI files

Change-Id: I86909c1312537ca1cbc73996eb06b4ef5f0a7d8e

4 years agoFix error in gitlab CI file
Paul Bauer [Mon, 9 Dec 2019 09:16:01 +0000 (10:16 +0100)]
Fix error in gitlab CI file

Found while trying to run the pipeline in gitlab

Change-Id: Idd97b894128962adb827f5583b963c9fb79f24fd

4 years agoAvoid 386 O3 codegen bug
Mark Abraham [Fri, 6 Dec 2019 09:45:21 +0000 (10:45 +0100)]
Avoid 386 O3 codegen bug

Refs #3205

Change-Id: I2aa5018bde089b11497892dd68a7f9715e69e20e

4 years agoAdd notes on MPI with gmxapi Python package.
M. Eric Irrgang [Thu, 5 Dec 2019 10:48:18 +0000 (13:48 +0300)]
Add notes on MPI with gmxapi Python package.

Change-Id: I7ecd33fcea482b8f300873fc7fdcea2c3958215e

4 years agoPass array ref instead of casting to basic array in PME redistribute
Artem Zhmurov [Fri, 6 Dec 2019 09:35:17 +0000 (10:35 +0100)]
Pass array ref instead of casting to basic array in PME redistribute

Change-Id: I98b3c211b2669266f8bc6b37580b8f48087e3645

4 years agoAdd files for gitlab ci testing
Paul Bauer [Thu, 5 Dec 2019 12:32:59 +0000 (13:32 +0100)]
Add files for gitlab ci testing

Those are the latest files that managed to run the tests in the gitlab
CI (at least the build stage,
https://gitlab.com/gromacs/gromacs-testing/pipelines/82439233).

This commit is intended to check if the CI gets successfully triggered
when uploading a new change mirrored from the github repo.

Change-Id: I49841f3fc8643dfb91abe0eb576f51b61b1f7451

4 years agoProvide more feedback when listed forces tests fail
Mark Abraham [Wed, 4 Dec 2019 16:07:59 +0000 (17:07 +0100)]
Provide more feedback when listed forces tests fail

Refs #3205

Change-Id: Ic012aeaf8b35af88b78e109acabb6048d593cab3

4 years agogmxapi Python package usage prose.
M. Eric Irrgang [Thu, 5 Dec 2019 10:46:50 +0000 (13:46 +0300)]
gmxapi Python package usage prose.

* Provide a walk through of basic gmxapi Python usage.
* Update one of the helper functions in test_subgraph.py to
  make sure that a documented example is tested.

Change-Id: I2ad3368fe8a39307bcd7e676dc36627e30ab7ac1

4 years agoImprove pytest fixtures for directory management.
M. Eric Irrgang [Thu, 5 Dec 2019 14:47:07 +0000 (17:47 +0300)]
Improve pytest fixtures for directory management.

* Add a pytest command line option to control whether to remove
  temporary directories always, never, or conditionally upon test success.
* Encapsulate context managers and test fixtures for tempdir removal,
  temporary changes of working directory, and access to the new pytest
  command line argument.
* Use a context manager to use the temporary testing directories
  for working directory, as well. Works around potential issues
  with GROMACS creating temporary files in different directories
  (or filesystems) from where they are relevant.

This change makes identical changes to 3 different conftest.py files.
Consolidation into the gmxapi.testsupport module is deferred to a
separate change.

Refs #3227

Change-Id: I703d1e3806f7b4d8f2ae3b80c39ec64acd9cf3b4

4 years agoRelax cross-correlation test precision
Christian Blau [Wed, 4 Dec 2019 15:52:01 +0000 (16:52 +0100)]
Relax cross-correlation test precision

Relase the floating point precision in cross-correlation evaluations on
large data arrays further. i386 fails here with debian experimental build.

Refs #3205

Change-Id: I86c9ad1804da5be98671ac14a5bc37ea5636aad0

4 years agoAdded OpenCL build to release matrix
Mark Abraham [Mon, 5 Nov 2018 18:07:20 +0000 (19:07 +0100)]
Added OpenCL build to release matrix

Added missing information for one build.

Change-Id: I30da8ce4e19e104182ee082cc18a83e318069b3c

4 years agoRemoved unnecessary link_directories command for gtest
Mark Abraham [Wed, 4 Dec 2019 15:25:35 +0000 (16:25 +0100)]
Removed unnecessary link_directories command for gtest

This warns at link time on MacOS Catalina with macports
clang-9 and cmake 3.15.5

Change-Id: If493f72133c0388e6119ea7a30aa1dc5c5830c7a

4 years agoRemove cutoff-scheme group from default mdout.mdp output
Christian Blau [Wed, 4 Dec 2019 12:08:10 +0000 (13:08 +0100)]
Remove cutoff-scheme group from default mdout.mdp output

The .mdp default output file had a reference to the group scheme in it,
which might prove confusing to users that assume that this is still
available.

Change-Id: I434f15e46dfc0a8ebffe8d826855dc8e67168fba

4 years agoThird beta release of GROMACS 2020
Paul Bauer [Tue, 26 Nov 2019 09:37:15 +0000 (10:37 +0100)]
Third beta release of GROMACS 2020

Updated regressiontest hash

Change-Id: I96be9b7b9f3f94f6eddf1fd4603cc829fd3e1848

4 years agoRevert "Enable GPU update with DD when GPU comm features are enabled"
Paul Bauer [Tue, 3 Dec 2019 10:21:47 +0000 (11:21 +0100)]
Revert "Enable GPU update with DD when GPU comm features are enabled"

This reverts commit b88f3eadf90261555508f6a4df64ce184141a66a.

Reason for revert: Mark found the code segfaulting under some conditions with domain decomposition and update enabled, so this is not ready to be used yet.

Refs #3226

Change-Id: I45cf9564a87595d445057da071a8fca5c60f9d9a

4 years agoFix nightly build by correctly defining several
Paul Bauer [Tue, 3 Dec 2019 11:25:54 +0000 (12:25 +0100)]
Fix nightly build by correctly defining several
variables as bool instead of int.

Change-Id: Ia22fe3acdc55131ea40c80b104293273cafb1017

4 years agoEnable GPU update with DD when GPU comm features are enabled
Alan Gray [Tue, 5 Nov 2019 12:52:21 +0000 (04:52 -0800)]
Enable GPU update with DD when GPU comm features are enabled

Changes assertions to allow GPU update to run with domain
decomposition, only when GPU PME-PP communication and GPU halo
exchange features are enabled through their respective environment
variables.

Added test coverage to the gpuupdate matrix

Change-Id: Ie05dac64eada8f704c3a33d0eb6e5bc74dfcc61e

4 years agoSet update to run on GPU by default if possible
Paul Bauer [Fri, 29 Nov 2019 15:00:52 +0000 (16:00 +0100)]
Set update to run on GPU by default if possible

Change-Id: I1a2052968c8d8dd8020744bf15f974bc0d92a6ef

4 years agoHeuristics for switching between CUDA spread/gather kernels
Jonathan Vincent [Wed, 6 Nov 2019 14:55:10 +0000 (06:55 -0800)]
Heuristics for switching between CUDA spread/gather kernels

The various CUDA spread/gather kernels perform better in different circumstances,
so heuristics are used to control which one is selected.

Refs #3189

Change-Id: I32c0726021a48dc8721e337f8f41e9c9d334e05c

4 years agoAdd check for coupled constraints for CUDA update
Berk Hess [Mon, 2 Dec 2019 13:15:08 +0000 (14:15 +0100)]
Add check for coupled constraints for CUDA update

The CUDA LINCS code has a limit on the number of coupled constraints.
This is now checked during in the GPU update decision function.

Change-Id: I5eee96b82f3f5196b64a5e815eae78d4ed367a80

4 years agoExtract LINCS CUDA helper functions
Berk Hess [Mon, 2 Dec 2019 10:43:16 +0000 (11:43 +0100)]
Extract LINCS CUDA helper functions

Change-Id: I00fb311053aa9c13036b401107399409f9a01599

4 years agoRelax test tolerance for cross correlation measure for densities
Christian Blau [Mon, 2 Dec 2019 13:52:27 +0000 (14:52 +0100)]
Relax test tolerance for cross correlation measure for densities

Some compilers do not perform the optimisations that are necessary to
reach default real tolerance when calculating the cross correlation of
larger three dimensional densities (100x100x100 voxels)

This patch loosens the requirement on the precision of cross correlation
evaluations.

refs #3205

Change-Id: Iad1bb1b17bb6935b2ce2537bcbb6c3902172a6bc

4 years agoUse DOI for citing in reference manual section
Paul Bauer [Fri, 29 Nov 2019 15:10:05 +0000 (16:10 +0100)]
Use DOI for citing in reference manual section

Change-Id: I84ee722345669afbca972697ebcc76d874af1b46

4 years agoFurther improve taskassignment exception handling
Mark Abraham [Thu, 28 Nov 2019 16:49:26 +0000 (17:49 +0100)]
Further improve taskassignment exception handling

It was still posssible that the exit() from one thread-MPI rank would
cut off another rank while the latter's error output before it
finished being written to the terminal stream.

This solution is still deficient in some aspects, but it will
always work on single-node testing (ie. including Jenkins) and
often work usefully in multi-node testing.

Change-Id: Ib41e012b9f56591c80046b44891dd77af5a2f938

4 years agoMerge origin/release-2020 into master
Paul Bauer [Sat, 30 Nov 2019 10:58:42 +0000 (11:58 +0100)]
Merge origin/release-2020 into master

Resolved Conflicts:
src/gromacs/mdlib/update.cpp
src/gromacs/mdrun/md.cpp

Change-Id: Ibf1c632cc3096121dccd6c1c1af9bff3d590d18f

4 years agoMerge "Merge branch release-2019 into release-2020" into release-2020
Berk Hess [Fri, 29 Nov 2019 16:22:15 +0000 (17:22 +0100)]
Merge "Merge branch release-2019 into release-2020" into release-2020

4 years agoFix unaligned access with AVX512
Paul Bauer [Fri, 29 Nov 2019 13:21:44 +0000 (14:21 +0100)]
Fix unaligned access with AVX512

Found and debugged by Gilles Gouaillardet

Change-Id: I9203593c94eb745020274b126601d30e49d7aac2

4 years agoFix build error without thread or regular mpi
Paul Bauer [Fri, 29 Nov 2019 10:32:17 +0000 (11:32 +0100)]
Fix build error without thread or regular mpi

Some more unused variable warnings that I haven't fixed yet.

Fixes #3218

Change-Id: Id47718bb0af97d3a494afa133af8b54ba71b9d5d

4 years agoPrint OpenCL error info in case of failed assertion in device buffer management
Artem Zhmurov [Thu, 28 Nov 2019 18:59:36 +0000 (19:59 +0100)]
Print OpenCL error info in case of failed assertion in device buffer management

Having error code availible is helpful for debugging.

Change-Id: I71c808c9171eae3f87b72253f3e81f0e2e2c22a2

4 years agoMerge branch release-2019 into release-2020
Mark Abraham [Fri, 29 Nov 2019 12:52:13 +0000 (13:52 +0100)]
Merge branch release-2019 into release-2020

Change-Id: I138d910b0d5cb8555460f87345c4e312e528a3ce

4 years agoMake Leap-Frog CUDA kernel selection safer
Artem Zhmurov [Thu, 28 Nov 2019 15:09:48 +0000 (16:09 +0100)]
Make Leap-Frog CUDA kernel selection safer

This is a small improvment on a recent bug fix, which adds:
1. An implicit boolean on whether the kernel with temperature
   coupling velocity scaling should be selected.
2. Adds an assertion on the correctness of an input.

Original bug fix: b362a880f75d93e9252affdad12ed5448fbac517

Change-Id: Idd981337f2f53f4d3a803ce50162b2f9c753b860

4 years agoRename some variables in GPU Update
Artem Zhmurov [Thu, 28 Nov 2019 09:59:31 +0000 (10:59 +0100)]
Rename some variables in GPU Update

The temperature and pressure coupling booleans in GPU version of
update were renamed to better represent their meaning. Minor
refactoring in the UpdateConstraintsCUDA CPU-stub class.

This change is just a refactoring, mostly renaming.

Change-Id: I039722a5ef827a20264b6d4ac6c6436227094e09

4 years agoCheck for using correct hwloc headers and runtime
Paul Bauer [Wed, 27 Nov 2019 15:35:16 +0000 (16:35 +0100)]
Check for using correct hwloc headers and runtime

Also add assertion in the code to prevent errors from linking
against the wrong library while running.

Fixes #3200

Change-Id: Ib2f2861702e111f67c38b0c9d65ccbe4c81a0ccd

4 years agoClear device force buffer if it was reallocated
Artem Zhmurov [Thu, 28 Nov 2019 16:41:43 +0000 (17:41 +0100)]
Clear device force buffer if it was reallocated

The force buffer on the device is assumed to be clear at the start of
the step. This was not ensured if the buffer was realocated after e.g.
domain decomposition.

Change-Id: I4677f71edc9479d972a6d9471b8cbe2c377f8827

4 years agoUpdate documenation for NPT GPU update
Berk Hess [Thu, 28 Nov 2019 15:21:53 +0000 (16:21 +0100)]
Update documenation for NPT GPU update

Change-Id: Iaa0ee0555621955c6eb7276d1b9f097420c4e70a

4 years agoFix pressure coupling with GPU update
Artem Zhmurov [Tue, 12 Nov 2019 10:54:35 +0000 (11:54 +0100)]
Fix pressure coupling with GPU update

This fixes the pressure coupling Parrinello-Rahman and
Berendsen schemes when Update is offloaded to the GPU.
The coordinate scaling is performed on GPU. The PBC
data is also copied to device when periodic box is
updated by the pressure coupling.

Fixes #3182.

Change-Id: I57226c9f0fa249cb018d38b653a6ecb3ffd9c7c2

4 years agoFix postsubmit
Paul Bauer [Thu, 28 Nov 2019 12:28:57 +0000 (13:28 +0100)]
Fix postsubmit

Change-Id: I47496ad6e82f9b67060979f916d5d5510fdba182

4 years agoRemove assertion failure in AWH without initial stage
Berk Hess [Thu, 28 Nov 2019 10:58:48 +0000 (11:58 +0100)]
Remove assertion failure in AWH without initial stage

When not using the initial stage in AWH, we should not check
for coverage and histogram anomalies at step 0.

Fixes #3217

Change-Id: Iee19c4740c02ce56c0b43ad89efb6e37f4ad1a0d

4 years agoFix bug with GPU pressure scaling at non T-scaling steps
Berk Hess [Thu, 28 Nov 2019 09:23:45 +0000 (10:23 +0100)]
Fix bug with GPU pressure scaling at non T-scaling steps

Only affected Parrinello-Rahman coupling, which is not enabled yet.

Change-Id: Ie081ffe2a925de92361c43b1f5de8e1fe324a486

4 years agoFix check-pointing for density guided simulations
Christian Blau [Wed, 27 Nov 2019 11:10:03 +0000 (12:10 +0100)]
Fix check-pointing for density guided simulations

Previously, checkpointing for density-guided simulations did not take
into account that the checkpointing occurs in the middle of the md-loop.

Now, the state is stored before the force-calculations, so that
simulations are restarted correctly.

refs #2282
fixes #3215

Change-Id: Ide4ebf94f2801acbe476a5cd348af66d0a6f28ac

4 years agoCombine two booleans in md loop
Artem Zhmurov [Wed, 27 Nov 2019 22:23:33 +0000 (23:23 +0100)]
Combine two booleans in md loop

Two booleans that were supposed to have identical meaning have being
created in the md loop. This patch conbines them into one. Note that
the scope of the boolean that is responsible for the D2H coordinates
copy have expanded, which represents correct behavior.

Change-Id: I421b18ee81f4cf9cce19cdd60023cb097d85a5d7

4 years agoDisable GPU PME-PP communication with mdrun -pmefft cpu
Mark Abraham [Wed, 27 Nov 2019 08:56:37 +0000 (09:56 +0100)]
Disable GPU PME-PP communication with mdrun -pmefft cpu

The MdrunMpiTest with two ranks defaults to using a separate PME rank,
and that attempts to run all flavors of -pmefft.  However only -pmefft
gpu is targeted for any of the new GPU development, so the development
feature flags need to account for that.

SimulationWorkload is also improved to be aware of this fact.

Change-Id: I57c8e8ce81fdb7aaf65de89feebb369d3f2f10eb

4 years agoAdd method for coordinates scaling into GPU update-constrain class
Artem Zhmurov [Tue, 12 Nov 2019 09:55:02 +0000 (10:55 +0100)]
Add method for coordinates scaling into GPU update-constrain class

The coordinates scaling is needed on the pressure coupling step in
case the box size has changed.

Change-Id: I0bf7c7a2f77c1bd42dd0713f689096eaca409f88

4 years agoAdd gmxapi_extension tests to 'tests' target.
M. Eric Irrgang [Wed, 6 Nov 2019 15:07:56 +0000 (18:07 +0300)]
Add gmxapi_extension tests to 'tests' target.

Improve GMX_PYTHON_PACKAGE convenience targets. When GMX_PYTHON_PACKAGE
is ON, the subprojects in the python_packaging subdirectory are built.
When testing is enabled, the sample_restraint C++ unit tests were
transitively included in the 'check' target, but no mechanism was in
place to ensure they were built before the CTests and google tests
were run. This change adds the test binaries as dependencies of the
'tests' target so that the test binaries are built through normal
machinery when GROMACS is built with testing enabled and
GMX_PYTHON_PACKAGE=ON.

Change-Id: I751655dc6b6d4d58b5bbb9f5f522e26382b4f0a2

4 years agoEvent-based Dependency for GPU Force Halo Exchange
Alan Gray [Tue, 22 Oct 2019 14:23:11 +0000 (07:23 -0700)]
Event-based Dependency for GPU Force Halo Exchange

Introduces new event recorded when exchanged forces are ready on GPU,
and passes this into force buffer ops using dependencyList. Removes previous
mechanism of forcing local stream to wait on non-local stream.

Addresses part of #3093
Refs  #3194

Change-Id: I768898839e5c6a653894d5eb80354f0e423e06ed

4 years agoImprove handling of task-assignment exceptions
Mark Abraham [Mon, 25 Nov 2019 12:10:50 +0000 (13:10 +0100)]
Improve handling of task-assignment exceptions

Resolves several current TODOs to improve the reporting of error
messages derived from exceptions. This improves the robustness of the
regressiontests logic that depends on parsing the error message to
understand whether and how to retry running mdrun.

Change-Id: I8c9eac95a2ef4861e90350e77fb9beafb08e9d2e

4 years agoRelax tolerance for bd tests
Mark Abraham [Tue, 26 Nov 2019 09:54:14 +0000 (10:54 +0100)]
Relax tolerance for bd tests

The implementation is somehow not very reproducible.

Refs #3205

Change-Id: Ibf9de00d6e67b8e2237cc8726f300b2bf8ad2327

4 years agoRemove the PBC management from LINCS, SETTLE and Leap-Frog
Artem Zhmurov [Mon, 7 Oct 2019 12:10:23 +0000 (14:10 +0200)]
Remove the PBC management from LINCS, SETTLE and Leap-Frog

The PBC management was introduced as a temporary measurement
to allow each individual class to function independently.
Since they are now combined now this scaffolding can be removed.

Change-Id: I87eb208324b9a7b719b5462a874f2a0012d99ab4

4 years agoBug fix for nonlocal D2H coordinate transfer synchronization
Alan Gray [Tue, 26 Nov 2019 10:12:02 +0000 (02:12 -0800)]
Bug fix for nonlocal D2H coordinate transfer synchronization

Fixes bug introduced in I2e2ba1b6436f087d1f2fef4ff876445814a724e7,
which replaced the NB-module D2H nonlocal coordinate copy launch with
a new State Propagator module equivalent, but did not change the
corresponding event wait call, such that the dependency was not
satisfied. This change replaces the NB event wait with the correct
State Propagator event wait.

Change-Id: I7c812974c145d315fa6516b2bbea39164439728e

4 years agoFix unused variable warning in ewald code
Paul Bauer [Tue, 26 Nov 2019 10:29:04 +0000 (11:29 +0100)]
Fix unused variable warning in ewald code

Fixes #3193

Change-Id: Id3f8422ec95e6864553a6e9f03a144fbe4ed8674

4 years agoFix issues with AWH with periodic pulling
Berk Hess [Mon, 25 Nov 2019 14:43:05 +0000 (15:43 +0100)]
Fix issues with AWH with periodic pulling

Removed fatal error with AWH with periodic pull-geometry 'direction'
when the distance was within 2% of half the box size.
Changed an assertion failure when the AWH interval was larger than
the box size to a fatal error.
Clarified the documentation for pull geometry 'direction-periodic'.

Refs #2946

Change-Id: I447a9a490a5883139afc268fd367b8b249591fbc

4 years agoFix race condition in GPU X halo exchange with GPU update
Alan Gray [Sat, 2 Nov 2019 19:24:43 +0000 (12:24 -0700)]
Fix race condition in GPU X halo exchange with GPU update

When the GPU Update featured is enabled on multi-GPU with the GPU halo
exchange feature, it was possible that the GPU receiving the halo data
would still be working on the previous timestep and writing to the
same coordinate buffer in the GPU update, causing a race
condition. This change replaces the pre-existing synchronization
mechanism of a MPI Send/Recv of a boolean flag with the same but
exchanging the events that are recorded when the coordinates are ready
on the device. The remote event is then enqueued to the stream that
the GPU uses for pushing the data, satisfying the dependency of the
push on the remote update being completed on the GPU.

Change-Id: Ie16a93dcc3064d73da1e560d82b4e76870d03e52

4 years agoFix duplicate CONNECT records in pdb files
Christian Blau [Mon, 25 Nov 2019 15:18:40 +0000 (16:18 +0100)]
Fix duplicate CONNECT records in pdb files

When adding connect records in pdb files, it was not checked if records
already existed and were thus duplicated in output. This patch fixes
this behavior.

Fix originally provided by Boris Timofeev.

refs #3206

Change-Id: I5850f4b6279b37df07282acc4416f433099d90c8

4 years agoUse same matrix for Parrinello-Rahman and Berendsen coordinates scaling
Artem Zhmurov [Tue, 12 Nov 2019 17:33:37 +0000 (18:33 +0100)]
Use same matrix for Parrinello-Rahman and Berendsen coordinates scaling

Currently, Parrinello-Rahman uses the matrix created in the md.cpp,
whereas it is created when needed internally for the Berendsen.
This commit renames the matrix and make use of it in both barostats.

Change-Id: I66e010a1ed7efbc93c8a2240ccb7b9e174fd7e45
(cherry picked from commit abab855fdceee437c33010ebbe544afe1f88db87)

4 years agoRead mrc density map format with all endianesses.
Christian Blau [Fri, 22 Nov 2019 16:51:23 +0000 (17:51 +0100)]
Read mrc density map format with all endianesses.

Swaps the endianess of reading mrc density maps if header is not sane.

refs: #2282

Change-Id: I417e402b2ab801c22d9963fabb0e60b186288651

4 years agoCheck mrc header for sanity
Christian Blau [Thu, 21 Nov 2019 15:48:07 +0000 (16:48 +0100)]
Check mrc header for sanity

Add functionality to check mrc density map headers for sanity.

Required for endianess correction, because the endianess stamp is not
guaranteed to be right for most .mrc maps.

Change-Id: I8956bcbc4b9fd7b3b6346c3b4cdd0022c9e3332a

4 years agoFix index mapping issue with LINCS on GPU
Artem Zhmurov [Thu, 21 Nov 2019 16:33:57 +0000 (17:33 +0100)]
Fix index mapping issue with LINCS on GPU

In some cases (e.g. when DD is used), coupled constraints blocks
can have constraint indices that are interleaved with other blocks.
This was not taken into account when setting up the LINCS GPU data
structures. This patch fixes that by ensuring that all coupled
constraints are added to the mapping array one after the other.
Add note in decideWhetherToUseGpuForUpdate() that we need to add
a check for this when update auto will choose gpu in some cases.

Also renamed spaceNeeded by numCoupledConstraints to avoid confusion.

Fixes #3211.

Change-Id: Ib402c5cc9fc20116496034cdc11be921586bbd15

4 years agoInMemorySerializer with endianess swap.
Christian Blau [Tue, 29 Oct 2019 14:42:46 +0000 (15:42 +0100)]
InMemorySerializer with endianess swap.

Adds an InMemorySerializer that swaps endianess. Required for reading
data that is not handled with XDR serializers and was written with
different endianess, e.g., mrc files for density guided simulations.

refs #2282

Change-Id: Ice96fe8684bb0b920c22dc7d3c2b2087260eb9ad

4 years agoFix nightly OpenCL tidy build
Paul Bauer [Fri, 15 Nov 2019 08:08:16 +0000 (09:08 +0100)]
Fix nightly OpenCL tidy build

Also amended build system info to say that clang-tidy build does not
need to be explicitly set to not use OpenMP.

Change-Id: Ia84f3c9c02b23ed3b8070b0cebf6d8c504272863

4 years agoNew cool quote
Artem Zhmurov [Sat, 23 Nov 2019 17:34:10 +0000 (18:34 +0100)]
New cool quote

Change-Id: I8998f56f73a595df0e1b547d307eef65afe7944d

4 years agoMerge branch release-2020
Mark Abraham [Thu, 21 Nov 2019 09:45:55 +0000 (10:45 +0100)]
Merge branch release-2020

Change-Id: I72d135ce8e774d1ff70b66d86cac22eed864425e

4 years agoNew cool quote
Mark Abraham [Thu, 21 Nov 2019 15:03:21 +0000 (16:03 +0100)]
New cool quote

Change-Id: I96e52f16aeaf2e41db3a68b889dcd0afae966828

4 years agoFix building on Solaris with GCC
Vedran Miletić [Fri, 26 Jul 2019 14:48:58 +0000 (16:48 +0200)]
Fix building on Solaris with GCC

GROMACS now compiles on Solaris x86, specifically illumos distribution
openindiana. GCC complained about a missing sqrt() variant which was
addressed with static_cast and linker complained about missing
libsocket which was addressed with SunOS-specific entry in
target_link_libraries.

Refs #3050

Change-Id: Ic14a9327fa353270ef0e787b4d2357e86e71da53

4 years agoAdd D2H copies for the checkpointing
Artem Zhmurov [Wed, 30 Oct 2019 10:15:04 +0000 (11:15 +0100)]
Add D2H copies for the checkpointing

If the update is offloaded, the current coordinates and velocities
are stored on the device and have to be copied for the checkpointing.

Change-Id: I391bb83e1c70a17c1679f479234a157ce606a908

4 years agoMove the copy of the velocities for the output closer to the output
Artem Zhmurov [Tue, 29 Oct 2019 20:18:08 +0000 (21:18 +0100)]
Move the copy of the velocities for the output closer to the output

The D2H copy of velocities is split into two calls, one of which is
moved closer to the output, where it is consumed. This is in preparation
to creation a unified method to copy all data for the outuput when
it is needed.

Change-Id: I4b81aa95e2c0763bb3ebb4a7d8b18611765c54de

4 years agoQuiet pdb2gmx and use gmx_fatal
Berk Hess [Wed, 20 Nov 2019 16:52:18 +0000 (17:52 +0100)]
Quiet pdb2gmx and use gmx_fatal

Removed stderr prints for every atom and residue type read.
Changed warning for incorrect atomtype line to a fatal error.

Change-Id: I657aedda04dc6b5a97447a829a1438941cd124db

4 years agoMerge 'origin/release-2019' into release-2020
Paul Bauer [Wed, 20 Nov 2019 17:34:52 +0000 (18:34 +0100)]
Merge 'origin/release-2019' into release-2020

Resolved Conflicts:
docs/release-notes/2019/2019.5.rst
src/gromacs/domdec/domdec_topology.cpp
src/gromacs/fileio/groio.cpp

Change-Id: Icd9d3bfee7a2ba524057791f4ee0fcf8db13797f

4 years agoMove pmePpCommGpu reset outside do_md
Alan Gray [Tue, 19 Nov 2019 15:19:42 +0000 (07:19 -0800)]
Move pmePpCommGpu reset outside do_md

Some tests (at least the transformAtoB freeenergy test) were not
previously executing this code block to explicitly destroy the PME-PP
GPU object, causing a crash when the smart pointer is automatically
destroyed later after the GPU context is no longer available.

Change-Id: I107832900d2230a926e00744f913c76e998eacf6

4 years agoRemove stub content from gmxapi docs.
M. Eric Irrgang [Fri, 8 Nov 2019 20:39:16 +0000 (23:39 +0300)]
Remove stub content from gmxapi docs.

This change removes or deactivates incomplete documentation in advance
of the GROMACS 2020 release candidate.

Change-Id: Ibc0e9714b95e225da4dac0632b87b4fe048c7432

4 years agoQuiet uninitialized variable warning with clang 9
Mark Abraham [Wed, 20 Nov 2019 12:21:41 +0000 (13:21 +0100)]
Quiet uninitialized variable warning with clang 9

This warning about thread being uninitialized is a false positive, but
the fix implements a good practice anyway.

Change-Id: I7045bb9a69155b2546c5ed2c3d352f3d1a7b8e53

4 years agoUpdated release notes for CODATA update
Mark Abraham [Sat, 16 Nov 2019 19:08:12 +0000 (20:08 +0100)]
Updated release notes for CODATA update

Was missing in 536052b4c4

Change-Id: I22fbbb3a8e11ab423b0e7e77e61b2098f4e5e6c6

4 years agoFix bonded atom communication performance
Berk Hess [Mon, 18 Nov 2019 15:39:01 +0000 (16:39 +0100)]
Fix bonded atom communication performance

The filtering of atoms to communicate for bonded interactions that
are beyond the non-bonded cut-off was effectively missing, because
the home atom indices were not set. This lead to many more atoms
being communicated.

Change-Id: I4bd5b9b561a3077e055186f312939221dba6cefa

4 years agoFix icc-19 warning in nightly matrix
Artem Zhmurov [Tue, 19 Nov 2019 10:14:05 +0000 (11:14 +0100)]
Fix icc-19 warning in nightly matrix

The nessesity of having the default return statement after the
if-else constructions depended on the #ifdef statement. As the result,
the compiler may or may not require having the default return depending
on the definition of the GMX_LIB_MPI macros. This change moves one of
the conditional return statements outside the #ifdef construction, making
the default return statement irrelevant unconditionally of the macros
definition.

Change-Id: I1da1fe841b799f716db74fc67a8fb633af8f95d0

4 years agoFix intermolecular interactions with DD
Berk Hess [Mon, 18 Nov 2019 15:33:29 +0000 (16:33 +0100)]
Fix intermolecular interactions with DD

The links for atoms with intermolecular interactions would use
incorrect atom indices. This meant that mdrun could exit with
a missing interactions errors when using domain decompostion
with intermolecular interactions at distance larger than the cutoff.

Fixes #3204

Change-Id: I0c78810204f116f028b18c83bc6b51859ed7245a

4 years agoTrigger ocl_nbnxm_kernels target with clang-tidy
Szilárd Páll [Mon, 8 Oct 2018 15:50:05 +0000 (17:50 +0200)]
Trigger ocl_nbnxm_kernels target with clang-tidy

Target only compiles object files for compiler warnings checks.
Also renamed target.

Refs #2661

Change-Id: Iffe5a2fa7d34d6bc4ff2081c3210191141ddcaf7

4 years agoRemove extraneous file.
M. Eric Irrgang [Fri, 8 Nov 2019 20:26:38 +0000 (23:26 +0300)]
Remove extraneous file.

This change removes an irrelevant .gitattributes file that made its way in
to docs/gmxapi.

Change-Id: I444a12f4adaa74c19ec910707f8a04982b1d8f21

4 years agoAdd transitional links for online gmxapi Python package reference.
M. Eric Irrgang [Fri, 8 Nov 2019 20:05:02 +0000 (23:05 +0300)]
Add transitional links for online gmxapi Python package reference.

* Update and clarify pythonreference stub for when Python package was
  not available.
* Note related Redmine reference.
* Remove `python-procedural` label, which had lost meaning and which
  could cause awkward repositioning for the pythonreference stub with
  no section heading to follow the label.

Refs #2985

Change-Id: If81ba6500ce078fe4fc94bf37285324ec5702b1b

4 years agoImprove gmxapi Dockerfiles.
M. Eric Irrgang [Fri, 8 Nov 2019 18:59:18 +0000 (21:59 +0300)]
Improve gmxapi Dockerfiles.

* Update gromacs-dependencies to use ubuntu:bionic and standard cmake package.
* Use more default CMake config in gromacs image.
* Reorganize ci.dockerfile for more effective Docker build caching.
* Reorganize docs.dockerfile for more effective Docker build caching.

Change-Id: Ia2858f234d3a4a104fc1c79ce8fb28106c196bd4

4 years agoFix clang-tidy 8 warnings in OpenCL nbnxm kernels
Szilárd Páll [Wed, 11 Sep 2019 22:41:01 +0000 (00:41 +0200)]
Fix clang-tidy 8 warnings in OpenCL nbnxm kernels

Since the bump from v7 to 8 new warnings need to be dealt with.

Change-Id: I392308a01087797dcbf3522df53c7fbd7f1fa31a

4 years agoRelaxed listed forces test tolerances
Mark Abraham [Sat, 16 Nov 2019 22:42:26 +0000 (23:42 +0100)]
Relaxed listed forces test tolerances

Different compilers on different hardware generate different FP
instructions, which we need to tolerate.

Refs #3205

Change-Id: I965cecd82593dd7a0dd9e34d69937d06cd60735c

4 years agoStop testing that hwloc cache-size detection works properly
Mark Abraham [Sat, 16 Nov 2019 20:04:30 +0000 (21:04 +0100)]
Stop testing that hwloc cache-size detection works properly

This was never a unit test of whether GROMACS HardwareTopology can
detect cache line size, because it requires both that hwloc works
correctly on the execution hardware, and that GROMACS code uses its
results correctly. So we should stop running such tests.

Refs #3205

Change-Id: I4d13e39620335b235f9969e5e09299fb9b41b1a0

4 years agoReplace blocking with non-blocking receive in GPU PME coordinate receiver
Alan Gray [Fri, 1 Nov 2019 14:45:25 +0000 (07:45 -0700)]
Replace blocking with non-blocking receive in GPU PME coordinate receiver

Replaces MPI_Recv with MPI_Irecv in original coordinate receiver
method, and adds associated method containing MPI_Waitall which is
called to wait on data completion across all PP ranks.

Implements part of #3158

Change-Id: Ifd152973e4d9a4da53c0541e591b41d29be173bb

4 years agoRemoving code duplications in StatePropagatorDataGpu
Artem Zhmurov [Thu, 14 Nov 2019 16:50:29 +0000 (17:50 +0100)]
Removing code duplications in StatePropagatorDataGpu

The assertions on the correct locality and existence of the
CommandStream are moved into the general copy functions, instead
of duplications in each specific case.

Change-Id: I2a239ca8e32538356b544918ed8545229d7935f3

4 years agoFuse two adjacent neighbor search branches in do_force
ejjordan [Thu, 14 Nov 2019 13:03:19 +0000 (14:03 +0100)]
Fuse two adjacent neighbor search branches in do_force

Change-Id: I8f81451fbce86f1bd26388ed2348112363bc3bbf

4 years agoRemove qm dependence on forcerec in do_force_lowlevel
ejjordan [Wed, 13 Nov 2019 17:07:52 +0000 (18:07 +0100)]
Remove qm dependence on forcerec in do_force_lowlevel

Also cleaned up some initialization.

Change-Id: Iccc5e80ace52409d734089714c49302c2f0fb994

4 years agoSimplify t_forcerec destruction
Berk Hess [Thu, 14 Nov 2019 08:07:22 +0000 (09:07 +0100)]
Simplify t_forcerec destruction

Destruction of t_forcerec was, without need, done in two steps with
complicated dependencies using the functions free_gpu_resources()
and done_forcerec().
Now only the destructor is used. To make this work, cginfo_mb and
nbfp in t_forcerec needed to be converted to std::vector.

Change-Id: I836bcdbd52b03834d4f2661475247fc56b907518