forked from lijiext/lammps
Updating timings tests in pppm_old.cpp/h to match those in pppm.cpp/h
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8775 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
30489de0ef
commit
25b5a253cb
|
@ -2484,11 +2484,39 @@ void PPPMOld::slabcorr()
|
|||
for (int i = 0; i < nlocal; i++) f[i][2] += qscale * q[i]*ffact;
|
||||
}
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
perform and time the 4 FFTs required for N timesteps
|
||||
perform and time the 1d FFTs required for N timesteps
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
int PPPMOld::timing(int n, double &time3d, double &time1d)
|
||||
int PPPMOld::timing_1d(int n, double &time1d)
|
||||
{
|
||||
double time1,time2;
|
||||
|
||||
for (int i = 0; i < 2*nfft_both; i++) work1[i] = ZEROF;
|
||||
|
||||
MPI_Barrier(world);
|
||||
time1 = MPI_Wtime();
|
||||
|
||||
for (int i = 0; i < n; i++) {
|
||||
fft1->timing1d(work1,nfft_both,1);
|
||||
fft2->timing1d(work1,nfft_both,-1);
|
||||
fft2->timing1d(work1,nfft_both,-1);
|
||||
fft2->timing1d(work1,nfft_both,-1);
|
||||
}
|
||||
|
||||
MPI_Barrier(world);
|
||||
time2 = MPI_Wtime();
|
||||
time1d = time2 - time1;
|
||||
|
||||
return 4;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
perform and time the 3d FFTs required for N timesteps
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
int PPPMOld::timing_3d(int n, double &time3d)
|
||||
{
|
||||
double time1,time2;
|
||||
|
||||
|
@ -2508,20 +2536,6 @@ int PPPMOld::timing(int n, double &time3d, double &time1d)
|
|||
time2 = MPI_Wtime();
|
||||
time3d = time2 - time1;
|
||||
|
||||
MPI_Barrier(world);
|
||||
time1 = MPI_Wtime();
|
||||
|
||||
for (int i = 0; i < n; i++) {
|
||||
fft1->timing1d(work1,nfft_both,1);
|
||||
fft2->timing1d(work1,nfft_both,-1);
|
||||
fft2->timing1d(work1,nfft_both,-1);
|
||||
fft2->timing1d(work1,nfft_both,-1);
|
||||
}
|
||||
|
||||
MPI_Barrier(world);
|
||||
time2 = MPI_Wtime();
|
||||
time1d = time2 - time1;
|
||||
|
||||
return 4;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,8 @@ class PPPMOld : public KSpace {
|
|||
virtual void init();
|
||||
virtual void setup();
|
||||
virtual void compute(int, int);
|
||||
virtual int timing(int, double &, double &);
|
||||
virtual int timing_1d(int, double &);
|
||||
virtual int timing_3d(int, double &);
|
||||
virtual double memory_usage();
|
||||
|
||||
virtual void compute_group_group(int, int, int);
|
||||
|
|
Loading…
Reference in New Issue