Skip to content
Snippets Groups Projects
Commit 26c8d3d9 authored by Stan Moore's avatar Stan Moore
Browse files

Fixing GPU memory issue in fix_langevin_kokkos

parent 73177d65
No related branches found
No related tags found
No related merge requests found
......@@ -177,11 +177,12 @@ void FixLangevinKokkos<DeviceType>::post_force(int vflag)
// account for bias velocity
if(tbiasflag == BIAS){
atomKK->sync(temperature->execution_space,temperature->datamask_read);
temperature->compute_scalar();
temperature->remove_bias_all(); // modifies velocities
// if temeprature compute is kokkosized host-devcie comm won't be needed
atomKK->modified(Host,V_MASK);
atomKK->sync(execution_space,V_MASK);
atomKK->modified(temperature->execution_space,temperature->datamask_modify);
atomKK->sync(execution_space,temperature->datamask_modify);
}
// compute langevin force in parallel on the device
......@@ -508,8 +509,10 @@ void FixLangevinKokkos<DeviceType>::post_force(int vflag)
DeviceType::fence();
if(tbiasflag == BIAS){
atomKK->sync(temperature->execution_space,temperature->datamask_read);
temperature->restore_bias_all(); // modifies velocities
atomKK->modified(Host,V_MASK);
atomKK->modified(temperature->execution_space,temperature->datamask_modify);
atomKK->sync(execution_space,temperature->datamask_modify);
}
// set modify flags for the views modified in post_force functor
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment