Hello Sean and Happy New Year,
I'm using mason to model some evolutionary questions in population
genetics. These simulations can take a LONG time (days) and of course I
would like to make them faster.
As I understand it, the schedule class effectively steps all steppables
in a sequential fashion until the queue is empty. I.e. it uses a single
thread and that is also the reason why a mason simulation uses only 25%
CPU time on my quadcore PC. I therefore wonder if it would not be
possible to parallelize schedule so that it uses all the available
cores. Of course there could be inconsistencies if two neighboring
agents are stepped in parallel but if the behavior of an agent only
depends on a certain fixed neighborhood size, a parallelization scheme
could be used that avoids such conflicts.
Obviously such a rewrite of the scheduler would be non-trivial, but
maybe this would be an idea for a future version of mason ?!
P.S. Of course I can run several simulations in parallel to use all my
cores, but often I need the results of one simulation before I can start
the next, which puts limits on this kind of parallelization :-(