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
#include
#include
#include
#include
#include
#include
#include
#include
#include
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, undirectedS> Graph;
minstd_rand gen_rmat;
typedef rmat_iterator 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()));
world.barrier();
return 0;
}
And the runtime error I get is:
terminate called after throwing an instance of 'boost::exception_detail::clone_implboost::mph::exception >'
what(): MPI_Unpack: MPI_ERR_ARG: invalid argument of some other kind