Mark Abraham [Tue, 24 Sep 2019 16:03:08 +0000 (18:03 +0200)]
Merge "Merge branch release-2019 into master"
Magnus Lundborg [Tue, 24 Sep 2019 09:43:44 +0000 (11:43 +0200)]
Add .part0001. to files from the first run with -noappend.
There was a bug where only the runs after the first got
.partxxxx. added when running with -noappend.
Fixes #3103
Change-Id: I36fddfca058216a50f9910c548b8a106bf460f7b
Paul Bauer [Mon, 23 Sep 2019 07:44:00 +0000 (09:44 +0200)]
Merge branch release-2019 into master
Resolved Conflicts:
cmake/gmxDetectCpu.cmake
src/gromacs/gmxpreprocess/topshake.cpp
src/gromacs/listed-forces/bonded.cpp
src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu
src/gromacs/mdlib/nbnxn_gpu.h
src/gromacs/mdlib/nbnxn_ocl/nbnxn_ocl.cpp
src/gromacs/mdlib/nbnxn_ocl/nbnxn_ocl_data_mgmt.cpp
This does not include the change to the MPI_COMPILE flags handling,
as the code in master has been reorganized in a way that is incompatible
to that.
Change-Id: Idb1da69ce68f3121442859e8cbe24495c7894726
Paul Bauer [Fri, 14 Jun 2019 14:50:22 +0000 (16:50 +0200)]
Read in TPR char buffer as vector
Perform the I/O of the TPR char buffer as xdr_vector operation instead
of using single bytes.
Also use the xdr vector specialization for unsigned char and rvecs.
Refs #2971
Change-Id: I20534985fbdee8108792f676b3cb4264ab74c456
Mark Abraham [Tue, 24 Sep 2019 10:01:29 +0000 (12:01 +0200)]
Fix clang unused-function warnings
There are many places inline functions in headers are declared that
won't be used so we should suppress the clang warning about that.
Change-Id: I01c26f68473543007427e5baafc74eee966c0e68
Berk Hess [Thu, 19 Sep 2019 20:02:43 +0000 (22:02 +0200)]
Remove obsolete dd_get_ns_ranges()
Change-Id: Id64f2d51d6684cf4c22ebd770963cc69f7af087b
Paul Bauer [Tue, 17 Sep 2019 09:26:13 +0000 (11:26 +0200)]
Add release notes for modular simulator
Change-Id: I0f9081df842ce952ed40bf3844f7f2c10a59761c
Paul Bauer [Mon, 23 Sep 2019 12:09:17 +0000 (14:09 +0200)]
Fix issues when PME rank request becomes negative
Change-Id: I5f9888693983ed732c59a8fe62d596453b6a80dd
Pascal Merz [Mon, 23 Sep 2019 00:16:44 +0000 (18:16 -0600)]
Parrinello-Rahman for md-vv
Change-Id: I3e49ad4d54fa9533e8a576661b0da3d6239bfd28
Pascal Merz [Sun, 22 Sep 2019 07:37:29 +0000 (01:37 -0600)]
Parrinello-Rahman barostat for modular simulator (leap-frog)
This introduces the Parrinello-Rahman barostat for the leap-frog
version of the modular simulator. Mirroring the implementation in
the legacy do_md, this does not support md-vv. Implementing the
pressure coupling requires the virial calculation to be synchronized
with the pressure coupling, so this is included in the energy
signaller.
As the new integrator framework is not used by default, this
patch adds equivalence tests for md Parrinello-Rahman pressure
coupling.
Change-Id: Iaadd78a3da1ee2b04978ab7c7a7caecbb03181e2
Paul Bauer [Fri, 14 Jun 2019 09:42:28 +0000 (11:42 +0200)]
Change MPI setup to communicate TPR as buffer
Changed the initial setup of nodes to communicate the full tpr file
buffer instead of using the individual calls for the fields.
Now non-master nodes receive the inputrec and mtop
and populate them themselves.
Refs #2971
Change-Id: Id4f3739a978ca507dacc45c78a8a75368cfe86fd
Pascal Merz [Sun, 22 Sep 2019 07:29:24 +0000 (01:29 -0600)]
Zero pressure and virial tensors at beginning of step
This sets pressure and virial tensors to zero when they are
accessed for the first time in a step. Not doing this does not
yield wrong behavior currently, but carries the risk of
hard-to-spot bugs moving forward.
Change-Id: I2553bd52fa56a497a61c31738ec4436f7f587ece
Pascal Merz [Mon, 23 Sep 2019 00:07:37 +0000 (18:07 -0600)]
Introduce FEP into modular simulator
This introduces free energy calculations in the modular simulator.
The lambda vector and the current FEP state are held by the
FreeEnergyPerturbationElement, offering access to its values via getter
functions. The FreeEnergyPerturbationElement does update the lambda
values during the simulation run if lambda is non-static. It does
implement the checkpointing client interface to save its current
state for restart.
Elements using the FEP getters include
* force
* shell/fc
* compute globals
* constraint element (only for initial constraining)
* state propagator data (only for trajectory writing)
The free energy itself is calculated by the energy element.
Change-Id: Iee12697a7ef54a490208fb1457528dc4368c5d5b
Christian Blau [Fri, 20 Sep 2019 09:50:33 +0000 (11:50 +0200)]
Grompp error for mismatching nst for energy calulation and densityfitting
When using multiple-time-stepping with density-guided simulations, the
energy evaluation frequency of the density-guided simulations must
match the "nstcalcenergy" option.
Change-Id: Ifcde8cada8a91540d69c9f91079bfc91c4415ba5
Christian Blau [Mon, 16 Sep 2019 08:49:11 +0000 (10:49 +0200)]
Amendments to density fitting manual section
- Fixed a sign error in the energy and force definition
- Added performance considerations
- Fixed whitespace
- Changed vector notation to mathbf as in the other parts of the manual
- Added pressure-coupling considerations
- Added considerations when using multiple-time-stepping
refs #2282
Change-Id: I8421ccf09ac960fa04508234e738967f51a27fab
Mark Abraham [Wed, 7 Aug 2019 13:03:51 +0000 (15:03 +0200)]
Fixes to broken CUDA compiler flags
Because FindCUDA.cmake is non-idiomatic CMake, recent changes to CUDA
compilation lost most of our custom compilation options for host code.
These are now restored.
Compilation options for build configurations deriving from the Release
build configuration are also restored.
Refs #3099
Change-Id: If030a256481faed425379dab00ea658e3c215867
Pascal Merz [Mon, 23 Sep 2019 00:04:57 +0000 (18:04 -0600)]
Make CheckpointHelper safer and easier to use
This commit improves the CheckpointHelper in two ways:
* Allow the vector of checkpoint helpers to contain nullptr. This
makes the building process easier. Moving forward, this could
be replaced by a builder.
* Reset the legacy t_state flags at every checkpointing step. This
makes sure that only relevant data is checkpointed, and avoids
hiding potential bugs.
Change-Id: I4f2a58f281d0f3d8b3819825df3c52850090d42b
Mark Abraham [Fri, 20 Sep 2019 15:50:08 +0000 (17:50 +0200)]
Fix 1D-1pulse support
Passed the correct rank count to the new checking function
Change-Id: Ib27ba5112a50894dbb0f1a2eb68bba53204270e3
Pascal Merz [Sun, 22 Sep 2019 22:51:46 +0000 (16:51 -0600)]
Fix vrescale thermostat integral (modular simulator)
The v-rescale thermostat was calculating the thermostat integral,
but this was neither written out nor saved into checkpoints. The
current commit fixes this.
Note that this is a good example of why the energy element needs
to become more modular - it should not need to know about the
details of other elements. This is a todo moving forward though,
not something we can solve immediately now.
Change-Id: I69541cb8ffa3c07e294e583f2c20423952e3ec01
Christoph Junghans [Thu, 19 Sep 2019 22:54:41 +0000 (16:54 -0600)]
workaround for rhel bug #
1749463, cmake bug #18349
MPI_C_COMPILE_FLAGS is a list instead of a string
see: https://gitlab.kitware.com/cmake/cmake/issues/18349
We mainly want to workaround this issue as RHEL 8 triggers it:
https://bugzilla.redhat.com/show_bug.cgi?id=
1749463
This issue is fixed in cmake-3.12.3
Change-Id: I14c1c0a4f33f26b128d55baa1b0455f8a463a999
Christian Blau [Fri, 13 Sep 2019 08:32:50 +0000 (10:32 +0200)]
Add cross-correlation as density simlarity measure
Add the canonical cross-correlation as similarity measure for densities
refs #2282
Change-Id: Idec820f38dab07c5ee8281944855a532a587a2ff
Paul Bauer [Fri, 20 Sep 2019 12:03:08 +0000 (14:03 +0200)]
Remove update flag again
Disables assignment of update task to different hardware and removes
user option.
Change-Id: I7780ac54f65809cbd91386a0d6a92b7bee35ab26
Berk Hess [Thu, 19 Sep 2019 15:50:54 +0000 (17:50 +0200)]
Remove cgs_gl from gmx_domdec_comm_t
This is no longer needed now we no longer support charge groups.
This reduced cache pressure, especially with energy minimization.
Change-Id: Ibf51fc4d70b929463f8a77a82cbe0316bdedeab2
Artem Zhmurov [Mon, 16 Sep 2019 14:23:48 +0000 (16:23 +0200)]
Disable GPU update/constraints when neither PME nor buffer ops are offloaded.
Using the GPU-version of update makes sense if forces are already on the GPU,
i.e. if at least:
1. PME is on the GPU (there should be a copy of coordinates on a GPU in rvec
format for PME spread).
2. Non-bonded interactions and buffer ops are on the GPU.
This is temporary solution, needed because the buffer ops offload switch is
operated by the environment variable. More favorable behavior would be to
switch on the GPU buffer ops in the second case rather then disabling the
GPU update.
Refs. #2816.
Change-Id: I37a9969dd6c74dcfa41a95da13ae54d014c9ea60
Berk Hess [Sat, 21 Sep 2019 09:36:32 +0000 (11:36 +0200)]
Fix incorrect shift forces for CMAP
The shift force indices were inverted for the second and third
atom in the CMAP term, leading to incorrect virial and pressure
contributions when these atoms resided in different periodic images.
Fixes #2845 and #2867
Change-Id: I1946a1d375d6c62e4e6d23ee25b92b42a3d4a6f7
Pascal Merz [Fri, 20 Sep 2019 21:01:04 +0000 (15:01 -0600)]
Fix restarts in modular simulator
The modular simulator constraint element was mistakenly performing
an initial constraiinng when restarting from checkpoints.
Change-Id: Icf310ff6d67fcd7f4b8aeb4f9da2749ad098a513
Pascal Merz [Fri, 20 Sep 2019 04:26:19 +0000 (22:26 -0600)]
Fix domdec for md-vv modular simulator
Domdec might have changed the local velocity vector after the state
object made a backup to restore after the first md-vv half step.
This change makes sure that the backup is updated if this happens.
Note that the half-step resetting will be eliminated in the course
of the transition to the modular simulator, but is currently kept
for backwards compatibility.
Change-Id: Ifb6346055a14d34a4efcae43b7b41399b1444bca
Berk Hess [Fri, 20 Sep 2019 14:22:02 +0000 (16:22 +0200)]
Fix DD 1 pulse checks without DLB
The check for requesting single pulse DD communication only
worked correctly without DLB.
Also added a check for 1 pulse with PME tuning.
Todo: PME tuned runs might still end up with multiple pulses
due to pressure scaling. This needs to be checked.
Fixes #3100
Change-Id: Icac5e37ef79385fd7c7cf5c19c7b40b2d685b95b
Mark Abraham [Thu, 19 Sep 2019 14:51:21 +0000 (16:51 +0200)]
Refactor to create a GpuTaskAssignments object
This change is purely reorganization, nothing is reordered or
functionality changed.
This expands on the previous vector of vectors of task assignments
into an object with the invariant of a completed assignment. It has
very complex construction logic, so it has a separate builder class
for the data that describes the decision about which GPUs are assigned
to tasks running on ranks on each physical node.
This refactoring prepares for re-ordering mdrun setup
so that the decision of rank duty by DD can lead to
task assignment, device initialization and the creation
of GPU contexts and streams with which to initialize
the various modules that use them to do their work.
Minor improvements to documentation and naming in a few places.
Change-Id: Idec71a3016212a4125b23b780e1059dbb134d7fb
Pascal Merz [Fri, 20 Sep 2019 04:59:59 +0000 (22:59 -0600)]
Run simulator equivalence tests in double precision only
The simulator equivalence tests are a great help in the effort of
rewriting the simulator framework, but might be too sensitive for
general use. They have been shown to be extremely sensitive to
order of operations which inevitably changes in day-by-day
development. Most recent test failures could be traced back to
the absence of a parenthesis in otherwise identical code (for
md-vv), and to the differences between the SIMD and non-SIMD
code paths (for md), respectively. Double precision builds seem to
be less affected by such re-ordering, so this commit changes the
simulator equivalence tests to be only enabled for double precision
builds. As the simulator rewriting progresses, and the new code paths
get covered by the existing tests, we might want to move away from
these type of equivalence tests altogether.
Change-Id: Ia4ad269959efd207242795ecedb88eaf7a870589
Berk Hess [Thu, 19 Sep 2019 13:00:13 +0000 (15:00 +0200)]
Remove bLocalCG from DD code
Replaced the use of bLocalCG in gmx_domdec_comm_t by ga2la,
which can be done since we no longer support charge groups.
Change-Id: I601e4a9c63e685b21f764fc99dc71c0080e84a43
Berk Hess [Thu, 19 Sep 2019 10:26:42 +0000 (12:26 +0200)]
Remove obsolete make_exclusions_zone_cg()
Change-Id: I1d18a4228f2a9a1f41266587f6b4c66f8d200f81
Christian Blau [Thu, 19 Sep 2019 13:37:50 +0000 (15:37 +0200)]
Check input record also in tests
When checking .mdp option reading and writing, the check_ir routine was
omitted that would potentially alter the result of the .mdp file
reading.
This patch fixes this behaviour, so that also checks and rectifications
of the input record are performed.
refs #3098
Change-Id: I450188442579bc11d71eda99ba1f64f33730345b
Mark Abraham [Mon, 16 Sep 2019 06:38:06 +0000 (08:38 +0200)]
Use GPU halo exchange only when compatible DD is available
Change-Id: I624861e61e6f1b6854172102b12a4f9b51b94101
Berk Hess [Thu, 19 Sep 2019 12:09:38 +0000 (14:09 +0200)]
Remove charge group data from t_forcerec
Removed the solvent optimization and natoms flags from cginfo.
Removed obsolete environment variables from the code and manual.
Change-Id: Ib2c92a8297837c444a6a1169fefdcae80579fca1
Mark Abraham [Tue, 17 Sep 2019 10:38:05 +0000 (12:38 +0200)]
Further improve getDDGridSetup
Merged and simplified two similar setup functions that were sharing
the setting up of the number of PME-only ranks and the DD grid used on
the PP ranks. No functionality changes here, although some user
messages are slightly improved.
This helps create the seam that GPU halo exchange setup will need in
order to do a good job of triggering that communication path, namely
that there is a clear point when the number of PP ranks is known, so
that the search for a DD cell decomposition can be made in a way that
might suit GPU halo exchange.
It also permits more of the DD setup routines to be called without
leading to a fatal error or output confusing to a user, which will also
be needed when introducing support for GPU halo exchange.
Functions called in init_domain_decomposition no longer look up the
total number of ranks from cr, but instead accept an integer
parameter. This will enable thread-MPI checking for various
possibilities to work smoothly if we ever do that.
Used better variable naming, IVec and more const
correctness to improve readability, and improved comments.
Noted TODOs for further work at some future time.
Improved havePPDomainDecomposition (and some of its users) so
that we are less likely to erroneously use it before we have
initialized DD.
Change-Id: I65e285cc10d946c7c5bf298d7ff08c81ba05f3d8
Paul Bauer [Thu, 5 Sep 2019 14:01:47 +0000 (16:01 +0200)]
Add basic interface to run update on GPU
Added basic command line option to direct update on a GPU,
as well as adding the necessary checks.
Since now the default code path is moved to the GPU, overly
tight tolerances in simulator tests lead to the failure of
one of the tests. This was a result of a slightly low
absolute value of the kinetic energy specified in the
definition of tolerances, which is also corrected by this
patch.
Change-Id: Ieca885d935aa1e0d592735bc7027f8261288b635
ejjordan [Thu, 19 Sep 2019 10:01:00 +0000 (12:01 +0200)]
Remove or update comments containing 'group scheme'
Change-Id: Ic2dea073b7cb2a9e3ed6dbb4fbeb14dfedd5cac3
Berk Hess [Thu, 19 Sep 2019 08:11:58 +0000 (10:11 +0200)]
Add haveFreeEnergyWork to DomainLifetimeWorkload flags
Change-Id: Ic0a09e2acafedc8c2caefb6935da88177d4c87ee
Paul Bauer [Wed, 18 Sep 2019 13:34:34 +0000 (15:34 +0200)]
Split up do_tpx_body functions
Will facilitate only communicating the parts of the TPR file needed on
ranks other than master.
Refs #2971
Change-Id: Ia5a5fe4f1c9bda1340e0776a0a2d9e96a90d4d07
Kevin Boyd [Thu, 19 Sep 2019 02:52:41 +0000 (19:52 -0700)]
Remove note about cutoff-scheme from mdrun docs
Change-Id: Ie7c6cd8fb5855cf7af1dd3fdd99586e133625cd2
Christian Blau [Wed, 18 Sep 2019 10:11:43 +0000 (12:11 +0200)]
Consistently change densityfitting spreading weight to charge
In the mdp options, the density-guided-simulation-atom-spreading weight
has been changed from charges to "charge" but within the code and in an
.mdp file comment the plural charges was still used. Changed now all
over to make this consistent.
refs #2282
Change-Id: I055743c8301e4ad18ceed5670c62be0a93c2d5f1
Berk Hess [Wed, 18 Sep 2019 12:52:49 +0000 (14:52 +0200)]
Added free-energy kernel performance note
Change-Id: Iea5d2b124633c4188753c7b1ebb6f964edb2f644
Berk Hess [Wed, 18 Sep 2019 12:35:17 +0000 (14:35 +0200)]
Fix incorrect DD ndim assertion
An incorrect assertion was introduced in recent commit
ed91e159.
Merged that assertion with a similar one nearby
Change-Id: Idff2a0d8a1985a19019233d29c4804294824297c
Pascal Merz [Fri, 16 Aug 2019 20:39:09 +0000 (14:39 -0600)]
v-rescale thermostat for modular simulator
This commit introduces the v-rescale thermostat for the modular
simulator. It also implements general velocity scaling in the
propagators.
Note that since the modular simulator is the default code path for
all supported input using md-vv as an integrator, this automatically
moves over some of the test coverage from the legacy simulator to
the modular simulator. This does, however, also extend equivalence
testing between the modular and the legacy code paths to v-rescale
thermostatted simulations.
Change-Id: Ia22931ccc3f9340f7f6272e395df149bd73d9b21
Paul Bauer [Thu, 13 Jun 2019 09:52:36 +0000 (11:52 +0200)]
Read TPR file body in buffer
For now only reads the buffer and uses it to write new files.
Refs #2971
Change-Id: I77a18ca50e96486d688db8b0d7acdbedf29d613d
Szilárd Páll [Fri, 13 Sep 2019 00:02:45 +0000 (02:02 +0200)]
Set up workload data structures
This change estabilishes three data structures for describing the
computational workload within a run. Flags related to the workload are
categorized in three groups based on their lifetime:
- per-step flags in the StepWorkload class
- domain liftime / nslist steps in DomainLifetimeWorkload
- constant over the entire simulation in SimulationWorkload
The present change only introduces naming by: renaming of the
former ForceFlags to StepWorkload and PpForceWorkload to
DomainLifetimeWorkload.
Moving flags from e.g. the force schedule into these will follow.
Change-Id: I2bcc911091e2dd8ca0bcbf53a40dfcda09ba368b
Alan Gray [Tue, 3 Sep 2019 08:00:13 +0000 (01:00 -0700)]
GPU Force Halo Exchange
Activate with GMX_GPU_DD_COMMS environment variable.
Extends GPU Halo exchange feature to provide GPU Force halo exchange
functionality. Does not yet support virial steps, which require an
extra shift force reduction - these are currently performed on the
non-buffer ops / non direct-comm path. Also has same limitations as
coordinate halo exchange.
Performs part of #2890. Future work to improve synchronization towards
a more one-sided scheme (#3092) and to make depenencies more
explicit (#3093)
Change-Id: Ifc23cc8db2655f7258e68b34e7cdc7b71994e1e8
Paul Bauer [Tue, 17 Sep 2019 12:21:56 +0000 (14:21 +0200)]
Fix MSVC warning
Should fix:
cl : Command line warning D9014
Change-Id: I24501ee27308df8abdbe3526d4035e74eb248286
Christian Blau [Fri, 13 Sep 2019 11:29:00 +0000 (13:29 +0200)]
Add mdp option documentation for density fitting.
Documents the .mdp options for the density fitting module.
refs #2282
Change-Id: Ic2cb616ca13627553a36d739d86192b0fcb0e239
Pascal Merz [Tue, 17 Sep 2019 02:32:57 +0000 (20:32 -0600)]
Minor tweaks to sum_dhdl and setCurrentLambdasLocal
setCurrentLambdasLocal() is taking the entire t_state as input,
but only uses the lambda vector and the free energy state. The
function arguments were changed to reflect that. This facilitates
rewriting the state data structure.
This change also adds a trivial const qualifier to sum_dhdl.
Change-Id: I50cb2b77711c13c1d77f6d55cfd32a324f94f76e
Pascal Merz [Tue, 17 Sep 2019 15:53:53 +0000 (09:53 -0600)]
Fix position pinning for modular simulator
This replicates Ia2b97d22 for the modular simulator, pinning the
position also in the non-DD case.
Fixes #3091
Change-Id: Ifb4b5a8897099152b7086fe700faa9a048c110a3
Berk Hess [Tue, 17 Sep 2019 14:14:35 +0000 (16:14 +0200)]
Remove spurious newline from log file
The annealing print function always added a newline.
Made calls to annealing and energy/log print conditional,
as they create needless overhead.
Change-Id: I63c0c6c9f1803aa8d42f59b40d7e2bff6fb6ac10
Paul Bauer [Tue, 17 Sep 2019 09:52:14 +0000 (11:52 +0200)]
Add deprecation note for 32 bit
Refs #3080
Change-Id: I033350ce0de76f30d11c44b5a73bf9b41ae91e97
Berk Hess [Tue, 17 Sep 2019 12:57:40 +0000 (14:57 +0200)]
Fix todos for update groups
Update groups allow for less PBC operations with domain decomposition
and allow Ewald dipole correction to work propely for small molecules.
Added checks and an assertion for Ewald dipole correction in grompp
and mdrun.
Change-Id: If072c6b0fe5afd591c3e01b1238d28820128c7af
Pascal Merz [Tue, 17 Sep 2019 10:00:53 +0000 (04:00 -0600)]
Fix modular simulator MPI bugs
This fixes two small errors which are not directly related to MPI, but
only show up in MPI runs:
* The checkpoint helper now receives the global number of atoms from the
global topology rather than the global state. This is identical to the
legacy implementation, and has the advantage that the global topology
is defined on every rank
* The state flags of the legacy state were not written correctly, or,
in some cases, not at all. This lead to errors using DD where the local
state was not properly allocated.
Change-Id: I6b6a48550065f16f415f46f20f16ee9c49da3dbe
Pascal Merz [Wed, 11 Sep 2019 18:44:14 +0000 (12:44 -0600)]
Make modular simulator the default code path for md-vv NVE
This change makes the modular simulator the default code path for
md-vv, if the options chosen are implemented. Effectively, this
means that currently, modular simulator will be chosen for md-vv
with NVE. The testing suite will hence use the new code path by
default for any applicable system.
Change-Id: I2635d58f8fc777a8efa04e216a5c612b7ef3a96b
Pascal Merz [Tue, 17 Sep 2019 03:05:30 +0000 (21:05 -0600)]
Fix force element
As FEP is currently turned off for the modular simulator, the force
element was using an empty ArrayRef as an argument for the lambda
vector in the call to the legacy do_force(). Further tests revealed,
however, that some force calculations use the lambda vector without
checking if FEP is needed. To avoid problems related to this, an
allocated array is used. Note that this change gets superseeded
by Iee12697a, so this is just a temporary fix.
Change-Id: Ibd09e83a8ee61f6da8c7f6ab8989777218407d94
Pascal Merz [Thu, 12 Sep 2019 09:57:12 +0000 (03:57 -0600)]
Enable checkpointing for modular simulator
This introduces the checkpoint helper and checkpoint helper clients.
The `CheckpointHelper` is responsible to write checkpoints. In the
longer term, it will also be responsible to read checkpoints, but this
is not yet implemented.
Writing checkpoints is done just before neighbor-searching (NS) steps,
or before the last step. Checkpointing occurs periodically (by default,
every 15 minutes), and needs two NS steps to take effect - on the first
NS step, the checkpoint helper on master rank signals to all other ranks
that checkpointing is about to occur. At the next NS step, the checkpoint
is written. On the last step, checkpointing happens immediately before the
step (no signalling). To be able to react to last step being signalled,
the CheckpointHelper does also implement the `ISimulatorElement` interface,
but does only register a function if the last step has been called.
Checkpointing happens at the top of a simulation step, which gives a
straightforward re-entry point at the top of the simulator loop. Moving
the checkpointing position requires to sum the kinetic energy (in
compute globals) a step earlier for md-vv.
In the current implementation, the clients of CheckpointHelper fill a
legacy t_state object (passed via pointer) with whatever data they need
to store. The CheckpointHelper then writes the t_state object to file.
This is an intermediate state of the code, as the long-term plan is for
modules to read and write from a checkpoint file directly, without the
need for a central object. The current implementation allows, however,
to define clearly which modules take part in checkpointing, while using
the current infrastructure for reading and writing to checkpoint.
This change also adds a lambda vector to the force element, since in
some cases, the force routine access the lambda vector even if FEP is
off, which leads to segmentation faults. It also moves the ownership
of needToSumEkinhOld_ from the compute globals element to the energy
element. It reintroduces the observablesHistory, which is owned by
the energy element. It also allows the CheckpointHelper to access
the outf private variable of TrajectoryElement.
Finally, this change also fixes a bug in the NeighborSearchSignaller
which would fail to signal the first step of the simulation run as a
NS step if it didn't fulfill do_per_step(step, nstlist). This was
not a problem as long as we only allowed new simulations but may
cause errors on restarts from checkpoints.
Change-Id: I15066fa66d653567f680a1c616a13ccfb7e3e955
Berk Hess [Thu, 12 Sep 2019 07:56:27 +0000 (09:56 +0200)]
Remove obsolete mdp option ns-type
Also removed unused member ndelta from t_inputrec.
Change-Id: Idde132176582001bdffafa6fa64af2eed9d0c242
ejjordan [Fri, 13 Sep 2019 08:55:11 +0000 (10:55 +0200)]
Add some cool quotes
Change-Id: Ib6a1565fb8cacf65523ec05e9fda52645d85a3de
Paul Bauer [Mon, 16 Sep 2019 11:14:45 +0000 (13:14 +0200)]
Formatting fixes for reference manual
Fixes #3090
Change-Id: I477e7422e29bc3dbccc91ba5a02f5bc90354d9fa
M. Eric Irrgang [Wed, 11 Sep 2019 08:50:06 +0000 (11:50 +0300)]
Add gmxapi release notes.
Change-Id: I12ee7c5707dcb17282aa29c30ec42271242b2a37
Szilárd Páll [Wed, 11 Sep 2019 17:07:00 +0000 (19:07 +0200)]
Refactor GPU buf ops-related launches in do_force()
- Consolidate branchy-ness into better organized code;
- Rename and clarify conditionals related to CPU force contributions:
for non-local forces only the presence of bonded interactions should
be a dependency, while for locals, the presence of any local force
contribtion from the CPU.
Change-Id: I91921d5d7425206b5980ec2b96032790a5d54408
Alan Gray [Tue, 26 Feb 2019 12:43:22 +0000 (04:43 -0800)]
GPU halo exchange
Activate with GMX_GPU_DD_COMMS and GMX_USE_GPU_BUFFER_OPS environment
variable.
Class to initialize and apply coordinate buffer halo exchange
functionality directly on GPU memory space.
Currently only supports direct cuda memcpy, and relies on thread MPI
being in use.
Updated gpucomm testing matrices to cover non-GPU case.
Limitation: still only supports thread MPI, 1D data decomposition and
only coordinate halo exchange
Implements part of #2890
Associated with #2915
Change-Id: I8e6473481ad4d943df78d7019681bfa821bd5798
Berk Hess [Sun, 15 Sep 2019 21:01:43 +0000 (23:01 +0200)]
Add virtual site type 2FD
Fixes #2451
Change-Id: Ide9dcd829284567010435ed5cfb55194aed12dcf
Mark Abraham [Fri, 13 Sep 2019 08:03:55 +0000 (10:03 +0200)]
Avoid short-range GPU operations with no work
Also moved some assertions until after the checks that there is work
because when there are no atoms in a locality the pointer (even from
the ArrayRef) can be nullptr.
Used more consistent naming for numAtoms and numCopyAtoms variables
Noted some TODOs for outstanding questions
Change-Id: I965832765a57486b632f5e3b17c2c91107a29070
Berk Hess [Thu, 12 Sep 2019 08:15:55 +0000 (10:15 +0200)]
Remove cut-off schemes from manual
Removed the group cut-off scheme and references to cut-off schemes
from the reference manual and user guide.
Change-Id: I54e2a4977f2f9cfe40069f613211cb82175dce59
Szilárd Páll [Fri, 13 Sep 2019 12:00:05 +0000 (14:00 +0200)]
Eliminate unnecessary GPU stream dependency call
The dependency insetion is not needed because the nonbonded
task itself should be made depndent on the producer of the nbnxm
layout cordinates rather than the buffer ops task.
Also added clarifying comment on the nbnxnInsertNonlocalGpuDependency
call.
Change-Id: I976280d3b6cdd6b808cd4e54f750b2031f962f6c
Berk Hess [Fri, 13 Sep 2019 13:45:17 +0000 (15:45 +0200)]
Add option request 1D DD with 1 pulse
The option is currently controlled by an (undocumented) environment
variable GMX_DD_1D_1PULSE, but is intended to be used when requesting
GPU DD halo communication.
Note that requesting 1D DD and 1 pulse increases the lower limit
on the system size. We should consider automatically relaxing the DLB
scale limit to allow GPU DD halo communication.
Refs #3089
Change-Id: I6152c859072765c803fb99ca45ace15ae10dcfba
Kevin Boyd [Sat, 14 Sep 2019 18:05:33 +0000 (11:05 -0700)]
Remove group scheme from deprecated release notes
Change-Id: I642046066b7292836008cd89903ea93e33e4e12f
Pascal Merz [Thu, 12 Sep 2019 00:50:28 +0000 (18:50 -0600)]
Introduce the modular simulator
The modular simulator builds independent elements and signallers based on
the input and stores them in a respective vector. It then calls the setup function
of all elements. It then repeats the following loop until a stop condition is met:
* Perform domdec and load balancing if necessary
* Until the next neighbor-searching step:
- Call signallers in order
- Call elements in order, allow them to register run function in queue
- increase step number
* Once the next neighbor-searching step is reached, run through the entire queue
of function pointers
* Repeat
Supressed some warnings about redundant std::move necessary for legacy
compilers.
Increased default trajectory tolerance for force comparisons, which
were chosen arbitrarily originally.
Change-Id: Iaae1e20581df464090979da9b05d04829f267300
M. Eric Irrgang [Wed, 11 Sep 2019 07:45:22 +0000 (10:45 +0300)]
Import gmxapi docs to main GROMACS docs directory.
This change defers removal of the documentation staged in
python_packaging so to allow rearrangement of the docs in the new
location without risking loss of content or the ability to generate
the previous documentation.
Refs #2698
Change-Id: Ie64585fe519aa37ada9d353f1eccd2daafcdbceb
Peter Kasson [Sat, 14 Sep 2019 08:43:20 +0000 (08:43 +0000)]
Patch gmxapi for Python 3.7
This is a minimal patch to fix gmxapi typing on Python 3.7.
Change-Id: I2beab4d5c642bb1ae235a7248f1334097fe252c2
Erik Lindahl [Fri, 13 Sep 2019 20:43:05 +0000 (22:43 +0200)]
Add rounding correction to unsafe simd exp tests too
This was already present for the safe-version tests,
but when modifying the test limits of the unsafe version
we need it there too to fix the ARMv7 tests.
Change-Id: I4dbab9655a9405bb17a8007a065aea3f4b991ed5
Erik Lindahl [Fri, 13 Sep 2019 18:25:16 +0000 (20:25 +0200)]
Fix clang tidy warnings in SIMD code
Replace integer division and asserting it is
evenly divisible with using the divided constant
and multiplication to avoid warnings about
fragile integer division.
Second, we no longer need to use relaxed-range
checking for exp() with our new polynomial fix
that does not depend on FMA hardware.
Change-Id: Ifbc996ca1f0383897b38769474fc733ad5aaa592
Berk Hess [Fri, 13 Sep 2019 11:55:12 +0000 (13:55 +0200)]
Fix nonbonded-bench compilation issue
Gerrit fast-forward merge caused compilation issues.
Change-Id: I2a7813304fae5444b9f70bfa7e71737043076d97
Paul Bauer [Fri, 13 Sep 2019 08:51:48 +0000 (10:51 +0200)]
Fix nightly failures
Also fixed extra warnings from clang-tidy in simd_math tests.
Change-Id: I7a47a9b8d5e8b276bab82467274d2d23367d805f
Paul Bauer [Thu, 12 Sep 2019 08:38:06 +0000 (10:38 +0200)]
Add list of unsupported functions in 2020
All of those are caused by the removal of the group-scheme.
Change-Id: Ib38757568889a7f84569547eb2f5a5fc644c98a3
Berk Hess [Mon, 17 Jun 2019 07:49:56 +0000 (09:49 +0200)]
Add nbnxm kernel benchmark tool
This change adds a tool for benchmarking nearly all different
flavors of the Nbnxm non-bonded kernels. The tools uses prepared
coordinate input, to minimize the dependencies on the GROMACS
code base. Currently some there are some minor mdlib and ewald
dependencies beyond the Nbnxm dependency.
Also adds basic end-to-end test.
TODO: Make this tool a separate target with minimal dependencies
on the rest of GROMACS.
Change-Id: Id9b31ccf9f372af873e08c5dd2b97fb8e5df6eef
Christoph Junghans [Thu, 12 Sep 2019 17:50:51 +0000 (17:50 +0000)]
cmake: add option to install legacy headers
This is needed for package like VOTCA to use the C-API until
a real GMX API got established.
Refs #988
Change-Id: I87b6f81641cb5bcac5ceb6ff6fb3dbd9e6650ea5
M. Eric Irrgang [Thu, 12 Sep 2019 15:59:58 +0000 (18:59 +0300)]
Normalize usage of GMXTOOLCHAINDIR in gmxapi setup.py
GMXRC references the tool chain just by its directory using the
environment variable GMXTOOLCHAINDIR. Assuming that the toolchain
directory name has the same suffix as the toolchain file, it is
sufficient and more consistent for the gmxapi setup.py to use
GMXTOOLCHAINDIR as its hint. Also, doing so allows additional
convenience to users who have already sourced their GMXRC.
Change-Id: I433cdb1215e5fcb1ae893e2f29cb23c4c59f7727
M. Eric Irrgang [Thu, 12 Sep 2019 09:56:35 +0000 (12:56 +0300)]
Do not use gromacs-toolchain in darwin gmxapi builds.
Add workaround for toolchain issue on OS X.
Refs #3085
Change-Id: I96a8242b14c86abd4926b6abf5a401c37953b9bc
M. Eric Irrgang [Thu, 12 Sep 2019 07:28:38 +0000 (10:28 +0300)]
Update gmxapi setup.py
* Rearrange for tidyness and readability.
* Add usage hints.
Change-Id: Ic5d47a9aebfe8c7c83de2b4b24bb163bdce8cc1b
Szilárd Páll [Fri, 13 Sep 2019 01:28:44 +0000 (03:28 +0200)]
Fix GPU X buffer ops with empty domain
The early return that ensured no kernel gets launched with empty domain
got dropped with recent refactoring. This change adds back the
conditional and fixes assertion errors triggered with empty domains.
Change-Id: I508fdc2179877080dec512695e96310b52698b81
Berk Hess [Thu, 12 Sep 2019 10:06:25 +0000 (12:06 +0200)]
Updated mdp documentation for group scheme removal
Change-Id: Id30204f9795bb4424af1738ec70d205c84ce18b7
Christian Blau [Thu, 12 Sep 2019 14:14:11 +0000 (16:14 +0200)]
Manual entry for density guided simulations
Extends the reference manual with a section for density guided
simulations.
refs #2282
Change-Id: Ie3017fa5e75fcd2c809c20782300f759182486a8
Mark Abraham [Thu, 12 Sep 2019 12:12:51 +0000 (14:12 +0200)]
Disable report-methods end-to-end test
Refs #3804
Change-Id: Id20edbb3495360136f1988e2338c172596a4e58d
Szilárd Páll [Tue, 10 Sep 2019 15:24:18 +0000 (17:24 +0200)]
Reorganize on-GPU PME force reduction flag handling
Instead of passing around a flag everywhere that tells PME whether
forces are reduced on GPU or CPU (and whether transfer needs to happen
for the latter), we pass the flag once when configuring PME for
the next step and store it internally.
Refs #3029
Change-Id: I81fa2dc93dd979e2b85b4d7fe8cf266a3fde9b8f
Artem Zhmurov [Mon, 9 Sep 2019 16:44:38 +0000 (18:44 +0200)]
Change PaddedVector to PaddedHostVector for force CPU buffer
The difference between PaddedVector and PaddedHostVector is that
in the builds where CUDA is available, cudaMalloc is used instead
of malloc. This enables one to pin the vector for asynchronous
H2D and D2H copies. Other than that and on the CPU-only builds this
change essentially only renames the data type.
Change-Id: I446ef037a8013f666a78762d37ed44e59f9548c2
Christian Blau [Thu, 12 Sep 2019 13:15:12 +0000 (15:15 +0200)]
Add release note for density fitting.
Adds a release note that density-guided simulations are now available.
refs #2282
Change-Id: I2ae6896ba32cadfb2029a5c923db6fd76ddbf620
Erik Lindahl [Thu, 12 Sep 2019 11:20:52 +0000 (13:20 +0200)]
Adjust test range and fix singleaccuracy tests
This changes the limit of exp() tests by one ulp
to account for rounding that leads to tests failing
for a single value when the CPU uses different
denormals-to-zero modes for SIMD and non-SIMD (ARMv7).
It also fixes the singleaccuracy tests to
check the correct functions for log2/exp2/pow2/cbrt
instead of the double-precision flavors, and the
implementation of powSingleAccuracy has been
copied from the (faster) single precision type
instead of just calling the double precision version.
Change-Id: I67d027cb916c4f78f36719f9ff554e9957879763
Pascal Merz [Thu, 12 Sep 2019 00:40:59 +0000 (18:40 -0600)]
Update modular simulator tests
This addresses a number of issues with the modular simulator tests:
1. Relaxes the tolerance for energy tests slightly
2. Switches the pressure test from ULP-based tolerance to relative
tolerance
2a. Introduce relativeToleranceAsPrecisionDependentFloatingPoint()
to define relative tolerances depending on floating point
precision
3. Relax the tolerance for velocity testing, allowing to remove the
second version of the velocity propagator (differing from the
first version only by the operation order)
3a. Introduce TrajectoryComparison argument to the simulator
comparison test class, adapt rerun and simulator tests accordingly
Change-Id: I30fffcabf8d6e658dab6f71b407fbe162121df2e
Berk Hess [Thu, 12 Sep 2019 10:03:49 +0000 (12:03 +0200)]
Fix master not compiling
A fast-forward merge broke compilation of tpi.cpp.
Change-Id: I067042a6e02b272e7503ae3f876418dc0a114b91
Berk Hess [Tue, 10 Sep 2019 09:01:19 +0000 (11:01 +0200)]
Enable TPI with the Verlet cut-off scheme
This requires a special treatment for the nbnxm gridding and search,
with one grid for the system to insert in and one grid for
the molecule to insert.
Also reenabled the TPI tests.
Change-Id: Ia3888daf4b06a94b0a7a03ec17b7bbe27084ac3d
Erik Lindahl [Wed, 11 Sep 2019 12:36:00 +0000 (14:36 +0200)]
Added SIMD cbrt and invcbrt functions
To be used in free energy kernels.
Change-Id: I074e27f7b050b37f273dbf703ff915c9c20e8c97
Erik Lindahl [Wed, 4 Sep 2019 23:29:44 +0000 (17:29 -0600)]
Added SIMD log2 and pow math functions
To be used in SIMD free energy kernels
Change-Id: I3c05dcc01ec56ed790cfedc543a75c17468ca284
Erik Lindahl [Sun, 1 Sep 2019 12:28:36 +0000 (14:28 +0200)]
Update SIMD math tests and improve accuracy
Improve the SIMD math function test by selecting
points to be equidistant in IEEE754 bit-space, and
specify test ranges by explcitly constructing the
threshold points used to select ranges.
This significantly extends the ranges over which
some functions are tested, and could lead to some
failed tests that were previously hidden, although they
are likely benign. With these tests, errors were found
in a few of the double-precision functions where 1/x
was evaluated for intermediate values smaller than the
lowest-magnitude single precision number, which have
now been fixed with additional masking.
Second, a fragile construct when evaluating exp() in
single precision without FMA support has been replaced
to improve precision when very small intermediate values
were flushed to zero by the intel compiler, in particular
icc19.
Change-Id: I3e4b1e5799f748b02f592398df762e1e318887e6
Mark Abraham [Wed, 11 Sep 2019 05:14:15 +0000 (07:14 +0200)]
Make gmx_multisim_t a C++ object
Change-Id: I1fe46090cdda44db5b5e7cc1198c6f679f7bd5a7
Paul Bauer [Wed, 11 Sep 2019 08:55:28 +0000 (10:55 +0200)]
Remove -sub option from trjconv
This functionality is now in gmx extract-cluster.
Change-Id: I5c74ce346f2e422f1b494663f0eb3206083c05be