Added timing breakdown for fphi_uind
This commit is contained in:
@ -592,33 +592,6 @@ int HippoT::umutual2b(const int eflag, const int vflag) {
|
|||||||
return GX;
|
return GX;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// Interpolate the potential from the PME grid
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
template <class numtyp, class acctyp>
|
|
||||||
int HippoT::fphi_uind() {
|
|
||||||
int ainum=this->ans->inum();
|
|
||||||
if (ainum == 0)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
int _nall=this->atom->nall();
|
|
||||||
int nbor_pitch=this->nbor->nbor_pitch();
|
|
||||||
|
|
||||||
// Compute the block size and grid size to keep all cores busy
|
|
||||||
const int BX=this->block_size();
|
|
||||||
int GX=static_cast<int>(ceil(static_cast<double>(this->ans->inum())/
|
|
||||||
(BX/this->_threads_per_atom)));
|
|
||||||
/*
|
|
||||||
this->time_pair.start();
|
|
||||||
|
|
||||||
this->k_fphi_uind.set_size(GX,BX);
|
|
||||||
this->k_fphi_uind.run();
|
|
||||||
this->time_pair.stop();
|
|
||||||
*/
|
|
||||||
|
|
||||||
return GX;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Reneighbor on GPU if necessary, and then compute polar real-space
|
// Reneighbor on GPU if necessary, and then compute polar real-space
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|||||||
@ -157,7 +157,6 @@ class Hippo : public BaseAmoeba<numtyp, acctyp> {
|
|||||||
int multipole_real(const int eflag, const int vflag);
|
int multipole_real(const int eflag, const int vflag);
|
||||||
int udirect2b(const int eflag, const int vflag);
|
int udirect2b(const int eflag, const int vflag);
|
||||||
int umutual2b(const int eflag, const int vflag);
|
int umutual2b(const int eflag, const int vflag);
|
||||||
int fphi_uind();
|
|
||||||
int polar_real(const int eflag, const int vflag);
|
int polar_real(const int eflag, const int vflag);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@ -348,6 +348,7 @@ void PairAmoeba::compute(int eflag, int vflag)
|
|||||||
time_mutual_rspace = time_mutual_kspace = 0.0;
|
time_mutual_rspace = time_mutual_kspace = 0.0;
|
||||||
time_polar_rspace = time_polar_kspace = 0.0;
|
time_polar_rspace = time_polar_kspace = 0.0;
|
||||||
|
|
||||||
|
time_fphi_uind = 0.0;
|
||||||
if (ic_kspace) {
|
if (ic_kspace) {
|
||||||
ic_kspace->time_fft = 0.0;
|
ic_kspace->time_fft = 0.0;
|
||||||
}
|
}
|
||||||
@ -546,6 +547,9 @@ void PairAmoeba::finish()
|
|||||||
MPI_Allreduce(&time_polar_kspace,&ave,1,MPI_DOUBLE,MPI_SUM,world);
|
MPI_Allreduce(&time_polar_kspace,&ave,1,MPI_DOUBLE,MPI_SUM,world);
|
||||||
time_polar_kspace = ave/comm->nprocs;
|
time_polar_kspace = ave/comm->nprocs;
|
||||||
|
|
||||||
|
MPI_Allreduce(&time_fphi_uind,&ave,1,MPI_DOUBLE,MPI_SUM,world);
|
||||||
|
time_fphi_uind = ave/comm->nprocs;
|
||||||
|
|
||||||
double time_mutual_fft = ic_kspace->time_fft;
|
double time_mutual_fft = ic_kspace->time_fft;
|
||||||
MPI_Allreduce(&time_mutual_fft,&ave,1,MPI_DOUBLE,MPI_SUM,world);
|
MPI_Allreduce(&time_mutual_fft,&ave,1,MPI_DOUBLE,MPI_SUM,world);
|
||||||
time_mutual_fft = ave/comm->nprocs;
|
time_mutual_fft = ave/comm->nprocs;
|
||||||
@ -578,7 +582,8 @@ void PairAmoeba::finish()
|
|||||||
utils::logmesg(lmp," Mpole time: {:.6g} {:.3g}%\n", time_mpole_kspace, time_mpole_kspace/time_total);
|
utils::logmesg(lmp," Mpole time: {:.6g} {:.3g}%\n", time_mpole_kspace, time_mpole_kspace/time_total);
|
||||||
utils::logmesg(lmp," Direct time: {:.6g} {:.3g}%\n", time_direct_kspace, time_direct_kspace/time_total);
|
utils::logmesg(lmp," Direct time: {:.6g} {:.3g}%\n", time_direct_kspace, time_direct_kspace/time_total);
|
||||||
utils::logmesg(lmp," Mutual time: {:.6g} {:.3g}%\n", time_mutual_kspace, time_mutual_kspace/time_total);
|
utils::logmesg(lmp," Mutual time: {:.6g} {:.3g}%\n", time_mutual_kspace, time_mutual_kspace/time_total);
|
||||||
utils::logmesg(lmp," - FFT time: {:.6g} {:.3g}%\n", time_mutual_fft, time_mutual_fft/time_total);
|
utils::logmesg(lmp," - FFT : {:.6g} {:.3g}%\n", time_mutual_fft, time_mutual_fft/time_total);
|
||||||
|
utils::logmesg(lmp," - Interp : {:.6g} {:.3g}%\n", time_fphi_uind, time_fphi_uind/time_total);
|
||||||
utils::logmesg(lmp," Polar time: {:.6g} {:.3g}%\n", time_polar_kspace, time_polar_kspace/time_total);
|
utils::logmesg(lmp," Polar time: {:.6g} {:.3g}%\n", time_polar_kspace, time_polar_kspace/time_total);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -92,6 +92,7 @@ class PairAmoeba : public Pair {
|
|||||||
double time_direct_rspace,time_direct_kspace;
|
double time_direct_rspace,time_direct_kspace;
|
||||||
double time_mutual_rspace,time_mutual_kspace;
|
double time_mutual_rspace,time_mutual_kspace;
|
||||||
double time_polar_rspace,time_polar_kspace;
|
double time_polar_rspace,time_polar_kspace;
|
||||||
|
double time_fphi_uind;
|
||||||
|
|
||||||
// energy/virial components
|
// energy/virial components
|
||||||
|
|
||||||
|
|||||||
@ -1058,9 +1058,16 @@ void PairAmoebaGPU::umutual1(double **field, double **fieldp)
|
|||||||
double ****gridpost = (double ****) ic_kspace->post_convolution();
|
double ****gridpost = (double ****) ic_kspace->post_convolution();
|
||||||
|
|
||||||
// get potential
|
// get potential
|
||||||
|
double time0, time1;
|
||||||
|
|
||||||
|
MPI_Barrier(world);
|
||||||
|
time0 = MPI_Wtime();
|
||||||
|
|
||||||
fphi_uind(gridpost,fdip_phi1,fdip_phi2,fdip_sum_phi);
|
fphi_uind(gridpost,fdip_phi1,fdip_phi2,fdip_sum_phi);
|
||||||
|
|
||||||
|
time1 = MPI_Wtime();
|
||||||
|
time_fphi_uind += (time1 - time0);
|
||||||
|
|
||||||
// store fractional reciprocal potentials for OPT method
|
// store fractional reciprocal potentials for OPT method
|
||||||
|
|
||||||
if (poltyp == OPT) {
|
if (poltyp == OPT) {
|
||||||
|
|||||||
Reference in New Issue
Block a user