Boost logo

Boost Users :

Subject: [Boost-users] Distributed breadth first search MPI_Unpack runtime error
From: Clara Moore (claramoore_at_[hidden])
Date: 2012-07-18 18:30:03


Hi,
I'm having a runtime error that I can't seem to figure out how to fix.

When I create and breadth first search a graph with 1,000,000 vertices my code works fine, but if I create and breadth first search a graph with 2,000,000 vertices then I get an MPI_Unpack runtime error. From a stack trace I believe that the code is failing on a call to synchronize the first time that the queue is checked for being empty within the breadth first search code. Can anyone tell me what is wrong in my code please? I'm using version 1.48.0 if that helps any.

My code is:

#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;
}

And the runtime error I get is:

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-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net