- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在使用 boost 图形库并遇到运行时错误,我似乎无法弄清楚如何修复。
当我使用错误的顶点数和处理器数组合创建并广度优先搜索 rmat 图时,我得到一个 MPI_Unpack
运行时错误。
Number of Vertices
Processors | 1,000,000 | 2,000,000
1 | pass | pass
2 | pass | fail
3 | pass | pass
4 | pass | pass
根据堆栈跟踪,我认为代码在第一次同步调用时失败,因为在广度优先搜索代码中检查要处理的顶点队列是否为空。
有人能告诉我我的代码有什么问题吗?我在运行 red hat linux(版本 6.2)和 gcc 4.4.6 的 mac pro 上使用 boost 版本 1.41.0(如果有帮助的话)。
我的代码是:
#include <boost/graph/use_mpi.hpp>
#include <boost/mpi/environment.hpp>
#include <boost/mpi/communicator.hpp>
#include <boost/graph/distributed/concepts.hpp>
#include <boost/graph/adj_list_serialize.hpp>
#include <boost/graph/distributed/mpi_process_group.hpp>
#include <boost/graph/distributed/adjacency_list.hpp>
#include <boost/random/linear_congruential.hpp>
#include <boost/graph/distributed/breadth_first_search.hpp>
#include <boost/graph/rmat_graph_generator.hpp>
using namespace boost;
using namespace graph;
using namespace distributed;
int main(int argc, char* argv[])
{
mpi::environment env(argc, argv);
mpi::communicator world;
int verts = 20;
if(argc > 1){
verts = atoi(argv[1]);
}
int edgs = 12*verts;
if(argc > 2){
edgs = atoi(argv[2]);
}
typedef adjacency_list<listS, distributedS<mpi_process_group, vecS>, undirectedS> Graph;
minstd_rand gen_rmat;
typedef rmat_iterator<minstd_rand, Graph> RMATgen;
Graph g(RMATgen(gen_rmat, verts, 12*verts, 0.33, 0.15, 0.49, 0.03), RMATgen(), verts);
world.barrier();
synchronize(g.process_group());
world.barrier();
breadth_first_search(g, vertex(0, g), visitor(bfs_visitor<null_visitor>()));
world.barrier();
return 0;
}
我得到的运行时错误是:
terminate called after throwing an instance of boost::exception_detail::clone_impl
<boost::exception_detail::error_info_injector<boost::mph::exception> >
what(): MPI_Unpack: MPI_ERR_ARG: invalid argument of some other kind
最佳答案
事实证明升级到 boost 1.50.0 已经解决了这个问题。
关于c++ - Boost图库分布式广度优先搜索MPI_Unpack运行时报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11618483/
几个月前,我做了一个功能,我的应用程序正在等待用户文档并做出相应的响应。直到我对项目进行优化并将其更新到最新版本之前,它一直是一种魅力。 如果存在用户文档,则流将产生该文档并关闭该流。 如果云Fire
Stack Overflow 有几个 examples其中函数首先获得可升级锁,然后通过升级获得独占访问。我的理解是,如果不小心使用,这可能会导致死锁,因为两个线程可能都获得了可升级/共享锁,然后都尝
这个问题在这里已经有了答案: MVC 4 Code First ForeignKeyAttribute on property ... on type ... is not valid (1 个回答
以下是部分代码。我需要在 finally 子句中关闭资源。我需要先调用 closeEntry() 还是 close()?我收到一些错误消息。 Error closing the zipoutjava.
我想使用 RxJS-DOM 观察 mousewheel 事件,这样当第一个事件触发时,我转发它然后删除所有值,直到后续值之间的延迟超过先前指定的持续时间。 我想象的运算符可能看起来像: Rx.DOM.
版本似乎与安装的不同。 我在 npm install 上收到警告 我将二进制文件安装到我的家庭/开发目录中,但它不适用于 sudo。所以我安装了apt。 (注意:我并没有真正安装,我提取并将路径放在/
我正在尝试展示 GAN 网络在某些指定时期的结果。打印当前结果的功能以前与 TF 一起使用。我需要换成 pytorch。 def show_result(G_net, z_, num_epoch, s
我是一名优秀的程序员,十分优秀!