alternate fix for tag caching issue in INTEL package

This commit is contained in:
Axel Kohlmeyer
2022-01-25 07:39:37 -05:00
parent f9a2006d73
commit 35dbabd471
3 changed files with 4 additions and 4 deletions

View File

@ -447,7 +447,7 @@ void FixIntel::pair_init_check(const bool cdmessage)
#endif
int need_tag = 0;
if (atom->molecular != Atom::ATOMIC) need_tag = 1;
if (atom->molecular != Atom::ATOMIC || three_body_neighbor()) need_tag = 1;
// Clear buffers used for pair style
char kmode[80];

View File

@ -207,8 +207,6 @@ void IntelBuffers<flt_t, acc_t>::free_nmax()
template <class flt_t, class acc_t>
void IntelBuffers<flt_t, acc_t>::_grow_nmax(const int offload_end)
{
if (lmp->atom->molecular) _need_tag = 1;
else _need_tag = 0;
#ifdef _LMP_INTEL_OFFLOAD
free_nmax();
int size = lmp->atom->nmax;

View File

@ -309,6 +309,7 @@ void NPairIntel::bin_newton(const int offload, NeighList *list,
flt_t * _noalias const tz = ncachez + toffs;
int * _noalias const tj = ncachej + toffs;
int * _noalias const tjtype = ncachejtype + toffs;
tagint * _noalias const ttag = ncachetag + toffs;
flt_t * _noalias itx;
flt_t * _noalias ity;
@ -365,6 +366,7 @@ void NPairIntel::bin_newton(const int offload, NeighList *list,
ty[u] = x[j].y;
tz[u] = x[j].z;
tjtype[u] = x[j].w;
if (THREE) ttag[u] = tag[j];
}
if (FULL == 0 && TRI != 1) {
@ -512,7 +514,7 @@ void NPairIntel::bin_newton(const int offload, NeighList *list,
}
if (THREE) {
const tagint jtag = tag[j];
const tagint jtag = ttag[u];
int flist = 0;
if (itag > jtag) {
if (((itag+jtag) & 1) == 0) flist = 1;