Subject: Re: [boost] [BGL] Multithread problem inserting edges and exploring the same graph
From: Cosimo Calabrese (cosimo.calabrese_at_[hidden])
Date: 2009-09-20 10:50:43
unfortunately my graph has about 5 million of vertices and 10 million of
edges large, with many properties attached to them. A single graph takes
about 1 Gb of RAM. The "copy solution" is the one I've used till now.
- the copy time is heavy, so with a shared graph I would resolve this
- every explorer thread has need of a different view of the graph, so
with a single shared graph and with the filtered_graph adaptor, I would
resolve this problem too;
- the thread number specific of my application is increasing, so the
copy of the graph is too much onerous.
I think that with this task list, I'm practically obliged to having an
only one shared graph. The graph is too much large. What do you think about?
Thanks in advance,
Christoph Heindl ha scritto:
> you might also consider using a snapshot of the graph (i.e copy) in
> each explorer thread. This might well outperform a mutexed solution
> when the number of concurrent accesses to edges is high. The only
> thing to be synchronized then is generating a copy of the graph.
> Best regards,