sbromberger / MetaGraphs.jl

I never metagraph I didn't like.
Other
94 stars 24 forks source link

Multi-threading with MetaGraphs #98

Open LoreLeenknegt opened 4 years ago

LoreLeenknegt commented 4 years ago

Hi

Julia is still new to me and I wrote a program that uses a MetaGraph as the container of the data of the simulation. The code is however too slow and I would like to look into the possibility of using multi-threading to update all the vertices (get_prop and set_prop! in loop) in parallel. Is this package thread safe and can this work? Is the use of a metagraph instead of just a multidimensional array a possible factor that greatly slows down my code?

Thank you so much in advance for the help!

sbromberger commented 4 years ago

I wouldn't count on property updating being thread-safe since we use dictionaries / named tuples under the hood. This should not be cause for a large slowdown, however. You might post your (simplified) code on the Julia discourse site and we can help troubleshoot your performance problems there.