diff --git a/src/finish.cpp b/src/finish.cpp index 76827a1a56..a5872ee62c 100644 --- a/src/finish.cpp +++ b/src/finish.cpp @@ -73,7 +73,8 @@ void Finish::end(int flag) if (update->whichflag == 1 && strcmp(update->integrate_style,"verlet/split") == 0 && universe->iworld == 1) neighflag = 0; - if (force->kspace && force->kspace_match("pppm",0)) fftflag = 1; + if (force->kspace && force->kspace_match("pppm",0) + && force->kspace->fftbench) fftflag = 1; } if (flag == 2) prdflag = histoflag = neighflag = 1; if (flag == 3) tadflag = histoflag = neighflag = 1; diff --git a/src/kspace.cpp b/src/kspace.cpp index 3af581eeaa..66c152e34f 100644 --- a/src/kspace.cpp +++ b/src/kspace.cpp @@ -41,6 +41,7 @@ KSpace::KSpace(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp) gewaldflag = 0; minorder = 2; overlap_allowed = 1; + fftbench = 1; order_6 = 5; gridflag_6 = 0; @@ -320,6 +321,12 @@ void KSpace::modify_params(int narg, char **arg) else if (strcmp(arg[iarg+1],"no") == 0) compute_flag = 0; else error->all(FLERR,"Illegal kspace_modify command"); iarg += 2; + } else if (strcmp(arg[iarg],"fftbench") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal kspace_modify command"); + if (strcmp(arg[iarg+1],"yes") == 0) fftbench = 1; + else if (strcmp(arg[iarg+1],"no") == 0) fftbench = 0; + else error->all(FLERR,"Illegal kspace_modify command"); + iarg += 2; } else if (strcmp(arg[iarg],"diff") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal kspace_modify command"); if (strcmp(arg[iarg+1],"ad") == 0) differentiation_flag = 1; diff --git a/src/kspace.h b/src/kspace.h index ef7d3ec711..97be5d8262 100644 --- a/src/kspace.h +++ b/src/kspace.h @@ -54,6 +54,7 @@ class KSpace : protected Pointers { unsigned int datamask_ext; int compute_flag; // 0 if skip compute() + int fftbench; // 0 if skip FFT timing KSpace(class LAMMPS *, int, char **); virtual ~KSpace();