Fixed an correctness issue by conservatively copying over data from and to the GPU

This commit is contained in:
Martin Bauernfeind 2022-07-05 00:33:12 +02:00
parent fa86e44f90
commit 4f0403d3ea

View File

@ -131,6 +131,7 @@ void updatePbc_cuda(Atom *atom, Parameter *param, Atom *c_atom, bool doReneighbo
* MD_FLOAT xprd, MD_FLOAT yprd, MD_FLOAT zprd)
* */
computePbcUpdate<<<num_blocks, num_threads_per_block>>>(*c_atom, c_PBCx, c_PBCy, c_PBCz, xprd, yprd, zprd);
checkCUDAError( "updatePbc atom->x memcpy back", cudaMemcpy(atom->x, c_atom->x, atom->Nmax * sizeof(MD_FLOAT) * 3, cudaMemcpyDeviceToHost) );
}
/* relocate atoms that have left domain according