Fixed bugs with zero local atoms (similar to what has been done to PPPM interp)
This commit is contained in:
@ -128,14 +128,18 @@ double AmoebaT::host_memory_usage() const {
|
||||
// ---------------------------------------------------------------------------
|
||||
template <class numtyp, class acctyp>
|
||||
int AmoebaT::udirect2b(const int eflag, const int vflag) {
|
||||
int ainum=this->ans->inum();
|
||||
if (ainum == 0)
|
||||
return 0;
|
||||
|
||||
int _nall=this->atom->nall();
|
||||
int nbor_pitch=this->nbor->nbor_pitch();
|
||||
int ainum=this->ans->inum();
|
||||
|
||||
// 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();
|
||||
|
||||
// Build the short neighbor list if not done yet
|
||||
if (!this->short_nbor_avail) {
|
||||
@ -164,14 +168,17 @@ int AmoebaT::udirect2b(const int eflag, const int vflag) {
|
||||
// ---------------------------------------------------------------------------
|
||||
template <class numtyp, class acctyp>
|
||||
int AmoebaT::umutual2b(const int eflag, const int vflag) {
|
||||
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)));
|
||||
|
||||
int _nall=this->atom->nall();
|
||||
int ainum=this->ans->inum();
|
||||
int nbor_pitch=this->nbor->nbor_pitch();
|
||||
this->time_pair.start();
|
||||
|
||||
// Build the short neighbor list if not done yet
|
||||
@ -200,14 +207,17 @@ int AmoebaT::umutual2b(const int eflag, const int vflag) {
|
||||
// ---------------------------------------------------------------------------
|
||||
template <class numtyp, class acctyp>
|
||||
int AmoebaT::polar_real(const int eflag, const int vflag) {
|
||||
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)));
|
||||
|
||||
int _nall=this->atom->nall();
|
||||
int ainum=this->ans->inum();
|
||||
int nbor_pitch=this->nbor->nbor_pitch();
|
||||
this->time_pair.start();
|
||||
|
||||
// Build the short neighbor list if not done yet
|
||||
|
||||
@ -342,13 +342,15 @@ void PPPMT::interp(const grdtyp qqrd2e_scale) {
|
||||
vd_brick.update_device(true);
|
||||
time_in.stop();
|
||||
|
||||
int ainum=this->ans->inum();
|
||||
if (ainum==0)
|
||||
return;
|
||||
|
||||
time_interp.start();
|
||||
// Compute the block size and grid size to keep all cores busy
|
||||
int BX=this->block_size();
|
||||
int GX=static_cast<int>(ceil(static_cast<double>(this->ans->inum())/BX));
|
||||
|
||||
int ainum=this->ans->inum();
|
||||
|
||||
k_interp.set_size(GX,BX);
|
||||
k_interp.run(&atom->x, &atom->q, &ainum, &vd_brick, &d_rho_coeff,
|
||||
&_npts_x, &_npts_yx, &_brick_x, &_brick_y, &_brick_z, &_delxinv,
|
||||
|
||||
Reference in New Issue
Block a user