next up previous contents
Next: Models with Many Input/Output Up: A Discrete EVent system Previous: The Simulator Class   Contents

Simulation on multi-core computers

The conservative simulator from prior versions of adevs has been replaced with a much simpler (and, I hope, more useful) parallel simulator that executes simultaneous state transitions in parallel. This simulation options is enabled by default when you compile with OpenMP enabled. For your model to work correctly, it is required that the state transition functions of your atomic models be threadsafe. The number of threads to use in a simulation run can be controlled with the environment variable OMP_NUM_THREADS. For large models executed with a small number of threads you may see some speedup relative to a single threaded execution. However, this modest speedup comes at no additional development effort on your part 8-).

jim 2018-01-10