So, now i have:
struct centrality_t {
typedef vertex_property_tag kind;
};
typedef property VertexCentrality;
typedef boost::adjacency_list,
undirectedS, VertexCentrality> Graph;
typedef boost::unique_rmat_iterator RMATGen;
struct no_self_loops
{
no_self_loops() {}
bool operator()(const std::pair& e) { return e.first != e.second; }
};
template <typename G>
struct VertexKey
{
typedef int value_type;
typedef typename graph_traits<G>::vertex_descriptor key_type;
typedef read_write_property_map_tag category;
typedef int* reference;
};
int main(int argc, char* argv[])
{
boost::mpi::environment env(argc, argv);
boost::minstd_rand gen;
unsigned int SCALE = atoi(argv[1]);
unsigned int EDGE_FACTOR = atoi(argv[2]);
unsigned int N = pow(2, SCALE);
unsigned int E = EDGE_FACTOR * N;
Graph g(
boost::make_filter_iterator
(
RMATGen(gen, N, E, 0.45, 0.15, 0.15, 0.25), RMATGen()),
boost::make_filter_iterator(RMATGen(), RMATGen()),
N);
typedef boost::property_map::type LocalMap;
typedef boost::parallel::distributed_property_map CentralityMap;
LocalMap local_map = get(centrality_t(), g);
mpi_process_group process_groupe;
//VertexKey<Graph> vertex_key;
CentralityMap centrality_map(process_groupe, local_map);
//brandes_betweenness_centrality(g, centrality_map);
}
network.cpp: In function ‘int main(int, char**)’:
network.cpp:78: error: no matching function for call to ...
/opt/boost_1_54_0_icc/boost/property_map/parallel/
distributed_property_map.hpp:329: note: candidates are:
boost::parallel::distributed_property_map::distributed_property_map(const ProcessGroup&, const
GlobalMap&, const StorageMap&)
Is this right arguments centrality_map(process_groupe, local_map) ?
Or it must be:
VertexKey<Graph> vertex_key;
CentralityMap centrality_map =
boost::parallel::make_distributed_property_map(process_groupe, local_map,
vertex_key);
In this case:
network.cpp:78: instantiated from here
/opt/boost_1_54_0_icc/boost/property_map/parallel/impl/distributed_property_map.ipp:140:
error: request for member ‘first’ in ‘p’, which is of non-class type
‘double’
/opt/boost_1_54_0_icc/boost/property_map/parallel/impl/distributed_property_map.ipp:142:
error: request for member ‘second’ in ‘p’, which is of non-class type
‘double’
/opt/boost_1_54_0_icc/boost/property_map/parallel/impl/distributed_property_map.ipp:142:
error: request for member ‘second’ in ‘p’, which is of non-class type
‘double’
Any suggestions?
Thanks.