alexxy/gromacs.git
5 years agoChange nbnxn_search to class PairSearch
Berk Hess [Wed, 13 Mar 2019 21:27:25 +0000 (22:27 +0100)]
Change nbnxn_search to class PairSearch

Changed some nbnxm functions to methods located in new file nbnxm.cpp
to keep the internals of the nbnxm module private and hidden.

TODO: Rename internal.h to pairsearch.h
TODO: Move Pairsearch definitions to new file pairsearch.cpp
TODO: Rename nonbonded_verlet_t to Nbxnm

Change-Id: I8fa5d3b88ed453598cbed3ab4b8548258f851e20

5 years agoExtract DomainSetup from nbnxn_search
Berk Hess [Wed, 13 Mar 2019 12:55:33 +0000 (13:55 +0100)]
Extract DomainSetup from nbnxn_search

Change-Id: I1a46c543e063b250e27b3759ddc050a46fc6692d

5 years agoChange nbnxm macros to constexpr
Berk Hess [Wed, 13 Mar 2019 09:47:49 +0000 (10:47 +0100)]
Change nbnxm macros to constexpr

Also added an inline function to clarify the code and avoid code
duplication.

Change-Id: If68ad4f745a9b6f1c68379af24305a47084b608b

5 years agoMove functions to gridset.cpp
Berk Hess [Tue, 12 Mar 2019 10:58:42 +0000 (11:58 +0100)]
Move functions to gridset.cpp

Change-Id: Ib8b6b0159d25b50ddfd0d4ced37b8486ed2c6081

5 years agoAdd nbnxm GridSet class
Berk Hess [Mon, 11 Mar 2019 14:07:47 +0000 (15:07 +0100)]
Add nbnxm GridSet class

Collected all data that is shared between nbnxm grids to a new class
called GridSet.

TODO: Turn nbnxn_search into a class and move some functions

Change-Id: Iae0dc988d88310d88e0541656f896e552cd19260

5 years agoFix compilation issue
Berk Hess [Thu, 14 Mar 2019 07:23:38 +0000 (08:23 +0100)]
Fix compilation issue

Automatic rebase allowed merging code with outdated types.

Added namespace and fixed Doxygen while we were there

Change-Id: I7543f53d07fba5010ef15e4e81fbb7e2d632d167

5 years agoReorganize search-time code in do_force_cutsVERLET
Szilárd Páll [Fri, 8 Mar 2019 14:18:52 +0000 (15:18 +0100)]
Reorganize search-time code in do_force_cutsVERLET

Only code reordering done here in order to facilitate splitting out the
DD/search work from the force computation schedule.

Change-Id: I04b7fa97eed3a48b38389b9da4ac9be4b36c718a

5 years agoAdd haveGpuBondedWork flag to PpForceWorkload
Szilárd Páll [Tue, 12 Mar 2019 16:57:54 +0000 (17:57 +0100)]
Add haveGpuBondedWork flag to PpForceWorkload

Also move init of PpForceWorkload to make sure it precedes the GPU bonded
data initialization that the value of flag depends on.

Change-Id: Icdaab084d718087a44b2a2ec7702edd0ba86285b

5 years agoStart modularizing force workload setup
Szilárd Páll [Tue, 19 Feb 2019 09:44:14 +0000 (10:44 +0100)]
Start modularizing force workload setup

Extend ppForceWorkload flags with listed forces-related booleans
and add a setup function that re-initializes ppForceWorkload every
search step.

Change-Id: I71c783cf22e58e880d7d8655bc1e9b44e6428407

5 years agoAdd tests for preprocess atom types
Paul Bauer [Tue, 12 Mar 2019 16:07:02 +0000 (17:07 +0100)]
Add tests for preprocess atom types

Adds some tests for the handling of preprocessing atom types and fixes a
bug that I introduced while refactoring the code.

Refs #2833

Change-Id: I3dabd11a1bc8a78379f4187bc8efa266a7c46d74

5 years agoRemove custom datastructure in vsite preprocessing
Paul Bauer [Tue, 12 Mar 2019 10:29:17 +0000 (11:29 +0100)]
Remove custom datastructure in vsite preprocessing

Refs #2833

Change-Id: I6801264e743b3bf8cf205b8b297315c4b739de06

5 years agoFix errors caused by automatic rebase
Paul Bauer [Wed, 13 Mar 2019 12:51:17 +0000 (13:51 +0100)]
Fix errors caused by automatic rebase

A recent merge caused an automatic rebase that did not take a change
in a parent commit into account, leading to all builds to fail.
This fixes the error.

Change-Id: Iee9064e723fdc1d546fe140256467a6b0cb0b2fa

5 years agoBasic routines to handle periodic boundary.
Artem Zhmurov [Fri, 22 Feb 2019 11:10:13 +0000 (12:10 +0100)]
Basic routines to handle periodic boundary.

This is a generalization of the SIMD/GPU-like PBC
routines so that they can be used in a CPU code as well.

(Related to Refs #2863)

====================================

Patch set 6:

-- TODOs and reference to Redmine #2863 added.
-- Comments improved.

====================================

Patch sets 7 and 8: Rebasing.

====================================

Patch set 9:

-- Minor changes to comments.
-- Standsrd float3 vector subtraction used.

====================================

Patch set 10 and 11: Rebase, uncrustify.

====================================

Change-Id: I9efded685fcc41d05bbc5d7deed3ce70f43f5e98

5 years agoRefactor t_param to InteractionType
Paul Bauer [Fri, 22 Feb 2019 17:07:39 +0000 (18:07 +0100)]
Refactor t_param to InteractionType

Refs #2833

Change-Id: Iab043e96399c2a9615e66c5889010331c95782df

5 years agoMove nbnxm atom macros to atomdata.h
Berk Hess [Mon, 11 Mar 2019 09:53:38 +0000 (10:53 +0100)]
Move nbnxm atom macros to atomdata.h

Removed unused macros
The moved macros have been converted to constexpr.

Change-Id: I0d1352a218e1a317223e6579108fb42b02ddf393

5 years agoFix memory leak
Mark Abraham [Tue, 12 Mar 2019 02:56:24 +0000 (03:56 +0100)]
Fix memory leak

Refs #2833

Change-Id: I402aa9996ed398654594527d408a8318dab701f0

5 years agoRefactor preprocessing atom types.
Paul Bauer [Fri, 25 Jan 2019 16:07:02 +0000 (17:07 +0100)]
Refactor preprocessing atom types.

Refs #2833

Change-Id: Ifd7f583fd5908c1ce225e379b58757f9a09b2100

5 years agoClean up calc_verlet_buffer_size()
Berk Hess [Thu, 7 Mar 2019 09:52:29 +0000 (10:52 +0100)]
Clean up calc_verlet_buffer_size()

Use return value instead of passing pointer. Added a separate vsite
function for counting the non-linear vsites.
Changed pointers to references.
Improve variable naming
This change is only refactoring.

Change-Id: I91b57dee08452d5e44b5b38860ffbd5e01430a3a

5 years agoMinor refactoring in vsite_parm
Paul Bauer [Wed, 6 Mar 2019 14:35:29 +0000 (15:35 +0100)]
Minor refactoring in vsite_parm

Refs #2833

Change-Id: I0658c9c380d4a0723e5a283cd6372f4ad8a6c6b8

5 years agoEliminate mdlib/mdrun.h
Mark Abraham [Wed, 6 Mar 2019 10:16:29 +0000 (11:16 +0100)]
Eliminate mdlib/mdrun.h

This file was filled with stuff that works better elsewhere.

Moved the options structs into gmx namespace

Refs #2877

Change-Id: Ib796ef8e9896804c56936f23f67dcd3fc12900fd

5 years agoRemove ineffective code for writing more TER fields to pdb files
Mark Abraham [Sun, 10 Feb 2019 13:28:49 +0000 (14:28 +0100)]
Remove ineffective code for writing more TER fields to pdb files

A weakly typed string containing a residue type name was passed to a
function expecting a residue name. This has led to fewer TER records
being output than expected by the author of ff9a9692e1f4. The intent
then was presumably to refer to the residue type of the previous
chain, but in fact the residue type of that residue type was used,
which is always "Other". Thus no extra TER fields were ever written.

The intended feature for PDB writing is not clearly vital, and has
never worked, so is now removed. These days, it would only be active
if pdb2gmx wrote .pdb output, since in no other case do we build chain
numbers.

Change-Id: I4e5ed09171772e17fd0fc11aff239bf7aaa966eb

5 years agoNew tests for pdb2gmx and editconf
Mark Abraham [Sun, 10 Feb 2019 15:13:06 +0000 (16:13 +0100)]
New tests for pdb2gmx and editconf

The editconf tests run only in single precision, as they do not
reproduce well in double precision. We don't have a good way to make
them reproduce without writing a much more complex checker. It's
better that we add test coverage for the normal precision than to have
no coverage until we have code that works for both kinds of precision
configuration.

Change-Id: If85768ec63469b148547506f77a84c1fa940ebf8

5 years agoClean up use of loop indices
Mark Abraham [Sun, 10 Feb 2019 13:11:30 +0000 (14:11 +0100)]
Clean up use of loop indices

There was no need to index restype by i, so we may as well
move closer to being able to use range-based for loops.

Change-Id: I6551325b74ffdfc15b055339cf0d2ca818c01ff3

5 years agoClean up nbnxm bounding box functions
Berk Hess [Tue, 5 Mar 2019 21:13:18 +0000 (22:13 +0100)]
Clean up nbnxm bounding box functions

Replaced macro function by inline function.
Reduced and simplified function arguments.
Renamed functions with more expressive names.
Removed _simd4 from the SIMD4 version of the normal BB distance
calculation function, since it can be used everywhere and this
reduced preprocessing logic.
Replaced nbnxn_bb_t by BoundingBox.

Change-Id: I63a7a0add371b268b533bde60e15a644ec71583e

5 years agoClean up nbnxm bounding boxes
Berk Hess [Tue, 5 Mar 2019 15:11:07 +0000 (16:11 +0100)]
Clean up nbnxm bounding boxes

Changed a flat array to array of 1D BB structs.
Changed a macro to a constexpr.

Change-Id: I75bb6792a3e99dc152450398a90f5414ae79fd8c

5 years agoConvert nbnxm bounding box to a struct
Berk Hess [Fri, 1 Mar 2019 12:01:30 +0000 (13:01 +0100)]
Convert nbnxm bounding box to a struct

Change-Id: Ia432e1f242b90ec0dbe01c528125bb7fa955bd5f

5 years agoRevert "Eliminate mdlib/mdrun.h"
Mark Abraham [Wed, 6 Mar 2019 13:00:36 +0000 (14:00 +0100)]
Revert "Eliminate mdlib/mdrun.h"

This reverts commit f4c94df918063cf855ba4575e1aebefb232ace50.

Somehow gerrit permissions were able to be bypassed, and this change
fixes the change that did not go through review as expected. We'll
investigate gerrit settings also.

5 years agoEliminate mdlib/mdrun.h
Mark Abraham [Wed, 6 Mar 2019 10:16:29 +0000 (11:16 +0100)]
Eliminate mdlib/mdrun.h

This file was filled with stuff that works better elsewhere.

Moved the options structs into gmx namespace

Refs #2877

Change-Id: Ib796ef8e9896804c56936f23f67dcd3fc12900fd

5 years agoMinor modernization in gmx_dump
Mark Abraham [Sun, 24 Feb 2019 07:13:36 +0000 (08:13 +0100)]
Minor modernization in gmx_dump

Moved into gmx namespace. Used anonymous namespace rather than
static functions.

Removed out of date comment in registering legacy modules.

Change-Id: I8fa441ff9d776e0dbe391f21004c4bf2e56d5cf0

5 years agoMake pdb2gmx tests run in Jenkins
Mark Abraham [Mon, 11 Feb 2019 07:01:39 +0000 (08:01 +0100)]
Make pdb2gmx tests run in Jenkins

Now that the use of regex is less inefficient, these tests will run
several tens of times faster, which will make them usable in Jenkins.

Change-Id: I115ce221fb0156b08dd71d266c2d1b9cd65ba759

5 years agoFix post-submit warnings
Berk Hess [Tue, 5 Mar 2019 12:34:29 +0000 (13:34 +0100)]
Fix post-submit warnings

Change-Id: Id9d36d0fcdf0fcdb16438992f58229185942a1da

5 years agoMove nbnxm atomdata types to atomdata.h
Berk Hess [Thu, 28 Feb 2019 09:47:30 +0000 (10:47 +0100)]
Move nbnxm atomdata types to atomdata.h

This change is only code motion.

Change-Id: Ibefdd476c93ac2863dfb028fea37d4b00945055a

5 years agoTurn nbnxn_grid_t into a class
Berk Hess [Tue, 8 Jan 2019 22:03:18 +0000 (23:03 +0100)]
Turn nbnxn_grid_t into a class

Change-Id: I7dbb2268ad7ee70a49db5fd20b1938e786b1da35

5 years agoMerge "Merge branch release-2019"
Paul Bauer [Mon, 4 Mar 2019 10:25:15 +0000 (11:25 +0100)]
Merge "Merge branch release-2019"

5 years agoEncapsulate force output setup in do_force_*
Szilárd Páll [Thu, 28 Feb 2019 01:51:34 +0000 (02:51 +0100)]
Encapsulate force output setup in do_force_*

Code that sets up force buffer outputs for force-only and virial
contribution together with clearing is moved into a function that
produces a struct containing the relecant data.

Refs #2802

Change-Id: Ie04a8c8edf703610ff8e357792d6ec22ebb718ff

5 years agoMerge branch release-2019
Mark Abraham [Sat, 2 Mar 2019 03:28:49 +0000 (21:28 -0600)]
Merge branch release-2019

Change-Id: Ib12dea8e32d62a0cf12b8cab6ed8162ce6a40561

5 years agoRemove defunct mdrun options
Mark Abraham [Fri, 1 Mar 2019 23:42:49 +0000 (15:42 -0800)]
Remove defunct mdrun options

These worked with General Coupling Theory, and were
not removed alongside that code when it was removed.

Refs #1292

Change-Id: Ia795ea81e7c38ba3b895f926ce048c0ac2dfba1a

5 years agoMake OpenCL dummyKernel to require a input parameter
Jukka Maatta [Wed, 27 Feb 2019 15:03:52 +0000 (17:03 +0200)]
Make OpenCL dummyKernel to require a input parameter

This is a tentative fix for OpenCL error with mdrun on MacOS.
MacOS seems to require that kernel functions have at least one parameter.
Otherwise clBuildProgram fails with error -11.

Here dummyKernel takes an empty pointer in the definition.
We then pass an empty pointer to dummyKernel with clSetKernelArg.

Fixes #2865

Change-Id: Ib7c08eeeb2ec6d8a43bfe703cf1b273819a45a29

5 years agoClarify force buffer setup code in do_force
Szilárd Páll [Tue, 12 Feb 2019 17:38:43 +0000 (18:38 +0100)]
Clarify force buffer setup code in do_force

Refactored code and made conditionals non-nested to improve
the ease of understanding when is a common or separate buffer used for
the forces when direct virial contribution is computed.

Also add subcounter for force buffer clearing which also helps annotate
code that should be conditional on whether any of these buffers are used
to accumulate or only to copy into (e.g. with everything offloaded to a
GPU).

Refs #2802

Change-Id: I3fa5a3e4e4adf5cfe0eb417f0c1c3d0ed4a96769

5 years agoImprove documentation links
Roland Schulz [Thu, 28 Feb 2019 22:32:27 +0000 (14:32 -0800)]
Improve documentation links

Link in README (important for e.g. github) was outdated.
We didn't have a link which let the user reach the
documentation of a different version.

Change-Id: I73e570848e883c50a80f5c6070c0ba80aafb544d

5 years agoUse unique_ptr in nonbonded_verlet_t
Berk Hess [Thu, 21 Feb 2019 19:56:04 +0000 (20:56 +0100)]
Use unique_ptr in nonbonded_verlet_t

Changed nonbonded_verlet_t and all its pointer members to unique_ptr,
except for the GPU struct, because its contents is currently only
visible in the cuda/opencl part of the code.

Change-Id: I710b4db7a08ebf8d892b2dd9417ab82fbccf1ed2

5 years agoUse new/delete for t_forcerec
Berk Hess [Thu, 21 Feb 2019 20:57:42 +0000 (21:57 +0100)]
Use new/delete for t_forcerec

Added initialization in t_forcerec definition.

Change-Id: Iab82313ad92c60d35423f4955d4ab88da40694fb

5 years agoRefactor t_params to InteractionTypeParameters
Paul Bauer [Wed, 20 Feb 2019 15:25:05 +0000 (16:25 +0100)]
Refactor t_params to InteractionTypeParameters

Part of preprocessing clean up.

Refs #2833

Change-Id: I4514edde34c978c2756f1c17471e0adde0736896

5 years agoMake OpenCL dummyKernel to require a input parameter
Jukka Maatta [Wed, 27 Feb 2019 15:03:52 +0000 (17:03 +0200)]
Make OpenCL dummyKernel to require a input parameter

This is a tentative fix for OpenCL error with mdrun on MacOS.
MacOS seems to require that kernel functions have at least one parameter.
Otherwise clBuildProgram fails with error -11.

Here dummyKernel takes an empty pointer in the definition.
We then pass an empty pointer to dummyKernel with clSetKernelArg.

Fixes #2865

Change-Id: Ib7c08eeeb2ec6d8a43bfe703cf1b273819a45a29

5 years agoClean up dispersioncorrection.cpp
Berk Hess [Tue, 26 Feb 2019 20:47:30 +0000 (21:47 +0100)]
Clean up dispersioncorrection.cpp

Localized variable declarations, use const and replaced pointers
by std::vector and arrayref.
This change is only refactoring.

Change-Id: I3483e42e43a83956d353b60bfbff3dada943215d

5 years agoKeep niche CMake variables as advanced
Mark Abraham [Tue, 26 Feb 2019 21:41:26 +0000 (13:41 -0800)]
Keep niche CMake variables as advanced

Change-Id: I99781749d9f4f481f7943a27c415af6b5c4ef5bc

5 years agoFix 4 compilers warnings
Berk Hess [Wed, 27 Feb 2019 09:29:12 +0000 (10:29 +0100)]
Fix 4 compilers warnings

Change-Id: Ia68ae4b98b5ba35e49f75ec54d22ac99f3634d00

5 years agoRemove minor broken functionality in gmx bar
Mark Abraham [Tue, 26 Feb 2019 00:22:21 +0000 (16:22 -0800)]
Remove minor broken functionality in gmx bar

In the large commit 23eb71d14195e494f215bca1115bdb0b47bd5cf7, this got
broken, because the transition before GROMACS 4.6 to use a lambda that
is a vector of doubles is inconsistent with the practice of embedding
an integer in a filename.

Change-Id: I517a6c329b692d88732a9031de969a6dc77c699c

5 years agoCollect dispersion correction code
Berk Hess [Tue, 26 Feb 2019 15:01:13 +0000 (16:01 +0100)]
Collect dispersion correction code

All function related to dispersion correction calcutions have now
been moved to the new file dispersioncorrection.cpp.
This change is only code motion

Todo: Put all dispersion correction parameters in a separate struct.

Change-Id: Iaed34908f6650f0e75ec0264ae8a6fa62820604c

5 years agoAdd new line to trjconv notice to users
Mark Abraham [Tue, 26 Feb 2019 22:38:21 +0000 (14:38 -0800)]
Add new line to trjconv notice to users

This line can be the final terminal output, and it looks ugly to give
the user a prompt on the same line.

Change-Id: Ie3830ba9a86979ab60094271894ebd1651aa6f34

5 years agoCorrect grompp index file error message
Berk Hess [Tue, 26 Feb 2019 14:07:18 +0000 (15:07 +0100)]
Correct grompp index file error message

Change-Id: I6b59c6d7e1d3a33054836f16d879d40e109eb8ee

5 years agoClean up mtop pbc functions
Berk Hess [Tue, 26 Feb 2019 11:00:28 +0000 (12:00 +0100)]
Clean up mtop pbc functions

Change-Id: I049a96b3e8ab14a45f198c5f08224073316c58b5

5 years agoMoving finish_run(...) to runner.cpp
Prashanth Kanduri [Mon, 25 Feb 2019 11:59:35 +0000 (12:59 +0100)]
Moving finish_run(...) to runner.cpp

This is another patch in the cleaning efforts of sim_util.

The idea is to only have functions relevant to the force
schedules there so that it becomes easy to move it into
its own module with minimal merging pains.

Change-Id: I92d6aef805cacf7d183a5581336affd9ee8d66a7
Related: #2574

5 years agoMoving do_pbc_mtop(...) functions to pbcutils from mdlib
Prashanth Kanduri [Mon, 25 Feb 2019 16:26:50 +0000 (17:26 +0100)]
Moving do_pbc_mtop(...) functions to pbcutils from mdlib

Another patch to clean up some functions within sim_util
to ensure that it contains only those methods relevant to
force calculations.

This is one in a series of patches for introducing a separate
force_schedule module.

Change-Id: I4922f714dda3d423b14c2d1393cdac53941aa608
Related: #2574

5 years agoRefactor ExclusionBlocks
Paul Bauer [Mon, 18 Feb 2019 14:55:54 +0000 (15:55 +0100)]
Refactor ExclusionBlocks

Refs #2833

Change-Id: Iffcd5c8e862f2be7b8e05f1c45e324c76ca22f9f

5 years agoMove code out of sim_util.cpp
Mark Abraham [Fri, 22 Feb 2019 14:43:54 +0000 (15:43 +0100)]
Move code out of sim_util.cpp

This prepares for migrating do_force implementation details to
forceschedules module.

Change-Id: Ib659b84bbf0b43413202ae8ad6e7305336d90883

5 years agoDe-duplicate gmx_tmpnam and gmx_fopen_temporary
Mark Abraham [Sun, 24 Feb 2019 11:04:39 +0000 (11:04 +0000)]
De-duplicate gmx_tmpnam and gmx_fopen_temporary

Extracted a common implementation function from gmx_tmpnam and
gmx_fopen_temporary, rather than duplicate the code. Noted TODOs for
further cleanup.

Change-Id: Iaaa0c87e270c9ba8436e2672737171f96afe67c3

5 years agoMove all nbnxm pruning details into module
Berk Hess [Fri, 22 Feb 2019 21:41:01 +0000 (22:41 +0100)]
Move all nbnxm pruning details into module

Change-Id: I906624a83992d1da81e5b2aef0f73c296986842c

5 years agoHide internals of nbnxm parlist
Berk Hess [Tue, 19 Feb 2019 14:02:27 +0000 (15:02 +0100)]
Hide internals of nbnxm parlist

Introduced the PairlistSet class which holds all data related
with the nbnxm pair lists. The actual details of the lists are
no longer available outside the nbnxm module.

Change-Id: If4f36a379f2a6a133435b8ee82de8abfed5c63fd

5 years agoAdd tests for ExclusionBlocks
Paul Bauer [Mon, 18 Feb 2019 14:30:16 +0000 (15:30 +0100)]
Add tests for ExclusionBlocks

Change-Id: I35d2e38e1ae29576f559bf2a2307f3ffb2d28cbe

5 years agoFormalize dynamic pruning with GPU emulation
Berk Hess [Fri, 18 Jan 2019 08:56:36 +0000 (09:56 +0100)]
Formalize dynamic pruning with GPU emulation

To unify code paths and to enable future cleanup, dynamic pruning
is now requested with nbnxn GPU emulation. Note that dynamic pruning
is not yet implemented with GPU emulation, but GPU emulation was
already broken. Now this is noted in the known issues file.

Change-Id: I88cc149420633643d5ed03bf90106d9e26fdbfa3

5 years agoMove free-energy kernel dispatch into nbnxm module
Berk Hess [Wed, 20 Feb 2019 17:17:06 +0000 (18:17 +0100)]
Move free-energy kernel dispatch into nbnxm module

Change-Id: I57a76dedff567ad946e970a06d779f9cf8ce475b

5 years agoReorganize release notes
Paul Bauer [Wed, 20 Feb 2019 10:45:27 +0000 (11:45 +0100)]
Reorganize release notes

Move 2020 release notes to their own directory, and add note to
developers for how they should set up the headers and issue references.

Change-Id: I16b77b063777646baae45382b57a0c65cbbb7651

5 years agoMinor nbnxm cleanup
Berk Hess [Wed, 20 Feb 2019 08:42:00 +0000 (09:42 +0100)]
Minor nbnxm cleanup

Removed typedef nbnxn_search_t and unused alloc/free functions.

Change-Id: I07436fd909867d2db9ff41b741b4ebc218623858

5 years agoRefactor t_molinfo to MoleculeInformation class
Paul Bauer [Wed, 13 Feb 2019 17:46:15 +0000 (18:46 +0100)]
Refactor t_molinfo to MoleculeInformation class

Refs #2833

Change-Id: I66a6afc8ade636fb3002492e6c4e1d30ae51019a

5 years agoClean up nbnxm enums
Berk Hess [Thu, 17 Jan 2019 13:25:50 +0000 (14:25 +0100)]
Clean up nbnxm enums

Converted the nbnxm kernel and ewald excl enums to enum classes.
Added resource, kernel setup and pairlist type enums.
Also made pairlistSets_ private.

Change-Id: Ic8ff8c59cf8a72d3462b8a0f7382cd1636136c40

5 years agoTest for LINCS and SHAKE constraints.
Artem Zhmurov [Tue, 15 Jan 2019 15:04:49 +0000 (16:04 +0100)]
Test for LINCS and SHAKE constraints.

This version updates the tests making the selection of the
constraining algorithm more abstract. Makes it possible
to use the same test routines for new implementations (e.g.
CPU- or GPU-based) or (and) algorithms (e.g. LINCS or SHAKE).
Partly this is preparation for the GPU-based version of
the constraints (Refs #2816).

Change-Id: Ice7dfdcc6d86c04656b0a1dd4e328c5afdb8a263

5 years agoSimplify make_pairlist() call signature
Berk Hess [Fri, 11 Jan 2019 15:34:13 +0000 (16:34 +0100)]
Simplify make_pairlist() call signature

The nonbonded_verlet_group_t struct is no longer needed now the local
and non-local interactions always use the same kernel types.
This simplifies the make_pairlist() and put_on_grid() call signature.
Removed direct access to kernel and ewald exclusion types from outside
the nbnxn module.
Merged the pruning setup and the transfer of the pairlist to the GPU
into nbnxn_make_pairlist().
Also removed the ePBC argument from nbnxn_put_on_grid().

Change-Id: Id96d7e5aa6ce846e9d38614f7edcdced89687799

5 years agoAdd havePPDomainDecomposition()
Berk Hess [Tue, 22 Jan 2019 13:29:15 +0000 (14:29 +0100)]
Add havePPDomainDecomposition()

When using 1 PP and 1 PME rank, non-local code paths were called
for with GPUs. Now the DOMAINDECOMP(cr) conditional for the paths
has been replaced by havePPDomainDecomposition().

Change-Id: I1b7036b0759a316c68d5c00bd5814b067c9fd9cd

5 years agoMerge "Merge branch 'release-2019' into master"
Paul Bauer [Wed, 20 Feb 2019 18:09:31 +0000 (19:09 +0100)]
Merge "Merge branch 'release-2019' into master"

5 years agoRefactor DLB region handling
Berk Hess [Fri, 25 Jan 2019 09:58:28 +0000 (10:58 +0100)]
Refactor DLB region handling

The DLB region was controlled with two clunky enums and several
separate functions. These are now replaced by a single class that
handles the conditionals and has the open/close functions as methods.

This change also disabled the DLB regions with 1 PP and 1 PME rank,
since DLB is not applicable in this case.

Change-Id: I8a375a46b855ec1f1fcdf6573f44a3bf553410b9

5 years agoMerge branch 'release-2019' into master
Paul Bauer [Wed, 20 Feb 2019 12:50:49 +0000 (13:50 +0100)]
Merge branch 'release-2019' into master

Kept the way topologyinformation was removed from solvate and
insert_molecules in 2019.

Resolved Conflicts:
cmake/gmxVersionInfo.cmake
docs/CMakeLists.txt
docs/user-guide/mdp-options.rst
src/gromacs/gmxpreprocess/insert-molecules.cpp
src/gromacs/gmxpreprocess/solvate.cpp
src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernel_utils.cuh
src/gromacs/mdlib/nbnxn_ocl/nbnxn_ocl_kernel_utils.clh
src/gromacs/mdlib/sim_util.cpp
src/gromacs/trajectoryanalysis/topologyinformation.cpp

Change-Id: I2576133c4bc7a3c55cedb29e9832bb5afa8fe76f

5 years agoFix release notes formatting
Paul Bauer [Fri, 15 Feb 2019 14:00:29 +0000 (15:00 +0100)]
Fix release notes formatting

Change-Id: Icea8712088068c14dbfcb20e403dd68f9aa11227

5 years agoPrepare for 2019.2
Paul Bauer [Wed, 13 Feb 2019 12:54:24 +0000 (13:54 +0100)]
Prepare for 2019.2

Reset doi strings.

Change-Id: I497ce4e5afe3a0f776dfba107e45d74bc51d4cc8

5 years agoPBC setup for GPU is moved into pbcutils.
Artem Zhmurov [Tue, 15 Jan 2019 16:11:14 +0000 (17:11 +0100)]
PBC setup for GPU is moved into pbcutils.

The CUDA device function setPbcAiuc is moved from listed-forces
to pbcutils so that other parts of the code can use it.

Change-Id: I8bbbadc95a6bc72f9abeba481981b66b192a2804

5 years agoAdd GMX_OCL_SHOW_DIAGNOSTICS env option
Roland Schulz [Sat, 28 Apr 2018 01:20:33 +0000 (18:20 -0700)]
Add GMX_OCL_SHOW_DIAGNOSTICS env option

Change-Id: Ie886544d40ff78fccd301b87d610ae8c42483b14

5 years agoImprove libstd++ handling
Roland Schulz [Mon, 28 Jan 2019 04:49:02 +0000 (20:49 -0800)]
Improve libstd++ handling

clang and icc use libstdc++ under Linux by default.

Previously such dependencies were handled differently than other
dependencies, in that we relied on the compiler autodetection, and
required the user to use the compiler flags to specify a proper
version.

Now we discover libstdc++ using cmake by finding g++, unless the user
or the toolchain they chose have already managed which gcc toolchain
to use. Then the found version is provided to the compiler with the
proper flags.

This has the advantages:
- Makes it easy for us to check the required version is used.
  Version check for libstdc++ 5 for C++14 is added.
- Makes it easy for the user to provide the correct version
  because standard cmake variables work.
- Makes build reproducible because the instance of libstdc++ used
  is constant (e.g. cached via GMX_GPLUSPLUS_PATH, or controlled
  by the toolchain, but not if the user chose non-reproducibility
  by setting CXXFLAGS environment variables). Previously, the
  auto-detection depended on the PATH environment variable at
  the time of build (not the time of the cmake run). Thus
  rebuilding with the same cache file was not guranteed to
  give the same result. It could cause cause confusing link
  errors if parts were rebuilt differently.

Also managed libc++ for clang-analyzer builds a bit better.

Fixes #2842

Change-Id: I855e16a6d4bd670cfb7acd6ea5c740f3a1b226bf

5 years agoPrecision fix for rescbt code.
David van der Spoel [Wed, 13 Feb 2019 19:13:58 +0000 (20:13 +0100)]
Precision fix for rescbt code.

The compute_restangles function was not sufficiently
precise. In fact it return completely different
results in single and double precision. By making part
of the function work in double the issue is fixed.

New tests added.

Part of #2795
Fixes #2862

Change-Id: Iad7f2bc45be996ba3e16358aab838c5427b157b8

5 years agoImprove GPU target compatibility error message
Szilárd Páll [Fri, 15 Feb 2019 15:10:38 +0000 (16:10 +0100)]
Improve GPU target compatibility error message

Change-Id: I53bff22da766c2e8bc083ca6c0e5a08d7ed3b408

5 years agoUse enum class for nbnxm locality
Berk Hess [Tue, 15 Jan 2019 08:35:04 +0000 (09:35 +0100)]
Use enum class for nbnxm locality

Converted the interaction and atom locality enum to enum class.
This exposed and fixed a few mixings of the two enums.
Move some files into the Nbnxm namespace.
Add local/non-local organization to the GPU timers.

Note that the use of the Nbnxm namespace outside the nbnxm module
is only temporary. This should all be replaced by methods.

Change-Id: I3c891b3b2b3e14d8175b63f4191f365a5cd64b18

5 years agoExtract nbnxm grid.h and pairlistwork.h
Berk Hess [Tue, 8 Jan 2019 15:09:10 +0000 (16:09 +0100)]
Extract nbnxm grid.h and pairlistwork.h

Change-Id: Ia0da75a21e56d7e473f868cc3758f415ac9e4eb9

5 years agoFix compiler warnings
Berk Hess [Sat, 16 Feb 2019 17:24:13 +0000 (18:24 +0100)]
Fix compiler warnings

Change-Id: I179eb5a53b14d2bcdc340468d2215a44fcd6a3a4

5 years agoMove nbnxm details from sim_util.cpp to module
Berk Hess [Thu, 10 Jan 2019 09:34:44 +0000 (10:34 +0100)]
Move nbnxm details from sim_util.cpp to module

The removes most nbnxm implementation details from sim_util.cpp.
The rest will be done when making nbnxn a class.

Change-Id: Iba411ce87b431a3b9aad656a22dd9114d5854546

5 years agoMove nbnxn files to nbnxm directory
Berk Hess [Fri, 4 Jan 2019 10:54:27 +0000 (11:54 +0100)]
Move nbnxn files to nbnxm directory

This change moves all files related to the nbnxn code to an new
nbnxm subdirectory. This change is only code motion and file renaming.
This is also the start of a renaming from nbnxn to nbnxm, which is
a more correct name, since the i- and j-cluster size can be different.
All nbnxn setup code in forcerec.cpp is moved to nbnxm_setup.cpp.
Removed nbnxn_ and _simd... pre- and postfixes from most files.
Renamed nbnxn_search.cpp to pairlist.cpp and nbnxn_search.h to
nbnxm_pairlistset.h. Although this is currently somewhat inconsistent,
future refactoring will make the contents consistent.
Renamed nbnxn_utility.h/cpp to nbnxm_geometry.h/cpp.

Change-Id: I39c17769c566f78b84211510c5ac17793fd131fa

5 years agoTests of restrained listed potentials.
David van der Spoel [Mon, 11 Feb 2019 19:25:50 +0000 (20:25 +0100)]
Tests of restrained listed potentials.

TODO:
- Tests of tabulated potentials.
- Tests of NMR related potentials.
- Tests of restrained angles.

Part of #2795

Change-Id: I27ebc7a5a8805cc92a8e00deb83e36ca3cd87a78

5 years agoFix memory leaks in editconf
Paul Bauer [Thu, 14 Feb 2019 16:07:59 +0000 (17:07 +0100)]
Fix memory leaks in editconf

Fixed all leaks found by valgrind.

Change-Id: I87c02051e3be772c9706c0995fc0e94bcebd7add

5 years agoExtend GpuEventSynchronizer to allow on-device sync
Szilárd Páll [Sat, 10 Nov 2018 20:16:57 +0000 (21:16 +0100)]
Extend GpuEventSynchronizer to allow on-device sync

Added a method that allows inserting a dependency on the synchronizer's
even into a stream passed.

Change-Id: I982ad99b594aab6a6042749260479debb12042a5

5 years agoFixed misleading wording for membed option.
Semen Yesylevskyy [Fri, 15 Feb 2019 11:15:26 +0000 (13:15 +0200)]
Fixed misleading wording for membed option.

It is currently wrritten "This approach is unsuitable" but it is only
unsuitable from the code organization point of view, not for conceptual
reasons.

Change-Id: I504bb2a78bdb85cc41aa67b492e2a0fac828d8e4

5 years agoAdd new suggested external trajectory analysis tool
Semen Yesylevskyy [Fri, 15 Feb 2019 11:00:18 +0000 (13:00 +0200)]
Add new suggested external trajectory analysis tool

Also reorder the  list alphabetically, to avoid appearance
of suggesting a preference.

Change-Id: I474d6064e8b119429e7a91e7a804bbe386339e05

5 years agoFix memory issues in preprocess
Paul Bauer [Tue, 12 Feb 2019 09:12:22 +0000 (10:12 +0100)]
Fix memory issues in preprocess

Refs #2833

Change-Id: Ic4118958d98446d3a164fca10c5618ad0da9bed6

5 years agoRefactor vsite topology
Paul Bauer [Wed, 13 Feb 2019 07:49:20 +0000 (08:49 +0100)]
Refactor vsite topology

Refs #2833

Change-Id: Ibde09f829a72cc5e6467e15cf8ee7e3c183a30ad

5 years agoVersion 2019.1
Paul Bauer [Wed, 13 Feb 2019 12:49:51 +0000 (13:49 +0100)]
Version 2019.1

Updated regression test hash.
Set DOI strings.

Change-Id: If56a4e81c853af49ebe6a908bb9cc8883d24a7bc

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