[Bug] finish.cpp doesn't work with pppm/tip4p style

Hello!

After recent updates in KSPACE library, multiple runs doesn’t work with pppm/tip4p style.
The problem is caused by this code from finish.cpp:

while (time3d < 1.0) {
nsample *= 5;
nfft = force->kspace->timing_3d(nsample,time3d);
}

time3d = nsteps * time3d / nsample;
MPI_Allreduce(&time3d,&tmp,1,MPI_DOUBLE,MPI_SUM,world);
time3d = tmp/nprocs;

double time1d;
nsample = 1;
nfft = force->kspace->timing_1d(nsample,time1d);
while (time1d < 1.0) {
nsample *= 5;
nfft = force->kspace->timing_1d(nsample,time1d);
}

timing_3d() and timing_1d() functions exist only in new pppm.cpp but not in pppm_old.cpp (parent of pppm_tip4p)
So we have two infinite while loops and LAMMPS hangs after first run or minimize command without any message.
The problem is partially solved by “run N post no”, however run after minimize is impossible (or may be I didn’t find “post no” analogue for minimize)

Regards,

Grigory

Paul can take a look at this - he made the change to finish.cpp for PPPM.

Steve

The timings tests in pppm_old need to be updated to match those in pppm (see attached). I've updated the repository accordingly. Please try this change and let me know if this or related problems persist.

Paul

pppm_old.cpp (85.6 KB)

pppm_old.h (4.59 KB)

Thanks! It solves the problem.

Regards,

Grigory

2012/9/13 Crozier, Paul S <[email protected]>