alexxy/gromacs.git
3 years agoMove finalising routine into mtop
Christian Blau [Tue, 7 Jul 2020 18:33:21 +0000 (18:33 +0000)]
Move finalising routine into mtop

Change-Id: I383ceb3b48e5eddafc3f8ea96fc3b326d34602ef

3 years agoMove densityfitting to its own directory
Paul Bauer [Tue, 7 Jul 2020 16:10:13 +0000 (16:10 +0000)]
Move densityfitting to its own directory

Preparing for adding more applied_forces modules

Change-Id: Ieec20d1f0752a369d26352ec6b0997812decd21e

3 years agoFix unsigned integer overflow bug in spline tables
Kevin Boyd [Tue, 7 Jul 2020 15:07:07 +0000 (15:07 +0000)]
Fix unsigned integer overflow bug in spline tables

Subtraction of two uints could lead to a huge positive rather than
a correct negative number. Found by UBSAN integer check (though
not technically undefined behavior)

3 years agoAdd stricter ASAN checks
Kevin Boyd [Sun, 5 Jul 2020 20:55:53 +0000 (13:55 -0700)]
Add stricter ASAN checks

ASAN supports some checks that are turned off by default. Enabling
these adds ~30-40% overhead.

3 years agoAnnotate modular simulator headers with exposure level
Pascal Merz [Tue, 7 Jul 2020 10:46:53 +0000 (10:46 +0000)]
Annotate modular simulator headers with exposure level

This change adds comments to the doxygen commen on top of each header file
to describe which files are exposed outside the modular simulator module.

3 years agoMake cl_nbparam into a struct
Artem Zhmurov [Tue, 7 Jul 2020 09:50:45 +0000 (09:50 +0000)]
Make cl_nbparam into a struct

This is needed to unify with CUDA path

3 years agoMove foreign potential energy accumulation
Berk Hess [Mon, 6 Jul 2020 15:14:31 +0000 (15:14 +0000)]
Move foreign potential energy accumulation

The potential energy contributions to the foreign lambda
Hamiltonian differences were summed in sum_dhdl() which meant
that the foreign energy differences were not complete when
do_force() returns. Now there are summed in
accumulatePotentialEnergies() which is called instead of sum_epot().

Also consistently changed the lambda vector to ArrayRef in the force
routines and made it const.

3 years agoModernize STL usage
Roland Schulz [Mon, 6 Jul 2020 14:19:37 +0000 (14:19 +0000)]
Modernize STL usage

3 years agoAvoid overflow in RNG
Kevin Boyd [Mon, 6 Jul 2020 01:37:21 +0000 (18:37 -0700)]
Avoid overflow in RNG

Instead of checking for overflow, get necessary information about
number of bits from type attributes.

This technically wasn't undefined behavior but with strict UBSAN
settings got tagged in tests.

3 years agoFix cycle counters for "comm.coord" and "Wait + Comm. F" to support GPU halo exchange...
Gaurav Garg [Mon, 22 Jun 2020 16:31:13 +0000 (22:01 +0530)]
Fix cycle counters for "comm.coord" and "Wait + Comm. F" to support GPU halo exchange path
Replace buffer ops counters with GPU launch counters for GPU backend.

3 years agoUse vector in atoms2md instead of pointer
Joe Jordan [Fri, 3 Jul 2020 09:55:37 +0000 (09:55 +0000)]
Use vector in atoms2md instead of pointer

At all call sites for atoms2md the underlying vector was cast to an int pointer.
This change makes it easier to inspect the values passed to atoms2md in a
debugger while incurring no performance penalty.

3 years agoSeparate ModularSimulator and ModularSimulatorAlgorithm
Pascal Merz [Fri, 3 Jul 2020 08:02:09 +0000 (08:02 +0000)]
Separate ModularSimulator and ModularSimulatorAlgorithm

This introduces the ModularSimulatorAlgorithm, which takes over some
responsibilities from ModularSimulator. The ModularSimulatorAlgorithm
owns the elements, and allows ModularSimulator to run a simulation
following the prescribed algorithm. This change is only refactoring -
no functionality is added or removed, but separating the algorithm and
its builder from the simulator allows to develop the two independently.

The ModularSimulatorAlgorithm is built by ModularSimulatorAlgorithmBuilder.
In a first approach, ModularSimulatorAlgorithmBuilder creates an appropriate
algorithm based on the input passed from the runner level (md or md-vv, thermo-
and / or barostat, constraining, FEP, etc).

Eventually, the builder will not need to know about all possible algorithms,
but offer an interface for its user to creat algorithms. Currently, the only
planned user of the ModularSimulatorAlgorithm is the ModularSimulator itself.
In view of this, two "hacks" were used to reduce unnecessary line changes
to simplify review: The builder mirrors all protected members of ISimulator,
and some of its member function implementations were left in modularsimulator.cpp.
Note that both of these "hacks" will disappear in subsequent changes.

Refs #3437

3 years agoCoordinate transformation on single RVecs
Christian Blau [Mon, 17 Feb 2020 15:22:36 +0000 (16:22 +0100)]
Coordinate transformation on single RVecs

So far, coordinate transforamtions of TranslateAndScale and Scale
classes could only performed on ArrayRefs. This meant that
transformations of single RVecs had to be done by first constructing an
ArrayRef on a single RVec x with the unintuitive and cumbersome
transform({&x,&x+1}).

Now this call is reduced to transform(&x) and respective calls.

Change-Id: I0d1f9d2f5ba90a46b1afc9b617af606995e0df59

3 years agoSimplify Iterators
Roland Schulz [Wed, 1 Jul 2020 16:27:30 +0000 (16:27 +0000)]
Simplify Iterators

3 years agoRevert "Make everything run on Gitlab infrastructure."
Paul Bauer [Tue, 30 Jun 2020 14:30:04 +0000 (16:30 +0200)]
Revert "Make everything run on Gitlab infrastructure."

This reverts commit af3b2782f26d6bde2975a581de7b3fc8bf69b954.

3 years agoUpdated the change management documentation
Christian Blau [Wed, 1 Jul 2020 14:29:05 +0000 (14:29 +0000)]
Updated the change management documentation

Describe how to upload and review code on gitlab.
Introduce merge-requests and approvals.

3 years agoClean up simulatorbuilder.h
M. Eric Irrgang [Wed, 1 Jul 2020 11:44:24 +0000 (11:44 +0000)]
Clean up simulatorbuilder.h

Sort forward declarations to improve readability.
Reduce unnecessary `#include`s.

3 years agoDisable failing builds for master branch
Paul Bauer [Wed, 1 Jul 2020 08:45:02 +0000 (10:45 +0200)]
Disable failing builds for master branch

Change builds that use failing docker containers

Changes builds away from the
gromacs/cmake-3.15.7-gcc-8-cuda-10.1-nvidiaopencl-clfft-openmpi:master
and gromacs/cmake-3.15.7-llvm-8-cuda-10.1-openmpi:master images
that have failed over the recent days.

For now set to use
gromacs/cmake-3.13.0-gcc-7-amdopencl-clfft-openmpi:master
and gromacs/cmake-3.15.7-llvm-9-openmpi:master images.

Change-Id: I92ad04c65021005345668262be1eccecb149a694

3 years agoMake everything run on Gitlab infrastructure.
Paul Bauer [Mon, 29 Jun 2020 20:18:36 +0000 (20:18 +0000)]
Make everything run on Gitlab infrastructure.

Change-Id: I0cfbc2e287641d9f9e9e1cf3a54c9237a6d6c8e2

3 years agoAdd missing ABI header.
M. Eric Irrgang [Fri, 26 Jun 2020 15:41:21 +0000 (18:41 +0300)]
Add missing ABI header.

simulatorbuilder.cpp did not include "gmxpre.h"

3 years agoIncrease BD ulp tolerance to avoid spurious test failures
ejjordan [Fri, 26 Jun 2020 11:53:03 +0000 (13:53 +0200)]
Increase BD ulp tolerance to avoid spurious test failures

3 years agoChange ArrayRef to use a proper iterator
Roland Schulz [Fri, 26 Jun 2020 16:03:46 +0000 (16:03 +0000)]
Change ArrayRef to use a proper iterator

Fixes #2859

3 years agoMinor cleanup in gmx bar
Paul Bauer [Thu, 25 Jun 2020 17:06:28 +0000 (19:06 +0200)]
Minor cleanup in gmx bar

Just to make static analyser happy in dependent change.

Change-Id: I3e590b8ee7e6fa81ed334556dec86c2f7e7f4425

3 years agoImplement SimulatorBuilder.add() for BoxDeformationHandle.
M. Eric Irrgang [Thu, 23 Apr 2020 15:34:32 +0000 (18:34 +0300)]
Implement SimulatorBuilder.add() for BoxDeformationHandle.

Refs #3567

3 years agoUse TopologyData.
M. Eric Irrgang [Thu, 23 Apr 2020 15:16:21 +0000 (18:16 +0300)]
Use TopologyData.

Refs #3567

3 years agoUse IonSwapping parameter.
M. Eric Irrgang [Thu, 25 Jun 2020 12:03:27 +0000 (15:03 +0300)]
Use IonSwapping parameter.

Refs #3567

3 years agoUse CenterOfMassPulling
M. Eric Irrgang [Thu, 23 Apr 2020 15:06:30 +0000 (18:06 +0300)]
Use CenterOfMassPulling

Refs #3567

3 years agoUse ReplicaExchange member instead of build() argument.
M. Eric Irrgang [Thu, 23 Apr 2020 15:03:05 +0000 (18:03 +0300)]
Use ReplicaExchange member instead of build() argument.

Refs #3567

3 years agoUse SimulatorModules parameter.
M. Eric Irrgang [Thu, 23 Apr 2020 14:58:11 +0000 (17:58 +0300)]
Use SimulatorModules parameter.

Refs #3567

3 years agoUse InteractiveMD SimulatorBuilder parameter.
M. Eric Irrgang [Thu, 23 Apr 2020 14:54:19 +0000 (17:54 +0300)]
Use InteractiveMD SimulatorBuilder parameter.

Refs #3567

3 years agoUse LegacyInput.
M. Eric Irrgang [Thu, 23 Apr 2020 14:52:08 +0000 (17:52 +0300)]
Use LegacyInput.

Refs #3567

3 years agoUse ConstraintsParam.
M. Eric Irrgang [Thu, 23 Apr 2020 14:37:02 +0000 (17:37 +0300)]
Use ConstraintsParam.

Refs #3567

3 years agoMove Profiling parameter out of simulatorbuilder.build()
M. Eric Irrgang [Thu, 23 Apr 2020 14:29:25 +0000 (17:29 +0300)]
Move Profiling parameter out of simulatorbuilder.build()

Refs #3567

3 years agoUse SimulatorEnv
M. Eric Irrgang [Thu, 23 Apr 2020 14:21:51 +0000 (17:21 +0300)]
Use SimulatorEnv

Refs #3567

3 years agoImplement remaining SimulatorBuilder.add() methods.
M. Eric Irrgang [Thu, 23 Apr 2020 13:22:03 +0000 (16:22 +0300)]
Implement remaining SimulatorBuilder.add() methods.

Refs #3567

3 years agoInterface for remaining SimulatorBuilder.add() methods.
M. Eric Irrgang [Thu, 23 Apr 2020 13:03:20 +0000 (16:03 +0300)]
Interface for remaining SimulatorBuilder.add() methods.

Refs #3567

3 years agoCompletely encapsulate membed logic in MembedHolder
ejjordan [Thu, 23 Apr 2020 09:08:50 +0000 (12:08 +0300)]
Completely encapsulate membed logic in MembedHolder

Refs #3567

3 years agoMake holder for simulation configuration
Artem Zhmurov [Tue, 21 Apr 2020 14:30:03 +0000 (17:30 +0300)]
Make holder for simulation configuration

Make a class that holds values of:

useModularSimulator
mdrunOptions
startingBehavior
doRerun
runScheduleWork

inside the SimulatorBuilder.

Refs #3567

3 years agoUse SimulatorStateData.
Prashanth Kanduri [Mon, 22 Jun 2020 14:59:57 +0000 (17:59 +0300)]
Use SimulatorStateData.

Implement `SimulatorBuilder.add(SimulatorStateData&&)`

Refs #3567

3 years agoAdd MembedHolder for SimulatorBuilder.
ejjordan [Tue, 21 Apr 2020 14:23:38 +0000 (17:23 +0300)]
Add MembedHolder for SimulatorBuilder.

Implement SimulatorBuilder.add(MembedHolder&&)

Refs #3567

3 years agoSimulatorBuilder.add() for StopHandlerBuilder.
M. Eric Irrgang [Mon, 22 Jun 2020 13:27:52 +0000 (16:27 +0300)]
SimulatorBuilder.add() for StopHandlerBuilder.

Refs #3567

3 years agoImplement SimulatorBuilder.build()
M. Eric Irrgang [Tue, 21 Apr 2020 10:46:46 +0000 (13:46 +0300)]
Implement SimulatorBuilder.build()

Explicitly define the build() and its signature
so that we can start to refine the interface.

Refs #3567

3 years agoMKL NULL->nullptr and remove dead code
Roland Schulz [Fri, 26 Jun 2020 06:39:58 +0000 (23:39 -0700)]
MKL NULL->nullptr and remove dead code

3 years agoMove dispersion correction call to do_force()
Berk Hess [Fri, 26 Jun 2020 08:30:32 +0000 (08:30 +0000)]
Move dispersion correction call to do_force()

The call to dispersion correction was in compute_globals(), which
should only compute globals, not compute energies. Moving the call
to do_force() simplifies the logic, as correcting the virial before
computing the pressure removes the need to correct the pressure.

3 years agoRestored the comment
Mark Abraham [Thu, 25 Jun 2020 16:29:01 +0000 (16:29 +0000)]
Restored the comment

We can keep the comment in its most useful form while avoiding the warning.

3 years agoMake cl_nbparam into a struct
Artem Zhmurov [Thu, 25 Jun 2020 15:31:36 +0000 (15:31 +0000)]
Make cl_nbparam into a struct

This is needed to unify with CUDA path

3 years agoFix warning about needing config.h
Paul Bauer [Wed, 24 Jun 2020 11:43:29 +0000 (13:43 +0200)]
Fix warning about needing config.h

A comment would lead to the warning in the check source build.

Change-Id: Iacfc2f97827b31feb674b3c53bd2c4eff065a859

3 years agoAdd class ListedForces
Berk Hess [Wed, 24 Jun 2020 17:35:16 +0000 (17:35 +0000)]
Add class ListedForces

Gather all data that is only used for the listed force calculation
in a new class called ListedForces. This is a first step in
refactoring, more parameters to the listed forces calculation can
be moved into class.
Also converted bonded_threading_t, t_fcdata and bondedtable_t to C++.
Made listed_threading.h internal to the listed_forces module.

This change is only refactoring.

3 years agoChange grompp disres cost to linear
Berk Hess [Tue, 23 Jun 2020 19:53:11 +0000 (21:53 +0200)]
Change grompp disres cost to linear

The cost of adding distance restraints (actually their parameters)
was quadratic in the number of restraints and has now been changed
to linear.

Fixes #3457

3 years agoFix OpenCL install
Roland Schulz [Wed, 24 Jun 2020 07:06:20 +0000 (00:06 -0700)]
Fix OpenCL install

9b3fb3b5ffdb77f223e9ed949508905284bfe3f3 moved the include of
gmxManageOpenCL.cmake after setting of GMX_INSTALL_GMXDATADIR.
But GMX_INSTALL_GMXDATADIR is used in there to set GMX_INSTALL_OCLDIR.

3 years agoFix minor nit-picks
Artem Zhmurov [Wed, 24 Jun 2020 10:26:11 +0000 (10:26 +0000)]
Fix minor nit-picks

1. Make the array with device status names static.
2. Expilcitely list integers in enumeration.

3 years agoFix clFFT build without GMX_LOAD_PLUGINS
Roland Schulz [Tue, 23 Jun 2020 21:53:29 +0000 (14:53 -0700)]
Fix clFFT build without GMX_LOAD_PLUGINS

It only happened to work before 649af69b44d503 because
GMX_LOAD_PLUGINS was on by default and it added the
required dl library.
Also fixes that we reuse the same code for checking for
dlopen.

3 years agoDon't print pygments error
Roland Schulz [Tue, 23 Jun 2020 21:45:04 +0000 (14:45 -0700)]
Don't print pygments error

Find modules shouldn't print tool errors to the cmake output.
These errors can be confusing because it is unclear whether
the error text applies to cmake or something else. Those
errors should go to log files. In this case logging doesn't
seem necessary. We didn't report the error until
b277931fcf4bc. And that commit claims to just fix a bug and
not increase verbosity. Therefore it was likely an
accidental change.

3 years agoRefactor simulator comparison tests
Pascal Merz [Thu, 23 Jan 2020 14:00:09 +0000 (15:00 +0100)]
Refactor simulator comparison tests

The rerun test and the simulator comparison test share some
infrastructure. The scope of shared functionality was chosen
a bit too broadly, making reuse for other similar tests difficult.
This change makes the shared functionality more granular, allowing
to reuse this functionality more broadly and increasing the
readability, at the expense of some minor code duplication.

3 years agoWIP: Finish removing compile_cpp_as_cuda
Mark Abraham [Tue, 23 Jun 2020 15:36:20 +0000 (15:36 +0000)]
WIP: Finish removing compile_cpp_as_cuda

The definition can now be removed, and a comment updated.

Test code can use the same approach where needed.

3 years agoRemove some headers from install targets
Joe Jordan [Tue, 23 Jun 2020 14:20:15 +0000 (14:20 +0000)]
Remove some headers from install targets

There are valid use cases for including gromacs exceptions in the
installed headers, such as packages wanting to utilize gromacs
testing features. However, class_helpers.h does not provide
enough benefit over just satisfying the rule of 5 to warrant
exposure in installed headers. This change removes the need for
class_helpers.h as well as the, apparently unused,
current_function.h from the installed headers.

3 years agoAdd virtual site with one constructing atom
Berk Hess [Tue, 23 Jun 2020 12:54:12 +0000 (12:54 +0000)]
Add virtual site with one constructing atom

Also fixed the order of the function type update table in tpxio.cpp.

3 years ago[WIP] Run regression tests under ASAN
Kevin Boyd [Tue, 23 Jun 2020 09:57:40 +0000 (09:57 +0000)]
[WIP] Run regression tests under ASAN

Suppression gets regression tests passing for complex, free energy,
rotation.

TODO - essential dynamics does not work for non-leak reasons, issues
in perl script

3 years agoRemove DeviceStream include from GPU traits
Artem Zhmurov [Fri, 19 Jun 2020 13:59:34 +0000 (15:59 +0200)]
Remove DeviceStream include from GPU traits

GPU traits no longer use DeviceStream directly, so it should not be
included there.

3 years agoReformat pairs.cpp
M. Eric Irrgang [Mon, 22 Jun 2020 12:59:00 +0000 (15:59 +0300)]
Reformat pairs.cpp

Resolve clang-format error.

3 years agoUse Gromacs::gmx target to hint gmxapi tests.
M. Eric Irrgang [Tue, 16 Jun 2020 12:40:12 +0000 (15:40 +0300)]
Use Gromacs::gmx target to hint gmxapi tests.

Import Gromacs::gmx CMake target from GROMACS package to get binary
install directory and executable name for a new gmxapi resource file.

Encapsulate gmxcli test fixture into module variable. Perform gmx
command discovery only at module import.

Refs #2961

3 years agoMove soft-core parameters to interaction_const_t
Berk Hess [Mon, 22 Jun 2020 10:56:00 +0000 (10:56 +0000)]
Move soft-core parameters to interaction_const_t

The soft-core free-energy parameters for use in the kernels have been
put in a separate struct called SoftCoreParameters
and have been moved from t_forcerec to interaction_const_t.

3 years agoRemove workaround for gcc bug 58265.
M. Eric Irrgang [Fri, 19 Jun 2020 09:18:27 +0000 (12:18 +0300)]
Remove workaround for gcc bug 58265.

Fixes #3041

3 years agoModular simulator: Separate trajectory element and signaller
Pascal Merz [Thu, 18 Jun 2020 18:53:59 +0000 (18:53 +0000)]
Modular simulator: Separate trajectory element and signaller

The trajectory element implemented both the ISimulatorElement and
the ISignaller interface. It was both signalling its clients that a
trajectory writing step was about to occur during task list creation,
and actually performing trajectory writing during the simulation.

In general, the tasks of signallers and elements, their call site in
the code, and their build and ownership procedures are all significantly
different. The dual nature of the trajectory element makes this
differentiation less clear, and requires some workarounds. Additionally,
separating the trajectory element in separate element and a signaller
requires no changes on client side, since all clients of the trajectory
element with integrated signaller already implemented two interfaces,
ITrajectorySignallerClient and ITrajectoryWriterClient.

The current change hence splits the current trajectory element into
a pure element and a pure signaller. This will make subsequent changes,
especially the introduction of a builder approach much easier. It also
removes support for combined elements and signallers: It renames the setup
method of the ISignaller interface from `signallerSetup` to `setup`, as
this differentiation was only used for classes implementing both element
and signaller interfaces. It also simplifies the handling of signallers
in ModularSimulator, as having a separate ownership and call list is not
needed anymore.

Refs #3437

3 years agoFix missing #include <string>
Paul Bauer [Wed, 17 Jun 2020 16:13:34 +0000 (18:13 +0200)]
Fix missing #include <string>

Only showed up in MSVC 2019 builds.

Fixes #3559

Change-Id: Ie5162ff6d922d7dbd8e7fd867327f68de1c8b682

3 years agocmake: export gmx target
Christoph Junghans [Thu, 18 Jun 2020 12:03:23 +0000 (12:03 +0000)]
cmake: export gmx target

3 years agoConvert t_forcetable to C++
Berk Hess [Wed, 17 Jun 2020 21:28:59 +0000 (23:28 +0200)]
Convert t_forcetable to C++

Also forward declared t_nblist in nbnxm.h to reduce dependencies.

3 years agoSimplified uniform GPU selection in CMake
Erik Lindahl [Wed, 17 Jun 2020 18:25:20 +0000 (18:25 +0000)]
Simplified uniform GPU selection in CMake

GPU selection is now done by setting GMX_GPU to either CUDA
or OpenCL, with no other variables required. As part of the
overall CMake simplification, the CMake automatic detection
of hardware and "auto" settings for GPU acceleration have
been removed. This will require the user to explicitly enable
GPU support (which is a drawback), but it leads to much
simplier and shorter CMake code, similar support for CUDA and
OpenCL, and it will make it easier to handle multiple different
APIs targeting e.g. NVIDIA GPU hardware in the near future.

3 years agoFix style errors in modular simulator propagator
Pascal Merz [Wed, 20 May 2020 07:03:30 +0000 (01:03 -0600)]
Fix style errors in modular simulator propagator

Some member variables of the Propagator class were missing the trailing
underscore. This also changes the initialization of a vector and a
matrix to list initialization, which used to throw off uncrustify.

3 years agoImprove pytest output handling.
M. Eric Irrgang [Fri, 12 Jun 2020 12:34:13 +0000 (15:34 +0300)]
Improve pytest output handling.

Reduce default pytest output verbosity.

Explicitly create only one output file when running under MPI.

Fixes #3553

3 years agoReplace trivalue options with plain booleans
Erik Lindahl [Mon, 15 Jun 2020 09:21:48 +0000 (09:21 +0000)]
Replace trivalue options with plain booleans

Our CMake auto-detection has been a long discussion since
it both complicates the CMake code and leads to complex
interactions when multiple auto-settings interact with
each other, and when/how things can change.

This is a first step towards removing such auto settings,
by altering "nice to have, but not required" to "off" by
default (GMX_BUILD_HELP, GMX_HWLOC).

The option GMX_LOAD_PLUGINS was on by default, and
the build generates errors if it's turned off, so for now
I set it to "on", and will adress the compile error when
it's disabled in a separate change.

With these changes, the trivalue options are no more.

3 years agoReplace compile_cpp_as_cuda(...) with CUDA runtime header inclusion
Artem Zhmurov [Fri, 12 Jun 2020 08:12:17 +0000 (08:12 +0000)]
Replace compile_cpp_as_cuda(...) with CUDA runtime header inclusion

To make CUDA-specific tipes visible, one should either use CUDA compiler
for the files where they are exposed, or include the CUDA runtime header
for the normal compiler. This changes first approach to the second.

3 years agoReplace trivalue options with plain booleans
Erik Lindahl [Thu, 11 Jun 2020 18:59:11 +0000 (18:59 +0000)]
Replace trivalue options with plain booleans

Our CMake auto-detection has been a long discussion since
it both complicates the CMake code and leads to complex
interactions when multiple auto-settings interact with
each other, and when/how things can change.

This is a first step towards removing such auto settings,
by altering "nice to have, but not required" to "off" by
default (GMX_BUILD_HELP, GMX_HWLOC).

The option GMX_LOAD_PLUGINS was on by default, and
the build generates errors if it's turned off, so for now
I set it to "on", and will adress the compile error when
it's disabled in a separate change.

With these changes, the trivalue options are no more.

3 years agoReplace automatic rdtscp checks with boolean option
Erik Lindahl [Wed, 10 Jun 2020 09:03:04 +0000 (11:03 +0200)]
Replace automatic rdtscp checks with boolean option

This simplifies the CMake configuration by skipping the
automatic detection based on build host. Virtually all
64-bit x86 machines support this anyway, apart from the
very first AMD 64-bit release that are now 7 years old,
so it should be fine to enable by default. In the rare
case of 7-year-old hardware, gmx will detect missing
support at the start of the run.

3 years agoAvoid using AUTO settings in CI builds
Erik Lindahl [Tue, 9 Jun 2020 19:46:08 +0000 (21:46 +0200)]
Avoid using AUTO settings in CI builds

AUTO settings e.g. for SIMD will change the build
configuration depending on the underlying hardware
the container happens to run on, which makes the
builds non-reproducible in case of problems.

This changes the two AUTO builds to use AVX2
instead, which should realistically be present on
any modern hardware where gitlab CI tests run.

3 years agoCompartmentalize job rules.
M. Eric Irrgang [Tue, 26 May 2020 15:47:33 +0000 (18:47 +0300)]
Compartmentalize job rules.

Separate mix-in job definitions for *rules* parameter to a separate
GitLab CI configuration file to maintain the readability of
`global.gitlab-ci.yml` as *rules* complexity increases.

Use additional YAML objects to provide short-hand symbols for *rules*
array elements to be used with YAML anchors.
This should improve the visual clarity of the unique aspects of rule
sets while providing more easily copied/pasted templates for new rule
sets.

Fixes #3538

3 years agoMake SD stuff private for update.cpp
Artem Zhmurov [Tue, 9 Jun 2020 14:49:28 +0000 (14:49 +0000)]
Make SD stuff private for update.cpp

1. Make update_sd_second_half(...) into a method of Update class
2. Make update_temperature_constants(...) into a method of Update class
3. Unexpose gmx_stochd_t

TODO: Need beter solution for Andersen stuff.

3 years agoExtract COM handling from trjconv
Paul Bauer [Tue, 9 Jun 2020 12:00:05 +0000 (12:00 +0000)]
Extract COM handling from trjconv

This extract refactored functions for the molecule and residue COM based
shift of atoms from trjconv to classes that perform those operations.

TODO tests

Change-Id: I2198c08a35c27a4aae26413bfe1c3eab31c16763

3 years agoMake SD stuff private for update.cpp
Artem Zhmurov [Tue, 9 Jun 2020 09:14:38 +0000 (09:14 +0000)]
Make SD stuff private for update.cpp

1. Make update_sd_second_half(...) into a method of Update class
2. Make update_temperature_constants(...) into a method of Update class
3. Unexpose gmx_stochd_t

TODO: Need beter solution for Andersen stuff.

3 years agoImprove usage of Python logging module.
M. Eric Irrgang [Mon, 8 Jun 2020 13:41:37 +0000 (16:41 +0300)]
Improve usage of Python logging module.

Be less heavy-handed with configuration at import.
Improve documentation about default behavior and use cases.

Fixes #3530

3 years agoMove constraints related logic to constraints file
Artem Zhmurov [Mon, 8 Jun 2020 19:54:21 +0000 (19:54 +0000)]
Move constraints related logic to constraints file

The constrain_coordinates/velocities functions are not related to
update in any way. Also, they share most of the logic, which is now
unified in apply method of Constrints object.

3 years agoReplace nbnxn_buffer_flags_t with vector
Kevin Boyd [Mon, 8 Jun 2020 07:46:32 +0000 (07:46 +0000)]
Replace nbnxn_buffer_flags_t with vector

Plugs a memory leak

3 years agoUnify VdW and Electrostatic kernel enumerations in CUDA and OpenCL versions of NBNXM
Artem Zhmurov [Mon, 8 Jun 2020 06:58:20 +0000 (06:58 +0000)]
Unify VdW and Electrostatic kernel enumerations in CUDA and OpenCL versions of NBNXM

These enumerations are identical in CUDA and OpenCL.

3 years agoMove calculation of kinetic energy to md_support
Artem Zhmurov [Fri, 5 Jun 2020 15:23:32 +0000 (17:23 +0200)]
Move calculation of kinetic energy to md_support

The calc_ke_part function is only called from compute_globals,
hence it should reside there, not in update.

3 years agoRemove COM from SETTLE
Berk Hess [Fri, 5 Jun 2020 11:53:37 +0000 (11:53 +0000)]
Remove COM from SETTLE

SETTLE computed new postions of the atoms using the center of mass
of the molecule. But this adds rouding errors which lead to extra
energy drift. The use of the COM is now completely avoided, which
significantly improves energy conservation when coordinates are large
and also slighlty improves performance.
Corrected and updated the flop accounting for SETTLE.

3 years agoUse moltype directly for obtaining residueAtomRanges
Paul Bauer [Thu, 4 Jun 2020 16:35:39 +0000 (18:35 +0200)]
Use moltype directly for obtaining residueAtomRanges

Skipped indirection through molblock and mtop after seeing that the
client code this is intended for can just provide the current moltype.

Change-Id: I51e1bef8882d334849682b528e0e8f0c7f81ad17

3 years agoFix failing webpage build
Paul Bauer [Fri, 5 Jun 2020 09:27:31 +0000 (09:27 +0000)]
Fix failing webpage build

Change-Id: I09f0f0be0c055921e9e92adc424fce58ef2eb368

3 years agoMake a error message less confusing
Artem Zhmurov [Wed, 3 Jun 2020 14:28:40 +0000 (16:28 +0200)]
Make a error message less confusing

The GPU implementation of PME and bondeds require dynamical integrator.
This updates the error message to make it more clear to the user.

Refs. #3544

3 years agoAdd ability to chose regressiontest commit and branch
Paul Bauer [Thu, 4 Jun 2020 14:58:59 +0000 (14:58 +0000)]
Add ability to chose regressiontest commit and branch

Change-Id: I4b51a2c1a0ea434dc4c6d306ba88768ba8032270

3 years agoCool quote
Artem Zhmurov [Thu, 4 Jun 2020 07:21:19 +0000 (07:21 +0000)]
Cool quote

3 years agoFix missing PBC in SHAKE
Berk Hess [Wed, 3 Jun 2020 12:59:02 +0000 (14:59 +0200)]
Fix missing PBC in SHAKE

During introduction of PBC support in SHAKE, one distance calculation
was overlooked.
Also replaced doubles by reals and made variables scope local.

3 years agoRemove 'register' storage class in clFFT
Erik Lindahl [Wed, 3 Jun 2020 15:05:18 +0000 (17:05 +0200)]
Remove 'register' storage class in clFFT

Required for compatibility with C++17.

4 years agoTurn SettleData into a class
Berk Hess [Wed, 3 Jun 2020 12:49:49 +0000 (12:49 +0000)]
Turn SettleData into a class

This change is only refactoring.

4 years agononbonded-benchmark: run combrule=none when the -all option is used
Gilles Gouaillardet [Mon, 1 Jun 2020 07:55:06 +0000 (16:55 +0900)]
nonbonded-benchmark: run combrule=none when the -all option is used

Closes gromacs/gromacs#3543

4 years agoAdd function to get residue start and end
Paul Bauer [Tue, 2 Jun 2020 09:33:05 +0000 (09:33 +0000)]
Add function to get residue start and end

Free function for mtop that makes it possible to obtain the start and
end point of residues in a molecule block.

Change-Id: Ic7ac4b79a29275aac65cd8224f163e3c2efe6d4d

4 years agoFix atomics configure test
Mark Abraham [Mon, 1 Jun 2020 07:53:45 +0000 (07:53 +0000)]
Fix atomics configure test

The previous code used an approach to setting the include path for
TEST_ATOMICS test that did not work if the path had a space in it.
This meant that atomics support in GROMACS seemed broken if the build
was from a path in the home folder of a user named like "Firstname
Lastname". This is often the case on Windows.

The new approach avoids this brittleness, adds a few comments and has
the test source code inline in the cmake code. The TMPI_TEST_ATOMICS
macro is replaced by a function so that it has a namespace, since it
now needs to set some variables that benefit from that
namespace. Also, its results were returned in internal cache variables
rather than the namespace that the former macro automatically shared,
so there was no advantage to using a macro rather than a function.

The former TEST_ATOMICS test defined TMPI_ATOMICS before the call,
which was useless and confusing. That is removed.

Removed a useless call to TMPI_TEST_ATOMICS, which had always passed
the name of a variable instead of the value it contained, and was
redundant with a proper call that immediately preceded it in the
calling code.

4 years agoMake Cygwin build work
Mark Abraham [Thu, 28 May 2020 21:56:10 +0000 (23:56 +0200)]
Make Cygwin build work

Originally CMake didn't provide C++ language version flags, so GROMACS
managed that itself. Now that GROMACS lets CMake manage it, we always
get the -std=c++17 flag, rather than (say) -std=gnu++17 to allow
extensions to the std headers. In various places, GROMACS relied on
POSIX functionality that is available by default on Linux, but on
Cygwin required the GNU extensions to the C++ language dialect. This
change fixes several such places, mostly by requiring the POSIX
extensions needed.

Removed an include of sys/syscall.h that was unused, unnecessary, and
only present on Linux.

Moved an inclusion of gtest.h from a header into a source file because
it was only needed there.

Fixed some warnings about unused things.

4 years agoAdd test for InteractionList
Paul Bauer [Wed, 4 Mar 2020 14:50:52 +0000 (15:50 +0100)]
Add test for InteractionList

Change-Id: Id1231d96e056adb64231333e72ae5aa15f0abc6e

4 years agoHandle arbitrary doxygen versions in Docker image build scripts.
M. Eric Irrgang [Fri, 29 May 2020 12:18:04 +0000 (12:18 +0000)]
Handle arbitrary doxygen versions in Docker image build scripts.

Refs #3539

4 years agoUnify initialization of GPU and CPU SETTLE
Artem Zhmurov [Fri, 29 May 2020 10:51:49 +0000 (10:51 +0000)]
Unify initialization of GPU and CPU SETTLE

The two identical code path are now combined. Note, that that
exposes SettleParameters object and its initialization in the settle
header. But the SETTLE is contained within the Constraints object and
this header is not include anywhere else, so the exposure is minimal.