diff --git a/lib/gpu/lal_neighbor.cpp b/lib/gpu/lal_neighbor.cpp index 288415e0e7..aca9b1d141 100644 --- a/lib/gpu/lal_neighbor.cpp +++ b/lib/gpu/lal_neighbor.cpp @@ -365,7 +365,9 @@ void Neighbor::get_host(const int inum, int *ilist, int *numj, int i=ilist[ii]; three_ilist[i] = ii; } - three_ilist.update_device(inum,true); + // needs to transfer _max_atoms because three_ilist indexes all the atoms (local and ghost) + // not just inum (number of neighbor list items) + three_ilist.update_device(_max_atoms,true); } time_nbor.stop();