HanatoK / NAMD_Wishlist

NAMD Wishlist
0 stars 0 forks source link

Compute collective variables and on-the-fly biasing methods on GPU #7

Open HanatoK opened 4 years ago

HanatoK commented 4 years ago

Also discussed in https://github.com/Colvars/colvars/issues/358

giacomofiorin commented 3 years ago

@HanatoK Multiple time stepping is already a feature, can you clarify? https://colvars.github.io/colvars-refman-namd/colvars-refman-namd.html#sec:mts_colvar @jhenin

HanatoK commented 3 years ago

@giacomofiorin Thanks!

fhh2626 commented 2 years ago

@HanatoK Multiple time stepping is already a feature, can you clarify? https://colvars.github.io/colvars-refman-namd/colvars-refman-namd.html#sec:mts_colvar @jhenin

@giacomofiorin @HanatoK As far as I know, MTS should be implemented in the MD engine, such that the information exchange between GPU and CPU only happens every N steps, hence accelerating the enhanced-sampling simulations (This is what OpenMM does by MTSLangevinIntegrator). That only Colvars supports this feature is not enough, (and I do not see significant gain in performance when using it). Please correct if I was wrong.

Thanks, Haohao

jhenin commented 2 years ago

As far as I know, MTS should be implemented in the MD engine, such that the information exchange between GPU and CPU only happens every N steps

I think MTS needs to be implemented in the Colvars-specific CPU-GPU communication code. In NAMD that would be the CUDASOA-compatible version of GlobalMaster. Not sure where that stands now.

giacomofiorin commented 2 years ago

@fhh2626 Depending on the use case, you can either speed things up just by skipping the computation (keyword timeStepFactor in Colvars), or you may also need to skip the communication as well to have an actual performance gain. Your system seems to fit more the second use case.

The framework currently used to communicate between Colvars and NAMD is provided by ComputeGlobal and GlobalMaster, which are part of NAMD and need to be updated there. For the GPU-resident version, such interface doesn't exist yet, and it's unclear even if a full reimplementation would be a good idea. There are also other moving parts, e.g. there is a MR open to refactor the entire multi-GPU scheme as far as I can tell https://gitlab.com/tcbgUIUC/namd/-/merge_requests/112.

I have some working code for Colvars to dynamically adjust how many atoms are sent over through GlobalMaster (presented at the last NAMD meeting about). But until I know more about what their plans are for the GPU code, over the last few months I've prioritized finishing other projects that I have open.

fhh2626 commented 2 years ago

@jhenin @giacomofiorin Thanks for your clarification!