Commit 8050eb3a authored by Stan Moore's avatar Stan Moore
Browse files

Another tweak to sync/modify in pair_multi_lucy_rx_kokkos

parent c617bc18
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -496,11 +496,8 @@ void PairMultiLucyRXKokkos<DeviceType>::computeLocalDensity()

  // communicate and sum densities (on the host)

  if (newton_pair) {
    atomKK->sync(Host,DPDRHO_MASK);
  if (newton_pair)
    comm->reverse_comm_pair(this);
    atomKK->modified(Host,DPDRHO_MASK);
  }

  comm->forward_comm_pair(this);
}
@@ -648,6 +645,8 @@ template<class DeviceType>
int PairMultiLucyRXKokkos<DeviceType>::pack_forward_comm_kokkos(int n, DAT::tdual_int_2d k_sendlist, int iswap_in, DAT::tdual_xfloat_1d &buf,
                               int pbc_flag, int *pbc)
{
  atomKK->sync(execution_space,DPDRHO_MASK);

  d_sendlist = k_sendlist.view<DeviceType>();
  iswap = iswap_in;
  v_buf = buf.view<DeviceType>();
@@ -672,6 +671,8 @@ void PairMultiLucyRXKokkos<DeviceType>::unpack_forward_comm_kokkos(int n, int fi
  v_buf = buf.view<DeviceType>();
  Kokkos::parallel_for(Kokkos::RangePolicy<LMPDeviceType, TagPairMultiLucyRXUnpackForwardComm>(0,n),*this);
  DeviceType::fence();

  atomKK->modified(execution_space,DPDRHO_MASK);
}

template<class DeviceType>
@@ -718,6 +719,8 @@ int PairMultiLucyRXKokkos<DeviceType>::pack_reverse_comm(int n, int first, doubl
{
  int i,m,last;

  atomKK->sync(Host,DPDRHO_MASK);

  m = 0;
  last = first + n;
  for (i = first; i < last; i++) buf[m++] = h_rho[i];
@@ -736,6 +739,8 @@ void PairMultiLucyRXKokkos<DeviceType>::unpack_reverse_comm(int n, int *list, do
    j = list[i];
    h_rho[j] += buf[m++];
  }

  atomKK->modified(Host,DPDRHO_MASK);
}

/* ---------------------------------------------------------------------- */