Szilárd Páll [Fri, 23 Aug 2019 17:14:58 +0000 (19:14 +0200)]
Further fixes for clang-tidy clang version 8
These eliminate warnings with the standard recommended flags.
Change-Id: I541f1bfa918489219c5e02d8b0b92619e7c3f293
Artem Zhmurov [Tue, 13 Aug 2019 14:59:11 +0000 (16:59 +0200)]
Misceleneous improvements to the Leap Frog tests
1. The contained with runnerss is made static so it will be
initialized only once for the test case.
2. The member initializer is now only use constructor arguments,
and hence does not impose requirements on the class fields
ordering.
3. mdAtoms_.cFREEZE is set to nullptr explicetely, to make the
code less sesitive to possible further changes in intialization
of t_mdatoms.
Change-Id: I6e1db5cb3d5d81028480457989ce2e2b387018f4
Paul Bauer [Tue, 6 Aug 2019 08:31:01 +0000 (10:31 +0200)]
Removes checker for installed files
As the plan is to remove the current handling of installed header files,
this removes the checker parts from the doxygen check-source script for
this attribute.
Refs #2382, #2139, #988
Change-Id: I76b519f39a5c793c9f1ea8c1eb5eebb39b4a9352
Szilárd Páll [Wed, 21 Aug 2019 12:02:15 +0000 (14:02 +0200)]
Fix clang-tidy warnings in the OpenCL build
Change-Id: I4cc6a1402d068431feab4523911a7b60e0e66d59
Szilárd Páll [Thu, 22 Aug 2019 11:01:17 +0000 (13:01 +0200)]
Fix clang tidy warnings in CUDA build
Tested with clang 7 on a build with clang for both host and device code.
Change-Id: Ie2be427ae63f90f4eec4e79cc85da3ab13fcfe4a
Mark Abraham [Sat, 6 Jul 2019 18:37:45 +0000 (20:37 +0200)]
Update clang-tidy to clang version 8
Some new warnings are well intentioned, but not practical to turn on
in GROMACS given the limited suppression capabilities.
Rationales for suppressions of new warnings can be found in
src/.clang-tidy
Change-Id: I857d3790450e33a669c6a68ad846cae3783875e7
Mark Abraham [Thu, 22 Aug 2019 19:16:04 +0000 (21:16 +0200)]
Merge branch release-2019
Change-Id: I71b540586e32f54f3536c5a59eb99d89ad0b3639
Mark Abraham [Wed, 21 Aug 2019 03:52:58 +0000 (05:52 +0200)]
Improve clang-analyzer build time
The tests for selection and utility modules take a long time to
link, so these are moved earlier in the CMake so that linking
will start sooner.
Change-Id: I2fb50515d8ffe5f93e0bcf13c6a780cb5725aa3e
M. Eric Irrgang [Tue, 11 Jun 2019 12:40:28 +0000 (15:40 +0300)]
C++ code and Python bindings for TPR parameter read/write.
Core functionality to allow TPR files to be rewritten with altered
parameters, ported from https://github.com/kassonlab/gmxapi v0.0.7.4
with modifications to naming and coding style. (Refer to patch history.)
A lot of the C++ code is not intended to be a long term solution,
but demonstrates the use cases that will need to be addressed
as modules become able to self-describe their inputs and outputs.
However, this change is necessary to support near-term data portability
between gmxapi operations for preparing and wrangling chains or
ensembles of simulations.
Refs #2993
Change-Id: I54677c861dfb19c9f34b11d2c30456e6ee5dbe8d
Mark Abraham [Mon, 19 Aug 2019 13:19:51 +0000 (15:19 +0200)]
Fix release matrix
Change-Id: Ieacbb36daa10077e98bf23058c6c261560ad8be2
Berk Hess [Wed, 21 Aug 2019 12:23:55 +0000 (14:23 +0200)]
Fix perturbed bonded bug
Recent commit
0c26c550 allowed perturbed bonded interactions to use
SIMD kernels that only used the A-state parameters.
TODO: Add tests that catch this, refs #3064
Change-Id: I6e03d55f1431e007a9d7d85e1b32151340765b42
M. Eric Irrgang [Thu, 4 Jul 2019 08:54:59 +0000 (11:54 +0300)]
Enable GMXAPI by default.
Change default CMake configuration to enable the build and install of
libgmxapi and associated headers.
Refs #2756
Refs #3059
Change-Id: I5688a1ad6b524882090201014fc34cb34c1e3748
Mark Abraham [Mon, 19 Aug 2019 15:10:02 +0000 (17:10 +0200)]
Improve organization of LINCS reporting
Some result fields were being re-used in a way that was hard
to understand. Also static analyzers could not see that the
in debug mode the behaviour was correct.
Change-Id: I9502a350f888929f82d33c09c07fa12b5078342b
Mark Abraham [Tue, 20 Aug 2019 11:37:56 +0000 (13:37 +0200)]
Apply clang-tidy-8 readability-uppercase-literal-suffix
This new check in clang-tidy-8 seems useful enough to activate, even
if only so people get used to reading code that also conforms to the
check. The value is similar to using upper case for MACROS - that the
token is more clearly not a variable.
Change-Id: Id4712f53e07bd7b9b3148f63c4f1c8457d7e199e
Mark Abraham [Thu, 4 Apr 2019 09:29:24 +0000 (11:29 +0200)]
Use potential-shift as default modifier
The potential-shift-verlet modifier is no longer useful, as
potential-shift was the default with the only cut-off scheme
remaining. That is now explicit. The former modifier is now
named to reflect that it doesn't do anything.
The documentation no longer mentions that modifier, but if a user
supplies an .mdp file using it, grompp silently adopts the behaviour
of the potential-shift modifier. No .tpr files contain that value, as
grompp always converted it to something else, but in any case this
patch doesn't change the situation if somehow such a .tpr does exist.
Change-Id: Ie4f848a298750b9749ebb083812bad06b2faa45c
Berk Hess [Thu, 15 Aug 2019 06:39:15 +0000 (08:39 +0200)]
Merge two dihedral functions
Merged the dihedral functions and sub-functions with and without
nergies and forces, both without SIMD.
his change also adds the angle and force optimization for multiple
dihedrals over the same atoms for the energy flavor of this kernel.
Change-Id: I17e4ff9f625b7b3db05663f19c99b103bc99432f
Mark Abraham [Thu, 8 Aug 2019 14:29:36 +0000 (16:29 +0200)]
Reduce cosine acceleration quantity properly
The momenta should be redueced in compute_globals only when there
actually is cosine acceleration
Change-Id: Id42dbff6272cdfda2c062f97e93658f308e75d34
Berk Hess [Fri, 2 Aug 2019 12:56:23 +0000 (14:56 +0200)]
Use shiftForces in ForceOuputs
The shift force buffer in t_forcerec is changed to std::vector and all
access now happens through ForceWithShiftForces.
Also removed the depreacted rvec getters from ForceOuputs.
Change-Id: I1353e6497d651a8f24e819a8826af78656889953
Erik Lindahl [Wed, 14 Aug 2019 10:53:06 +0000 (12:53 +0200)]
Avoid using GMX_SIMD macros to detect _mm_pause()
This is a first step to start removing all the SIMD
macros and replacing them with C++14 constructs instead.
The change also replaces negative tests for windows
with clearer positive ones, and makes sure we use the
same test for the conditional include and using the
result.
Change-Id: Ie8a2311f88b8704dac135f2ac96ac272dee8695a
Mark Abraham [Tue, 13 Aug 2019 14:48:40 +0000 (16:48 +0200)]
Fix issues for clang-analyzer-8
pdb2gmx can no longer attempt to add a vsite after issuing a warning
that it cannot convert an atom, instead exiting with a fatal error.
Fixed bug in gmx order -calcdist
Suppressed some analyzer leak warnings of gmock objects. If the leaks
are real, ASAN will really find it, and if not we aren't going to fix
it in gmock.
Change-Id: Ib3290d7722c1e719ce5291cf3db68a87bc7ce89a
Berk Hess [Wed, 14 Aug 2019 08:30:13 +0000 (10:30 +0200)]
Make bonded virial computation conditional
Made the shift forces computation conditional of the bonded kernel
flavor for all kernels in bonded.cpp.
Introduced a forces spreading function for bonds to reduce code
duplication.
Change-Id: I7257d2223a28148f4b59583157b352d6d3918461
Berk Hess [Tue, 20 Aug 2019 06:56:43 +0000 (08:56 +0200)]
Fix missing bonded forces with CUDA GPUs and DD
Fixes issue #3063
Change-Id: Ibce7fa741a7d2171f61968f22a758b40f79a8759
Szilárd Páll [Wed, 24 Jul 2019 15:30:53 +0000 (17:30 +0200)]
Bump clang-cuda post-submit compiler/CUDA version
clang 8 + CUDA 10 is the latest working setup
Fixes #2819
Refs #3006
Change-Id: I3dd0bb5c667d2295593178d445260beaf0509277
Szilárd Páll [Fri, 16 Aug 2019 15:32:28 +0000 (17:32 +0200)]
Switch to ARM HPC toolchain v19.2 in post-submit
Refs #3011
Change-Id: Iabba5465651bb8f2715dda372ec8abf930fd85e2
Mark Abraham [Mon, 12 Aug 2019 09:00:55 +0000 (11:00 +0200)]
Modernize t_matrix, t_mapping, t_rgb
This supports removing some manual string handling that regularly
troubles e.g. the static analyzer.
Made more use of vector, ArrayRef and ssize.
Stopped installing matio.h, because the transformation introduced
here was going to lead to many more files installed, and we anyway
plan to remove the serendipitous API that we have.
Refs #2899
Change-Id: Ia4c6a37d4f25dc2de93b06b2ffc46e2ddab96f39
M. Eric Irrgang [Wed, 24 Jul 2019 11:40:11 +0000 (14:40 +0300)]
Clean up gmxapi documentation build.
Address some Sphinx errors. Undo a regression in conf.py. Begin
importing package documentation from Python into Sphinx docs.
Change-Id: Id41dfc5495877a59fd9e8a8b497381b450a3e17e
M. Eric Irrgang [Thu, 20 Jun 2019 10:55:51 +0000 (13:55 +0300)]
Add subgraph and while_loop operations.
Allow multiple operations to be added in a subcontext so that
the set of operations can be instantiated and executed
repeatedly in a looping construct.
Also adds logical_not transformation, which will be further
refined in later changes.
Refs #2994
Change-Id: I482d51bac9756a197d8b50fb2a4af36a44dbde27
Mark Abraham [Mon, 12 Aug 2019 09:00:55 +0000 (11:00 +0200)]
Modernize t_psdata
This is useful in itself, but mainly prepares to modernize other users
of t_rgb, which need it to have a constructor.
Also made a comment more neutral
Refs #2899
Change-Id: I1717c8c049f81c313c2b435f7d56b36a3f914551
Szilárd Páll [Fri, 16 Aug 2019 00:21:17 +0000 (02:21 +0200)]
Work around clang CUDA device code codegen bug
Some of the PME kernels (namely PME spread and solve) get miscompiled
when clang native device code compilation is used with assertions and
optimization on, causing errors in RelWithAssert builds.
As a workaround, this change disables optimization for these kernels when
assertions are enabled (and only if the device compiler is clang).
Refs #2819
Change-Id: I815fc86116ffb57c4d5803ce7fa4d260909ae7ba
Christian Blau [Fri, 16 Aug 2019 11:41:07 +0000 (13:41 +0200)]
Fix segfault with old tprs processing internal parameters
Mdrun would occasionally segfault when processing tpr versions before
generic internal parameter storage. This patch fixes the segfaults.
Fixes #3060
Change-Id: Ied638943112ab6c18b425584f3361cbb5a3b7de6
Szilárd Páll [Fri, 16 Aug 2019 14:05:51 +0000 (16:05 +0200)]
Fix sim_util.cpp copyright header
c806efa2 added an extra character.
Change-Id: Id8dd7776ad7a38126937f6793a3fc2927cf054ff
Mark Abraham [Sat, 10 Aug 2019 04:43:53 +0000 (06:43 +0200)]
Update testing matrices and fix warnings
Updated to test gcc 9, clang 8, and cmake 3.15.1.
Also fixes for compilation with gcc 9 and clang 9 (still in release
candidate, not yet released)
Added a gmx_source_file_warning_suppression() CMake helper function
(like the recently introduced gmx_target_warning_suppression()) to
manage per-source-file suppressions. This is used to suppress a
warning about the abuse of t_inputrec that is too difficult to fix
without replacing all of the handling of initialization and broadcast
of t_inputrec and subfields.
Refs #2899, #3006
Fixes #3007
Change-Id: I3a31a40c472d420adbb38d11ed5121702d7b3f7d
Mark Abraham [Thu, 15 Aug 2019 19:02:13 +0000 (21:02 +0200)]
Move keyvaluetreewriter code
This will be needed by more than preprocessing code in future, so
needs to be moved to a module that e.g. is part of the mdrun-only
build. Perhaps utility is too low, but at least there is other
key-value handling code there.
Change-Id: I423a5a342ea4d5d44fb9844f98dafa0aef18f90a
Mark Abraham [Thu, 15 Aug 2019 12:49:30 +0000 (14:49 +0200)]
Stop nbnxm/grid.h depending on SIMD module
Only part of the NBNXM module has a SIMD dependence, and this reduces
the size of it.
Change-Id: I1376e9f1b30b436453582bdabc65efd185a66b33
Szilárd Páll [Fri, 15 Feb 2019 19:14:16 +0000 (20:14 +0100)]
Fix OpenCL gather reduction
On >=16-wide execution it is correct (narrower is checked and excluded
during compilation).
TODO: Consider changing the default on NVIDIA & Intel where offloading
PME is generally not advantageous to performance.
Addresses part of #2519
Refs #2453 #2516
Change-Id: I24beaaeea096954ba32b3a80251945a9d82a3c05
Alan Gray [Fri, 10 May 2019 10:28:58 +0000 (03:28 -0700)]
PME reduction for CUDA F buffer operations
Enable with GMX_USE_GPU_BUFFER_OPS env variable.
Provides functionality to perform reduction of PME forces in F buffer
ops kernel. Currently active when single GPU performs both PME and PP
(multi-GPU support will follow in patch which perfoms PME/PP comms
direct between GPUs). When active, Device->Host copy of PME force
and CPU-side reduction is disabled.
Implements part of #3029, refs #2817
Change-Id: I3e66b6919c1e86bf0bed42b74136f8694626910b
Mark Abraham [Tue, 13 Aug 2019 08:27:48 +0000 (10:27 +0200)]
Remove run-time check from calc_shifts
Now that this logic is unit tested, we don't have to
check it every step when using pressure coupling.
Also fixed some minor issues with pbcenums test that
I used as a template for the new source file.
Change-Id: I8f5dfaa44d2f2a92beee61fa6ba4ec94de21f50e
Christian Blau [Thu, 8 Aug 2019 09:15:41 +0000 (11:15 +0200)]
Move densityfitting options and output into seperate file
Exposes density fitting options and output interface for testing.
Added test for density fitting options class.
refs: #2282
Change-Id: I0107217b5af86abf1ed298dd77553c4c24b1d3f2
Berk Hess [Wed, 7 Aug 2019 13:17:57 +0000 (15:17 +0200)]
Template bonded interactions on kernel flavor
This change is only refactoring.
Change-Id: I34c44714824bbb012a0eacd53d013fe21c8f8f94
Christian Blau [Thu, 8 Aug 2019 15:00:59 +0000 (17:00 +0200)]
Info class to name and generate the densityfitting module
Similar to the trajectoryanalysismodules, use an info class to name and
generate the densityfitting module.
Naming of related mdp options based on the module name.
Change-Id: Iaaffb28bba3633421040f3f9bf5eb6463398f731
M. Eric Irrgang [Wed, 14 Aug 2019 11:54:50 +0000 (14:54 +0300)]
Fix logic error in python_packaging/src/CMakeLists.txt
When building as part of the GROMACS project (rather than via `pip`),
some branching logic for CMake versions <3.12 and >=3.12 was reversed.
Change-Id: I28c92372ef421ab14d2f68a17a9ec896179af3af
M. Eric Irrgang [Thu, 8 Aug 2019 12:28:15 +0000 (15:28 +0300)]
Minor optimization to `pip install` in gmxapi CI build.
Change-Id: I247ca2c253a73b30cd21f36914bcf7c0ecbd7aa2
Christian Blau [Thu, 8 Aug 2019 14:18:35 +0000 (16:18 +0200)]
Internal parameter storage for IMDModules
It is currently not possible for MdModules to store data in a tpr
file that is non-mdp input, e.g., the result of some computation
during setup level.
Atom indices of index groups are one example: evaluated from strings
during grompp time, they are stored as list of integers in the run
input file. During the mdrun setup the information to evaluate the
index groups is no longer available.
This patch introduces a storage for internal MdModule parameters.
The parameters are stored in a seperate key-value-tree in the input
record that is then serialized into the tpr file. In contrast to the
ir->params, this key-value-tree does not match the options given in
an input file.
Change-Id: I207d8c837c39f1afb196507fe228306700e46a49
Artem Zhmurov [Tue, 13 Aug 2019 14:55:57 +0000 (16:55 +0200)]
BugFix: Zeroing the padded area of coordinates vectors in LeapFrog tests
The reserveWithPadding does not put zeros to the vectors. In some cases
this lead to some residue data in padded area which caused floating
point exceptions when SIMD kernel was used (in ~1 out of 200 cases).
Change-Id: I7f9898ffc4b933c054d1ca4746d9b8de8caed3fb
Mark Abraham [Tue, 13 Aug 2019 19:50:05 +0000 (21:50 +0200)]
Fix vv integrators
This got broken in refactoring commit
88c7ed2de9e66d3a. That change
meant that when restarting from a checkpoint, the velocity propagation
at all non-initial steps was wrong for all vv integrators.
Change-Id: Id3890244a600d6d3ead450acce001a4e5be9e896
M. Eric Irrgang [Wed, 31 Jul 2019 15:57:58 +0000 (18:57 +0300)]
Add initial .clang-format file.
This change separates out the introduction of the clang-format
configuration from the adoption of clang-format as the alternative to
uncrustify.
Discussion on the contents of the config file have taken place at
https://gerrit.gromacs.org/c/gromacs/+/6307
Refs #2107
Change-Id: I2221486ebd24147799338a3be7ca462e9c8e761a
Artem Zhmurov [Mon, 5 Aug 2019 13:45:06 +0000 (15:45 +0200)]
Make use of reference data in integrator tests
Current version of tests is based on exactly solvable model,
which does not allow for testing more sophisticated cases,
including when temperature or pressure control is enabled.
This commit adds the tests that are based on the reference
data, which can be generated for any existing use-case.
Refs. #2816, #2887.
Change-Id: I64bb2326b0adf44be8b48449ef09cd26939ea467
Artem Zhmurov [Tue, 30 Jul 2019 08:29:00 +0000 (10:29 +0200)]
Make use of reference data in SETTLE tests
As a temporary measure, the CPU and GPU versions of SETTLE
were tested agains each other. Making use of the reference
data framework allows to test them against precomputed values.
Now, the final positions, velocities and virial are properly
tested in CPU and, if available, in GPU versions.
Refs. #2886, #2888.
Change-Id: I8e54e1a741263b8bf9774a21141c527f58130fa9
M. Eric Irrgang [Tue, 16 Jul 2019 16:00:24 +0000 (19:00 +0300)]
Improve sample_restraint project integration.
Build for testing as part of a gmxapi enabled GROMACS build. Fix some
errors and collisions.
* Use distinct CMake options for using bundled pybind sources in
gmxapi Python package and sample_restraint package.
* Distinguish between "umbrella" build and standalone build when
trying to determine googletest source for sample_restraint.
* Avoid a couple of warnings about unused variables.
* Use GTest::Main target more consistently for sample_restraint tests.
Refs #2056
Refs #3027
Refs #3033
Change-Id: I55d20e6228779ecc726587231c83298356192f6f
M. Eric Irrgang [Tue, 13 Aug 2019 11:20:02 +0000 (14:20 +0300)]
Don't install googletest.
We neglected the EXCLUDE_FROM_ALL option to add_subdirectory when
recently restructuring the googletest CMake stuff, resulting in
installation of extra stuff that we really only want in the build tree.
Change-Id: Iac9040e0cb2d1c630d489687e86e59c1ca80a707
M. Eric Irrgang [Tue, 16 Jul 2019 12:14:23 +0000 (15:14 +0300)]
Map gmxapi C++ exceptions to Python exceptions.
Create a base exception and several derived exceptions in the
gmxapi._gmxapi C++ extension module for the Python package. In addition
to mapping the few existing exceptions from gmxapi/exceptions.h, we add
handlers for unmapped exceptions derived from gmxapi::Exception and for
unknown exceptions, such as exceptions originating in the core library
or uncaught stdlib exceptions. gmxapi._gmxapi.Exception derives from
gmxapi.exceptions.Error.
Refs #3034
Change-Id: I270908216271876bcb8ef6e83b78ca333042c336
Mark Abraham [Thu, 8 Aug 2019 09:31:34 +0000 (11:31 +0200)]
Remove workaround for buggy cmake
Bug 10837 was fixed in cmake 3.6, GROMACS now require 3.9.6
Change-Id: Ie47bb3fc83e44c125058a85a9fed9d54c1176a69
Mark Abraham [Thu, 8 Aug 2019 18:13:35 +0000 (20:13 +0200)]
Fix icc 19 codegen issue
This is one thing broken in post-submit testing right now
Change-Id: I496d99ee86861f2c8b467c09593a5882b19b0bb0
M. Eric Irrgang [Thu, 20 Jun 2019 10:51:13 +0000 (13:51 +0300)]
Introduce Context requirement.
Operation handles are acquired with mediation from a
specific Context object, which supports a protocol for
adding nodes to a work graph.
Refs #2994
Refs #2996
Change-Id: I4b110eff23a8326bad21bbf2b1b236522d3ba630
Mark Abraham [Mon, 12 Aug 2019 11:48:55 +0000 (13:48 +0200)]
Quiet warning
Change-Id: I7a7594bb819dff884cb6e96e5c6e4e7dab840c18
Mark Abraham [Fri, 9 Aug 2019 12:01:49 +0000 (14:01 +0200)]
Fix ocl_kernel target
Got broken during refactoring of nbnxm module
Change-Id: Ia328d522fa5c5b38badb23c6adec715479589cb3
Szilárd Páll [Wed, 31 Jul 2019 19:09:30 +0000 (21:09 +0200)]
Fix hwloc find package naming and quietness issues
Due to compound issues the hwloc detection has been more noisy at
subsequent cmake executions than it should.
This change corrects the module naming to "HWLOC" as this is the prefix
the variables the modules defines. Also implemented an internal cache
variable to detect subsequent calls to the hwloc detection.
Change-Id: I13c82277b1edf577ebdc4791d6cb2576c5ff434d
Pascal Merz [Thu, 1 Aug 2019 17:58:17 +0000 (11:58 -0600)]
Use new setenv function for energyoutput test
The parent commit I5a36ce0c4 introduced a convenience function to
have identical behavior of setenv on Unix and Windows systems. This
change uses it for the energyoutput test.
Change-Id: I81ed288d6a582b733cec7bf9a425d8df1bda5474
M. Eric Irrgang [Thu, 20 Jun 2019 10:54:45 +0000 (13:54 +0300)]
Separate out some abstract base classes.
Introduce SourceResource and AbstractOperation to improve consistency
and static type checking.
Refs #2996
Change-Id: If7a23ca66e21e55cd67a6242fd699507699423c0
Berk Hess [Wed, 7 Aug 2019 10:10:32 +0000 (12:10 +0200)]
Move bonded function table into bonded.cpp
Instead of exposing the bonded functions for every function type
outside bonded.cpp, now a function in bonded.cpp dispatching
each bonded interaction fuction using a local table.
This is preparation for templating the bonded interaction functions.
This change is only refactoring.
Change-Id: I22d5f46b09fa00ca65e0359f963c1cc6bfb33aa9
Artem Zhmurov [Mon, 1 Jul 2019 12:52:22 +0000 (14:52 +0200)]
Prepare Update and Constraints for Domain Decomposition
Initial GPU-based version of the update and constraints was not
designed to run with the Domain decomposition. This introduces a
couple of fixes to the memory management that should alow the
module to work with the DD enabled. The memory buffers are now
re-allocated at the set(...) stage, if so needed.
Refs. #2816, #2888.
Change-Id: I155884f5797252cf048a6400a2dd7b042d355b7e
Paul Bauer [Tue, 6 Aug 2019 09:35:25 +0000 (11:35 +0200)]
Add conversion from legacy to modern matrix type
Refs #2976
Change-Id: Iddf400bbb688a00c9de60e33d9c9a05f7c146f66
Artem Zhmurov [Fri, 28 Jun 2019 09:18:43 +0000 (11:18 +0200)]
Refactoring of the SETTLE tests
Current version of tests for CUDA version of SETTLE was a quick
addition to the old tests, with direct comparison of the GPU
implementation with the old original CPU-based implementation.
This commit rearranges the test structure, making it possible
to apply the same set of tests to both implementations. There
is no changes to the tests themselves. Currently, comparison tests
will run twice and will dry-run on CUDA builds without CUDA-
capable devices.
TODO: Add comparison with pre-computed values for coordinates,
velocities and virial. Remove the CPU vs GPU comparison
tests.
Refs #2886, #2888.
Change-Id: Ifcb6af9af6c93787b919b785348f9f4547b6c267
Berk Hess [Wed, 7 Aug 2019 14:06:12 +0000 (16:06 +0200)]
SIMD acceleration for F_FOURDIHS and F_PIDIHS
Since these are computed by the RB and proper dihedral code for which
we already have SIMD acceleration, this acceleration comes "for free"
(or rather, we have been stupid not to accelerate these before).
Change-Id: I456af11c23fe1cb3749a889c5d92ec3ba06ab237
Mark Abraham [Thu, 1 Aug 2019 16:42:53 +0000 (18:42 +0200)]
Fix estimate of the size of a j list
There is no need to truncate this to an integer. It's made and
consumed as a real.
Change-Id: Idbcc4040428d4a6a3e2a96b69c83e6c11fbe93f2
M. Eric Irrgang [Fri, 26 Jul 2019 16:24:59 +0000 (19:24 +0300)]
Add gmxapi_pytest custom target to CMake `check` target.
Automatically run pytest for the gmxapi Python package in the build tree
when GMX_PYTHON_PACKAGE=ON.
Refs #2765
Change-Id: I3f33b9903fc712d0c027810af6b6af605928f3ab
M. Eric Irrgang [Fri, 26 Jul 2019 12:32:22 +0000 (15:32 +0300)]
Allow gmxapi Python package tests to be run from GROMACS build tree.
* Configure gmxapi._gmxapi to build with the ability to find libgmxapi.
* Add a gmxapi_pytest custom CMake target to invoke pytest.
Refs #2961
Refs #2756
Change-Id: I64ca82afbf37da3c37759ec302c2ac9cc1666de2
Mark Abraham [Thu, 8 Aug 2019 13:27:29 +0000 (15:27 +0200)]
Initialize gmx_ekindata_t and t_vcm properly
Clean up in
0823a1e2e6591,
d76bcf15bdadfc3ec6, and
70bacbcfd639b17
left some fields initialized. The compute_globals code assumed it was
safe to reduce e.g. mvcos regardless of whether they were being used.
This is bad practice, but not a problem in the context of snew being
used for such structures.
Such fields are now initialized.
Change-Id: I12c462c9907ed34371e880cdd44ae162d44de67b
M. Eric Irrgang [Fri, 26 Jul 2019 16:10:36 +0000 (19:10 +0300)]
Let base GROMACS docker image be a little more useful.
* Break the build up into more steps for easier post-mortem inspection.
* Add `make check` as a default command.
The extra build steps don't add to the image size because we were
already keeping the entire sources for debugging convenience. We only
borrow the installed files in the consuming CI images.
Change-Id: I542e2b01125cdb34c130adcf76d5df50307bfc33
Christian Blau [Fri, 28 Jun 2019 13:50:01 +0000 (15:50 +0200)]
Harmonize mrc density format extents with rest of code.
To have x-dimension varying the fastest, density extents have to be
defined having z first. This patch ensures, that the mrc file format
is read in line with the data layout used in the for, e.g., the
Gauss transformation.
Change-Id: I3a1a9f215d95dfbc50ea5938bb1d724ac4263556
M. Eric Irrgang [Wed, 7 Aug 2019 10:47:42 +0000 (13:47 +0300)]
Reenable gtest_main target.
To make the the GROMACS use of add_subdirectory(googletest) functionally
equivalent to googletest discovered in other ways, we need both the
gtest and gtest_main CMake targets.
Change-Id: I2e2748ef47e1964cf271ece2754b0c0ac52f4f6b
Mark Abraham [Thu, 8 Aug 2019 09:25:55 +0000 (11:25 +0200)]
Stop testing ICC on Windows
Windows is seldom used with GROMACS, and likely Windows+ICC is never
used. Maintaining the build system (including compiler flags) to work
with this combination, together with installing and updating ICC on
our Windows agent node is work that does not deliver value. We're not
likely to be able to afford to continue doing this in Gitlab Runner.
Moved the unrelated test coverage provided by the former post-submit
configuration to other configurations.
Updated install guide to reflect the new status (plus a few other
incidental updates).
Change-Id: I69868d29d95f959b31c1514f219d3d0940af00e6
Artem Zhmurov [Tue, 30 Jul 2019 14:30:45 +0000 (16:30 +0200)]
Refactor Leap-Frog tests and connect them to CPU version
This introduces test data object and runners to the Leap-Frog
tests, which are now connected to the CPU version of Leap-Frog.
This also makes possible to include tests based on the reference
values, which are needed to make sure that the temperature and(or)
pressure control works fine in new implementations.
Refs. #2816, #2888.
Change-Id: Id2d934c43138889ad178a94126cab4da2895bb5a
Christian Blau [Tue, 23 Jul 2019 15:25:06 +0000 (17:25 +0200)]
Provide callbacks/notifications for MDModules
Adds functionality for MdModules to subscribe to be called back during
the simulation. Within the run, subscribed modules are notified of
events, that are distinguished by the function argument by the call back
function.
Implements the callbacks based on storing function pointers, following
the discussion in https://gerrit.gromacs.org/c/gromacs/+/10942
refs #2945
Change-Id: I61589215fa9beb79825f0b5261ed50b4116046ff
M. Eric Irrgang [Tue, 23 Jul 2019 19:05:53 +0000 (22:05 +0300)]
Use gmock and gtest targets from googletest-release-1.8.0
Import a couple of missing files from the googletest-release-1.8.0 and
switch to the upstream definition of the `gmock` and `gtest` targets.
Removed some outdated content from README.Gromacs
Refs #3033
Change-Id: Iaefe4d11b01a3d37e162d7d00bae7ba34a0b5b4e
Artem Zhmurov [Tue, 6 Aug 2019 15:06:17 +0000 (17:06 +0200)]
Fix for cmake lists in mdlib tests
Merged change 11284 included badly merged cmake list, which can
break cmake. This fixes the problem.
Change-Id: Id0149cfbca0c07513e7ee46fe3c4a612654b71ce
M. Eric Irrgang [Thu, 20 Jun 2019 10:53:40 +0000 (13:53 +0300)]
Separate out OperationDetailsBase.
Develop abstractions for implementing operations with data flow.
Refs #2996
Change-Id: Ie893039f2a73647ed254e0f4a68ed4e21de7a500
Artem Zhmurov [Tue, 28 May 2019 14:09:41 +0000 (16:09 +0200)]
Remove PImpl scaffolding from CUDA version of Leap-Frog
Private implementation in CUDA version of Leap-Frog was
used to introduce this integrator as a stand-alone unit.
Now it is merged with constraints, PImpl is no longer
needed.
Refs #2816, #2888
Change-Id: Iea82abef016b7e15b9be44a0e1b446e12e582d3c
M. Eric Irrgang [Mon, 5 Aug 2019 15:32:20 +0000 (18:32 +0300)]
Convert test infrastructure targets to static library targets.
Convert CMake function `gmx_add_unit_test_object_library()` to
`gmx_add_unit_test_library()` and produce STATIC instead of OBJECT
targets. Update `mdrun_test_objlib` to `mdrun_test_infrastructure`
using the helper function.
This allows the target to use `target_link_libraries` to get the
compiler flags, definitions, and include directories necessary for
compatibility with `gmock` and other resources. Resolves some noisiness
from googletest headers under the standard GROMACS `-Wundef` flag.
Relevant to related change that migrate from global GMOCK variables to
modern usage of gtest and gmock CMake targets.
Removed unnecessary TESTUTILS_LIBS variable.
Refs #3033
Change-Id: Id5b47774b679e8e205f899ea80df65153da44516
Berk Hess [Fri, 2 Aug 2019 09:11:46 +0000 (11:11 +0200)]
Add ForceWithShiftForces class
Note that the shift forces buffer is not yet set nor used.
Change-Id: Ic203875536b635af26ab3535c57a2b54c11496e7
Berk Hess [Tue, 6 Aug 2019 07:30:07 +0000 (09:30 +0200)]
Fix latex formula in reference manual
Change-Id: I033b2639729ec958a2b7fe9060850921805ac517
M. Eric Irrgang [Fri, 26 Jul 2019 17:06:14 +0000 (20:06 +0300)]
Resolve a compiler warning for the gmxapi Python package.
The pybind macro to generate boiler-plate Python module initialization
around the module export code defines a non-static function required by
the Python C API, but this triggers the "missing-prototype" compiler
warning. This change adds the prototype to the module.h header file.
Change-Id: Id173e05c4400326f35b1848bbf0159aebc172a27
M. Eric Irrgang [Mon, 5 Aug 2019 10:00:50 +0000 (13:00 +0300)]
Add libgromacs dependency to gpu_utilstest_cuda target.
At least when built with Clang in some cases, gpu_utilstest_cuda did not
have access to several GROMACS symbols, probably due to some recent
shuffling of dependencies affecting what was available transitively.
Explicitly adding the `libgromacs` target resolves issues.
Change-Id: Ie43aa4c42802bce40afb3d33ea6c87ec5a83ffff
Mark Abraham [Tue, 23 Jul 2019 19:46:51 +0000 (21:46 +0200)]
Fix for MSVC+CUDA
MSVC finds it hard to deal with template parameter packs in a few
situations. We don't test with MSVC+CUDA, but a user reports this works in that case.
Change-Id: Id576482facaaf40972ba4fd55b2afcba3113d0e8
Pascal Merz [Mon, 5 Aug 2019 22:55:50 +0000 (16:55 -0600)]
Add trivial const qualifier to energy output
Change-Id: I9b2b2a836388967dc4b4299e9d238ac7a3e27412
Pascal Merz [Mon, 5 Aug 2019 22:46:27 +0000 (16:46 -0600)]
Add const getter to MDAtoms
This allows objects to have a const pointer / reference to MDAtoms
when using underlying functions requiring a const pointer of type
t_mdatoms.
Change-Id: I0135989f43c7be02ec3b89891d98109100d1f0b9
Mark Abraham [Mon, 5 Aug 2019 19:56:56 +0000 (22:56 +0300)]
Add quote
Change-Id: Ie324a88a283e56a511256ce37e3538d680459d6e
Pascal Merz [Tue, 25 Jun 2019 07:07:10 +0000 (01:07 -0600)]
Move ownership of kinetic energy object to ISimulator
Treating the kinetic energy object (ekind) equivalently to the
energy object (enerd) makes subsequent changes easier. It also
removes some code duplication between do_md, do_rerun and
do_mimic. There are some algorithms that never use the kinetic
energy (e.g. minimization), but this is true for other members
of ISimulator as well.
Change-Id: I995d14652dae25bcbcaa0a75437382a053e76f74
Berk Hess [Wed, 31 Jul 2019 20:49:13 +0000 (22:49 +0200)]
Make box const in do_force()
Change-Id: Ie0854b159512af227790a5d8010d5501af3d5094
Pascal Merz [Thu, 14 Feb 2019 06:05:53 +0000 (23:05 -0700)]
Added Simulator comparison test
This change extracts the general machinery to compare two simulation
runs which are expected to yield identical results. Currently, one
such test is used to compare the results of a rerun to the results
of the original simulation run.
This also add a test to compare two runs of the same .tpr file, setting
an environment variable for one of the runs. This allows to test that
new features (implemented behind a feature flag using an environment
variable) which are expected to be equivalent to existing features
yield identical results. The test can be used for other feature flags,
but is currently used for the GMX_USE_MODULAR_SIMULATOR environment
variable, used by the upcoming modular simulator implementation. As
this implementation is not yet present, the current test is supposed
to always pass, as it simply runs the same .tpr file on the same code
path twice.
Change-Id: I5a36ce0c488ba4baf65ad4a137c6d1ea75fa6e60
Paul Bauer [Thu, 9 May 2019 08:43:27 +0000 (10:43 +0200)]
Add replacements for pbc enumerations
Adds new enum classes to describe different types of unit cells and
centering operations. Those are intended to replace the legacy types
in the new version of tools that perform operations dependent on them.
They don't replace the old types completely, as the legacy options
handling depends on those.
Change-Id: I64954a8e7a78aab47359a40d6ea06b54e5cb6910
Pascal Merz [Mon, 27 May 2019 06:50:47 +0000 (00:50 -0600)]
Introduce SimulatorBuilder
Introduce a builder for Simulator object. Currently, the SimulatorBuilder
class has only a single build(...) function which takes the same
arguments as the LegacySimulator constructor. This framework does,
however, allow us to easily build other, more modular Simulator objects
in future changes.
Change-Id: Ib51a481ccc5019c4e916165102c808e7553cc539
Paul Bauer [Mon, 5 Aug 2019 15:08:31 +0000 (17:08 +0200)]
Add free function to convert matrix type
New free function that allows generation of a Matrix3x3 type from the
legacy matrix type. Prepares for replacing the old matrix types.
Refs #2976
Change-Id: I5f17bef75d666b5221519c38abfa05a2ccd89cb0
Berk Hess [Fri, 2 Aug 2019 08:15:12 +0000 (10:15 +0200)]
Change ForceOutputs to a class
Also moved ForceOutputs to forceoutput.h and made use of it
in post_process_forces() and do_force_lowlevel().
Change-Id: I32471f4eb3daa8c98a7478f88b98f7e3360e55f1
Mark Abraham [Sun, 4 Aug 2019 17:16:15 +0000 (19:16 +0200)]
Remove libgromacs_generated contributions from FindCUDA.cmake
This causes problems with cmake versions > 3.10
Change-Id: I5d81662788dabe7aca1e5c37955198878a9baab3
M. Eric Irrgang [Thu, 20 Jun 2019 10:50:05 +0000 (13:50 +0300)]
Separate out OperationDirector.
Develop abstractions for implementing operations with data flow.
Refs #2996
Change-Id: Ib0b899ea85a59c58ee33a5e3d8a28b33fb67047a
Berk Hess [Fri, 2 Aug 2019 14:56:55 +0000 (16:56 +0200)]
Remove semicolon from GPU TERM macros
This leads to less confusion in formatting tools such as clang-format.
Fixes #3053.
Change-Id: I0367b2f9ff1a8f8b4369505a41557c3feb8c9c71
M. Eric Irrgang [Wed, 19 Jun 2019 15:10:11 +0000 (18:10 +0300)]
Rearchitect gmxapi.operation
Includes many work-arounds for an incomplete data model,
illustrating what will need to be addressed in gmxapi
self-describing type system, data shaping, and Futures
implementation.
* Move several nested classes to the gmxapi.operation scope.
Introduced abstractions and refactoring to replace some
dynamic definitions in the function_wrapper closure with
composition or more tightly scoped closures. Provide
cleaner helpers for dynamically defined operation, input,
and output types.
* Introduce minimal NDArray class and ndarray factory.
* Replace ImmediateResult with a Future of a StaticResource
* Implement Future slicing with Futures of ProxyResource
* Define several Descriptor classes for generic attribute
accessors in standard interfaces, supporting similar
style of interaction with resources as in C++ extensions.
* Explicitly type collaborations in the preliminary data flow
protocols.
* Introduce ensemble data.
* Rename append_list to join_arrays.
* Add a lot of static type hinting and run-time type checking.
Note that the execution dependency in FR2 has been superseded by the
data flow driven dependency in FR3. The syntax supported in FR2 is now
disabled to allow development towards FR4.
Refs #2993
Refs #2994
Refs #2996
Change-Id: I94a63d5801f97eb79962c693b48fa80a7c96c0ec
Berk Hess [Tue, 14 May 2019 14:17:21 +0000 (16:17 +0200)]
Made gmx disre work with non-consecutively labeled restraints
gmx disre assumed restraint were consecutively labeled starting at 0.
Refs #2953
Change-Id: I7d9c14d43854c88cb1cdec89fc297c64cbea8783
yongwangCPH [Tue, 9 Jul 2019 13:57:59 +0000 (15:57 +0200)]
Solve issue with demux.pl
Changes printout format to resolve discontinuous trajectories
after 100ns simulation length when exchange stride is not a multiple
of 1 ps.
Change-Id: If6bd4d578ba08f9d4fd814b80e69896caf9079eb