Commit 8f59c0e1 authored by Stan Moore's avatar Stan Moore
Browse files

Fix modify/sync issue in neigh_bond_kokkos

parent c3c9f357
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -307,6 +307,8 @@ void NeighBondKokkos<DeviceType>::bond_all()
            "Bond atoms missing at step " BIGINT_FORMAT,update->ntimestep);
    if (me == 0) error->warning(FLERR,str);
  }

  k_bondlist.modify<DeviceType>();
}

template<class DeviceType>
@@ -401,6 +403,8 @@ void NeighBondKokkos<DeviceType>::bond_partial()
            "Bond atoms missing at step " BIGINT_FORMAT,update->ntimestep);
    if (me == 0) error->warning(FLERR,str);
  }

  k_bondlist.modify<DeviceType>();
}

template<class DeviceType>
@@ -521,6 +525,8 @@ void NeighBondKokkos<DeviceType>::angle_all()
            "Angle atoms missing at step " BIGINT_FORMAT,update->ntimestep);
    if (me == 0) error->warning(FLERR,str);
  }

  k_anglelist.modify<DeviceType>();
}

template<class DeviceType>
@@ -622,6 +628,8 @@ void NeighBondKokkos<DeviceType>::angle_partial()
            "Angle atoms missing at step " BIGINT_FORMAT,update->ntimestep);
    if (me == 0) error->warning(FLERR,str);
  }

  k_anglelist.modify<DeviceType>();
}

template<class DeviceType>
@@ -762,6 +770,8 @@ void NeighBondKokkos<DeviceType>::dihedral_all()
            "Dihedral atoms missing at step " BIGINT_FORMAT,update->ntimestep);
    if (me == 0) error->warning(FLERR,str);
  }

  k_dihedrallist.modify<DeviceType>();
}

template<class DeviceType>
@@ -868,6 +878,8 @@ void NeighBondKokkos<DeviceType>::dihedral_partial()
            "Dihedral atoms missing at step " BIGINT_FORMAT,update->ntimestep);
    if (me == 0) error->warning(FLERR,str);
  }

  k_dihedrallist.modify<DeviceType>();
}

template<class DeviceType>
@@ -1030,6 +1042,8 @@ void NeighBondKokkos<DeviceType>::improper_all()
            "Improper atoms missing at step " BIGINT_FORMAT,update->ntimestep);
    if (me == 0) error->warning(FLERR,str);
  }

  k_improperlist.modify<DeviceType>();
}

template<class DeviceType>
@@ -1136,6 +1150,8 @@ void NeighBondKokkos<DeviceType>::improper_partial()
            "Improper atoms missing at step " BIGINT_FORMAT,update->ntimestep);
    if (me == 0) error->warning(FLERR,str);
  }

  k_improperlist.modify<DeviceType>();
}

template<class DeviceType>
+0 −20
Original line number Diff line number Diff line
@@ -387,16 +387,6 @@ void NeighborKokkos::build_topology() {
    k_dihedrallist = neighbond_device.k_dihedrallist;
    k_improperlist = neighbond_device.k_improperlist;

    k_bondlist.sync<LMPDeviceType>();
    k_anglelist.sync<LMPDeviceType>();
    k_dihedrallist.sync<LMPDeviceType>();
    k_improperlist.sync<LMPDeviceType>();

    k_bondlist.modify<LMPDeviceType>();
    k_anglelist.modify<LMPDeviceType>();
    k_dihedrallist.modify<LMPDeviceType>();
    k_improperlist.modify<LMPDeviceType>();

    // Transfer topology neighbor lists to Host for non-Kokkos styles
 
    if (force->bond && force->bond->execution_space == Host)
@@ -415,15 +405,5 @@ void NeighborKokkos::build_topology() {
    k_anglelist = neighbond_host.k_anglelist;
    k_dihedrallist = neighbond_host.k_dihedrallist;
    k_improperlist = neighbond_host.k_improperlist;

    k_bondlist.sync<LMPHostType>();
    k_anglelist.sync<LMPHostType>();
    k_dihedrallist.sync<LMPHostType>();
    k_improperlist.sync<LMPHostType>();

    k_bondlist.modify<LMPHostType>();
    k_anglelist.modify<LMPHostType>();
    k_dihedrallist.modify<LMPHostType>();
    k_improperlist.modify<LMPHostType>();
  }
}