Commit 09fc8b0b authored by Dan Ibanez's avatar Dan Ibanez
Browse files

kspace & dihedral can't do their own sync/modify

because the verlet_kokkos system has
a "clever" optimization which will
alter the datamasks before calling sync/modify,
so the datamask framework must be
strictly obeyed for GPU correctness.
(the optimization is to concurrently
compute forces on the host and GPU,
and add them up at the end of an iteration.
calling your own sync will overwrite
the partial GPU forces with the
partial host forces).
parent f8506fee
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -85,13 +85,10 @@ void DihedralOPLSKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
    d_vatom = k_vatom.d_view;
  }

  atomKK->sync(execution_space,datamask_read);
  k_k1.template sync<DeviceType>();
  k_k2.template sync<DeviceType>();
  k_k3.template sync<DeviceType>();
  k_k4.template sync<DeviceType>();
  if (eflag || vflag) atomKK->modified(execution_space,datamask_modify);
  else atomKK->modified(execution_space,F_MASK);

  x = atomKK->k_x.view<DeviceType>();
  f = atomKK->k_f.view<DeviceType>();
+1 −4
Original line number Diff line number Diff line
@@ -647,9 +647,6 @@ void PPPMKokkos<DeviceType>::compute(int eflag, int vflag)
  f = atomKK->k_f.view<DeviceType>();
  q = atomKK->k_q.view<DeviceType>();

  atomKK->sync(execution_space,datamask_read);
  atomKK->modified(execution_space,datamask_modify);
 
  //nlocal = atomKK->nlocal;
  //nall = atomKK->nlocal + atomKK->nghost;
  //newton_pair = force->newton_pair;