- // flag to specify if CPU force output is preset in force
- // buffer. For now, this is true even when useGpuPme == true
- // (because on-GPU PME-nonbonded reduction will be added in
- // follow-up)
- // TODO adapt the below when on-GPU PME-nonbonded reduction is available.
- bool useCpuPmeReduction = true;
- bool haveCpuForces = (ppForceWorkload->haveSpecialForces || ppForceWorkload->haveCpuListedForceWork || useCpuPmeReduction);
- // flag to specify if forces should be accumulated in force buffer
- // ops. For now, this is solely determined by above haveCpuForces
- // flag, but in future developments it will also depend on
- // e.g. whether the GPU force halo exchange is active.
- GpuBufferOpsAccumulateForce accumulateForce = (useGpuFBufOps == BufferOpsUseGpu::True) &&
- haveCpuForces ? GpuBufferOpsAccumulateForce::True :
- GpuBufferOpsAccumulateForce::False;
+ bool useCpuFPmeReduction = thisRankHasDuty(cr, DUTY_PME) && !useGpuFPmeReduction;
+ bool haveCpuForces = (ppForceWorkload->haveSpecialForces || ppForceWorkload->haveCpuListedForceWork || useCpuFPmeReduction);