Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8277615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:44:13+00:00 2026-06-08T08:44:13+00:00

I’m using the boost graph library and having a runtime error that I can’t

  • 0

I’m using the boost graph library and having a runtime error that I can’t seem to figure out how to fix.

When I create and breadth first search an rmat graph with the wrong combination of number of vertices and number of processors I get an MPI_Unpack runtime error.

              Number of Vertices  
Processors | 1,000,000 | 2,000,000  
    1      |    pass   |   pass  
    2      |    pass   |   fail
    3      |    pass   |   pass
    4      |    pass   |   pass

From a stack trace I believe that the code is failing on a call to synchronize the first time that the queue of vertices to process 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 boost version 1.41.0 on a mac pro running red hat linux (release 6.2) with gcc 4.4.6 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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T08:44:15+00:00Added an answer on June 8, 2026 at 8:44 am

    As it turns out upgrading to boost 1.50.0 has fixed this problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to create an if statement in PHP that prevents a single post
I know there's a lot of other questions out there that deal with this
I have a jquery bug and I've been looking for hours now, I can't
I am reading a book about Javascript and jQuery and using one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.