Skip to content

WIP: Integrate support for GlobalMaster and CUDAGlobalMaster - #914

Draft
giacomofiorin wants to merge 4 commits into
masterfrom
integrate_cudagm
Draft

giacomofiorin wants to merge 4 commits into
masterfrom
integrate_cudagm

Conversation

@giacomofiorin

@giacomofiorin giacomofiorin commented Feb 6, 2026 •

Copy link
Copy Markdown
Member

Currently, GlobalMaster (GM) is a required component of the default interface between NAMD and Colvars; this class interacts with the class colvarproxy_namd to communicate all data related to atoms, groups and unit cell.

CUDAGlobalMaster (CUDAGM) (see #783) is an alternative interface that is much faster in GPU-resident runs, but does not support the other use cases (pure CPU or GPU-offload), or some specialized features of GlobalMaster. Additionally, the CUDAGM client bundled in namd/cudaglobalmaster folder currently uses a different class to interact with Colvars, called colvarproxy_impl, which duplicates some but not all of the code of colvarproxy_namd.

This PR aims to unify the colvarproxy_impl and colvarproxy_namd classes, so that the end product (still called colvarproxy_namd for consistency) can handle both GM and CUDAGM interfaces.

@giacomofiorin
giacomofiorin force-pushed the integrate_cudagm branch 3 times, most recently from e5a29f6 to c645379 Compare September 11, 2026 17:11
@giacomofiorin
giacomofiorin force-pushed the integrate_cudagm branch 3 times, most recently from 8fb337d to 8c66ca3 Compare October 6, 2026 22:01
@giacomofiorin

Copy link
Copy Markdown
Member Author

@HanatoK The commits up until the last one ensure that the colvarproxy_namd object uses the GlobalMaster object only if the latter is defined. All the regtests pass, and I'd be okay with putting it up for review as is.

The latest commit is entirely generated by Copilot, and it combines improvements to colvarproxy_impl with its merge into colvarproxy_namd. I'm gonna try tomorrow to separate the changes into multiple commits

@giacomofiorin

giacomofiorin commented Oct 7, 2026 •

Copy link
Copy Markdown
Member Author

I'm gonna try tomorrow to separate the changes into multiple commits

The Copilot changes are now split in the three latest commits.

@giacomofiorin
giacomofiorin force-pushed the integrate_cudagm branch 2 times, most recently from 9f87683 to 8cf4cc4 Compare October 7, 2026 21:24
@HanatoK

HanatoK commented Oct 12, 2026

Copy link
Copy Markdown
Member

I am afraid that this PR would break the CUDAGM plugin build if merged. The original colvarproxy_cudaglobalmaster.C was written without including any Charm++ header files. Is it possible to separate the Charm++ related members in the colvarproxy_namd class to only the GM interface?

@giacomofiorin

Copy link
Copy Markdown
Member Author

I am afraid that this PR would break the CUDAGM plugin build if merged. The original colvarproxy_cudaglobalmaster.C was written without including any Charm++ header files. Is it possible to separate the Charm++ related members in the colvarproxy_namd class to only the GM interface?

Thanks! As I was afraid, we're not that close to full integration unfortunately. I'm going to create a separate PR for the colvarproxy_namd refactoring specifically, so we can review/merge that and come back to this afterwards, hopefully as a stacked PR

@giacomofiorin
giacomofiorin changed the base branch from master to refactor_namd_proxy October 13, 2026 19:38
@giacomofiorin
giacomofiorin added this pull request to stack #971 October 13, 2026 19:38
Base automatically changed from refactor_namd_proxy to master October 23, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants