Repository navigation
Share reactive Voronoi assignments and add an optional CUDA backend - #1645
Open
Zhang-pchao wants to merge 2 commits into
Open
Zhang-pchao wants to merge 2 commits into
Zhang-pchao wants to merge 2 commits into
Conversation
| other->useCellList_==useCellList_) { | ||
| shared_=other->shared_; | ||
| ++shared_->consumers; | ||
| shared_->mixedKappa=shared_->mixedKappa || shared_->firstKappa!=kappa_; |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1645 +/- ##
==========================================
+ Coverage 88.96% 88.98% +0.02%
==========================================
Files 652 653 +1
Lines 81934 82139 +205
==========================================
+ Hits 72890 73095 +205
Misses 9044 9044 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
|
Cool! One question, how does the cuda plugin interact with the others? Can you run it together with the coordination one and the same input? |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When several reactive Voronoi CVs use the same centers and assigned atoms, each action currently rebuilds the same geometry and performs its own soft assignment. This PR lets compatible coordination, distance and position actions reuse that work. It also adds an optional FP64 CUDA library for the assignment and its derivatives. The scalar reductions, including the center-pair distance sum, still run on the host. This builds on #1442.
Using the backends
BACKEND=CPUis the default and shares compatible work. AddNO_SHAREfor independent CPU evaluation. To test the GPU, change both actions toBACKEND=CUDA. This requires the optional library and reports an error if CUDA is unavailable or the input is unsupported.BACKEND=AUTOuses CUDA when supported and falls back to CPU otherwise. CUDA supports one MPI rank with axis-aligned orthorhombic PBC orNOPBC. The plugin README covers the build and the optionalCUDA_LIBRARYoverride.For buffered assignments, append
NLIST NL_CUTOFF=6 NL_STRIDE=10 NL_SKIN=0.5to both actions. In this example the cutoff and skin are in Å. The stride sets the scheduled rebuild interval in steps, and the skin allows earlier rebuilds when atoms or the box move. Both backends use the same CPU-built candidate list and apply the same cutoff. Check CVs and bias forces against full assignments when choosing the cutoff.Performance
These short DPMD benchmarks use full assignments on one V100 with one MPI rank and one host evaluation thread. All three modes use the same GPU potential and start from the same restart and OPES state. The independent CPU column uses
NO_SHARE. Each time is the median of two launches with 1,000 timed steps each. Speedups use the unrounded times.The larger water systems are periodic replicas, and the larger glycine systems are restrained droplets. The center-pair distance sum remains on the CPU and grows faster for the all-water selections in these benchmarks.
In a separate 58-water OPES run on one RTX 3090, both backends completed 500 ps. Mean step time went from 2.506 to 1.713 ms (1.46×). Host-side work and the number of retained pairs affect the speedup. With buffered lists on the smallest systems, shared CPU can be just as fast.
Validation
Six focused native regressions and the CPU-only and CUDA driver suites passed. Coverage includes cache invalidation, CPU/CUDA values and derivatives, automatic fallback, and neighbor-list rebuilds. The cell finite-difference test also exercises the corrected periodic image in the direct triclinic virial of
VORONOI_POSITION.I'd appreciate feedback on the
BACKENDinterface and how best to run the optional CUDA checks alongside the standard CPU tests.Target release
2.11 (current master)
Type of contribution
Copyright
Tests