CUDA Update and Constraints module - Redmine #2888
LINCS for non-water constraints.SETTLE for water constraints.Leap frog integrator.Merge of the three into single module.- Remove the scaffolding from LINCS, SETTLE and Leap-Frog:
Coordinates, velocities, forces management.-
PBC management. -
Virial reduction(moved to #3114). Update tests.Remove Impl.Template computeVirial and updateVelocities-
Remove the D2D copy for the coordinates (xp>x)-
(from redmine: issue id 2888, created on 2019-03-08 by artemzhmurov, closed on 2020-01-22)
- Relations:
- relates #2885 (closed)
- relates #2886 (closed)
- relates #2887 (closed)
- relates #2936 (closed)
- relates #3171 (closed)
- relates #3195 (closed)
- relates #3220 (closed)
- child #3163 (closed)
- child #3167 (closed)
- child #3168 (closed)
- child #3182 (closed)
- child #3221 (closed)
- parent #2816 (closed)
- Changesets:
- Revision 1c8eb7c5 by Artem Zhmurov on 2019-06-18T09:24:36Z:
Combine CUDA Leap-Frog, LINCS and SETTLE. I.
This is the first step in combining constraints and integrator
into "UpdateAndConstraints" module. The initial merge does not
imply any performance optimisation or code clean-up. Hence, this
patch keeps all the temporary infrastructure that was built
around SETTLE, LINCS and Leap-Frog to allow them to function as
a separate units. In the following commits, this infrastructure
will be removed and these three implementations will be more closely
integrated. To enable, set GMX_UPDATE_CONSTRAIN_GPU environment
variable. Note, that environment variables GMX_LINCS_GPU,
GMX_SETTLE_GPU and GMX_INTEGRATE_GPU will no longer work.
Refs #2816, #2888
Change-Id: I8730aad0ecaa0230686fe89d1157b0da2f01f7bc
- Revision fb7a59cd by Artem Zhmurov on 2019-07-03T07:42:02Z:
Combine CUDA Leap-Frog, LINCS and SETTLE. II.
Stand-alone CUDA implementations of Leap-Frog, LINCS
and SETTLE required additional scaffolding for integration
and testing. The most prominent part of this is the
management of coordinates, velocities and forces, which
is removed in this commit. Management of periodic boundary
conditions and virial reduction will be removed in
following commits.
Refs #2816, #2888
Change-Id: I4c65a6c7088fd8059f4e7fa3cb4637cb2af79ebc
- Revision 747c371c by Artem Zhmurov on 2019-07-03T11:01:30Z:
Memory management fixes in CUDA version of LINCS
This fix is to prepare LINCS to run with DD.
1. The masses array size depends on the current number of atoms
rather than on the number of constraints.
2. The size of other arrays should be based on the number of
threads launched on the GPU, which include padding added to
align coupled constraints with the thread blocks. Also
renamed variable according to conventions.
Refs #2885 and #2888
Change-Id: I20cb53ebc6da6a1ff2ee1e385613b27c4a01d11f
- Revision 1b64f6aa by Artem Zhmurov on 2019-07-04T06:23:51Z:
Use reallocateDeviceBuffer(...) in CUDA version of SETTLE
Refs #2886 and #2888
Change-Id: Ia45254a24eda8e6ad151b1f4c6583b1a2c926004
- Revision 6385f296 by Artem Zhmurov on 2019-07-05T09:05:46Z:
Remove PImpl scaffolding from CUDA version of LINCS
The CUDA implementation of LINCS was initially introduced as a
stand-alone feature. This required hiding CUDA-specific variables
and subroutines into the private implementation subclass. Since the
LINCS is not a part of Update and Constraints module, this is no
longer required and can be removed.
Refs #2816, #2888
Change-Id: I9698224d4702dfb8d99106999335c62e83a511df
- Revision b1150eee by Artem Zhmurov on 2019-07-26T08:20:31Z:
Remove PImpl scaffolding from CUDA version of SETTLE
GPU version of SETTLE was implemented as a class with private
implementation so it will be possible to initialize on
non-CUDA hosts. Now, the implementation can be hidden
inside the Update and Constraints PImpl so that the CUDA
specific types and calls can be exposed in SETTLE and
private implementation is no longer needed there.
Refs #2816, #2888
Change-Id: I4c78f2629be34b42bb5f4f7d34970c3e41515691
- Revision 1bfc9ba5 by Artem Zhmurov on 2019-08-06T13:52:58Z:
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
- Revision b1be1e72 by Artem Zhmurov on 2019-08-08T09:13:34Z:
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
- Revision d1f2302e by Artem Zhmurov on 2019-08-09T15:35:08Z:
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
- Revision 0cd72f2b by Artem Zhmurov on 2019-08-09T17:59:19Z:
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
- Revision 7bd1c817 by Artem Zhmurov on 2019-08-13T14:13:08Z:
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
- Revision 1fbaf8ff by Artem Zhmurov on 2019-08-16T09:29:54Z:
Remove PImpl scaffolding from CUDA version of SETTLE
GPU version of SETTLE was implemented as a class with private
implementation so it will be possible to initialize on
non-CUDA hosts. Now, the implementation can be hidden
inside the Update and Constraints PImpl so that the CUDA
specific types and calls can be exposed in SETTLE and
private implementation is no longer needed there.
Refs #2816, #2888
Change-Id: I4c78f2629be34b42bb5f4f7d34970c3e41515691
- Revision 3d35e919 by Artem Zhmurov on 2019-08-16T09:29:55Z:
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
- Revision 039709b7 by Artem Zhmurov on 2019-08-16T09:29:55Z:
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
- Revision 4b07f76f by Artem Zhmurov on 2019-08-26T13:07:58Z:
Add temperature coupling to CUDA Leap-Frog integrator
Velocity rescaling added to the integrator. None, one,
or multiple rescaling groups are supported. Tests that
include temperature coupling are added.
NoseHoover temperature control is not implemented.
Refs. #2887, #2888.
Change-Id: I1e6850eeb74de829554260fba6a6e6c1c63ceb46
- Revision 7ddb7204 by Artem Zhmurov on 2019-09-03T04:49:22Z:
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
- Revision 79aab161 by Artem Zhmurov on 2019-10-02T17:07:21Z:
Eliminate D2D copy in update constraints
The intermediate coordinates (x' or xp) are only needed inside
the update-constraints module (for the constraints algorithms)
and never used outside. Hence, the xp variable can be used to
save the coordinates before update, while x stores the final
coordinates. This way, there is no need to make a D2D xp->x
copy after applying the constraints, since x will have the
correct data.
Refs. #2888, #3114.
Change-Id: I363b633976a236a8e2bf2137c21d3bf0a765cb06
- Revision f310be38 by Szilárd Páll on 2019-10-15T23:54:41Z:
Trigger synchronizer when local forces are ready
The sycnhronizer is created and managed in StatePropagatorDataGpu and is
passed to the nonbonded mdoule at the f buffer ops init.
Refs #2888 #3126
Change-Id: Ie9bf0b6cd8511fe282e377e48f3940e591db214c
- Revision 7bbfb57c by Artem Zhmurov on 2019-10-16T08:21:40Z:
Link GPU force producer and consumer tasks
The GPU event synchronizer that indicates that forces are ready
for a consumption is now passed to the GPU update-constraints.
The update-constraints enqueue a wait on the event in the update
stream before performing numerical integration and constraining.
Note that the event is conditionally returned by the
StatePropagatorDataGpu and indicates that either the reduction of
forces on the GPU or the H2D copy is done, depending on offload
scenario on a current timestep.
Refs. #2816, #2888, #3126.
Change-Id: Ic12b0c55b75ec5f0c31ce500a2760fb4d5cf3b91
- Revision 09c1b71f by Artem Zhmurov on 2020-01-20T14:14:38Z:
Rename LeapFrogCuda to LeapFrogGpu
This is to folow general naming conventions across the code.
Refs #2887, #2888.
Change-Id: Ia090c0479f1960fe34d1144e3bd173015d157e62
- Revision af1e0e7e by Artem Zhmurov on 2020-01-20T14:15:28Z:
Rename LincsCuda into LincsGpu
This is to folow general naming conventions across the code.
Refs #2885, #2888.
Change-Id: Ifa7e3febeff1d958155ed02daa97d26e828e8381
- Revision 4cbaad4f by Artem Zhmurov on 2020-01-20T18:01:02Z:
Rename SettleCuda to SettleGpu
This is to folow general naming conventions across the code.
Refs #2886, #2888.
Change-Id: I273cf8c1cabcf59d1cb7fd7f0028c3c1cd8619c8