Fix hang with Kokkos and USER-DPD examples

This commit is contained in:
Stan Moore 2018-10-11 16:32:00 -06:00
parent 8eb74d8fb3
commit a223338b47
6 changed files with 19 additions and 3 deletions

View File

@ -37,7 +37,7 @@ AtomVecDPDKokkos::AtomVecDPDKokkos(LAMMPS *lmp) : AtomVecKokkos(lmp)
size_forward = 7;
size_reverse = 3;
size_border = 12;
size_velocity = 3;
size_velocity = 10;
size_data_atom = 6;
size_data_vel = 4;
xcol_data = 4;
@ -48,6 +48,8 @@ AtomVecDPDKokkos::AtomVecDPDKokkos(LAMMPS *lmp) : AtomVecKokkos(lmp)
k_count = DAT::tdual_int_1d("atom::k_count",1);
atomKK = (AtomKokkos *) atom;
commKK = (CommKokkos *) comm;
no_comm_vel_flag = 1;
}
/* ----------------------------------------------------------------------

View File

@ -26,7 +26,10 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
AtomVecHybridKokkos::AtomVecHybridKokkos(LAMMPS *lmp) : AtomVecKokkos(lmp) {}
AtomVecHybridKokkos::AtomVecHybridKokkos(LAMMPS *lmp) : AtomVecKokkos(lmp) {
no_comm_vel_flag = 1;
no_border_vel_flag = 1;
}
/* ---------------------------------------------------------------------- */

View File

@ -26,6 +26,9 @@ AtomVecKokkos::AtomVecKokkos(LAMMPS *lmp) : AtomVec(lmp)
kokkosable = 1;
buffer = NULL;
buffer_size = 0;
no_comm_vel_flag = 0;
no_border_vel_flag = 1;
}
/* ---------------------------------------------------------------------- */

View File

@ -113,6 +113,8 @@ class AtomVecKokkos : public AtomVec {
ExecutionSpace space) = 0;
int no_comm_vel_flag,no_border_vel_flag;
protected:
HAT::t_x_array h_x;

View File

@ -57,6 +57,8 @@ AtomVecSphereKokkos::AtomVecSphereKokkos(LAMMPS *lmp) : AtomVecKokkos(lmp)
k_count = DAT::tdual_int_1d("atom::k_count",1);
atomKK = (AtomKokkos *) atom;
commKK = (CommKokkos *) comm;
no_border_vel_flag = 0;
}
/* ---------------------------------------------------------------------- */

View File

@ -136,6 +136,9 @@ void CommKokkos::init()
if (!comm_f_only) // not all Kokkos atom_vec styles have reverse pack/unpack routines yet
reverse_comm_classic = true;
if (ghost_velocity && ((AtomVecKokkos*)atom->avec)->no_comm_vel_flag) // not all Kokkos atom_vec styles have comm vel pack/unpack routines yet
forward_comm_classic = true;
}
/* ----------------------------------------------------------------------
@ -725,7 +728,8 @@ void CommKokkos::borders()
if (!exchange_comm_classic) {
static int print = 1;
if (mode != Comm::SINGLE || bordergroup) {
if (mode != Comm::SINGLE || bordergroup ||
(ghost_velocity && ((AtomVecKokkos*)atom->avec)->no_border_vel_flag)) {
if (print && comm->me==0) {
error->warning(FLERR,"Required border comm not yet implemented in Kokkos communication, "
"switching to classic communication");