From 35dbabd4716765aa8886d01c7384a24a1393e3e9 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 25 Jan 2022 07:39:37 -0500 Subject: [PATCH] alternate fix for tag caching issue in INTEL package --- src/INTEL/fix_intel.cpp | 2 +- src/INTEL/intel_buffers.cpp | 2 -- src/INTEL/npair_intel.cpp | 4 +++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/INTEL/fix_intel.cpp b/src/INTEL/fix_intel.cpp index 6a848a366e..a201386724 100644 --- a/src/INTEL/fix_intel.cpp +++ b/src/INTEL/fix_intel.cpp @@ -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]; diff --git a/src/INTEL/intel_buffers.cpp b/src/INTEL/intel_buffers.cpp index 3470c18db8..cbbc609fc0 100644 --- a/src/INTEL/intel_buffers.cpp +++ b/src/INTEL/intel_buffers.cpp @@ -207,8 +207,6 @@ void IntelBuffers::free_nmax() template void IntelBuffers::_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; diff --git a/src/INTEL/npair_intel.cpp b/src/INTEL/npair_intel.cpp index 67cd2517e4..2fffb2353a 100644 --- a/src/INTEL/npair_intel.cpp +++ b/src/INTEL/npair_intel.cpp @@ -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;