alexxy/gromacs.git
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 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 agoFix the number of steps check when checkpoint is loaded
Artem Zhmurov [Wed, 29 Apr 2020 12:10:20 +0000 (12:10 +0000)]
Fix the number of steps check when checkpoint is loaded

The check ignores the initial step in the config file, thust only
works when loading for the trajectory that was originally started
from step zero.

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 agoBaseline commit
Mark Abraham [Wed, 29 Apr 2020 08:27:37 +0000 (08:27 +0000)]
Baseline commit

This just checks that the pipeline failure in #3507 does reproduce
before I start changing things that matter.

4 years agoAdd clang WA
Roland Schulz [Sun, 26 Apr 2020 19:10:51 +0000 (12:10 -0700)]
Add clang WA

4 years agoFix MSVC 2019 test failures
Roland Schulz [Sun, 26 Apr 2020 07:58:56 +0000 (00:58 -0700)]
Fix MSVC 2019 test failures

Related #3495

4 years agoFix the removal of COM velocity in case of GPU update
Artem Zhmurov [Mon, 27 Apr 2020 19:21:58 +0000 (19:21 +0000)]
Fix the removal of COM velocity in case of GPU update

After the velocities are changed on the CPU to remove the COM motion,
they have to be copied back to the GPU memory.

Fixes #3508

4 years agoFix segmentation fault in do_dssp
Paul Bauer [Mon, 27 Apr 2020 11:46:33 +0000 (13:46 +0200)]
Fix segmentation fault in do_dssp

A matrix would be initial allocated with zero size, so that a
following call to increase the size of one element would lead to memory
corruption on a subsequent try to set a value in the matrix.

Fixes #3444

Change-Id: I1892c09a8aa4c2f92156f7b1a76623df9ac62e56

4 years agoBuild python package for documentation builds
Paul Bauer [Mon, 27 Apr 2020 07:31:47 +0000 (09:31 +0200)]
Build python package for documentation builds

Fixes #3506

Change-Id: If18ed44603d685118d4b73f2ee72401028574d61

4 years agoFix warning for return type
Paul Bauer [Mon, 27 Apr 2020 07:23:09 +0000 (09:23 +0200)]
Fix warning for return type

Fixes #3499

Change-Id: I648a4b3d35618fe7c41d406c98be291ca9bd0d2f

4 years agoFix bug in source verification on Windows
Paul Bauer [Fri, 24 Apr 2020 10:59:49 +0000 (12:59 +0200)]
Fix bug in source verification on Windows

The way to pass the set of directories to be used for validating the
source caused issues on Windows systems, as it replaced ":" characters
to change from strings to lists in CMake.

This caused the top level directory to be changed from e.g. "D:" to
"D;", messing up the rest.

Fixed the message passing to only pass the final directory, and modify
to full path after the set has been passed through.

Fixes #3493

Change-Id: I4076b8e87dc8d72a83af6aa0c7ab4b3366917ed0

4 years agoMove configuration of global headers
Mark Abraham [Sat, 25 Apr 2020 14:11:50 +0000 (16:11 +0200)]
Move configuration of global headers

Previously it was possible to get a different result from
  cmake .. && make && make install
than one got from
  cmake .. && cmake .. && make && make install
because the lmfit detection ran after config.h was generated,
so HAVE_LMFIT changed value from one cmake to the next, triggering
a rebuild of all source files that depended on config.h. lmfit
is supposed to fall back on the internal version, but did not,
so this is buggy. It's also very inefficient with compilation
in some workflows.

4 years agoFix copyright header
Paul Bauer [Sat, 25 Apr 2020 08:20:32 +0000 (10:20 +0200)]
Fix copyright header

Change-Id: Iab87aaf00ab6433a3fe616c4836595afa17c8907

4 years agoFix MSVC 2019 warnings
Roland Schulz [Sat, 25 Apr 2020 02:13:28 +0000 (19:13 -0700)]
Fix MSVC 2019 warnings

4 years agoUse branch point also for format and copyright check
Paul Bauer [Thu, 23 Apr 2020 20:24:50 +0000 (20:24 +0000)]
Use branch point also for format and copyright check

Change-Id: I16a9df11223426a40e6e138ee9f3793e700ae06e

4 years agoFix parallel testing
Paul Bauer [Fri, 24 Apr 2020 11:27:15 +0000 (11:27 +0000)]
Fix parallel testing

Change testing to be more robust in threaded setups.

Also change on merge test to use real MPI to make sure this works
correctly.

Change-Id: Id78b213291bf7cc225fc2564a23f0d85362467fd

4 years agoFix warnings for no-mpi build
Mark Abraham [Mon, 13 Apr 2020 05:23:00 +0000 (07:23 +0200)]
Fix warnings for no-mpi build

This build configuration gave warnings when combined with
clang-7 in the docs build.

Change-Id: Ic874769bcd627710798633be742dbbe80d78b791

4 years agoCopy of CI from master to 2020
Paul Bauer [Wed, 22 Apr 2020 06:52:14 +0000 (06:52 +0000)]
Copy of CI from master to 2020

Adjusted branches and build images.

Change-Id: I28d011a003119870c41e434cef623765ddc6ace1

4 years agoReintroduce LJ Ewald tables
Pascal Merz [Tue, 14 Apr 2020 15:42:37 +0000 (15:42 +0000)]
Reintroduce LJ Ewald tables

Fixes #3470 by reintroducing the LJ Ewald tables.

4 years agoFix line overrun in log file
Kevin Boyd [Wed, 8 Apr 2020 02:20:30 +0000 (19:20 -0700)]
Fix line overrun in log file

4 years agoFix expanded ensemble on checkpoint restarts
Pascal Merz [Fri, 3 Apr 2020 01:23:16 +0000 (19:23 -0600)]
Fix expanded ensemble on checkpoint restarts

Fixes #3465.

Also adds a release note, and sets StartingBehavior const in ISimulator
to make its behavior more obvious.

4 years agoFix minor bug with tools time-unit conversions
Mark Abraham [Wed, 1 Apr 2020 07:01:31 +0000 (07:01 +0000)]
Fix minor bug with tools time-unit conversions

Attempting to use output times of microseconds or longer
produced strange results, since a bug introduced a
decade ago in bc23d95b

4 years agoSet buffers appropriately so .xpm files can be read.
Mark Abraham [Mon, 30 Mar 2020 12:48:11 +0000 (12:48 +0000)]
Set buffers appropriately so .xpm files can be read.

Closes #3455

4 years agoFix release builds on Gitlab with regressiontests
Paul Bauer [Fri, 20 Mar 2020 07:03:11 +0000 (08:03 +0100)]
Fix release builds on Gitlab with regressiontests

Change-Id: Id6465d545d350b8c0d89aecd37d3568dca510d8b

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 now also allows running static analyzer.

Change-Id: I9b363858e48b6d451c9ee43346189f9ff27e4c47

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 agoFix DLB initial state reporting
Szilárd Páll [Thu, 5 Mar 2020 15:29:46 +0000 (16:29 +0100)]
Fix DLB initial state reporting

Missing entry in the array of state strings means that the initial "on"
and "auto" states were incorrectly reported.

Change-Id: Ibad25272d168894a6590b0050102ec02ba8171ed

4 years agoAdd required Infrastructure for Gitlab merges
Paul Bauer [Wed, 18 Mar 2020 10:19:35 +0000 (11:19 +0100)]
Add required Infrastructure for Gitlab merges

See test merge request here:
https://gitlab.com/gromacs/gromacs-testing/-/merge_requests/16

Also adds runs for regressiontests to normal CI.

Change-Id: I7bcb62cd3f2120f1d2e80b2f8a2ec1e328626902

4 years agoFix image mixup for GItlab doc builds
Paul Bauer [Wed, 18 Mar 2020 07:27:53 +0000 (08:27 +0100)]
Fix image mixup for GItlab doc builds

Change-Id: I1e8187b58abc52ca562d2f549a151b64ca497fd2

4 years agoDisable Ewald dipole correction without DD
Berk Hess [Mon, 16 Mar 2020 17:02:33 +0000 (18:02 +0100)]
Disable Ewald dipole correction without DD

Refs #3441

Change-Id: I492cd136b41e57b3e2198c1f0717177fb4d46a7c

4 years agoDistinguish Docker images for different release requirements.
M. Eric Irrgang [Fri, 6 Mar 2020 11:16:04 +0000 (14:16 +0300)]
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 with the major release number (2020).

Refs #3395

Change-Id: I917f511c8bc11c4cedf85943eb7388ce0d5f9740

4 years agocmake: use libsuffix on gmxapi as well
Christoph Junghans [Sat, 7 Mar 2020 23:33:40 +0000 (16:33 -0700)]
cmake: use libsuffix on gmxapi as well

Related to #3408

Change-Id: I2f5648321bdea1f1d564b738783092a709429fa8

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 agoAdd clang-tidy script
Paul Bauer [Fri, 21 Feb 2020 07:43:41 +0000 (08:43 +0100)]
Add clang-tidy script

Change-Id: I4e3ff318681b562c0941c88360d2381747348517

4 years agoFix seg fault caused by unintended GPU PME coordinate send
Alan Gray [Wed, 4 Mar 2020 15:02:36 +0000 (07:02 -0800)]
Fix seg fault caused by unintended GPU PME coordinate send

Avoids attempted communication when same rank has PME duty, fixing bug
introduced in ddbaf0b92c85b36e86d60c2cc515db86617cd57d.

Fixes #3409

Change-Id: Ice2ad2d0c17cff7b122a679a5f18dafc85e3075d

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

4 years agoFix nrdf with partial COMM removal
Berk Hess [Mon, 2 Mar 2020 10:15:51 +0000 (11:15 +0100)]
Fix nrdf with partial COMM removal

In the uncommon case where the center of mass motion is removed for
part of the system but not the whole system, the number of degrees
of freedom for the part without COMM removal would be incorrectly
lowered by 3.

Fixes #3406

Change-Id: I371bcfbbd6cf7ddddccb9234752128239bad356f

4 years agoFix too small pairlist buffer on Intel GPUs
Berk Hess [Mon, 2 Mar 2020 15:20:26 +0000 (16:20 +0100)]
Fix too small pairlist buffer on Intel GPUs

The pairlist buffer generated for Intel GPUs was slightly too small,
because it assumed a 4x4 atom-cluster pair kernel instead of 4x2.
This also fixes incorrect kernel setup messages in the log file.

Fixes #3407

Change-Id: I744f98a934b5d9f60e0708cb064571aa6e389c44

4 years agoRevert "Remove frozen atoms from VCM groups"
Paul Bauer [Mon, 2 Mar 2020 08:37:08 +0000 (09:37 +0100)]
Revert "Remove frozen atoms from VCM groups"

This reverts commit 3a93c3a8ed49d20b47aed181d98f64921b864a3d.

Reason for revert: Change is incorrect

Change-Id: I808655e109e1da7ce37a59c1d55dabd059a32bb7

4 years agoRemove frozen atoms from VCM groups
Paul Bauer [Thu, 27 Feb 2020 10:47:26 +0000 (11:47 +0100)]
Remove frozen atoms from VCM groups

Atoms are removed during preprocessing.

Also add release note missing for previous patch.

Fixes #2553

Change-Id: I4fd52d50a9ef3af4ed11f9b507902d4ac59ed487

4 years agoMerge branch release-2019 into release-2020
Paul Bauer [Fri, 28 Feb 2020 09:56:27 +0000 (10:56 +0100)]
Merge branch release-2019 into release-2020

Resolved Conflicts:
cmake/gmxVersionInfo.cmake
src/gromacs/ewald/pme.cpp
src/gromacs/gmxana/gmx_disre.cpp
src/gromacs/gpu_utils/gpu_utils.cu
src/gromacs/hardware/gpu_hw_info.cpp
src/gromacs/hardware/gpu_hw_info.h
src/gromacs/mdrun/rerun.cpp

Change-Id: I2a89270a1321a51e0bc25e2b6890245f562945a2

4 years agoDefine all CPU NB kernels
Paul Bauer [Thu, 27 Feb 2020 14:00:12 +0000 (15:00 +0100)]
Define all CPU NB kernels

Access to kernels that where not defined could otherwise lead to
undefined behaviour.

Fixes #2728

Change-Id: Ib014cfd0dbc46961eb4e6a81acb3e06d57c3df73

4 years agoMoves call to choose best performaing kernels to pme_gpu_reinit_atoms
Jonathan Vincent [Mon, 24 Feb 2020 14:26:20 +0000 (06:26 -0800)]
Moves call to choose best performaing kernels to pme_gpu_reinit_atoms

atoms.nAtoms is zero when pme_gpu_reinit is called, resulting in
the useOrderThreadsPerAtom and recalculateSplines always being set to false.

Refs #3189

Change-Id: I36d4be71565cfe8cd8e50fbe6cfe1035f3e15c8e

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

Set DOI strings.
Updated regressiontest hash.

Change-Id: If7c04fbd26756275daea1c252ef977a367669b42

4 years agoLoosen gmxapi stopsignaler test
Pascal Merz [Tue, 25 Feb 2020 07:15:45 +0000 (00:15 -0700)]
Loosen gmxapi stopsignaler test

Gmxapi stopsignaler test was checking whether simulations were stopped
on the step after a stop signal was set. This is true for the legacy
implementation, but only due to the exact order of instructions. The
StopSignalHandler does not guarantee to stop simulations at the next
NS step after a signal has been set, it promises to stop a simulation
at the next NS step after a signal has been communicated. This change
loosens the criterion to reflect this.

Further, this change
* Changes the numberOfTimesCalled() function to timeElapsedSinceStart(),
  also including a different treatment of the call before the restraint
  is ever called, to avoid misunderstandings.
* Adds a comment to explain the expectations validated by this test.

Fixes #3397

Change-Id: I2a3805a14c03d0ee12ebd21b5863c5243b1c3671

4 years agoUse legacy code path for t_graph (modular simulator)
Pascal Merz [Fri, 21 Feb 2020 01:11:13 +0000 (18:11 -0700)]
Use legacy code path for t_graph (modular simulator)

This change redirects simulations which will require a t_graph object
to the legacy code path. It also adds an assert to catch cases in which
the redirection would fail in a more graceful way.

Fixes #3389

Change-Id: I17a70e504c206b2798cd2439c0c0ff5d5cd112e3

4 years agoExtract and expose function to determine whether molecules are broken over PBC
Pascal Merz [Wed, 26 Feb 2020 23:19:29 +0000 (16:19 -0700)]
Extract and expose function to determine whether molecules are broken over PBC

This prevents code duplication in the child change I17a70e50. This
is pure refactoring with two exceptions:
* Checking for orientation restraints is changed from
    fcd->orires.nr
  to
    gmx_mtop_ftype_count(mtop, F_ORIRES)
  This allows to use this function before the force constant struct
  is built. An assert is added to make sure this never get out of
  sync (which would hint to something going very wrong somewhere else...)
* A `if(fplog){}` around a single GMX_LOG(mdlog.warning) was removed.

Change-Id: I6303c6b1cab86c57971a1486c892a1b122a446c6

4 years agoFix constraint contribution to dhdl (modular simulator)
Pascal Merz [Thu, 16 Jan 2020 08:13:05 +0000 (09:13 +0100)]
Fix constraint contribution to dhdl (modular simulator)

The contribution to dhdl from the constraints was not added under
modular simulator.

Refs #1255

Change-Id: I804f52eeb97a17ae0d233700203da1db33a54d54

4 years agoAvoid mdrun terminate due to GPU sanity check errors
Szilárd Páll [Fri, 25 Oct 2019 23:24:23 +0000 (01:24 +0200)]
Avoid mdrun terminate due to GPU sanity check errors

When a GPU is a exclusive or prohibited mode, early detection calls can
fail and as a result an mdrun run abort with an error, even if all GPU
offload is explicitly disabled by the user.
This change adds a status code to handle the case of devices being
unavailable.

Additionally, other errors may be encountered during the dummy kernel
sanity check (e.g. out of memory), but since the change that switches
to using launchGpuKernel() wrapper did not handle the exception in the
sanity checking, this can also abort a run even if the GPU in question
is not selected to be used.
This change adds code to catch the exception this and report the error
and avoid abort the run.

Fixes #3178 #3399

Change-Id: I0cdedbc02769084c172e4a42fe5c1af192007cec

4 years agoDocument NVIDIA OpenCL broken on Volta and Turing
Szilárd Páll [Wed, 26 Feb 2020 15:07:25 +0000 (16:07 +0100)]
Document NVIDIA OpenCL broken on Volta and Turing

Refs #3125

Change-Id: Id200c1092b279d45a97b98c6fe1d03c2ffb14fb0

4 years agoRemove outdated PME-GPU limitation in user guide
Szilárd Páll [Thu, 20 Feb 2020 18:20:26 +0000 (19:20 +0100)]
Remove outdated PME-GPU limitation in user guide

PME GPU is supported on all compatible GPU platforms and vendors.

Change-Id: I8b054825d4c6a2d030b87fe4b6a9be759911c9f6

4 years agoFix calculation of reciprocal terms in rerun
Pascal Merz [Tue, 25 Feb 2020 23:58:02 +0000 (16:58 -0700)]
Fix calculation of reciprocal terms in rerun

This at least temporarily fixes #3400.

Change-Id: I04d67d9bb3edbd66049573de71940e4bb7fa1ad4

4 years agoFix out of sync checkpoint files in simulations sharing state
Magnus Lundborg [Wed, 19 Feb 2020 12:17:14 +0000 (13:17 +0100)]
Fix out of sync checkpoint files in simulations sharing state

When multidir simulations share the state, the checkpoint files
of the different simulations should all be from the same step.
To ensure this, MPI barriers have been added before renaming
the checkpoint files from their temporary to their final names.
So now the contents can never be out of sync. In the worst, and
rather unlikely, case that something going wrong during renaming,
some checkpoint files could have temporary and some final names.

Refs #2440.

Change-Id: I88088abb726a36dbf9a9db2fa2eb4a46c3bf2cd7

4 years agoImprove GPU update tasks assignment consistency
Szilárd Páll [Fri, 24 Jan 2020 13:12:28 +0000 (14:12 +0100)]
Improve GPU update tasks assignment consistency

GPU update task assignment was not consistent with the assumptions and
supported features of the 2020 release and did not implement the correct
checks and fallback in cases where GPU update was decided to not be
supported. Specifically, this change makes sure that when separate PME
ranks are used, without direct GPU communication for PP-PME, GPU update
falls back to the CPU.

Fixes #3354

Change-Id: I7c9dd67cd8cf61f0201b626b8b7674917e3365a5

4 years agoAvoid integer overflow in dispersion correction
Paul Bauer [Fri, 21 Feb 2020 14:49:21 +0000 (15:49 +0100)]
Avoid integer overflow in dispersion correction

Index could become out of range and turn negative.

Fixes #3391

Change-Id: I91a8ea0ab01370fb972c02994e2b996284e1d06a

4 years agoDocument density-fit cross-correlation in .mdp options
Christian Blau [Tue, 25 Feb 2020 09:25:02 +0000 (10:25 +0100)]
Document density-fit cross-correlation in .mdp options

Add missing documentation about cross-correlation as
similarity measure for density-guided simulations.

Though documented in the reference manual, it was until now
not mentioned in the .mdp options.

Change-Id: I2a5a13ca6fb0a15e8c2ff1cba6a6edbe0182053d

4 years agoRevert "Expose vsite counting"
Paul Bauer [Mon, 24 Feb 2020 12:29:21 +0000 (13:29 +0100)]
Revert "Expose vsite counting"

This reverts commit 2078fd0619459bd533a94550d5754477dbbaabaa.

Not needed in fact.

Change-Id: I238d33e23e3b508ec0c77a5c43f67e5838950f34

4 years agoFix clang-6 image template
Paul Bauer [Sat, 22 Feb 2020 12:31:41 +0000 (13:31 +0100)]
Fix clang-6 image template

Overlooked this when merging 1093dfa9ba24329162179a3fcbcbb8c491ab9543.

Change-Id: I85d5b852ab5d565289d64dd21ade09dabd4115c4

4 years agoFixed bug in gmx disre due to inconsistency in input.
David van der Spoel [Mon, 17 Feb 2020 22:20:24 +0000 (23:20 +0100)]
Fixed bug in gmx disre due to inconsistency in input.

The gmx disre program used the labels in the distance restraint entries
(see manual) as an index in internal arrays. This might lead to either
memory errors or the program stopping due to uninitialized variables.

Fixes #3384

Change-Id: Ic2d77c3fd81547e030bf7ce21860a71e3adbb2b3

4 years agoUse legacy code path for NMR restraints (modular simulator)
Pascal Merz [Fri, 21 Feb 2020 00:34:04 +0000 (17:34 -0700)]
Use legacy code path for NMR restraints (modular simulator)

Fixes #3388

Change-Id: I03db8af35d71c7405716e73516c4235fc089334c

4 years agoCorrect for skewed box in non-DD modular simulator
Pascal Merz [Thu, 20 Feb 2020 21:15:56 +0000 (14:15 -0700)]
Correct for skewed box in non-DD modular simulator

In modular simulator, the correction for skewed boxes was only performed
when DD was active. This change makes sure it happens in all cases.
Also left a TODO to think about unifying the approach for the two cases
moving forward.

Fixes #3383
Refs #3392

Change-Id: I897dbc9e490bb1a1e465e711c66b47a29e214fd1

4 years agoAdd fatal error when multisim runs sharing state have different init_step
Berk Hess [Fri, 21 Feb 2020 10:36:04 +0000 (11:36 +0100)]
Add fatal error when multisim runs sharing state have different init_step

Refs #2440
Fixes #3990

Change-Id: I052cd53dc9517a3df53663e52720ee5a80ea65c0

4 years agoSimplify GitLab CI Dockerfiles.
M. Eric Irrgang [Wed, 25 Dec 2019 15:55:34 +0000 (18:55 +0300)]
Simplify GitLab CI Dockerfiles.

Consolidate some docker build instructions into distinct images for
the base dependencies, the various toolchains, and the docs build
environment. Combine Dockerfiles that only differ in toolchain version.

Total image size is prioritized over total build time by making all
apt-get layers include update, install, and cleaning in single RUN
commands, where intermediate layers are part of the tagged images.

Made images both for clang and gcc builds of the documentation.

Refs #3263

Change-Id: I55d6a128067f78214193223756db94a1964c491d

4 years agoFixed bug in orires code that was checking too strict.
David van der Spoel [Wed, 12 Feb 2020 13:53:33 +0000 (14:53 +0100)]
Fixed bug in orires code that was checking too strict.

Fixes #3375

Change-Id: I0f64b386477b9a72f18c95fd977ac8cf5dbeeccd

4 years agoFixed bug in orires code that was checking too strict.
David van der Spoel [Wed, 12 Feb 2020 13:53:33 +0000 (14:53 +0100)]
Fixed bug in orires code that was checking too strict.

Added one test to see that input is accepted.

Fixes #3375

Change-Id: I0f64b386477b9a72f18c95fd977ac8cf5dbeeccd

4 years agoFixed typo in GMXRC.csh.cmakein
David van der Spoel [Mon, 17 Feb 2020 15:22:52 +0000 (16:22 +0100)]
Fixed typo in GMXRC.csh.cmakein

A bashism crept into a csh file.

Refs #3381.

Change-Id: I2f11e027db2804ee850f93a2d18de8ad427abc8e

4 years agoFix gpuudpate and gpucomm matrix docs
Szilárd Páll [Fri, 14 Feb 2020 18:12:27 +0000 (19:12 +0100)]
Fix gpuudpate and gpucomm matrix docs

Improves the outdated documentation/description of the matrices
clarifying the use/role of these.

Also removed gpubufferops matrix which is not needed in the release
branch (the feature is automatically triggered when required by some
other features).

Change-Id: I097e1d6b150767a95b9d638b3c6031a24ece995f

4 years agoExpand test coverage of exact continuation tests
Pascal Merz [Thu, 13 Feb 2020 02:37:57 +0000 (19:37 -0700)]
Expand test coverage of exact continuation tests

The exact continuation tests were not covering the new
Parrinello-Rahman functionality of modular simulator, nor the
berendsen-berendsen NPT case using md-vv. This change fixes this.

Fixes #3377 (fixes point 4, last task on the list)

Change-Id: I3bcd072969259383dd1812d425dd7b3baee5bd85

4 years agoFix reading of checkpoints with Parrinello-Rahman (modular simulator)
Pascal Merz [Thu, 13 Feb 2020 02:32:36 +0000 (19:32 -0700)]
Fix reading of checkpoints with Parrinello-Rahman (modular simulator)

Using modular simulator, simulations using Parrinello-Rahman barostat
could not be read from checkpoint, throwing an error in the checkpoint
loading routine. While the legacy implementation of the P-R barostat
required the pressure at the previous step to be checkpointed, the
modular implementation does not require this. load_checkpoint is,
however, expecting this field to be present and throws an error.

This change fixes this by setting the globalState flags in dependence
of whether the modular simulator will be used, avoiding read_checkpoint
to expect this entry.

Note that tests ensuring this bug not to reappear are introduced in the
child change I3bcd0729.

Refs #3377 (fixes point 3)

Change-Id: If8afd294b8c79ceef66e71293d9d93cf2f7d0df8

4 years agoFix Parrinello-Rahman scaling on initial step (modular simulator)
Pascal Merz [Thu, 13 Feb 2020 02:09:13 +0000 (19:09 -0700)]
Fix Parrinello-Rahman scaling on initial step (modular simulator)

If Parrinello-Rahman scaling was requested on the first step, it was
not properly initialized. The setup routine would have correctly
(although non-obviously so) calculated the scaling matrix, but have
requested the propagator to use the scaling one step too late.

For new simulations, this never happens (since scaling happens on the
second step, not the first). It could, however, lead to slight
errors if restarting from a checkpoint occured exactly on a scaling
step. As restarting from Parrinello-Rahman simulations using modular
simulator was broken anyway, we can be sure that this has never
happened in practice.

This change fixes the bug, adds explanations of what happens on the
initial step, and makes the function calls more explicit (at the cost
of a very small amount of code duplication).

Refs #3377 (fixes point 2)

Change-Id: Ic3ba7ba078260a9d039d506fc0a87353f80d23dd

4 years agoMove modular simulator decision before checkpoint loading
Pascal Merz [Wed, 12 Feb 2020 23:58:57 +0000 (16:58 -0700)]
Move modular simulator decision before checkpoint loading

Currently, the decision on whether to use modular simulator is done
relatively late during the runner stage. This makes it impossible to
allow for different behavior at checkpoint loading time. The current
change therefore moves this decision before checkpoint loading time.
To achieve this, some adaptations were needed:

* Use gmx_mtop_interaction_count to determine whether virtual sites
  will be used before the respective object is created.
* The membrane embedding check via pointer is replaced by a boolean
  set earlier during the runner phase.
* The essential dynamics check was split to catch command line inputs
  during the runner phase, and mismatching checkpointing data during
  the simulator phase (mirroring legacy behavior in do_md()).
* Replace the ensemble restraint check by a low-level alternative
  for the early runner call (mimicking the distance restraint
  initialization), while keeping the current check for the
  simulator-level call. Note that as multi sims are disabled, this
  low-level test will effectively never fail, but the additional
  clarity is helpful in further development. The later test ensures
  that changes to the init_disres() don't make this check invalid -
  if they would ever get out of sync, the simulations would exit with
  a fatal error.

Refs #3377 (fixes point 1)

Change-Id: I635e033db51d6ecc8bf121c72730a121e04586dd

4 years agoFix checkNumberOfBondedInteractions bug
Pascal Merz [Tue, 11 Feb 2020 01:08:17 +0000 (18:08 -0700)]
Fix checkNumberOfBondedInteractions bug

When checkNumberOfBondedInteractions finds a missing interaction, the
program is not exiting because a function enclosed in a logging statement
starts a global reduction, but is only ever reached by master.

Fixes #3373

Change-Id: I9a0faa790595a7ea59db561a20246a76857435a1

4 years agoExpose vsite counting
Pascal Merz [Wed, 12 Feb 2020 22:33:39 +0000 (15:33 -0700)]
Expose vsite counting

This allows to check whether vsites are present before the
respective object is created.

Refs #3377 (prepares point 1)

Change-Id: I8273daf38d46e2f052573f48323b5b6137965e9f

4 years agoFix incorrect GPU update task assignment fallback
Szilárd Páll [Mon, 10 Feb 2020 18:30:22 +0000 (19:30 +0100)]
Fix incorrect GPU update task assignment fallback

This change fixes the incorrect fallback condition in the GPU update
task assignment. This also eliminates the assertion trigerred in do_md()
where the correct form of the check is asserted on.
Since the fallback path only triggers when the GPU update would be used by
default this only affected runs with GMX_FORCE_UPDATE_DEFAULT_GPU.

Change-Id: I8b2b506fa998b6ed5e6d6d8ae4b78e27006df199

4 years agoAvoid dev flags in triggering gpuupdate nightly matrix
Szilárd Páll [Fri, 24 Jan 2020 13:14:53 +0000 (14:14 +0100)]
Avoid dev flags in triggering gpuupdate nightly matrix

The GPU update release feature should be tested independenly from the
experimental features which were all enabled for the "gpuupdate" nightly
job. This change removes the GMX_GPU_DD_COMMS and GMX_GPU_PME_PP_COMMS
as well as the unnecessary buffer ops env var.

Refs #3354

Change-Id: I777f6996ca5b1ae1b3e7f787c18d82f605035e47

4 years agoAvoid (re)initializing GPU update without DD
Szilárd Páll [Tue, 28 Jan 2020 18:24:13 +0000 (19:24 +0100)]
Avoid (re)initializing GPU update without DD

Unless repartitioning happens the GPU update-constraints module's
expensive initialization only neeeds to be called once.

Fixes #3358

Change-Id: Ic2a147985da5907961a3e3277110bbae52e6cadc

4 years agoBug fix to avoid passing null object into cudaDestroyTextureObject
Alan Gray [Wed, 5 Feb 2020 17:18:34 +0000 (09:18 -0800)]
Bug fix to avoid passing null object into cudaDestroyTextureObject

In the initial dummy context creation sanity-check part of the
simulation, a null object is passed into this function. This can cause
runtime failures with certain versions of CUDA. This change only calls
the function when the object is non-null.

Change-Id: I8118f6086fa2227c8dc697e4634878a12fe3676f

4 years agoActually fix PME forces with FE without perturbed q/LJ
Berk Hess [Mon, 3 Feb 2020 10:26:50 +0000 (11:26 +0100)]
Actually fix PME forces with FE without perturbed q/LJ

PME would incorrectly ignore the mesh forces on perturbed atoms when
no charges or LJ atom types were actually perturbed.
This is because the "fix" in commit 12f01f79 incorrectly changed the
lambda value used for the PME forces from the actual lambda value
to 1 instead of to 0 as it should have been.

Fixes #2640
Fixes #3359

Change-Id: Ib19565bf017ddbd2fddc66c52be0ff9efc7e707c

4 years agoActually fix PME forces with FE without perturbed q/LJ
Berk Hess [Mon, 3 Feb 2020 10:26:50 +0000 (11:26 +0100)]
Actually fix PME forces with FE without perturbed q/LJ

PME would incorrectly ignore the mesh forces on perturbed atoms when
no charges or LJ atom types were actually perturbed.
This is because the "fix" in commit 12f01f79 incorrectly changed the
lambda value used for the PME forces from the actual lambda value
to 1 instead of to 0 as it should have been.

Fixes #2640
Fixes #3359

Change-Id: Ib19565bf017ddbd2fddc66c52be0ff9efc7e707c

4 years agoWorkaround for Gitlab archive size
Paul Bauer [Thu, 23 Jan 2020 10:11:09 +0000 (11:11 +0100)]
Workaround for Gitlab archive size

Refs #3361

Change-Id: Ie1911501ce45a67d412b60aede7335b0acd3a786

4 years agoFix deadlock in PP-PME balancing startup delay
Szilárd Páll [Wed, 22 Jan 2020 16:07:01 +0000 (17:07 +0100)]
Fix deadlock in PP-PME balancing startup delay

The condition whether load balancing should start included a per-rank
computed fixed time-delay. Therefore different ranks could evaluate this
condition differently resulting in a deadlock.
This change fixes the deadlock by broadcasting the result of the time
delay check.

Fixes #3335

Change-Id: I39ebc7e99483a6837bdbd79e312148384c1966b3

4 years agoUse utf-8 for python file reading
Paul Bauer [Tue, 14 Jan 2020 07:01:30 +0000 (08:01 +0100)]
Use utf-8 for python file reading

Avoids crashing on non-ascii characters

Also needed in release-2020 due to https://gitlab.com/gromacs/gromacs/pipelines/111716110

Change-Id: Ie489110bbe37619d36f8feb739e04ef60cccff16

4 years agoFix DD rank count prime check
Berk Hess [Wed, 22 Jan 2020 21:26:51 +0000 (22:26 +0100)]
Fix DD rank count prime check

The domain decomposition would refuse to run with large prime factors
in the MPI rank count even when the grid was specified by the user.

Fixes #3336

Change-Id: I92f20ce18f314db68890650e76741b0ee70c05df

4 years agoFix a couple of commas in cool quotes
Artem Zhmurov [Thu, 23 Jan 2020 09:58:53 +0000 (10:58 +0100)]
Fix a couple of commas in cool quotes

A couple of commas between the quotes and their authors went missing.
Due to a random nature of cool quotes, I am not sure if this have
any consequences.

Change-Id: Ifb79557efc3fd3d8d75dd0a6566cccc7e5a43ea4

4 years agoFix PME checks in GPU update assignment decision
Gaurav Garg [Fri, 10 Jan 2020 17:29:17 +0000 (22:59 +0530)]
Fix PME checks in GPU update assignment decision

The decideWhetherToUseGpuForUpdate() function performed a check on
whether PME is on GPU, but neglected to check if PME is actually
active. Therefore, cases without PME (e.g. reaction field) were
unintentionally being prevented from running update on GPU. This change
adds a check whether pmeRunMode != PmeRunMode::None

Change-Id: Ic49f99b2e2afddabd7e2c8e68ab3d6d9325dc07a

4 years agoFix illegal memory access in PME communication
Berk Hess [Wed, 22 Jan 2020 10:53:24 +0000 (11:53 +0100)]
Fix illegal memory access in PME communication

Depending on the compiler, mdrun could exit with an illegal
memory access error when a PME rank communicates 0 atoms with
another PME rank.

Change-Id: Ic1a08903f53c3d0b655ed5475ad99024979b461e

4 years agoClarify COMM/posres grompp note
Berk Hess [Tue, 21 Jan 2020 21:05:31 +0000 (22:05 +0100)]
Clarify COMM/posres grompp note

In the common case of equilibrating a macro-molecule using position
restraints, grompp will issue a note about COMM removal when using
default mdp settings. Added a sentence that says that it is likely
not an issue in this common case.

Change-Id: Ide8b75664c4da3789c6661d8d69f855f9abea4e0

4 years agoFix documentation error with doxygen >1.8.16
Paul Bauer [Mon, 20 Jan 2020 14:48:19 +0000 (15:48 +0100)]
Fix documentation error with doxygen >1.8.16

Fixes #3280

Change-Id: Ia41e080ea5ee4bc393d1e0240fc56958d81f6c68

4 years agoActually fix Gitlab doc build
Paul Bauer [Fri, 17 Jan 2020 11:54:26 +0000 (12:54 +0100)]
Actually fix Gitlab doc build

Was still failing after 658765317fd94df5d534c039462be03ab3839067 got
merged.

Actually fixes #3278

Change-Id: I747fe5c677864d1f50ab97d0eda38c68a6085b45

4 years agoFix bad link in developer docs
Paul Bauer [Thu, 16 Jan 2020 17:50:25 +0000 (18:50 +0100)]
Fix bad link in developer docs

Also made sure that error gets caught by the Gitlab CI runner.

Fixes #3278

Change-Id: I36b73a4322c69242eef3dcefa6684ef973b1bd01