C++ 在PBGL中使用“生成分布式属性映射”
我正在尝试实例化的属性映射。但是,由于签名已从C++ 在PBGL中使用“生成分布式属性映射”,c++,boost,mpi,boost-graph,C++,Boost,Mpi,Boost Graph,我正在尝试实例化的属性映射。但是,由于签名已从 template<typename Key, typename ProcessGroup, typename LocalPropertyMap> distributed_property_map<ProcessGroup, LocalPropertyMap, Key> make_distributed_property_map(const ProcessGroup& pg, LocalPropertyMap pmap
template<typename Key, typename ProcessGroup, typename LocalPropertyMap>
distributed_property_map<ProcessGroup, LocalPropertyMap, Key>
make_distributed_property_map(const ProcessGroup& pg, LocalPropertyMap pmap);
模板
分布式属性映射
制作分布式属性映射(constprocessgroup&pg,LocalPropertyMap-pmap);
及
模板
分布式属性映射
制作分布式属性映射(const ProcessGroup&pg、LocalPropertyMap pmap、,
减少(减少);
到
模板
内联分布式属性映射
模板
内联分布式属性映射
制作分布式属性映射(const ProcessGroup&pg、GlobalMap global、,
StorageMap存储,减少)
从Boost1.63开始,我似乎无法实例化模板参数的正确模型
下面是一个带有指示间隙的框架代码:
#include <boost/mpi.hpp>
#include <boost/graph/use_mpi.hpp>
#include <boost/graph/distributed/mpi_process_group.hpp>
#include <boost/graph/distributed/adjacency_list.hpp>
#include <boost/graph/erdos_renyi_generator.hpp>
#include <boost/random/linear_congruential.hpp>
#include <boost/graph/page_rank.hpp>
int main(int argc, char * argv[])
{
boost::mpi::environment env(argc, argv);
boost::mpi::communicator comm;
typedef boost::adjacency_list<boost::vecS,
boost::distributedS<boost::graph::distributed::mpi_process_group, boost::vecS>,
boost::directedS,
// ????
> Graph;
typedef boost::erdos_renyi_iterator<boost::minstd_rand, Graph> generator;
typedef boost::parallel::distributed_property_map<boost::graph::distributed::mpi_process_group,
// ????
> PropertyMap;
boost::minstd_rand gen;
Graph g(generator(gen, 100, 0.05), generator(), 100);
auto map = boost::parallel::make_distributed_property_map< // ????
boost::graph::distributed::mpi_process_group,
// ???
>process_group(g), ???);
boost::graph::page_rank(g, map);
return 0;
}
#包括
#包括
#包括
#包括
#包括
#包括
#包括
int main(int argc,char*argv[])
{
boost::mpi::环境环境(argc,argv);
boost::mpi::communicator comm;
typedef boost::邻接列表图;
typedef boost::鄂尔多斯_renyi_迭代器生成器;
typedef boost::parallel::分布式属性映射属性映射;
推进:明特德·兰特发电厂;
图g(发电机(gen,100,0.05),发电机(),100);
自动映射=boost::parallel::生成分布式属性映射????
boost::graph::distributed::mpi_进程组,
// ???
>过程组(g),?);
boost::graph::page_秩(g,map);
返回0;
}
非常感谢您的帮助,这里几乎没有可用的文档或示例。在
graph\u parallel/test/distributed\u rmat\u pagerank.cpp
中有一个未经宣传的测试代码示例,它正是我想要的:
typedef parallel::variant_distribution<mpi_process_group> Distribution; Distribution distrib = parallel::block(pg, n);
typedef adjacency_list<vecS,
distributedS<mpi_process_group, vecS>,
bidirectionalS> Graph;
Graph g(...);
page_rank(g, make_iterator_property_map(ranks.begin(), get(boost::vertex_index, g)),
graph::n_iterations(iters), 0.85, n);
typedef并行::变量分布;分布分布b=并行::块(pg,n);
typedef邻接列表图;
图g(…);
页面排名(g,生成迭代器属性映射(ranks.begin(),get(boost::vertex\u index,g)),
图:n_迭代(iters),0.85,n);
有关守则可于
#include <boost/mpi.hpp>
#include <boost/graph/use_mpi.hpp>
#include <boost/graph/distributed/mpi_process_group.hpp>
#include <boost/graph/distributed/adjacency_list.hpp>
#include <boost/graph/erdos_renyi_generator.hpp>
#include <boost/random/linear_congruential.hpp>
#include <boost/graph/page_rank.hpp>
int main(int argc, char * argv[])
{
boost::mpi::environment env(argc, argv);
boost::mpi::communicator comm;
typedef boost::adjacency_list<boost::vecS,
boost::distributedS<boost::graph::distributed::mpi_process_group, boost::vecS>,
boost::directedS,
// ????
> Graph;
typedef boost::erdos_renyi_iterator<boost::minstd_rand, Graph> generator;
typedef boost::parallel::distributed_property_map<boost::graph::distributed::mpi_process_group,
// ????
> PropertyMap;
boost::minstd_rand gen;
Graph g(generator(gen, 100, 0.05), generator(), 100);
auto map = boost::parallel::make_distributed_property_map< // ????
boost::graph::distributed::mpi_process_group,
// ???
>process_group(g), ???);
boost::graph::page_rank(g, map);
return 0;
}
typedef parallel::variant_distribution<mpi_process_group> Distribution; Distribution distrib = parallel::block(pg, n);
typedef adjacency_list<vecS,
distributedS<mpi_process_group, vecS>,
bidirectionalS> Graph;
Graph g(...);
page_rank(g, make_iterator_property_map(ranks.begin(), get(boost::vertex_index, g)),
graph::n_iterations(iters), 0.85, n);