
Boost : 
Subject: Re: [boost] [BGL] Multithread problem inserting edges and exploring the same graph
From: Cosimo Calabrese (cosimo.calabrese_at_[hidden])
Date: 20090920 10:50:43
Christoph,
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.
But now:
 the copy time is heavy, so with a shared graph I would resolve this
problem;
 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,
Cosimo Calabrese.
Christoph Heindl ha scritto:
> Cosimo,
>
> 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,
> Christoph
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk