Unverified Commit dff2e93e authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #2236 from stanmoore1/kk_qeq_nevery

Fix issues in Kokkos fix qeq/reax
parents 0105d1ca 71344aaa
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -123,6 +123,8 @@ void FixQEqReaxKokkos<DeviceType>::init()

  init_shielding_k();
  init_hist();

  last_allocate = -1;
}

/* ---------------------------------------------------------------------- */
@@ -216,8 +218,10 @@ void FixQEqReaxKokkos<DeviceType>::pre_force(int vflag)

  // get max number of neighbor

  if (!allocated_flag || update->ntimestep == neighbor->lastcall)
  if (!allocated_flag || last_allocate < neighbor->lastcall) {
    allocate_matrix();
    last_allocate = update->ntimestep;
  }

  // compute_H

@@ -1504,6 +1508,9 @@ int FixQEqReaxKokkos<DeviceType>::pack_exchange(int i, double *buf)
template<class DeviceType>
int FixQEqReaxKokkos<DeviceType>::unpack_exchange(int nlocal, double *buf)
{
  k_s_hist.template sync<LMPHostType>();
  k_t_hist.template sync<LMPHostType>();

  for (int m = 0; m < nprev; m++) s_hist[nlocal][m] = buf[m];
  for (int m = 0; m < nprev; m++) t_hist[nlocal][m] = buf[nprev+m];

+1 −1
Original line number Diff line number Diff line
@@ -152,7 +152,7 @@ class FixQEqReaxKokkos : public FixQEqReax {

 private:
  int inum,ignum;
  int allocated_flag;
  int allocated_flag, last_allocate;
  int need_dup;

  typename AT::t_int_scalar d_mfill_offset;