Adding redundant call to sync Intel package arrays with native arrays for methods such as MC that do not need pre_reverse.

This commit is contained in:
W. Michael Brown
2023-06-06 23:56:16 -07:00
parent 0978308f5e
commit bbfd909be6
4 changed files with 15 additions and 23 deletions

View File

@ -275,10 +275,8 @@ int FixIntel::setmask()
int mask = 0;
mask |= PRE_REVERSE;
mask |= MIN_PRE_REVERSE;
#ifdef _LMP_INTEL_OFFLOAD
mask |= POST_FORCE;
mask |= MIN_POST_FORCE;
#endif
mask |= POST_RUN;
return mask;
}
@ -597,6 +595,19 @@ void FixIntel::pre_reverse(int /*eflag*/, int /*vflag*/)
/* ---------------------------------------------------------------------- */
void FixIntel::post_force(int vflag)
{
// Redundant call to sync Intel data structs with native for methods that
// call force compute but do not call prereverse
_sync_main_arrays(1);
#ifdef LMP_INTEL_OFFLOAD
if (_sync_mode == 2) sync_coprocessor();
#endif
}
/* ---------------------------------------------------------------------- */
template <class acc_t>
void FixIntel::reduce_results(acc_t * _noalias const f_scalar)
{
@ -883,13 +894,6 @@ double FixIntel::memory_usage()
/* ---------------------------------------------------------------------- */
void FixIntel::post_force(int vflag)
{
if (_sync_mode == 2) sync_coprocessor();
}
/* ---------------------------------------------------------------------- */
template <class ft, class acc_t>
void FixIntel::add_off_results(const ft * _noalias const f_in,
const acc_t * _noalias const ev_global) {