diff --git a/lib/gpu/lal_neighbor.cpp b/lib/gpu/lal_neighbor.cpp index 04e08c3e9c25d07b7a637b100b1d9ed4c3c3a01a..d264a933a1f160934c0a9f367bd32343e9902680 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<int> 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<int> 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<int> 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 05168834c6034a3cc336ef429242d441a63c9945..01f7b027981a3a18036b6eb072f60d9c23de33d4 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();