I can try doing that. But for now:
for (unsigned int i=0;i<world.size();i++)
{
if (particles_to_be_sent[i].size()>0)
{
ghosts_to_be_sent[i].part_crossed_send()='b';
world.isend(i,20,particles_to_be_sent[i]);
}
}
mpi::all_to_all(world,ghosts_to_be_sent,ghosts_received);
//receive particles
for (int recv_rank=0;recv_rank<world.size();recv_rank++)
{
if (ghosts_received[recv_rank].part_crossed_send()=='b')
{
world.recv(recv_rank,20,particles_received); //this line fails
for (unsigned int i=0;i<particles_received.size();i++)
{
//do stuff
}
}
for (unsigned int j=0;j<ghosts_received[recv_rank].ghosts_to_send().size();j++)
{
//do stuff
}
}
From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Júlio Hoffimann
Sent: Friday, January 04, 2013 1:38 PM
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] boost-mpi assertion during recv fails
Hello,
I am using boost-mpi and I am getting an error that I am having a hard time figuring out. I am using a recv call and an assertion in the boost code fails:
void boost::mpi::binary_buffer_iprimitive::load_impl(void *, int): Assertion `position+l<=static_cast<int>(buffer_.size())’
Hi Kyle,
You have to provide some code if you want us to help you. It's basically impossible to conclude anything with a single assertion fail.
Do a test case, reduce it to the simplest scenario you can and start pulling back the complexity of your original code. It's tedious, but always works.
Regards,
Júlio.