espresso icon indicating copy to clipboard operation
espresso copied to clipboard

DPD constraint leads to inconsistent RNG counters across MPI ranks

Open RudolfWeeber opened this issue 11 months ago • 0 comments

When using a DPd interaction with a shape-based constraint, the RNG counter is incremented every time a particle is considered with the constraint. Depending on the location of the constraint, this does not happen equally on all MPI ranks leading to different RNG counters on different MPI ranks. While this does not lead to wrong physics (as the statistics of the noise is still correct), it is confusing that the actual numbers depend on MPI decomposition.

A possible solution would be:

  • use a different salt for the dpd noise in constraints (as opposed to pairs of particles)
  • force the user to assign a "particle id" to a constraint
  • use the dpd constraint salt, the constraint "particle id" and the id of the interacting particle to generate the noise based on the global dpd counter which is inremented once per time step on all MPI ranks

RudolfWeeber avatar May 14 '25 13:05 RudolfWeeber