alexxy/gromacs.git
4 years agoRemove redundant jobs.
M. Eric Irrgang [Sat, 21 Mar 2020 12:58:56 +0000 (15:58 +0300)]
Remove redundant jobs.

Remove distinction between jobs that do and do not stage a build of the
gmxapi Python package in the build tree for API breakage testing and
full documentation builds.

Set a default CMake flag of "-DGMX_PYTHON_PACKAGE=ON" and install some
Python package dependencies with the default EXTRA_INSTALLS. The extra
installs will go away in the near future with updated Docker images.

Removes (up to) 12 jobs from the pipeline.

Change-Id: I13a60b7323ac0bf240f00b3b1360bedd2886e902

4 years agoFix duplicate variables parameter.
M. Eric Irrgang [Sat, 21 Mar 2020 12:25:01 +0000 (15:25 +0300)]
Fix duplicate variables parameter.

Defining the variables parameter twice hurts readability and may have
undefined behavior.

Change-Id: I2b22f89628237277b9596ad6a1cec84295849ce1

4 years agoAdd required Infrastructure for Gitlab merges
M. Eric Irrgang [Sat, 21 Mar 2020 11:27:50 +0000 (14:27 +0300)]
Add required Infrastructure for Gitlab merges

Also adds runs for regressiontests to normal CI.

Change-Id: I7bcb62cd3f2120f1d2e80b2f8a2ec1e328626902
(cherry picked from commit f518d72b2bea9a0dba02695dc93ca55ef1b09139)

4 years agoNormalize naming for gromacs build/testing jobs.
M. Eric Irrgang [Fri, 20 Mar 2020 18:40:25 +0000 (21:40 +0300)]
Normalize naming for gromacs build/testing jobs.

* Rename testing-matrix.gitlab-ci.yml to gromacs.gitlab-ci.yml
* Use a prefix of "gromacs" for jobs that manage the CMake-driven build
  and testing procedure to improve readability and make it easier to
  locate the sources of jobs mentioned in other files.
* Merge a few more trivial templates.

Change-Id: I6899dcf5a389190f6e973105c47d7743bf0ec802

4 years agoRemove some unnecessary indirection in job definitions.
M. Eric Irrgang [Fri, 20 Mar 2020 17:34:58 +0000 (20:34 +0300)]
Remove some unnecessary indirection in job definitions.

Some job templates were only used once or only existed to extend a
single parent. Other templates became trivial when accounting for
job parameter merging behavior. Additionally, removed some ineffective
or unnecessary parameter or variable specifications.

Note: in the case of the 'configure' jobs, KUBERNETES variables that
were previously masked by job inheritance are now exposed, in accordance
with the apparent original intent.

Change-Id: Idd4100d729a08c47b83c42ca9d7e0257a4029c6f

4 years agoConsolidate .use-clangX CI job mix-in.
M. Eric Irrgang [Fri, 20 Mar 2020 13:40:16 +0000 (16:40 +0300)]
Consolidate .use-clangX CI job mix-in.

* Merge .build-clang-template and .clang-before-script-template into
  .use-clang:base
* Replace .clangX-template with .use-clangX, intended to provide
  everything needed for a gccX build environment.

Change-Id: I5b78cddb47befd2dceb68c144cf427906aeeac36

4 years agoConsolidate .use-gccX CI job mix-in.
M. Eric Irrgang [Wed, 18 Mar 2020 18:26:57 +0000 (21:26 +0300)]
Consolidate .use-gccX CI job mix-in.

* Remove some unused templates.
* Merge .build-gcc-template and .gcc-before-script-template into
  .use-gcc:base
* Replace .gccX-template with .use-gccX, intended to provide everything
  needed for a gccX build environment.
* Document EXTRA_INSTALLS variable and default value.
* Document COMPILER_MAJOR_VERSION variable.
* Document CMAKE_COMPILER_SCRIPT variable.

Change-Id: I07fa648200095ed5e97dea6638031cbb412a615c

4 years agoIntroduce DeviceStreamManager
Artem Zhmurov [Thu, 20 Feb 2020 15:50:29 +0000 (16:50 +0100)]
Introduce DeviceStreamManager

Make a separate object that will be handling the creation,
management and destruction of the GPU context and streams.
It is detached from the rest of the code in this patch,
but will be attached in the follow-up.

Refs #3316
Refs #3311

Change-Id: I2c59b930ac266d89fafe9e0172b83f07e9858f0b

4 years agoAdopt CI job naming guidelines.
M. Eric Irrgang [Thu, 19 Mar 2020 16:47:26 +0000 (19:47 +0300)]
Adopt CI job naming guidelines.

Refs #3275

Change-Id: Ib1fdf4eb468fe2a4620e523f265226c09051bba2

4 years agoNormalize GitLab-CI *cache* parameter.
M. Eric Irrgang [Fri, 20 Mar 2020 12:35:52 +0000 (15:35 +0300)]
Normalize GitLab-CI *cache* parameter.

* Document in gitlab.rst
* Remove unnecessary indirection for null *cache* parameter.
* Remove *.pull-cache-template* no-op.
* Rename *.build-cache-template* to *.use-ccache*

Change-Id: I3623d6834360498c69bf968b926139c884cab867

4 years agoMerge environment support into global.gitlab-ci.yml
M. Eric Irrgang [Mon, 16 Mar 2020 16:02:38 +0000 (19:02 +0300)]
Merge environment support into global.gitlab-ci.yml

Change-Id: I03fdf0b43088db04e2beb32d0a2b9df3c6a25c54

4 years agoMove .build-template.yml definitions closer to point of use.
M. Eric Irrgang [Mon, 16 Mar 2020 16:01:37 +0000 (19:01 +0300)]
Move .build-template.yml definitions closer to point of use.

Change-Id: I2d4d5e6063495b658550640c7cdf6655e0f03f6e

4 years agoMerge *-test-template.yml into testing-matrix.gitlab-ci.yml
M. Eric Irrgang [Mon, 16 Mar 2020 15:17:59 +0000 (18:17 +0300)]
Merge *-test-template.yml into testing-matrix.gitlab-ci.yml

Change-Id: I339dd467b082000aaeffc0d65fdc5cbdde39c5b8

4 years agoMerge .test-runner-template.yml into testing-matrix.gitlab-ci.yml
M. Eric Irrgang [Fri, 20 Mar 2020 11:19:54 +0000 (14:19 +0300)]
Merge .test-runner-template.yml into testing-matrix.gitlab-ci.yml

Change-Id: Id12c8b3922f737552b08887a0533db22b1cebe06

4 years agoMerge .test-script-template.yml into testing-matrix.gitlab-ci.yml
M. Eric Irrgang [Fri, 20 Mar 2020 11:14:13 +0000 (14:14 +0300)]
Merge .test-script-template.yml into testing-matrix.gitlab-ci.yml

Also remove unused template.

Change-Id: Ibac0b13f8a62c6ed3d9992247d85ff34a5b45dcf

4 years agoMerge .regressiontest-template.yml into archive config.
M. Eric Irrgang [Fri, 20 Mar 2020 11:06:05 +0000 (14:06 +0300)]
Merge .regressiontest-template.yml into archive config.

Change-Id: I0659399f4ec9e4e3a651e5f6818e56ed1820ee62

4 years agoConsolidate documentation templates.
M. Eric Irrgang [Fri, 20 Mar 2020 10:56:53 +0000 (13:56 +0300)]
Consolidate documentation templates.

Change-Id: I212a03d5fa276e018f1a43fd62904bb73bb8ca91

4 years agoReorganize release templates.
M. Eric Irrgang [Fri, 13 Mar 2020 11:10:55 +0000 (14:10 +0300)]
Reorganize release templates.

Rename "release" config file to "archive" to collect jobs related to
preparing archives for export. "release" jobs are just special cases of
jobs that already fit in other categories.

Move several jobs between the "lint," "documentation," "testing-matrix,"
and "archive" groupings. Sort job definitions within files in terms of
execution dependency, definition dependency, and toolchain version.

In the future, we can probably reduce the distinction between jobs that
are 'release' or not (jobs that always run may choose a code path
according to to $GROMACS_RELEASE) so I'll leave the 'release' jobs
clustered with the non-'release' jobs.

Refs #3275

Change-Id: If675be3c64dfc2b42cdc4eba6b940226661ddbf3

4 years agoAdd Documentation build to script
Paul Bauer [Fri, 20 Mar 2020 15:09:45 +0000 (16:09 +0100)]
Add Documentation build to script

Also some misc fixes, e.g. was missing Python development headers.
TSAN build now also allows running static analyzer :).

Change-Id: I9b363858e48b6d451c9ee43346189f9ff27e4c47

4 years agoAdd OpenCL error reporting to GPU region timer
Artem Zhmurov [Fri, 20 Mar 2020 06:08:48 +0000 (07:08 +0100)]
Add OpenCL error reporting to GPU region timer

Change-Id: I06f3d178973de24869b8f9f720ac0f78678dc554

4 years agoRename class Grid to BiasGrid in AWH module
Berk Hess [Fri, 20 Mar 2020 08:52:26 +0000 (09:52 +0100)]
Rename class Grid to BiasGrid in AWH module

Since we do not use namespaces in modules, classes should not
use generic names, also not inside modules as that can lead
to incorrect linking.

Change-Id: I09a5f0ada649e3b35f57d0ee69c1e1ae5555b12e

4 years agoSmall fixes to the DeviceStream
Artem Zhmurov [Fri, 20 Mar 2020 06:02:24 +0000 (07:02 +0100)]
Small fixes to the DeviceStream

1. Fix compiler warning on having const modifier for bool in function declaration.
2. Fix comments.
3. Introduce isValid(...) method and use it inside the class.

Refs #3314
Refs #3311

Change-Id: I482aee831461f6b170c5fbf90f3f3e978282d226

4 years agoRemove confusing and duplicated variables assignment.
M. Eric Irrgang [Thu, 19 Mar 2020 12:45:53 +0000 (15:45 +0300)]
Remove confusing and duplicated variables assignment.

A global *variables* definition was introduced
in Change-Id: I4e34845deed69e949e849d6a4a34462965f1646f
with unintended behavior. Variables should be inherited with the
.variables:default definition from global.gitlab-ci.yml so that
the set of variables is merged with the *extends* logic.
A global *variables* is not merged with *variables* parameters
in job definitions.

Change-Id: I383820fd7c76b741fa229fd6f5195c08472c8db0

4 years agoConsolidate global mix-ins.
M. Eric Irrgang [Thu, 19 Mar 2020 10:15:46 +0000 (13:15 +0300)]
Consolidate global mix-ins.

Add a generic documentation section for CI job parameters
and add global.gitlab-ci.yml with mix-in job definitions.

Change-Id: I4e34845deed69e949e849d6a4a34462965f1646f

4 years ago[ci skip] Remove indirection for default tags parameter.
M. Eric Irrgang [Fri, 13 Mar 2020 10:57:17 +0000 (13:57 +0300)]
[ci skip] Remove indirection for default tags parameter.

Change-Id: I839dd92c3884a963bb64eeb396df7d9c25340d24

4 years ago[ci skip] Reorganize .gitlab-ci.yml
M. Eric Irrgang [Thu, 12 Mar 2020 16:07:09 +0000 (19:07 +0300)]
[ci skip] Reorganize .gitlab-ci.yml

* Move job definitions to a few thematic files in admin/gitlab-ci/
* Remove the layer of indirection from .include-template.yml

Change-Id: I2431647ec32929098d2ca04f57083172bb266a44

4 years agoStore DeviceInformation inside the DeviceContext class
Artem Zhmurov [Wed, 11 Mar 2020 13:21:24 +0000 (14:21 +0100)]
Store DeviceInformation inside the DeviceContext class

The device information with which the context was created is
now stored inside the DeviceContext object. This allows to pass
less arguments when information from DeviceInformation is needed
(e.g. for OpenCL optimization). The empty constructor for the
DeviceContext was also removed to make having invalid context less
probable.

Change-Id: Ie9600a89c21327246251c891807c37084f626f76

4 years agoSimplify finish_update()
Berk Hess [Tue, 17 Mar 2020 09:53:13 +0000 (10:53 +0100)]
Simplify finish_update()

Now that coordinates are no longer shifted using the graph
in do_force() and not shifted back in finish_update(),
the handling of frozen atoms can be simplified.

Change-Id: I81b817d25f26eeb5480e729dd858c084431a5117

4 years agoRemove at_start from t_graph
Berk Hess [Mon, 16 Mar 2020 09:09:14 +0000 (10:09 +0100)]
Remove at_start from t_graph

The start atom for shifting was always 0, so no longer needed.
Also improved the naming of several variables.

Change-Id: If9df778f50383e5b2faacb559ee768062faddf2a

4 years agoAdd script to generate CI Docker files
Paul Bauer [Fri, 13 Mar 2020 11:21:47 +0000 (12:21 +0100)]
Add script to generate CI Docker files

Refs #3395

Change-Id: Id001c87b52f4d1f7afcb7fbb38cd4b5efdbfd90e

4 years agoPass DeviceContext instead of GPU runtime data when possible
Artem Zhmurov [Wed, 11 Mar 2020 11:09:46 +0000 (12:09 +0100)]
Pass DeviceContext instead of GPU runtime data when possible

Change-Id: I06d66dc24994b15b2ed49ced927b4a5cf59c7c3c

4 years agoRemove use of graph in do_force()
Berk Hess [Fri, 13 Mar 2020 21:49:32 +0000 (22:49 +0100)]
Remove use of graph in do_force()

Removed all unused code paths using t_graph.

TODO: Remove the double coordinate copy in the update code.

Change-Id: I9fcba521e85972e7a0d18e348e0330f845c45182

4 years agoUse WholeMoleculeTransform for orires and epsilon-surface
Berk Hess [Thu, 5 Mar 2020 11:47:59 +0000 (12:47 +0100)]
Use WholeMoleculeTransform for orires and epsilon-surface

Remove direct use of the graph from the orientation restraint
and Ewald epsilon-surface term code by passing in whole molecules
created by the WholeMolecules class.
Since this was the only remaining use of graph in do_force(),
it can now be removed.

Also enabled the epsilon-surface mdrun-test.

Fixes #3441

Change-Id: Idfec6508c6dfd9e1a656cf23613ede3793794901

4 years agoAdd WholeMoleculeTransform class
Berk Hess [Wed, 11 Mar 2020 08:18:54 +0000 (09:18 +0100)]
Add WholeMoleculeTransform class

This class manages a coordinate buffer with molecules not split
over periodic boundary conditions for use in force calculations
which require whole molecules.

Change-Id: Iaa07b8a037d115c9b923978204aaa859ae4256c9

4 years agoDocument CI variable and remove unused template.
M. Eric Irrgang [Tue, 17 Mar 2020 14:33:38 +0000 (17:33 +0300)]
Document CI variable and remove unused template.

Change-Id: I03a3790fa962b508afc797728a94ebaccfb2509b

4 years agoFix unused variable in PME OpenCL kernel
Mark Abraham [Tue, 17 Mar 2020 19:36:37 +0000 (20:36 +0100)]
Fix unused variable in PME OpenCL kernel

This is only found when clang is the device compiler.

Also fixed some Doxygen there

Change-Id: I5b46ef0f5c2b11f9b4e891757a25892e3c1d7739

4 years agoSimplify PME GPU constants
Mark Abraham [Sun, 8 Mar 2020 07:46:08 +0000 (08:46 +0100)]
Simplify PME GPU constants

The values dependent on threadsPerAtom are now computed directly
from a class enum value, rather than indirectly from a bool.

Turned clang-format off for sections of the code where we declare
template functions. That stuff is easier to read and maintain if we
treat it like tabular data rather than free-form code.

Removed some const on template values. Those are useless, because
template values are always const, and confused a compiler when a const
ThreadsPerAtom was compared with a ThreadsPerAtom.

Change-Id: I295d4c2ea52b7912b8bd9a09ee178d104e9bfcb0

4 years agoDisable sphinx.ext.viewcode
M. Eric Irrgang [Wed, 18 Mar 2020 11:38:01 +0000 (14:38 +0300)]
Disable sphinx.ext.viewcode

Generates a broken link that causes linkchecker to fail.
This is a useful extension that will help especially for navigating
from the infrastructure documentation to source files (where navigable
content is more important than user-facing polish) but we aren't ready
for it right now.

Change-Id: I1a8c18428fac532c6064ea583c3b6952bd2e821e

4 years agoAdd stub Variables documentation to GitLab CI doc.
M. Eric Irrgang [Mon, 16 Mar 2020 15:50:23 +0000 (18:50 +0300)]
Add stub Variables documentation to GitLab CI doc.

Change-Id: I1950c2615919cb08b1af331060b9937f1cfb535e

4 years agoMake some doxygen errors more clear
Artem Zhmurov [Tue, 17 Mar 2020 21:04:00 +0000 (22:04 +0100)]
Make some doxygen errors more clear

Prints more clear error messages when doxygen fails to run on assertion.

Change-Id: I476a97b494484d7b020a60d833d8e59405c970a2

4 years agoRemove duplicated YAML key.
M. Eric Irrgang [Mon, 16 Mar 2020 15:30:11 +0000 (18:30 +0300)]
Remove duplicated YAML key.

Change-Id: I611be87f451bd7e82e814c14d16f1086bb69e1fa

4 years agoConvert t_graph to C++
Berk Hess [Mon, 9 Mar 2020 17:05:33 +0000 (18:05 +0100)]
Convert t_graph to C++

Convert memory management and initialization of t_graph to C++.
Added a simple class to build the graph. This makes graph generation
a factor 4 slower, but we plan to use gmx_mtop_t for generating
the graph, which will lead to a large speed-up.

Todo: Convert t_graph to a proper class.

Change-Id: Ib5a3059e9c0d0cf6888448fe471280ecf6b9467a

4 years agoRemove dysfunctional QMMM interface pt4
Christian Blau [Sat, 14 Mar 2020 19:34:07 +0000 (20:34 +0100)]
Remove dysfunctional QMMM interface pt4

Clean-up leftover QMMM definitions

Change-Id: I751389f02a111f9a7ccd907fe63c0422df65cc92

4 years agoRemove dysfunctional QMMM interface pt3
Christian Blau [Sat, 14 Mar 2020 13:47:30 +0000 (14:47 +0100)]
Remove dysfunctional QMMM interface pt3

Removing QMMM from inputrec

Change-Id: I3873c2bfa97234ebdf25e49f8ed68be221f9f957

4 years agoRemove dysfunctional QMMM interface pt2
Christian Blau [Fri, 13 Mar 2020 17:45:52 +0000 (18:45 +0100)]
Remove dysfunctional QMMM interface pt2

Uncoupling from forcerec, deleting unused files.

Change-Id: Id72281a26b8b39b6d2a37f5f8a43330f399ce5aa

4 years agoRemove dysfunctional QMMM interface pt1
Christian Blau [Fri, 13 Mar 2020 17:02:56 +0000 (18:02 +0100)]
Remove dysfunctional QMMM interface pt1

Removing some of the by now obsolete QMMM functionality to ease
refactoring work on grompp and mtop

Change-Id: I4a973e905f63d06028ec5d0e73afbcbafa7f0cf5

4 years agoAdd document for containerization infrastructure.
M. Eric Irrgang [Sun, 15 Mar 2020 15:16:19 +0000 (18:16 +0300)]
Add document for containerization infrastructure.

Refs #3375

Change-Id: Ia734e6c448959a8d73c274847538e81a8c9191ce

4 years agoAlphabetize list for readability.
M. Eric Irrgang [Sat, 14 Mar 2020 15:27:41 +0000 (18:27 +0300)]
Alphabetize list for readability.

Sort the exported variables passed with EXTRA_VARS in a call to
gmx_configure_version_file().

Change-Id: Iddd878c5b6fefa03a2f0c579147f98e3d51eba08

4 years agoReformat arguments for readability.
M. Eric Irrgang [Sat, 14 Mar 2020 15:23:26 +0000 (18:23 +0300)]
Reformat arguments for readability.

Put each of the values for the EXTRA_VARS argument on a separate line
with extra indentation to help distinguish values from key words in a
call to gmx_configure_version_file().

Change-Id: I586bb29c9fdd3e9a01fbea76163085d73ec18d47

4 years agoDefine an argparse parent parser for container image tools.
M. Eric Irrgang [Sun, 15 Mar 2020 14:59:57 +0000 (17:59 +0300)]
Define an argparse parent parser for container image tools.

Refs #3395

Change-Id: I8bcb314b21732cb870743f44de6aadc4d6bf534d

4 years agoBuild MPI in Dockerfile.
M. Eric Irrgang [Mon, 17 Feb 2020 16:10:30 +0000 (19:10 +0300)]
Build MPI in Dockerfile.

We should make sure that the MPI compiler wrapper we
set up corresponds to the toolchain we expect to use
in a Docker image.

Refs #3395

Change-Id: I89e2af539199918153560483552b5245c6947acf

4 years agoMerge conf.py and conf-vars.py.
M. Eric Irrgang [Sat, 14 Mar 2020 14:24:30 +0000 (17:24 +0300)]
Merge conf.py and conf-vars.py.

Combine conf.py and conf-vars.py.cmakein into conf.cmakein.py.
Process conf.cmakein.py into conf.py the same way conf-vars.py.cmakein
was formerly processed.

Reduces repository complexity and improves the readability of conf.py.
Also allows both conf.cmakein.py and conf.py to be valid Python so that
editors and linters can correctly check the source. conf.py was not
usable from its source directory, so no functionality is lost, and it is
clearer now that documentation should be built through CMake instead of
directly from the command line.

Change-Id: Ia569b3c2f55d20fc21107149a672d1b587ab1571

4 years agoMove testing code to test directory
Mark Abraham [Wed, 4 Mar 2020 17:44:34 +0000 (18:44 +0100)]
Move testing code to test directory

This should not add bulk to libgromacs

Also decoupled some headers from unnecessarily depending on other
headers, some of which inhibited the proper separation of code and
tests. In particular, there's now a proper getter for warp size.

This needed the default implementation of pmeInitEmpty to move into a
source file, because it was requiring the definition of CodePath to be
available.

Change-Id: I3040c77404ade4d8cf0a41faf4aa4da4db42e3d3

4 years agoCombine initialization routines for GPUs assigned to PME and Nonbonded
Artem Zhmurov [Thu, 13 Feb 2020 15:05:51 +0000 (16:05 +0100)]
Combine initialization routines for GPUs assigned to PME and Nonbonded

The subroutines that do the initialization share a lot of logic. Also,
the current setup does not allow to have more than one GPU assigned to
a single rank. This make it natural to keep one handle to the GPU
device, if there is a GPU assigned to the rank.

Change-Id: I9177e1a6c00cf6efa7b58370b8fa6220c8fd4496

4 years agoRemove stream from GPU kernel launch config
Artem Zhmurov [Thu, 20 Feb 2020 16:13:23 +0000 (17:13 +0100)]
Remove stream from GPU kernel launch config

The stream is not a configuration parameter, hence
it should not be a part of a kernel config struct.
This also remove dependency of kernel config on
DeviceStream.

Change-Id: Idb0426f21bc9db1490053b82f1d11bee55ae9133

4 years agoRequire padded atom data for PME GPU
Mark Abraham [Fri, 6 Mar 2020 19:43:01 +0000 (20:43 +0100)]
Require padded atom data for PME GPU

The unpadded case doesn't work and is hard-coded not to run, so we
should remove it.

The constant c_usePadding has been true ever since
379b2954fd3efbd1b2c724964932c2ef03078939 introduced it in 2016. This
piece of unecessary complexity probably comes from prior introduction
of the optimization of padding the atom data arrays so that
device-side loads don't have to check boundaries. That's unlikely to
ever change again, and is unused, untested, and poorly
understood. (It's also currently broken - if c_usePadding == false
would be attempted, it would lead to the alignment getter returning
zero that would be used as a divisor, ie. is broken.)

In some places the words alignment and padding were used
interchangeably, which is confusing and fixed. Now code refers to
block size and that it set the minimum divisor for the memory
allocation. Padding size is a misnomer, because the size of the
padding can be interpreted as the number of the extra array elements.

The resulting code is a bit simpler and easier to understand

Change-Id: I51a28c1c722e3ee5a9f3e1787892d81cb9df00fb

4 years agoUse DeviceStream init(...) function to create streams
Artem Zhmurov [Thu, 20 Feb 2020 14:27:19 +0000 (15:27 +0100)]
Use DeviceStream init(...) function to create streams

Change the stream creation procedures from direct calls to CUDA
and OpenCL API to using pre-defined init(...) method of the
DeviceStream class.

Refs #3314
Refs #3311

Change-Id: I96a0ca41f251b9925ef9bed77c4f355939b65c6d

4 years agoMake DeviceStream into a class
Artem Zhmurov [Tue, 18 Feb 2020 00:36:38 +0000 (01:36 +0100)]
Make DeviceStream into a class

Refs #3314
Refs #3311

Change-Id: Ic270864f0e82af63f91a91c9951bf678795680fa

4 years agoAdd tests for Ewald surface terms
Berk Hess [Wed, 11 Mar 2020 16:25:59 +0000 (17:25 +0100)]
Add tests for Ewald surface terms

Note that the surface-epsilon test with flexible bonds is currently
disabled as this functionality assumes whole molecules which is
currently not possible.

Change-Id: Icfe4d41abf12c5832c0d7757eb9dbe5631338f46

4 years agogrompp: fix the -ref <file> option
Gilles Gouaillardet [Wed, 11 Mar 2020 01:05:19 +0000 (10:05 +0900)]
grompp: fix the -ref <file> option

Mark <file> optional (e.g. ffALLOW_MISSING).

A typical usage is
gmx grompp -ref rotref[.trr]
in which grompp will use rotref.0.trr, rotref.1.trr and so on,
but not rotref.trr. The easiest fix is hence to mark the file as optional.

Change-Id: Ide2947f57580b680d4f5f04ada22fd67d5fb0f93

4 years agoReorganize dipole calculation in do_force
Szilárd Páll [Tue, 28 Jan 2020 20:35:30 +0000 (21:35 +0100)]
Reorganize dipole calculation in do_force

Encapsulated dipole used in do_force in a struct and eliminated
fr->mu_tot and moved code into a separate reduction function.

Note that this change now also computes the dipole when
flags.stateChanged=false, as the old value is no longer stored in fr.

Change-Id: Ibcfda31c450e50d37c2697f6d04a549e8f996823

4 years agoFix the post-submit failures
Artem Zhmurov [Wed, 11 Mar 2020 18:38:23 +0000 (19:38 +0100)]
Fix the post-submit failures

Fix warnings, introduced by 6975fbfd22030a08bbe076151a3de69894a4de2f

1. Change the order in the initialization list
2. Make use of the deviceContext_ field in PP-PME comms
3. Small fix to the comment

Change-Id: I847dbfc187a469eb89405c52b26ee1965f39c44f

4 years agoTake over management of OpenCL context from PME and NBNXM
Artem Zhmurov [Sat, 1 Feb 2020 15:40:13 +0000 (16:40 +0100)]
Take over management of OpenCL context from PME and NBNXM

This patch set creates the DeviceContext in runner and passes it to the
consumers (PME and NBNXM). This removes unnessesary management code
duplication, makes the device buffers in two modules compatible.

Fixes #2522
Fixes #3315
Refs #3311

Change-Id: I10358cfaced5b5c7dbdddf95679c9a9703f3a2c0

4 years agoAmend optional documentation
Christian Blau [Tue, 10 Mar 2020 18:45:15 +0000 (19:45 +0100)]
Amend optional documentation

gmx::compat::optional, or the respective std::optional in C++17
are compelling to over-use in some cases. Added developer
documentation on when optional<T> is not the best choice.

Change-Id: I9cbfd42968ab8797109e35eba7e01afe6a1507ae

4 years agoAdd tests for graph
Berk Hess [Wed, 11 Mar 2020 08:16:59 +0000 (09:16 +0100)]
Add tests for graph

Change-Id: I580eb129b36c7d4185e214f8e1fd03119138b5ef

4 years agoFix type in range and add tests
Berk Hess [Wed, 8 Jan 2020 09:31:51 +0000 (10:31 +0100)]
Fix type in range and add tests

Change-Id: Ie2ffc54ff0382b7753e86c12334c38993979717d

4 years agoUse init(..) function to build DeviceContext
Artem Zhmurov [Sat, 1 Feb 2020 12:27:20 +0000 (13:27 +0100)]
Use init(..) function to build DeviceContext

This patch unifies the logic of OpenCL context creation in PME and
NBNXM by using the same init(..) function for the DeviceContext
object.

Also, the DeviceInfo is now de-referenced directly after the check
on the pointer validity and passed along as a const reference, which
improves the clarity of the code.

Refs. #3315, #3311.

Change-Id: I5ba0f530918f3340fa1a5ad3e8d60fe4e0967dab

4 years agoConsolidate PME GPU spline infrastructure
Mark Abraham [Fri, 6 Mar 2020 16:30:26 +0000 (17:30 +0100)]
Consolidate PME GPU spline infrastructure

This functionality isn't utility

Change-Id: If2ddfc47fda0c6dfc3f26df2f9002564b5d0db99

4 years agoFix wrong Docker images in doc builds
Paul Bauer [Mon, 9 Mar 2020 16:41:51 +0000 (17:41 +0100)]
Fix wrong Docker images in doc builds

Change-Id: Ia1324355c1be2eb10507a085ae6b04014b97596d

4 years agoMake DeviceContext into a proper class
Artem Zhmurov [Wed, 29 Jan 2020 15:59:33 +0000 (16:59 +0100)]
Make DeviceContext into a proper class

Having DeviceContext as a platform-agnostic class allows one
to easily create context, which is usefull for setting up the
GPU stream/context manager, tests for GPU functionality.

Refs. #3315.

Change-Id: I496d225b58c96d7642830c8e9552139750891849

4 years agoFree up Docker image tag namespace.
M. Eric Irrgang [Fri, 6 Mar 2020 11:16:04 +0000 (14:16 +0300)]
Free up Docker image tag namespace.

Allow tags to distinguish Docker images for different release
requirements. Free up the image tag namespace for granularly describing
image revisions (and create smaller image repositories) by using the
matrix slug as the image name. Tag images to indicate the supported
GROMACS branch.

Refs #3395

Change-Id: Idff95d031cd56a28545562862e78cd99902db620

4 years agoRemove duplicated GitLab-CI jobs.
M. Eric Irrgang [Mon, 9 Mar 2020 12:43:49 +0000 (15:43 +0300)]
Remove duplicated GitLab-CI jobs.

Remove extra job definitions from merge conflict resolution error.

Fixes #3414

Change-Id: I39b36cef108db6c0274d163707303daea2391079

4 years agoReformat .gitlab-ci.yml
M. Eric Irrgang [Mon, 9 Mar 2020 12:42:30 +0000 (15:42 +0300)]
Reformat .gitlab-ci.yml

Resolve inconsistent white space.

Change-Id: Ieadb6f29815d26a2bae7c756c6f5ef17c91164e2

4 years agoConsolidate logic for whether to use ModularSimulator.
M. Eric Irrgang [Mon, 6 Jan 2020 13:14:23 +0000 (16:14 +0300)]
Consolidate logic for whether to use ModularSimulator.

There appeared to be inconsistent logic in runner.cpp about whether
the ModularSimulator would be used, but the apparent inconsistency was
actually just the result of equivalent logic being performed in
multiple places, and unclear ownership of an environment variable. This
change should clarify some logic in runner.cpp and simplify the behavior
of the SimulatorBuilder.

* Reference GMX_DISABLE_MODULAR_SIMULATOR environment variable in a
  single location.
* Use a single utility function to determine whether to use
  ModularSimulator, and call in Mdrunner::mdrunner().
* Refactor SimulatorBuilder to perform an action based solely on its
  arguments, rather than to override the client-provided arguments based
  on an environment variable.

Change-Id: I775ef82461f30b79b4412a473e5a1aa66270e2d5

4 years agoManage the list of image tags in Docker build script.
M. Eric Irrgang [Fri, 6 Mar 2020 11:03:29 +0000 (14:03 +0300)]
Manage the list of image tags in Docker build script.

Supports flexibility in future handling of built images.

Refs #3395

Change-Id: I207911f190a57cbc4671777b5b92827aa6d3904a

4 years agoMake shake work without graph
Berk Hess [Thu, 5 Mar 2020 17:03:01 +0000 (18:03 +0100)]
Make shake work without graph

Shake can now internally compute distances using pbc, so it is
no longer needed to pass whole molecules to shake.

This is required for removing the graph from the force calculation.

Also converted shakedata to C++ and increased use of ArrayRef.

Change-Id: I67e2c85e7b4b26c930af89f413a89c2d72178e87

4 years agoSimplify compiling GPU code for tests
Mark Abraham [Wed, 4 Mar 2020 17:44:34 +0000 (18:44 +0100)]
Simplify compiling GPU code for tests

Documented and extended gmx_add_gtest_executable to let us annotate
which source files may need special treatment for GPU
compilation. Those details are all now hidden in the function rather
than complicating the CMakeLists.txt files in multiple places. There's
a lot of incidental lines changed to make sure people can use the
rearrangement well, but the benefit is illustrated in the following
files:

gpu_utils/test/CMakeLists.txt
mdlib/test/CMakeLists.txt

Accordingly, various test code no longer compiles into
libgromacs. Removed some completely unnecessary compilation of CUDA
code for tests.

Compiling test .cu files that also need MPI libraries is not currently
supported. Thus, removed am unnecessary header dependency in
mdlib/tests on MPI libraries that was not needed (and awkward for nvcc
compilation).

Found and fixed a bug where
src/gromacs/gpu_utils/tests/typecasts_runner.cpp wasn't compiled when
it was intended to be.

Change-Id: I9ba624094092a9951fa63f3264c9d99d7ba0cbd1

4 years agoFix Gitlab build issues
Paul Bauer [Thu, 5 Mar 2020 15:14:53 +0000 (16:14 +0100)]
Fix Gitlab build issues

Change-Id: I7fd9be313ddfe18947ed7a858ea9dc236dba050f

4 years agoAdd function calls to MdModules to sign up for notifications
Christian Blau [Tue, 21 Jan 2020 10:05:03 +0000 (11:05 +0100)]
Add function calls to MdModules to sign up for notifications

Allow MdModules to sign up to notifications after they know their own
options. This makes it possible that modules only get called back when
they need to and not by default and skips the if(active) logic in
functions that are called back in favour of not subscribing to the
notifications to begin with.

refs #3076

Change-Id: Ib95c1f734f919805c661ac6f6451af5da8187eec

4 years agoSplit off implementation details of MdModuleNotification
Christian Blau [Wed, 4 Mar 2020 11:22:34 +0000 (12:22 +0100)]
Split off implementation details of MdModuleNotification

For better readability and testing, moved the MdModuleNotification and
MdModulesNotifier into separate files, hiding away the implementation
details of the complex general callback-infrastructure and exposing more
clearly the callbacks that MdModules can sign up to.

Moved tests into correct directory.

Moved life-line explaining the notification machinery in MDModules from
MdModulesNotification to MdModuleNotifier, where it is better suited.

Change-Id: I0a73f99e450873903a888bcc04228737d0b814f3

4 years agoFinalize renaming of bEnerVir to computeEnergyAndVirial
Artem Zhmurov [Thu, 5 Mar 2020 08:29:12 +0000 (09:29 +0100)]
Finalize renaming of bEnerVir to computeEnergyAndVirial

This finishes the renaming started in parent. Also fixes the
function comment, messed up by clang-format.

Change-Id: I74ce276227182364d05b62d1f89166cc2748f6fc

4 years agoSimplify PME step workload management
Mark Abraham [Sun, 23 Feb 2020 14:13:01 +0000 (15:13 +0100)]
Simplify PME step workload management

Used StepWorkload further down into the PME code, rather than the
custom GMX_PME_* flags.

GMX_PME_CALC_POT was unused, so removed.

Spread, solve, and backFFT were always performed, so removed GMX_PME_*
flags and related booleans for them. Re-indented code that was behind
these branches that were always taken. Note that we don't always
calculate forces in PME (currently TPI, but perhaps soon also MC).

Change-Id: Ia7019a0042bde9ac04c3beacbf05f7af41c7ed3c

4 years agoAdd InteractionDefinitions
Berk Hess [Mon, 2 Dec 2019 20:11:02 +0000 (21:11 +0100)]
Add InteractionDefinitions

This replaces t_idef in gmx_localtop_t.
Note that t_idef is still used in t_topology.

Extends InteractList with functionality to add entries
in a simple and clean way.

Change-Id: Ib59012332b6ba09df1de5dc696438c9aba4e2f2d

4 years agoImprove TPI handling
Mark Abraham [Fri, 21 Feb 2020 16:30:38 +0000 (17:30 +0100)]
Improve TPI handling

These errors are best given in TPI-specific code, not general code.

That TPI-specific code already sets GMX_FORCE_ENERGY, which sets
GMX_PME_CALC_POT, so this should not be managed in two places.

Change-Id: I6415634b5ba63d2dc71f6db1e52daac3d15cd8f0

4 years agoSeparate AWH parameter reading and checking
Magnus Lundborg [Tue, 3 Mar 2020 10:06:27 +0000 (11:06 +0100)]
Separate AWH parameter reading and checking

To avoid dependency on order of parameter reading (pulling
before AWH) AWH now reads parameters before checking them.

Change-Id: I11ac76f1def61eac577ef8083698d76f6aac3dd4

4 years agoDo not count PME only rank when initializing NBNXM
Artem Zhmurov [Wed, 4 Mar 2020 10:26:12 +0000 (11:26 +0100)]
Do not count PME only rank when initializing NBNXM

Non-local particles should only exist when there is are more than one PP rank.

Change-Id: Ife99786652dc634039c59f530d2489bf3976c476

4 years agoMerge "Merge branch release-2020 into master"
Paul Bauer [Wed, 4 Mar 2020 11:01:37 +0000 (12:01 +0100)]
Merge "Merge branch release-2020 into master"

4 years agoSave excluded non-bonded interactions in .tpr file
Christian Blau [Tue, 18 Feb 2020 12:47:41 +0000 (13:47 +0100)]
Save excluded non-bonded interactions in .tpr file

The intermolecularExclusionGroup of the molecular topology (mtop) has
not been saved in the tpr file before, which lead to the unexpected
behviour that an mtop as set up in grompp was not available in the same
state when the simulation was started.

Excluding non-bonded interactions of a group with the rest of the system
is currently needed for the QM/MM implementation. This change will allow
to complete system setup for simulations that need to exclude non-bonded
interactions at grompp time instead when starting the simulation.

refs #3172

Change-Id: Ia0e3f0571fa467337664bedec2e91a5a008507ca

4 years agoAdd classhelper macro to forbid copy, move and any assigment
Christian Blau [Wed, 4 Mar 2020 08:04:29 +0000 (09:04 +0100)]
Add classhelper macro to forbid copy, move and any assigment

The current macro only deletes the copying and copy-assignemnt, but for
most cases also the move equivalent of these operations should be
deleted. This patch introduces a new macro to forbid copying and moving.

Change-Id: I6f2f8591b289322cf7e79003a50507cdc9d6b5b9

4 years agoMerge branch release-2020 into master
Paul Bauer [Wed, 4 Mar 2020 07:05:31 +0000 (08:05 +0100)]
Merge branch release-2020 into master

Resolved Conflicts:
.gitlab-ci.yml
admin/builds/gromacs.py
cmake/gmxVersionInfo.cmake
src/gromacs/ewald/pme.cpp
src/gromacs/gmxana/gmx_disre.cpp
src/gromacs/gpu_utils/cudautils.cu
src/gromacs/gpu_utils/gpu_utils.cu
src/gromacs/hardware/gpu_hw_info.h
src/gromacs/listed_forces/orires.cpp
src/gromacs/mdlib/forcerec.cpp
src/gromacs/mdlib/forcerec.h
src/gromacs/mdlib/md_support.cpp
src/gromacs/mdlib/md_support.h
src/gromacs/mdlib/mdoutf.cpp
src/gromacs/mdlib/mdoutf.h
src/gromacs/mdlib/sim_util.cpp
src/gromacs/mdlib/vsite.cpp
src/gromacs/mdlib/vsite.h
src/gromacs/mdrun/minimize.cpp
src/gromacs/modularsimulator/forceelement.cpp
src/gromacs/modularsimulator/shellfcelement.cpp
src/gromacs/nbnxm/kernels_reference/kernel_ref.h
src/programs/mdrun/tests/CMakeLists.txt

Change-Id: Ic95c6b35c8a7b7bd0b9c3fa0833136d32bb74242

4 years agoMove the PmePPCommGpu initialization from forcerec to runner
Artem Zhmurov [Fri, 21 Feb 2020 16:53:26 +0000 (17:53 +0100)]
Move the PmePPCommGpu initialization from forcerec to runner

Change-Id: I955c7c53bcee571c560b1efd8a4eed7bde4d42fc

4 years agoPrepare for 2020.2
Paul Bauer [Mon, 24 Feb 2020 14:49:29 +0000 (15:49 +0100)]
Prepare for 2020.2

Reset DOI strings

Change-Id: I8a269a8537595d1070c50cfc31c610f2133618b2

4 years agoVersion 2020.1
Paul Bauer [Mon, 24 Feb 2020 14:46:14 +0000 (15:46 +0100)]
Version 2020.1

Set DOI strings.
Updated regressiontest hash.

Change-Id: I2fa83321688bf052516bab3301336d8b3145e458

4 years agoAlways hash files when building from release tarball
Paul Bauer [Thu, 16 Jan 2020 13:25:37 +0000 (14:25 +0100)]
Always hash files when building from release tarball

The CMake logic to check if the source files in a release tarball have
not been modified has not been robust enough in cases where people first
run cmake to generate the build directory and then later change files in
the source tree.

The build has now been changed to be more in line with the development
builds, where checking for modifications is happening in all cases.

Fixes #3302

Change-Id: Id54c529bfbe51191ed5262d8da05897b2f53c057

4 years agoAllow PME coordinate send before H2D coordinate transfer
Alan Gray [Sun, 5 Jan 2020 20:14:39 +0000 (12:14 -0800)]
Allow PME coordinate send before H2D coordinate transfer

The introduction of the GPU PME-PP communication functionality had the
side effect of delaying the PME coordinate send until after the H2D
coordinate transfer, even on the default code path. This patch allows
the PME transfer to occur in its original location when the send is
not originating from GPU memory. This is a lightweight solution,
without any new functionality, suitable for the release branch. (There
will be a more comprehensive change in the master branch which also
extends the GPU PME-PP communication functionality.)

Implements #3159

Change-Id: Ic30c154e04bb4c2846bbad3de603f879a71b9133

4 years agoStore dHdL for all neighbor lambdas
Magnus Lundborg [Sun, 23 Feb 2020 16:57:56 +0000 (17:57 +0100)]
Store dHdL for all neighbor lambdas

This is required for calculating forces along a lambda dimension
in AWH.

Change-Id: Ic5247a53998b1e733858419d20338b5419dd7ae4

4 years agoAdd Cuda build to gitlab CI
Paul Bauer [Mon, 3 Feb 2020 16:05:42 +0000 (17:05 +0100)]
Add Cuda build to gitlab CI

Change-Id: I7e5917fd26c0e22107fb6d9ade4ca69959737df4

4 years agoFix center of mass motion removal with frozen atoms
Berk Hess [Mon, 2 Mar 2020 14:14:21 +0000 (15:14 +0100)]
Fix center of mass motion removal with frozen atoms

When frozen atoms were part of center of mass motion removal groups,
they would still contribute to the mass of those groups. This meant
that the COM velocity correction was (slightly) too small. Now
completely frozen atoms are removed from COM removal groups by grompp.
When atoms are only frozen along one or two dimensions and part of
a COM removal group, grompp now issues a warning.

Also fixed an nullptr or incorrect string buffer passed to warning()
with invalid freeze group dimension user input.

Fixes #2553

Change-Id: I20a03fea511e75a131cb27880acc1f4ee4a2bfb8

4 years agoUpdate the message on whether update and constraints are offloaded
Artem Zhmurov [Mon, 2 Mar 2020 15:14:32 +0000 (16:14 +0100)]
Update the message on whether update and constraints are offloaded

Update and constraints are done in PP task, which is now indicated
in the printed message.

Refs #3292

Change-Id: Id3ad64c424cca6ab5e678a90db767a1c3d43b014

4 years agoFix grompp unbound atom check
Berk Hess [Mon, 2 Mar 2020 16:42:03 +0000 (17:42 +0100)]
Fix grompp unbound atom check

The check in grompp for unbound atoms would check for any
potential (and constraints) instead of only potentials involving
two atoms. This enabled false negatives.

Change-Id: I677b86a4e4bbe8cd0c6a8a0bf43983be622edfa6