alexxy/gromacs.git
5 years agoImproved diagnostics when PME cannot run on GPUs
Mark Abraham [Thu, 14 Feb 2019 16:01:25 +0000 (17:01 +0100)]
Improved diagnostics when PME cannot run on GPUs

Fixes #2789, #2823

Change-Id: Iff7609a3774c11329d36bd8557b741a4d29f7c5a

5 years agoFix tune_pme
Paul Bauer [Thu, 14 Feb 2019 15:38:09 +0000 (16:38 +0100)]
Fix tune_pme

There was an issue with the file option for the tpr file being empty
that caused a segmentation fault.

Fixes #2827

Change-Id: I2702898d071d6e9325fa2e7ebb223b9043b7109e

5 years agoFix mass Delta H double counting
Berk Hess [Wed, 13 Feb 2019 08:55:35 +0000 (09:55 +0100)]
Fix mass Delta H double counting

With separate mass lambda parameters, the perturbed mass contribution
to Delta H (not dH/dlambda) was double counted. This was due to an
incorrect fix for issue #2703 for missing Delta H contribution.

Refs #2703
Fixes #2849

Change-Id: I1349260e1e90a17a6b7dbe0d239d9474dcfa928c

5 years agoExtend performance considerations on bonded offload
Szilárd Páll [Fri, 15 Feb 2019 01:09:39 +0000 (02:09 +0100)]
Extend performance considerations on bonded offload

Refs #2793

Change-Id: I4a8ae8554cf2aad540eb4eb485898f8cabeb3966

5 years agoFix use of selections referring to index groups
Mark Abraham [Tue, 29 Jan 2019 11:56:31 +0000 (12:56 +0100)]
Fix use of selections referring to index groups

Selections that refer only to groups in an index file do not require a
topology file. This (and other behaviours) was inadvertently broken
by the wrong implementation of the default constructor, because that
constructor is used in setting up the analysis environment.

The default constructor of TopologyInformation should establish the
intended invariant, namely that until a topology is loaded, topology
getters should return nullptr.

Fixed that constructor, and fixed the unit test that verifies that
behaviour. Since that test was added at the same time as a change to
the implementation of TopologyInformation in commit 264458c9, the
broken invariant wasn't noticed.

Added a test also to gmx rdf that verifies that the selection
behaviour is fixed.

Fixes #2847

Change-Id: I2149616e0248c6d5cdd5657a8292d2c3346614b9

5 years agoRevert changes to implementation of insert-molecules and solvate
Mark Abraham [Wed, 13 Feb 2019 14:24:04 +0000 (15:24 +0100)]
Revert changes to implementation of insert-molecules and solvate

This is a partial reversion of 5181f8d1, which made an inappropriate
dependency from preparation tools to TopologyInformation, which is
intended for analysis tools. This is needed in order to fix some
actual analysis tools that were broken by related changes to
TopologyInformation.

Unfortunately in 5181f8d1 readConformation was replaced with
TopologyInformation, and the former is no longer available. Instead,
readConfAndTopology is used in the same way that it was originally
used to implement readConformation. So the behaviour is reverted
even though the code looks different.

Refs #2847, #1862

Change-Id: I6e4900eea38b5c2e1b85b0d48427dabe26b09f9d

5 years agoImproved electric-field docs
Mark Abraham [Wed, 13 Feb 2019 17:44:26 +0000 (18:44 +0100)]
Improved electric-field docs

Change-Id: Ib1c6aa260f54a3933b1d80e375dc6ee007317473

5 years agoDisable instruction fusion on Power8
Szilárd Páll [Thu, 7 Feb 2019 13:12:17 +0000 (14:12 +0100)]
Disable instruction fusion on Power8

The -mpower8-fusion flag seems to be the source of incorrect code; not
confirmed, but likely a codegen issue that also affects Power9 with the
similar flag used.

Fixes #2747 #2746 #2734

Change-Id: I56f50e54db47f4fe30c42488f4c4f79ac474518a

5 years agoMove simulated tempering default setting
Paul Bauer [Tue, 5 Feb 2019 14:55:55 +0000 (15:55 +0100)]
Move simulated tempering default setting

Setting the default value for the simulated tempering when nstexpanded
was not specified in the mdp file was done before the values for the
temperature coupling are known. Moved this to a new location where the
value is known instead.

Added message to user in this case.

Refs #2754

Change-Id: I194829d5a817019da6d63a075e0dd7f4af8a4735

5 years agoDisallow rerun with perturbed masses or constraints
Berk Hess [Fri, 8 Feb 2019 09:57:48 +0000 (10:57 +0100)]
Disallow rerun with perturbed masses or constraints

Since rerun no longer integrates, free-energy contributions due to
changing masses and constraints are no longer computed. Now rerun
exits with a fatal error when such a system is provided.

Fixes #2849

Change-Id: Ic1550fce22f68c573b52d6895e1e61398b671e51

5 years agoRequire a 64-bit platform for OpenCL
Szilárd Páll [Sun, 6 Jan 2019 10:51:26 +0000 (11:51 +0100)]
Require a 64-bit platform for OpenCL

GROMACS requires a 64-bit OpenCL implementation as the PME code assumes
8-byte size cl_mem. Therefore, we require a 64-bit platform,
where pointers and therefore cl_mem will be of the assumed size.

Fixes #2821

Change-Id: I5fa60419a948e2cfdb344e7611b197550f866262

5 years agoFix segfault with EM, DD and group scheme
Berk Hess [Wed, 6 Feb 2019 12:39:55 +0000 (13:39 +0100)]
Fix segfault with EM, DD and group scheme

Resetting to an old DD state during EM would leave the cg sorting array
used with the group scheme in an invalid state. This could cause
out of bounds vector access one DD step after rejecting an EM step.

When merging this into master branch, prefer to change to use ssize
rather than the static_cast.

Fixes #2813

Change-Id: I7f13b46d7ff5352ce41838b813c46f2e90c93b1c

5 years agoFix incorrect LJ repulsion force switching on GPUs
Berk Hess [Thu, 31 Jan 2019 21:47:53 +0000 (22:47 +0100)]
Fix incorrect LJ repulsion force switching on GPUs

When using a CUDA or OpenCL GPU, the coefficient for the second order
term for the LJ repulsion in the force (not energy) switching function,
called 'A' in the manual, had the wrong sign in both the force-only
kernels and the force+energy kernels.
Note that the dispersion force switching was correct.

Fixes #2845

Change-Id: Ib5c250a1f370d4c0a4fd652bf6efa03e70e18748

5 years agoMerge remote branch release-2018 into release-2019
Mark Abraham [Wed, 30 Jan 2019 12:30:19 +0000 (13:30 +0100)]
Merge remote branch release-2018 into release-2019

Change-Id: Ie5a4add2fe010bc94c00418a728f01d3aac6cb9d

5 years agoFix double-increment of GPU NB launch subcounter
Szilárd Páll [Tue, 29 Jan 2019 14:49:18 +0000 (15:49 +0100)]
Fix double-increment of GPU NB launch subcounter

Only increment once per nonbonded task per step.

Fixes #2837

Change-Id: Ic68bf1af184f895f2fb769b026855fd3d48fa849

5 years agoFix release notes issue links
Mark Abraham [Wed, 30 Jan 2019 08:23:04 +0000 (09:23 +0100)]
Fix release notes issue links

The space means sphinx can't recognize the construct

Change-Id: I8c25114a1f45a7744345e2e8bc6862fdd4568f5f

5 years agoFix release notes issue links
Mark Abraham [Wed, 30 Jan 2019 08:20:31 +0000 (09:20 +0100)]
Fix release notes issue links

The space means sphinx can't recognize the construct

Change-Id: Ia0b96e8a1ecd24e2bac97d7bc9f176abbe30abc9

5 years agoAvoid warnings with Apple Clang
Teemu Murtola [Tue, 29 Jan 2019 07:05:44 +0000 (08:05 +0100)]
Avoid warnings with Apple Clang

The logic for -Wno-missing-prototypes for group kernels left the
warning enabled for Apple Clang, making it impossible to compile
the code with -Werror.

Change-Id: Ib9a0e23bd47f8cc1dd8f656aae49ba27bbf9b28b

5 years agoStop trying to check nvcc on Windows
Mark Abraham [Thu, 10 Jan 2019 09:14:40 +0000 (10:14 +0100)]
Stop trying to check nvcc on Windows

The execute_process() call used in this check is not constructed to
work on Windows, so we should not run it there.

Refs #1616

Change-Id: I2103b78203f71d3f68b54898dd03c8fe0eb0fa4c

5 years agoWork-around for ICC bug in simd-tests
Roland Schulz [Thu, 24 Jan 2019 23:42:55 +0000 (15:42 -0800)]
Work-around for ICC bug in simd-tests

Only affects test harnest so isn't critical but confuses users
with false positive unit test.

Change-Id: Ida7f8f1dbc8da32bb960d5fa3550531a94cc2dab

5 years agoChange gcov to run on bs-mic
Paul Bauer [Wed, 23 Jan 2019 14:37:15 +0000 (15:37 +0100)]
Change gcov to run on bs-mic

Final change needed to decommission bs-mac.

Change-Id: Iaf0011906fae672b83af1d3631f8d698a0d9f52d

5 years agoMerge release-2018 into release-2019
Roland Schulz [Wed, 23 Jan 2019 17:22:37 +0000 (09:22 -0800)]
Merge release-2018 into release-2019

Change-Id: Ifb898eb777bc2986d600cdbf190203dda3f441ec

5 years agoChange gcov to run on bs-mic
Paul Bauer [Wed, 23 Jan 2019 14:37:15 +0000 (15:37 +0100)]
Change gcov to run on bs-mic

Final change needed to decommission bs-mac.

Change-Id: Iaf0011906fae672b83af1d3631f8d698a0d9f52d

5 years agoFix error with 2D/3D DLB
Berk Hess [Wed, 23 Jan 2019 09:29:55 +0000 (10:29 +0100)]
Fix error with 2D/3D DLB

With 2D or 3D dynamic domain decomposition with dynamic load balancing,
mdrun would exit with a fatal error when a cell size was limited.
This bug was introduced in commit 49367d45.

Fixes #2830

Change-Id: If36fcc2ddbb45c0855c78a2767b1d8562584b76f

5 years agoPrepare for 2018.6
Paul Bauer [Mon, 21 Jan 2019 08:47:44 +0000 (09:47 +0100)]
Prepare for 2018.6

Change-Id: Ie71adbecb99819aae1ba87c6f886d44a97958165

5 years agoVersion 2018.5
Paul Bauer [Mon, 21 Jan 2019 08:10:11 +0000 (09:10 +0100)]
Version 2018.5

Added release notes for commits that missed them.

Updated regressiontest hash.

Change-Id: I335988ed2b9c7a371e76dda7f7272eb30fe71a03

5 years agogmxManageLmfit.cmake: enforce usage of 7.0
Christoph Junghans [Thu, 3 Jan 2019 10:39:04 +0000 (03:39 -0700)]
gmxManageLmfit.cmake: enforce usage of 7.0

LMFIT_FOUND will also be true for version lower than 7.0, so we
need to check the version explicitly in gmxManageLmfit.cmake.

Change-Id: Ia3ae12b3a74d2b567432f5ef18a77c13b19cdb85

5 years agoAdd CUDA CC 7.5 (Turing) support with nvcc
Szilárd Páll [Fri, 21 Dec 2018 19:17:33 +0000 (20:17 +0100)]
Add CUDA CC 7.5 (Turing) support with nvcc

Left commented out code for clang native CUDA build flag generation as
current clang (7.0) does not support sm_75.

Fixes #2814

Change-Id: Ie59c8c887e9d81d7a65136e0445291fd718c88dc

5 years agoFix trjconv -ndec
Mark Abraham [Fri, 4 Jan 2019 17:07:57 +0000 (18:07 +0100)]
Fix trjconv -ndec

This only works with XTC writing, but the documentation
and implementation was wrong. That mean that the terminal
feedback to the user was also wrong when writing a .gro file.

Fixes #2824
Refs #2037

Change-Id: I9f047d0b1042fa37e366ee8c99dabbb1f3458b0a

5 years agoDisabled internal clFFT when using MSVC with OpenCL
Mark Abraham [Thu, 10 Jan 2019 10:41:37 +0000 (11:41 +0100)]
Disabled internal clFFT when using MSVC with OpenCL

We require clFFT for OpenCL support, and MSVC 2017. But clFFT only
supports MSVC 2010, and a user has reported that that clFFT does not
compile. As we have not provided for clFFT support to be disabled at
configure time (nor taught mdrun that it might not be able to run PME
on an OpenCL GPU in this case), it is simplest to withdraw support for
this corner case until clFFT support for modern MSVC is available.

Fixes #2500

Change-Id: I736501234cfd51bc1cee5d8a71cb1fb343ddd100

5 years agoImprove nvcc error reporting
Mark Abraham [Thu, 10 Jan 2019 09:07:59 +0000 (10:07 +0100)]
Improve nvcc error reporting

When nvcc fails, tell the user about both standard error and standard
output. The former code was broken if _cuda_test_err would be
undefined, and reported by a user (see the link at Redmine #2500).

Change-Id: Id16d2ff1bd1033cd23e82687b79409ea8d841131

5 years agoMigrate test configuration off bs_mac
Mark Abraham [Tue, 15 Jan 2019 12:16:20 +0000 (13:16 +0100)]
Migrate test configuration off bs_mac

Change-Id: I4b1014916397c31cbeacb01ac8bad771e09277c8

5 years agoFix memory leak in solvate
Paul Bauer [Wed, 16 Jan 2019 17:00:27 +0000 (18:00 +0100)]
Fix memory leak in solvate

Change-Id: Id74c2e4fe728b3b4b47d99c3ec8a55db44c5d8b7

5 years agoImprove portability of PME on GPU code
Mark Abraham [Thu, 10 Jan 2019 08:54:26 +0000 (09:54 +0100)]
Improve portability of PME on GPU code

Refs #2500

Change-Id: Id1069b0ad60a9af18b4882ec56364b073c871ebe

5 years agoUse label to select doxygen version
Teemu Murtola [Sun, 23 Dec 2018 19:17:19 +0000 (20:17 +0100)]
Use label to select doxygen version

Cherry-picked from commit 67837955db4b8c8553efdb8887a589e77e934cfb.
Allows retiring support for the old mechanisms in releng earlier.

Change-Id: Ic5276e846867e1dd77250500dcb8693946258e0c

5 years agoFix typo in release notes
Mark Abraham [Fri, 11 Jan 2019 12:55:27 +0000 (13:55 +0100)]
Fix typo in release notes

Change-Id: Ie104808c9e60c892ba9b3a089f19067e023351e2

5 years agoAdd more checks for division by zero
Mark Abraham [Thu, 10 Jan 2019 09:59:31 +0000 (10:59 +0100)]
Add more checks for division by zero

The rotation code was still vulnerable to numerical coincidences of
atom positions and slab centers.

Refs #1587
Refs #1431

Change-Id: If7928825d74226a5b25ed3441e6b6dbdf004115a
(cherry picked from commit 5023601307ea4a905e19d83113c2ac43aaf0d71e)

5 years agoFix gcc-8 release warnings in tng_io
Berk Hess [Mon, 7 Jan 2019 14:17:10 +0000 (15:17 +0100)]
Fix gcc-8 release warnings in tng_io

Removed the gcc -WFormat-overflow flag, as this is expected to mostly
generate false postives (fixed one false positive in tng_io.c).

Change-Id: I56bf76d2f3b43e54566137047a43d946d6b6e7d3

5 years agoFix trjconv -ndec
Mark Abraham [Fri, 4 Jan 2019 17:07:57 +0000 (18:07 +0100)]
Fix trjconv -ndec

This only works with XTC writing, but the documentation
and implementation was wrong. That mean that the terminal
feedback to the user was also wrong when writing a .gro file.

Fixes #2824
Refs #2037

Change-Id: I9f047d0b1042fa37e366ee8c99dabbb1f3458b0a

5 years agoSimplify reporting of GPU selection
Mark Abraham [Fri, 4 Jan 2019 17:19:04 +0000 (18:19 +0100)]
Simplify reporting of GPU selection

It is no longer clear to users whether mdrun -gpu_id 0 is
auto-selection or user-selection, since the user has restricted the
range from which auto-selection takes place. It is simpler and less
confusing to report simply that some were selected.

Fixes #2825

Change-Id: I0c8f0c50f6c5e90d86469c6005a61e43b29eb260

5 years agoRemove DOI entries when not on release patch
Paul Bauer [Mon, 7 Jan 2019 10:20:00 +0000 (11:20 +0100)]
Remove DOI entries when not on release patch

Forgot this when uploading the 2019.1 preparation patch.

Change-Id: Ib195a6fc5ed11d778f086f4604a323ab625942c2

5 years agoFix formatting warning
Szilárd Páll [Wed, 2 Jan 2019 21:37:43 +0000 (22:37 +0100)]
Fix formatting warning

Some compilers warn if format string does not contain format arguments.

Refs #2821

Change-Id: If71b4eaa61fa5f2400d7f4f706cfe59c1c5d8df8

5 years agogmxManageLmfit.cmake: enforce usage of 7.0
Christoph Junghans [Thu, 3 Jan 2019 10:39:04 +0000 (03:39 -0700)]
gmxManageLmfit.cmake: enforce usage of 7.0

LMFIT_FOUND will also be true for version lower than 7.0, so we
need to check the version explicitly in gmxManageLmfit.cmake.

Change-Id: Ia3ae12b3a74d2b567432f5ef18a77c13b19cdb85

5 years agoFix segmentation fault in DD code
Berk Hess [Thu, 3 Jan 2019 13:18:33 +0000 (14:18 +0100)]
Fix segmentation fault in DD code

mdrun could exit with a segmentation fault in DD when DLB was disabled.

Fixes #2813

Change-Id: Ie20ca1995c93fa74f41d8db5becfce1cb20348a3

5 years agoDo not whitelist the use of OpenCL 1.1 API
Szilárd Páll [Mon, 31 Dec 2018 15:19:33 +0000 (16:19 +0100)]
Do not whitelist the use of OpenCL 1.1 API

We neither support nor use OpenCL 1.1 API calls.

Change-Id: Ia73b8d8cc61ad6a56a5a56a72d26459be8f56267

5 years agoPrepare for 2019.1
Paul Bauer [Mon, 31 Dec 2018 11:26:26 +0000 (12:26 +0100)]
Prepare for 2019.1

Change-Id: Ibdf643605a1fb6e7054d39a35f1a90b794bd5c3e

5 years agoGROMACS 2019 release
Paul Bauer [Fri, 14 Dec 2018 13:43:01 +0000 (14:43 +0100)]
GROMACS 2019 release

Updated regressiontest hash and added release information in docs.

Change-Id: I69baae6982b58b73161166f9d2c3a397b7efa8b0

5 years agoFix release notes typo
Szilárd Páll [Mon, 31 Dec 2018 15:24:46 +0000 (16:24 +0100)]
Fix release notes typo

Change-Id: Ib8c390f643512e30299db2319b12bb0bdb78815d

5 years agoAdd CUDA CC 7.5 (Turing) support with nvcc
Szilárd Páll [Fri, 21 Dec 2018 19:17:33 +0000 (20:17 +0100)]
Add CUDA CC 7.5 (Turing) support with nvcc

Left commented out code for clang native CUDA build flag generation as
current clang (7.0) does not support sm_75.

Fixes #2814

Change-Id: Ie59c8c887e9d81d7a65136e0445291fd718c88dc

5 years agoOnly report intra-sim communication with multiple ranks
Kevin Boyd [Tue, 25 Dec 2018 01:46:48 +0000 (20:46 -0500)]
Only report intra-sim communication with multiple ranks

Fixes #2807

Change-Id: I01bec8cf9983dc37cd5ad8f29031073c31b2a384

5 years agoMerge branch release-2018 into release-2019
Paul Bauer [Mon, 31 Dec 2018 09:53:50 +0000 (10:53 +0100)]
Merge branch release-2018 into release-2019

Final merge before release of 2019.

Change-Id: I19963b7248095b2f9b6f6425e756218eb82afb93

5 years agoDocument OpenCL timer issue.
Paul Bauer [Fri, 21 Dec 2018 15:04:34 +0000 (16:04 +0100)]
Document OpenCL timer issue.

Refs #2689

Change-Id: I03964cc239aa423713793f5bd0e38d8afe19b0da

5 years agoFix mdrun -nb GPU on non-gpu builds
Paul Bauer [Fri, 21 Dec 2018 13:03:03 +0000 (14:03 +0100)]
Fix mdrun -nb GPU on non-gpu builds

Added function to check if build supports GPU for nonbonded.

Fixes #2812

Change-Id: I7f907d402dcd7c9f8964d42412125c23c0615909

5 years agoRuntime check of device OpenCL support
Szilárd Páll [Tue, 13 Mar 2018 21:40:40 +0000 (22:40 +0100)]
Runtime check of device OpenCL support

This change adds a runtime check of the OpenCL device version support
against the minimum requirement along some minor refactoring.

Fixes #2450

Change-Id: I0622d8f93b97d877d40fbaa65194f0db8442ffd5

5 years agoFix unused parameter warning
Mark Abraham [Sat, 22 Dec 2018 05:31:23 +0000 (06:31 +0100)]
Fix unused parameter warning

bs_mac sometimes doesn't find gettimeofday, and in any
case we should never have such a warning.

Change-Id: Ib425495ef05f4c40f920fa8285cb43c2e6292e57

5 years agoAdd a sanity check for OpenCL devices
Aleksei Iupinov [Tue, 27 Feb 2018 11:20:14 +0000 (12:20 +0100)]
Add a sanity check for OpenCL devices

Introduced some type traits to support RAII types for OpenCL handles,
so that we can safely free resources when responding to OpenCL API
error codes, and do so with usefully descriptive error messages.

The new infrastructure is used to implement a check that an OpenCL GPU
can execute a dummy kernel.

Fixed some broken docs, and updated some function naming for new
style.

Fixes #2420

Change-Id: Id99786d24f77b4b56669b5cfcd3a39aa0116cfca

5 years agoMissing factor of 2 in cos-acceleration
Jiannan Liu [Wed, 19 Dec 2018 00:08:19 +0000 (19:08 -0500)]
Missing factor of 2 in cos-acceleration

The bug was introduced in commit 69470fc4e9fd990eb53b22c17dc7a699c583d126

Last working version is 2016.5

Affected 2018 and 2019

Fixes #2572

Change-Id: Ibad31b0d8cec7c5f4b77a73b1fbab0ff114b50b6

5 years agoMake jenkins own-fftw verify use local tarball
Szilárd Páll [Mon, 17 Dec 2018 21:30:07 +0000 (22:30 +0100)]
Make jenkins own-fftw verify use local tarball

We should not bombard the FFTW servers with downloads, plus these can be
relatively slow too, so use our local ftp server instead.

Change-Id: Id6ccebf0ac1ae6410cd4f7f13f2ff76d275af5d2

5 years agoFix CUDA compiled target-device compatibility check
Szilárd Páll [Tue, 18 Dec 2018 00:43:10 +0000 (01:43 +0100)]
Fix CUDA compiled target-device compatibility check

The check that should catch cases where the binary does not contain
suitable code for the otherwise supported GPU architecture was
erroneously called from the initialization which is too late to
actually trigger it as the error that is meant to prevent will be
already triggered when the sanity checker tries to launch the dummy
kernel.
This change moves the check in question into the sanity checking and
keeps the fatal error as this is a rare condition that's unexpected
and typically a result of a misconfiguration at GROMACS build time.

Fixes #2811

Change-Id: I3762f51077a7c7c80b533860758bbab385b8a1fe

5 years agoCorrect CUDA compatibility check
Szilárd Páll [Mon, 17 Dec 2018 23:57:25 +0000 (00:57 +0100)]
Correct CUDA compatibility check

The CUDA compatibility check became ineffective after the deprecation of
Fermi as it could not detect and flag these GPUs correctly as
"incompatible" but instead was throwing a kernel execution error when
trying to launch the sanity checker kernel.

This change does the minimal necessary corrections for the now
deprecated Fermi arch to be correctly detected. As expected, CPU
fallback can now automatically selected (unless the user request a GPU).

Minor refactoring was also necessary, but was kept at minimum.

Fixes #2810

Change-Id: I81bf12cca43a2a5e16d48d9faf4b9fc9627e4452

5 years agoMerge "Merge branch release-2018 into release-2019" into release-2019
Szilárd Páll [Thu, 20 Dec 2018 17:02:33 +0000 (18:02 +0100)]
Merge "Merge branch release-2018 into release-2019" into release-2019

5 years agoRestrict number of OpenMP threads during testing.
M. Eric Irrgang [Mon, 19 Nov 2018 10:13:31 +0000 (13:13 +0300)]
Restrict number of OpenMP threads during testing.

The default testing configuration causes errors
when run on many-core systems, requiring additional user input to
guide resource allocation. This change borrows the solution used
in the mdrun tests, setting `OPENMP_THREADS 2` in the CMake macro
`gmx_register_gtest_test()`.

Refs #2765

Change-Id: Ia05ca6130b60b4b6ccdb4e13e3afe1e5c7419fd3

5 years agoMissing factor of 2 in cos-acceleration
Jiannan Liu [Wed, 19 Dec 2018 00:08:19 +0000 (19:08 -0500)]
Missing factor of 2 in cos-acceleration

The bug was introduced in commit 69470fc4e9fd990eb53b22c17dc7a699c583d126

Last working version is 2016.5

Affected 2018 and 2019

Fixes #2572

Change-Id: Ibad31b0d8cec7c5f4b77a73b1fbab0ff114b50b6

5 years agoFix GMX_BUILD_OWN_FFTW_URL CMake cache entry type
Szilárd Páll [Mon, 9 Apr 2018 17:23:03 +0000 (19:23 +0200)]
Fix GMX_BUILD_OWN_FFTW_URL CMake cache entry type

The type of the GMX_BUILD_OWN_FFTW_URL cache entry was set to "PATH"
and as a result CMake was expecting its content to be a directory.
This commit changes the type to "STRING" and as a result the '////'
workaround in the default fftw URL and custom URLs can now be passed on
the command line which previously did not work as CMake interpreted most
inputs as relative file system paths and converted them to absolute
ones.

Change-Id: I6ed3920d7816b686a031c1a3aee5acd25d7b4692

5 years agoAdd matrix entry to test external FFTW build
Paul Bauer [Sat, 15 Dec 2018 17:12:07 +0000 (18:12 +0100)]
Add matrix entry to test external FFTW build

Added build option and configuration to test building GROMACS with
GMX_BUILD_ONW_FFTW to catch associated issues.

Refs #2809

Change-Id: I6c8a9fc415be5386c8b336c3f4dabdac49680130

5 years agoFix FFTW build
Paul Bauer [Sat, 15 Dec 2018 16:19:37 +0000 (17:19 +0100)]
Fix FFTW build

Fixed the build with GMX_BUILD_OWN_FFTW terminating with a linker issue.

Fixes #2809

Change-Id: Ie1323601da220bf28d7cb00d33b520b66d9de05f

5 years agoCopy parallelisation info from old webpage
Paul Bauer [Thu, 16 Nov 2017 08:52:18 +0000 (09:52 +0100)]
Copy parallelisation info from old webpage

Copied the information for parallelisation from old webpage
to the user guide. Removed some redundant information.

Refs #2297, #2146, #2656

Change-Id: Id472ab779a6e2ca982b117a95429898a0277dc23

5 years agoMerge branch release-2018 into release-2019
Paul Bauer [Mon, 17 Dec 2018 08:58:48 +0000 (09:58 +0100)]
Merge branch release-2018 into release-2019

Resolved Conflicts:
src/gromacs/ewald/pme-solve.cu
src/gromacs/mdlib/clincs.cpp
src/programs/mdrun/md.cpp
src/programs/mdrun/tests/CMakeLists.txt

Change-Id: I813b4ed7ecf8056db09ab749c367a3b5e204e701

5 years agoFix LINCS triangle constraining with OpenMP
Berk Hess [Thu, 13 Dec 2018 11:06:54 +0000 (12:06 +0100)]
Fix LINCS triangle constraining with OpenMP

LINCS would only apply double the iterations to constraints
in triangles when the last OpenMP task contained at least one such
triangle.

Fixes #2808

Change-Id: Ia9a402f3ada87dbf73f74eda943b3fa4bfb3559b

5 years agoGROMACS 2019 Release candidate
Paul Bauer [Thu, 6 Dec 2018 12:34:02 +0000 (13:34 +0100)]
GROMACS 2019 Release candidate

Updated regressiontest hash as usual.

Change-Id: Ia938ee4a936d21eac6beb5244a3f2fab87b35240

5 years agoFixed nullptr derefence in LINCS error
Berk Hess [Wed, 12 Dec 2018 09:23:46 +0000 (10:23 +0100)]
Fixed nullptr derefence in LINCS error

Somehow a dereferenced nullptr could be passed as a reference
to gmx_multisim_t to the Constraint factory function.
Changed the reference in the Constraint object to a pointer.

Fixed #2803

Change-Id: I4806069973067d27078a1324d18a406c7b3e227d

5 years agoSet HAVE_LMFIT properly
Magnus Lundborg [Tue, 11 Dec 2018 16:16:09 +0000 (17:16 +0100)]
Set HAVE_LMFIT properly

The HAVE_LMFIT was only set in the local scope.
Fixes #2800

Change-Id: I34bd3dc1896526c09c6808c7020d3a492c4c8f31

5 years agoFix LINCS triangle constraining with OpenMP
Berk Hess [Thu, 13 Dec 2018 10:59:49 +0000 (11:59 +0100)]
Fix LINCS triangle constraining with OpenMP

LINCS would only apply double the iterations to constraints
in triangles when the last OpenMP task contained at least one such
triangle.

Fixes #2808

Change-Id: I37a3d61c868f60387e536d3db3a4079deb6ae504

5 years agoEnable ARMPL in the armclang build
Szilárd Páll [Thu, 8 Nov 2018 02:14:26 +0000 (03:14 +0100)]
Enable ARMPL in the armclang build

Fixes #2685

Change-Id: I1827c1c55e533bd7ff82b452d77143cb6d04cc01

5 years agoRemove unused MdrunComparisonFixture
Roland Schulz [Thu, 13 Dec 2018 18:04:38 +0000 (10:04 -0800)]
Remove unused MdrunComparisonFixture

For 2018 branch it is unused. For 2019 branch it has been
rewritten (c74114338714). Global variable causes SegFault
with ICC and GCC new C++ ABI (_GLIBCXX_USE_CXX11_ABI).

Fixes #2801

Change-Id: Ia41178aaa6e963b05cd4c1e52b8ca0d5946a569c

5 years agoAvoid spurious timing in bonded GPU launch subcounter
Szilárd Páll [Thu, 13 Dec 2018 15:54:15 +0000 (16:54 +0100)]
Avoid spurious timing in bonded GPU launch subcounter

Change-Id: I09d9e6bf1b61b9578b0a39b7e0d21ac63f865057

5 years agoDocument the FP exception in cuFFT 7.0
Szilárd Páll [Mon, 10 Dec 2018 23:50:18 +0000 (00:50 +0100)]
Document the FP exception in cuFFT 7.0

To document known issues relevant for developers, a new section is added
to the dev guide.
As a a first entry, this commit documents the FP exception that aborts
debug builds of mdrun that offload FFTs to an NVIDIA GPU with CUDA 7.0.

Fixes #2726

Change-Id: I60c7b92da2c703e0910644012a01a009b3df0a7a

5 years agoTemporary fix for OpenCL PME gather
Berk Hess [Mon, 10 Dec 2018 16:16:52 +0000 (17:16 +0100)]
Temporary fix for OpenCL PME gather

There is a race on the z-component of the PME forces in the OpenCL
force reduction in the gather kernel. This change avoid that race.
But a better solution is a different, more efficient reduction.

Refs #2737

Change-Id: I45068c9187873548dff585044d2c8541444e385c

5 years agoImprove DLB report/note
Szilárd Páll [Mon, 10 Dec 2018 16:19:09 +0000 (17:19 +0100)]
Improve DLB report/note

- Added a newline preceding the DLB report on the stderr (there was
  none)
- Added a common means to reduce load imbalance to the suggestions.
- Slight code modernization.

Change-Id: I86906f9d870bfd8ee8bb03ae5bd1fdf83a3349f0

5 years agoProperly check for MSVC in build script
Paul Bauer [Tue, 11 Dec 2018 08:25:42 +0000 (09:25 +0100)]
Properly check for MSVC in build script

Also added another check for mdrun only and static builds
to make sure the api is turned off in those cases as well.

Change-Id: If7f6fedfba8cd1b1f4c951bc246228c60771a11a

5 years agoTweak the bonded GPU energy copy/wait operations
Szilárd Páll [Mon, 10 Dec 2018 00:09:13 +0000 (01:09 +0100)]
Tweak the bonded GPU energy copy/wait operations

Move the launch of device to host copy earlier and add wait cycle
counter around the operation that may block and lead to time spent
waiting rather than just a launch.

Change-Id: I241001fc0b60a8ae994f173bc3b38f0c4bbd8fff

5 years agoFix update groups with 2D/3D DLB
Berk Hess [Fri, 7 Dec 2018 20:59:06 +0000 (21:59 +0100)]
Fix update groups with 2D/3D DLB

With a staggered DD grid update groups could end up in the wrong DD
cell. This caused a fatal error (no incorrect results).
his change reverts most of d29cb9da which was a failed fix for #2712.

Also added a few const qualifiers and renames pos to cog for clarity.

Refs #2712
Fixes #2790

Change-Id: I1a589cccb6ea7048fb66ae867716549a1a615b7f

5 years agoMake large PME grids work on GPU
Berk Hess [Wed, 5 Dec 2018 15:18:35 +0000 (16:18 +0100)]
Make large PME grids work on GPU

With PME grids with z size larger than 511 too large blocks could
be launched causing a cryptic CUDA or OpenCL error.

Fixes #2779

Change-Id: Ib2376ae0e9d5a338084df8f3a2cf46ca1b711a6a

5 years agoDocument mdrun mdp option modification
Berk Hess [Mon, 10 Dec 2018 12:26:46 +0000 (13:26 +0100)]
Document mdrun mdp option modification

Add documentation to the mdp section of the user guide for
mdrun modifying rcoulomb and fourier options.

Change-Id: Ifd8b374599713e959c9b3aac583961115cf3b638

5 years agoDisable gmxapi by default
Paul Bauer [Mon, 10 Dec 2018 14:59:11 +0000 (15:59 +0100)]
Disable gmxapi by default

Due to outstanding issues with the integration testing and tests failing
with large number of ranks, the gmxapi default has been changed to not
be build. In Jenkins, all supported builds still are still set to build
with GMXAPI enabled.

Refs #2765, #2722, #2756

Change-Id: I2cc42c461edc206aaa30be6cac3db0a52ccae991

5 years agoMake only mdrun report process ID
Mark Abraham [Mon, 10 Dec 2018 02:00:47 +0000 (03:00 +0100)]
Make only mdrun report process ID

Recent change 367d003106 changed where mdrun reported the process ID,
but in so doing changed various tools to also report the process ID.
This made pdb2gmx tests non-reproducible.

Since the process ID is probably only of minor value to the user, and
probably only of value to users of mdrun, this change adds support for
allowing tools to choose to print the process ID while defaulting to
not reporting it.

Fixes #2794
Refs #2775

Change-Id: Icb6e97d4d7502f12e74cbaa2c1f1a969ba99b917

5 years agoFailproof signal conversion
Pascal Merz [Sat, 20 Oct 2018 15:27:58 +0000 (17:27 +0200)]
Failproof signal conversion

When introducing the signal handlers, we decided to use scoped enums to
define the different simulation signals (changes Ia90778, I05ca7a,
I5dec05). In the SimulationSignal objects which actually get reduced,
these are stored as signed char. When the signals get handled, these
signed char are converted back to the scoped enums. Currently, this is
done using a static_cast.

Although in the current code, the signals get handled immediately after
being reduced, and signals are only set by master, there is no formal
guarantee that this is always true. If the signals get reduced multiple
times, or by different ranks, the signed char stored in the
SimulationSignal object could get larger than +1 / -1. In the old code,
this would not lead to problems, as it was just checked that the unsigned
char in the SimulationSignal was != 0 (or <0 / >0, for the stop signal).
In the new code, the signal handling would fail in this case, without
proper error message - the static_cast will not fail, but the following
comparison to the enum values will always fail. This commit introduces
a conversion function for each of the enums and explicity enum values
for the StopSignal to return to the failproof behavior of the old code.

Refs #1793

Change-Id: Iac8ea3946effba1797e16d8c918c7d49ce4dc828

5 years agoMake release notes html only
Paul Bauer [Mon, 3 Dec 2018 15:32:41 +0000 (16:32 +0100)]
Make release notes html only

Refs #2783

Change-Id: Ifa2e5486e9f3d4be5369bd82f4f858c1ea54e22e

5 years agoChange toctree depth in PDF manual
Paul Bauer [Mon, 3 Dec 2018 15:03:10 +0000 (16:03 +0100)]
Change toctree depth in PDF manual

It doesn't seem to be possible to set different toctree depths for the
HTML and PDF versions of the manual in Sphinx itself. To work around
this, I added the explicit depth to the LaTeX preamble.

Refs #2783

Change-Id: I74e00b339a014060567a9fd6aa875e7047165e66

5 years agoFix POWER8 and POWER9 build
Mark Abraham [Thu, 11 Oct 2018 15:10:29 +0000 (17:10 +0200)]
Fix POWER8 and POWER9 build

Tested with GCC 6.4.0 and 8.1.0 in debug and release modes,
with and without SIMD.

xlc is still not supported, e.g. because 16.1 cannot handle an
in-class member initializer list for a C-style array in the same
struct as a member initialized in a constructor initializer
list. Tested for this in the C++11 feature support tests, and we now
issue a descriptive error in this case.

Removed -mdirect-move from POWER8 flags because gcc warns about its
use.

Fixes #2748

Change-Id: I0dc68c12701f041b702063692703cc2e15e96d8e

5 years agoUpdates to do_dssp
boristim [Fri, 24 Aug 2018 16:59:32 +0000 (19:59 +0300)]
Updates to do_dssp

As posted by Boris Timofeev on redmine, do_dssp has been
broken before when encountering unknown residues.
This fixes the behaviour.

Refs #2599

Change-Id: I16f09ed33cf86c699a2667d101740ce0fc2c0919

5 years agoAdd Bonded GPU launch overhead cycle subcounter
Szilárd Páll [Mon, 15 Oct 2018 18:35:17 +0000 (20:35 +0200)]
Add Bonded GPU launch overhead cycle subcounter

ALso fixed missing counters around the transfer/clearing launch.

Change-Id: Ib3f18b8285b979b818ab79713253bc7f7bb89e2a

5 years agoSwap the order of GPU bonded and nonbonded launch
Szilárd Páll [Fri, 30 Nov 2018 17:18:01 +0000 (18:18 +0100)]
Swap the order of GPU bonded and nonbonded launch

In order to maximize the chance of the bonded kernel tails to overlap
as well as to avoid GPU idling during the scheduling gaps between these
kernels, this commit swaps the launch order of bonded and nonbonded work.

Refs #2677

Change-Id: Ia4e5e7279e7ea4cf575c76b5286cf10387258878

5 years agoFix conditional in nonlocal nbnxn GPU work skipping
Szilárd Páll [Fri, 30 Nov 2018 17:12:50 +0000 (18:12 +0100)]
Fix conditional in nonlocal nbnxn GPU work skipping

The nbnxn nonlocal work, including coordinate buffer copy could be
skipped when the nonlocal pair list is empty. However this condition now
needs to also take into account that the bonded kernels also take the
same coordinates as input.
This change makes the non-local nbnxn copy depend both on whether there
is non-local nonbonded as well as bonded work on the current domain.

Fixes #2786

Change-Id: I217072c962226749b91f514e4a8070f042e35131

5 years agoSplit nbnxn input copy and kernel launch
Szilárd Páll [Fri, 30 Nov 2018 16:48:27 +0000 (17:48 +0100)]
Split nbnxn input copy and kernel launch

The nonbonded x+q host-to-device copy and kernel launch is split into
two functions and called separately from do_force().
This will allow improving the bonded scheduling and better expressing a
missing bonded dependency (and fixing the related bug).

This change only moves code.

Refs #2677 #2786

Change-Id: Ie50e6a6b664f8400274b2f409eacb6c36f0908ba

5 years agoCorrect thread count in the PME GPU reduction
Szilárd Páll [Mon, 3 Dec 2018 17:25:12 +0000 (18:25 +0100)]
Correct thread count in the PME GPU reduction

The host-side force reduction has been moved into the PME module, so the
thread count is now changed to be the PME module's thread count.

Change-Id: Ib313c7afe1384b3cec7a999273afba79c3de8c46

5 years agoAdd update groups to parallelization docs
Berk Hess [Mon, 3 Dec 2018 12:59:53 +0000 (13:59 +0100)]
Add update groups to parallelization docs

Refs #2784

Change-Id: I12dfabbab9cff08d9154ac5258aeb790906c72f0

5 years agoMake large PME grids work on GPU
Berk Hess [Wed, 5 Dec 2018 08:54:07 +0000 (09:54 +0100)]
Make large PME grids work on GPU

With PME grids with z size larger than 511 too large blocks could
be launched causing a cryptic CUDA error.

Fixes #2779

Change-Id: I0833609f64ad2e0ad6b7a799cf2b693f2dec3939

5 years agoMove responsibility for PME reduction to its module
Mark Abraham [Wed, 28 Nov 2018 11:46:15 +0000 (12:46 +0100)]
Move responsibility for PME reduction to its module

We no longer need temporary energy and virial variables that gcc 7 and
8 warn about in release mode. Earlier efforts to avoid these warnings
made pme.h depend on config.h, which is not desirable.

This made possible minor simplifications to testing code.

Noted some TODOs and added some comments. Removed a completed TODO
that had been left behind.

Fixes #2503
Refs #2863

Change-Id: I9a6c5b12ef5c27bd003d3ab9eeeaa75e9574b2dc

5 years agoFix energy history reading
Paul Bauer [Thu, 29 Nov 2018 13:47:45 +0000 (14:47 +0100)]
Fix energy history reading

The energy history could be read as a nullptr from a checkpoint file,
leading to issues when trying to restart a simulation. Fixed the logic
issue and added an assertion to catch it in the future.

Also removed redundant comparisons to nullptr.

Fixes #2781

Change-Id: I99ce1a2b932046cab6918ec24b267fc8ff3850ad