Project

General

Profile

Feature #2886

Feature #2816: GPU offload / optimization for update&constraits, buffer ops and multi-gpu communication

CUDA version of SETTLE

Added by Artem Zhmurov 8 months ago. Updated 21 days ago.

Status:
New
Priority:
Normal
Assignee:
Category:
core library
Target version:
Difficulty:
uncategorized
Close

Description

Initial implementation that works as a separate instance, i.e. is be able to copy coordinates and velocities to and from GPU, handle PBC, compute virial. The infrastructure that maintains coordinates, velocities and PBC is temporary and will be removed when it is integrated with other parts of the GPU-only loop. GPU version is enabled by setting the environment variable "GMX_SETTLE_GPU".

TODO:
  • Stand-alone module that is enabled using environment variables.
  • A version of algorithm for derivatives.
  • Unify virial reduction with LINCS
  • Unify SettleParameters and their initialization with CPU version
  • Better integration with CPU version (e.g. checks for input consistency)

Related issues

Related to GROMACS - Feature #2885: CUDA version of LINCSNew
Related to GROMACS - Feature #2887: CUDA version of Leap Frog algorithmNew
Related to GROMACS - Feature #2888: CUDA Update and Constraints moduleNew

Associated revisions

Revision 02a92f23 (diff)
Added by Artem Zhmurov 6 months ago

CUDA version of SETTLE algorithm with basic tests

CUDA-based GPU implementation of SETTLE. This is a part of
all-GPU loop. Can work isolated from other parts of the code
since coordinates are copied to (from) device before (after)
SETTLE kernel call. The velocity update as well as virial
evaluations can be enabled.

To enable, set GMX_SETTLE_GPU environment variable.

Limitations:
1. Does not work when domain decomposition is enabled.
2. Projection of the derivative is not implemented.
3. Not fully integrated/unified with the CPU version.

TODOs:
1. Multi-GPU case.
2. Better virial reduction. This is a more general feature,
not only related to constraints.
5. More cleanup in constr.cpp needed.
6. Better unit tests.

Refs #2816, #2886

Change-Id: I218e1bf1f86a2351e189e3c27f950f45c06135a4

Revision 1b64f6aa (diff)
Added by Artem Zhmurov 4 months ago

Use reallocateDeviceBuffer(...) in CUDA version of SETTLE

Refs #2886 and #2888

Change-Id: Ia45254a24eda8e6ad151b1f4c6583b1a2c926004

Revision d1f2302e (diff)
Added by Artem Zhmurov 2 months ago

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 7bd1c817 (diff)
Added by Artem Zhmurov 2 months ago

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

History

#1 Updated by Artem Zhmurov 8 months ago

#2 Updated by Artem Zhmurov 8 months ago

  • Description updated (diff)

#3 Updated by Artem Zhmurov 8 months ago

  • Related to Feature #2887: CUDA version of Leap Frog algorithm added

#4 Updated by Artem Zhmurov 8 months ago

  • Related to Feature #2888: CUDA Update and Constraints module added

#5 Updated by Artem Zhmurov 7 months ago

  • Description updated (diff)

#6 Updated by Artem Zhmurov 21 days ago

  • Description updated (diff)

Also available in: Atom PDF