On Jan 6, 2016, at 4:27 AM, Axel Kowald <[log in to unmask]> wrote:

> But the creation of the chunks only works properly if steps.length() is a multiple of n, otherwise a few elements of steps[] are never processed by the threads !

I think I know what's going on there, I had a dumb bug.  We'd not noticed it because all of our threads always divide nicely into the agents.  I have modified the code and posted a new version, but have tested it only a bit -- it seems to work, but perhaps you might bang on it a bit.

> There is also another strange thing. It seems that for all simulation steps the missed elements of steps[] are always the same. But how can this be? I thought agents with the same time and the same ordering are stepped in a random order? Or does this not hold in this case because ParallelSequence is calling the agents and not schedule ??

No that's expected.  ParallelSequence breaks the sequence into chunks and hands each chunk off to be processed.  It doesn't randomize the order of the agents first, so agents within a given chunk are always processed in order (and the missing chunk at the end always had the same agents).