Unbiased Deterministic Total Ordering of Parallel Simulations with Simultaneous Events

Neil McGlohon, Christopher D. CarothersarXiv 2021 · arXiv

Introduction

Discrete Event Simulation (DES) is a critical tool for modeling complex systems where state changes occur at discrete points in virtual time. For these simulations to be scientifically valid, they must be deterministic: identical inputs and models must yield identical results. However, achieving determinism in Parallel Discrete Event Simulations (PDES) is challenging, particularly when multiple events are scheduled for the exact same virtual time.

The Challenge of Event Simultaneity and Bias

In PDES, two primary issues arise when events coincide in virtual time:

  1. Ordering Bias: Traditional tie-breaking rules often rely on hardware-specific attributes, such as Processor or Logical Process (LP) IDs. This introduces a hidden bias where the simulation outcome depends on the hardware configuration (e.g., the number of ranks used) rather than the model logic.
  2. Causality Violations in Zero-Offset Events: Some events trigger "zero-offset" child events at the current virtual time. In optimistic parallel protocols like Time Warp, improper handling of these simultaneous events can lead to "causality violations," resulting in infinite rollback loops and simulation stalls.

Proposed Methodology: Lexicographical Random Tie-Breaking

To address these issues, the authors implemented a robust solution within the ROSS (Rensselaer Optimistic Simulation System) engine. The approach rests on three pillars:

Unbiased Random Tie-breaking

Instead of hardware IDs, each event is assigned a random tie-breaking value from a rollback-safe Pseudo-Random Number Generator (PRNG). This ensures that ties are broken fairly and deterministically across any number of processors.

Random tie-breaking values assigned to events across Logical Processes (LPs).

Lexicographical Virtual Time Signatures

To handle zero-offset events, the system treats timestamps as a sequence rather than a single scalar. This uses lexicographical ordering—similar to how words are ordered in a dictionary. A parent event's signature serves as a prefix to its child's signature, ensuring the parent always precedes the child (the "Aardvark" analogy: "A" always comes before "aardvark").

Lexicographical ordering of events to maintain causality and resolve ties.

Rollback-Safe PRNGs

In optimistic simulations, processors may need to "undo" work. The system ensures that PRNG states are restored during rollbacks, maintaining the deterministic sequence of tie-breakers regardless of the execution path.

Experimental Validation

The authors evaluated the approach using three models: PHOLD (a standard performance benchmark), and two custom models (Event-Ties and Event-Ties-Stress) designed to be hyper-sensitive to event ordering.

In the Event-Ties model, which uses non-commutative "mean of means" operations, traditional tie-breaking produced inconsistent results as the simulation scaled (e.g., 35.08 on 1 rank vs. 34.40 on 128 ranks). With the new lexicographical mechanism, the results remained identical (34.7264) across all configurations. Furthermore, the overhead in standard benchmarks like PHOLD was found to be negligible.

Conclusion

By extending virtual time into a lexicographical sequence of random tie-breaking values, this method eliminates hardware-induced bias and prevents the performance-degrading stalls associated with simultaneous events. This advancement ensures that PDES results are both deterministic and scientifically reliable, regardless of the underlying parallel architecture.

Summary updated

Abstract

In the area of discrete event simulation (DES), event simultaneity occurs when any two events are scheduled to happen at the same point in simulated time. Simulation determinism is the expectation that the same semantically configured simulation will be guaranteed to repeatedly reproduce identical results. Since events in DES are the sole mechanism for state change, ensuring consistent real-time event processing order is crucial to maintaining determinism. This is synonymous with finding a consistent total ordering of events. In this work, we extend the concept of virtual time to utilize an arbitrary-length series of tie-breaking values to preserve determinism in parallel, optimistically executed simulations without imposing additional bias influencing the ordering of otherwise incomparable events. Furthermore, by changing the core pseudo-random number generator seed at initialization, different orderings of events incomparable by standard virtual time can be observed, allowing for fair probing of other potential simulation outcomes. We implement and evaluate this extended definition of virtual time in the Rensselaer Optimistic Simulation System (ROSS) with three simulation models and discuss the importance of deterministic event ordering given the existence of event ties.
BibTeX
@misc{mcglohon2021unbiased,
  author = {Neil McGlohon and Christopher D. Carothers},
  title = {{Unbiased Deterministic Total Ordering of Parallel Simulations with Simultaneous Events}},
  year = {2021},
  eprint = {2105.00069},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2105.00069},
}
Figure