alexxy/gromacs.git
5 years agoAdd update groups to DD atom displacement
Berk Hess [Fri, 21 Sep 2018 14:32:14 +0000 (16:32 +0200)]
Add update groups to DD atom displacement

When using update groups, the DD cell size is limited by the
displacement of centers of geometry of update groups raher than
the displacement of atoms. This allows for smaller DD cells.

Change-Id: I3bf840d09d2ce770bd049c33624e577f7aa3b6a7

5 years agoChange to test TSAN with clang and libomp
Mark Abraham [Tue, 2 Oct 2018 09:48:59 +0000 (11:48 +0200)]
Change to test TSAN with clang and libomp

This permits openmp and simd to be tested with ThreadSanitizer

Used more of the safe gatherLoadUTranspose, since that is required
for Jenkins to pass.

Change-Id: I262a5e61b715679e23cee641cf3be553714644ce

5 years agoFix multiple bugs detected on Windows
Roland Schulz [Sun, 30 Sep 2018 19:09:03 +0000 (12:09 -0700)]
Fix multiple bugs detected on Windows

Change-Id: Ibcc1bcedcb292a0ec8f05069733adb2d127ddc5e

5 years agoOCL: Make variables const
Roland Schulz [Fri, 11 May 2018 04:27:52 +0000 (21:27 -0700)]
OCL: Make variables const

Change-Id: If191903b25389c62ade7193f8ebc909c7dbd740c

5 years agoAdd gmxapi::System.
M. Eric Irrgang [Fri, 28 Sep 2018 09:42:26 +0000 (12:42 +0300)]
Add gmxapi::System.

Allow a client to hold an abstract representation of a simulation system
described by a TPR input file. This is part of a series of changes to
allow MD simulations to be configured and launched through a high-level
API.

Supports gmxapi milestone 4

Refs #2605

Change-Id: I6a292a3fe91556d06b9c384b1480c891decffd3f

5 years agoUpdate test matrices with new GPU specifiers
Szilárd Páll [Tue, 4 Sep 2018 21:18:21 +0000 (23:18 +0200)]
Update test matrices with new GPU specifiers

Separates software stack and hardware requirement specification; the
latter is done using the new gpuhw=vendor syntax.

Note that OpenCL version specified is for now ignored (cmake support
in follow-up commit).

Refs #2161

Change-Id: Ia1dfb175b2d47579577c5588a71d8b69a1bff07b

5 years agoUse subgroup for warp_any and CJ4 prefetch
Roland Schulz [Sun, 29 Apr 2018 21:19:26 +0000 (14:19 -0700)]
Use subgroup for warp_any and CJ4 prefetch

Change-Id: I548d669d0125084d3b6533ad072e758ff9fe5cc1

5 years agoMake AVX2 pass TSAN
Berk Hess [Fri, 28 Sep 2018 12:19:22 +0000 (14:19 +0200)]
Make AVX2 pass TSAN

TSAN builds complain about the LINCS code because it reads (and
ignores) one extra element per rvec when gathering rvecs on x86.

Change-Id: Id2da42e3dd2a1ac66b892c503b053b6a6c716a1a

5 years agoReplace CUDA call deprecated in CUDA 10
Mark Abraham [Wed, 3 Oct 2018 19:22:48 +0000 (21:22 +0200)]
Replace CUDA call deprecated in CUDA 10

Change-Id: I0cb52f3b3a9d58ff4d0d3914e6a8855ea78b9594

5 years agoExtract helper functions for preparing for appending
Mark Abraham [Tue, 25 Sep 2018 13:41:02 +0000 (15:41 +0200)]
Extract helper functions for preparing for appending

This simplifies code so we can handle the log file pointer better.

Refs #2651

Change-Id: Ifa3114d125e89bf22081b05c5e739693c996f01b

5 years agoSimplify EM usage of mdebin
Mark Abraham [Thu, 6 Sep 2018 15:08:12 +0000 (17:08 +0200)]
Simplify EM usage of mdebin

t_state is not the source of any data we write to mdebin during EM,
so we can pass nullptr. Same for the box.

dh/dl output is not produced from EM, so no need to pass them from
the inputrec either.

Change-Id: If87f673671d665d9b3169d174b2c5d9e6f7e3436

5 years agoAdd note to avoid constraints=all-bonds
Berk Hess [Tue, 2 Oct 2018 19:03:30 +0000 (21:03 +0200)]
Add note to avoid constraints=all-bonds

grompp will now issue a note when using constraints=all-bonds with
Amber, CHARMM and OPLS-aa when using a time step smaller than 2.6 fs
and no virtual sites.

Change-Id: Ibe7a9989f202ad6072af156bd0f146a26d775c2c

5 years agoUse fast returns in md5 computation
Mark Abraham [Fri, 28 Sep 2018 13:27:33 +0000 (15:27 +0200)]
Use fast returns in md5 computation

This logic is easier to follow than a recycled ret integer

Change-Id: Idc47cdae3d0453f1645a82582b13c86aa8eadcb8

5 years agoChange acceptable precision in minimizer test
Paul Bauer [Wed, 3 Oct 2018 17:56:42 +0000 (19:56 +0200)]
Change acceptable precision in minimizer test

Changed to allow post-submit to pass on the ARM machines.

Change-Id: I8f7e37e5c00578c62b184d69bf699610e0dc1f34

5 years agoAllow using COM of previous step as PBC reference
Magnus Lundborg [Thu, 5 Jul 2018 11:59:46 +0000 (13:59 +0200)]
Allow using COM of previous step as PBC reference

Add an option, when pulling, to use the COM of the group of
the previous step, to calculate PBC jumps, instead of a reference
atom, which can sometimes move a lot during the simulation. When
there is no previous step (when the COM of the previous step is
not set) use the COM based on the reference atom. The COM of the
previous step is written to the checkpoint.

Fixes #2625

Change-Id: I6120b76a15f92167753463326125428f822848ab

5 years agoAdd end-to-end tests of energy minimization
Mark Abraham [Tue, 4 Sep 2018 19:08:11 +0000 (21:08 +0200)]
Add end-to-end tests of energy minimization

Reformed CMakeLists.txt so that we have fewer issues running into
timeouts for each test run from ctest. This means the energy
minimization tests are reasonble to run in OpenCL configurations.

Added some convenience overloads of test infrastructure.

Change-Id: I3b21afb30a3367963d9921950f0dac17a66f15d1

5 years agoDisable GMXAPI when only building mdrun
Paul Bauer [Wed, 3 Oct 2018 11:45:58 +0000 (13:45 +0200)]
Disable GMXAPI when only building mdrun

GMXAPI depends intrinsicly on the different modules in the libgromacs
library and does not function without them. To make sure it can only be
used when it can actually work, it has been now disabled when only mdrun
is being build.

Fixes #2663

Change-Id: I9cc50a0196aec921ff3e40ad6eca837dfa3e281b

5 years agoAdd gmxapi::Context.
M. Eric Irrgang [Fri, 28 Sep 2018 13:55:46 +0000 (16:55 +0300)]
Add gmxapi::Context.

The Context holds the details necessary to launch work in a given
environment. A runtime session is launched using the configured details
of a Context implementation and the object bindings configured by the
user (managed by the Context).

Part of a sequence of changes introducing gmxapi classes System,
Context, Session, and Workflow.

Supports gmxapi milestone 5

Refs: #2587

Change-Id: I75baed9b5c856f284bc2c2370ef284319e95f13e

5 years agoCombine private sections of Mdrunner definition.
M. Eric Irrgang [Fri, 28 Sep 2018 20:04:18 +0000 (23:04 +0300)]
Combine private sections of Mdrunner definition.

Move the private default constructor to be with the other private
declarations in the gmx::Mdrunner class definition to improve
readability. Minor reorganization should have no functional change.

Change-Id: I3875b5d3fa6b574f7b2c629469f4ad5fb3650b19

5 years agoBasic modernization of md5 handling
Mark Abraham [Fri, 28 Sep 2018 13:03:58 +0000 (15:03 +0200)]
Basic modernization of md5 handling

No logic changes here. Removed some dead code.  Used some
std::array. Renamed some variables per style.

Change-Id: Ib98ec2a579a47a7ce3fa7d1c946cc18084118504

5 years agoMove mdrun mainFunction to client code.
M. Eric Irrgang [Tue, 11 Sep 2018 10:01:50 +0000 (13:01 +0300)]
Move mdrun mainFunction to client code.

supports gmxapi milestone 4, described at #2605

API clients need to be able to initialize and run MD simulations with
calls from separate code blocks or even translation units. Also, we
need clear distinctions between a pre-launch master Mdrunner and the
non-master Mdrunner threads.

In this change:

* Insert a Builder on which to develop the distinction between user
  interface and implementation code. User interface is handled in
  Director code, while the Builder and code further down the mdrun call
  stack should be user interface agnostic (i.e. not CLI-centric).
* Introduces a Context object to hold some resources. (see milestone 5
  and issue #2587)
* Prepare for more stateful Mdrunner objects, documenting resources in
  need of clearer management, describing future use cases and possible
  implementation details.
* Make Mdrunner non-copyable and not constructable by clients. Worker
  threads can initialize a new Mdrunner from the master instance with
  cloneOnSpawnedThread.
* Clarify parameter setting for spawned Mdrunner threads.
* Begin to encapsulate filename options available to client code from
  the actual client code.
* Remove extraneous variables `nfile` and `fnm`.

Later changes will:

* Separate Mdrunner into Launcher and Worker at mdrunner() call so that
  tMPI runner does not look reentrant.
* Hide data and clarify ownership / modernize memory management /
  clarify the subjects of the Builder `add` operations.
* Clarify separation of user interface from API parameters.
* Flesh out SimulationContext and related classes.

Refs #2605

Change-Id: I1db1d34b07ec0f8ba5f246ab763c74ad9eafe8f3

5 years agoAdd test data for gmxapi.
M. Eric Irrgang [Thu, 23 Aug 2018 17:30:14 +0000 (20:30 +0300)]
Add test data for gmxapi.

Build input file for a small system for basic gmxapi testing.

These test files either come from the mdrun tests or from manipulation
of that data. With access to test data and API tools to manipulate
input configurations, these files can be moved or removed.

Relates to gmxapi milestone 20 as described in issue #2585

Change-Id: I0eeb1d15120d3eb5309ec38c57e4e6f60097885a

5 years agoAdd gmxapi exceptions.
M. Eric Irrgang [Thu, 23 Aug 2018 17:35:58 +0000 (20:35 +0300)]
Add gmxapi exceptions.

Establish a base class and a couple of specific exceptions that may be
encountered by an API client. Distinct from gmx::GromacsException to
minimize coupling between GROMACS core and gmxapi at this stage of
development. It is an error for gmxapi operations to emit a
gmx::GromacsException because it is not easily caught by client code
using gmxapi/exceptions.h. The exception hierarchy should be merged in
the future, but until then, gmxapi implementation code should catch and
either usefully handle GromacsExceptions for the client or translate it
to something the client can catch.

Change-Id: I24042f71f77fac827bde3b2df1c3c1121befe9b5

5 years agoRemove unnecessary clearing in gmxcpp
Berk Hess [Tue, 2 Oct 2018 18:39:39 +0000 (20:39 +0200)]
Remove unnecessary clearing in gmxcpp

Change-Id: Ibc86e930e3e9acc01eb13e8c9b7fef6f648ca9e1

5 years agoConvert gmx_cpp to C++
Berk Hess [Tue, 2 Oct 2018 09:39:30 +0000 (11:39 +0200)]
Convert gmx_cpp to C++

This change in only refactorting inside gmxcpp.cpp.
No functional changes, except that all functions are now threadsafe
and whitespace is removd in find_directive() instead of in
process_directive().

TODO: Replace the linked list and handle swapping by a simple list.
TODO: The caller should not own the line string.

Change-Id: I4f95f5b1a2189fd58c2c7ee4329e84ada9f20811

5 years agoFix include formatting in gmxapi
Paul Bauer [Mon, 1 Oct 2018 10:38:31 +0000 (12:38 +0200)]
Fix include formatting in gmxapi

A source file triggered the reformatting in check source, fixed now.

Change-Id: Ica8a7905cbd76680b197a1912a032a32f46ef4a8

5 years agoAdd gmxapi::Status.
M. Eric Irrgang [Thu, 23 Aug 2018 17:34:48 +0000 (20:34 +0300)]
Add gmxapi::Status.

The class is very minimal, but provides a placeholder so
that other API operations have a stable return value. It
is used in cases where some other return value has no
obvious choice or is not implemented.

Relates to gmxapi milestone 17. Refs #2610.

Change-Id: I23675b4f3bd022ea6986b2e95ca838185327a8b7

5 years agoUse subgroup shuffle for reduction
Roland Schulz [Thu, 26 Apr 2018 05:25:40 +0000 (22:25 -0700)]
Use subgroup shuffle for reduction

Change-Id: I121821e70836111adccd0619db992037af6bee3c

5 years agoUpdate DD cutoffs for update groups
Berk Hess [Tue, 18 Sep 2018 12:11:42 +0000 (14:11 +0200)]
Update DD cutoffs for update groups

Due to the distance between atoms to the center of geometry of the
update group they belong to, there is now a difference between
atom-atom, domain-domain and atom-domain cutoffs.
Also adds the cutoff versus box check for update groups.

Change-Id: I474cd1371a1fac22f26b80adcc235bfb10764d34

5 years agoReduce mdrun tests using group scheme
Mark Abraham [Mon, 1 Oct 2018 06:48:01 +0000 (08:48 +0200)]
Reduce mdrun tests using group scheme

Made a legacy test binary for the remaining test cases (those for TPI)
so that we can start running the others also with OpenMP.

Made ctest run Verlet-scheme tests by default with 2 OpenMP threads.
Later we can make this work better, but first we need something
running.

Change the name of the OpenMP thread count selection option to be
consistent with mdrun.

Change-Id: Id8203bf5cf2870975fda35dcf91bfd4e601afbe7

5 years agoNarrow scope of ICC compiler work-around
Roland Schulz [Tue, 2 Oct 2018 02:15:23 +0000 (19:15 -0700)]
Narrow scope of ICC compiler work-around

Only Update 0 is affected. Neither 2017 or 2019 is.

Change-Id: Id29125e4f77709cf60e73c7708a3b80ba50b93be

5 years agoFix gcc-8 warnings about strings
Mark Abraham [Thu, 27 Sep 2018 18:41:49 +0000 (20:41 +0200)]
Fix gcc-8 warnings about strings

A bunch of slightly risky string handling is now safer or simpler.

Refs #2645

Change-Id: I0e02a34ecf7be16135e406ba2aaefab8a6e6ba39

5 years agoChange get_atom_index to return int
Paul Bauer [Sat, 29 Sep 2018 09:21:41 +0000 (11:21 +0200)]
Change get_atom_index to return int

Needed for writing with atom indices obtained directly from the
mtop helper function.

Change-Id: I502ad45d8237ff3f4162d3fa2083192f019254d5

5 years agoAdd release notes for removing non-reproducible aspects
Mark Abraham [Mon, 1 Oct 2018 14:34:51 +0000 (16:34 +0200)]
Add release notes for removing non-reproducible aspects

Recent change didn't have release notes, and should.

Change-Id: Ibdc3a8e3e7b9a36182946c94d3148802f24ceb22

5 years agoTests for md5 computation on open files
Mark Abraham [Thu, 27 Sep 2018 09:24:13 +0000 (11:24 +0200)]
Tests for md5 computation on open files

Needed to support planned refactoring.

Also some improvements to filename handling in futil to remove
arbitrary small limit, so that real-world filename lengths will work.

Change-Id: I8a353bfc76bde1bffa320ed398d4bc7ac6e3859b

5 years agoCorrect update group angle param type
Berk Hess [Sat, 29 Sep 2018 21:33:58 +0000 (23:33 +0200)]
Correct update group angle param type

The update group radius calculation incorrectly used the t_iparams
linangle union entry instead of harmonic for normal angle potentials.

Change-Id: If60ad0ea9ce01d80d4285e73ef6f8763fefbdf2b

5 years agoDo not gather CPU, user and host info about the build host
Bernhard M. Wiedemann [Tue, 7 Aug 2018 19:12:40 +0000 (21:12 +0200)]
Do not gather CPU, user and host info about the build host

as it is rather irrelevant, but makes the build results vary
across hosts (sometimes even with different microcode versions).
See https://reproducible-builds.org/ for why this matters.

Bumped checkpoint version number, as the header information
is now semantically different. All code versions can still
read checkpoints as well as they used to be able to.

Change-Id: Ifec9d03001ba1826f900d092c359bca1d218f7f7

5 years agoRemove NVML support
Mark Abraham [Thu, 27 Sep 2018 15:20:02 +0000 (17:20 +0200)]
Remove NVML support

Net value for this feature isn't high enough to maintain it.

gmx_device_info_t can now be used const-correct in many more places.

Fixes #2655

Change-Id: I2fac7d8b5613bee3fe0a6020862fc57224f7f6c4

5 years agoFix constraints cycle counting
Szilárd Páll [Wed, 26 Sep 2018 00:47:46 +0000 (03:47 +0300)]
Fix constraints cycle counting

Cycle counter start/stop calls were misplaced after earlier refactoring
of the constraints code.
This change fixes the duoble-counting issues introduced and makde some
minor code simplifications.

Fixes #2652

Change-Id: I5aaed801320b11a848530b97274bc562f34fbcfe

5 years agoRefactoring in calc_verletbuf.cpp
Berk Hess [Fri, 21 Sep 2018 10:51:19 +0000 (12:51 +0200)]
Refactoring in calc_verletbuf.cpp

Replaced all list pointers by std::vector.
Used extractILists to simplify code.

Change-Id: Idc2c5d8169e765340d150e2638f84783e092a6af

5 years agoStop ICC ICE
Mark Abraham [Wed, 26 Sep 2018 10:25:13 +0000 (12:25 +0200)]
Stop ICC ICE

Fixes #2648

Change-Id: I52929b347b5a5b4fa44b63b2e9397f581e03d3c3

5 years agoAdd UpdateGroupsCog to DD
Berk Hess [Wed, 19 Sep 2018 20:46:24 +0000 (22:46 +0200)]
Add UpdateGroupsCog to DD

Change-Id: I8602af8311a992c5d584b8b55da45a2af1941f54

5 years agoUse more default initialization of mdrun structs
Mark Abraham [Wed, 26 Sep 2018 10:01:19 +0000 (12:01 +0200)]
Use more default initialization of mdrun structs

Such plain-data structs should be implemented so that
compiler-generated default functions will do the right things, so that
they can be embedded in more complex objects that need such
behaviours.

Change-Id: Id50b6971ff1da4b54b92864f716e7f0b6aa7f604

5 years agoMake some symbols in gmxpre-config.h always defined
Mark Abraham [Wed, 26 Sep 2018 12:09:28 +0000 (14:09 +0200)]
Make some symbols in gmxpre-config.h always defined

Made related minor simplifications in a few places.

Fixes #2654

Change-Id: Ie3245c78f1f88bd9df6f81c86f8f04dae2ceb45c

5 years agoRecognize Intel GPU as compatible
Roland Schulz [Sat, 28 Apr 2018 06:24:58 +0000 (23:24 -0700)]
Recognize Intel GPU as compatible

Note new hardware support in the user guide
Also enable I_PREFETCH by default

Fixes #2030

Change-Id: I9c3efe70df4d273e463bf49f5ae4f0959a590ebe

5 years agoMove maxReferenceTemperature() to inputrec
Berk Hess [Wed, 26 Sep 2018 10:09:22 +0000 (12:09 +0200)]
Move maxReferenceTemperature() to inputrec

The maxReferenceTemperature() is more generally useful, so it is
moved from calc_verletbuf.cpp to inputrec.h/cpp.

Change-Id: Id9d1ac445510dbed6c16cf05c75e0cd397816550

5 years agoImprove update group radii
Berk Hess [Tue, 25 Sep 2018 13:30:43 +0000 (15:30 +0200)]
Improve update group radii

The update group radii computation could return too small values
for exotic topologies. Now the worst case estimate is used, unless
all atoms in an update group are connected by angle potentials.
In the latter case the radius is determined assuming deformed
conformations for a given temperature. Tests for this have been added
with different temperature values.

Change-Id: I085b345f6f9833a048be69afd8e8857d1c44110e

5 years agoReorganize RVec scaling functions
Berk Hess [Thu, 27 Sep 2018 06:35:17 +0000 (08:35 +0200)]
Reorganize RVec scaling functions

The RVec scale() function and method were confusingly named, sas they
did not actually scale the vector, but only returned a scaled vector.
These are now replaced by the * operator. Also added the / operator.
Added *= and /= operators to actually scale a vector.

Change-Id: I68d1cd453a18862c53f128dbfcd216868ba88a13

5 years agoReduce preprocessor dependency in resourcedivision.cpp
Kevin Boyd [Mon, 3 Sep 2018 18:55:47 +0000 (14:55 -0400)]
Reduce preprocessor dependency in resourcedivision.cpp

Also added some constexpr

Also broke up some long text blocks

Change-Id: I28a8207008d65fe39c10429542f44373ba0bbafd

5 years ago(Re-)fix typo in DD load balancing printing
Pascal Merz [Wed, 26 Sep 2018 23:12:25 +0000 (17:12 -0600)]
(Re-)fix typo in DD load balancing printing

Seems I42dcb3e5a8fa64f80cf480f4838a9f7fa70e03cd got lost in
Id3fcf6594b6f97129c72fe6f44c54d5c20afa11d. This patch restores that fix.

Change-Id: Ibaffe7f3b36ab9a298cc2713603a04965e658c9a

5 years agoExtract settle test water coordinates
Berk Hess [Mon, 24 Sep 2018 11:37:28 +0000 (13:37 +0200)]
Extract settle test water coordinates

These coordinates will be used by other tests as well.

Change-Id: I4e0ad7ac6c540d31a3565a0cfe004136e2431f36

5 years agoAdded pullCheckPbcWithinGroup() to check one group
Magnus Lundborg [Tue, 25 Sep 2018 11:33:05 +0000 (13:33 +0200)]
Added pullCheckPbcWithinGroup() to check one group

This function checks if a single group obeys PBC restrictions.

Change-Id: I26e99335c9d127ada1a229597bce489416b21408

5 years agoClarify distinct paths for mdrun log file handling
Mark Abraham [Tue, 25 Sep 2018 11:48:22 +0000 (13:48 +0200)]
Clarify distinct paths for mdrun log file handling

Opening for appending is actually handled in the checkpointing code,
which is now explicit in mdrunner.

Also handled the error case when the log file cannot be opened.

Also removed unnecessary dependency on commrec.

Refs #2651

Change-Id: I0b8c7756a08c3d786571e7936e7f8f327fd17947

5 years agoSupport atom groups in nbnxn_search
Berk Hess [Thu, 30 Aug 2018 12:20:24 +0000 (14:20 +0200)]
Support atom groups in nbnxn_search

When atoms groups are use in the pair search instead of atoms,
the atoms can be slightly outside the grid. This change takes
that into account for distance checks. The actual gridding of
atom groups instead of atoms is in a separate change.

Change-Id: Icf3a4a3a422f0d9ad0ab74e3ceeff2e7da791ca5

5 years agoAllow explicit reset of simulation stop condition.
M. Eric Irrgang [Fri, 24 Aug 2018 11:26:41 +0000 (14:26 +0300)]
Allow explicit reset of simulation stop condition.

Grant client code the ability to reset the global stop condition. This
is a necessary (but not sufficient) provision to allow multiple
simulations in the lifetime of a single process.

Change-Id: Ib755b9bffc71aef43c6e20988f2ae9994cb426b4

5 years agoAdd UpdateGroupsCog class
Berk Hess [Tue, 21 Aug 2018 08:13:32 +0000 (10:13 +0200)]
Add UpdateGroupsCog class

Added class for managing the centers of mass of update groups.
Also added a test.

Change-Id: Ife6c996056e758c9f0fc02d1043a20d745dc3ac8

5 years agoAdd margin as input to pullGroupObeysPbcRestrictions
Magnus Lundborg [Tue, 25 Sep 2018 08:38:03 +0000 (10:38 +0200)]
Add margin as input to pullGroupObeysPbcRestrictions

Make it possible to specify the margin when checking that a pull
group is not too large (compared to the PBC dimensions).

Change-Id: I1a856ae6078c085693ed7add4cf765b5a49abc2d

5 years agoRemove obsolete braces in do_md()
Pascal Merz [Tue, 25 Sep 2018 05:39:20 +0000 (23:39 -0600)]
Remove obsolete braces in do_md()

In I17c9ae4c1c88bdb328e17e75fec55a558613cff0, we removed the rerun
functionality from do_md(), but left a pair of braces to make rebasing
and reviewing easier. This change removes these obsolete braces.

Change-Id: I67d10f19022149de50696eb25502f5412b366424

5 years agoRemove rerun from do_md
Pascal Merz [Mon, 20 Aug 2018 06:39:56 +0000 (00:39 -0600)]
Remove rerun from do_md

As the rerun functionality is handled in a separate function now, this
commit removes rerun from do_md.

refs #1868

Change-Id: I17c9ae4c1c88bdb328e17e75fec55a558613cff0

5 years agoRemove unnecessary functionality from do_rerun
Pascal Merz [Mon, 17 Sep 2018 20:08:07 +0000 (14:08 -0600)]
Remove unnecessary functionality from do_rerun

As discussed in task #1868, the rerun functionality gets reduced to essentially
"take a configuration and calculate forces and energies". If the trajectory contains
velocities, they are ignored. This allows to remove a lot of functionality from
do_rerun, which is done in this commit.

Functionality removed includes

    * Reading of velocities in reruns (reruns won't contain kinetic energy)
    * Constraints
    * Temperature / pressure coupling
    * Essential dynamics
    * Interactive MD
    * Simulated annealing
    * Multisimulations
    * AWH
    * Expanded ensemble
    * Replica exchange
    * Checkpointing
    * Counter resetting (no benchmarking)
    * PME tuning
    * FAHCORE
    * EnergyHistory

The following quantities are not reported:

    * Kinetic energy
    * Total energy
    * Conserved energy
    * Temperature(s)
    * Pressure, pressure tensor, and pressure dispersion correction
    * Virial tensor(s)

This change also changes the rerun tests not to test for correct
reproduction of the velocities (since they are intentionally set
to zero), and adds some information to the documentation.

Refs #1868

Change-Id: I522d56a610f2a6ff189484c9311b6f53c775ed47

5 years agoPrepare rerun commit
Pascal Merz [Mon, 20 Aug 2018 06:08:42 +0000 (00:08 -0600)]
Prepare rerun commit

In Task #1868, we will break out rerun from the do_md code. This
results in new files, rerun.{h,cpp}, containing a do_rerun function
which includes only the portions of code in do_md which are relevant
for rerun. It does, however, make sense to diff this new function to
the current do_md to be able to review the changes made. This commit
therefore duplicates the current md.{h,cpp} files to allow for easier
reviewing of the following changes. It does also change runner.cpp to
send any rerun through the new code path. This allows to create to
independent follow-up commits, namely
1 Cleaning up do_md() [I17c9ae4c1c88bdb328e17e75fec55a558613cff0], and
2 Cleaning up do_rerun() [I522d56a610f2a6ff189484c9311b6f53c775ed47].
Commit 1 will thereby likely be easy to review and merge, while
commit 2 might require more discussion.

Refs #1868

Change-Id: I832ce07e3c5932a42151983deb8f527f988b2a2e

5 years agoFix gmxapi::Version test regression.
M. Eric Irrgang [Tue, 18 Sep 2018 15:08:38 +0000 (18:08 +0300)]
Fix gmxapi::Version test regression.

During code review, the feature names in the hasFeature() test were
rejected, but they slipped into the commit anyway. This change removes
the objectionable preemptive feature names and attempts to clarify the
test and API, per conversation during code review.

Change-Id: I134249a7bae66a78b878e501e702f6d2d691706a

5 years agoFix performance report when init_step!=0
Berk Hess [Mon, 24 Sep 2018 08:31:18 +0000 (10:31 +0200)]
Fix performance report when init_step!=0

Change-Id: Ia4e15c2fb9b0e3debe7fc7f2aa8a1cdf346f90cb

5 years agoFix Doxygen links
Mark Abraham [Fri, 14 Sep 2018 13:47:17 +0000 (15:47 +0200)]
Fix Doxygen links

Change-Id: Ifa0117d53ea29747fd88ff4c9955248d7d4c8346

5 years agoLeak less from gromppp with cmap
Mark Abraham [Sun, 23 Sep 2018 21:58:46 +0000 (23:58 +0200)]
Leak less from gromppp with cmap

Change-Id: I9995615e1c0281cf945b45970a906bf14552f0ef

5 years agoAdd gmxapi::MDModule.
M. Eric Irrgang [Thu, 23 Aug 2018 17:39:11 +0000 (20:39 +0300)]
Add gmxapi::MDModule.

Provide basic framework for passing objects between object libraries.
Describe protocol for managing object lifetimes and sharing ownership
across API environments (such as Python, C, and C++) with minimal
dependencies.

Supports gmxapi milestone 7:

Refs #2585

Change-Id: I206adb7341b3005dd56137e7c7df207a08dd41c2

5 years agoAdd update groups boolean to DD
Berk Hess [Wed, 27 Jun 2018 07:52:53 +0000 (09:52 +0200)]
Add update groups boolean to DD

Change-Id: I8b6c8e126974982ed4ca20dc1a10f064413219fb

5 years agoRename DD constraint booleans
Berk Hess [Tue, 18 Sep 2018 12:46:48 +0000 (14:46 +0200)]
Rename DD constraint booleans

This is preparation for adding update groups

Change-Id: I135abe196569c6e1a7dde535c8e616e1a479bcac

5 years agoAdd update groups
Berk Hess [Thu, 17 May 2018 22:22:37 +0000 (00:22 +0200)]
Add update groups

Adds functionality for detecting update groups, covered by tests.
Update groups are group that can be updated independently,
i.e. vsite are constructed from atoms with the group and constraints
only act on atoms within the group.
The functionality is not used yet.

Change-Id: I958983bc9010999cc7ce33b26daf587eda632c36

5 years agoBump test timeout only for OpenCL integration tests
Szilárd Páll [Fri, 21 Sep 2018 15:09:52 +0000 (17:09 +0200)]
Bump test timeout only for OpenCL integration tests

The OpenCL JIT time can make the mdrun integration tetsts time out, so
we need to bump the timoeouts. This change enables a double (240
seconds) timeout only for OpenCL builds.

Fixes #2529

Change-Id: Id0dd3a13f7b5edc5642bbae65de44c125993c7d5

5 years agoFix clang-tidy warnings for clang 7
Roland Schulz [Wed, 19 Sep 2018 19:57:15 +0000 (12:57 -0700)]
Fix clang-tidy warnings for clang 7

Disable clang-analyzer because we run analyzer as seperate job.
Disable cppcoreguidelines-avoid-goto because it is easy to spot
in code-review and has very rare good uses.

Change-Id: Ibfeb8ba6b14012b0079e7eef15282e0e2b6538fc

5 years agoMake CGLO_CHECK_NUMBER_OF_BONDED_INTERACTIONS require global communication
Pascal Merz [Thu, 20 Sep 2018 22:19:27 +0000 (16:19 -0600)]
Make CGLO_CHECK_NUMBER_OF_BONDED_INTERACTIONS require global communication

Currently, giving the CGLO_CHECK_NUMBER_OF_BONDED_INTERACTIONS flag, but
none of CGLO_TEMPERATURE, CGLO_STOPCM, CGLO_PRESSURE, CGLO_CONSTRAINT, or
CGLO_ENERGY does not prompt global_stat() in compute_globals(). This has
currently no implications because this specific flag is never set without
at least one of the others, but it is not intuitive and becomes a problem
when setting up a rerun without temperature calculation. This change fixes
this.

Refs #1868, #2647

Change-Id: I53b4dd9a1b7b273f1ce99e8e8c78bf386a693842

5 years agoFixes a bug in pull group size calculation
Magnus Lundborg [Fri, 21 Sep 2018 07:14:41 +0000 (09:14 +0200)]
Fixes a bug in pull group size calculation

The wrong atom indexes were used when checking the coordinates
of atoms in a pull group (commit aa102e691d59b4de37c8e4).
That lead to false reports of too large pull group
(and presumably false negatives). This fixes the problem.

Refs #2397

Change-Id: Ib7d7e648204c0d1b219714610de7fb5842713048

5 years agoUpdate to test with clang-7
Mark Abraham [Wed, 19 Sep 2018 14:11:41 +0000 (16:11 +0200)]
Update to test with clang-7

Change-Id: I7087119efc67390d152dbf06d83ddb59d5c0e1e9

5 years agoSeparate methods to create localtop and t_topology
Paul Bauer [Wed, 12 Sep 2018 14:34:08 +0000 (16:34 +0200)]
Separate methods to create localtop and t_topology

Made a separate method for creating t_topology from gmx_mtop_t instead
of going through the unsafe way of using gmx_localtop_t as an
intermediate.

Change-Id: Ia57c22839d08a97b9189dfe534c35588291a469f

5 years agoAlways use mtop constructor
Paul Bauer [Wed, 19 Sep 2018 08:45:36 +0000 (10:45 +0200)]
Always use mtop constructor

Remove init_mtop and always use the mtop constructor for initializing
a gmx_mtop_t.

Also change ffparams and cmap to be initialized from the start.

Change-Id: Ieaf89a501ebbc29d31435305927332a3926d0c07

5 years agoChange pull buffers to std::vector
Berk Hess [Thu, 26 Apr 2018 15:28:45 +0000 (17:28 +0200)]
Change pull buffers to std::vector

Change-Id: Ic9a3521e52c86a4fac70ad52e53e27d977f124cc

5 years agoFix type bug in trilinic DD code
Berk Hess [Thu, 20 Sep 2018 07:58:58 +0000 (09:58 +0200)]
Fix type bug in trilinic DD code

An off-diagonal triclinic box coupling variable was int instead of
real. For postive off-diagonal box elements the only led to (slightly)
more atoms being communicated. For, unusual, negative off-diagonal
elements this could cause to few atoms to be communicated.

Change-Id: I4cc2cd00aaee79359e32342615c818ba134054b3

5 years agoChange names of gmxapi::Version functions.
M. Eric Irrgang [Tue, 18 Sep 2018 14:54:04 +0000 (17:54 +0300)]
Change names of gmxapi::Version functions.

major() and minor() member functions clash with a historical macro,
producing compiler warnings. Change names to majorVersion(), etc.

Fixes #2646

Change-Id: I568ab1dc216b200b182b34f76016fbfa54015dbd

5 years agoConvert gmx_cmap_t to C++
Berk Hess [Tue, 18 Sep 2018 23:48:09 +0000 (01:48 +0200)]
Convert gmx_cmap_t to C++

Change-Id: I023328eeb9432c6cb3ee96b7f5c0f5960f97d6bc

5 years agoConvert gmx_ffparams_t to C++
Berk Hess [Tue, 18 Sep 2018 21:23:04 +0000 (23:23 +0200)]
Convert gmx_ffparams_t to C++

Note that gmx_cmap_t still needs to be converted.

Change-Id: Ib695962c08b7cba539a9604077cc372d795b1647

5 years agoDocumentation fix: Rerun and nstlist
Pascal Merz [Tue, 18 Sep 2018 22:57:09 +0000 (16:57 -0600)]
Documentation fix: Rerun and nstlist

The current code is not, as written in the documentation, behaving differently if
`nstlist == 0`. The relevant code part in `md.cpp` (line 312+) reads

    const gmx_bool bRerunMD      = mdrunOptions.rerun;
    int            nstglobalcomm = mdrunOptions.globalCommunicationInterval;

    if (bRerunMD)
    {
        /* Since we don't know if the frames read are related in any way,
         * rebuild the neighborlist at every step.
         */
        ir->nstlist       = 1;
        ir->nstcalcenergy = 1;
        nstglobalcomm     = 1;
    }

This change adapts the documentation to reflect what we're is actually doing.

Change-Id: I2292c675e0798f7e500ac3438a61872accabf21c

5 years agoIntroduce extractILists helper function
Berk Hess [Mon, 17 Sep 2018 07:56:57 +0000 (09:56 +0200)]
Introduce extractILists helper function

Change-Id: I768da6d065366992d556f0fa046b2ee28417e2fc

5 years agoSeparated partitioning and dlb code within domdec
Mark Abraham [Sun, 16 Sep 2018 12:39:59 +0000 (14:39 +0200)]
Separated partitioning and dlb code within domdec

Improves modularization, so that e.g. touching PaddedVector
implementation doesn't recompile the whole domdec module, and every
client.

This is pure code movement, no functional changes except to visibility
of functions between translation units and gmx_bool to bool changes.

Change-Id: Id3fcf6594b6f97129c72fe6f44c54d5c20afa11d

5 years agoIntroduce stop handler
Pascal Merz [Wed, 29 Aug 2018 14:40:56 +0000 (08:40 -0600)]
Introduce stop handler

This change introduces a stop handler which encapsulates the
setting and handling of stop signals, and owns the bLastStep boolean
(which is, however, currently mirrored as a local variable in do_md for
convenience). This cleans up the do_md loop, exchanging several lines
of code by a single command. To set the signal, the StopHandler object
loops over a vector of stop condition functions registered previously
with a helper object of type StopHandlerHelper. This allows to formulate
different conditions, and only build them if the current setup requires
them (e.g. only have a stop criterion based on time if a maximal run
time was set, only build stop conditions on master rank, ...).

The stop handler itself is created in do_md by a helper object owned by
the calling code. The helper object offers an interface to register
stop conditions via std::function objects. This allows higher-level
code to inject stop conditions.

Refs #1793

Change-Id: Ia9077841d96a9bc6d6f000eef4093e9fbd9f5363

5 years agoIntroduce checkpoint handler
Pascal Merz [Tue, 28 Aug 2018 21:06:55 +0000 (15:06 -0600)]
Introduce checkpoint handler

This change introduces a checkpoint handler which encapsulates the
setting and handling of checkpoint signals, and owns the bCPT boolean.
This cleans up the do_md loop, exchanging several lines of code by
a single command. It also makes a step towards a task-based design by
only calling the internal functions when necessary (if checkpointing
is enabled, signal setting only on master), and by owning as much
data as possible.

Refs #1793

Change-Id: I05ca7abc9e81c9a8deacb6b81086e1077524d005

5 years agoIntroduce reset handler
Pascal Merz [Tue, 28 Aug 2018 22:55:42 +0000 (16:55 -0600)]
Introduce reset handler

This change introduces a reset handler which encapsulates the
setting and handling of resetting signals, and the actual counter resetting.
This cleans up the do_md loop, exchanging several lines of code by
a single command. It also makes a step towards a task-based design by
only calling the internal functions when necessary (if counter resetting
was requested, signal setting only on master).

Refs #1793

Change-Id: I5dec051cd3a0c0b3b52dfe69a72dac7f7e9f65ed

5 years agoAdd not_null from GSL
Mark Abraham [Thu, 13 Sep 2018 12:45:30 +0000 (14:45 +0200)]
Add not_null from GSL

This can't be fully featured before C++14, but it is useful
now. Permits us to implement CppCoreGuidelines I.12, F.23, F.25, and
updates the style guide accordingly.

Change-Id: I7da884de83f68c35d52ba01ec4e868da48574e1b

5 years agoFix bitmask printing
Roland Schulz [Tue, 18 Sep 2018 04:56:35 +0000 (21:56 -0700)]
Fix bitmask printing

Change-Id: I0e9294ad734dfd682cfea3a31011a9b9c7fb9034

5 years agoRefactor ddbox handling
Berk Hess [Mon, 17 Sep 2018 11:06:43 +0000 (13:06 +0200)]
Refactor ddbox handling

Removed inputrec as argument to ddbox functions.
Changed all const pointers to references, this trickles down to
the PME load balancing code.
This is preparation for update groups addition to DD.

Change-Id: Ibc1c8b0f53397e4d15df7aeaa6f8561bd32e9a18

5 years agoFramework in which to build gmxapi.
M. Eric Irrgang [Fri, 24 Aug 2018 13:35:54 +0000 (16:35 +0300)]
Framework in which to build gmxapi.

Establish a clean slate in which to develop the new external GROMACS
interface. Introduces `libgmxapi` and installed headers in
`include/gmxapi/` to provide a stable C++ interface.

Note that this commit has several inconsistencies with the gmxtree
policies, and src/api/cpp/* has been added to
docs/doxygen/suppressions.txt to avoid testing noise while these issues
are resolved. They are mostly of the following sort.

1. includes non-local file as "gmxapi/version.h"
2. does not include "gmxpre.h" first

The public interface is separated into a separate directory that does
not fit the current pattern for installed headers, and there is code
that specifically builds against the public interface that should not
include library headers, like "gmxpre.h". Discussion and tasks to
resolve policy and apply appropriate checks is at Redmine issue #2586
(gmxapi milestone 2)

Refs #2586

Change-Id: I1eb8ea75fdaea77e0ce03f2d312c44db8df16f28

5 years agoProperly initialize idef in topologies
Paul Bauer [Wed, 12 Sep 2018 09:40:22 +0000 (11:40 +0200)]
Properly initialize idef in topologies

Adds and uses functions to properly initialize and clean up
idef structure in topologies.

This is preparing for changes that no longer use snew for
allocating topology datastructures.

Change-Id: Iabad6d95bc994f4b292c063572a6d83e7f02036d

5 years agoMove ifunc stuff from idef.h to ifunc.h
Berk Hess [Mon, 17 Sep 2018 07:37:10 +0000 (09:37 +0200)]
Move ifunc stuff from idef.h to ifunc.h

Interaction function definitions were spread over ifunc.h and idef.h.
Also changed some macros to constexpr or inline functions.
Changed interaction_function.flags to unsigned int.
Added ifunc.h to installed headers, as it is now required.

Change-Id: I285413f9474866b1fe52e635188763b1c9ee9f95

5 years agoRefactor pdb2gmx in c++ framework
Joe Jordan [Thu, 5 Jul 2018 17:40:48 +0000 (19:40 +0200)]
Refactor pdb2gmx in c++ framework

Put pdb2gmx into c++ framework using modern options.

The focus here is on keeping what the user sees the
same. As yet, minimal effort has been put into
making the the whole code into modern c++.

Change-Id: I6dd750d0761c474415c02e9ae36d7ddb1fbbda10

5 years agoAdded basic tests for gmx msd
Kevin Boyd [Sun, 16 Sep 2018 18:42:29 +0000 (14:42 -0400)]
Added basic tests for gmx msd

Change-Id: I35d765d9a68d4723bf0a968d07453a268ed4e78a

5 years agoChange pointers to InteractionList to references
Berk Hess [Sat, 15 Sep 2018 21:02:13 +0000 (23:02 +0200)]
Change pointers to InteractionList to references

Change-Id: Ia2431137e7326a4fa68083b0e50a82455b426c86

5 years agoFix typo in DD load balancing printing
Pascal Merz [Mon, 17 Sep 2018 04:40:41 +0000 (22:40 -0600)]
Fix typo in DD load balancing printing

Removed superfluous string format specifier (%s).

Change-Id: I42dcb3e5a8fa64f80cf480f4838a9f7fa70e03cd

5 years agoRefactoring in DD redistribute
Berk Hess [Tue, 21 Aug 2018 19:34:41 +0000 (21:34 +0200)]
Refactoring in DD redistribute

Split computeMoveFlag() of from calc_cg_move().
Group limit arguments into a struct.
Change move from a pointer to an arrayref.

Change-Id: Iab7f7ae3168fcb8a77ad08d3632a2dc23007d322

5 years agoMove variables around in pdb2gmx
Joe Jordan [Fri, 14 Sep 2018 15:35:19 +0000 (17:35 +0200)]
Move variables around in pdb2gmx

This narrows the scope of variables in pdb2gmx and
changes a few names. This is only code movement.

Change-Id: I2f923df42124f430348601fce839b0914ca41674

5 years agoReplace slave with agent
Roland Schulz [Sat, 15 Sep 2018 05:25:42 +0000 (22:25 -0700)]
Replace slave with agent

See releng change for details.
Also removes the word in one non Jenkins related file where
it didn't add any value to a comment.

Change-Id: Ic299f2fce0ffcd5412611c464b5f88db41d31a9c