C++ Boost图形库分布式广度优先搜索MPI_解包运行时错误

C++ Boost图形库分布式广度优先搜索MPI_解包运行时错误,c++,boost,runtime-error,breadth-first-search,C++,Boost,Runtime Error,Breadth First Search,我正在使用boost graph库,但出现了一个运行时错误,我似乎不知道如何修复 当我创建并广度优先搜索带有错误顶点数和处理器数组合的rmat图时,我得到一个MPI_Unpack运行时错误 Number of Vertices Processors | 1,000,000 | 2,000,000 1 | pass | pass 2 | pass | fail 3 | p

我正在使用boost graph库,但出现了一个运行时错误,我似乎不知道如何修复

当我创建并广度优先搜索带有错误顶点数和处理器数组合的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版)和GCC4.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;
}
#包括
#包括
#包括
#包括
#包括
#包括
#包括
#包括
#包括
#包括
使用名称空间boost;
使用名称空间图;
使用分布式名称空间;
int main(int argc,char*argv[])
{
环境环境(argc,argv);
mpi::通信器世界;
int verts=20;
如果(argc>1){
verts=atoi(argv[1]);
}
int edgs=12*顶点;
如果(argc>2){
edgs=atoi(argv[2]);
}
typedef邻接列表图;
国防部长;
类型定义格式迭代器格式;
图g(RMATgen(RMATgen,verts,12*verts,0.33,0.15,0.49,0.03),RMATgen(),verts);
世界。障碍();
同步(如进程组());
世界。障碍();
广度优先搜索(g,顶点(0,g),访问者(bfs_访问者());
世界。障碍();
返回0;
}
我得到的运行时错误是:

在抛出boost::exception\u detail::clone\u impl的实例后终止调用

what():MPI\u解包:MPI\u ERR\u ARG:其他类型的无效参数


事实证明,升级到boost 1.50.0解决了这个问题