diff --git a/lib/gpu/lal_neighbor.cpp b/lib/gpu/lal_neighbor.cpp index 04e08c3e9c..d264a933a1 100644 --- a/lib/gpu/lal_neighbor.cpp +++ b/lib/gpu/lal_neighbor.cpp @@ -281,7 +281,7 @@ void Neighbor::get_host(const int inum, int *ilist, int *numj, } UCL_D_Vec acc_view; acc_view.view_offset(inum,dev_nbor,inum*2); - ucl_copy(acc_view,host_acc,true); + ucl_copy(acc_view,host_acc,inum*2,true); UCL_H_Vec host_view; host_view.alloc(_max_atoms,*dev,UCL_READ_WRITE); @@ -364,7 +364,7 @@ void Neighbor::get_host3(const int inum, const int nlist, int *ilist, int *numj, } UCL_D_Vec acc_view; acc_view.view_offset(inum,dev_nbor,inum*2); - ucl_copy(acc_view,host_acc,true); + ucl_copy(acc_view,host_acc,inum*2,true); time_nbor.stop(); if (_use_packing==false) { diff --git a/lib/gpu/lal_neighbor.h b/lib/gpu/lal_neighbor.h index 05168834c6..01f7b02798 100644 --- a/lib/gpu/lal_neighbor.h +++ b/lib/gpu/lal_neighbor.h @@ -110,7 +110,7 @@ class Neighbor { } if (_time_device) { time_nbor.add_to_total(); - time_kernel.add_to_total(); + if (_use_packing==false) time_kernel.add_to_total(); if (_gpu_nbor==2) { time_hybrid1.add_to_total(); time_hybrid2.add_to_total();