forked from lijiext/lammps
fix bug where per atom data for USER-OMP was reducing the wrong arrays with hybrid styles
This commit is contained in:
parent
caea8973a3
commit
8b7bd9d88e
|
@ -170,9 +170,8 @@ void ThrOMP::reduce_thr(void *style, const int eflag, const int vflag,
|
||||||
switch (thr_style) {
|
switch (thr_style) {
|
||||||
|
|
||||||
case THR_PAIR: {
|
case THR_PAIR: {
|
||||||
Pair * const pair = lmp->force->pair;
|
|
||||||
|
|
||||||
if (pair->vflag_fdotr) {
|
if (lmp->force->pair->vflag_fdotr) {
|
||||||
|
|
||||||
// this is a non-hybrid pair style. compute per thread fdotr
|
// this is a non-hybrid pair style. compute per thread fdotr
|
||||||
if (fix->last_pair_hybrid == NULL) {
|
if (fix->last_pair_hybrid == NULL) {
|
||||||
|
@ -192,6 +191,8 @@ void ThrOMP::reduce_thr(void *style, const int eflag, const int vflag,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (evflag) {
|
if (evflag) {
|
||||||
|
Pair * const pair = (Pair *)style;
|
||||||
|
|
||||||
#if defined(_OPENMP)
|
#if defined(_OPENMP)
|
||||||
#pragma omp critical
|
#pragma omp critical
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue