Boost logo

Boost Users :

Subject: [Boost-users] [mpi] communicators constructed from groups are invalid
From: Daniel Mitchell (daniel.lewis.mitchell_at_[hidden])
Date: 2012-08-16 17:35:28


Hi everyone, when I construct a communicator from a group, the
resulting communicator is invalid. Here's an example.

//------------------------------ example begin -------------------------------//

#include <boost/mpi/communicator.hpp>
#include <boost/mpi/environment.hpp>
#include <boost/mpi/group.hpp>

int main(int ac, char** av)
{
  boost::mpi::environment env(ac, av);

  boost::mpi::communicator world;

  int rank[] = {0};

  boost::mpi::communicator comm(world, world.group().include(rank, rank + 1));
}

//------------------------------ example end ---------------------------------//

This program throws an exception when comm is destroyed
(MPI_Comm_free: MPI_ERR_COMM: invalid communicator). If I try calling
comm.size() or something, it throws an "invalid communicator"
exception then, too. However, asserting on comm succeeds, so clearly
comm is confused about its state.

I found some outstanding tickets (5596, 6436) but those discussions
don't seem to go anywhere. Can anyone offer help?


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