I am experiencing a problem with multithreading using the boost graph
library on a dual core Pentium D platform. If I attempt to calculate average
path length of a graph, I get at least a 2x slowdown using multiple threads
when using johnson_all_pairs_shortest_path. Calculating betweenness is even
worse (~7x) when I use brandes_betweenness_centrality and
relative_betweenness_centrality.
In my test setup, I have no locks anywhere and no shared memory (the graphs
are loaded from a file for each iteration in the test). The graph has been
defined similar to the following (I can't get actual code on the list due to
restrictions from employer):
struct VertexProperties
{
string name;
string group;
vector<string> properties;
};
struct EdgeProperties
{
string name;
double weight;
};
typedef boost::property<...> GraphProperty //a group of enums mapped to
doubles and ints
typedef boost::adjacency_list