Switched to the short neighbor list implementation in the pre-10Feb21 version (the recent version enforces tpa = 1 for short nbor)
This commit is contained in:
@ -141,14 +141,31 @@ int AmoebaT::polar_real(const int eflag, const int vflag) {
|
||||
int nbor_pitch=this->nbor->nbor_pitch();
|
||||
this->time_pair.start();
|
||||
|
||||
// Build the short neighbor list if needed
|
||||
if (!this->short_nbor_avail) {
|
||||
this->k_short_nbor.set_size(GX,BX);
|
||||
this->k_short_nbor.run(&this->atom->x, &this->nbor->dev_nbor,
|
||||
&this->_nbor_data->begin(),
|
||||
&this->dev_short_nbor, &_off2, &ainum,
|
||||
&nbor_pitch, &this->_threads_per_atom);
|
||||
this->short_nbor_avail = true;
|
||||
}
|
||||
|
||||
this->k_polar.set_size(GX,BX);
|
||||
this->k_polar.run(&this->atom->x, &this->atom->extra, &damping, &sp_polar,
|
||||
&this->nbor->dev_nbor, &this->_nbor_data->begin(),
|
||||
&this->dev_short_nbor,
|
||||
&this->ans->force, &this->ans->engv, &this->_tep,
|
||||
&eflag, &vflag, &ainum, &_nall, &nbor_pitch,
|
||||
&this->_threads_per_atom,
|
||||
&_aewald, &_felec, &_off2, &_polar_dscale, &_polar_uscale);
|
||||
this->time_pair.stop();
|
||||
|
||||
// Signal that short nbor list is not avail for the next time step
|
||||
// do it here because polar_real() is the last kernel in a time step at this point
|
||||
|
||||
this->short_nbor_avail = false;
|
||||
|
||||
return GX;
|
||||
}
|
||||
|
||||
@ -163,20 +180,22 @@ int AmoebaT::udirect2b(const int eflag, const int vflag) {
|
||||
|
||||
// Compute the block size and grid size to keep all cores busy
|
||||
const int BX=this->block_size();
|
||||
int GX;
|
||||
int GX=static_cast<int>(ceil(static_cast<double>(this->ans->inum())/(BX/this->_threads_per_atom)));
|
||||
|
||||
// Build the short neighbor list if needed
|
||||
if (!this->short_nbor_avail) {
|
||||
this->k_short_nbor.set_size(GX,BX);
|
||||
this->k_short_nbor.run(&this->atom->x, &this->nbor->dev_nbor,
|
||||
&this->_nbor_data->begin(),
|
||||
&this->dev_short_nbor, &_off2, &ainum,
|
||||
&nbor_pitch, &this->_threads_per_atom);
|
||||
this->short_nbor_avail = true;
|
||||
}
|
||||
|
||||
GX=static_cast<int>(ceil(static_cast<double>(ainum)/BX));
|
||||
this->k_short_nbor.set_size(GX,BX);
|
||||
// NOTE: this->nbor->dev_packed is not allocated!!
|
||||
/*
|
||||
this->k_short_nbor.run(&this->atom->x, &_off2,
|
||||
&this->nbor->dev_nbor, &this->nbor->dev_packed,
|
||||
&ainum, &nbor_pitch, &this->_threads_per_atom);
|
||||
*/
|
||||
GX=static_cast<int>(ceil(static_cast<double>(this->ans->inum())/(BX/this->_threads_per_atom)));
|
||||
this->k_udirect2b.set_size(GX,BX);
|
||||
this->k_udirect2b.run(&this->atom->x, &this->atom->extra, &damping, &sp_polar,
|
||||
&this->nbor->dev_nbor, &this->_nbor_data->begin(),
|
||||
&this->dev_short_nbor,
|
||||
&this->_fieldp, &ainum, &_nall, &nbor_pitch,
|
||||
&this->_threads_per_atom, &_aewald, &_off2,
|
||||
&_polar_dscale, &_polar_uscale);
|
||||
|
||||
Reference in New Issue
Block a user