diff --git a/src/pbc.cu b/src/pbc.cu index 2ded42f..ff60634 100644 --- a/src/pbc.cu +++ b/src/pbc.cu @@ -125,7 +125,7 @@ void updatePbc_cuda(Atom *atom, Parameter *param, Atom *c_atom, bool doReneighbo MD_FLOAT yprd = param->yprd; MD_FLOAT zprd = param->zprd; - const int num_blocks = ceil((float)atom->Nlocal / (float)num_threads_per_block); + const int num_blocks = ceil((float)atom->Nghost / (float)num_threads_per_block); /*__global__ void computePbcUpdate(Atom a, int* PBCx, int* PBCy, int* PBCz, * MD_FLOAT xprd, MD_FLOAT yprd, MD_FLOAT zprd) @@ -241,4 +241,4 @@ void growPbc(Atom *atom) { PBCy = (int *) reallocate(PBCy, ALIGNMENT, NmaxGhost * sizeof(int), nold * sizeof(int)); PBCz = (int *) reallocate(PBCz, ALIGNMENT, NmaxGhost * sizeof(int), nold * sizeof(int)); } -} \ No newline at end of file +}