簡體   English   中英

Boost圖庫分布式廣度優​​先搜索MPI_Unpack運行時錯誤

[英]Boost graph library distributed breadth first search MPI_Unpack runtime error

我正在使用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

從堆棧跟蹤中我相信代碼在調用時失敗,第一次在廣度優先搜索代碼中檢查要處理的頂點隊列是否為空時進行同步。

有人能告訴我我的代碼有什么問題嗎? 我在使用gcc 4.4.6運行red hat linux(版本6.2)的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 :: exception_detail :: clone_impl的實例后調用終止<boost::exception_detail::error_info_injector<boost::mph::exception> >

what():MPI_Unpack:MPI_ERR_ARG:其他類型的無效參數

事實證明升級到1.50.0升級已經解決了這個問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM