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

4 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.

4 years agoRemove unused (and broken) image from Docker image build script.
M. Eric Irrgang [Thu, 28 May 2020 11:07:44 +0000 (14:07 +0300)]
Remove unused (and broken) image from Docker image build script.

4 years agoDocker image builds: simplify doxygen version handling.
M. Eric Irrgang [Thu, 28 May 2020 11:06:13 +0000 (14:06 +0300)]
Docker image builds: simplify doxygen version handling.

Remove broken handling for requested versions other than 1.8.5.

Remove over-specified (and broken) doxygen argument in parser.

4 years agoDocker image builds: move doxygen handling to a separate function.
M. Eric Irrgang [Thu, 28 May 2020 11:00:46 +0000 (14:00 +0300)]
Docker image builds: move doxygen handling to a separate function.

4 years agoExtend MPI ensemble testing for gmxapi.
M. Eric Irrgang [Tue, 26 May 2020 13:40:24 +0000 (16:40 +0300)]
Extend MPI ensemble testing for gmxapi.

Fixes #3469

4 years agoEnable MPI ensemble testing for gmxapi.
M. Eric Irrgang [Fri, 22 May 2020 15:38:20 +0000 (18:38 +0300)]
Enable MPI ensemble testing for gmxapi.

Refs #3469

4 years agoNormalize gmxapi related release-2020 job logic.
M. Eric Irrgang [Tue, 26 May 2020 14:17:03 +0000 (14:17 +0000)]
Normalize gmxapi related release-2020 job logic.

Use rules definied in global.gitlab-ci.yml for gmxapi related jobs.

Refs #3475

4 years agoRemove the dependence on Constraints object on t_mdatoms
Artem Zhmurov [Tue, 26 May 2020 06:37:02 +0000 (06:37 +0000)]
Remove the dependence on Constraints object on t_mdatoms

This removes t_mdatoms structure from all function signatures in
Constraints object. Only those data neede for Constraints is
now passed upon setup and stored locally.

4 years agoFix warnings on llvm 11 compilers
Erik Lindahl [Mon, 25 May 2020 20:09:30 +0000 (20:09 +0000)]
Fix warnings on llvm 11 compilers

This fixes a bunch of benign warnings exposed by recent
Intel compilers based on the llvm master branch frontend.

- Remove an unused mutex
- Use the C++ compiler for gmx_simdcall CMake tests
- Avoid anonymous structs to (C/C++ compatibility warning)

4 years agoFix awk error in clang-tidy script
Paul Bauer [Mon, 25 May 2020 06:50:51 +0000 (08:50 +0200)]
Fix awk error in clang-tidy script

Change-Id: I1fb812af81d75577d2a5a6bf0d7f932ea80c2baf

4 years agoRemove dependence on t_mdatoms from GPU version of leap-frog
Artem Zhmurov [Mon, 25 May 2020 08:13:12 +0000 (08:13 +0000)]
Remove dependence on t_mdatoms from GPU version of leap-frog

4 years agoFix clang-tidy warnings
Paul Bauer [Mon, 25 May 2020 06:47:24 +0000 (08:47 +0200)]
Fix clang-tidy warnings

Change-Id: I8f1b8d22c423dcef5742289e1f3c071e5ba668f2

4 years agoAdd conversion from new to legacy symtab
Paul Bauer [Sun, 24 May 2020 19:13:28 +0000 (19:13 +0000)]
Add conversion from new to legacy symtab

Added function to convert legacy to modern version as well.
Also add test for conversion and merge test fixtures for symbol table
tests.

Refs #2833

Change-Id: I59dab5e19a6fc4ab86933b178cb2d729b72c4f7a

4 years agoClean up grompp memory leaks in rotation and pull structures.
Kevin Boyd [Sun, 24 May 2020 13:13:01 +0000 (13:13 +0000)]
Clean up grompp memory leaks in rotation and pull structures.

Changed to C++ where possible, added c-style cleanup where not
feasible.

4 years agoAvoid parsing of fatalerror.cpp as lint failure
Paul Bauer [Sun, 24 May 2020 08:03:01 +0000 (08:03 +0000)]
Avoid parsing of fatalerror.cpp as lint failure

When the file was changed its presence could cause the linter to fail
even though no errors are present. Fixed by avoiding the name in the
regular expression.

Change-Id: I0c066ede89b30bfd98b5ad335ec40ea756445e00

4 years agoModernize convert-tpr
Paul Bauer [Sat, 23 May 2020 13:44:03 +0000 (13:44 +0000)]
Modernize convert-tpr

Moved convert-tpr to ICommandLineModule and cleaned up code a bit.

Change-Id: I6e6b494fabacf4e051c0d59a2436aede1e39bc38

4 years agoRemove dependence on t_mdatoms from pull code
Artem Zhmurov [Fri, 22 May 2020 18:15:35 +0000 (20:15 +0200)]
Remove dependence on t_mdatoms from pull code

The pull code only uses masses from the t_mdatoms, which
is now passed instead of the pointer to the entire
t_mdatoms structure.

4 years agoAdd tests for tool help output writing
Paul Bauer [Sat, 23 May 2020 09:16:46 +0000 (09:16 +0000)]
Add tests for tool help output writing

Change-Id: Ia1d3821feddc7856f6ebb64a0f26ac0eebdb2193

4 years agoRemove dependence of constraints on t_mdatoms
Artem Zhmurov [Fri, 22 May 2020 16:49:54 +0000 (16:49 +0000)]
Remove dependence of constraints on t_mdatoms

This changes the signatures of the constrants set/compute functions
by removing the t_mdatoms from the set of arguments and replacing
it with the parts that are actually used.

Refs. #3535

4 years agoRemove dependence of constraints on t_mdatoms
Artem Zhmurov [Fri, 22 May 2020 07:40:50 +0000 (07:40 +0000)]
Remove dependence of constraints on t_mdatoms

This changes the signatures of the constrants set/compute functions
by removing the t_mdatoms from the set of arguments and replacing
it with the parts that are actually used.

Refs. #3535

4 years agoFix compile errors
Paul Bauer [Wed, 20 May 2020 14:11:18 +0000 (16:11 +0200)]
Fix compile errors

Removing the include of arrayref.h caused issues due to missing implicit
include of <array>

Fixes #3534

Change-Id: I378e136c536c0db0e0b05042487698d3e38bfed7

4 years agoRemove t_mdatoms from Nbnxm setAtomProperties()
Berk Hess [Wed, 20 May 2020 14:56:32 +0000 (16:56 +0200)]
Remove t_mdatoms from Nbnxm setAtomProperties()

4 years agoMake sure images have /usr/bin/python
M. Eric Irrgang [Thu, 14 May 2020 08:28:06 +0000 (11:28 +0300)]
Make sure images have /usr/bin/python

Append a Docker RUN command to make sure that /usr/bin/python either
already exists or is configured as a python3 alias.

Refs #3528

4 years agoRefactor print_missing_interactions()
Berk Hess [Fri, 15 May 2020 08:28:52 +0000 (10:28 +0200)]
Refactor print_missing_interactions()

4 years agoRemove unnecessary includes of arrayref.h
Paul Bauer [Tue, 19 May 2020 05:29:21 +0000 (05:29 +0000)]
Remove unnecessary includes of arrayref.h

Changed to forward declaration.
Don't think I got all of them yet.

Change-Id: I7c148364db152ed0a6645e91ee1ab93421441c0d

4 years agoUnify CUDA and OpenCL lookup-table creation
Artem Zhmurov [Fri, 15 May 2020 16:38:02 +0000 (16:38 +0000)]
Unify CUDA and OpenCL lookup-table creation

In CUDA code, textures are used for the lookup-tables,
whereas in OpenCL they are created as a read-only
buffers. This commit hides these differences behind a
unified wrapper.

Refs #3318
Refs #3311

Change-Id: I003e0c982c2452a2753e331b46fc59f0b7e1b711

4 years agoUpdate docker image build scripts for master branch.
M. Eric Irrgang [Thu, 14 May 2020 08:57:15 +0000 (11:57 +0300)]
Update docker image build scripts for master branch.

CI infrastructure has been back-ported to the `release-2020` branch,
so we can clean up the extra pieces that existed to support multiple
releases. This change does not require immediate rebuilds of the images.
The next time images are rebuilt, fewer images will be built and they
will be slightly smaller.

4 years agoMake sure CI script can call /bin/env python`
M. Eric Irrgang [Thu, 14 May 2020 08:34:19 +0000 (11:34 +0300)]
Make sure CI script can call /bin/env python`

Before calling admin/clang-tidy.sh, make sure that the wrapped tool will
be able to find a Python interpreter.

Refs #3528

4 years agoMinor clean up to buildall.sh
M. Eric Irrgang [Thu, 14 May 2020 08:24:09 +0000 (11:24 +0300)]
Minor clean up to buildall.sh

A commented line indicates the script has occasionally been written for
overly aggressive action and is frequently modified in place, sometimes
resulting in accidental commits of disabled commands. This change lets
the script simply provide copy-pasteable commands for the user to run
at their discretion.

4 years agoAllow llvm option already used in buildall.sh script.
M. Eric Irrgang [Thu, 14 May 2020 08:17:35 +0000 (11:17 +0300)]
Allow llvm option already used in buildall.sh script.

An update to utility.py was apparently overlooked in a previous commit.
This allows admin/containers/buildall.sh to run.

4 years agoReduce console log output from sample_restraint tests.
M. Eric Irrgang [Thu, 14 May 2020 13:59:20 +0000 (13:59 +0000)]
Reduce console log output from sample_restraint tests.

Don't override default root log level in test_binding.py
Remove `-x` bash option from automated testing script.
Also remove extraneous and inappropriate __init__.py

Refs #3530

4 years agoExtract postProcessForceWithShiftForces()
Berk Hess [Thu, 14 May 2020 12:51:51 +0000 (12:51 +0000)]
Extract postProcessForceWithShiftForces()

Also added a boolean to check whether we spread vsite forces exactly
once.

4 years agoAvoid CI errors from overloading resources
Paul Bauer [Thu, 14 May 2020 09:53:03 +0000 (09:53 +0000)]
Avoid CI errors from overloading resources

CI got cause ICE due to resource limitations.
Avoided by limiting parallelism for make.

Change-Id: I6cc09f16625f615984e71c650eafa755abc1f121

4 years agoFix check source error parsing
Paul Bauer [Wed, 13 May 2020 11:46:20 +0000 (11:46 +0000)]
Fix check source error parsing

Change-Id: I1a1bb3333fb9a36083b72004e116467432319ae9

4 years agoRefine usage of *job:tags* parameter.
M. Eric Irrgang [Tue, 12 May 2020 14:20:41 +0000 (14:20 +0000)]
Refine usage of *job:tags* parameter.

Try to prevent jobs from getting stuck when they should be runnable
in GitLab forks or in the Gromacs CI environment when the Shared Runners
are turned off.

4 years agoExtract helper force buffers to a separate class
Berk Hess [Tue, 12 May 2020 13:14:11 +0000 (13:14 +0000)]
Extract helper force buffers to a separate class

This change provides useful refactoring itself and it is needed
for multiple time stepping.

4 years agoRefactor virtual site interface
Berk Hess [Tue, 12 May 2020 09:01:35 +0000 (09:01 +0000)]
Refactor virtual site interface

Replaced struct gmx_vsite_t by pimpled class VirtualSitesHandler.
Removed most arguments that stay the same from the construction
and spreading calls. Replaced rvec pointers by ArrayRefs.
This change is only refactoring and there are no functional changes
in the code using this, but the PBC and virial handling have been
simplified and the parameters reduced. Templating of the spreading
functions on virial handling should improve performance.
Added full doxygen documentation.

4 years agoFix archive build
Paul Bauer [Tue, 12 May 2020 08:13:13 +0000 (08:13 +0000)]
Fix archive build

Change-Id: I27361fa3f9218bbb38ac739b758d63a9774737ea

4 years agoRemove the duplicating note from the release notes
Artem Zhmurov [Mon, 11 May 2020 06:04:13 +0000 (08:04 +0200)]
Remove the duplicating note from the release notes

The fix was moved to release branch and release notes become duplicated.

4 years agoUnify CUDA and OpenCL lookup-table creation
Artem Zhmurov [Mon, 11 May 2020 08:31:34 +0000 (08:31 +0000)]
Unify CUDA and OpenCL lookup-table creation

In CUDA code, textures are used for the lookup-tables,
whereas in OpenCL they are created as a read-only
buffers. This commit hides these differences behind a
unified wrapper.

Refs #3318
Refs #3311

Change-Id: I003e0c982c2452a2753e331b46fc59f0b7e1b711

4 years agoMerge branch 'origin/release-2020' into master
Paul Bauer [Wed, 6 May 2020 12:31:38 +0000 (14:31 +0200)]
Merge branch 'origin/release-2020' into master

Resolved Conflicts:
admin/clang-tidy.sh
admin/containers/buildall.sh
admin/containers/utility.py
admin/dockerfiles/buildall.sh
admin/dockerfiles/ci-clang/Dockerfile
admin/dockerfiles/ci-docs-clang/Dockerfile
admin/dockerfiles/ci-docs-gcc/Dockerfile
admin/dockerfiles/ci-gcc/Dockerfile
admin/gitlab-ci/archive.gitlab-ci.yml
admin/gitlab-ci/documentation.gitlab-ci.yml
admin/gitlab-ci/global.gitlab-ci.yml
admin/gitlab-ci/gromacs.gitlab-ci.yml
admin/gitlab-ci/lint.gitlab-ci.yml
cmake/gmxManageSimd.cmake
cmake/gmxVersionInfo.cmake
docs/dev-manual/containers.rst
src/CMakeLists.txt
src/api/cpp/tests/testingconfiguration.h
src/buildinfo.h.cmakein
src/gromacs/CMakeLists.txt
src/gromacs/ewald/pme_only.cpp
src/gromacs/fileio/matio.cpp
src/gromacs/fileio/oenv.cpp
src/gromacs/gmxana/gmx_do_dssp.cpp
src/gromacs/gmxana/nrama.cpp
src/gromacs/gmxlib/network.cpp
src/gromacs/gmxlib/nonbonded/nb_free_energy.cpp
src/gromacs/listed_forces/bonded.cpp
src/gromacs/mdlib/forcerec.cpp
src/gromacs/mdtypes/interaction_const.h
src/gromacs/nbnxm/pairlist.h
src/gromacs/selection/CMakeLists.txt
src/gromacs/simd/impl_x86_avx_256/impl_x86_avx_256_simd_double.h
src/gromacs/simd/impl_x86_avx_256/impl_x86_avx_256_simd_float.h
src/gromacs/simd/simd.h
src/gromacs/utility/basedefinitions.h
src/gromacs/utility/binaryinformation.cpp
src/testutils/CMakeLists.txt
src/testutils/TestMacros.cmake
src/testutils/testasserts.h

Change-Id: Ie157786299ca8f2d8c77a148b3bf1b1061f44b8a

4 years agoFix copyright
Paul Bauer [Tue, 5 May 2020 06:56:33 +0000 (08:56 +0200)]
Fix copyright

Change-Id: I9d9953def7c31c2830de2452bb0678f1cad86969

4 years agoUnify CUDA and OpenCL lookup-table creation
Artem Zhmurov [Tue, 5 May 2020 06:37:33 +0000 (06:37 +0000)]
Unify CUDA and OpenCL lookup-table creation

In CUDA code, textures are used for the lookup-tables,
whereas in OpenCL they are created as a read-only
buffers. This commit hides these differences behind a
unified wrapper.

Refs #3318
Refs #3311

Change-Id: I003e0c982c2452a2753e331b46fc59f0b7e1b711

4 years agoFix cmake error: Mixed styles of target_link_libraries signatures
Paul Bauer [Mon, 4 May 2020 17:53:47 +0000 (17:53 +0000)]
Fix cmake error: Mixed styles of target_link_libraries signatures

Plain and keyword target_link_libraries signatures cannot be mixed.

Complete error message:

------------------->8---------------------------8<--------------------------
CMake Error at src/testutils/CMakeLists.txt:76 (target_link_libraries):
  The keyword signature for target_link_libraries has already been used with
  the target "testutils".  All uses of target_link_libraries with a target
  must be either all-keyword or all-plain.

  The uses of the keyword signature are here:

   * src/testutils/CMakeLists.txt:72 (target_link_libraries)

-- Configuring incomplete, errors occurred!
------------------->8---------------------------8<--------------------------

See: https://cmake.org/cmake/help/v3.0/policy/CMP0023.html

4 years agoUnify CUDA and OpenCL lookup-table creation
Artem Zhmurov [Mon, 4 May 2020 17:44:01 +0000 (17:44 +0000)]
Unify CUDA and OpenCL lookup-table creation

In CUDA code, textures are used for the lookup-tables,
whereas in OpenCL they are created as a read-only
buffers. This commit hides these differences behind a
unified wrapper.

Refs #3318
Refs #3311

Change-Id: I003e0c982c2452a2753e331b46fc59f0b7e1b711

4 years agoUse test conversion script from source
Paul Bauer [Wed, 29 Apr 2020 09:23:54 +0000 (09:23 +0000)]
Use test conversion script from source

No longer install the script to convert CTest results to JUnit and
instead use the files from the cloned git source for it.

Fixes #3514

Change-Id: Ida4f2ab563601153b0b218c9bc6b7cfdb4969f01

4 years agoFix incorrect header and linter scripts
Paul Bauer [Thu, 30 Apr 2020 12:03:15 +0000 (14:03 +0200)]
Fix incorrect header and linter scripts

Wrong grep flag meant that messages have not been printed.

Change-Id: I74b2088a12753d584929f9aa75ed915d400d8091

4 years agoCatch errors in v-rescale and Parrinello-Rahman checkpointing
Pascal Merz [Thu, 30 Apr 2020 19:49:14 +0000 (13:49 -0600)]
Catch errors in v-rescale and Parrinello-Rahman checkpointing

This adds additional tests to catch checkpoints missing the v-rescale
thermostat integral or the Parrinello-Rahman box velocities. This
also make the number of steps explicit (useful in further investigations
of #3518).

In partial fulfillment of #3518

4 years agoPrepare for 2020.3
Paul Bauer [Wed, 29 Apr 2020 09:34:53 +0000 (11:34 +0200)]
Prepare for 2020.3

Reset DOI strings.

Change-Id: I6b9d5772fcc9b4d8507817d09173dd2d5577dfdb

4 years agocmake: declare (and hence initialize) GMX_USE_SIMD_KERNELS before it is used
Gilles Gouaillardet [Thu, 30 Apr 2020 13:56:22 +0000 (22:56 +0900)]
cmake: declare (and hence initialize) GMX_USE_SIMD_KERNELS before it is used

Fixes gromacs/gromacs#3516

4 years agoGROMACS version 2020.2
Paul Bauer [Wed, 29 Apr 2020 09:31:53 +0000 (11:31 +0200)]
GROMACS version 2020.2

Update regressiontest hash.
Set DOI strings.

Change-Id: I708a1e340754d173b8c7ef47803e7fa525c9671a

4 years agoPrint base commit for source linters
Paul Bauer [Wed, 29 Apr 2020 12:47:58 +0000 (12:47 +0000)]
Print base commit for source linters

Added a printout for the branch used for comparing.

Will use to see if branch point selection is working properly and to see
if the clang-tidy script picks up the warnings it should.

Change-Id: I791d2a11f98cd8e0cf0d06e92a9980cd9d038874

4 years agoFix incorrect header and linter scripts
Paul Bauer [Thu, 30 Apr 2020 12:03:15 +0000 (14:03 +0200)]
Fix incorrect header and linter scripts

Wrong grep flag meant that messages have not been printed.

Change-Id: I74b2088a12753d584929f9aa75ed915d400d8091

4 years agoRemove bundled FindCUDA.cmake
Mark Abraham [Thu, 30 Apr 2020 11:28:39 +0000 (11:28 +0000)]
Remove bundled FindCUDA.cmake

We bundle FindCUDA so we can suppress warnings in CI testing. In user
space, we always use the FindCUDA from the cmake they used, because
the tarballs never had these files.

4 years agoDisallow combination of gcc > 9 and IBM_VSX
Paul Bauer [Thu, 30 Apr 2020 06:27:31 +0000 (08:27 +0200)]
Disallow combination of gcc > 9 and IBM_VSX

The compiler flag is not detected for newer versions of gcc and can lead
to confusing error messages.

Fixes #3380

Change-Id: I0c5311325b2bf2bc08ab727eabd670115720b4a6

4 years agoFix compiler flag reporting
Mark Abraham [Thu, 30 Apr 2020 09:24:00 +0000 (09:24 +0000)]
Fix compiler flag reporting

The C, C++ and CUDA compiler flag reporting didn't mention those added
by cmake from the build configuration, even those are always used.

Closes #3510

4 years agoUpdate header sorting.
M. Eric Irrgang [Fri, 24 Apr 2020 13:15:42 +0000 (16:15 +0300)]
Update header sorting.

* Add missing C++ standard library headers to includesorter.py
* Work around some logic errors in the way includesorter.py enforces
  the stated scoping of sorted include blocks. Document.
* Apply updated includesorter.py

Refs #3297