Copy neighbour lists only when reneighbouring happens, added measurements + logbook update

This commit is contained in:
Maximilian Gaul 2022-01-01 12:56:42 +01:00
parent 8fa03733e9
commit 72e4599acc
2 changed files with 4 additions and 3 deletions

View File

@ -179,8 +179,10 @@ double computeForce(
checkCUDAError( "c_atom.x memcpy", cudaMemcpy(c_atom.x, atom->x, sizeof(MD_FLOAT) * atom->Nmax * 3, cudaMemcpyHostToDevice) );
if(reneighbourHappenend) {
checkCUDAError( "c_neigh_numneigh memcpy", cudaMemcpy(c_neigh_numneigh, neighbor->numneigh, sizeof(int) * Nlocal, cudaMemcpyHostToDevice) );
checkCUDAError( "c_neighs memcpy", cudaMemcpy(c_neighs, neighbor->neighbors, sizeof(int) * Nlocal * neighbor->maxneighs, cudaMemcpyHostToDevice) );
}
const int num_threads_per_block = num_threads; // this should be multiple of 32 as operations are performed at the level of warps
const int num_blocks = ceil((float)Nlocal / (float)num_threads_per_block);

View File

@ -279,7 +279,6 @@ int main(int argc, char** argv)
initialIntegrate(&param, &atom);
const bool doReneighbour = (n + 1) % param.every == 0;
const bool doesReneighbourNextRound = (n + 2) % param.every == 0;
if(doReneighbour) {
timer[NEIGH] += reneighbour(&param, &atom, &neighbor);