Magnus Lundborg [Tue, 3 Mar 2020 10:06:27 +0000 (11:06 +0100)]
Separate AWH parameter reading and checking
To avoid dependency on order of parameter reading (pulling
before AWH) AWH now reads parameters before checking them.
Change-Id: I11ac76f1def61eac577ef8083698d76f6aac3dd4
Artem Zhmurov [Wed, 4 Mar 2020 10:26:12 +0000 (11:26 +0100)]
Do not count PME only rank when initializing NBNXM
Non-local particles should only exist when there is are more than one PP rank.
Change-Id: Ife99786652dc634039c59f530d2489bf3976c476
Paul Bauer [Wed, 4 Mar 2020 11:01:37 +0000 (12:01 +0100)]
Merge "Merge branch release-2020 into master"
Christian Blau [Tue, 18 Feb 2020 12:47:41 +0000 (13:47 +0100)]
Save excluded non-bonded interactions in .tpr file
The intermolecularExclusionGroup of the molecular topology (mtop) has
not been saved in the tpr file before, which lead to the unexpected
behviour that an mtop as set up in grompp was not available in the same
state when the simulation was started.
Excluding non-bonded interactions of a group with the rest of the system
is currently needed for the QM/MM implementation. This change will allow
to complete system setup for simulations that need to exclude non-bonded
interactions at grompp time instead when starting the simulation.
refs #3172
Change-Id: Ia0e3f0571fa467337664bedec2e91a5a008507ca
Christian Blau [Wed, 4 Mar 2020 08:04:29 +0000 (09:04 +0100)]
Add classhelper macro to forbid copy, move and any assigment
The current macro only deletes the copying and copy-assignemnt, but for
most cases also the move equivalent of these operations should be
deleted. This patch introduces a new macro to forbid copying and moving.
Change-Id: I6f2f8591b289322cf7e79003a50507cdc9d6b5b9
Paul Bauer [Wed, 4 Mar 2020 07:05:31 +0000 (08:05 +0100)]
Merge branch release-2020 into master
Resolved Conflicts:
.gitlab-ci.yml
admin/builds/gromacs.py
cmake/gmxVersionInfo.cmake
src/gromacs/ewald/pme.cpp
src/gromacs/gmxana/gmx_disre.cpp
src/gromacs/gpu_utils/cudautils.cu
src/gromacs/gpu_utils/gpu_utils.cu
src/gromacs/hardware/gpu_hw_info.h
src/gromacs/listed_forces/orires.cpp
src/gromacs/mdlib/forcerec.cpp
src/gromacs/mdlib/forcerec.h
src/gromacs/mdlib/md_support.cpp
src/gromacs/mdlib/md_support.h
src/gromacs/mdlib/mdoutf.cpp
src/gromacs/mdlib/mdoutf.h
src/gromacs/mdlib/sim_util.cpp
src/gromacs/mdlib/vsite.cpp
src/gromacs/mdlib/vsite.h
src/gromacs/mdrun/minimize.cpp
src/gromacs/modularsimulator/forceelement.cpp
src/gromacs/modularsimulator/shellfcelement.cpp
src/gromacs/nbnxm/kernels_reference/kernel_ref.h
src/programs/mdrun/tests/CMakeLists.txt
Change-Id: Ic95c6b35c8a7b7bd0b9c3fa0833136d32bb74242
Artem Zhmurov [Fri, 21 Feb 2020 16:53:26 +0000 (17:53 +0100)]
Move the PmePPCommGpu initialization from forcerec to runner
Change-Id: I955c7c53bcee571c560b1efd8a4eed7bde4d42fc
Paul Bauer [Mon, 24 Feb 2020 14:49:29 +0000 (15:49 +0100)]
Prepare for 2020.2
Reset DOI strings
Change-Id: I8a269a8537595d1070c50cfc31c610f2133618b2
Paul Bauer [Mon, 24 Feb 2020 14:46:14 +0000 (15:46 +0100)]
Version 2020.1
Set DOI strings.
Updated regressiontest hash.
Change-Id: I2fa83321688bf052516bab3301336d8b3145e458
Paul Bauer [Thu, 16 Jan 2020 13:25:37 +0000 (14:25 +0100)]
Always hash files when building from release tarball
The CMake logic to check if the source files in a release tarball have
not been modified has not been robust enough in cases where people first
run cmake to generate the build directory and then later change files in
the source tree.
The build has now been changed to be more in line with the development
builds, where checking for modifications is happening in all cases.
Fixes #3302
Change-Id: Id54c529bfbe51191ed5262d8da05897b2f53c057
Alan Gray [Sun, 5 Jan 2020 20:14:39 +0000 (12:14 -0800)]
Allow PME coordinate send before H2D coordinate transfer
The introduction of the GPU PME-PP communication functionality had the
side effect of delaying the PME coordinate send until after the H2D
coordinate transfer, even on the default code path. This patch allows
the PME transfer to occur in its original location when the send is
not originating from GPU memory. This is a lightweight solution,
without any new functionality, suitable for the release branch. (There
will be a more comprehensive change in the master branch which also
extends the GPU PME-PP communication functionality.)
Implements #3159
Change-Id: Ic30c154e04bb4c2846bbad3de603f879a71b9133
Magnus Lundborg [Sun, 23 Feb 2020 16:57:56 +0000 (17:57 +0100)]
Store dHdL for all neighbor lambdas
This is required for calculating forces along a lambda dimension
in AWH.
Change-Id: Ic5247a53998b1e733858419d20338b5419dd7ae4
Paul Bauer [Mon, 3 Feb 2020 16:05:42 +0000 (17:05 +0100)]
Add Cuda build to gitlab CI
Change-Id: I7e5917fd26c0e22107fb6d9ade4ca69959737df4
Berk Hess [Mon, 2 Mar 2020 14:14:21 +0000 (15:14 +0100)]
Fix center of mass motion removal with frozen atoms
When frozen atoms were part of center of mass motion removal groups,
they would still contribute to the mass of those groups. This meant
that the COM velocity correction was (slightly) too small. Now
completely frozen atoms are removed from COM removal groups by grompp.
When atoms are only frozen along one or two dimensions and part of
a COM removal group, grompp now issues a warning.
Also fixed an nullptr or incorrect string buffer passed to warning()
with invalid freeze group dimension user input.
Fixes #2553
Change-Id: I20a03fea511e75a131cb27880acc1f4ee4a2bfb8
Artem Zhmurov [Mon, 2 Mar 2020 15:14:32 +0000 (16:14 +0100)]
Update the message on whether update and constraints are offloaded
Update and constraints are done in PP task, which is now indicated
in the printed message.
Refs #3292
Change-Id: Id3ad64c424cca6ab5e678a90db767a1c3d43b014
Berk Hess [Mon, 2 Mar 2020 16:42:03 +0000 (17:42 +0100)]
Fix grompp unbound atom check
The check in grompp for unbound atoms would check for any
potential (and constraints) instead of only potentials involving
two atoms. This enabled false negatives.
Change-Id: I677b86a4e4bbe8cd0c6a8a0bf43983be622edfa6
Berk Hess [Mon, 2 Mar 2020 10:15:51 +0000 (11:15 +0100)]
Fix nrdf with partial COMM removal
In the uncommon case where the center of mass motion is removed for
part of the system but not the whole system, the number of degrees
of freedom for the part without COMM removal would be incorrectly
lowered by 3.
Fixes #3406
Change-Id: I371bcfbbd6cf7ddddccb9234752128239bad356f
Berk Hess [Mon, 2 Mar 2020 15:20:26 +0000 (16:20 +0100)]
Fix too small pairlist buffer on Intel GPUs
The pairlist buffer generated for Intel GPUs was slightly too small,
because it assumed a 4x4 atom-cluster pair kernel instead of 4x2.
This also fixes incorrect kernel setup messages in the log file.
Fixes #3407
Change-Id: I744f98a934b5d9f60e0708cb064571aa6e389c44
Paul Bauer [Mon, 2 Mar 2020 08:37:08 +0000 (09:37 +0100)]
Revert "Remove frozen atoms from VCM groups"
This reverts commit
3a93c3a8ed49d20b47aed181d98f64921b864a3d.
Reason for revert: Change is incorrect
Change-Id: I808655e109e1da7ce37a59c1d55dabd059a32bb7
Paul Bauer [Thu, 27 Feb 2020 10:47:26 +0000 (11:47 +0100)]
Remove frozen atoms from VCM groups
Atoms are removed during preprocessing.
Also add release note missing for previous patch.
Fixes #2553
Change-Id: I4fd52d50a9ef3af4ed11f9b507902d4ac59ed487
Gilles Gouaillardet [Mon, 2 Mar 2020 04:33:52 +0000 (13:33 +0900)]
Remove unused variable from nbnxm headers.
Since the (SimdFloat) mone_S variable is set but never used,
this commit simply removes it.
Change-Id: Id374da57d1fb33a269c1c39eb80c064fc40de8e8
Paul Bauer [Fri, 28 Feb 2020 09:56:27 +0000 (10:56 +0100)]
Merge branch release-2019 into release-2020
Resolved Conflicts:
cmake/gmxVersionInfo.cmake
src/gromacs/ewald/pme.cpp
src/gromacs/gmxana/gmx_disre.cpp
src/gromacs/gpu_utils/gpu_utils.cu
src/gromacs/hardware/gpu_hw_info.cpp
src/gromacs/hardware/gpu_hw_info.h
src/gromacs/mdrun/rerun.cpp
Change-Id: I2a89270a1321a51e0bc25e2b6890245f562945a2
Paul Bauer [Thu, 27 Feb 2020 14:00:12 +0000 (15:00 +0100)]
Define all CPU NB kernels
Access to kernels that where not defined could otherwise lead to
undefined behaviour.
Fixes #2728
Change-Id: Ib014cfd0dbc46961eb4e6a81acb3e06d57c3df73
Jonathan Vincent [Mon, 24 Feb 2020 14:26:20 +0000 (06:26 -0800)]
Moves call to choose best performaing kernels to pme_gpu_reinit_atoms
atoms.nAtoms is zero when pme_gpu_reinit is called, resulting in
the useOrderThreadsPerAtom and recalculateSplines always being set to false.
Refs #3189
Change-Id: I36d4be71565cfe8cd8e50fbe6cfe1035f3e15c8e
Paul Bauer [Mon, 24 Feb 2020 14:54:18 +0000 (15:54 +0100)]
Version 2019.6
Set DOI strings.
Updated regressiontest hash.
Change-Id: If7c04fbd26756275daea1c252ef977a367669b42
Pascal Merz [Tue, 25 Feb 2020 07:15:45 +0000 (00:15 -0700)]
Loosen gmxapi stopsignaler test
Gmxapi stopsignaler test was checking whether simulations were stopped
on the step after a stop signal was set. This is true for the legacy
implementation, but only due to the exact order of instructions. The
StopSignalHandler does not guarantee to stop simulations at the next
NS step after a signal has been set, it promises to stop a simulation
at the next NS step after a signal has been communicated. This change
loosens the criterion to reflect this.
Further, this change
* Changes the numberOfTimesCalled() function to timeElapsedSinceStart(),
also including a different treatment of the call before the restraint
is ever called, to avoid misunderstandings.
* Adds a comment to explain the expectations validated by this test.
Fixes #3397
Change-Id: I2a3805a14c03d0ee12ebd21b5863c5243b1c3671
M. Eric Irrgang [Thu, 27 Feb 2020 12:05:58 +0000 (15:05 +0300)]
Resolve a Python linting error.
Remove an unnecessary compatibility check that otherwise causes lint
errors.
Change-Id: If6b79c9cc4b7b4adf37a0bad291ce421a23564c9
M. Eric Irrgang [Thu, 27 Feb 2020 12:04:38 +0000 (15:04 +0300)]
Fix broken Python error check.
A check in the physical validation utilities referenced a constant in a
module that does not exist, but the intended module was clear.
Additionally, the constant is not guaranteed to be defined, so we check
for it to avoid producing unrelated exceptions.
Change-Id: Ied614c4d94616420b9321cd28d8f8958cce31627
Pascal Merz [Fri, 21 Feb 2020 01:11:13 +0000 (18:11 -0700)]
Use legacy code path for t_graph (modular simulator)
This change redirects simulations which will require a t_graph object
to the legacy code path. It also adds an assert to catch cases in which
the redirection would fail in a more graceful way.
Fixes #3389
Change-Id: I17a70e504c206b2798cd2439c0c0ff5d5cd112e3
Pascal Merz [Wed, 26 Feb 2020 23:19:29 +0000 (16:19 -0700)]
Extract and expose function to determine whether molecules are broken over PBC
This prevents code duplication in the child change I17a70e50. This
is pure refactoring with two exceptions:
* Checking for orientation restraints is changed from
fcd->orires.nr
to
gmx_mtop_ftype_count(mtop, F_ORIRES)
This allows to use this function before the force constant struct
is built. An assert is added to make sure this never get out of
sync (which would hint to something going very wrong somewhere else...)
* A `if(fplog){}` around a single GMX_LOG(mdlog.warning) was removed.
Change-Id: I6303c6b1cab86c57971a1486c892a1b122a446c6
Pascal Merz [Thu, 16 Jan 2020 08:13:05 +0000 (09:13 +0100)]
Fix constraint contribution to dhdl (modular simulator)
The contribution to dhdl from the constraints was not added under
modular simulator.
Refs #1255
Change-Id: I804f52eeb97a17ae0d233700203da1db33a54d54
Szilárd Páll [Fri, 25 Oct 2019 23:24:23 +0000 (01:24 +0200)]
Avoid mdrun terminate due to GPU sanity check errors
When a GPU is a exclusive or prohibited mode, early detection calls can
fail and as a result an mdrun run abort with an error, even if all GPU
offload is explicitly disabled by the user.
This change adds a status code to handle the case of devices being
unavailable.
Additionally, other errors may be encountered during the dummy kernel
sanity check (e.g. out of memory), but since the change that switches
to using launchGpuKernel() wrapper did not handle the exception in the
sanity checking, this can also abort a run even if the GPU in question
is not selected to be used.
This change adds code to catch the exception this and report the error
and avoid abort the run.
Fixes #3178 #3399
Change-Id: I0cdedbc02769084c172e4a42fe5c1af192007cec
Szilárd Páll [Wed, 26 Feb 2020 15:07:25 +0000 (16:07 +0100)]
Document NVIDIA OpenCL broken on Volta and Turing
Refs #3125
Change-Id: Id200c1092b279d45a97b98c6fe1d03c2ffb14fb0
Szilárd Páll [Thu, 20 Feb 2020 18:20:26 +0000 (19:20 +0100)]
Remove outdated PME-GPU limitation in user guide
PME GPU is supported on all compatible GPU platforms and vendors.
Change-Id: I8b054825d4c6a2d030b87fe4b6a9be759911c9f6
Pascal Merz [Tue, 25 Feb 2020 23:58:02 +0000 (16:58 -0700)]
Fix calculation of reciprocal terms in rerun
This at least temporarily fixes #3400.
Change-Id: I04d67d9bb3edbd66049573de71940e4bb7fa1ad4
Magnus Lundborg [Wed, 19 Feb 2020 12:17:14 +0000 (13:17 +0100)]
Fix out of sync checkpoint files in simulations sharing state
When multidir simulations share the state, the checkpoint files
of the different simulations should all be from the same step.
To ensure this, MPI barriers have been added before renaming
the checkpoint files from their temporary to their final names.
So now the contents can never be out of sync. In the worst, and
rather unlikely, case that something going wrong during renaming,
some checkpoint files could have temporary and some final names.
Refs #2440.
Change-Id: I88088abb726a36dbf9a9db2fa2eb4a46c3bf2cd7
Artem Zhmurov [Mon, 24 Feb 2020 17:56:44 +0000 (18:56 +0100)]
Fix the RVec to float3 conversion test
The test was not running when there were no GPUs availible,
but the code was compiled with CUDA.
Refs. #3372.
Change-Id: I8dd51eafe9a17d880ce8f8b126c7de692e061e81
Szilárd Páll [Fri, 24 Jan 2020 13:12:28 +0000 (14:12 +0100)]
Improve GPU update tasks assignment consistency
GPU update task assignment was not consistent with the assumptions and
supported features of the 2020 release and did not implement the correct
checks and fallback in cases where GPU update was decided to not be
supported. Specifically, this change makes sure that when separate PME
ranks are used, without direct GPU communication for PP-PME, GPU update
falls back to the CPU.
Fixes #3354
Change-Id: I7c9dd67cd8cf61f0201b626b8b7674917e3365a5
M. Eric Irrgang [Thu, 12 Dec 2019 17:22:07 +0000 (20:22 +0300)]
Remove cruft and resolve deprecation warnings.
Feature checks for gmxapi 0.1 are no longer necessary in the acceptance
tests, and cause deprecation warnings since the gmxapi version has been
incremented.
Change-Id: I98d4df5789c6156304efe27394a2bde20b390234
Paul Bauer [Fri, 21 Feb 2020 14:49:21 +0000 (15:49 +0100)]
Avoid integer overflow in dispersion correction
Index could become out of range and turn negative.
Fixes #3391
Change-Id: I91a8ea0ab01370fb972c02994e2b996284e1d06a
Christian Blau [Tue, 25 Feb 2020 09:25:02 +0000 (10:25 +0100)]
Document density-fit cross-correlation in .mdp options
Add missing documentation about cross-correlation as
similarity measure for density-guided simulations.
Though documented in the reference manual, it was until now
not mentioned in the .mdp options.
Change-Id: I2a5a13ca6fb0a15e8c2ff1cba6a6edbe0182053d
Paul Bauer [Mon, 24 Feb 2020 12:29:21 +0000 (13:29 +0100)]
Revert "Expose vsite counting"
This reverts commit
2078fd0619459bd533a94550d5754477dbbaabaa.
Not needed in fact.
Change-Id: I238d33e23e3b508ec0c77a5c43f67e5838950f34
M. Eric Irrgang [Mon, 24 Feb 2020 21:11:43 +0000 (00:11 +0300)]
Fix docstring bugs.
Resolve sphinx errors for gmxapi.commandling_operation docstring.
Change-Id: Ib4ed2228912a180dee8d56850e95cac20d0a9635
M. Eric Irrgang [Mon, 17 Feb 2020 10:41:58 +0000 (13:41 +0300)]
Fix sphinx-build option typo.
A space between `-D` and the configuration key causes a warning about
an unknown option.
Change-Id: I2279663004216b4af098d025431fe02de51b4a78
Paul Bauer [Sat, 22 Feb 2020 12:31:41 +0000 (13:31 +0100)]
Fix clang-6 image template
Overlooked this when merging
1093dfa9ba24329162179a3fcbcbb8c491ab9543.
Change-Id: I85d5b852ab5d565289d64dd21ade09dabd4115c4
M. Eric Irrgang [Mon, 24 Feb 2020 10:01:55 +0000 (13:01 +0300)]
Let commandline_operation accept stdin.
Add a *stdin* key word to gmxapi.commandline.cli() and
gmxapi.commandline_operation(). Optionally accept a string object to
pass to the subprocess standard input pipe.
Fixes #3393
Change-Id: I563aeb19e944e7e9e755a72b1956b61ff7789c22
M. Eric Irrgang [Thu, 12 Dec 2019 17:14:45 +0000 (20:14 +0300)]
Make gmxapi.version.has_feature warning more useful.
When issuing a warning about misuse of a utility, use `stacklevel=2`
instead of the default (stacklevel=1) to report the context of the call
to the utility, rather than that of the call to `warnings.warn()`,
so that the warning can actually direct a developer to the source of the
problem.
Change-Id: I86cedaf8863e589fed385199b573bb1a420655e2
M. Eric Irrgang [Mon, 24 Feb 2020 09:22:27 +0000 (12:22 +0300)]
Use subprocess.run instead of subprocess.check
Resolve a TODO in commandline.py to use more robust subprocess facility
in Python >=3.5.
Change-Id: I4e87fbf94c52a18ce21c9f26a800f297deb3f512
M. Eric Irrgang [Fri, 21 Feb 2020 15:42:38 +0000 (18:42 +0300)]
Improve gmxapi.operation error handling.
Improve error handling logic and documentation for operation execution.
Make the exception messages more useful.
Fixes #3376
Change-Id: Ie16fd814faff0d0565a2c7a271b2bed9d2c1939b
M. Eric Irrgang [Fri, 14 Feb 2020 15:35:09 +0000 (18:35 +0300)]
Clarify annotation about GitLab CI Docker images.
Change-Id: I17f49885f423942ff47cf790ff5f895f56a63259
Pascal Merz [Fri, 24 Jan 2020 23:10:22 +0000 (23:10 +0000)]
Use ArrayRef in compute_globals
This refactors compute_globals to use ArrayRef instead of rvec
pointers.
Change-Id: I0e16b7bcee0583326180c6c93a7feddbb7213bfe
ejjordan [Fri, 21 Feb 2020 17:10:02 +0000 (18:10 +0100)]
Use more forward declarations to removed header dependencies
Change-Id: I6a5706c8380c8d630ccc854f617206f6b66e7907
Mark Abraham [Mon, 17 Feb 2020 07:51:51 +0000 (08:51 +0100)]
Removed unused PME gather functionality
This code path has never been used since being introduced in
2747fc481b7110a, so we should simplify. It also avoids compiling extra
GPU kernels that were also never used.
Updated reference data now that there's half as many cases to cover.
Change-Id: Ia6bc7d1161fb76dad5715234ff820759bde0d81c
David van der Spoel [Mon, 17 Feb 2020 22:20:24 +0000 (23:20 +0100)]
Fixed bug in gmx disre due to inconsistency in input.
The gmx disre program used the labels in the distance restraint entries
(see manual) as an index in internal arrays. This might lead to either
memory errors or the program stopping due to uninitialized variables.
Fixes #3384
Change-Id: Ic2d77c3fd81547e030bf7ce21860a71e3adbb2b3
Artem Zhmurov [Fri, 21 Feb 2020 20:14:55 +0000 (21:14 +0100)]
Add missing header and disable failing test
Fixes the issues, introduced in
dd0439e0a189e0c28e738afe283ce3a71513aaa6.
Refs. #3372.
Change-Id: Ibced28fef1057598793b81142d555016208db424
Pascal Merz [Fri, 21 Feb 2020 00:34:04 +0000 (17:34 -0700)]
Use legacy code path for NMR restraints (modular simulator)
Fixes #3388
Change-Id: I03db8af35d71c7405716e73516c4235fc089334c
Pascal Merz [Thu, 20 Feb 2020 21:15:56 +0000 (14:15 -0700)]
Correct for skewed box in non-DD modular simulator
In modular simulator, the correction for skewed boxes was only performed
when DD was active. This change makes sure it happens in all cases.
Also left a TODO to think about unifying the approach for the two cases
moving forward.
Fixes #3383
Refs #3392
Change-Id: I897dbc9e490bb1a1e465e711c66b47a29e214fd1
Berk Hess [Fri, 21 Feb 2020 10:36:04 +0000 (11:36 +0100)]
Add fatal error when multisim runs sharing state have different init_step
Refs #2440
Fixes #3990
Change-Id: I052cd53dc9517a3df53663e52720ee5a80ea65c0
M. Eric Irrgang [Wed, 25 Dec 2019 15:55:34 +0000 (18:55 +0300)]
Simplify GitLab CI Dockerfiles.
Consolidate some docker build instructions into distinct images for
the base dependencies, the various toolchains, and the docs build
environment. Combine Dockerfiles that only differ in toolchain version.
Total image size is prioritized over total build time by making all
apt-get layers include update, install, and cleaning in single RUN
commands, where intermediate layers are part of the tagged images.
Made images both for clang and gcc builds of the documentation.
Refs #3263
Change-Id: I55d6a128067f78214193223756db94a1964c491d
Paul Bauer [Fri, 21 Feb 2020 08:01:14 +0000 (09:01 +0100)]
Fix Gitlab doc build
Change-Id: I058008a1df5ec2fc3406aeb51b52611eaa16a496
Artem Zhmurov [Thu, 6 Feb 2020 11:39:39 +0000 (12:39 +0100)]
Refactor and enable RVec to float conversion test
Since using CUDA directly in Google tests is not always possible,
this patch moves the cuda-specific code into separate runner file.
Also the RVec->float3 casting function is moved into new header,
thus eliminating inclusion of the cuda runtime in the tests. The
test file is renamed to reflect what is actually tested.
Fixes the post submit failure introduced in
c5c220a03663d975e31e8573c1849247ce3f8ad0, which was first avoided
by disabling the test in
e91b744e8cbf2038a4dddce0609a33f396902bb5.
Fixes #3372.
Change-Id: Ie6423876e7725766109f74fdd3e76a24188b0b18
Artem Zhmurov [Thu, 20 Feb 2020 08:09:09 +0000 (09:09 +0100)]
Do not call PME GPU builder in CPU code paths
Currently, the logic of whether or not to execute the PME GPU builder
in tests relies on passing nullptr in CPU code paths. This patch
replaces this conditional with assert and removes the builder call in
CPU code paths.
Change-Id: I9fa93146091754df1bbc8f142a16fc1936ae53ea
Artem Zhmurov [Thu, 20 Feb 2020 13:29:34 +0000 (14:29 +0100)]
Use GROMACS wrappers for EXPECT_THROW/NO_THROW in PME tests
The EXPECT_THROW_GMX and EXPECT_NO_THROW_GMX wrappers provide more
information in case of test failure.
Change-Id: Ib935425ff3c0436fcefb88ea54c9e5c0501c0084
Artem Zhmurov [Wed, 5 Feb 2020 16:11:37 +0000 (17:11 +0100)]
Use CUDA float3 vector type instead of fvec in GPU bonded kernels
Using fvec in CUDA can be inneficient and requires re-definition
of vector operations. This commit switches the GPU bonded kernels
to using float3 instead of fvec.
Change-Id: Ib3bfa3e20501cdd22fc6e599b749c750fa468e80
David van der Spoel [Wed, 12 Feb 2020 13:53:33 +0000 (14:53 +0100)]
Fixed bug in orires code that was checking too strict.
Fixes #3375
Change-Id: I0f64b386477b9a72f18c95fd977ac8cf5dbeeccd
David van der Spoel [Wed, 12 Feb 2020 13:53:33 +0000 (14:53 +0100)]
Fixed bug in orires code that was checking too strict.
Added one test to see that input is accepted.
Fixes #3375
Change-Id: I0f64b386477b9a72f18c95fd977ac8cf5dbeeccd
Mark Abraham [Mon, 17 Feb 2020 07:22:38 +0000 (08:22 +0100)]
Added more docs and tests to EnumerationArray
It is now more clear that there is no risk of a segfault if somehow
Foo::Count was used to look up a value from an EnumerationArray. The
assertion would not be nice for a user to get either, but the positive
aspects that flow from having enumeration helpers that need the Count
field outweighs this downside.
Change-Id: I6111e79042326044a807b9b8ac58f32760a56b82
Christian Blau [Fri, 17 Jan 2020 13:15:14 +0000 (14:15 +0100)]
Split MdModuleNotifications into topics
Use different notifers to distinguish MdModule callbacks to
- preprocessing
- simulation setup
- checkpointing
refs #3076
Change-Id: I08b2ff7e90e42fce44043d7c0f2a9304d404445c
David van der Spoel [Mon, 17 Feb 2020 15:22:52 +0000 (16:22 +0100)]
Fixed typo in GMXRC.csh.cmakein
A bashism crept into a csh file.
Refs #3381.
Change-Id: I2f11e027db2804ee850f93a2d18de8ad427abc8e
Szilárd Páll [Mon, 3 Feb 2020 10:38:50 +0000 (11:38 +0100)]
Add simulation workload flag for dipole computation
Change-Id: I4e7828d4dc73fb9caea100e0303779853be80c70
M. Eric Irrgang [Wed, 12 Feb 2020 15:56:17 +0000 (18:56 +0300)]
Establish stubs for documenting GitLab configuration.
Insert an `infrastructure` document under the `tools` node to own the
`jenkins` doc and a new `gitlab` doc.
Refs #3275
Change-Id: I4aa03949b4216290933716beb88b439a8a0940c4
M. Eric Irrgang [Sat, 15 Feb 2020 12:20:32 +0000 (15:20 +0300)]
Reformat .gitlab-ci.yml
Normalize indentation and remove trailing white space.
Change-Id: I41ee8ded2e41edcc05b6dc414524644af9378976
Szilárd Páll [Fri, 14 Feb 2020 18:12:27 +0000 (19:12 +0100)]
Fix gpuudpate and gpucomm matrix docs
Improves the outdated documentation/description of the matrices
clarifying the use/role of these.
Also removed gpubufferops matrix which is not needed in the release
branch (the feature is automatically triggered when required by some
other features).
Change-Id: I097e1d6b150767a95b9d638b3c6031a24ece995f
Berk Hess [Fri, 24 Jan 2020 13:59:21 +0000 (14:59 +0100)]
Remove 1 pulse DD request
Since the CUDA DD code now supports multiple pulses this is no longer
needed.
Refs #3106
Change-Id: I2db1d3cf45d9b0c814c0897a048bc5efb9f99e79
Alan Gray [Fri, 6 Dec 2019 13:19:43 +0000 (05:19 -0800)]
Multiple pulses for GPU Halo Exchange
Removes restriction on single pulse.
Implements #3106
Change-Id: I5d68258de831d04c14d6c352fc52e51852fccd80
Pascal Merz [Thu, 13 Feb 2020 02:37:57 +0000 (19:37 -0700)]
Expand test coverage of exact continuation tests
The exact continuation tests were not covering the new
Parrinello-Rahman functionality of modular simulator, nor the
berendsen-berendsen NPT case using md-vv. This change fixes this.
Fixes #3377 (fixes point 4, last task on the list)
Change-Id: I3bcd072969259383dd1812d425dd7b3baee5bd85
Pascal Merz [Thu, 13 Feb 2020 02:32:36 +0000 (19:32 -0700)]
Fix reading of checkpoints with Parrinello-Rahman (modular simulator)
Using modular simulator, simulations using Parrinello-Rahman barostat
could not be read from checkpoint, throwing an error in the checkpoint
loading routine. While the legacy implementation of the P-R barostat
required the pressure at the previous step to be checkpointed, the
modular implementation does not require this. load_checkpoint is,
however, expecting this field to be present and throws an error.
This change fixes this by setting the globalState flags in dependence
of whether the modular simulator will be used, avoiding read_checkpoint
to expect this entry.
Note that tests ensuring this bug not to reappear are introduced in the
child change I3bcd0729.
Refs #3377 (fixes point 3)
Change-Id: If8afd294b8c79ceef66e71293d9d93cf2f7d0df8
Pascal Merz [Thu, 13 Feb 2020 02:09:13 +0000 (19:09 -0700)]
Fix Parrinello-Rahman scaling on initial step (modular simulator)
If Parrinello-Rahman scaling was requested on the first step, it was
not properly initialized. The setup routine would have correctly
(although non-obviously so) calculated the scaling matrix, but have
requested the propagator to use the scaling one step too late.
For new simulations, this never happens (since scaling happens on the
second step, not the first). It could, however, lead to slight
errors if restarting from a checkpoint occured exactly on a scaling
step. As restarting from Parrinello-Rahman simulations using modular
simulator was broken anyway, we can be sure that this has never
happened in practice.
This change fixes the bug, adds explanations of what happens on the
initial step, and makes the function calls more explicit (at the cost
of a very small amount of code duplication).
Refs #3377 (fixes point 2)
Change-Id: Ic3ba7ba078260a9d039d506fc0a87353f80d23dd
Pascal Merz [Wed, 12 Feb 2020 23:58:57 +0000 (16:58 -0700)]
Move modular simulator decision before checkpoint loading
Currently, the decision on whether to use modular simulator is done
relatively late during the runner stage. This makes it impossible to
allow for different behavior at checkpoint loading time. The current
change therefore moves this decision before checkpoint loading time.
To achieve this, some adaptations were needed:
* Use gmx_mtop_interaction_count to determine whether virtual sites
will be used before the respective object is created.
* The membrane embedding check via pointer is replaced by a boolean
set earlier during the runner phase.
* The essential dynamics check was split to catch command line inputs
during the runner phase, and mismatching checkpointing data during
the simulator phase (mirroring legacy behavior in do_md()).
* Replace the ensemble restraint check by a low-level alternative
for the early runner call (mimicking the distance restraint
initialization), while keeping the current check for the
simulator-level call. Note that as multi sims are disabled, this
low-level test will effectively never fail, but the additional
clarity is helpful in further development. The later test ensures
that changes to the init_disres() don't make this check invalid -
if they would ever get out of sync, the simulations would exit with
a fatal error.
Refs #3377 (fixes point 1)
Change-Id: I635e033db51d6ecc8bf121c72730a121e04586dd
Pascal Merz [Tue, 11 Feb 2020 01:08:17 +0000 (18:08 -0700)]
Fix checkNumberOfBondedInteractions bug
When checkNumberOfBondedInteractions finds a missing interaction, the
program is not exiting because a function enclosed in a logging statement
starts a global reduction, but is only ever reached by master.
Fixes #3373
Change-Id: I9a0faa790595a7ea59db561a20246a76857435a1
Pascal Merz [Wed, 12 Feb 2020 22:33:39 +0000 (15:33 -0700)]
Expose vsite counting
This allows to check whether vsites are present before the
respective object is created.
Refs #3377 (prepares point 1)
Change-Id: I8273daf38d46e2f052573f48323b5b6137965e9f
Christian Blau [Fri, 7 Feb 2020 13:47:50 +0000 (14:47 +0100)]
Introduce readXvgData to read xvg data into std::vector
This allows for modernization of table functions, demonstrated
here with read_tables, as well as potentially any other function
that needs to read in xvg data. The legacy read_xvg is now
implemented in terms of readXvgData. There is already a test for
table functions and this change now adds tests for reading in
xvg data.
Change-Id: Iac0b13d7db15f04a8b0b464df9fa136ff4b2a213
Artem Zhmurov [Tue, 4 Feb 2020 10:04:34 +0000 (11:04 +0100)]
Clean up trivial function and duplicating macroses from NBNXM
The getOclPruneKernelJ4Concurrency(..) that used to implement
the concurrency parameter switching depending on vendor is now
a trivial return the same value as defined by macros. Hence,
this patch removes the function and code now uses the macro directly.
Change-Id: I61d4b0a91e9b3256633860165ab0b7f4a34f9687
Szilárd Páll [Mon, 10 Feb 2020 18:30:22 +0000 (19:30 +0100)]
Fix incorrect GPU update task assignment fallback
This change fixes the incorrect fallback condition in the GPU update
task assignment. This also eliminates the assertion trigerred in do_md()
where the correct form of the check is asserted on.
Since the fallback path only triggers when the GPU update would be used by
default this only affected runs with GMX_FORCE_UPDATE_DEFAULT_GPU.
Change-Id: I8b2b506fa998b6ed5e6d6d8ae4b78e27006df199
Artem Zhmurov [Tue, 11 Feb 2020 09:43:14 +0000 (10:43 +0100)]
Fix the nightly failure
Change-Id: I06a75ba83590d2c6cdf94354e1b8c814db493ef0
Szilárd Páll [Fri, 24 Jan 2020 13:14:53 +0000 (14:14 +0100)]
Avoid dev flags in triggering gpuupdate nightly matrix
The GPU update release feature should be tested independenly from the
experimental features which were all enabled for the "gpuupdate" nightly
job. This change removes the GMX_GPU_DD_COMMS and GMX_GPU_PME_PP_COMMS
as well as the unnecessary buffer ops env var.
Refs #3354
Change-Id: I777f6996ca5b1ae1b3e7f787c18d82f605035e47
Szilárd Páll [Tue, 28 Jan 2020 18:24:13 +0000 (19:24 +0100)]
Avoid (re)initializing GPU update without DD
Unless repartitioning happens the GPU update-constraints module's
expensive initialization only neeeds to be called once.
Fixes #3358
Change-Id: Ic2a147985da5907961a3e3277110bbae52e6cadc
Artem Zhmurov [Thu, 6 Feb 2020 12:53:52 +0000 (13:53 +0100)]
Temporary disable RVec->float3 conversion test to fix the post-submit
This fixes the post-submit matrix by disabling the faulty test. Will
be retracted once the proper soultion is found.
Refs. #3372.
Change-Id: I28031bc4793ce283c42539f4029cfe6bc2651156
Artem Zhmurov [Mon, 20 Jan 2020 17:32:46 +0000 (18:32 +0100)]
Use RVec instead of float for x, v and f device buffers
Using RVec instead of float for coordinates data-types allows to
remove multiplications by DIM when the adresses, offsets and sizes
are computed. Since the native device types are not used in CPU
part of the code, the type casting remains.
Refs #3312 and #2936
Change-Id: Iaea914a474195f214ca860f7345f6878b9a04813
Szilárd Páll [Fri, 31 Jan 2020 15:40:36 +0000 (16:40 +0100)]
Remove mu_tot from compute_globals()
The total dipole reduction happens in do_force() and the alternative
code-path reduction in compute_globals() was only needed for log
reporting which was removed some time ago.
Change-Id: I49a2608e8c1a47959a5f0f571e38e511367c94b2
Artem Zhmurov [Wed, 29 Jan 2020 14:45:59 +0000 (15:45 +0100)]
Move DeviceInfo into GPU traits
The DeviceInfo is needed upon construction of DeviceContext. To
prepare for opaque DeviceContext type, it is moved to GPU traits
and renamed according to the common naming scheme.
Refs. #3311, needed for #3315.
Change-Id: I2a9f1d932f142d645df75901521a734d208de509
Artem Zhmurov [Wed, 29 Jan 2020 13:31:43 +0000 (14:31 +0100)]
Make OpenCL DeviceVendor into enum class and move to GPU traits
The device context in OpenCL requires the information on vendor when
constructed. To prepare for opaque DeviceContext, the vendor
enum was moved into OpenCL traits.
Refs. #3311, needed for #3315.
Change-Id: Iec22ff17543b6a99407048de6e0cd82bb7218fb0
Artem Zhmurov [Tue, 4 Feb 2020 10:51:45 +0000 (11:51 +0100)]
Move non-bonded initialization out of the forcerec
Forcerec should not be responsible for initializing modules.
Change-Id: I666075fe03441c815b191f1eb3809e294c62d541
Pascal Merz [Tue, 4 Feb 2020 14:49:54 +0000 (09:49 -0500)]
Test PaddedVector to ArrayRef conversion
This adds a few tests to the PaddedVector tests, making sure that
the various ways to create unpadded ArrayRefs are yielding equivalent
views.
This also fix a small bug in the copy assignment test.
Change-Id: If4317e81a1723739ac3b16fc255987d9f7193489
Alan Gray [Wed, 5 Feb 2020 17:18:34 +0000 (09:18 -0800)]
Bug fix to avoid passing null object into cudaDestroyTextureObject
In the initial dummy context creation sanity-check part of the
simulation, a null object is passed into this function. This can cause
runtime failures with certain versions of CUDA. This change only calls
the function when the object is non-null.
Change-Id: I8118f6086fa2227c8dc697e4634878a12fe3676f
Artem Zhmurov [Wed, 5 Feb 2020 10:31:13 +0000 (11:31 +0100)]
Fix typo in and remove a couple of duplicates from cool quotes
Older versions are also affected.
Fixes #3367.
Change-Id: If975f67490bfc2ddb6b5e17e00f63434a5013799
Paul Bauer [Thu, 27 Jun 2019 10:17:46 +0000 (12:17 +0200)]
Use more MDLogger in preprocessing
Refs #2999, #3005
Change-Id: I2ec9f5d9d98d7b1add0cc3e9339e7a93b6e1c9a6
Berk Hess [Mon, 3 Feb 2020 10:26:50 +0000 (11:26 +0100)]
Actually fix PME forces with FE without perturbed q/LJ
PME would incorrectly ignore the mesh forces on perturbed atoms when
no charges or LJ atom types were actually perturbed.
This is because the "fix" in commit
12f01f79 incorrectly changed the
lambda value used for the PME forces from the actual lambda value
to 1 instead of to 0 as it should have been.
Fixes #2640
Fixes #3359
Change-Id: Ib19565bf017ddbd2fddc66c52be0ff9efc7e707c
Pascal Merz [Fri, 24 Jan 2020 20:16:35 +0000 (20:16 +0000)]
Minor improvements to vcm.cpp
This cleans up some minor details in vcm.cpp:
* Removed unnecessary include
* Specified OMP data sharing attributes explicitly
* Replaced entire functions being enclosed in if clauses by
returning immediately if the condition is not fulfilled to
improve readability. Blocks were kept to avoid touching lines
unnecessarily.
Change-Id: I29ac6e11a16d7b081c9b00bd85559d5381ae9119
Pascal Merz [Tue, 21 Jan 2020 15:01:53 +0000 (16:01 +0100)]
Merge VV implementations of ComputeGlobalsElement
Until now, ComputeGlobalsElement had effectively two separate
(templated) implementations for velocity verlet, to be called
at full timestep and after the position update.
As we gradually move towards a design in which the
ComputeGlobalsElement is agnostic to the data it reduces, this
separation does not make sense anymore. As a first step, the
two implementations are therefore merged.
Change-Id: If0b549a3d87fea50e895b70c55632e1f58582067