From aca0eefff15d132ddc49467a4502bdd125067b8b Mon Sep 17 00:00:00 2001 From: "W. Michael Brown" Date: Wed, 15 Dec 2010 16:49:37 -0500 Subject: [PATCH] More efficient memory usage when particle split>0 and < 1. --- lib/gpu/pair_gpu_device.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/gpu/pair_gpu_device.cpp b/lib/gpu/pair_gpu_device.cpp index 482e8a400d..af8c433d17 100644 --- a/lib/gpu/pair_gpu_device.cpp +++ b/lib/gpu/pair_gpu_device.cpp @@ -120,10 +120,13 @@ bool PairGPUDeviceT::init(const bool charge, const bool rot, const int nlocal, return false; if (_init_count==0) { // Initialize atom and nbor data - if (!atom.init(nlocal,nall,charge,rot,*gpu,gpu_nbor, + int ef_nlocal=nlocal; + if (_particle_split<1.0 && _particle_split>0.0) + ef_nlocal=static_cast(_particle_split*nlocal); + if (!atom.init(ef_nlocal,nall,charge,rot,*gpu,gpu_nbor, gpu_nbor && maxspecial>0)) return false; - if (!nbor.init(nlocal,host_nlocal,max_nbors,maxspecial,*gpu,gpu_nbor, + if (!nbor.init(ef_nlocal,host_nlocal,max_nbors,maxspecial,*gpu,gpu_nbor, gpu_host,pre_cut)) return false; nbor.cell_size(cell_size);