From 5df544637f2e498aa3c60b7b7bc7e4ce8481de40 Mon Sep 17 00:00:00 2001 From: Rafael Ravedutti Date: Thu, 17 Mar 2022 02:53:58 +0100 Subject: [PATCH] Fix force calculation time in LAMMPS variant Signed-off-by: Rafael Ravedutti --- data/argon_1000/mdbench_params.conf | 1 + lammps/main.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/data/argon_1000/mdbench_params.conf b/data/argon_1000/mdbench_params.conf index 836e678..474b886 100644 --- a/data/argon_1000/mdbench_params.conf +++ b/data/argon_1000/mdbench_params.conf @@ -9,3 +9,4 @@ v_out_freq 5 cutforce 0.9 reneigh_every 100 nstat 125000 +half_neigh 0 diff --git a/lammps/main.c b/lammps/main.c index 9c7f188..8bda40f 100644 --- a/lammps/main.c +++ b/lammps/main.c @@ -258,9 +258,9 @@ int main(int argc, char** argv) { timer[FORCE] += computeForceEam(&eam, ¶m, &atom, &neighbor, &stats); } else { if(param.half_neigh) { - timer[FORCE] = computeForceLJHalfNeigh(¶m, &atom, &neighbor, &stats); + timer[FORCE] += computeForceLJHalfNeigh(¶m, &atom, &neighbor, &stats); } else { - timer[FORCE] = computeForceLJFullNeigh(¶m, &atom, &neighbor, &stats); + timer[FORCE] += computeForceLJFullNeigh(¶m, &atom, &neighbor, &stats); } }