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
Artem Zhmurov [Wed, 11 Sep 2019 18:55:25 +0000 (20:55 +0200)]
Fix for the post-submit failure
Commit
21abdb3 introduced several "unused variable" warning
in the post-submit matrix. This fixes the issue.
Change-Id: I8ba6ad16573dd7d8ca06fdd957882b4dc8486396
Artem Zhmurov [Wed, 11 Sep 2019 12:19:31 +0000 (14:19 +0200)]
Decouple GPU force buffer management from buffer ops in NBNXM
When GPU-side buffer operations are used, the total forces on the
device are accumulated in NBNXM module in the local GPU buffer.
By decoupling the CPU and GPU buffer operations and making the
force buffer into an argument for the reduction function, this
commit allows to take the responsibility of the GPU forces
management from the NBNXM module to the third-party instance.
This commit is refactoring of the code in preparation for the
introduction of the GPU-side PropagatorStateData object.
TODO: Use DeviceBuffer when passing the PME GPU forces buffer.
Refs. #2816
Change-Id: I2a1f9d12fad3fb5b2ce37ca3ed3d0cb91777c468
Paul Bauer [Wed, 11 Sep 2019 09:35:56 +0000 (11:35 +0200)]
Add missing gmxapi requirements
Those where missing while trying to use the package. Please advise on
recommended minimum version numbers.
Change-Id: I65f4bf7b6892a74667b1fa2c641b7b97be923656
M. Eric Irrgang [Tue, 10 Sep 2019 18:15:51 +0000 (21:15 +0300)]
Use GROMACS CMake toolchain file for gmxapi Python package build.
Refs #2961
Change-Id: If085425879f00a8a8573627dbec197afa39c2ab0
Paul Bauer [Thu, 5 Sep 2019 12:28:11 +0000 (14:28 +0200)]
Basic toolchain to facilitate GMXAPI build
Adds a basic toolchain file and install directives for it.
This is aimed at having one point for the API to look up how
a native GROMACS installation was build and allow the bindings for the
API to be build in the same way.
Added hint for directory to GMXRC so that it will be easier to find.
Refs #2961
Change-Id: Icefe89e97009110be55dc8e1f3db5726ec1fe53a
Artem Zhmurov [Tue, 10 Sep 2019 20:52:37 +0000 (22:52 +0200)]
Decouple coordinates buffer management from buffer ops in NBNXM
To make transition to the new device-side state propagator data
manager easier, the copy and plain buffers management have to be
decoupled from the actual operations on data in the buffers.
This commit splits the corresponding functions into two, and
decouples CPU- and GPU-based coordinate buffer ops one from
another. Since the coordinates are now clearly communicated
between PME and NBNXM, the plain pointer on the CPU-side code is
replaced with the DeviceBuffer<float>. The getters for the device-
side buffer now never return nullptr, but exit with the assertion
if the corresponding data is not intialized.
Change-Id: Ic793f815870a8b4f414a9b7ca0a5001e58f49c7a
Artem Zhmurov [Tue, 10 Sep 2019 11:42:06 +0000 (13:42 +0200)]
Reorganize PME code:
1. Split H2D copy and spread launch
2. Add getter for the padding, required in coordinates buffer
3. Add the getter for the GPU stream
TODO: Make use of DeviceBuffer
This is a part of preparation for the GPU version of the
StatePropagatorData, needed to connect all GPU routines.
Refs. #2816.
Change-Id: Icf0d621ce931f8fa66e948b5240afbddef7bfb0d
M. Eric Irrgang [Mon, 9 Sep 2019 16:29:06 +0000 (19:29 +0300)]
Add gmxapi.modify_input operation.
modify_input can consume and produce simulation input data in the
manner of gmxapi.simulation module operations.
Change-Id: I2639022801b5c72a8fad9fb68f1990c87444cbca
M. Eric Irrgang [Mon, 9 Sep 2019 15:17:34 +0000 (18:17 +0300)]
Provide a gmxapi.read_tpr operation.
Convert a simulation input file to a data flow stream that can be
consumed by other operations in gmxapi.simulation in a standard way.
Change-Id: Ic6339317956f248712a3038eab583fbca517ba16
M. Eric Irrgang [Mon, 9 Sep 2019 14:44:33 +0000 (17:44 +0300)]
Update gmxapi.simulation.context details.
Combine and improve the implementation detail from gmxapi 0.0.7 handling
of trivial ensembles (single-trajectory).
This simplifies the 0.1 implementation of gmxapi.mdrun as a dispatcher
to the gmxapi 0.0.7 implementation.
Change-Id: I17fe722ee7509e8bc402c6d5848d01a2c04b18fd
M. Eric Irrgang [Mon, 9 Sep 2019 15:08:52 +0000 (18:08 +0300)]
Allow gmxapi.mdrun to properly dispatch simulation ensembles.
Update the gmxapi.simulation.mdrun implementation to be more normative.
Dispatch the simulation work to the gmxapi 0.0.7 implementation in
gmxapi.simulation.workflow and gmxapi.simulation.context.
Change-Id: Id223507fc064e178992bc87d6fcf89bdd4029523
Christian Blau [Mon, 9 Sep 2019 15:45:53 +0000 (17:45 +0200)]
Add comments to grompp generated .mdp output for densityfitting
Adds additional explanatory comments to the grompp generated mdout.mdp
file for densityfitting.
refs #2282
Change-Id: I496cccced2cc87cb2434f877c0caf04cb29c1903
M. Eric Irrgang [Mon, 9 Sep 2019 14:38:00 +0000 (17:38 +0300)]
Update gmxapi Python package infrastructure for new operations.
* Improve support for stand-alone operation implementations.
* Create a registry of operation implementations for use by the
gmxapi.operation module Contexts.
* Flesh out the data model and add more modularity to the execution
model.
* Clean up various output.
Change-Id: Id63c7883e3ed7e4d0172a7a18672b950afc4c25d
M. Eric Irrgang [Thu, 5 Sep 2019 12:05:16 +0000 (15:05 +0300)]
Normalize some testing resources for the Python packages.
* Add a gmxapi.testsupport submodule.
Move the pytesthelpers.py test support module to the new
gmxapi.testsupport module.
* Remove unused details in sample_restraint/tests. mpi4py was imported
unnecessarily, and some directories created, but that was left over
from older versions of the test.
* Remove pytest.ini for gmxapi Python package tests.
These values can be set on the command line, and having them in the
pytest.ini adds developer overhead when trying to determine default
behavior or get custom behavior. In the future, consider per-test
configuration through the caplog pytest fixture, or various command
line options.
gmxapi and sample_restraint Python packages can now use essentially
identical pytest testing framework. This change synchronizes the
testing frameworks. Future changes can combine some of the facilities
for simplification and ease of maintenance.
Future changes could address the following.
* Move some pytest scripting to gmxapi package resources.
* Combine the Python and C++ resources for the test input file in
sample_restraint.
* Retrieve test data directly from the GROMACS installation.
* gmxapi.testsupport could alternatively be a separate optional package.
* More facilities can be provided, such as the test input file.
Change-Id: Ia745c75aecd97e3a8fc3053b424aa40d4c89de32
Christian Blau [Wed, 11 Sep 2019 06:49:48 +0000 (08:49 +0200)]
End to end test for density fitting
Implement an end to end test for the density fitting module.
refs #2282
Change-Id: Ic94013cae6820ccf6fa7415887b280daff25d83c
Christian Blau [Wed, 11 Sep 2019 06:50:42 +0000 (08:50 +0200)]
Densityfitting write int64_t indices instead of gmx::index
When serializing atom indices to a key-value-tree that is subsequently
written to file, the type of the indices needs to be independent of
gmx::index (aka ptrdiff_t) type definition.
This patch introduces this behaviour.
refs #2282
Change-Id: I1384158204354e2267674c266f91c133a01bc5f7
Mark Abraham [Tue, 10 Sep 2019 12:02:06 +0000 (14:02 +0200)]
Fix multi-sim restart handling in corner cases
If different simulations would have different starting behaviour,
e.g. some checkpoint files are found and some are not, then we should
not allow a restart, and do so with a useful error message.
Refs #2375
Change-Id: I8845784e8310ab6ca81db189e4a42754add03def
Paul Bauer [Tue, 10 Sep 2019 13:09:15 +0000 (15:09 +0200)]
Disable false positive warning in ICC and MSVC
Post submit was warning about constant selector expression in the
modularsimulator code when building with ICC. The warning
looked like a false positive so I added the flag to exclude it for ICC
both in native mode and with MSVC.
Change-Id: Ic0a9f2935b07d72d46940d0d5a165eb1b417a1ad
Magnus Lundborg [Thu, 5 Sep 2019 15:09:30 +0000 (17:09 +0200)]
Tidy up the FE kernel
Mainly moving variable declaration to where they are used and
making them const where appropriate.
Change-Id: I006092c39d40d0e4124cd443a16fa814e896ce93
Szilárd Páll [Wed, 11 Sep 2019 00:06:13 +0000 (02:06 +0200)]
Fix gpucomm matrix
While switching a config to thread-MPI, the "mpi" tag as not been
removed which took precedence rendering commti 3820ad ineffective.
Change-Id: I0a6f79d24dda157e15d2e26bba3e3fca4e16d60d
Mark Abraham [Tue, 10 Sep 2019 13:16:47 +0000 (15:16 +0200)]
Avoid warning in no-mpi build
clang 8 with no MPI warns about this.
Change-Id: I65afd07d3d6dacbf67c309e5a62f0720efd66485
Artem Zhmurov [Tue, 10 Sep 2019 11:12:09 +0000 (13:12 +0200)]
Making DeviceBuffer availible in non-GPU builds
Having DeviceBuffer availible in host-side code in all builds
allows to avoid passing the void-pointers for the device-side
buffers.
This is a part of preparation for the GPU version of the
StatePropagatorData, needed to connect all GPU routines.
Refs. #2816.
Change-Id: I174754de72999ff5299b3ddb8c8a0d05494f7f4c
Paul Bauer [Tue, 10 Sep 2019 14:33:43 +0000 (16:33 +0200)]
Add indication on how to enable ImageMagick convert
Change-Id: Ief6136f1218b11fdf28ce3c3028e8d6dbdf11913
Paul Bauer [Tue, 10 Sep 2019 08:28:30 +0000 (10:28 +0200)]
Fix nightly build
Fixes the clang-tidy error in the OpenCL build and disables the listed
forces tests when compiling with intel to avoid the test failures only
showing up there.
Refs #3083
Change-Id: Ie8d437b00cb9376d9eb7f8ac2d3402dee2152948
Paul Bauer [Tue, 16 Apr 2019 10:01:25 +0000 (12:01 +0200)]
Add method to extract clusters from trajectory
Ported the -sub functionality of gmx trjconv to independent method based
on the new output manager functionality.
Added simple test to show that the routine can run.
Change-Id: I33bc056f8c44b795728ae15218a9211652b40772
M. Eric Irrgang [Tue, 10 Sep 2019 12:07:59 +0000 (15:07 +0300)]
Fix parameter key look-up in gmxapi TPR reader.
A copy-paste error caused one member to be initialized twice and another
to be uninitialized.
Also, rename an inappropriate overload to indicate what it really does.
Change-Id: I35790e6de868303bd398aa21619841c8c5844e4e
M. Eric Irrgang [Mon, 9 Sep 2019 13:23:04 +0000 (16:23 +0300)]
Make gmxcli pytest fixture more robust.
Look for multiple possible `gmx` command line executables.
This change may be followed up, amended, replaced, or superseded by
change Icefe89e97009110be55dc8e1f3db5726ec1fe53a but is necessary
now to support child changes under review.
Refs #2961
Change-Id: I7d9d830c1b16fbd2af86aded3f1fea5f3a63307f
Magnus Lundborg [Tue, 27 Aug 2019 07:40:59 +0000 (09:40 +0200)]
More templating of gmx_nb_free_energy_kernel()
Kernel templated on interaction types.
Refs #2997.
Change-Id: Id02a6daab817705bdaca2ef610b793f1ddab6829
Szilárd Páll [Tue, 3 Sep 2019 10:20:28 +0000 (12:20 +0200)]
Eliminate raw force flags in do_force_lowlevel()
Change-Id: I4c54810a9130aaad0514738cc1026bc2d9f2fe5e
Mark Abraham [Mon, 9 Sep 2019 15:06:41 +0000 (17:06 +0200)]
Use more RAII semantics with t_commrec
This permitted simplifying building the Mdrunner
Fixes #3081
Change-Id: I4ac5fb2017d960d3d0cfd0103e1d7232da9f1c3a
Christian Blau [Tue, 10 Sep 2019 09:35:10 +0000 (11:35 +0200)]
Use the current mass instead of massA in density fitting code.
When using masses to determine the weights of the spread amplitudes,
massA instead of the correct massT was used. This commit fixes this
behavior.
refs #2282
Change-Id: I58deb14b4b45c122ab3c9caf3f6b76c89f9ae739
Christian Blau [Mon, 9 Sep 2019 13:41:48 +0000 (15:41 +0200)]
Account for reference density origin shift in pbc correction
When the refernce density is shifted from the origin, this shift has to
be added to the reference density center. This patch fixes incorrect pbc
correction behaviour, due to not taking this shift into account.
refs #2282
Change-Id: I953f717ecf6ab53985a59195eab896d50965039e
Szilárd Páll [Fri, 6 Sep 2019 21:54:52 +0000 (23:54 +0200)]
Use thread-MPI in the gpucomm matrix
Initial versions of the direct communication do not support MPI and do
not implement graceful fallback to staged communication. Until they do
so we need to avoid library MPI in these matrices.
Change-Id: Ie7ab579f6058831229596fd6ba09a185d3a0685f
Pascal Merz [Tue, 9 Jul 2019 04:35:48 +0000 (22:35 -0600)]
CompositeSimulatorElement for the modular simulator
This element allows to have a list of elements act as a single one.
This will simplify building algorithms.
This commit is part of the commit chain introducing the new modular
simulator. Please see docs/doxygen/lib/modularsimulator.md for details
on the chosen approach. As the elements of the new simulator cannot all
be introduced in one commit, it might be worth to view Iaae1e205 to see
a working prototype of the approach.
Change-Id: If2153923dd9421288ad57337c7255000bb7c1d91
Pascal Merz [Tue, 9 Jul 2019 04:34:25 +0000 (22:34 -0600)]
Coordinate Propagators
This change introduces the propagator element, which, thanks to templating,
can cover the different propagation types used in NVE MD. The combination
of templating, static functions, and having only the inner-most operations in
the static functions allows to have performance comparable to fused update
elements while keeping easily reordable single instructions.
Note that the two velocity update functions are only necessary to allow
exact replication of the legacy do_md code for both md and md-vv. The
parentheses or the lack thereof lead to numerical errors which build up very
rapidly to make the (very strict) integrator comparison test fail. Relaxing this
condition will make getting rid of one of the two variants possible.
An interesting further development would be to unify the OpenMP loops for
coordinate propagation and constraining by using loops over constraint
groups in both cases.
Change-Id: I1a1f66f1efe63c791ef3fe51ce2f99da3367adca
Pascal Merz [Sat, 7 Sep 2019 05:48:16 +0000 (23:48 -0600)]
StatePropagatorData: Introduced const box accessor and fixed legacy flags
Two improvements for the StatePropagatorData:
The current implementation only gave access to the non-const box
matrix. This introduces a const version of it, and changes the elements
using the simulation box to use the const version where appropriate.
The current implementation also kept using the legacy flags it got
from the global_state in all further usages. This is not correct -
when StatePropagatorData creates a deep copy as a t_state object, it
only populates certain fields. This commit fixes this.
Change-Id: I783491d9f8a0825b169880b7ab8ef7e677623d50
Pascal Merz [Sat, 7 Sep 2019 05:40:31 +0000 (23:40 -0600)]
Add trivial const qualifiers to shellfc and EnergyOutput
Change-Id: I2ce3ef7c777aa6f7b93706553c44545fc5962b4f
Pascal Merz [Tue, 9 Jul 2019 04:33:10 +0000 (22:33 -0600)]
Constraint element for the modular simulator
This change introduces a constraint element, which is implemented for the
position-and-velocity and the velocity-only case. This change does not change
the constraint implementation itself, but replaces the `constrain_coordinates`
and `constrain_velocities` calls from update.h by elements implementing the
ISimulatorElement interface and using the new data management.
This commit is part of the commit chain introducing the new modular
simulator. Please see docs/doxygen/lib/modularsimulator.md for details
on the chosen approach. As the elements of the new simulator cannot all
be introduced in one commit, it might be worth to view Iaae1e205 to see
a working prototype of the approach.
Change-Id: Ie04b995fc34801967427825bb2842411a448a677
Szilárd Páll [Mon, 9 Sep 2019 15:31:37 +0000 (17:31 +0200)]
Assert the types of OpenCL kernels arguments
Certain types are not allowed to be passed as kernel argument in OpenCL.
This change adds a static assert to the prepareGpuKernelArgument wrapper
to make sure that we do not accidentalyl pass such a type.
Change-Id: I748dccd1b8350a5b0c86d770f7fc3975112e1467
Szilárd Páll [Fri, 30 Aug 2019 14:01:21 +0000 (16:01 +0200)]
Pass gmx::ForceFlags to CPU nbnxm dispatch code
Also added one last missing flag, ForceFlags.computeDhdl.
Change-Id: Ibcfea7f3975685f2219c5a5e3c8e45c716be1789
Szilárd Páll [Fri, 30 Aug 2019 13:16:24 +0000 (15:16 +0200)]
Pass the new gmx::ForceFlags to the nbnxm module
- Changed in NB kernel dispatch
- NB GPU transfer launch and wait
Change-Id: Idd2738797ddcdd372e90cdfcc066b056a29d8de2
Berk Hess [Mon, 9 Sep 2019 14:39:36 +0000 (16:39 +0200)]
Remove incorrect check with rf-zero
Change-Id: Ia6ae62bc128c38470d42fd1ab919215ce13bc6ec
Pascal Merz [Tue, 9 Jul 2019 04:27:20 +0000 (22:27 -0600)]
Domain decomposition and PME load balancing for modular simulator
This change introduces two infrastructure elements responsible for
domain decomposition and PME load balancing, respectively. These
encapsulate function calls which are important for performance, but
outside the scope of this effort. They rely on legacy data structures
for the state (both) and the topology (domdec).
The elements do not implement the ISimulatorElement interface, as
the Simulator is calling them explicitly between task queue population
steps. This allows elements to receive the new topology before
deciding what functionality they need to run.
This commit is part of the commit chain introducing the new modular
simulator. Please see docs/doxygen/lib/modularsimulator.md for details
on the chosen approach. As the elements of the new simulator cannot all
be introduced in one commit, it might be worth to view Iaae1e205 to see
a working prototype of the approach.
Change-Id: I1be444270e79cf1391f5a228c8ce3a9934d92701
Christian Blau [Thu, 5 Sep 2019 14:45:17 +0000 (16:45 +0200)]
Relative entropy as density similarity measure
Adds a new density similarity measure that uses the relative entropy of
two densities to compare them to one another. Also adds the gradient of
this measure.
refs #2282
Change-Id: I3be18ec3fad3c2551ce7c9fe896dc257d5789cdf
Paul Bauer [Thu, 30 Aug 2018 13:40:16 +0000 (15:40 +0200)]
Add gmx convert-trj
Adds a new module gmx convert-trj, aimed at providing the minimal
functionality to convert different GROMACS supported trajectory formats
into each other, as well as supporting selections to chose atoms for
writing to disk.
The tool is based on the OutputManager and OutputAdapter framework for
writing new trajectory files and for setting meta information in the
coordinate datastructures.
Refs #2115, #2396
Change-Id: I1413721faa1383a9d3b8f14cdbea2bcc3089273f
Berk Hess [Fri, 6 Sep 2019 08:45:02 +0000 (10:45 +0200)]
Extract Cartesian data from DDRankSetup
The data related to the Cartesian MPI communication setup is now
extracted from DDRankSetup to CartesianRankSetup.
This change is only refactoring.
Change-Id: Ifa05c6fecad7ad0e80d0b64ee7f0b1df5f65b327
Berk Hess [Fri, 6 Sep 2019 12:00:07 +0000 (14:00 +0200)]
Rename DDSetup to DDGridSetup
Moved the definition of DDGridSetup and declarations for
omdec_setup.cpp to a new file called domdec_setup.h.
Also added documentation.
Change-Id: Ic14416e8acfa3b832ceff4bf529abdaf8ceb3728
Christian Blau [Fri, 6 Sep 2019 11:55:24 +0000 (13:55 +0200)]
Add option to normalize densities prior to density fitting
Adds an mdp option that makes sure that the sum of voxel values
for both input densities is unity.
refs #2282
Change-Id: I9d3c63d7548bca72a083cdafa6818ded4fcdd400
Berk Hess [Thu, 5 Sep 2019 19:29:47 +0000 (21:29 +0200)]
Clean up PME rank variables
Clarified the naming of several PME rank count variables and added
a boolean to DDRankSetup that tells whether we use separate PME ranks.
Fixes several misuses of npmenodes, all of which did not cause issues
in pratice.
Todo: Remove npmenodes from t_commrec.
Change-Id: I03b4547c975e3ffa354b53b35abcd91b4f3f6b26
Christian Blau [Wed, 4 Sep 2019 13:26:19 +0000 (15:26 +0200)]
Adding every N-steps option to densityfitting
Adds an option to the density fitting module to apply forces only every
N steps.
refs #2282
Change-Id: I8d264734e1d9a82ff9717d270552e38a28b34729
Berk Hess [Thu, 5 Sep 2019 15:10:28 +0000 (17:10 +0200)]
Refactor init_domain_decomposition()
The creation of both the whole (Cartesian) communicator and the PP
and PME communicators is now extracted to separate functions.
The first part is done before initializing gmx_domdec_t, so the role
of nodes is know before gmx_domdec_t is created.
This change is only refactoring.
Change-Id: I6d02b8c3af55570353331fa05f998a7b6de79572
Pascal Merz [Fri, 6 Sep 2019 00:21:21 +0000 (18:21 -0600)]
Make pme_loadbal_do() independent of t_state
Similar to I28b58df4 and other recent patches, this changes
pme_loadbal_do() to take the const box and a const view of the
positions as input instead of the full t_state object. This makes
subsequent changes to the t_state object easier.
Change-Id: I6ba3459fa1de80c0ed8bcf0310f4565be78d3d97
Pascal Merz [Tue, 6 Aug 2019 23:29:51 +0000 (17:29 -0600)]
ForceElement and ShellFCElement for the modular simulator
These elements encapsulate the calls to do_force and relax_shell_flexcon,
respectively. Rewriting calls to force routines is not within the scope
of this effort, so this allows us not to worry about it.
This commit is part of the commit chain introducing the new modular
simulator. Please see docs/doxygen/lib/modularsimulator.md for details
on the chosen approach. As the elements of the new simulator cannot all
be introduced in one commit, it might be worth to view Iaae1e205 to see
a working prototype of the approach.
Change-Id: I0923ddfc9f8f477b8920d212bcbdcf641075f80b
Christian Blau [Mon, 2 Sep 2019 13:47:24 +0000 (15:47 +0200)]
Adding energy output field for density fitting
Added a new energy output field for energies that stem from the density
fitting code.
refs #2282
Change-Id: I78c64213f4b958f00a938f0a67c586c2f4e9033e
Pascal Merz [Tue, 9 Jul 2019 13:14:35 +0000 (07:14 -0600)]
ComputeGlobalsElement for the modular simulator
This element encapsulates the calls to `compute_globals`. A new
approach to fit the global computation calls into the client approach has
been proposed in I44a7193c, but a complete rewriting is currently outside
the scope of this effort. This element therefore aims at offering an
interface to the legacy implementation which is compatible with the new
simulator approach.
The element comes in 3 (templated) flavors: the leap-frog case, the first
call during a velocity-verlet integrator, and the second call during a
velocity-verlet integrator.
This commit is part of the commit chain introducing the new modular
simulator. Please see docs/doxygen/lib/modularsimulator.md for details
on the chosen approach. As the elements of the new simulator cannot all
be introduced in one commit, it might be worth to view Iaae1e205 to see
a working prototype of the approach.
Change-Id: I35f310daed6355dc9ea6b574d855929ec2fee6fe
Mark Abraham [Fri, 6 Sep 2019 12:08:14 +0000 (14:08 +0200)]
Clean up commrec uniformly
This was leaking commrec from gmx help during the building of
command-line completions, which the ASAN build sometimes complained
about.
Change-Id: I4ce53ba13187ea71102f5a93118978525da7061a
Szilárd Páll [Thu, 5 Sep 2019 10:26:59 +0000 (12:26 +0200)]
Add gpuupdate and gpucomm OnDemand tokens
These allow triggering the GPU update-constraints and the GPU direct
communcation development features (both PP-PME and halo exchange),
respectively.
Also added matrix configs for both with configs identical to those in
the gpubufferops for the sake of simplicity.
Added an OpenCL config to ensure the additons of uninmpled features on
that codepath don't break things.
Change-Id: Iaf308d9b55ff10d8e43b655c2e1708eb05a5b43c
Christian Blau [Mon, 2 Sep 2019 18:07:12 +0000 (20:07 +0200)]
Periodic boundary correction for density fitting
Corrects the periodic boundaries for density fittinng
such that always the periodic image closest to the center
of the density is chosen.
ref #2282
Change-Id: I46d9546d7dbb659e03070b4ba6ffd401eb7368c4
Berk Hess [Thu, 5 Sep 2019 13:33:46 +0000 (15:33 +0200)]
Extract getting of DDRankSetup
This change is only refactoring.
Change-Id: I9a7f8ce16fe81f0016b33139933336fcb49b48b4
Berk Hess [Thu, 5 Sep 2019 12:14:28 +0000 (14:14 +0200)]
Add PP grid info to DDRankSetup
This enables many functions to use only DDRankSetup instead of
the whole gmx_domdec_t.
This change is only refactoring.
Change-Id: I6467481e3e1fa27c035c70d34591a6db0eeae90d
Pascal Merz [Thu, 27 Jun 2019 07:09:57 +0000 (01:09 -0600)]
Introduce topology class for modular simulator
The topology object owns the local topology and holds a pointer to the global
topology owned by the ISimulator.
The local topology is only infrequently changed if domain decomposition is
on, and never otherwise. The topology therefore offers elements to register
as ITopologyClients. If they do so, they get an updated local topology whenever
it is changed, and can rely that their copy is valid until the next update. The
domain decomposition element is defined as friend class to be able to update
the local topology when needed.
This commit is part of the commit chain introducing the new modular
simulator. Please see docs/doxygen/lib/modularsimulator.md for details
on the chosen approach. As the elements of the new simulator cannot all
be introduced in one commit, it might be worth to view Iaae1e205 to see
a working prototype of the approach.
Change-Id: I89e4006809ac74785205c549781a90b2d8233688
Mark Abraham [Wed, 4 Sep 2019 15:18:22 +0000 (17:18 +0200)]
Update mdrun test comparison infrastructure
This change is refactoring and extension, no use is made of any new
capabilities.
Referred to position coordinates as coordinates, in line with
agreement elsewhere. Also referred to energy terms consistently,
rather than energy fields or tolerances.
Extended the range of mdp option parameters able to be tested
configurably with the contents of the simulation database.
Made energy and trajectory comparison machinery easier to use.
Trajectory comparison is now more configurable. Sometimes the test
runner will know that it is OK to compare the data in a test frame
with a reference frame even though one of them has data that the other
does not have, or will differ, etc. So, it is now possible to compare
e.g. a test trajectory that has a frame with velocities and not forces
with a reference trajectory whose frame has both velocities and
forces, and have the comparison be valid or not according to whether
the test runner expected the mismatch in contents.
Fixed issue with trajectory frame comparison assuming that coordinates
would always be present.
More use of std::string.
Change-Id: I6926380e271344e7bd1a7c6594cc604d7a68e67a
Pascal Merz [Thu, 5 Sep 2019 02:59:18 +0000 (20:59 -0600)]
Rename MicroState to StatePropagatorData for modular simulator
The name of the t_state replacement is changed from MicroState
to StatePropagatorData. Also, the write and read access to x/v/f
data is renamed to xxxView() and constXxxView() for additional
clarity and to avoid confusion with file writing operations.
This also removes the constraint element from the list of friend
classes, as there is no need for direct access to the state
anymore thanks to I28b58df4.
Change-Id: I1b5b966aafbfa6fe5c44c36416ebb25f38505b58
Berk Hess [Thu, 5 Sep 2019 09:57:08 +0000 (11:57 +0200)]
Extract DDRankSetup from gmx_domdec_comm_t
Change-Id: I5b16d624a375478928546788d1f8319e9d796100
Christian Blau [Mon, 2 Sep 2019 08:20:25 +0000 (10:20 +0200)]
Add reference density file option to densityfitting
Add option to density fitting to read reference density for
density fitting code.
refs #2282
Change-Id: I598b679a3c1c63b913a104d7ccff8e1643b3946d
Pascal Merz [Wed, 4 Sep 2019 22:36:49 +0000 (16:36 -0600)]
Adapt inheritance intendation to uncrustify
As discussed in I35f310da and some other commits along the modular
simulator chain, uncrustify insists on aligning the first inheritance
with the `final` keyword, as in
template <ComputeGlobalsAlgorithm algorithm>
class ComputeGlobalsElement final :
public ISimulatorElement,
public IEnergySignallerClient,
public ITrajectorySignallerClient,
public ITopologyHolderClient
It was therefore decided to align all inheritances to the same level,
as in
template <ComputeGlobalsAlgorithm algorithm>
class ComputeGlobalsElement final :
public ISimulatorElement,
public IEnergySignallerClient,
public ITrajectorySignallerClient,
public ITopologyHolderClient
This formatting will be reevaluated when uncrustify is replaced by
clang-format.
This commit applies this decision to the classes previously introduced
along the commit chain. It also addresses two typos in trajectoryelement.h.
Change-Id: I03b9fd142d822f7a7523e351f08a4044bff2cff4
Pascal Merz [Thu, 5 Sep 2019 02:27:31 +0000 (20:27 -0600)]
Make do_constrain_first() independent of t_state
This changes the do_constrain_first() function to directly take the
required state data (natoms, x, v, box, lambda[efptBONDED]) as input
instead of a pointer to the full t_state object. This makes subsequent
changes to the t_state object easier.
This also adds some trivial const qualifier for the box matrix in the
constraining functions.
Change-Id: I28b58df45481549cd93076334b0778e23e228154
Berk Hess [Wed, 4 Sep 2019 10:53:34 +0000 (12:53 +0200)]
Split off getting of the DD setup
Change-Id: I19e956b04a14df75e91b721954bba52abe49d1d8
Berk Hess [Wed, 4 Sep 2019 11:49:10 +0000 (13:49 +0200)]
Collect settings for DD in DDSettings
This change is only refactoring.
Change-Id: Icb32f8f5211ff3033c4d5c70afbfd24d4a8ffbf3
Berk Hess [Wed, 4 Sep 2019 07:53:36 +0000 (09:53 +0200)]
Extract getting of DDSystemInfo
This change is only refactoring.
Change-Id: Ie7127f0fd8219108de1385978a781a3c15fc6239
Berk Hess [Wed, 4 Sep 2019 08:03:46 +0000 (10:03 +0200)]
Simplify handling of DD bonded distances
To simplify and clarify the DD setup code, we now always always store
the systemInfo.minCutoffForMultiBody and use a separate flag to tell
if we should increase the cut-off distance for bonded communication.
There is a minor behavioral change in that with large domains and
bonded communication filtering or DLB, the bonded cut-off is now
5% of the bonded cut-off longer as the margin is now included.
This has a negligible effect on performance in all cases.
Change-Id: Id409353c517181ac56e8d3f1f36c22c705aa8077
Berk Hess [Wed, 4 Sep 2019 06:45:19 +0000 (08:45 +0200)]
Move constraint and bonded filtering info into DDSystemInfo
Change-Id: Ic3cc4b5da309ab3f8e719739a5a162cd2c2d62bf
Szilárd Páll [Wed, 4 Sep 2019 00:33:10 +0000 (02:33 +0200)]
Bump ARM HPC toolchain in post-submit to v19.3
Change-Id: Id27642e016ee47888c7c3a7dac426309288aff9e
Christian Blau [Tue, 3 Sep 2019 10:36:09 +0000 (12:36 +0200)]
Fix double overload in LocalAtomSet code when gmx::index is int
In cases where the int type matches the gmx::index (aka ptrdiff) type
two overloaded constructors in LocalAtomSetData became the same, as well
as the overloaded add method. This is now avoided by an enable_if
clause.
Change-Id: I139c7feff141928f71c71d6f6db3ee1bffe325b7
Szilárd Páll [Fri, 23 Aug 2019 16:12:35 +0000 (18:12 +0200)]
Add back a clang-tidy exception
Previous commit (658819) removed a clang-tidy exception that was
needed with clang 8, but the SIMD + GPU path have not been enabled
yet with clang-8 tidy. To be able to enable the pending CI configs
this change adds back the nolint exception.
Change-Id: I6be4856c64161a1a5f57849d13b4cdea335cc3bb
Christian Blau [Mon, 2 Sep 2019 08:12:31 +0000 (10:12 +0200)]
Read mrc file using file name
Provide a higher level class for reading an mrc file given file name and
convert the information read from the density file into coordinate
transformation and three-dimensional density data.
Change-Id: I30ac5c044c5433043224be288340b794455f8fc9
Berk Hess [Tue, 3 Sep 2019 20:43:34 +0000 (22:43 +0200)]
Move update grouping to DDSystemInfo
Change-Id: Ida28b87a4a0ff004d25ca4d6f0f78f30a19536dd
Magnus Lundborg [Wed, 19 Jun 2019 14:13:33 +0000 (16:13 +0200)]
Inline functions of calculations of FE interaction types.
The functions are so far only templated on the real
requirements of the softcore that is used.
This is one step towards templating the calculations
for SIMD.
Refs #2997.
Change-Id: I3fd119dce30f95eba4f8cd6f139f99260acf0e22
Berk Hess [Tue, 3 Sep 2019 18:52:08 +0000 (20:52 +0200)]
Change DD pme force buffer to std::vector
Change-Id: I8cf00535fab713911e3dbb24a4daed3eeb0b46ee
Berk Hess [Tue, 3 Sep 2019 12:59:17 +0000 (14:59 +0200)]
Initialize all members of gmx_domdec_t
Change-Id: I78958c9c0e72de77d6226685401b9a5ff19434aa
Szilárd Páll [Thu, 20 Jun 2019 18:54:01 +0000 (20:54 +0200)]
Centralize more MD/force shedule flags
This change creates an MdScheduleWorkload top-level class to store
information related to per-step, per search-phase, or per run schedule
information and moving the previous PpForceWorkload call into it.
This change also migrates force flags bitmask into a new class
stored in the MdWorkload class.
Change-Id: I142a76d9515e82b16b9a4100ffb00469d7f3d3c2
Berk Hess [Tue, 3 Sep 2019 09:06:54 +0000 (11:06 +0200)]
Extract DDSystemInfo from gmx_domdec_comm_t
This is only refactoring.
This is preparation for separating the DD grid choice from
the initialization of gmx_domdec_t.
Change-Id: I83d8ecdd1a4d21d0a791c463d092f66d0b28df51
Berk Hess [Tue, 3 Sep 2019 08:45:02 +0000 (10:45 +0200)]
Unify manual and auto DD grid choices
This change is only refactoring, except that now an assert is added
for consistency of the auto grid choice with the cell size limit.
Change-Id: I36306495881826de809e3d048d0ced52543674e2
Berk Hess [Tue, 3 Sep 2019 08:30:36 +0000 (10:30 +0200)]
Remove gmx_domdec_t from dd_choose_grid()
This change is only refactoring.
Change-Id: I2d658739da1f0ff185ab89a5efe2361da0c7fa82
Berk Hess [Tue, 3 Sep 2019 07:40:10 +0000 (09:40 +0200)]
Extact UnitCellInfo from gmx_domdec_t
This required adding an explicit constructor for gmx_domdec_t,
which is currently incomplete.
Change-Id: Iba39fec36945465bffaf97d499c56501500ecb3b
M. Eric Irrgang [Thu, 29 Aug 2019 18:28:43 +0000 (21:28 +0300)]
Python wrapping code for gmxapi mdrun bindings.
Expose the mdrun bindings to the Python interface.
Updates workflow.py and context.py from 0.0.7.4 tagged release of external project.
Refs #2893
Refs #2912
Refs #3027
Change-Id: I44a66646eceb191a2ec755169671af326f22526a
Pascal Merz [Thu, 27 Jun 2019 07:09:43 +0000 (01:09 -0600)]
Introduce energy element for modular simulator
The energy element owns energy related data (energies for output,
tensors for virial and pressure, mu_tot vector), and holds pointers
to energy-related data owned by ISimulator (enerd, ekind). It is
responsible for calculating energies at steps, and writing energies
to trajectory files. It offers interface access to add data to the
virials, but also offers raw pointers, as not a lot of functionality
across GROMACS relies on getting raw pointers to the tensors /
mu_tot vector.
This commit is part of the commit chain introducing the new modular
simulator. Please see docs/doxygen/lib/modularsimulator.md for details
on the chosen approach. As the elements of the new simulator cannot all
be introduced in one commit, it might be worth to view Iaae1e205 to see
a working prototype of the approach.
Improved handling of MSVC warning 4244 about possible lossy conversion.
Change-Id: Iae8d666e1c38b5a817d7ef2018adb13567d4760b
Mark Abraham [Tue, 27 Aug 2019 11:44:24 +0000 (13:44 +0200)]
Simplify energy-file comparisons in tests
Now that we use newer infrastructure, we can use lambdas.
Also made FramePairManager and ContinuationFramePairManager
more consistent.
Change-Id: I8ccc9dd3134e5e188c3ea2b8b6ab335b4f267b10
Artem Zhmurov [Fri, 9 Aug 2019 10:31:08 +0000 (12:31 +0200)]
Add Parrinello-Rahman pressure coupling to CUDA Leap-Frog integrator
Parrinello-Rahman isotropic pressure coupling scheme is now
added to CUDA version of the Leap-Frog integrator. The
Leap-Frog tests are updated to check the new addition.
Refs. #2887, #2888.
Change-Id: Icf42667621c16a994e68baf5158ea4abac387928
Mark Abraham [Mon, 2 Sep 2019 05:45:39 +0000 (07:45 +0200)]
Move initialization of clFFT
Gave ClfftInitializer the responsibility for mutual exclusion, which
means the initialization is now convenient to do alongside other
PME-on-GPU initialization tasks. This simplifies the code.
Removed mention of lazy initialization, which was not implemented at
all.
Refs #2535
Change-Id: I429767b059ddc3b4f16f2f4a8830b54ed1f49fab
Berk Hess [Tue, 20 Aug 2019 08:16:19 +0000 (10:16 +0200)]
Only use fshift when needed
The shift force buffer in ForceWithShiftForces is now empty when
virial computation is not requested. This will simplify refactoring
of the force buffer management.
Change-Id: I6c8e543766703b038c178a0e95ccb536f367d5e1
Christian Blau [Mon, 26 Aug 2019 15:17:59 +0000 (17:17 +0200)]
Add checkpointing for MdModules
Adds the possiblity to write and read from checkpoint files for MdModules.
refs #2282
Change-Id: Id3ab57d1c9a40b6e1fb0193430e5b66ffa87d787
Erik Lindahl [Fri, 30 Aug 2019 19:39:21 +0000 (21:39 +0200)]
Fix CPU detection and SIMD on modern Mac/cmake combos
With recent versions of cmake on Mac, the CPU detection
program failed to compile since it was very fragile (buggy)
with respect to how compiler flags were defined - and that
in turn will mean losing all SIMD support.
This will fix the build, and it also adds a more vocal warning
if the CPU detection code cannot be compiled at all.
Change-Id: Idcdc8b59a4252b3faf8572311d2ca63a4d2a1bc0
Christian Blau [Mon, 26 Aug 2019 21:54:09 +0000 (23:54 +0200)]
Constructing local atom sets for density fitting
Constructs local atom sets for density fitting during simulation
setup.
refs #2282
Change-Id: I0300376a6818f3ad8bb6474b09a9b0f1cbb46eae