Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Multi-threading with MetaGraphs #98

Open
LoreLeenknegt opened this issue Feb 17, 2020 · 1 comment
Open

Multi-threading with MetaGraphs #98

LoreLeenknegt opened this issue Feb 17, 2020 · 1 comment

Comments

@LoreLeenknegt
Copy link

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
Copy link
Owner

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants