Replies: 3 comments 22 replies
-
I have not found a good way to parallalize a single model. As Python can really only do multiprocessing due to the Global interpreter lock (GIL) I tried using message passing to split a model spatially and pass as agent crossed the boundaries. But in general message passing is too slow so yo don't gain a lot of efficiencies. I think the more appropriate way would be to convert a model to arrays but I have not attempted that yet. Defnieitely interested in more discussion on the topic. |
Beta Was this translation helpful? Give feedback.
-
Hi everyone, interesting discussion! Any update on an easy implementation of multiprocessing or concurrent.future for the agent's steps in the mesa model? Maybe in 2 years the outlook has changed? Thanks :). |
Beta Was this translation helpful? Give feedback.
-
@TabeaSonnenschein I think in my case it didn't improve because each agent had to interact with all other agents. As you said this is not the case for you, it might improve the speed in your case. It would be great if you give an update here when/if you implement it. |
Beta Was this translation helpful? Give feedback.
-
Is there a way i can take advantages of my multiple core to parallelize computation of mesa. For example, In Wolf-Sheep predator model if i use 100k wolf and 300k Sheep the model runs very very slowly. I guess there is a way to parallalize the operation?
Beta Was this translation helpful? Give feedback.
All reactions